/* Shizako 官网样式 —— 玻璃拟态 / 深色，与应用内的玻璃风格保持一致。
   无外部依赖（不引 CDN、不引字体服务），断网/被墙也能正常显示。 */

:root {
  --bg: #0b0d12;
  --bg-soft: #12151d;
  --fg: #e9ecf3;
  --fg-dim: #a7adbe;
  --fg-faint: #767d90;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .18);
  --glass: rgba(255, 255, 255, .05);
  --glass-hi: rgba(255, 255, 255, .08);
  --accent: #8b7bf0;
  --accent-2: #5cc8ff;
  --green: #2ea44f;
  --gold: #ffd700;
  --radius: 18px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* 锚点跳转时给固定顶栏留出空间：否则手机上点菜单会停在"标题被顶栏挡住"的位置 */
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

/* 背景光斑：纯 CSS，不用图片。
   注意：这里**不能**用左右负 inset（那会让装饰层比屏幕宽，手机端就能把页面左右拖动）。 */
body::before {
  content: "";
  position: fixed;
  top: -20%;
  left: 0;
  right: 0;
  width: 100%;
  height: 90vh;
  background:
    radial-gradient(45% 45% at 20% 10%, rgba(139, 123, 240, .22), transparent 70%),
    radial-gradient(40% 40% at 85% 5%, rgba(92, 200, 255, .16), transparent 70%),
    radial-gradient(35% 35% at 55% 30%, rgba(255, 215, 0, .06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── 顶栏 ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px max(16px, calc((100% - var(--maxw)) / 2));
  background: rgba(11, 13, 18, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(11, 13, 18, .88); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--fg); }
.brand img {
  /* flex: none 很关键：img 作为 flex 子项默认可被压缩，空间紧张时（手机上）
     会被压成椭圆，看起来就是「图标显示不对」。这里锁死尺寸并加圆角。 */
  flex: none;
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
}
.brand { min-width: 0; }
.brand span { white-space: nowrap; }
.brand:hover { text-decoration: none; }

.nav-links { display: flex; gap: 18px; margin-left: 8px; }
.nav-links a { color: var(--fg-dim); font-size: 14px; }
.nav-links a:hover { color: var(--fg); text-decoration: none; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ── 按钮 ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  background: var(--glass);
  cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); background: var(--glass-hi); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #6f5fe0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 24px rgba(139, 123, 240, .28);
}
.btn.ghost { background: var(--glass); }
.btn.star { border-color: rgba(255, 215, 0, .45); color: var(--gold); }
.btn.small { padding: 8px 16px; font-size: 13px; }

/* ── 首屏 ───────────────────────────────────────────── */
.hero { position: relative; padding: 54px 16px 64px; }
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; text-align: center; }
.hero-banner { width: min(100%, 820px); border-radius: var(--radius); border: 1px solid var(--line); }
.hero h1 {
  margin: 22px 0 6px;
  font-size: clamp(34px, 7vw, 56px);
  letter-spacing: .5px;
  background: linear-gradient(120deg, #fff, #cfc7ff 45%, #9fe6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tagline { margin: 0 auto 10px; font-size: clamp(16px, 3.4vw, 21px); color: var(--fg); font-weight: 600; }
.sub { margin: 0 auto; max-width: 660px; color: var(--fg-dim); font-size: 15px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 8px; }
.badges img { height: 20px; }

/* ── 首屏数据卡片（与功能卡同一套视觉：图标 + 大号数字 + 说明）───────── */
.stats-grid {
  max-width: 880px;
  margin: 26px auto 6px;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
}
.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 18px;
  color: var(--fg);
}
.stat-card:hover { text-decoration: none; }
.stat-icon { font-size: 22px; line-height: 1; margin-bottom: 10px; opacity: .92; }
.stat-num {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.stat-num.gold { color: var(--gold); }
.stat-name { margin-top: 4px; font-size: 14px; font-weight: 600; }
.stat-card p { margin: 6px 0 0; font-size: 12.5px; color: var(--fg-faint); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 22px 0 8px; }
.hint { color: var(--fg-faint); font-size: 13px; margin-top: 14px; }

/* 首屏快捷入口 */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 16px 0 0;
  font-size: 13.5px;
}
.quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-dim);
  transition: color .18s, transform .18s;
}
.quick-links a:hover { color: var(--fg); text-decoration: none; transform: translateY(-1px); }
.quick-links .dot { opacity: .38; }

