/* 小畜知微官网 · 深色水墨 × 液态玻璃（2026-11-14 改版）
   公共样式：首页、商城、二级页共用。玻璃配方参考 .claude/skills/liquid-glass-react。 */
@font-face { font-family: "XZ Brush"; src: url("/assets/fonts/brand-brush.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "XZ Serif"; src: url("/assets/fonts/serif-600.woff2?v=2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a1019;
  --bg-2: #0f1724;
  --ink: #ece4d3;
  --ink-2: #c9bfad;
  --muted: #a39a8a;
  --faint: #8a8273;
  --gold: #d9b56c;
  --gold-2: #f0d595;
  --gold-line: rgba(217, 181, 108, .32);
  --cinnabar: #c9563f;
  --ok: #7fc59a;
  /* 玻璃（对照参考图）：深色通透、1px 金色渐变描边（角/端亮，中段隐）、顶缘一道细高光、底部微暖；外部只投暗影不发光 */
  --lg-fill:
    linear-gradient(180deg, rgba(255, 240, 210, .075) 0%, rgba(255, 255, 255, .018) 34%, rgba(255, 255, 255, .01) 70%, rgba(217, 181, 108, .045) 100%),
    linear-gradient(135deg, rgba(255, 244, 220, .06) 0%, rgba(255, 244, 220, 0) 30%),
    rgba(9, 13, 22, .38);
  --lg-blur: blur(16px) saturate(125%);
  --lg-shadow:
    inset 0 1px 0 rgba(255, 238, 200, .32),
    inset 0 -24px 40px -34px rgba(217, 181, 108, .28),
    0 1px 0 rgba(0, 0, 0, .4),
    0 22px 48px -12px rgba(0, 0, 0, .7);
  --lg-rim: linear-gradient(var(--hi-angle, 155deg), rgba(255, 232, 178, .9) 0%, rgba(226, 190, 118, .42) 14%, rgba(217, 181, 108, .1) 42%, rgba(217, 181, 108, .08) 58%, rgba(226, 190, 118, .38) 86%, rgba(255, 232, 178, .78) 100%);
  --gold-grad: linear-gradient(180deg, #fff3cf 0%, #f0d08c 30%, #c99a4d 58%, #e9c37a 78%, #fbe6b0 100%);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .09);
  --glass-line: rgba(255, 255, 255, .14);
  --glass-hi: rgba(255, 255, 255, .34);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .3);
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --serif: "XZ Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --sans: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --brush: "XZ Brush", "Ma Shan Zheng", "STKaiti", "KaiTi", var(--serif);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 背景：即梦无字水墨夜景，固定在视口（iOS 不支持 background-attachment: fixed，用 fixed 伪元素） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  /* 参考图口径：近黑的墨蓝底 + 清晰细星点；水墨山月压暗到只剩远山轮廓，不抢主体 */
  background:
    url("/assets/stars.svg") center / cover no-repeat,
    radial-gradient(60% 55% at 58% 32%, rgba(28, 46, 78, .55), rgba(10, 16, 28, 0) 70%),
    radial-gradient(120% 90% at 50% 40%, rgba(5, 8, 14, 0) 40%, rgba(3, 5, 9, .75) 100%),
    linear-gradient(180deg, rgba(5, 8, 14, .9) 0%, rgba(5, 8, 14, .78) 55%, rgba(5, 8, 14, .6) 100%),
    url("/assets/bg-ink-wide.jpg") center bottom / cover no-repeat,
    #05080e;
}
@media (max-aspect-ratio: 4/5) {
  body::before {
    background:
      url("/assets/stars.svg") center / cover no-repeat,
      radial-gradient(90% 45% at 55% 22%, rgba(28, 46, 78, .55), transparent 75%),
      linear-gradient(180deg, rgba(5, 8, 14, .9) 0%, rgba(5, 8, 14, .78) 55%, rgba(5, 8, 14, .6) 100%),
      url("/assets/bg-ink-tall.jpg") center bottom / cover no-repeat,
      #05080e;
  }
}
/* 细微宣纸颗粒，压掉 1K 底图的平滑感 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

::selection { background: rgba(217, 181, 108, .38); color: #fff8e8; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
a { color: var(--gold); text-decoration-color: rgba(217, 181, 108, .45); text-underline-offset: 4px; transition: color .2s; }
a:hover { color: var(--gold-2); }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
* { scrollbar-width: thin; scrollbar-color: rgba(217, 181, 108, .35) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(217, 181, 108, .3); border-radius: 8px; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- 液态玻璃 ---------- */
.glass {
  position: relative;
  background: var(--lg-fill);
  -webkit-backdrop-filter: var(--lg-blur);
  backdrop-filter: var(--lg-blur);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  box-shadow: var(--lg-shadow);
  isolation: isolate;
}
/* 边缘高光：左上亮白、右下回金的渐变描边（mask 挖空），模拟厚玻璃边折光 */
.glass::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--lg-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* 跟随指针的柔光（site.js 写入 --mx/--my） */
.glass.sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 30%) var(--my, 0%), rgba(255, 240, 210, .09), transparent 60%);
  opacity: var(--sheen, 0);
  transition: opacity .4s;
  z-index: -1;
}
/* 不支持 backdrop-filter 的旧浏览器：加深底色保证可读 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(18, 26, 40, .92); }
}

/* ---------- 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid rgba(226, 190, 118, .6);
  background:
    linear-gradient(90deg, rgba(217, 181, 108, .14), rgba(217, 181, 108, .02) 30%, rgba(217, 181, 108, .02) 70%, rgba(217, 181, 108, .12)),
    linear-gradient(180deg, rgba(255, 246, 225, .12), rgba(255, 255, 255, .02) 50%, rgba(6, 10, 18, .3));
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, .5), inset 0 0 14px rgba(217, 181, 108, .1), 0 0 18px rgba(217, 181, 108, .16), 0 10px 26px rgba(0, 0, 0, .45);
  color: var(--ink);
  font-size: 15.5px;
  letter-spacing: .12em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .25s, filter .25s;
}
.btn:hover { color: #fff; border-color: rgba(240, 210, 140, .85); box-shadow: inset 0 1px 0 rgba(255, 236, 190, .6), inset 0 0 18px rgba(217, 181, 108, .16), 0 0 26px rgba(217, 181, 108, .3), 0 10px 26px rgba(0, 0, 0, .45); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
/* 琥珀金玻璃：半透明金色、亮边、外发光 */
.btn-gold, .lg-gold {
  border-color: rgba(255, 228, 165, .85);
  color: #fff4da;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(60, 35, 5, .7);
  background:
    radial-gradient(120% 130% at 50% -25%, rgba(255, 244, 210, .55), rgba(255, 244, 210, 0) 52%),
    linear-gradient(180deg, rgba(232, 190, 110, .62), rgba(176, 124, 52, .42) 60%, rgba(214, 168, 90, .55));
  box-shadow: inset 0 1.5px 0 rgba(255, 248, 225, .9), inset 0 -2px 8px rgba(255, 210, 130, .35), inset 0 0 18px rgba(255, 220, 150, .25), 0 0 30px rgba(217, 181, 108, .42), 0 10px 26px rgba(0, 0, 0, .45);
}
.btn-gold:hover { color: #fff; background: radial-gradient(120% 130% at 50% -25%, rgba(255, 246, 218, .65), rgba(255, 244, 210, 0) 52%), linear-gradient(180deg, rgba(240, 200, 120, .72), rgba(186, 132, 58, .5) 60%, rgba(222, 176, 96, .62)); }
.btn[disabled], .btn:disabled { opacity: .45; cursor: default; transform: none; filter: saturate(.5); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 14px; letter-spacing: .06em; }
.link-btn { background: none; border: 0; color: var(--gold); padding: 6px 2px; font-size: 14px; text-decoration: underline; text-decoration-color: rgba(217, 181, 108, .45); text-underline-offset: 4px; }

/* ---------- 顶部导航：悬浮玻璃胶囊 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px var(--gutter) 0;
  padding-top: max(14px, env(safe-area-inset-top));
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
  padding: 0 10px 0 18px;
  border-radius: 999px;
  /* 导航下面会滚过各种内容，玻璃里加一层墨色，保证字始终看得清 */
  --hi-angle: 90deg;
  background: linear-gradient(90deg, rgba(217, 181, 108, .1), rgba(217, 181, 108, 0) 18%, rgba(217, 181, 108, 0) 82%, rgba(217, 181, 108, .08)), linear-gradient(180deg, rgba(12, 17, 27, .72), rgba(6, 10, 17, .66));
  box-shadow: inset 0 1px 0 rgba(255, 238, 200, .28), -18px 0 34px -22px rgba(233, 196, 120, .75), 18px 0 34px -22px rgba(233, 196, 120, .6), 0 18px 40px -14px rgba(0, 0, 0, .7);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand img { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1px var(--gold-line); }
.brand b { font-family: var(--brush); font-weight: 400; font-size: 25px; letter-spacing: .08em; line-height: 1.15; color: #f3ead6; }
.brand:hover { color: #fff; }
.menu { display: flex; align-items: center; gap: 2px; margin-left: auto; list-style: none; }
.menu a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: #d8c9a6;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .14em;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.menu a:hover { color: var(--gold-2); background: transparent; }
.menu a[aria-current="page"] { color: var(--gold-2); background: none; box-shadow: inset 0 -1px 0 rgba(217, 181, 108, 0); position: relative; }
.menu a[aria-current="page"]::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 3px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.topbar .btn { min-height: 42px; padding: 8px 20px; font-size: 14.5px; }
.topbar .btn-gold { color: var(--gold-2); text-shadow: none; background: linear-gradient(180deg, rgba(217, 181, 108, .22), rgba(217, 181, 108, .06)); box-shadow: inset 0 1px 0 rgba(255, 236, 190, .55), 0 0 18px rgba(217, 181, 108, .25); }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); align-items: center; justify-content: center; }
.menu-toggle svg { width: 22px; height: 22px; }
@media (max-width: 900px) {
  .topbar-inner { height: 54px; gap: 8px; padding: 0 6px 0 12px; }
  .brand b { font-size: 22px; }
  .brand img { width: 30px; height: 30px; }
  .menu-toggle { display: inline-flex; }
  .topbar .btn { margin-left: 0; }
  .menu {
    position: absolute;
    top: calc(100% + 10px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    border-radius: 24px;
    background: rgba(16, 24, 38, .82);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
    border: 1px solid var(--glass-line);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .4s var(--ease);
  }
  .menu a { padding: 13px 16px; font-size: 16px; }
  .topbar.open .menu { opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 380px) { .topbar .btn { padding: 8px 14px; letter-spacing: .02em; } }

/* ---------- 版式 ---------- */
.shell { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.section { margin-top: clamp(64px, 9vw, 120px); }
.h-display { font-family: var(--brush); font-weight: 400; letter-spacing: .06em; line-height: 1.15; color: #f3ead6; text-shadow: 0 6px 40px rgba(0, 0, 0, .55); }
.h1, .h2, .h3, h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); text-wrap: balance; }
.h2 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: .08em; line-height: 1.3; }
.lead { color: var(--ink-2); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.9; max-width: 34em; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.seal {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 6px;
  background: var(--cinnabar);
  color: #fbe9dc;
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.05;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  box-shadow: inset 0 0 0 2px rgba(255, 220, 200, .25);
}
.rule-gold { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--gold-line), transparent); }

/* ---------- 页脚 ---------- */
.site-foot {
  margin-top: clamp(72px, 10vw, 128px);
  padding: 36px var(--gutter) max(32px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(10, 16, 25, 0), rgba(10, 16, 25, .7));
  color: var(--faint);
  font-size: 13px;
  line-height: 2;
  text-align: center;
}
.site-foot .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; margin-bottom: 10px; }
.site-foot .links a { color: var(--ink-2); text-decoration: none; }
.site-foot .links a:hover { color: var(--gold-2); }
.site-foot a { color: var(--muted); }
.site-foot .mark { font-family: var(--brush); font-size: 20px; color: var(--ink-2); letter-spacing: .1em; margin-bottom: 6px; }

