/* ==========================================================================
   同桌 · 样式表

   配色来自产品的题材本身：夜里一张只开着灯的饭桌，和一台老式音响的指示灯。
   所以底色是"暖的中性近黑"，主色是灯下的琥珀，辅色是示波器上那种不刺眼的暗玉。
   用色克制：琥珀只给"她那一侧"，暗玉只给"你那一侧"——这对颜色承载的是信息，
   不是装饰，因此在频谱图和波形图里它们必须严格对应同一件事。

   字体分三层，各司其职：
     标题  黑体 / 无衬线，靠字重和负字距立起来（断言的口吻）
     正文  中文无衬线系统栈，保证任何机器上都能读
     抒情  宋体系列，只用在引用和结尾那种要慢慢读的段落（亲密的段落）
     数字  JetBrains Mono，本地打包，因为整页到处是 dB / Hz / 百分比
   ========================================================================== */

/* ---------- 字体 ---------- */
@font-face {
  font-family: "JBMono";
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JBMono";
  src: url("../fonts/jetbrains-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/*
  宋体只用于"要慢慢读"的段落：楔子里的那一句、场景故事、结尾那句。
  之所以本地打包而不是靠系统字体：Windows 上 SimSun 在不少精简系统里没有，
  而这台机器实测只有微软雅黑/等线可用——不打包，这一页的情绪层就整体消失，
  变成一块无差别的黑体。150 万字节换这个差别是值得的，而且只取 400 一个字重。
*/
@font-face {
  font-family: "NotoCJKSerif";
  src: url("../fonts/noto-serif-sc-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  /*
    这里刻意不写 unicode-range。

    我原本加了 `U+2E80-9FFF, U+3000-303F, U+FF00-FFEF`，
    结果实测发现：`document.fonts.check()` 说 loaded，字体文件也是 200，
    但页面上三种字体（NotoCJKSerif / Segoe UI / 通用 serif）
    测出来的宽度完全一样——也就是根本没生效，静默回落了。
    原因是字体规则的匹配方式和 check() 的探测字符不在同一个范围里，
    这种失败完全不报错，只能靠量宽度才看得出来。

    去掉 range 之后，这个字体只用在 --font-serif 这个令牌上，
    而该令牌只被情绪段落引用，所以不会抢占正文黑体。
  */
}

/* ---------- 令牌 ---------- */
:root {
  /* 版面概念：一块被灯照着的深色桌面，左边说话，右边是声音本身的样子 */
  --canvas: #12100e;
  --canvas-lift: #17140f;
  --surface: #1b1815;
  --surface-2: #211d18;
  --text: #f3ede4;
  --text-soft: #cfc6ba;
  --muted: #948a7e;
  --muted-dim: #6f665c;

  --accent: #e3a15e;          /* 灯下的琥珀：她那一侧、被削掉的那部分 */
  --accent-deep: #b97b3d;
  --signal: #7fc4b0;          /* 示波器上的暗玉：你那一侧、完整的那部分 */

  --line: #2a251f;
  --line-bright: #3a332b;

  --font-sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
               "Hiragino Sans GB", system-ui, sans-serif;
  /* 宋体栈：本地打包的 Noto Serif CJK 打底，系统衬线只作兜底。
     实测这台 Windows 上 SimSun / STSong / Songti SC 全都不存在，
     所以必须把打包的那一个放最前面，否则整页的情绪层会静默消失。 */
  --font-serif: "NotoCJKSerif", "Source Han Serif SC", "Noto Serif CJK SC",
                "SimSun", Georgia, serif;
  --font-mono: "JBMono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* 字号阶：编辑型页面，标题要真的拉开 */
  --text-xs: .75rem;
  --text-sm: .8125rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;
  --text-5xl: 4rem;
  --text-6xl: 5.25rem;

  /* 间距：4px 网格 */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-6: 24px; --sp-8: 32px; --sp-12: 48px; --sp-16: 64px;
  --sp-24: 96px; --sp-32: 128px;

  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;

  /* 阴影带暖底色的色相，不用纯黑 */
  --shadow-rgb: 8 6 4;
  --elev-1: 0 1px 2px rgb(var(--shadow-rgb) / .5);
  --elev-2: 0 14px 28px -18px rgb(var(--shadow-rgb) / .85),
            0 2px 6px rgb(var(--shadow-rgb) / .4);
  --elev-3: 0 40px 70px -40px rgb(var(--shadow-rgb) / .95);

  --hairline: color-mix(in oklab, var(--text) 9%, transparent);
  --hairline-strong: color-mix(in oklab, var(--text) 14%, transparent);

  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --ease-out: cubic-bezier(.05, .7, .1, 1);

  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 64px);
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(120% 60% at 50% -10%,
      color-mix(in oklab, var(--accent) 9%, var(--canvas)) 0%,
      var(--canvas) 58%) fixed,
    var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 极细的颗粒，让大块暗面不至于死平 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .masthead, .colophon { position: relative; z-index: 1; }

h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }

::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 通用件 ---------- */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-6);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 90ms var(--ease), background var(--dur-1) var(--ease),
              border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}

