/*
  VOICE   温柔、治愈、可信赖：像一家认真做研究的精品工作室
  IDEA    夜晚的影院里放映一间洒满阳光的像素客厅；白天的部分像一份精装报告
  PICTURE HD-2D 舞台是主视觉；其余插画全部由同一个像素猫引擎生成
  COLOUR  夜可可（首屏与收尾）+ 奶油纸色（内容）+ 杏橙强调 + 金色点缀，五个维度各有专属色
  TYPE    标题：系统黑体粗体紧排；类型名与证书：宋体衬线；数字：等宽
*/
:root {
  color-scheme: light;
  --cream: #f7f1e8;
  --paper: #fffbf5;
  --sand: #efe5d6;
  --ink: #2c211e;
  --ink2: #67544c;
  --muted: #998478;
  --line: rgba(44, 33, 30, 0.1);
  --line2: rgba(44, 33, 30, 0.16);
  --apricot: #ef8a55;
  --apricot-d: #d26a35;
  --apricot-l: #fde6d6;
  --gold: #e8b55e;
  --night: #1a1214;
  --night2: #241a1c;
  --night3: #30232a;
  --night-ink: #f8efe2;
  --night-muted: #b8a294;
  --night-line: rgba(248, 239, 226, 0.12);
  --sage: #6f9c8e;
  --cN: #8b7fd1; --cE: #e9a23b; --cD: #d8644a; --cI: #3f9fa2; --cA: #df6f93;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 16px;
  --sh: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 1px 2px rgba(60, 30, 20, .05), 0 20px 44px -28px rgba(60, 30, 20, .45);
}
[hidden] { display: none !important; }
* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.7 var(--sans); overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; text-wrap: balance; letter-spacing: -0.015em; font-weight: 800; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--apricot); outline-offset: 3px; border-radius: 6px; }
img, canvas { display: block; }
.wrap { width: min(1200px, 100% - 2 * max(5vw, 18px)); margin-inline: auto; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.pix { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------- 顶栏 ---------- */
.top { position: sticky; top: 0; z-index: 30; transition: background .3s, box-shadow .3s; }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand canvas { width: 34px; height: 34px; }
.brand b { font-size: 18px; font-weight: 800; letter-spacing: .06em; }
.nav { display: flex; gap: 2px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; opacity: .78; transition: opacity .2s, background .2s; }
.nav a:hover { opacity: 1; background: rgba(127, 110, 100, .14); }
.top.dark { color: var(--night-ink); background: rgba(26, 18, 20, .72); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--night-line); }
.top.light { color: var(--ink); background: rgba(247, 241, 232, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }

/* ---------- 按钮 ---------- */
.btn { --bg: var(--sand); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 22px; border: 0; border-radius: 999px; background: var(--bg); font-weight: 700; font-size: 15.5px; text-decoration: none; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, background .2s, filter .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { --bg: var(--apricot); color: #fff; box-shadow: 0 10px 24px -10px rgba(239, 138, 85, .9), inset 0 -2px 0 rgba(0, 0, 0, .12); }
.btn-primary:hover { --bg: #f2955f; }
.btn-ghost { --bg: transparent; box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink2); }
.btn-ghost.on-dark { color: var(--night-ink); box-shadow: inset 0 0 0 1.5px rgba(248, 239, 226, .28); }
.btn-ghost.on-dark:hover { box-shadow: inset 0 0 0 1.5px rgba(248, 239, 226, .6); }
.btn-small { min-height: 38px; padding: 7px 16px; font-size: 14px; }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- 通用 ---------- */
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--apricot-d); margin-bottom: 14px; }
.kicker::before { content: ""; width: 8px; height: 8px; background: currentColor; box-shadow: 8px 0 0 currentColor, 0 8px 0 currentColor; transform: scale(.75); transform-origin: 0 0; margin-right: 6px; }
.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 14px; }
.sec-head p { color: var(--ink2); font-size: 17px; }
.card { background: var(--paper); border-radius: 22px; box-shadow: 0 0 0 1px var(--line), var(--sh); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--sand); color: var(--ink2); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.serif { font-family: var(--serif); }

/* 分段控件 */
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: var(--sand); }
.seg button { border: 0; background: transparent; border-radius: 9px; min-height: 38px; padding: 6px 12px; font-size: 14.5px; font-weight: 600; color: var(--ink2); transition: background .2s, color .2s, box-shadow .2s; }
.seg button[aria-checked=true], .seg button[aria-pressed=true] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 800; }

