/* 别处官网样式。颜色、字号取自 App 的主题定义（frontend/src/theme/tokens.ts）
   和首启三幕（OnboardingScreen.tsx：陶土 / 墨 / 雾蓝三块底色）。
   2026-10-26 参考 claude.com 改版：标题换展示字体（宋体 / 楷体 / 苹方三选一，见 <html data-display>），
   正文仍是系统苹方；分区底色交替；页脚深色；首屏居中 + 漂浮分身卡；三个核心体验改成标签切换；加常见问题。
   不引外部字体和 CDN —— 展示字体是 build.py 从开源字体里按页面用到的字截取、放在自己站上的。 */

:root {
  --bg: #F5EEE1;          /* bgPage */
  --bg-alt: #EDE4D3;      /* 分区交替用的深一档米色 */
  --bg-warm: #F5EFE3;     /* bgWarm */
  --bg-subtle: #F1EADC;   /* bgSubtle */
  --bg-art: #FBF7F1;      /* 首启插画底 */
  --card: #FFFDFA;        /* bgCardWarm */
  --ink: #1A1A1A;
  --text: #1F1A15;        /* textPrimary */
  --text-2: rgba(0, 0, 0, 0.64);  /* 首启副标题 */
  --text-3: rgba(0, 0, 0, 0.56);  /* 小字灰。App 里是 0.45（inkMuted），但在米色底上只有 3.3:1，
                                    官网小字多、要给人读，加深到 ≥4.5:1（2026-10-20 设计评审） */
  --line: rgba(0, 0, 0, 0.12);
  --accent: #E6892D;
  --accent-deep: #87613D;
  --border: #EAE3D6;
  --clay: #D9AC7E;        /* 首启第一幕 */
  --mist: #B8CADC;        /* 首启第三幕 */
  --footer: #1F1B17;      /* 深色页脚：textPrimary 再压一点 */
  --radius-card: 28px;
  --gutter: 20px;
  --header-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;

  /* 展示字体（标题、宣言、常见问题的问题、「别处」字标）。默认苹方，下面按 data-display 覆盖 */
  --display: var(--font);
  --w-hero: 600;
  --w-title: 600;
  --w-sub: 400;
  --w-brand: 600;
}
/* A：思源宋体（Noto Serif SC，可变字重）。截取后的字体叫 Biechu Display，没加载出来时 Mac 用系统宋体顶上 */
[data-display="serif"] {
  --display: "Biechu Display", "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --w-hero: 500;
  --w-title: 500;
  --w-sub: 400;
  --w-brand: 600;
}
/* B：霞鹜文楷（只有常规一档字重，不让浏览器合成粗体） */
[data-display="kai"] {
  --display: "Biechu Display", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --w-hero: 400;
  --w-title: 400;
  --w-sub: 400;
  --w-brand: 400;
}
.serif { font-family: var(--display); font-synthesis: none; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;        /* clip 不会让 body 变成滚动容器，页头的 sticky 才不失效 */
  line-break: strict;      /* 中文避头尾：句号逗号不出现在行首 */
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

/* ---------- 按钮（保持 App 的黑色胶囊） ---------- */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
  transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent; /* 按下有缩小反馈，不要浏览器再盖一层蓝色高亮 */
}
.pill:hover { background: #333; }
.pill:active { transform: scale(.97); }
.pill-lg { height: 52px; padding: 0 30px; font-size: 16px; letter-spacing: .5px; }
.pill-sm { position: relative; height: 34px; padding: 0 14px; font-size: 14px; }
/* 次按钮：描边胶囊（原来是下划线文字链接）。底色半透明，压在水印上也读得清 */
.pill-ghost {
  background: rgba(255, 253, 250, .72);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .22);
}
.pill-ghost:hover { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); }
/* 看起来的大小不变，能点到的范围扩到 ≥44px 高（手指要点得准） */
.pill-sm::after, .doc-tab::after { content: ""; position: absolute; inset: -5px -4px; }

