/* 0x4 法律文件（服务条款 / 隐私政策 / 风险披露，2026-10-01 goat：「网页底部要有，语言要漂亮、高级」）
   和落地页同一套深色：颜色、字体照抄 ../styles.css 的变量；正文用 Geist / 苹方，像素字只用在小标签上。
   落地页是一屏不滚动（html/body overflow:hidden），这里是长文，所以单独一份样式，不引 styles.css。
   中英文两份全文都在页面里，按 <html lang> 显示其中一份（不靠脚本生成文字，搜索引擎和打印都能读到）。 */

:root {
  color-scheme: dark;
  --ink: #07060d;
  --ink-2: #0d0b17;
  --card: rgba(255, 255, 255, .035);
  --fg: #f4f1ff;
  --body: rgba(236, 231, 255, .80);
  --mute: rgba(236, 231, 255, .62);
  --faint: rgba(236, 231, 255, .40);
  --line: rgba(255, 255, 255, .10);
  --accent: #d7c9ff;
  --pearl: linear-gradient(100deg, #ffd9c2 0%, #dccdff 48%, #b6ecff 100%);
  --on-pearl: #15121f;
  --line-2: rgba(255, 255, 255, .22);
  --soft: rgba(255, 255, 255, .03);
  --card-grad: linear-gradient(180deg, rgba(220, 205, 255, .06), rgba(255, 255, 255, .02));
  --glow-1: rgba(220, 205, 255, .10);
  --glow-2: rgba(182, 236, 255, .07);
  --glow-card: rgba(220, 205, 255, .16);
  --link-line: rgba(215, 201, 255, .28);
  --select: rgba(215, 201, 255, .28);
  --notice: rgba(215, 201, 255, .5);
  --bar-bg: rgba(7, 6, 13, .82);
  --bar-bg-blur: rgba(7, 6, 13, .66);
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --display: 'Pixelify Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

/* 香芋白（legal/theme.js 按网页版的选择在 <html> 上标 data-theme="light"）：颜色值照抄 src/desktop/desktop.css 的浅色一套 */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #f5f2fb;
  --ink-2: #ffffff;
  --card: rgba(52, 36, 102, .04);
  --fg: #1d1733;
  --body: #3b3454;
  --mute: #6c6588;
  --faint: #9a94b3;
  --line: rgba(52, 36, 102, .10);
  --accent: #7656ef;
  --pearl: linear-gradient(100deg, #f0864f 0%, #7656ef 48%, #1b9bd6 100%);
  --on-pearl: #ffffff;
  --line-2: rgba(52, 36, 102, .22);
  --soft: rgba(52, 36, 102, .035);
  --card-grad: linear-gradient(180deg, rgba(118, 86, 239, .06), rgba(255, 255, 255, .7));
  --glow-1: rgba(118, 86, 239, .10);
  --glow-2: rgba(27, 155, 214, .08);
  --glow-card: rgba(118, 86, 239, .12);
  --link-line: rgba(118, 86, 239, .3);
  --select: rgba(118, 86, 239, .2);
  --notice: rgba(118, 86, 239, .45);
  --bar-bg: rgba(245, 242, 251, .88);
  --bar-bg-blur: rgba(245, 242, 251, .72);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); color: var(--fg); scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--sans); font-size: 15.5px; line-height: 1.75; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; background: var(--ink); }
/* 页面比屏幕短时（下载页）页脚也贴在底部，和网页版那条位置一致 */
body { min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }
body > .foot { margin-top: auto; }
:lang(zh) body, html[lang="zh"] body { font-size: 15px; line-height: 1.9; letter-spacing: .01em; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--link-line); transition: border-color .2s; }
a:hover { border-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--select); }

/* 顶部一抹柔光，和落地页的珠光呼应；只画一次，不动 */
.glow { position: absolute; inset: 0 0 auto 0; height: 520px; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 70% at 18% 0%, var(--glow-1), transparent 70%), radial-gradient(40% 60% at 85% 10%, var(--glow-2), transparent 70%); }

/* ---------- 顶栏 ---------- */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px; background: var(--bar-bg); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(1px)) { .bar { background: var(--bar-bg-blur); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); } }
.brand { display: inline-flex; align-items: center; gap: 10px; border: 0; color: var(--fg); }
.brand img { width: 34px; height: auto; display: block; }
.brand span { font-family: var(--display); font-size: 20px; letter-spacing: .02em; }
.lang { display: inline-flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 13px; color: var(--faint); }
.lang button { appearance: none; border: 0; background: none; padding: 4px 2px; cursor: pointer; color: var(--faint); letter-spacing: .06em; }
.lang button[aria-pressed="true"] { color: var(--fg); }

