/* =========================================================
   下载落地页
   手机：单栏 + 底部常驻下载条
   电脑：两栏 —— 左产品信息，右扫码卡片
   ========================================================= */
:root {
  --brand: #ff9f2e;
  --brand-2: #ffc86b;
  --ink-on-brand: #2a1704;

  --bg: #0c0f14;
  --bg-2: #11161f;
  --surface: rgba(255, 255, 255, .055);
  --surface-2: rgba(255, 255, 255, .085);
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .16);

  --text: #eef1f6;
  --muted: #98a1b0;
  --radius: 18px;
}
[data-theme="green"]  { --brand: #35c05f; --brand-2: #7ee79b; --ink-on-brand: #04240f; }
[data-theme="blue"]   { --brand: #3d8bff; --brand-2: #7fb4ff; --ink-on-brand: #04173a; }
[data-theme="purple"] { --brand: #9a6bff; --brand-2: #c3a4ff; --ink-on-brand: #1b0a3d; }
[data-theme="red"]    { --brand: #ff5f4d; --brand-2: #ff9384; --ink-on-brand: #3a0c05; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.i { width: 20px; height: 20px; flex: none; }

/* ---------- 背景光斑 ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
      background: radial-gradient(120% 80% at 50% -10%, var(--bg-2), var(--bg) 62%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .30; display: block; }
.o1 { width: 380px; height: 380px; top: -140px; left: -110px; background: var(--brand); }
.o2 { width: 300px; height: 300px; top: 32%; right: -130px; background: var(--brand-2); opacity: .16; }
.o3 { width: 460px; height: 460px; bottom: -240px; left: 30%; background: var(--brand); opacity: .12; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; gap: 16px;
}
.tb-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.tb-icon {
  width: 32px; height: 32px; border-radius: 10px; overflow: hidden; flex: none;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-on-brand); font-weight: 800; font-size: 15px;
}
.tb-icon img { width: 100%; height: 100%; object-fit: cover; }
.tb-nav { display: none; gap: 8px; align-items: center; font-size: 13.5px; }
.tb-nav a { color: var(--muted); padding: 7px 12px; border-radius: 9px; transition: .16s; }
.tb-nav a:hover { color: var(--text); background: var(--surface); }
.tb-nav .tb-cta {
  color: var(--text); border: 1px solid var(--line-2); background: var(--surface);
}

/* ---------- 布局 ---------- */
.shell { padding: 8px 20px 40px; }
.hero { display: block; }
.hero-side { display: none; }

/* ---------- 应用头部 ---------- */
.app-head { display: flex; gap: 16px; align-items: center; padding: 14px 0 22px; }
.app-icon {
  width: 84px; height: 84px; border-radius: 24px; flex: none; overflow: hidden;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-on-brand); font-size: 36px; font-weight: 800;
  box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--brand) 65%, transparent),
              inset 0 1px 0 rgba(255, 255, 255, .35);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }
.app-meta { min-width: 0; }
.app-meta h1 { font-size: 26px; line-height: 1.25; }
.app-meta .sub { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  font-size: 11.5px; padding: 3px 9px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.chip-ok { color: var(--brand-2); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }

/* ---------- 下载按钮 ---------- */
.cta-group { display: flex; flex-direction: column; gap: 11px; }
.cta {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 15px;
  border: 1px solid var(--line-2); background: var(--surface);
  transition: transform .14s, background .18s, border-color .18s;
}
.cta:active { transform: scale(.985); }
.cta-tx { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.cta-tx b { font-size: 16px; font-weight: 700; }
.cta-tx i { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: .04em; margin-top: 2px; }
.cta .i:last-child { opacity: .45; width: 18px; height: 18px; }

/* 当前系统对应的那个按钮由 JS 加 is-primary */
.cta.is-primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  border-color: transparent; color: var(--ink-on-brand);
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--brand) 75%, transparent);
}
.cta.is-primary .cta-tx i { color: color-mix(in srgb, var(--ink-on-brand) 60%, transparent); }
.cta.is-primary .i:last-child { opacity: .6; }
.cta.is-off { opacity: .38; }
.cta-alt { padding: 11px 18px; }
.cta-alt .cta-tx b { font-size: 14px; font-weight: 600; color: var(--muted); }