/* ---------- 页头：固定在顶上，往下滚加磨砂底和细线 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(245, 238, 225, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}
.brand-logo { border-radius: 8px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.brand-name { font-size: 20px; font-weight: var(--w-brand); letter-spacing: 1px; color: var(--ink); }

.header-nav { display: flex; align-items: center; gap: 26px; }
.nav-link {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition: color .2s ease;
}
.nav-link:hover, .nav-link.is-current { color: var(--ink); }
.nav-link.is-current { font-weight: 600; }

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--ink);
  transition: transform .25s ease, top .25s ease;
}
.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 25px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 21.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 21.5px; transform: rotate(-45deg); }

.site-menu { padding: 4px 0 24px; }
.site-menu[hidden] { display: none; }
.menu-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.menu-link.is-current { font-weight: 600; }
.menu-cta { width: 100%; margin-top: 20px; }

@media (max-width: 899px) {
  .header-nav { display: none; }
  .menu-btn { display: block; }
}
@media (min-width: 900px) {
  .site-menu { display: none !important; }
}

/* ---------- 第一屏 ---------- */

/* 第一屏背后的空间名水印，画在 canvas 上，见 ripple.js。
   画布从首屏往上伸到页头底下（页头本身不在 main 里，读屏软件靠 main 找正文），
   底部渐隐，不和下面的内容硬切。没有 JS 时 canvas 是空的，页面照常。 */
.first-screen { position: relative; }
.ripple-canvas {
  position: absolute;
  left: 0;
  top: calc(-1 * var(--header-h) - env(safe-area-inset-top));
  width: 100%;
  height: calc(100% + var(--header-h) + env(safe-area-inset-top));
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .6s ease;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
}
.ripple-canvas.is-ready { opacity: 1; }
.first-screen > .hero { position: relative; z-index: 1; }
/* 首屏和页头的字周围晕一圈底色，波纹从字后面过时不和正文挤在一起 */
.hero-inner > :not(.cta-row),
.site-header:not(.is-scrolled) .brand-name,
.site-header:not(.is-scrolled) .nav-link {
  text-shadow: 0 0 2px var(--bg), 0 0 4px var(--bg), 0 0 8px var(--bg);
}