/* 手机上隐藏次要按钮（导航里已有） */
@media (max-width: 720px) { .hide-sm { display: none !important; } }

.doc-note-svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--accent-2); }

/* ── 区块 ───────────────────────────────────────────── */
.section { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 56px 16px; }
.section h2 { font-size: clamp(24px, 4.6vw, 32px); margin: 0 0 8px; }
.section .lead { color: var(--fg-dim); margin: 0 0 26px; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--glass-hi), var(--glass));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .18s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--fg-dim); font-size: 14.5px; }
.card.warn { border-color: rgba(255, 120, 120, .35); }
.card.warn h3 { color: #ff9d9d; }

.pill {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #0b0d12;
  background: var(--gold);
  font-weight: 700;
}

/* ── 截图 ───────────────────────────────────────────── */
.shots { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.shots figure { margin: 0; text-align: center; }
.shots img {
  width: min(280px, 74vw);
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
}
.shots figcaption { margin-top: 10px; color: var(--fg-faint); font-size: 13px; }

/* ── FAQ ────────────────────────────────────────────── */
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  padding: 14px 18px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 15.5px; }
.faq summary::marker { color: var(--accent); }
.faq p { margin: 10px 0 0; color: var(--fg-dim); font-size: 14.5px; }

.cta-final { text-align: center; padding-bottom: 72px; }

/* ── 页脚 ───────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 40px 16px 28px;
}
.footer-cols {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: var(--maxw);
  margin: 0 auto;
}
.footer h4 { margin: 0 0 8px; font-size: 14px; color: var(--fg); }
.footer p, .footer li { color: var(--fg-faint); font-size: 13.5px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-bottom { text-align: center; color: var(--fg-faint); font-size: 13px; margin: 28px 0 0; }

/* ── 小屏 ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-links { display: none; }
  .section { padding: 40px 16px; }
  .hero { padding-top: 34px; }
}

/* ── 开发文档页 ─────────────────────────────────────── */
.nav-links a.active { color: var(--fg); }

.doc-layout {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 30px;
  align-items: flex-start;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 16px 72px;
}
.doc-side { position: sticky; top: 74px; flex: 0 0 244px; width: 244px; }
.doc-back { display: inline-block; margin-bottom: 14px; font-size: 13.5px; color: var(--fg-dim); }
.doc-toc {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  padding: 12px 14px;
  max-height: 68vh;
  overflow-y: auto;
}
.doc-toc-title { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; color: var(--fg-faint); text-transform: uppercase; }
.doc-toc a { display: block; padding: 4px 0; font-size: 13.5px; color: var(--fg-dim); line-height: 1.45; }
.doc-toc a:hover { color: var(--fg); text-decoration: none; }
.doc-toc a.lvl3 { padding-left: 12px; font-size: 12.5px; color: var(--fg-faint); }
.doc-toc-empty { color: var(--fg-faint); font-size: 13px; margin: 0; }

.doc-main { flex: 1; min-width: 0; }
.doc-article { font-size: 15px; }
.doc-article h1 { font-size: clamp(26px, 4.6vw, 34px); margin: 0 0 14px; }
.doc-article h2 {
  font-size: clamp(21px, 3.6vw, 25px);
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.doc-article h3 { font-size: 18px; margin: 26px 0 8px; }
.doc-article h4 { font-size: 16px; margin: 20px 0 6px; color: var(--fg-dim); }
.doc-article p { color: var(--fg-dim); }
.doc-article ul, .doc-article ol { color: var(--fg-dim); padding-left: 22px; }
.doc-article li { margin: 4px 0; }
.doc-article a { text-decoration: underline; text-underline-offset: 2px; }
.doc-article hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

.doc-article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px;
}
.doc-article :not(pre) > code {
  background: rgba(255, 255, 255, .09);
  padding: 2px 6px;
  border-radius: 6px;
  color: #cfe9ff;
}
.doc-article pre {
  background: #0d1017;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.6;
}
.doc-article pre code { color: #d6e2f0; }

.doc-table-wrap { overflow-x: auto; margin: 16px 0; }
.doc-article table { border-collapse: collapse; width: 100%; font-size: 14px; }
.doc-article th, .doc-article td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.doc-article th { background: rgba(255, 255, 255, .05); color: var(--fg); white-space: nowrap; }
.doc-article td { color: var(--fg-dim); }

.doc-article blockquote {
  margin: 16px 0;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--glass);
  color: var(--fg-dim);
}
.doc-article blockquote p { margin: 0; }

.doc-foot {
  margin-top: 44px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--fg-faint);
  font-size: 13px;
}