/* ---------- 版式 ---------- */
.wrap { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.head { padding: clamp(40px, 8vw, 84px) 0 28px; max-width: 760px; }
.eyebrow { font-family: var(--display); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); margin: 0 0 18px; }
h1 { font-size: clamp(34px, 5.4vw, 54px); line-height: 1.08; letter-spacing: -.02em; font-weight: 600; margin: 0 0 18px; text-wrap: balance; }
h1 em { font-style: normal; background: var(--pearl); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dated { color: var(--mute); font-size: 14px; margin: 0; font-variant-numeric: tabular-nums; }

/* 三份文件之间切换 */
.docs { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.docs a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: 13.5px; color: var(--mute); }
.docs a:hover { color: var(--fg); border-color: var(--line-2); }
.docs a[aria-current="page"] { color: var(--ink); background: var(--fg); border-color: var(--fg); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 24px 0 96px; }
@media (min-width: 1000px) { .layout { grid-template-columns: 236px minmax(0, 1fr); gap: 72px; } }

/* 目录：宽屏左侧吸顶；窄屏收起成可展开的一块 */
.toc { font-size: 13.5px; }
.toc details { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; background: var(--card); }
.toc summary { cursor: pointer; color: var(--mute); font-family: var(--display); letter-spacing: .08em; font-size: 12.5px; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 10px; padding: 5px 0; border: 0; color: var(--mute); line-height: 1.45; }
.toc a::before { content: counter(t, decimal-leading-zero); font-family: var(--display); color: var(--faint); font-size: 11.5px; padding-top: 1px; min-width: 18px; }
.toc a:hover, .toc a.on { color: var(--fg); }
@media (min-width: 1000px) {
  .toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 120px); overflow: auto; }
  .toc details { border: 0; padding: 0; background: none; }
  .toc summary { pointer-events: none; }
}

/* ---------- 正文 ---------- */
.doc { max-width: 720px; color: var(--body); }
.doc > section { padding-top: 8px; }
.doc h2 { color: var(--fg); font-size: 21px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; margin: 56px 0 16px; display: flex; gap: 14px; align-items: baseline; text-wrap: balance; }
.doc h2 .n { font-family: var(--display); font-size: 13px; color: var(--faint); font-weight: 400; letter-spacing: .06em; min-width: 22px; }
.doc h3 { color: var(--fg); font-size: 16px; font-weight: 600; margin: 28px 0 8px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 1.3em; }
.doc li { margin: 0 0 8px; padding-left: .2em; }
.doc li::marker { color: var(--faint); }
.doc strong { color: var(--fg); font-weight: 600; }
.doc .caps { text-transform: uppercase; letter-spacing: .01em; font-size: 14px; }
html[lang="zh"] .doc .caps { text-transform: none; letter-spacing: .01em; font-size: inherit; font-weight: 600; color: var(--fg); }

/* 开篇「要点」 */
.keys { border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px 8px; margin: 0 0 8px; background: var(--card-grad); }
.keys .eyebrow { margin-bottom: 12px; }
.keys ul { list-style: none; padding: 0; margin: 0; }
.keys li { position: relative; padding-left: 22px; margin-bottom: 14px; }
.keys li::before { content: ''; position: absolute; left: 2px; top: .78em; width: 7px; height: 7px; border-radius: 2px; background: var(--pearl); }

/* 醒目条款（免责、仲裁）：只加一条细边，不做大色块 */
.notice { border-left: 2px solid var(--notice); padding: 2px 0 2px 18px; margin: 0 0 18px; }

/* 表格（隐私政策的数据清单）：窄屏横向滚动，正文不横滚 */
.table { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 14px; }
.table table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th { color: var(--fg); font-weight: 600; font-size: 13px; background: var(--soft); }
.table tr:last-child td { border-bottom: 0; }
/* 手机：表格改成上下排（类别做小标题、内容在下），不用横向滑 */
@media (max-width: 640px) {
  .table { overflow: visible; }
  .table table { min-width: 0; }
  .table thead { display: none; }
  .table tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: block; padding: 0; border: 0; }
  .table td:first-child { color: var(--fg); font-weight: 600; margin-bottom: 4px; }
}

.contact { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--mute); font-size: 14px; }

/* 页脚（2026-10-03 goat：和网页版底部那条一致）：一条细栏，居中「服务条款 · 隐私政策 · 风险披露 · 下载中心」，没有 © 和邮箱。
   尺寸照抄 src/desktop/desktop.css 的 .desk-status / .desk-status-legal（28px 高、11.5px、间距 22px） */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); min-height: 28px; padding-bottom: env(safe-area-inset-bottom, 0px); display: flex; align-items: center; justify-content: center; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; }
.foot nav > span { display: none; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 8px 16px; font-size: 11.5px; font-weight: 500; line-height: 1; }
html[lang="zh"] .foot nav > [data-lang-only="zh"], html[lang="en"] .foot nav > [data-lang-only="en"] { display: inline-flex; }
.foot a { color: var(--mute); border: 0; white-space: nowrap; transition: color .15s; }
.foot a:hover { color: var(--fg); }

/* 中英文两份全文：按 <html lang> 只显示一份 */
[data-lang-only] { display: none; }
html[lang="zh"] [data-lang-only="zh"], html[lang="en"] [data-lang-only="en"] { display: revert; }

@media print {
  .bar, .toc, .foot, .glow, .docs { display: none; }
  html, body { background: #fff; color: #000; }
  .doc { color: #111; max-width: none; }
  .doc h2, .doc h3, .doc strong { color: #000; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