.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 56px;
  text-align: center;
}
.hero-inner { max-width: 760px; }
.hero-title {
  font-family: var(--display);
  font-size: clamp(76px, 21vw, 96px);
  line-height: 1.08;
  font-weight: var(--w-hero);
  letter-spacing: 0;       /* 汉字是满格方块，大字再加字距就散了 */
  color: var(--ink);
}
.hero-tagline {
  margin-top: 16px;
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.5;
  font-weight: var(--w-sub);
  color: var(--ink);
}
.hero-desc {
  margin: 18px auto 0;
  max-width: 30em;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-2);
}
.cta-row {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-note { margin-top: 14px; font-size: 14px; color: var(--text-3); }

/* 漂浮的分身卡：卡片样式照 App 的切换分身面板（暖白卡 + 头像 + 昵称 + 标签和时态小黑标） */
.fs-cards {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;             /* 首屏是竖排 flex，左右 auto 外边距会让这一行缩成内容宽，三张卡被挤窄 */
  max-width: 700px;
  margin: 40px auto 0;
  padding: 0 var(--gutter);
}
.fs-card { position: relative; flex: 1 1 0; min-width: 0; max-width: 214px; }
.fs-float { position: relative; }
.fs-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 14px 32px -16px rgba(70, 45, 20, .32);
  transition: transform .3s ease, box-shadow .3s ease;
}
.fs-1 .fs-body { transform: rotate(-2.5deg); }
.fs-2 .fs-body { transform: rotate(2deg); }
.fs-3 .fs-body { transform: rotate(-1.5deg); }
.fs-card:hover .fs-body { transform: rotate(0) translateY(-3px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 20px 40px -18px rgba(70, 45, 20, .4); }
.fs-avatar { width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: cover; }
.fs-info { min-width: 0; }
.fs-name { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-tags { margin-top: 2px; font-size: 13px; line-height: 1.6; color: var(--text-3); }
.fs-tags span { display: block; white-space: nowrap; }
.tense {
  display: inline-block;
  padding: 0 4px;
  margin-left: 2px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;          /* App 里是 10，官网标签字不低于 12 */
  line-height: 16px;
  font-style: italic;
  font-weight: 700;
  vertical-align: 1px;
}
.fs-bubu { display: none; }
.fs-caption { display: none; }

/* 手机：三张卡排成一行，竖着排头像和昵称，只留第一个标签 */
@media (max-width: 599px) {
  .fs-cards { gap: 8px; margin-top: 36px; }
  .fs-body { flex-direction: column; text-align: center; gap: 6px; padding: 12px 6px; border-radius: 16px; }
  .fs-1 .fs-body { transform: rotate(-1.5deg); }
  .fs-2 .fs-body { transform: rotate(1.5deg); }
  .fs-3 .fs-body { transform: rotate(-1deg); }
  .fs-avatar { width: 40px; height: 40px; }
  .fs-name { font-size: 13px; }
  .fs-tags { font-size: 12px; }
  .fs-tags span + span { display: none; }
}

@media (min-width: 900px) {
  .hero { padding: 56px 0 72px; }
  .hero-title { font-size: 120px; }
  .hero-desc { font-size: 17px; }
  .cta-row { margin-top: 36px; }
}

/* 宽屏：卡片挪到标题两侧漂着，随滚动轻轻错开（site.js 写 --py） */
@media (min-width: 1280px) {
  .hero { min-height: clamp(640px, calc(100svh - var(--header-h)), 880px); padding: 40px 0 64px; }
  .fs-cards { position: absolute; inset: 0; margin: 0; padding: 0; max-width: none; display: block; pointer-events: none; }
  .fs-card { position: absolute; width: 214px; max-width: none; pointer-events: auto; translate: 0 var(--py, 0px); }
  .fs-1 { left: calc(50% - 610px); top: 16%; }
  .fs-2 { left: calc(50% - 560px); top: 60%; }
  .fs-3 { right: calc(50% - 610px); top: 36%; }
  .fs-float { animation: fs-float 7s ease-in-out infinite; }
  .fs-2 .fs-float { animation-duration: 8.5s; animation-delay: -2s; }
  .fs-3 .fs-float { animation-duration: 9.5s; animation-delay: -4s; }
  .fs-bubu { display: block; position: absolute; left: 14px; bottom: -40px; width: 30px; height: auto; }
  .fs-caption { display: block; margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-3); }
}
@keyframes fs-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* 进页面时首屏按顺序淡入一次：标题 → 副标题 → 说明 → 按钮 → 卡片。其余区块不做「每块都往上飘」 */
.rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 分区通用 ---------- */

.section-title {
  font-family: var(--display);
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1.25;
  font-weight: var(--w-title);
  text-align: center;
  color: var(--ink);
}
.section-intro {
  max-width: 32em;
  margin: 16px auto 0;
  font-size: 16px;
  line-height: 1.85;
  text-align: center;
  color: var(--text-2);
}

/* ---------- 三个核心体验：标签切换 ---------- */

.tour { background: var(--bg-alt); padding: 72px 0 80px; }
.tour-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 760px;
  margin: 36px auto 28px;
}
.tour-tab {
  position: relative;
  min-height: 52px;
  padding: 12px 10px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tour-tab:hover { background: rgba(255, 253, 250, .5); }
.tour-tab[aria-selected="true"] { background: var(--card); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.tour-tab-k { display: block; font-size: 18px; line-height: 1.4; font-weight: var(--w-title); color: var(--ink); }
.tour-tab-v { display: none; margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--text-3); }
/* 自动轮换时，选中那个标签底下走一条进度线 */
.tour-tab-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 7px;
  height: 2px;
  border-radius: 1px;
  background: rgba(0, 0, 0, .08);
  overflow: hidden;
  opacity: 0;
  transition: opacity .2s ease;
}
.tour-tab-bar i { display: block; width: 100%; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.tour.is-auto .tour-tab[aria-selected="true"] .tour-tab-bar { opacity: 1; }
.tour.is-auto .tour-tab[aria-selected="true"] .tour-tab-bar i { animation: tour-progress var(--tour-ms, 7000ms) linear forwards; }
.tour.is-paused .tour-tab[aria-selected="true"] .tour-tab-bar i { animation-play-state: paused; }
@keyframes tour-progress { to { transform: scaleX(1); } }

.tour-panel { display: grid; gap: 28px; align-items: center; }
.tour-panel + .tour-panel { margin-top: 56px; }      /* 没有 JS 时三块依次排开 */
.js-tour .tour-panel + .tour-panel { margin-top: 0; }
.tour-panel[hidden] { display: none; }
.js-tour .tour-panel:not([hidden]) { animation: panel-in .45s ease both; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.tour-title { font-size: 26px; line-height: 1.4; font-weight: var(--w-title); color: var(--ink); }
.tour-text { margin-top: 12px; max-width: 26em; font-size: 16px; line-height: 1.85; color: var(--text-2); }

/* 色块：首启三幕的构图（色块占一半，比例照 OnboardingScreen 的 blockRatio），手机框跨在分界线上。
   色块上的纹理是首启 V3 定的「稿纸格」：22px 方格、行与行之间留 8px 空。 */
.stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  padding: 36px 0;
  display: flex;
  justify-content: center;
  background: var(--bg-art);
}
.stage::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--block-h);
  background:
    repeating-linear-gradient(to bottom, transparent 0 23px, var(--block) 23px 30px),
    repeating-linear-gradient(to bottom, var(--rule) 0 1px, transparent 1px 22px, var(--rule) 22px 23px, transparent 23px 30px),
    repeating-linear-gradient(to right, var(--rule) 0 1px, transparent 1px 22px),
    var(--block);
  background-position: 18px 18px;
}
.stage > .phone { position: relative; z-index: 1; }
.stage-clay { --block: var(--clay); --block-h: 46%; --rule: rgba(255, 255, 255, .3); }
.stage-ink { --block: var(--ink); --block-h: 52%; --rule: rgba(255, 255, 255, .1); }
.stage-ink::before { top: auto; bottom: 0; }
.stage-mist { --block: var(--mist); --block-h: 52%; --rule: rgba(255, 255, 255, .38); }