@media (max-width: 900px) {
  .doc-layout { flex-direction: column; }
  .doc-side { position: static; width: auto; flex: none; }
  .doc-toc { max-height: none; }
}

/* ══ 开发文档：三栏文档站布局 ═══════════════════════════ */
.doc-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 40;
  background: transparent;
}
.doc-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .1s linear;
}

.doc-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr) 200px;
  gap: 30px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 16px 84px;
  align-items: start;
}

/* 左：文档列表 */
.doc-nav { position: sticky; top: 72px; }
.doc-nav-title {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.doc-nav nav { display: grid; gap: 2px; }
.doc-nav a {
  display: block;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--fg-dim);
  border: 1px solid transparent;
  line-height: 1.4;
}
.doc-nav a:hover { color: var(--fg); background: var(--glass); text-decoration: none; }
.doc-nav a.active {
  color: var(--fg);
  background: linear-gradient(135deg, rgba(139, 123, 240, .22), rgba(92, 200, 255, .12));
  border-color: rgba(139, 123, 240, .38);
  font-weight: 600;
}
.doc-nav-back { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--fg-faint); }

/* 中：正文 */
.doc-main { min-width: 0; }
.doc-crumb { font-size: 12.5px; color: var(--fg-faint); margin-bottom: 14px; }
.doc-crumb a { color: var(--fg-faint); }
.doc-crumb span { margin: 0 7px; opacity: .5; }
.doc-crumb em { font-style: normal; color: var(--fg-dim); }

.doc-head {
  padding-bottom: 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.doc-head h1 {
  margin: 0 0 8px;
  font-size: clamp(27px, 4.6vw, 36px);
  letter-spacing: .2px;
  background: linear-gradient(120deg, #fff, #cfc7ff 60%, #9fe6ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.doc-desc { margin: 0; color: var(--fg-dim); font-size: 15px; }

.doc-article h1, .doc-article h2, .doc-article h3, .doc-article h4 { position: relative; scroll-margin-top: 74px; }
.doc-anchor {
  margin-left: 8px;
  font-size: .72em;
  color: var(--fg-faint);
  opacity: 0;
  transition: opacity .15s;
  text-decoration: none;
}
.doc-article h2:hover .doc-anchor,
.doc-article h3:hover .doc-anchor,
.doc-article h4:hover .doc-anchor { opacity: .8; }

/* 代码块：语言标签 + 复制按钮 */
.doc-article .code {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #0d1017;
}
.doc-article .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 6px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
}
.code-lang { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-faint); }
.code-copy {
  padding: 3px 10px;
  font-size: 12px;
  color: var(--fg-dim);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.code-copy:hover { color: var(--fg); border-color: var(--accent); }
.doc-article .code pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

/* 轻量语法高亮 */
.tok-c { color: #6f7f96; font-style: italic; }
.tok-s { color: #9ce49a; }
.tok-k { color: #c79bf5; }
.tok-n { color: #f0b072; }

/* 提示框 */
.doc-note {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid rgba(139, 123, 240, .34);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 123, 240, .14), rgba(92, 200, 255, .06));
}
.doc-note p { margin: 0; color: var(--fg-dim); font-size: 14.5px; }
.doc-note-icon { line-height: 1.5; }

/* 表格更精致一点 */
.doc-article table { border-collapse: separate; border-spacing: 0; }
.doc-article th, .doc-article td { border: 0; border-bottom: 1px solid var(--line); }
.doc-article thead th { border-bottom: 1px solid var(--line-strong); }
.doc-article tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .022); }
.doc-article tbody tr:hover td { background: rgba(139, 123, 240, .07); }

/* 右：本页目录 */
.doc-side { position: sticky; top: 72px; }
.doc-toc { border: 0; background: transparent; padding: 0; max-height: 72vh; }
.doc-toc a { border-left: 2px solid var(--line); border-radius: 0; padding: 5px 0 5px 12px; }
.doc-toc a:hover { border-left-color: var(--line-strong); text-decoration: none; }
.doc-toc a.active { color: var(--fg); border-left-color: var(--accent); font-weight: 600; }

/* 上下篇翻页 */
.doc-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 40px;
}
.doc-pager-item {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass);
  transition: border-color .18s, transform .18s;
}
.doc-pager-item:hover { border-color: var(--line-strong); transform: translateY(-2px); text-decoration: none; }
.doc-pager-item span { display: block; font-size: 12px; color: var(--fg-faint); }
.doc-pager-item strong { font-size: 14.5px; color: var(--fg); }
.doc-pager-item.next { text-align: right; }