.btn-primary {
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--accent) 92%, white),
    var(--accent) 55%,
    color-mix(in oklab, var(--accent) 84%, black));
  color: #1a1207;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .28),
              0 12px 26px -14px color-mix(in oklab, var(--accent) 65%, transparent);
}
.btn-primary:hover {
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--accent) 100%, white),
    color-mix(in oklab, var(--accent) 96%, white) 55%,
    var(--accent));
}
.btn-primary:active { transform: scale(.985); }

.btn-ghost {
  background: color-mix(in oklab, var(--text) 4%, transparent);
  border-color: var(--hairline-strong);
  color: var(--text-soft);
}
.btn-ghost:hover {
  background: color-mix(in oklab, var(--text) 8%, transparent);
  color: var(--text);
}

.btn-tiny {
  min-height: 32px;
  padding: 0 var(--sp-3);
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .04em;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.btn-tiny:hover { color: var(--text); border-color: var(--muted-dim); }
.btn-tiny[aria-expanded="true"] { color: var(--accent); border-color: var(--accent-deep); }

.mono { font-family: var(--font-mono); font-size: .92em; }
.quiet { color: var(--muted); }

/* ---------- 页头 ---------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--gutter);
  max-width: 1280px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
}

/* 品牌记号：两个错开的圆，一个完整一个缺角——这产品全部的意思 */
.brand-mark {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
}
.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--signal);
}
.brand-mark::after {
  border-color: var(--accent);
  clip-path: polygon(50% 50%, 100% 0, 100% 100%, 0 100%, 0 50%);
  transform: translateX(3px);
}

.brand-name {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: .08em;
}

.masthead-nav {
  display: flex;
  gap: var(--sp-6);
  font-size: var(--text-sm);
}
.masthead-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.masthead-nav a:hover { color: var(--text); border-bottom-color: var(--accent-deep); }

/* ---------- 楔子 ---------- */
.overture {
  padding: clamp(40px, 9vw, 110px) var(--gutter) clamp(56px, 8vw, 96px);
  max-width: 1280px;
  margin: 0 auto;
}

.overture-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

h1 {
  font-size: clamp(2.9rem, 8.2vw, var(--text-6xl));
  line-height: .98;
  letter-spacing: -.045em;
  margin-bottom: var(--sp-6);
}

.lede {
  font-size: clamp(var(--text-lg), 2.1vw, var(--text-xl));
  line-height: 1.68;
  color: var(--text-soft);
  max-width: 34ch;
  margin-bottom: var(--sp-4);
}

.lede-quiet {
  font-family: var(--font-serif);
  color: var(--muted);
  font-size: var(--text-base);
  max-width: 32ch;
}

.overture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin: var(--sp-8) 0 var(--sp-6);
}

.fineprint {
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--muted-dim);
  max-width: 40ch;
}

/* ---------- 频谱图（视觉主体） ---------- */
.spectrum-figure { margin: 0; }

.spectrum {
  width: 100%;
  height: auto;
  overflow: visible;
}

.grid-lines line {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 2 5;
}