/* 手机外框 + 截图 */
.phone {
  width: min(250px, 58%);
  aspect-ratio: 1206 / 2622;
  border-radius: 38px;
  padding: 7px;
  background: #111;
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .45);
}
.stage-ink .phone { background: #2A2A2A; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 24px 48px -20px rgba(0, 0, 0, .6); }
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  background: var(--bg-art);
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }

.shot-slot {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 16px;
  border: 1.5px dashed var(--accent);
  border-radius: 31px;
}
.shot-slot img { width: 44px; height: auto; margin-bottom: 10px; }
.shot-slot-k { font-size: 15px; font-weight: 600; color: var(--ink); }
.shot-slot-v { font-size: 14px; color: var(--text-2); }
.shot-slot-f { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--text-3); word-break: break-all; }

@media (min-width: 900px) {
  .tour { padding: 112px 0 120px; }
  .tour-tabs { margin: 44px auto 36px; }
  .tour-tab { padding: 16px 18px 18px; text-align: left; }
  .tour-tab-v { display: block; }
  .tour-tab-bar { left: 18px; right: 18px; bottom: 8px; }
  .tour-panel { grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 72px; }
  .tour-title { font-size: 32px; }
  .tour-text { font-size: 17px; }
  .stage { padding: 52px 0; }
}

/* ---------- 宣言 ---------- */

.manifesto { padding: 88px 0 96px; text-align: center; }
.manifesto-art { width: 120px; margin: 0 auto 32px; }
.manifesto-main {
  font-size: clamp(32px, 5.2vw, 58px);
  line-height: 1.4;
  font-weight: var(--w-hero);
  color: var(--ink);
}
.manifesto-sub {
  margin-top: 24px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
  font-weight: var(--w-sub);
  color: var(--text-2);
}
@media (min-width: 900px) {
  .manifesto { padding: 136px 0 144px; }
  .manifesto-art { width: 150px; margin-bottom: 40px; }
}

/* ---------- 常见问题 ---------- */