.doc-toc-empty { color: var(--fg-faint); font-size: 13px; margin: 0; }

@media (max-width: 1120px) {
  .doc-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .doc-side { display: none; }
}
@media (max-width: 860px) {
  .doc-shell { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .doc-nav { position: static; }
  .doc-nav nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .doc-nav a { white-space: nowrap; border: 1px solid var(--line); }
  .doc-pager { grid-template-columns: 1fr; }
}

/* ══ 图标 ══════════════════════════════════════════════ */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  vertical-align: -0.14em;
  flex: none;
}
.icon svg { width: 100%; height: 100%; display: block; }
.icon-line { color: currentColor; opacity: .92; }
.icon-lg { width: 22px; height: 22px; }
.icon-sm { width: 15px; height: 15px; }

/* ══ 移动端导航（汉堡菜单）═══════════════════════════════ */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--glass);
  color: var(--fg);
  cursor: pointer;
}
.nav-toggle .icon { width: 19px; height: 19px; }

.mobile-menu {
  position: fixed;
  inset: 56px 0 auto 0;
  z-index: 30;
  display: none;
  flex-direction: column;
  padding: 8px 16px 16px;
  background: rgba(11, 13, 18, .96);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.mobile-menu.open { display: flex; animation: menuIn .22s ease both; }
.mobile-menu a {
  padding: 13px 4px;
  font-size: 16px;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: 0; }
.mobile-menu a:active { color: var(--fg); }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ══ 动画 ══════════════════════════════════════════════ */
/* 滚动进场：先隐藏，进入视口后由 JS 加 .in */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.22, .61, .36, 1), transform .6s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* 首屏依次入场 */
.hero-inner > * { animation: rise .7s cubic-bezier(.22, .61, .36, 1) both; }
.hero-inner > *:nth-child(1) { animation-delay: .02s; }
.hero-inner > *:nth-child(2) { animation-delay: .10s; }
.hero-inner > *:nth-child(3) { animation-delay: .18s; }
.hero-inner > *:nth-child(4) { animation-delay: .26s; }
.hero-inner > *:nth-child(5) { animation-delay: .34s; }
.hero-inner > *:nth-child(6) { animation-delay: .42s; }
.hero-inner > *:nth-child(7) { animation-delay: .50s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* 背景光斑缓慢游动 */
body::before { animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-2%, 1.5%, 0) scale(1.06); }
}

/* 卡片：只在真有指针（鼠标）时才做悬停位移，避免手机上"粘住" */
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); }
  .card:hover .icon-lg { transform: scale(1.08); }
  .icon-lg { transition: transform .22s ease; }
}
.card:active { transform: scale(.995); }

.btn { position: relative; overflow: hidden; }
.btn:active { transform: scale(.97); }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px 60px at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .18), transparent 70%);
  opacity: 0;
  transition: opacity .3s;
}
.btn:hover::after { opacity: 1; }