.spec-intact-line {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.spec-lost-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.axis-labels text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--muted-dim);
  text-anchor: middle;
}
.axis-labels text:first-of-type { text-anchor: start; }
.axis-labels text:last-of-type { text-anchor: end; }
.axis-unit {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--muted-dim);
}

.consonant-marks text {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: color-mix(in oklab, var(--accent) 55%, transparent);
  text-anchor: middle;
}

.spectrum-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--muted);
}

.legend { display: inline-flex; align-items: center; gap: var(--sp-2); }

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.dot-intact { background: var(--signal); }
.dot-lost { background: var(--accent); }

.cap-note {
  flex: 1 1 100%;
  color: var(--muted-dim);
  line-height: 1.65;
}

/* ---------- 区块头 ---------- */
section { padding: 0 var(--gutter); }

.section-head {
  max-width: 1280px;
  margin: 0 auto var(--sp-8);
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.6vw, var(--text-3xl));
  letter-spacing: -.03em;
  line-height: 1.14;
  margin-bottom: var(--sp-3);
}

.section-sub {
  color: var(--muted);
  max-width: 56ch;
  font-size: var(--text-base);
}

/* ---------- 面板 ---------- */
.panel {
  max-width: 1280px;
  margin: 0 auto var(--sp-4);
  padding: clamp(20px, 3vw, 32px);
  background:
    linear-gradient(180deg,
      color-mix(in oklab, var(--surface) 94%, white) 0%,
      var(--surface) 22%,
      var(--canvas-lift) 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .045), var(--elev-2);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.panel-head h3 {
  font-size: var(--text-lg);
  letter-spacing: -.01em;
}

/* ---------- 预设 ---------- */
.preset-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
}

.preset {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  background: color-mix(in oklab, var(--text) 2.5%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease),
              background var(--dur-1) var(--ease);
}
.preset:hover { border-color: var(--muted-dim); background: color-mix(in oklab, var(--text) 5%, transparent); }
.preset[aria-checked="true"] {
  border-color: var(--accent-deep);
  background: color-mix(in oklab, var(--accent) 9%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 18%, transparent);
}

.preset-name {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -.005em;
  margin-bottom: 2px;
}
.preset[aria-checked="true"] .preset-name { color: var(--accent); }

.preset-desc {
  display: block;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--muted-dim);
}

/* ---------- 听力图 ---------- */
.audiogram-wrap { position: relative; }

.audiogram {
  width: 100%;
  height: auto;
  touch-action: none;
  overflow: visible;
}

.audiogram-readout {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  margin-top: var(--sp-2);
  min-height: 1.5em;
  letter-spacing: .02em;
}

/* ---------- 结果卡 ---------- */
/* 用"一条被吃掉多少"的条，而不是一个圆形分数——
   圆形分数像体检报告，条形缺口像"信息没接住"，这才是要表达的东西。 */
.verdict {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: var(--sp-4) var(--sp-8);
  align-items: center;
  margin-top: var(--sp-6);
  padding: var(--sp-5, 20px) var(--sp-6);
  background: color-mix(in oklab, var(--text) 3%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color var(--dur-3) var(--ease);
}

.verdict[data-tone="warn"] { border-color: color-mix(in oklab, var(--accent) 26%, transparent); }
.verdict[data-tone="bad"] {
  border-color: color-mix(in oklab, #d4645c 32%, transparent);
  background: color-mix(in oklab, #d4645c 5%, transparent);
}

.verdict-meter {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.verdict-track {
  position: relative;
  flex: 1;
  height: 32px;
  background: var(--canvas);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* 斜纹代表"没接住的那部分"，比纯色更像"缺了一块" */
.verdict-track::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 5px,
    color-mix(in oklab, var(--muted) 13%, transparent) 5px 6px
  );
  pointer-events: none;
}

.verdict-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--signal) 80%, black),
    var(--signal));
  box-shadow: 0 0 18px -4px color-mix(in oklab, var(--signal) 55%, transparent);
  transition: width var(--dur-3) var(--ease), background var(--dur-3) var(--ease);
}

.verdict[data-tone="warn"] .verdict-fill {
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--accent) 78%, black),
    var(--accent));
  box-shadow: 0 0 18px -4px color-mix(in oklab, var(--accent) 55%, transparent);
}