.faq { background: var(--bg-alt); padding: 72px 0 80px; }
.faq-list { max-width: 760px; margin: 36px auto 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  padding: 20px 0;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { font-size: 17px; line-height: 1.55; font-weight: var(--w-title); color: var(--ink); }
.faq-item summary:hover .faq-q { color: #000; }
/* 「＋」，展开后转 45° 变成「×」 */
.faq-icon { position: relative; flex: none; width: 16px; height: 16px; transition: transform .25s ease; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 7.25px;
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--ink);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-a { padding: 0 36px 24px 0; font-size: 16px; line-height: 1.85; color: var(--text-2); }
.faq-item[open] .faq-a { animation: faq-in .3s ease both; }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.faq-a p + p { margin-top: 10px; }
.faq-a a { color: #6A4A2C; text-underline-offset: 2px; word-break: break-all; }  /* accent-deep 在深一档米色上只有 4.37:1，再压一点 */
@media (min-width: 900px) {
  .faq { padding: 112px 0 120px; }
  .faq-list { margin-top: 48px; }
  .faq-item summary { padding: 24px 0; }
  .faq-q { font-size: 19px; }
  .faq-a { font-size: 17px; }
}

/* ---------- 下载 ---------- */

.download { padding: 72px 0 88px; }
.download-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 40px 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
}
.download-main { display: flex; flex-direction: column; align-items: center; }
.download-bubu { width: 88px; margin-bottom: 12px; }
.download-title { font-size: 30px; line-height: 1.4; font-weight: var(--w-title); color: var(--ink); }
.download-text {
  margin: 12px 0 26px;
  max-width: 26em;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-2);
}
.download-note { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.download-qr { display: none; }

@media (min-width: 900px) {
  .download { padding: 112px 0 128px; }
  .download-card {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 88px;
    padding: 56px 64px;
    text-align: left;
  }
  .download-main { align-items: flex-start; }
  .download-title { font-size: 38px; }
  .download-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-3);
  }
  .download-qr svg {
    width: 148px;
    height: 148px;
    padding: 14px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 0 0 1px var(--border);
  }
}

/* ---------- 页脚：深色整块收尾 ---------- */

.site-footer {
  background: var(--footer);
  padding: 56px 0 calc(36px + env(safe-area-inset-bottom));
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, .64);
}
.site-footer .brand-name { color: #fff; font-size: 20px; }
.site-footer .brand-logo { box-shadow: none; }
.footer-intro { display: grid; gap: 14px; }
.footer-statement { max-width: 44em; }
.footer-cols { display: grid; gap: 28px; margin-top: 36px; }
.footer-h { font-size: 13px; font-weight: 600; letter-spacing: .5px; color: rgba(255, 255, 255, .5); margin-bottom: 8px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { display: flex; flex-wrap: wrap; column-gap: 12px; color: rgba(255, 255, 255, .82); }
.footer-list a { color: rgba(255, 255, 255, .86); text-decoration: none; transition: color .2s ease; }
.footer-list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-k { flex: none; width: 9.5em; color: rgba(255, 255, 255, .56); }
.footer-en { font-size: 13px; color: rgba(255, 255, 255, .64) !important; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 13px;
}
.beian { color: rgba(255, 255, 255, .64); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.beian:hover { color: #fff; text-decoration: underline; }
.beian img { width: 14px; height: 14px; }

@media (min-width: 720px) {
  .footer-intro { grid-template-columns: auto 1fr; gap: 32px; align-items: start; }
  .footer-cols { grid-template-columns: 1fr 1.6fr 1.4fr; gap: 32px; }
}
@media (min-width: 900px) {
  .site-footer { padding-top: 72px; }
}

/* 上线前要替换的占位：虚线框 +「待替换」小标，一眼能找到 */
.is-todo {
  outline: 1.5px dashed var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
  color: var(--accent) !important;
}
.is-todo::after {
  content: "待替换";
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
}

/* ---------- 协议页 ---------- */

.legal-wrap { padding-top: 8px; padding-bottom: 64px; }

.doc-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 5px 0;          /* 给按钮扩出来的可点范围留位置，不被横向滚动裁掉 */
  margin: -5px 0 15px;
}
.doc-tabs::-webkit-scrollbar { display: none; }
.doc-tab {
  position: relative;
  flex: none;
  height: 34px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  background: var(--bg-subtle);
}
.doc-tab:hover { color: var(--ink); }
.doc-tab.is-current { background: var(--ink); color: #fff; font-weight: 600; }

.legal-layout { display: grid; gap: 32px; }
.toc-side { display: none; }

.doc {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 20px 24px;
  min-width: 0;
}
.doc-title { font-size: 28px; line-height: 1.4; font-weight: var(--w-title); color: var(--ink); }
.doc-meta { margin-top: 12px; font-size: 14px; line-height: 1.9; color: var(--text-3); }
.doc-meta p { margin: 0; }
.doc-meta strong { font-weight: 400; }

.toc-inline {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-warm);
}
.toc-inline summary {
  cursor: pointer;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  list-style-position: inside;
}
.toc-inline .toc { padding: 0 14px 12px; }

.toc { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.6; }
.toc li { margin: 6px 0; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--ink); }

.doc-body { margin-top: 8px; font-size: 16px; line-height: 1.9; color: var(--text); }
.doc-body h2 {
  margin: 36px 0 10px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
}
.doc-body h3 { margin: 24px 0 8px; font-size: 16px; font-weight: 600; }
.doc-body p { margin: 8px 0; }
.doc-body p.sub { padding-left: 2em; }
.doc-body strong { font-weight: 600; color: var(--ink); }
.doc-body a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.doc-body hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.doc-body ul { margin: 8px 0; padding-left: 1.4em; }
.doc-body ul.dot { list-style: none; padding-left: 0; }
.doc-body ul.dot li { position: relative; padding-left: 1.1em; }
.doc-body ul.dot li::before { content: "·"; position: absolute; left: .2em; font-weight: 700; color: var(--accent); }
.doc-body li { margin: 4px 0; }
.doc-body blockquote {
  margin: 20px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-warm);
  border-left: 3px solid var(--clay);
  line-height: 1.85;
}
.doc-body blockquote p { margin: 4px 0; }

.table-wrap { margin: 14px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px; }
.doc-body table { border-collapse: collapse; min-width: 600px; width: 100%; font-size: 14px; line-height: 1.7; }
.doc-body th, .doc-body td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.doc-body th { background: var(--bg-subtle); font-weight: 600; white-space: nowrap; }
.doc-body tr:last-child td { border-bottom: 0; }
.doc-body td + td, .doc-body th + th { border-left: 1px solid var(--border); }

/* 手机宽度：表格每一行排成一张卡片（四列挤在 350px 里只能横着滑，读不下去） */
@media (max-width: 599px) {
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .doc-body table, .doc-body tbody, .doc-body tr, .doc-body td { display: block; min-width: 0; width: auto; }
  .doc-body thead { display: none; }
  .doc-body tr {
    margin: 10px 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
  }
  .doc-body td { padding: 4px 0; border: 0; font-size: 16px; }
  .doc-body td + td { border-left: 0; }
  .doc-body td:first-child { font-weight: 600; color: var(--ink); }
  .doc-body td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    color: var(--text-3);
  }
}