/* 数据卡片数字的"数字滚动"由 JS 递增，这里只给个等宽数字避免抖动 */
.stat-num { font-variant-numeric: tabular-nums; }

/* ══ 手机端全面优化 ════════════════════════════════════ */
@media (max-width: 720px) {
  :root { --radius: 16px; }
  body { font-size: 15.5px; line-height: 1.75; }
  .nav { gap: 10px; padding: 8px 12px; }
  .brand span { font-size: 15px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  /* 手机上没有 hover，用 active 反馈代替 */
  .btn { padding: 13px 20px; }
  .section { padding: 34px 14px; }
  .section h2 { margin-bottom: 6px; }
  .lead { margin-bottom: 20px; }
  .hero { padding: 20px 14px 34px; }
  .hero-banner { border-radius: 14px; }
  .hero h1 { margin-top: 18px; }
  .sub { font-size: 14.5px; }
  .cta { gap: 10px; }
  .cta .btn { flex: 1 1 auto; min-width: 132px; }
  .hint { font-size: 12.5px; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .stat-card { padding: 16px 12px; }
  .stat-num { font-size: 25px; }
  .stat-card p { display: none; }        /* 手机上省掉说明，卡片更紧凑 */
  .grid { gap: 11px; }
  .card { padding: 17px; }
  .card h3 { font-size: 16px; }
  .card p { font-size: 14px; }
  .shots img { width: min(240px, 68vw); }
  .faq details { padding: 13px 15px; }
  .faq summary { font-size: 15px; }
  .footer { padding: 30px 14px 20px; }
  .footer-cols { gap: 18px; }
  .doc-shell { padding: 18px 12px 64px; }
  .doc-head h1 { font-size: 25px; }
  .doc-article { font-size: 15px; }
  .doc-article h2 { font-size: 20px; margin-top: 28px; }
  .doc-article h3 { font-size: 17px; }
  .doc-article pre { font-size: 12.5px; padding: 12px; }
  .doc-article th, .doc-article td { padding: 7px 9px; font-size: 13px; }
  .doc-table-wrap { -webkit-overflow-scrolling: touch; }
  .doc-article .code pre { -webkit-overflow-scrolling: touch; }
  .doc-pager-item { padding: 11px 14px; }
  .code-copy { padding: 6px 12px; }      /* 手机上按钮大一点，好点 */
}

/* 更窄的屏（小屏手机） */
@media (max-width: 400px) {
  .hero h1 { font-size: 32px; }
  .stat-num { font-size: 22px; }
  .cta .btn { width: 100%; }
  .doc-nav nav { gap: 4px; }
}

/* 刘海屏 / 手势条安全区 */
@supports (padding: max(0px)) {
  .nav { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .footer { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

/* 用户要求减少动效时，一律关掉动画 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ══ 手机端性能与观感收尾（放在最后，确保覆盖前面的规则）═══════════ */
/* 点按不加 300ms 延迟 */
a, button, summary, .btn, .card { touch-action: manipulation; }

/* 图片按块级排版，避免行内基线留白导致的轻微错位 */
.hero-banner, .shots img, picture { display: block; margin-left: auto; margin-right: auto; }

/* 菜单顶部跟随真实顶栏高度 */
.mobile-menu { top: var(--navh, 56px); }

@media (max-width: 720px) {
  /* 手机上关掉大面积模糊：顶栏与卡片的 backdrop-filter 在滚动时很吃 GPU，
     观感差异很小（顶栏改不透明底色，卡片本身有渐变底） */
  .nav,
  .card,
  .stat-card,
  .doc-toc,
  .mobile-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .nav { background: rgba(11, 13, 18, .96); }
  .mobile-menu { background: rgba(11, 13, 18, .99); }

  /* 装饰光斑不再游动（省电，也避免低端机上的合成开销） */
  body::before { animation: none !important; }

  /* 首屏横幅在手机上占满宽度即可 */
  .hero-banner { width: 100%; }
}

/* 导出/打印时不需要装饰 */
@media print {
  body::before, .nav, .mobile-menu, .doc-progress { display: none !important; }
}