/* ---------- 视频教程 ---------- */
.tutorials { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tut {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-radius: 13px; border: 1px solid var(--line); background: var(--surface);
  transition: .16s;
}
.tut:hover { background: var(--surface-2); border-color: var(--line-2); }
.tut span:last-child { display: flex; flex-direction: column; min-width: 0; }
.tut b { font-size: 13px; font-weight: 600; }
.tut i { font-style: normal; font-size: 11px; color: var(--muted); }
.tut-play {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: color-mix(in srgb, var(--brand) 22%, transparent);
  color: var(--brand-2);
  display: flex; align-items: center; justify-content: center;
}
.tut-play .i { width: 16px; height: 16px; }

/* ---------- 通告 ---------- */
.notice {
  margin-top: 20px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.notice h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 10px; }
.notice .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.notice li {
  position: relative; padding-left: 15px; margin: 7px 0;
  font-size: 13px; color: var(--muted); line-height: 1.75;
}
.notice li::before {
  content: ""; position: absolute; left: 2px; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-2);
}

/* ---------- 页脚 ---------- */
.foot { text-align: center; padding: 26px 20px calc(96px + env(safe-area-inset-bottom)); color: #656d7b; font-size: 11.5px; }
.foot p { margin: 3px 0; }

/* ---------- 手机端底部常驻下载条 ---------- */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 9px 10px 9px 12px; border-radius: 17px;
  background: rgba(20, 25, 34, .82);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .45);
  animation: dockIn .26s ease;
}
@keyframes dockIn { from { transform: translateY(120%); } to { transform: none; } }
.dock-app { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.dock-icon {
  width: 38px; height: 38px; border-radius: 12px; overflow: hidden; flex: none;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-on-brand); font-weight: 800; font-size: 17px;
}
.dock-icon img { width: 100%; height: 100%; object-fit: cover; }
.dock-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.dock-tx b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock-tx i { font-style: normal; font-size: 11px; color: var(--muted); }
.dock-btn {
  padding: 9px 22px; border-radius: 12px; font-size: 14px; font-weight: 700; flex: none;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: var(--ink-on-brand);
}

/* ---------- 客服悬浮球 ---------- */
.fab {
  position: fixed; right: 14px; bottom: calc(20px + env(safe-area-inset-bottom));
  width: 46px; height: 46px; border-radius: 50%; z-index: 39;
  transition: bottom .24s ease;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
}
/* 底部下载条浮出时，客服球让位上移 */
body.has-dock .fab { bottom: calc(80px + env(safe-area-inset-bottom)); }