.verdict[data-tone="bad"] .verdict-fill {
  background: linear-gradient(90deg, #9e423a, #d4645c);
  box-shadow: 0 0 18px -4px rgb(212 100 92 / .5);
}

.verdict-pct {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  color: var(--text);
  min-width: 3.2ch;
  text-align: right;
}

.verdict-text { min-width: 0; }

/* 明确写出这个百分比是什么，避免被读成"听力分数" */
.verdict-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: var(--sp-1);
}

.verdict-headline {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: var(--sp-1);
}

.verdict-detail {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--text-soft);
  max-width: 60ch;
}

.verdict-lost {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  margin-top: var(--sp-2);
  letter-spacing: .02em;
}
.verdict-lost:empty { display: none; }

/* ---------- 手动滑杆 ---------- */
.manual-controls { margin-top: var(--sp-6); }

.manual-hint {
  font-size: var(--text-xs);
  color: var(--muted-dim);
  margin-bottom: var(--sp-4);
  max-width: 54ch;
}

.slider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: var(--sp-4);
}

.slider-cell label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted);
  margin-bottom: var(--sp-1);
}

.slider-cell .val { color: var(--accent); font-weight: 600; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--line-bright);
  border-radius: 2px;
}
input[type="range"]::-moz-range-track {
  height: 3px;
  background: var(--line-bright);
  border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--canvas);
  box-shadow: 0 0 0 1px var(--accent-deep);
  transition: transform var(--dur-1) var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--canvas);
  box-shadow: 0 0 0 1px var(--accent-deep);
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline-offset: 6px; }

/* ---------- 三场景对比 ---------- */
/* 这是整个产品最有说服力的一块：把"同一副耳朵，换个地方就崩"
   直接画成三个并排的条，让人不用读数字也知道发生了什么。 */
.scene-compare {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}

.compare-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: var(--sp-4);
}

.compare-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
}

.compare-item {
  min-width: 0;
}

.compare-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.compare-name {
  font-size: var(--text-xs);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-pct {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  color: var(--text);
  flex: none;
}

.compare-bar {
  height: 6px;
  background: var(--canvas);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.compare-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--dur-3) var(--ease), background var(--dur-3) var(--ease);
  background: var(--signal);
}

.compare-fill[data-tone="warn"] {
  background: var(--accent);
}

.compare-fill[data-tone="bad"] {
  background: #d4645c;
}

/* 当前正在听的那个场景高亮，但不用颜色喊——用一道左侧标记 */
.compare-item[data-active="true"] .compare-name {
  color: var(--accent);
  font-weight: 600;
}

.compare-note {
  margin-top: var(--sp-3);
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  line-height: 1.8;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- 补偿 ---------- */
.comp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: var(--sp-4) var(--sp-8);
  align-items: center;
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}

.comp-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-soft);
}

.comp-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.comp-hint {
  grid-column: 1 / -1;
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--muted-dim);
  max-width: 72ch;
}

/* ---------- 场景 ---------- */
.scene-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}

.scene-btn {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  background: color-mix(in oklab, var(--text) 2.5%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.scene-btn:hover { border-color: var(--muted-dim); }
.scene-btn[aria-checked="true"] {
  border-color: var(--accent-deep);
  background: color-mix(in oklab, var(--accent) 9%, transparent);
}

.scene-name {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 2px;
}
.scene-btn[aria-checked="true"] .scene-name { color: var(--accent); }

.scene-place {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted-dim);
  line-height: 1.5;
}

.scene-story {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: 1.95;
  color: var(--text-soft);
  max-width: 64ch;
  padding-left: var(--sp-4);
  border-left: 2px solid color-mix(in oklab, var(--accent) 30%, transparent);
}

.script {
  margin-top: var(--sp-6);
  display: grid;
  gap: var(--sp-2);
}

.script-line {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  line-height: 1.65;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid color-mix(in oklab, var(--line) 60%, transparent);
}
.script-who {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-dim);
  letter-spacing: .04em;
  padding-top: 3px;
}
.script-who.is-subject { color: var(--accent); }
.script-text { color: var(--text-soft); }