/* 正本里还没填的【】项：上线前要补，预览时标出来 */
.pending { background: rgba(230, 137, 45, .14); border-bottom: 1.5px dashed var(--accent); border-radius: 2px; }

.doc-end { margin-top: 32px; font-size: 14px; text-align: right; }
.doc-end a { color: var(--text-3); }

@media (min-width: 900px) {
  .legal-wrap { padding-top: 16px; padding-bottom: 96px; }
  .legal-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
  /* 页头现在固定在顶上，目录要让出页头的高度 */
  .toc-side { display: block; position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-top: 28px; }
  .toc-h { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
  .toc-inline { display: none; }
  .doc { padding: 44px 52px 36px; }
  .doc-title { font-size: 34px; }
  .doc-body h2 { font-size: 19px; }
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 56vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 40px;
  padding-bottom: 80px;
}
.notfound-bubu { width: 132px; margin-bottom: 28px; }
.notfound-title { font-size: 28px; font-weight: var(--w-title); color: var(--ink); }
.notfound-text { margin: 8px 0 28px; font-size: 15px; color: var(--text-2); }

/* 触屏或手机宽度：页脚、目录这些排得密的文字链接，每一行至少 44px 高，手指点得准 */
@media (pointer: coarse), (max-width: 599px) {
  .footer-list li { min-height: 44px; align-items: center; }
  .footer-list a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-bottom { gap: 0 20px; }
  .beian { min-height: 44px; }
  .toc li { margin: 0; }
  .toc a { display: flex; align-items: center; min-height: 44px; }
  .doc-end a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* 系统开了「减弱动态效果」：所有动效都关掉，只留静态 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill, .ripple-canvas, .site-header, .fs-body, .faq-icon, .tour-tab { transition: none; }
  .rise, .fs-float, .js-tour .tour-panel:not([hidden]), .faq-item[open] .faq-a { animation: none !important; }
  .fs-card { translate: none !important; }
}
