/* vocab-pro · Editorial v2
   气质：杂志社论排版 + 有声读物。暖纸底、墨黑主操作、钴蓝只标“学习信号”（重点词/进度/播放）。
   绿 = 答对，砖红 = 答错，奶黄 = 正在朗读的句子与易混提醒。
   新样式必须复用变量；规范见 docs/UI-SPEC.md。 */
:root {
  color-scheme: light;
  --paper: #F8F6F1;
  --paper-2: #EFECE4;
  --surface: #FFFFFF;
  --ink: #17181C;
  --ink-2: #4D4A45;
  --ink-3: #8A867E;
  --hair: rgba(23, 24, 28, 0.10);
  --hair-strong: rgba(23, 24, 28, 0.18);

  --accent: #2F4BD3;
  --accent-ink: #2237A6;
  --accent-soft: #ECEFFC;
  --saved-bg: rgba(47, 75, 211, 0.11);
  --ok: #1E7F55;
  --ok-soft: #E5F2EA;
  --bad: #C8432B;
  --bad-soft: #FAE9E4;
  --mark: #FFEFAF;
  --tip-bg: #FAF3DE;
  --tip-ink: #6B5112;

  --serif: ui-serif, "New York", "Iowan Old Style", Charter, Georgia, "Noto Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --serif-zh: "Songti SC", "STSong", "Noto Serif SC", serif;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(20, 20, 30, 0.04), 0 4px 14px rgba(20, 20, 30, 0.05);
  --shadow-float: 0 14px 36px rgba(20, 20, 30, 0.16), 0 2px 6px rgba(20, 20, 30, 0.08);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --pad: 20px;
  --col: 680px;
  --nav-h: 52px;
  --tabs-h: 46px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --prose-size: 19px;
}
@media (min-width: 720px) { :root { --pad: 32px; } }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.ui-ico {
  width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: -0.25em;
  stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 壳体 ---------- */
.app-shell { max-width: var(--col); margin: 0 auto; min-height: 100vh; padding-bottom: calc(56px + var(--safe-b)); }
.wrap { padding: 0 var(--pad); }
.bleed { margin: 0 calc(-1 * var(--pad)); }
@media (min-width: 720px) { .bleed { margin: 0; } }

/* ---------- 文字原子 ---------- */
.eyebrow {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.eyebrow .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.eyebrow.accent { color: var(--accent); }
.display { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; margin: 0; }
.zh-serif { font-family: var(--serif-zh); }
.muted { color: var(--ink-3); }
.meta { font-size: 13px; color: var(--ink-3); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.meta .sep { opacity: .5; }
.rule { height: 1px; background: var(--hair); border: 0; margin: 0; }

/* ---------- 按钮 ---------- */
.btn {
  height: 48px; padding: 0 22px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hair-strong);
  transition: transform .12s var(--ease), background .15s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .35; cursor: default; transform: none; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: none; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: none; }
.btn-quiet { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; min-width: 0; padding: 0 12px; }
.round-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  transition: background .15s, transform .12s var(--ease);
}
.round-btn:active { transform: scale(0.92); }
span.round-btn { pointer-events: none; }
.round-btn.filled { background: var(--paper-2); }
.round-btn.accent { background: var(--accent-soft); color: var(--accent); }
.link-btn { color: var(--accent); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }

/* 分段选择器（iOS 风格） */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-pill); background: var(--paper-2); }
.seg button {
  height: 32px; padding: 0 14px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .10); }
.seg button:disabled { opacity: .4; cursor: default; }
.seg.block { display: flex; }
.seg.block button { flex: 1; }

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 40; height: calc(var(--nav-h) + var(--safe-t));
  display: flex; align-items: center; gap: 4px; padding: var(--safe-t) calc(var(--pad) - 10px) 0;
  background: rgba(248, 246, 241, 0.86);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  transition: background .2s, box-shadow .2s;
}
.nav.is-scrolled { box-shadow: 0 1px 0 var(--hair); }
.nav-title {
  flex: 1; min-width: 0; text-align: center; font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s;
}
.nav.is-scrolled .nav-title, .nav.show-title .nav-title { opacity: 1; transform: none; }
.nav-spacer { flex: 1; }
/* 详情页：顶栏浮在封面上，滚过封面后变实 */
.nav.is-overlay { position: fixed; left: 0; right: 0; max-width: var(--col); margin: 0 auto; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.nav.is-overlay button.round-btn, .nav.is-overlay a.round-btn { background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 4px rgba(0, 0, 0, .10); }
.nav.is-overlay.is-scrolled { background: rgba(248, 246, 241, 0.9); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); }
.nav.is-overlay.is-scrolled button.round-btn, .nav.is-overlay.is-scrolled a.round-btn { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.wordmark { font-family: var(--serif-zh); font-size: 23px; font-weight: 700; letter-spacing: 0.04em; padding-left: 10px; display: flex; align-items: baseline; gap: 2px; }
.wordmark i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: 1px; }
.badge-dot { position: relative; }
.badge-dot[data-count]::after {
  content: attr(data-count); position: absolute; top: 3px; right: 1px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.badge-accent[data-count]::after { background: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-right: 10px; flex: 0 0 auto; }
.install-pill {
  height: 32px; padding: 0 11px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--hair-strong); white-space: nowrap;
  transition: transform .12s var(--ease), color .15s, background .15s, box-shadow .15s;
}
.install-pill[hidden] { display: none; }
.install-pill .ui-ico { width: 14px; height: 14px; }
.install-pill:active { transform: scale(0.96); }
@media (hover: hover) {
  .install-pill:hover { color: var(--accent-ink); background: var(--accent-soft); box-shadow: inset 0 0 0 1px rgba(47, 75, 211, 0.28); }
}
.access-pill {
  height: 32px; padding: 0 11px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; transition: transform .12s var(--ease), background .15s, color .15s, box-shadow .15s;
}
.access-pill .ui-ico { width: 14px; height: 14px; }
.access-pill:active { transform: scale(0.96); }
.access-pill.is-unlocked {
  background: var(--ok-soft); color: var(--ok);
  box-shadow: inset 0 0 0 1px rgba(30, 127, 85, 0.22);
}