/* ---------- 播放器 ---------- */
.player-main { display: grid; gap: var(--sp-4); }

.ab-switch {
  display: flex;
  gap: 0;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 3px;
  width: fit-content;
}

.ab-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 40px;
  padding: 0 var(--sp-5, 20px);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.ab-btn:hover { color: var(--text-soft); }
.ab-btn[aria-pressed="true"] {
  background: color-mix(in oklab, var(--text) 9%, transparent);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), var(--elev-1);
}
.ab-btn[aria-pressed="true"] .ab-icon { color: var(--accent); }
.ab-icon { font-size: .9em; }

.transport {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-4);
  align-items: center;
}

.play-btn {
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--accent) 94%, white),
    var(--accent) 58%,
    color-mix(in oklab, var(--accent) 82%, black));
  color: #1a1207;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3),
              0 14px 30px -16px color-mix(in oklab, var(--accent) 70%, transparent);
  transition: transform 90ms var(--ease), box-shadow var(--dur-1) var(--ease);
}
.play-btn:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .34),
                              0 18px 34px -16px color-mix(in oklab, var(--accent) 80%, transparent); }
.play-btn:active { transform: scale(.96); }
.play-btn:disabled { opacity: .4; cursor: not-allowed; }
.play-btn svg { width: 24px; height: 24px; fill: currentColor; }

.wave-wrap {
  position: relative;
  min-width: 0;
  height: 78px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgb(255 255 255 / .022), transparent 55%),
    var(--canvas);
  border: 1px solid var(--line);
  overflow: hidden;
}

#wave { width: 100%; height: 100%; display: block; }

.wave-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  padding: 0 8px 5px;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted-dim);
  letter-spacing: .04em;
}

.player-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-dim);
  letter-spacing: .03em;
}

.meta-snr { color: var(--muted); }

.player-note {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--text-soft);
  max-width: 64ch;
}

.player-audio-hint {
  margin-top: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--accent);
  min-height: 1.4em;
}

/* ---------- 解释 ---------- */
.explain { padding-top: clamp(64px, 9vw, 112px); }

.explain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--sp-4);
  max-width: 1280px;
  margin: 0 auto;
}

.explain-card {
  padding: var(--sp-6);
  background: color-mix(in oklab, var(--surface) 55%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.explain-card h3 {
  font-size: var(--text-lg);
  line-height: 1.4;
  margin-bottom: var(--sp-4);
  letter-spacing: -.01em;
}

.explain-card h3 .num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--accent);
  margin-right: var(--sp-2);
  letter-spacing: .06em;
  vertical-align: 2px;
}

.explain-card p {
  font-size: var(--text-sm);
  line-height: 1.85;
  color: var(--text-soft);
  margin-bottom: var(--sp-3);
}
.explain-card p:last-child { margin-bottom: 0; }
.explain-card strong { color: var(--text); font-weight: 600; }

.explain-card-accent {
  background: color-mix(in oklab, var(--accent) 6%, var(--surface));
  border-color: color-mix(in oklab, var(--accent) 22%, transparent);
}

.limits {
  margin: 0;
  padding-left: var(--sp-4);
  display: grid;
  gap: var(--sp-2);
}
.limits li {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--text-soft);
}
.limits li::marker { color: var(--accent-deep); }
.limits b { color: var(--text); font-weight: 600; }

/* ---------- 回家怎么说 ---------- */
.talk { padding-top: clamp(64px, 9vw, 112px); }

.tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.tip {
  padding: var(--sp-6) var(--sp-6) var(--sp-6) 0;
  border-bottom: 1px solid var(--line);
}
.tip:not(:nth-child(2n)) { padding-right: var(--sp-8); }

.tip-lead {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: var(--sp-3);
  color: var(--text);
}

.tip-body {
  font-size: var(--text-sm);
  line-height: 1.85;
  color: var(--text-soft);
  max-width: 46ch;
  margin-bottom: var(--sp-3);
}

.tip-why {
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--muted-dim);
  max-width: 46ch;
  padding-left: var(--sp-3);
  border-left: 1px solid var(--hairline-strong);
}