/* ---------- 二级页（协议、说明类）通用文档样式 ---------- */
.doc-wrap { max-width: 860px; margin: clamp(28px, 5vw, 56px) auto 0; padding: 0 var(--gutter); }
.doc { padding: clamp(26px, 5vw, 56px) clamp(20px, 5vw, 64px); }
.doc h1 { font-size: clamp(26px, 3.6vw, 36px); letter-spacing: .1em; line-height: 1.35; margin-bottom: 6px; }
.doc .meta, .doc .head p, .doc .crumb { color: var(--muted); font-size: 13.5px; letter-spacing: .06em; }
.doc .head { margin-bottom: 8px; }
.doc .head .nav { display: none; }
.doc .crumb { margin-bottom: 18px; }
.doc .crumb a { color: var(--muted); }
.doc h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(18px, 2vw, 21px);
  letter-spacing: .08em;
  margin: 2.2em 0 .8em;
}
.doc h2::before { content: ""; width: 14px; height: 14px; flex-shrink: 0; border: 1px solid var(--gold); transform: rotate(45deg) scale(.7); }
.doc h3 { font-size: 16.5px; margin: 1.4em 0 .5em; }
.doc p, .doc li { color: var(--ink-2); max-width: 70ch; }
.doc p + p { margin-top: .8em; }
.doc ul, .doc ol { padding-left: 1.4em; margin: .6em 0; }
.doc li + li { margin-top: .45em; }
.doc li::marker { color: var(--gold); }
.doc strong, .doc b { color: var(--ink); font-weight: 600; }
.doc .card, .doc .item, .doc .qa, .doc .steps, .doc .kv {
  margin: 14px 0;
  padding: 18px 20px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
}
.doc .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.doc .grid .item { margin: 0; }
.doc .foot, .doc footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .08); color: var(--faint); font-size: 13px; text-align: center; }
.doc .foot p, .doc footer p { color: var(--faint); max-width: none; margin-top: 4px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.doc th, .doc td { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: left; color: var(--ink-2); }
.doc th { color: var(--ink); font-weight: 600; }
.doc .note, .doc .help, .doc .sub { color: var(--muted); font-size: 13.5px; }
.doc .price { color: var(--gold-2); font-weight: 600; }
.doc .list { list-style: none; padding: 0; }
.doc .list li { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
@media (max-width: 600px) { .doc table { display: block; overflow-x: auto; white-space: nowrap; } }
.doc .cta { margin-top: 36px; text-align: center; max-width: none; }
.doc .action {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 34px; border-radius: 999px;
  border: 1px solid rgba(255, 230, 170, .65);
  background: radial-gradient(120% 130% at 50% -25%, rgba(255, 244, 210, .55), rgba(255, 244, 210, 0) 52%), linear-gradient(180deg, rgba(232, 190, 110, .62), rgba(176, 124, 52, .42) 60%, rgba(214, 168, 90, .55));
  box-shadow: inset 0 1.5px 0 rgba(255, 248, 225, .9), inset 0 -2px 8px rgba(255, 210, 130, .35), inset 0 0 18px rgba(255, 220, 150, .25), 0 0 30px rgba(217, 181, 108, .42), 0 10px 26px rgba(0, 0, 0, .45);
  color: #fff4da; text-shadow: 0 1px 6px rgba(60, 35, 5, .7); font-weight: 600; letter-spacing: .12em; text-decoration: none;
}
.doc .action:hover { color: #fff; filter: brightness(1.12); }

/* 入场：只做一次，从可见态缓出 */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .9s var(--ease) both; }
  .rise-2 { animation-delay: .08s; }
  .rise-3 { animation-delay: .16s; }
  @keyframes rise { from { opacity: .001; transform: translateY(14px); filter: blur(6px); } }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