/* ---------- 页脚 ---------- */
.foot { background: var(--night); color: var(--night-muted); font-size: 14px; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; padding: 48px 0 40px; }
.foot b { color: var(--night-ink); }
.foot p + p { margin-top: 10px; }
.foot .copy { grid-column: 1 / -1; border-top: 1px solid var(--night-line); padding-top: 20px; font-size: 13px; }

/* ---------- 舞台（共用）---------- */
.stage-frame { position: relative; border-radius: 20px; overflow: hidden; background: #2a1f22; aspect-ratio: 16 / 9; }
.stage-frame canvas { width: 100%; height: 100%; touch-action: manipulation; }
.dialog { position: absolute; left: clamp(12px, 2vw, 22px); bottom: clamp(12px, 2vw, 22px); width: min(540px, 56%); padding: 18px 22px 16px; color: #fbf1e2; background: rgba(30, 20, 28, .84); border-radius: 6px;
  box-shadow: 0 0 0 2px #f2dcb8, 0 0 0 4px #33212b, 0 18px 34px -12px rgba(0, 0, 0, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dialog-tag { position: absolute; top: -14px; left: 14px; display: flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 800; padding: 3px 10px; background: var(--apricot); color: #fff; border-radius: 4px; box-shadow: 0 0 0 2px #33212b; letter-spacing: .04em; }
.dialog-title { font-weight: 800; font-size: 18px; margin-bottom: 4px; color: #ffe1b0; }
.dialog-line { font-size: 15px; line-height: 1.7; min-height: 3.4em; }
.dialog-caret { position: absolute; right: 14px; bottom: 10px; border: 6px solid transparent; border-top-color: #f2dcb8; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { transform: translateY(3px); opacity: .5; } }
.stage-hint { position: absolute; right: 14px; top: 12px; font-size: 13px; color: #fff8ec; background: rgba(30, 20, 24, .45); padding: 5px 11px; border-radius: 999px; pointer-events: none; transition: opacity .4s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* 对话框放在舞台下方，不遮挡小猫 */
.stage-shell.below { border-radius: 20px; overflow: hidden; background: #22171d; box-shadow: 0 30px 70px -30px rgba(60, 30, 20, .55); }
.stage-shell.below .stage-frame { border-radius: 0; }
.stage-shell.below .dialog { position: relative; left: auto; bottom: auto; width: auto; border-radius: 0; box-shadow: inset 0 2px 0 #3a2731; background: #22171d; padding: 24px clamp(18px, 3vw, 32px) 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: baseline; }
.stage-shell.below .dialog-tag { top: -13px; left: clamp(18px, 3vw, 32px); }
.stage-shell.below .dialog-title { margin: 0; white-space: nowrap; }
.stage-shell.below .dialog-line { min-height: 3.4em; }
@media (max-width: 760px) {
  .stage-shell.below .dialog { grid-template-columns: minmax(0, 1fr); }
  .nav { display: none; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .stage-shell { border-radius: 16px; overflow: hidden; background: #22171d; }
  .stage-shell .stage-frame { border-radius: 16px 16px 0 0; }
  .stage-shell .dialog { position: relative; left: auto; bottom: auto; width: auto; border-radius: 0; box-shadow: none; background: #22171d; padding: 22px 18px 18px; }
  .dialog-tag { top: -12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