.talk-close {
  max-width: 1280px;
  margin: var(--sp-16) auto 0;
  padding-left: var(--sp-6);
  border-left: 2px solid var(--accent-deep);
  display: grid;
  gap: var(--sp-4);
  max-width: 68ch;
}

.talk-close p {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  line-height: 1.95;
  color: var(--text-soft);
}

.talk-close-em {
  color: var(--text) !important;
}

/* ---------- 分享 ---------- */
.share {
  padding-top: clamp(64px, 9vw, 112px);
  padding-bottom: clamp(64px, 9vw, 112px);
}

.share-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(130% 100% at 50% 0%,
      color-mix(in oklab, var(--accent) 12%, var(--surface-2)) 0%,
      var(--surface) 55%,
      var(--canvas-lift) 100%);
  border: 1px solid color-mix(in oklab, var(--accent) 18%, transparent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), var(--elev-3);
  isolation: isolate;
}

/* 卡片背后一团很淡的光，把它从暗底上抬起来 */
.share-card::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: -1;
  background: radial-gradient(closest-side,
    color-mix(in oklab, var(--accent) 20%, transparent), transparent);
  filter: blur(64px);
  pointer-events: none;
}

.share-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-4);
}

.share-card h2 {
  font-size: clamp(1.5rem, 3vw, var(--text-2xl));
  letter-spacing: -.025em;
  margin-bottom: var(--sp-6);
}

.share-quote {
  margin: 0 0 var(--sp-4);
  padding: 0;
  font-family: var(--font-serif);
  font-size: clamp(var(--text-lg), 2.4vw, var(--text-xl));
  line-height: 2;
  color: var(--text);
  letter-spacing: .01em;
}

.share-sub {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--sp-6);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.share-status {
  margin-top: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--signal);
  min-height: 1.4em;
}

/* ---------- 页脚 ---------- */
.colophon {
  padding: var(--sp-16) var(--gutter) var(--sp-12);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / .28));
}

.colophon-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: var(--sp-6) var(--sp-12);
  align-items: start;
}

.colophon-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.colophon-name {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: .1em;
}

.colophon-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--muted-dim);
  letter-spacing: .08em;
}

.colophon-body {
  font-size: var(--text-sm);
  line-height: 1.9;
  color: var(--muted);
  max-width: 52ch;
}

.colophon-legal {
  grid-column: 1 / -1;
  font-size: var(--text-xs);
  line-height: 1.8;
  color: var(--muted-dim);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  max-width: 80ch;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .overture-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-12);
  }
  /* 手机上先给话，再给图——情感先于论证 */
  .spectrum-figure { order: 2; }
  .comp-row { grid-template-columns: 1fr; }
  .colophon-inner { grid-template-columns: 1fr; }
  .tip:not(:nth-child(2n)) { padding-right: 0; }
  .tip { padding-right: 0; }
}

@media (max-width: 640px) {
  .masthead { padding: var(--sp-4) var(--gutter); }
  .masthead-nav { gap: var(--sp-4); font-size: var(--text-xs); }
  .transport { grid-template-columns: auto 1fr; row-gap: var(--sp-3); }
  .transport > .btn-tiny { grid-column: 1 / -1; justify-self: start; }
  .ab-switch { width: 100%; }
  .ab-btn { flex: 1; justify-content: center; padding: 0 var(--sp-2); }
  .script-line { grid-template-columns: 64px 1fr; }
  .wave-wrap { height: 64px; }
  .talk-close { padding-left: var(--sp-4); }
  .talk-close p { font-size: var(--text-base); }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- 入场：只给第一屏，一次，不重复 ---------- */
@media (prefers-reduced-motion: no-preference) {
  .overture-copy > * {
    animation: rise var(--dur-3) var(--ease-out) both;
  }
  .overture-copy > :nth-child(1) { animation-delay: 40ms; }
  .overture-copy > :nth-child(2) { animation-delay: 100ms; }
  .overture-copy > :nth-child(3) { animation-delay: 180ms; }
  .overture-copy > :nth-child(4) { animation-delay: 240ms; }
  .overture-copy > :nth-child(5) { animation-delay: 300ms; }
  .overture-copy > :nth-child(6) { animation-delay: 360ms; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}