/* ---------- 首页 ---------- */
.home-intro { padding: 12px 0 18px; }
.home-intro h1 { font-size: 28px; line-height: 1.16; margin-top: 8px; }
.home-intro h1 em { font-style: normal; color: var(--accent); }
.home-pillars {
  margin: 9px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px;
  font-size: 13px; color: var(--ink-2);
}
.home-pillars .sep { color: var(--ink-3); opacity: .65; }
@media (min-width: 720px) {
  .home-intro { padding: 14px 0 22px; }
  .home-intro h1 { font-size: 32px; }
}

.progress { margin: 24px 0 0; }
.home-status { margin: 6px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.progress-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.progress-head { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.progress-sub { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.progress-top b { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress-top b small { font-size: 13.5px; color: var(--ink-3); font-weight: 500; }
.bar { height: 4px; border-radius: 4px; background: var(--paper-2); overflow: hidden; margin-top: 9px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .5s var(--ease); }
.progress-study {
  margin-top: 8px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
  font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.progress-study strong { color: var(--ink-2); font-weight: 600; }
.progress-study .sep { opacity: .65; }

.feature { display: block; }
.feature-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.feature-audio-tag {
  position: absolute; right: 12px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: var(--r-pill); background: rgba(23, 24, 28, 0.68); color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.feature-audio-tag .ui-ico { width: 13px; height: 13px; }
.feature-body { padding-top: 16px; }
.feature-link { display: block; }
.feature-title { font-size: 30px; line-height: 1.1; margin: 8px 0 5px; transition: color .15s; }
.feature-zh { font-family: var(--serif-zh); font-size: 16px; color: var(--ink-2); }
.feature-summary {
  margin: 10px 0 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.62;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.feature .meta { margin-top: 10px; }
.feature-foot { margin-top: 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.feature-revisit { font-size: 13.5px; color: var(--ink-2); }
@media (hover: hover) {
  .feature-media:hover img { transform: scale(1.025); }
  .feature-link:hover .feature-title { color: var(--accent-ink); }
  .feature-revisit:hover { color: var(--accent); }
}
@media (min-width: 720px) {
  .feature {
    display: grid; grid-template-columns: 1.06fr 1fr; gap: 22px; align-items: center;
    padding: 18px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1);
  }
  .feature-media { aspect-ratio: 4 / 3; border-radius: var(--r-md); }
  .feature-body { padding-top: 0; min-width: 0; }
  .feature-title { font-size: 26px; line-height: 1.14; margin: 8px 0 5px; }
  .feature-zh { font-size: 15.5px; }
  .feature-summary { margin-top: 8px; font-size: 14px; -webkit-line-clamp: 3; }
  .feature-foot { margin-top: 14px; gap: 12px; }
  .feature .btn { height: 42px; padding: 0 18px; font-size: 14.5px; }
}

.home-tools { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.home-tool {
  display: flex; flex-direction: column; padding: 14px 15px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-1);
  transition: transform .12s var(--ease), box-shadow .18s;
}
.home-tool:active { transform: scale(0.98); }
@media (hover: hover) {
  .home-tool:hover { box-shadow: 0 2px 6px rgba(20, 20, 30, 0.06), 0 8px 20px rgba(20, 20, 30, 0.08); }
}
.home-tool-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.home-tool-ico {
  width: 32px; height: 32px; border-radius: 9px; background: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
}
.home-tool-ico .ui-ico { width: 17px; height: 17px; }
.home-tool-ico.star { background: var(--accent-soft); color: var(--accent); }
.home-tool-val { font-size: 12.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.home-tool-val.accent { color: var(--accent); }
.home-tool b { margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.3; }
.home-tool > span { margin-top: 3px; font-size: 12px; color: var(--ink-3); line-height: 1.45; }

/* 全部篇目：快搜 + 只看未读 + 板块筛选胶囊（横滑渐隐提示）+ 按考频分卷（可折叠） */
.toc { margin-top: 34px; }
.toc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.toc-head-main { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.toc-total { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.toc-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.toc-mini-btn {
  height: 30px; padding: 0 11px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); background: var(--paper-2);
  transition: background .15s, color .15s, box-shadow .15s, transform .12s var(--ease);
}
.toc-mini-btn:active, .toc-icon-btn:active { transform: scale(0.95); }
.toc-mini-btn.is-on { background: var(--accent-soft); color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(47, 75, 211, 0.25); }
.toc-icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); background: var(--paper-2);
  transition: background .15s, color .15s, transform .12s var(--ease);
}
.toc-icon-btn .ui-ico { width: 15px; height: 15px; }
.toc-icon-btn.is-on { background: var(--ink); color: #fff; }
.toc-search-wrap { position: relative; margin-top: 12px; }
.toc-search-wrap[hidden], .toc-filter-wrap[hidden] { display: none; }
.toc-search { height: 42px; padding-right: 38px; font-size: 14px; }
.toc-search::-webkit-search-cancel-button { display: none; }
.toc-search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-3);
}
.toc-search-clear[hidden] { display: none; }
.toc-search-clear .ui-ico { width: 15px; height: 15px; }

.toc-filter-wrap { position: relative; margin: 12px calc(-1 * var(--pad)) 0; }
.toc-filter-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 42px; pointer-events: none;
  background: linear-gradient(to right, rgba(248, 246, 241, 0), var(--paper) 82%);
  transition: opacity .2s;
}
.toc-filter-wrap.at-end::after { opacity: 0; }
.toc-filter {
  display: flex; gap: 8px; padding: 2px var(--pad) 4px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.toc-filter::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; height: 32px; padding: 0 13px; border-radius: var(--r-pill);
  background: var(--paper-2); color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  transition: background .15s, color .15s, transform .12s var(--ease);
}
.chip:active { transform: scale(0.96); }
.chip small { font-size: 11.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip.active { background: var(--ink); color: #fff; }
.chip.active small { color: rgba(255, 255, 255, 0.6); }

.part { margin-top: 24px; }
.part-head {
  width: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr auto;
  gap: 2px 14px; align-items: end; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink);
  transition: opacity .15s;
}
.part-head:active { opacity: .68; }
.part-head.plain { grid-template-columns: 1fr auto; }
.part-no { grid-row: span 2; min-width: 48px; font-family: var(--serif); font-size: 40px; line-height: 0.9; font-weight: 600; color: var(--ink); font-variant-numeric: lining-nums; }
.part-title { font-size: 18px; font-weight: 700; }
.part-desc { font-size: 13px; color: var(--ink-3); grid-column: 1 / -1; }
.part-head:not(.plain) .part-desc { grid-column: 2 / -1; }
.part-count { grid-row: 1; grid-column: -2; align-self: center; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.part-chev { width: 18px; height: 18px; transform: rotate(90deg); transition: transform .2s var(--ease); }
.part.open .part-chev { transform: rotate(-90deg); }
.toc-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--hair); transition: opacity .12s; }
a.toc-row:active { opacity: .62; }
.toc-row.is-current::before {
  content: ""; position: absolute; left: -10px; top: 15px; bottom: 15px;
  width: 2.5px; border-radius: 2px; background: var(--accent);
}
.toc-no { font-family: var(--serif); font-size: 15px; color: var(--ink-3); width: 24px; font-variant-numeric: tabular-nums; flex: 0 0 auto; align-self: flex-start; padding-top: 2px; }
.toc-row.is-current .toc-no { color: var(--accent); font-weight: 700; }
.toc-main { flex: 1; min-width: 0; }
.toc-title { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; transition: color .15s; }
.toc-zh { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.toc-row.is-read:not(.is-current) .toc-title { color: var(--ink-2); }
.toc-row.is-soon .toc-title, .toc-row.is-soon .toc-zh { color: var(--ink-3); }
.toc-tags { margin-top: 5px; }
.toc-thumb {
  width: 76px; height: 57px; border-radius: 9px; overflow: hidden; flex: 0 0 auto;
  background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--hair);
}
.toc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
@media (hover: hover) {
  a.toc-row:hover .toc-title { color: var(--accent-ink); }
  a.toc-row:hover .toc-thumb img { transform: scale(1.04); }
}
.toc-more { padding: 14px 0 0; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
/* 补遗：目录收尾一行，上方粗线与各卷隔开 */
.toc-extra { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 13px 0; border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--hair); transition: opacity .12s; }
.toc-extra:active { opacity: .62; }
.toc-extra.is-locked .toc-title { color: var(--ink-2); }
@media (hover: hover) { .toc-extra:hover .toc-title { color: var(--accent-ink); } }
.toc-extra .chev { width: 18px; height: 18px; color: var(--ink-3); opacity: .6; flex: 0 0 auto; }
.toc-more::before { content: ""; width: 14px; height: 1px; background: var(--hair-strong); }
.state { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); }
.state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hair-strong); }
.state.read::before { background: var(--accent); }
.state.done { color: var(--ok); }
.state.done::before { background: var(--ok); }
.state.soon::before { background: transparent; box-shadow: inset 0 0 0 1px var(--hair-strong); }

.foot-note { margin: 44px 0 12px; text-align: center; font-size: 12px; color: var(--ink-3); }

/* ---------- 故事详情 ---------- */
.cover { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); position: relative; }
@media (min-width: 720px) { .cover { aspect-ratio: 16 / 9; border-radius: 0 0 var(--r-lg) var(--r-lg); } }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-switch { position: absolute; right: 12px; bottom: 12px; }
.cover-switch .seg { background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cover-switch .seg button { height: 26px; padding: 0 10px; font-size: 12px; }

.story-head { padding: 22px 0 6px; }
.story-title { font-size: 36px; margin: 12px 0 8px; }
.story-zh { font-family: var(--serif-zh); font-size: 17px; color: var(--ink-2); }
.story-summary { margin: 14px 0 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.story-head .meta { margin-top: 14px; }

.tabs {
  position: sticky; top: calc(var(--nav-h) + var(--safe-t)); z-index: 30; height: var(--tabs-h);
  display: flex; gap: 26px; margin-top: 22px;
  background: rgba(248, 246, 241, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--hair);
}
.tab { position: relative; height: 100%; font-size: 15px; font-weight: 600; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.tab small { font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tab.active { color: var(--ink); }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); transform: scaleX(0); transition: transform .25s var(--ease); }
.tab.active::after { transform: scaleX(1); }
.panel { padding-top: 26px; animation: fade-in .25s var(--ease); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 阅读器工具行 */
.reader-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.reader-hint { font-size: 12.5px; color: var(--ink-3); }

/* 正文 */
.prose { font-family: var(--serif); font-size: var(--prose-size); line-height: 1.78; color: var(--ink); letter-spacing: 0.002em; }
.prose.lg { --prose-size: 21px; }
.prose p { margin: 0 0 1.05em; hyphens: manual; }
.prose .w { cursor: pointer; border-radius: 4px; padding: 0.03em 0.12em; margin: 0 -0.12em; transition: background .15s, color .15s; -webkit-tap-highlight-color: transparent; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.prose .w.is-saved { background: var(--saved-bg); }
.prose .w.is-open { background: rgba(47, 75, 211, 0.18); color: var(--accent-ink); }
@media (hover: hover) { .prose .w:hover { background: var(--saved-bg); } }
.s-play { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 0 4px 0 0; vertical-align: 0.06em; border-radius: 50%; color: var(--ink-3); background: transparent; box-shadow: inset 0 0 0 1px var(--hair-strong); transition: color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
/* 四周 6px 透明热区：手指好按，不误点到相邻词 */
.s-play::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.s-play .ui-ico { width: 12px; height: 12px; }
/* 正文句前播放键放大到 28px（热区约 40px） */
.prose .s-play { width: 28px; height: 28px; margin: 0 6px 0 2px; vertical-align: middle; }
.prose .s-play .ui-ico { width: 14px; height: 14px; }
.s-play.is-active { color: #fff; background: var(--accent); box-shadow: none; }
@media (hover: hover) { .s-play:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); } }
.prose .s { border-radius: 4px; padding: 0.06em 0; transition: background .25s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.prose .s.is-active { background: var(--mark); box-shadow: 0 0 0 3px var(--mark); }
.kw { font-weight: 600; cursor: pointer; ruby-position: over; ruby-align: center; }
.kw-b { border-radius: 4px; padding: 0.03em 0.12em; margin: 0 -0.12em; text-decoration: underline; text-decoration-skip-ink: none; text-decoration-color: rgba(47, 75, 211, 0.45); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color .15s, background .15s, text-decoration-color .15s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.kw.is-saved .kw-b { background: var(--saved-bg); }
.kw.is-open .kw-b { background: rgba(47, 75, 211, 0.18); color: var(--accent-ink); text-decoration-color: var(--accent); }
@media (hover: hover) { .kw:hover .kw-b { color: var(--accent-ink); text-decoration-color: var(--accent); } }
.kw rt { ruby-align: center; font-family: var(--sans); font-size: 10.5px; font-weight: 600; color: var(--accent); letter-spacing: 0; line-height: 1.2; }
.prose:not(.gloss) .kw rt { display: none; }
.prose.gloss { line-height: 2.3; }
.para-zh { display: none; margin: -0.5em 0 1.3em; font-family: var(--sans); font-size: calc(var(--prose-size) - 2.5px); line-height: 1.7; color: var(--ink-2); }
.prose.zh-para .para-zh { display: block; }
.reader-end { margin: 34px 0 10px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); text-align: center; }
.reader-end h3 { margin: 6px 0 4px; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.reader-end p { margin: 0 0 16px; font-size: 14px; color: var(--ink-2); }

/* 浮动播放器：液态玻璃通透质感（参照 HearSlow 移动底栏）——中心几乎全透、只靠背景模糊与提亮显形，
   边缘轻微压暗模拟玻璃厚边，左上/右下两道高光描边。不支持 backdrop-filter 的内核退回实底。 */
.player {
  position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); z-index: 45;
  transform: translateX(-50%); width: min(calc(100% - 2 * var(--pad)), 420px);
  display: flex; align-items: center; gap: 12px; padding: 7px;
  border-radius: var(--r-pill); isolation: isolate; overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(8px) saturate(190%) brightness(1.05);
  backdrop-filter: blur(8px) saturate(190%) brightness(1.05);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.06),
    inset 0 0 0 0.5px rgba(0, 0, 0, 0.07), inset 0 0 14px rgba(0, 0, 0, 0.05);
  transition: transform .3s var(--ease), opacity .2s;
}
.player::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 140% at 50% 50%, transparent 62%, rgba(0, 0, 0, 0.05) 100%);
}
.player::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.18) 26%, rgba(255, 255, 255, 0.04) 50%, rgba(255, 255, 255, 0.18) 74%, rgba(255, 255, 255, 0.72));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .player { background: rgba(255, 255, 255, 0.94); }
}
.player.hidden { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.player-play { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; transition: transform .12s var(--ease); }
.player-play:active { transform: scale(0.92); }
.player-play .ui-ico { width: 22px; height: 22px; }
.player-info { flex: 1; min-width: 0; }
.player-label { font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.player-label b { font-weight: inherit; white-space: nowrap; }
.player-label b:empty { display: none; }
.player-label span { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.player .bar { margin-top: 6px; height: 3px; background: rgba(23, 24, 28, 0.10); }
.player-chip { height: 34px; padding: 0 10px; border-radius: var(--r-pill); background: rgba(23, 24, 28, 0.06); color: var(--ink); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.player-chip[hidden] { display: none; }
.player-rate { min-width: 52px; }
.player-step.is-on { background: var(--accent); color: #fff; }
.player-chip + .player-chip { margin-left: -6px; }
/* 手动滚走后的「回到朗读处」：贴在播放器上方（播放器高 60px） */
.follow-pill {
  position: fixed; left: 50%; bottom: calc(16px + var(--safe-b) + 70px); z-index: 44; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px 0 11px;
  border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}
.follow-pill[hidden] { display: none; }
.follow-pill .ui-ico { width: 16px; height: 16px; transform: rotate(90deg); }
.follow-pill.is-up .ui-ico { transform: rotate(-90deg); }

/* 单词面板 */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool { text-align: left; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); transition: transform .12s var(--ease); }
.tool:active { transform: scale(0.98); }
.tool .ui-ico { width: 24px; height: 24px; color: var(--accent); }
.tool b { display: block; margin-top: 12px; font-size: 15.5px; }
.tool span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.section-label { display: flex; justify-content: space-between; align-items: baseline; margin: 30px 0 4px; }
.wlist { border-top: 1px solid var(--hair); }
.wrow { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); }
.wrow-no { width: 22px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.wrow-main { min-width: 0; flex: 0 0 38%; }
.wrow-word { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 6px; }
.wrow-ph { font-size: 12.5px; color: var(--ink-3); }
.wrow-mean { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-2); }
.wrow-mean i { font-style: italic; color: var(--ink-3); margin-right: 4px; font-family: var(--serif); }
.wrow .chev { color: var(--ink-3); opacity: .6; }

/* 练习入口 */
.practice-card { padding: 26px 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.practice-card h3 { margin: 10px 0 6px; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.practice-card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.practice-card .btn { margin-top: 20px; }
.practice-last { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-3); }
.practice-last b { color: var(--ink); font-variant-numeric: tabular-nums; }
.practice-card + .practice-card { margin-top: 14px; }

/* ---------- 底部抽屉（词卡） ---------- */
.sheet-mask { position: fixed; inset: 0; z-index: 80; background: rgba(15, 16, 20, 0.36); opacity: 0; transition: opacity .25s; }
.sheet-mask.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; max-width: var(--col); margin: 0 auto;
  max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-float);
  padding: 10px var(--pad) calc(20px + var(--safe-b));
  transform: translateY(100%); transition: transform .32s var(--ease);
}
.sheet.open { transform: none; }
.sheet-grip { width: 36px; height: 5px; border-radius: 3px; background: var(--hair-strong); margin: 0 auto 14px; }
@media (min-width: 720px) {
  .sheet { top: 50%; bottom: auto; left: 50%; right: auto; width: 500px; border-radius: 24px; padding-bottom: 24px; transform: translate(-50%, -46%); opacity: 0; transition: transform .25s var(--ease), opacity .2s; }
  .sheet.open { transform: translate(-50%, -50%); opacity: 1; }
  .sheet-grip { display: none; }
}

.wc-nav { display: flex; align-items: center; justify-content: space-between; margin: -4px -8px 6px; }
.wc-nav span { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.wc-top { display: flex; align-items: flex-end; gap: 12px; }
.wc-word { font-family: var(--serif); font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.wc-meta { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); }
.wc-pos { font-family: var(--serif); font-style: italic; color: var(--ink-3); }
.wc-top .spacer { flex: 1; }
.wc-sense { margin-top: 22px; padding-left: 14px; border-left: 3px solid var(--accent); }
.wc-sense-zh { margin-top: 4px; font-size: 22px; font-weight: 700; letter-spacing: 0.01em; }
.wc-example { margin-top: 8px; font-family: var(--serif); font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.wc-example b { color: var(--ink); font-weight: 700; }
.wc-example-zh { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.wc-sec { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hair); }
.wc-sec .eyebrow { margin-bottom: 8px; }
.wc-senses { margin: 0; padding-left: 1.3em; font-size: 15px; line-height: 1.7; }
.wc-forms { font-size: 15px; line-height: 1.7; color: var(--ink); }
.wc-forms .sep { color: var(--ink-3); margin: 0 8px; }
.wc-coll { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; padding: 3px 0; }
.wc-coll b { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.wc-coll span { font-size: 14px; color: var(--ink-3); }
.wc-tip { margin-top: 20px; padding: 13px 14px; border-radius: var(--r-md); background: var(--tip-bg); color: var(--tip-ink); font-size: 14px; line-height: 1.6; }
.wc-tip b { display: block; font-size: 11.5px; letter-spacing: 0.12em; margin-bottom: 3px; }
.wc-actions { margin-top: 22px; }
.gl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.gl-tag { font-size: 11.5px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); }
.gl-tag.beyond { background: var(--tip-bg); color: var(--tip-ink); }
.gl-tag.proper { background: var(--hair); color: var(--ink-2); }
.gl-lemma { font-size: 13px; color: var(--ink-3); }
.gl-lemma b { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--ink); }
.btn.is-saved { color: var(--accent-ink); box-shadow: inset 0 0 0 1px rgba(47, 75, 211, .3); background: var(--accent-soft); }
.saved-ico { width: 13px; height: 13px; color: var(--accent); }

/* ---------- PWA 安装引导抽屉 ---------- */
.pwa-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pwa-head-main { min-width: 0; }
.pwa-head .round-btn { margin: -6px -8px 0 0; color: var(--ink-3); }
.pwa-title { margin: 4px 0 0; font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.pwa-app {
  margin-top: 16px; display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--r-md); background: var(--paper);
}
.pwa-app-ico {
  width: 44px; height: 44px; border-radius: 11px; flex: 0 0 auto;
  box-shadow: var(--shadow-1);
}
.pwa-app-meta { min-width: 0; }
.pwa-app-name { font-family: var(--serif-zh); font-size: 18px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.25; }
.pwa-app-sub { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.pwa-lead { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.pwa-native { margin-top: 14px; }
.pwa-steps { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.pwa-steps li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--hair);
  font-size: 14px; color: var(--ink-2); line-height: 1.6;
}
.pwa-step-no {
  font-family: var(--serif); font-size: 15px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; flex: 0 0 auto; line-height: 1.5;
}
.pwa-step-text { flex: 1; min-width: 0; }
.pwa-step-text b { color: var(--ink); font-weight: 600; }
.pwa-inline-ico {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: -2px;
  width: 19px; height: 19px; border-radius: 5px; background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--accent); margin: 0 2px;
}
.pwa-copy { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pwa-copy-msg { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.pwa-tip { margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }

/* ---------- 生词本 / 扇贝式背单词 ---------- */
.vrow { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--hair); }
.vrow-main { flex: 1; min-width: 0; text-align: left; display: flex; align-items: center; gap: 12px; padding: 13px 0; }
.vrow-mean { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity .16s, filter .16s; }
.vrow-mean i { font-style: italic; color: var(--ink-3); margin-right: 4px; font-family: var(--serif); }
.wlist.mask-mean .vrow-mean { opacity: 0; filter: blur(6px); }
.vrow-audio { color: var(--accent); margin-right: -8px; }
.rv-bar { flex: 1; height: 4px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.rv-bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 4px; transition: width .3s var(--ease); }
.rv-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0 24px; }
.rv-hero { width: 100%; text-align: center; padding: 24px 12px; border-radius: var(--r-lg); transition: transform .12s var(--ease), background .15s; }
.rv-hero:active { transform: scale(0.98); background: var(--paper-2); }
.rv-hero .eyebrow { justify-content: center; }
.rv-retry { color: var(--accent-ink); }
.rv-word { margin-top: 14px; font-family: var(--serif); font-size: 44px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; word-break: break-word; }
.rv-ph { margin-top: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15.5px; color: var(--ink-2); }
.rv-vol { width: 18px; height: 18px; color: var(--accent); }
.rv-hint-slot:not(:empty) { margin-top: 20px; animation: rv-in .24s var(--ease); }
.rv-ctx { margin-top: 20px; padding: 15px 16px 15px 17px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-1); border-left: 3px solid var(--accent); }
.rv-hint-slot .rv-ctx { margin-top: 0; }
.rv-ctx-en { margin: 8px 0 0; font-family: var(--serif); font-size: 18px; line-height: 1.65; color: var(--ink); }
.rv-ctx-en b { color: var(--accent-ink); font-weight: 700; }
.rv-zh { margin: 8px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.rv-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: var(--r-pill); align-self: flex-start; }
.rv-status .ui-ico { width: 15px; height: 15px; }
.rv-status.ok { background: var(--ok-soft); color: var(--ok); }
.rv-status.again { background: var(--paper-2); color: var(--ink-2); }
.rv-detail-word { font-family: var(--serif); font-size: 36px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
@keyframes rv-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 全屏层（练习 / 听写） ---------- */
.layer {
  position: fixed; inset: 0; z-index: 70; background: var(--paper);
  display: flex; flex-direction: column;
  animation: layer-in .32s var(--ease);
}
.layer.closing { animation: layer-out .22s ease-in forwards; }
@keyframes layer-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes layer-out { to { transform: translateY(24px); opacity: 0; } }
.layer-inner { width: 100%; max-width: var(--col); margin: 0 auto; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.layer-top { display: flex; align-items: center; gap: 12px; padding: calc(8px + var(--safe-t)) calc(var(--pad) - 10px) 8px; height: calc(var(--nav-h) + var(--safe-t)); flex: 0 0 auto; }
.layer-top .steps { flex: 1; }
.layer-count { font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; padding-right: 10px; }
.steps { display: flex; gap: 4px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--paper-2); transition: background .3s; }
.steps i.ok { background: var(--ok); }
.steps i.bad { background: var(--bad); }
.steps i.cur { background: var(--ink); }
.layer-body { flex: 1; overflow-y: auto; padding: 18px var(--pad) 24px; display: flex; flex-direction: column; }
.layer-foot { padding: 12px var(--pad) calc(16px + var(--safe-b)); flex: 0 0 auto; }

/* 填空题 */
.q-kicker { display: flex; justify-content: space-between; align-items: center; }
.q-sent { margin: 26px 0 0; font-family: var(--serif); font-size: 25px; line-height: 1.6; letter-spacing: -0.005em; }
.q-blank {
  display: inline-block; min-width: 3em; padding: 0 4px; margin: 0 2px;
  border: 0; border-bottom: 2.5px solid var(--ink); border-radius: 0; background: transparent;
  font-family: var(--serif); font-size: inherit; font-weight: 600; color: var(--accent-ink);
  line-height: 1.25; outline: none; vertical-align: baseline; text-align: center;
}
.q-blank::placeholder { color: var(--ink-3); font-weight: 500; }
.q-blank:focus { border-bottom-color: var(--accent); }
.q-blank.ok { color: var(--ok); border-bottom-color: var(--ok); }
.q-blank.bad { color: var(--bad); border-bottom-color: var(--bad); text-decoration: line-through; }
.q-hint { margin-top: 20px; display: flex; gap: 10px; align-items: baseline; font-size: 15px; color: var(--ink-2); }
.q-hint b { font-size: 11.5px; letter-spacing: .12em; color: var(--ink-3); flex: 0 0 auto; }
.q-opts { margin-top: 28px; display: grid; gap: 10px; }
.q-opt {
  height: 56px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair-strong);
  font-family: var(--serif); font-size: 20px; font-weight: 600; transition: transform .12s var(--ease), background .2s, box-shadow .2s, opacity .2s;
}
.q-opt:active { transform: scale(0.98); }
.q-opt.ok { background: var(--ok-soft); box-shadow: inset 0 0 0 2px var(--ok); color: var(--ok); }
.q-opt.bad { background: var(--bad-soft); box-shadow: inset 0 0 0 2px var(--bad); color: var(--bad); }
.q-opt.dim { opacity: .4; }
.q-actions { margin-top: 28px; }
.shake { animation: shake .36s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* 判定条 */
.verdict {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
  padding: 18px var(--pad) calc(18px + var(--safe-b));
  transform: translateY(105%); transition: transform .3s var(--ease);
}
.verdict.show { transform: none; }
.verdict.ok { background: var(--ok-soft); }
.verdict.bad { background: var(--bad-soft); }
.verdict-inner { max-width: calc(var(--col) - 2 * var(--pad)); margin: 0 auto; }
.verdict-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; }
.verdict.ok .verdict-title { color: var(--ok); }
.verdict.bad .verdict-title { color: var(--bad); }
.verdict-title .mark { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.verdict.ok .mark { background: var(--ok); }
.verdict.bad .mark { background: var(--bad); }
.verdict-answer { margin-top: 8px; font-size: 15px; color: var(--ink); }
.verdict-answer b { font-family: var(--serif); font-size: 18px; }
.verdict-text { margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.verdict .btn { margin-top: 16px; }
.verdict.ok .btn { background: var(--ok); color: #fff; box-shadow: none; }
.verdict.bad .btn { background: var(--bad); color: #fff; box-shadow: none; }

/* 成绩页 */
.result { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 0; }
.result-score { font-family: var(--serif); font-size: 84px; font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: lining-nums; }
.result-score small { font-size: 34px; color: var(--ink-3); font-weight: 500; }
.result h2 { margin: 14px 0 4px; font-size: 21px; }
.result p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.result-list { width: 100%; margin-top: 26px; text-align: left; border-top: 1px solid var(--hair); }

/* 听写 */
.opt-cards { display: grid; gap: 10px; margin-top: 18px; }
.opt-card {
  text-align: left; display: flex; gap: 14px; align-items: center; padding: 15px 16px;
  border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1px var(--hair);
  transition: box-shadow .15s, background .15s;
}
.opt-card .ui-ico { width: 24px; height: 24px; color: var(--ink-3); }
.opt-card b { display: block; font-size: 15.5px; }
.opt-card span { display: block; font-size: 13px; color: var(--ink-3); }
.opt-card.active { box-shadow: inset 0 0 0 2px var(--ink); }
.opt-card.active .ui-ico { color: var(--accent); }
.field { margin-top: 26px; }
.field > .eyebrow { margin-bottom: 10px; }
.dict-title { font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 8px 0 4px; letter-spacing: -0.01em; }
.dict-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; }
.ring { position: relative; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
/* 只作用于倒计时圆环本身（直接子 svg），不能波及圆心里的图标 */
.ring > svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring > svg circle { fill: none; stroke-width: 4; }
.ring .track { stroke: var(--paper-2); }
.ring .prog { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset linear; }
.ring-content { position: relative; padding: 0 22px; }
.dict-word { font-family: var(--serif); font-size: 38px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.dict-zh { font-size: 26px; font-weight: 700; line-height: 1.3; }
.dict-sub { font-size: 14px; color: var(--ink-3); margin-top: 6px; }
.listen-ico { display: block; margin: 0 auto; width: 64px; height: 64px; color: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.08); opacity: .7; } }
.dict-count { font-size: 13px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.review-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.review-row .wrow-main { flex: 1; }
.review-row .toggle {
  height: 32px; padding: 0 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--hair-strong); color: var(--ink-2); flex: 0 0 auto; transition: all .15s;
}
.review-row.marked .toggle { background: var(--bad); color: #fff; box-shadow: none; }
.review-row.marked .wrow-word { color: var(--bad); }

/* ---------- 速查表 / 生词本 ---------- */
.page-head { padding: 14px 0 20px; }
.page-head h1 { font-size: 32px; margin-top: 8px; }
.page-head p { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.search {
  width: 100%; height: 46px; padding: 0 16px 0 42px; border: 0; border-radius: var(--r-md);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238A867E' stroke-width='1.8' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E") 14px 50% no-repeat;
  box-shadow: var(--shadow-1); outline: none; font-size: 15px;
}
.search:focus { box-shadow: 0 0 0 2px var(--accent); }
.alpha { position: sticky; top: calc(var(--nav-h) + var(--safe-t)); z-index: 5; padding: 18px 0 6px; background: var(--paper); font-family: var(--serif); font-size: 20px; font-weight: 600; border-bottom: 1.5px solid var(--ink); }
.alpha-count { margin-left: 8px; font-family: var(--sans); font-size: 12.5px; font-weight: 400; color: var(--ink-3); }
.supp-actions { margin-bottom: 4px; }
.empty { margin-top: 40px; text-align: center; color: var(--ink-3); font-size: 14.5px; line-height: 1.8; }
.empty .ui-ico { width: 34px; height: 34px; margin-bottom: 8px; }

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed; left: 50%; top: calc(12px + var(--safe-t)); z-index: 95;
  transform: translate(-50%, -12px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  padding: 10px 18px; border-radius: var(--r-pill); box-shadow: var(--shadow-float);
  transition: opacity .2s, transform .25s var(--ease); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading { padding: 80px 0; text-align: center; color: var(--ink-3); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 打印 A4 默写单 ---------- */
.ps-seg-wrap { flex: 1; display: flex; justify-content: center; }
.ps-preview-body { align-items: center; gap: 14px; padding-top: 8px; }
.ps-paper {
  width: 100%; max-width: 520px; background: #fff; border-radius: var(--r-md);
  box-shadow: var(--shadow-1), inset 0 0 0 1px var(--hair); overflow: hidden;
}
.ps-img { width: 100%; height: auto; display: block; -webkit-touch-callout: default; }
.ps-hint { margin: 0; max-width: 520px; font-size: 12.5px; color: var(--ink-3); text-align: center; line-height: 1.6; }
.print-root { display: none; }
@media print {
  @page { size: A4; margin: 14mm 15mm 12mm; }
  html, body { background: #fff !important; }
  body > *:not(.print-root) { display: none !important; }
  .print-root { display: block !important; color: #000; font-family: var(--sans); font-size: 10.5pt; }
  .ps-sheet { break-after: page; }
  .ps-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 3mm; border-bottom: 1.2pt solid #000; }
  .ps-kicker { font-size: 8pt; letter-spacing: .14em; text-transform: uppercase; color: #666; }
  .ps-head h1 { margin: 1mm 0 0; font-family: var(--serif); font-size: 18pt; font-weight: 600; }
  .ps-head .ps-sub { font-size: 9pt; color: #555; margin-top: 1mm; }
  .ps-head .ps-brand { font-family: var(--serif); font-size: 11pt; font-weight: 700; }
  .ps-fill { display: flex; gap: 10mm; font-size: 10pt; margin: 4mm 0 3mm; }
  .ps-fill span { flex: 1; border-bottom: 0.5pt solid #999; padding-bottom: 1mm; }
  .ps-table { width: 100%; border-collapse: collapse; }
  .ps-table th { font-size: 8pt; letter-spacing: .1em; color: #666; text-align: left; font-weight: 600; padding: 0 2mm 1.5mm; border-bottom: 0.8pt solid #000; }
  .ps-table td { height: 7.5mm; padding: 0 2mm 1.2mm; border-bottom: 0.4pt solid #bbb; vertical-align: bottom; }
  .ps-table .no { width: 8mm; color: #777; font-size: 8.5pt; }
  .ps-table .zh { width: 60mm; }
  .ps-table .pos { width: 12mm; font-family: var(--serif); font-style: italic; color: #444; }
  .ps-table .ph { width: 32mm; color: #555; font-size: 9.5pt; }
  .ps-table tr { break-inside: avoid; }
  .ps-answers h2 { margin: 0 0 4mm; padding-bottom: 2mm; border-bottom: 1pt solid #000; font-family: var(--serif); font-size: 14pt; font-weight: 600; }
  .ps-answer-grid { columns: 3; column-gap: 6mm; font-size: 9.5pt; }
  .ps-answer-grid div { break-inside: avoid; padding: 0.9mm 0; }
  .ps-answer-grid b { font-family: var(--serif); font-size: 10.5pt; }
  .ps-foot { margin-top: 5mm; font-size: 8pt; color: #777; text-align: right; }
}

/* ---------- 兑换解锁 / 支付 / 客服（Editorial v2） ---------- */
.state.free { color: var(--accent-ink); font-weight: 600; }
.state.locked { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); }
.state.locked .ui-ico { width: 12px; height: 12px; }
.toc-row.is-locked .toc-title { color: var(--ink-2); }
.toc-row.is-locked .toc-thumb img { opacity: .82; }

.ac-sheet { padding-bottom: 4px; }
.ac-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ac-head-main { min-width: 0; }
.ac-title { margin: 5px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.ac-desc { margin: 12px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.ac-lead { margin: 6px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.ac-tip { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }
.ac-tip b { color: var(--ink); }

.ac-preview {
  margin-top: 14px; padding: 10px 12px; border-radius: var(--r-md); background: var(--paper);
  display: flex; align-items: center; gap: 12px;
}
.ac-preview-img { width: 64px; height: 48px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; background: var(--paper-2); }
.ac-preview-body { min-width: 0; flex: 1; }
.ac-preview-en { margin-top: 2px; font-family: var(--serif); font-size: 16px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-preview-zh { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ac-guide {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--tip-bg); color: var(--tip-ink);
}
.ac-guide-head { font-size: 13px; font-weight: 700; }
.ac-guide-text { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; }
.ac-guide-actions { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ac-copy-msg { font-size: 12px; font-weight: 600; color: var(--accent-ink); }

.ac-redeem-form { margin-top: 14px; display: flex; gap: 8px; }
.ac-code-input {
  flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: var(--r-md);
  border: 0; background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  outline: none;
}
.ac-code-input:focus { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.ac-redeem-form .btn { flex: 0 0 auto; padding: 0 20px; }

.ac-msg { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); min-height: 20px; line-height: 1.55; }
.ac-msg:empty { min-height: 0; margin-top: 0; }
.ac-msg.ok { color: var(--ok); font-weight: 600; }
.ac-msg.err { color: var(--bad); font-weight: 600; }

.ac-price-row { margin-top: 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ac-price { font-family: var(--serif); font-size: 36px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ac-price-note { font-size: 13px; color: var(--ink-3); }

.ac-features { list-style: none; margin: 14px 0 16px; padding: 0; display: grid; gap: 9px; }
.ac-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.ac-features .ui-ico { width: 16px; height: 16px; color: var(--ok); margin-top: 3px; }
.ac-features b { color: var(--ink); }

.ac-order-box {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--paper); display: grid; gap: 10px;
}
.ac-order-box[hidden] { display: none; }
.ac-order-line { font-size: 13px; font-weight: 600; color: var(--ink); }

.ac-code-box {
  margin-top: 10px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--hair-strong);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ac-code-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink);
  user-select: all; -webkit-user-select: all;
}

.ac-devices { margin-top: 14px; border-top: 1px solid var(--hair); }
.ac-device-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--hair);
}
.ac-device-info { min-width: 0; }
.ac-device-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ac-badge-cur {
  font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-ink);
}
.ac-device-seen { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.ac-switch-bar {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--ink-2);
}
.ac-foot-links { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair); display: flex; justify-content: center; }

.ac-seg-wrap { margin-top: 14px; }
.ac-qr-slot { margin-top: 14px; }
.ac-qr-card {
  padding: 16px; border-radius: var(--r-md); background: var(--paper);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px;
}
.ac-qr-img { width: 200px; height: 200px; object-fit: contain; border-radius: var(--r-sm); background: #fff; padding: 6px; box-shadow: var(--shadow-1); }
.ac-qr-id-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.ac-qr-id-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ac-qr-tip { margin: 0; font-size: 12.5px; color: var(--ink-3); }

/* 受保护篇目锁屏预览页 */
.locked-cover img { filter: saturate(0.92); }
.locked-card {
  margin-top: 22px; padding: 22px 20px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-1);
}
.locked-card .eyebrow .ui-ico { width: 13px; height: 13px; }
.locked-card h2 { margin: 8px 0 6px; font-size: 21px; line-height: 1.3; }
.locked-card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.locked-actions { margin-top: 18px; display: grid; gap: 10px; }
.locked-links {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* /buy 与 /payment/result 独立页面 */
.pay-card {
  padding: 22px 20px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-1);
}
.pay-heading { margin: 8px 0 0; font-size: 26px; font-weight: 700; line-height: 1.25; }
.pay-actions { margin-top: 16px; display: grid; gap: 10px; }
.pay-order-meta { margin-bottom: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--paper); display: grid; gap: 8px; }
.pay-order-meta[hidden], .pay-granted[hidden] { display: none; }
.pay-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; }
.pay-kv > span:first-child { color: var(--ink-3); flex: 0 0 auto; }
.pay-kv code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-all; text-align: right; }
.pay-granted { margin-bottom: 14px; }