/* ---------- iOS OTA 安装中转页 ---------- */
.ota { max-width: 440px; margin: 0 auto; padding: 52px 24px 40px; text-align: center; }
.ota-icon {
  width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 25px; overflow: hidden;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-on-brand); font-size: 38px; font-weight: 800;
  box-shadow: 0 16px 38px -12px color-mix(in srgb, var(--brand) 65%, transparent);
}
.ota-icon img { width: 100%; height: 100%; object-fit: cover; }
.ota h1 { font-size: 23px; }
.ota-ver { margin: 6px 0 26px; font-size: 12.5px; color: var(--muted); word-break: break-all; }
.ota-btn {
  display: block; padding: 15px 20px; border-radius: 15px; font-size: 17px; font-weight: 700;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: var(--ink-on-brand);
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--brand) 75%, transparent);
}
.ota-tip { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.ota-steps { margin: 30px 0 0; text-align: left; }
.ota-steps li {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: 13px; color: var(--muted); line-height: 1.75; margin: 12px 0;
}
.ota-steps .n {
  width: 21px; height: 21px; border-radius: 50%; flex: none; margin-top: 3px;
  background: color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--brand-2); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.ota-steps .t { flex: 1; min-width: 0; }
.ota-steps b { display: inline-block; color: var(--text); font-weight: 600; margin-top: 2px; }
.ota-err {
  text-align: left; padding: 16px 18px; border-radius: var(--radius);
  background: rgba(255, 95, 77, .10); border: 1px solid rgba(255, 95, 77, .30);
}
.ota-err b { display: block; color: #ff8b7b; margin-bottom: 8px; font-size: 14px; }
.ota-err p { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.ota-err code { background: rgba(255, 255, 255, .08); padding: 1px 5px; border-radius: 4px; }
.ota-err .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; word-break: break-all; color: #7d8695; }
.ota-back { display: inline-block; margin-top: 32px; font-size: 13px; color: var(--muted); }

/* ---------- 微信内引导 ---------- */
.guide {
  position: fixed; inset: 0; z-index: 99; background: rgba(6, 8, 12, .9);
  color: #fff; text-align: right; padding: 18px 24px;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.guide-arrow { font-size: 44px; line-height: 1; margin-right: 8px; }
.guide-tx { font-size: 17px; line-height: 1.95; margin: 10px 0 0; }
.guide-tx b { color: var(--brand-2); }
.guide-close {
  margin: 26px 0 0 auto; display: block; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line-2); color: #fff;
  padding: 9px 22px; border-radius: 30px; font-size: 14px;
}

/* =========================================================
   电脑端：两栏
   ========================================================= */
@media (min-width: 900px) {
  body { font-size: 15px; }
  .tb-nav { display: flex; }
  .topbar { padding: 22px max(32px, calc((100vw - 1120px) / 2)); }

  .shell { padding: 0 max(32px, calc((100vw - 1120px) / 2)) 60px; }
  .hero {
    display: grid; grid-template-columns: minmax(0, 1.08fr) 340px;
    gap: 64px; align-items: start; padding-top: 44px;
  }
  .hero-side { display: block; position: sticky; top: 44px; }

  .app-head { padding: 0 0 30px; gap: 22px; }
  .app-icon { width: 104px; height: 104px; border-radius: 28px; font-size: 44px; }
  .app-meta h1 { font-size: 38px; }
  .app-meta .sub { font-size: 15px; margin-top: 8px; }
  .chips { margin-top: 14px; }
  .chip { font-size: 12px; padding: 4px 11px; }

  /* 电脑端两个下载按钮并排 */
  .cta-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .cta { padding: 16px 20px; }
  .cta-alt { grid-column: 1 / -1; }
  .cta:hover { background: var(--surface-2); border-color: var(--line-2); transform: translateY(-1px); }
  .cta.is-primary:hover { filter: brightness(1.06); }

  .tutorials { margin-top: 16px; }
  .notice { margin-top: 26px; padding: 20px 22px; }
  .notice li { font-size: 13.5px; }

  /* 扫码卡片 */
  .qr-card {
    padding: 22px; border-radius: 22px; text-align: center;
    background: var(--surface); border: 1px solid var(--line);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .qr-frame {
    width: 188px; height: 188px; margin: 0 auto; padding: 10px;
    border-radius: 16px; background: #fff;
    box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .8);
  }
  .qr-frame img { width: 100%; height: 100%; }
  .qr-title { margin: 16px 0 2px; font-size: 15px; font-weight: 700; }
  .qr-sub { margin: 0; font-size: 12px; color: var(--muted); }
  .steps { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: left; }
  .steps li {
    display: flex; align-items: center; gap: 10px;
    font-size: 12.5px; color: var(--muted); margin: 9px 0;
  }
  .steps span {
    width: 20px; height: 20px; border-radius: 50%; flex: none;
    background: color-mix(in srgb, var(--brand) 20%, transparent);
    color: var(--brand-2); font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
  }

  /* 电脑端不需要底部下载条 */
  .dock { display: none !important; }
  .fab, body.has-dock .fab { right: 26px; bottom: 26px; width: 50px; height: 50px; }
  .foot { padding-bottom: 30px; }
}

@media (min-width: 1280px) {
  .hero { grid-template-columns: minmax(0, 1fr) 360px; gap: 80px; }
  .app-meta h1 { font-size: 42px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
