/* ==========================================================================
   商务英语精读与听说 · 设计系统
   Design tokens → base → layout → components → utilities
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
  /* brand — 沿用讲义模板的深蓝体系 */
  --c-ink-900: #0e1f30;
  --c-ink-800: #16324c;
  --c-ink-700: #1e3a5f;   /* 讲义主色 */
  --c-ink-600: #27507a;
  --c-ink-500: #2e6a93;
  --c-ink-400: #5b8bab;
  --c-ink-300: #93b5cb;
  --c-ink-200: #c6d8e5;
  --c-ink-100: #e5eef5;
  --c-ink-50:  #f2f7fb;

  --c-gold-600: #9a6f2c;
  --c-gold-500: #b8863b;
  --c-gold-200: #ecd9b6;
  --c-gold-100: #f7eeda;

  --c-ok-600: #17694c;
  --c-ok-500: #1b7a5a;
  --c-ok-100: #e2f2ec;
  --c-bad-600: #9c3a32;
  --c-bad-500: #b4453c;
  --c-bad-100: #fbe9e7;

  /* neutrals */
  --c-ink:      #101a26;
  --c-body:     #33465c;
  --c-muted:    #64748b;   /* 讲义辅助色 */
  --c-faint:    #8b9aad;
  --c-line:     #dfe7ee;
  --c-line-2:   #eef2f6;
  --c-paper:    #ffffff;
  --c-canvas:   #f5f8fa;
  --c-canvas-2: #eaf1f6;
  --c-scrim:    rgba(14, 31, 48, .48);

  /* semantic */
  --bg: var(--c-canvas);
  --surface: var(--c-paper);
  --surface-2: var(--c-ink-50);
  --text: var(--c-body);
  --text-strong: var(--c-ink);
  --text-muted: var(--c-muted);
  --text-faint: var(--c-faint);
  --border: var(--c-line);
  --border-soft: var(--c-line-2);
  --brand: var(--c-ink-700);
  --brand-soft: var(--c-ink-100);

  /* type */
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
             "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-read: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman",
               "Songti SC", "Noto Serif SC", serif;
  --font-num: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* space — 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 28px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

  /* shadow */
  --sh-1: 0 1px 2px rgba(16, 26, 38, .05);
  --sh-2: 0 2px 8px -2px rgba(16, 26, 38, .08), 0 1px 2px rgba(16, 26, 38, .04);
  --sh-3: 0 8px 24px -8px rgba(16, 26, 38, .14), 0 2px 6px -2px rgba(16, 26, 38, .06);
  --sh-4: 0 18px 44px -16px rgba(16, 26, 38, .22);

  /* motion */
  --ease: cubic-bezier(.32, .72, .34, 1);
  --t-fast: 140ms var(--ease);
  --t-base: 240ms var(--ease);

  /* layout */
  --maxw: 1080px;
  --readw: 40rem;
  --header-h: 56px;
}

[data-theme="dark"] {
  --c-ink: #eef4f9;
  --c-body: #c3d2e0;
  --c-muted: #8fa3b8;
  --c-faint: #74899e;
  --c-line: #24384c;
  --c-line-2: #1c2c3d;
  --c-paper: #16232f;
  --c-canvas: #0f1a24;
  --c-canvas-2: #182635;

  --bg: var(--c-canvas);
  --surface: var(--c-paper);
  --surface-2: #1b2a38;
  --text: var(--c-body);
  --text-strong: var(--c-ink);
  --text-muted: var(--c-muted);
  --text-faint: var(--c-faint);
  --border: var(--c-line);
  --border-soft: var(--c-line-2);
  --brand: #7fb0d4;
  --brand-soft: #1d3145;

  --c-ink-100: #1d3145;
  --c-ink-50: #182838;
  --c-gold-100: #33291a;
  --c-ok-100: #14312a;
  --c-bad-100: #3a2320;
  --c-scrim: rgba(4, 10, 16, .62);

  --sh-1: 0 1px 2px rgba(0, 0, 0, .3);
  --sh-2: 0 2px 8px -2px rgba(0, 0, 0, .4);
  --sh-3: 0 10px 28px -10px rgba(0, 0, 0, .55);
  --sh-4: 0 20px 50px -18px rgba(0, 0, 0, .7);
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg, audio { display: block; max-width: 100%; }
svg { flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-ink-400); outline-offset: 2px; border-radius: 4px; }
button:focus:not(:focus-visible) { outline: none; }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-4); }
@media (min-width: 768px) { .wrap { padding: 0 var(--s-6); } }
.stack > * + * { margin-top: var(--s-4); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar__in {
  height: var(--header-h); display: flex; align-items: center; gap: var(--s-3);
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-3);
}
@media (min-width: 768px) { .topbar__in { padding: 0 var(--s-6); } }
.topbar__title {
  flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--text-strong);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar__sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-faint); letter-spacing: .02em; }
.iconbtn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-sm); color: var(--text-muted); transition: background var(--t-fast), color var(--t-fast);
}
.iconbtn:hover { background: var(--surface-2); color: var(--text-strong); }
.iconbtn:active { transform: scale(.94); }
.iconbtn svg { width: 20px; height: 20px; }

/* wordmark */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand__mark {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: linear-gradient(150deg, var(--c-ink-600), var(--c-ink-800));
  color: #fff; display: grid; place-items: center; font: 600 13px/1 var(--font-ui);
  letter-spacing: -.02em; box-shadow: var(--sh-1);
}
.brand__name { font-size: 14.5px; font-weight: 650; color: var(--text-strong); letter-spacing: -.01em; line-height: 1.15; }
.brand__tag { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-faint); letter-spacing: .04em; white-space: nowrap; }
@media (max-width: 700px) { .brand__tag { display: none; } }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(120% 120% at 88% -20%, rgba(46, 106, 147, .55) 0%, transparent 58%),
    radial-gradient(90% 90% at 4% 106%, rgba(184, 134, 59, .28) 0%, transparent 60%),
    linear-gradient(158deg, #16324c 0%, #12293e 52%, #0e1f30 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .28; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 100% at 70% 0%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(120% 100% at 70% 0%, #000 20%, transparent 76%);
}
.hero__in { position: relative; z-index: 1; padding-top: var(--s-10); padding-bottom: var(--s-8); }
@media (min-width: 768px) { .hero__in { padding-top: var(--s-16); padding-bottom: var(--s-12); } }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px;
  border-radius: var(--r-pill); background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  font-size: 11.5px; font-weight: 550; letter-spacing: .06em; color: #dbe8f2;
}
.hero__dot { width: 6px; height: 6px; border-radius: 50%; background: #7ecfa8; box-shadow: 0 0 0 3px rgba(126,207,168,.22); }
.hero h1 {
  margin-top: var(--s-5); font-size: clamp(28px, 7.2vw, 46px); line-height: 1.12;
  font-weight: 640; letter-spacing: -.025em; color: #fff; max-width: 18ch;
}
.hero h1 em { font-style: normal; color: #a9cde6; }
.hero__en {
  margin-top: var(--s-3); font: 400 13.5px/1.5 var(--font-ui);
  color: #93b5cb; letter-spacing: .01em;
}
.hero__lede {
  margin-top: var(--s-5); max-width: 48ch; font-size: 14.5px; line-height: 1.75; color: #c3d8e6;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.btn:active { transform: scale(.975); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--light { background: #fff; color: #16324c; box-shadow: var(--sh-2); }
.btn--light:hover { background: #f0f6fa; }
.btn--ghost { border: 1px solid rgba(255,255,255,.26); color: #e4eef6; }
.btn--ghost:hover { background: rgba(255,255,255,.09); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { filter: brightness(1.07); }
.btn--outline { border: 1px solid var(--border); color: var(--text-strong); background: var(--surface); }
.btn--outline:hover { border-color: var(--c-ink-300); background: var(--surface-2); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn--block { width: 100%; }

.hero__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3);
  margin-top: var(--s-8); padding-top: var(--s-6);
  border-top: 1px solid rgba(255,255,255,.13);
}
.hero__stat b { display: block; font-size: 22px; font-weight: 640; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero__stat span { display: block; margin-top: 2px; font-size: 11.5px; color: #93b5cb; letter-spacing: .03em; }

/* ---------------------------------------------------------------- section head */
.shead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.shead h2 { font-size: 18px; font-weight: 650; color: var(--text-strong); letter-spacing: -.015em; }
.shead p { font-size: 13px; color: var(--text-muted); }
.shead__en { font-size: 11px; font-weight: 550; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }

.page { padding: var(--s-8) 0 var(--s-16); }
@media (min-width: 768px) { .page { padding: var(--s-12) 0 var(--s-16); } }

/* ---------------------------------------------------------------- path */
.path { display: grid; gap: var(--s-3); margin-bottom: var(--s-10); }
@media (min-width: 720px) { .path { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .path { grid-template-columns: repeat(6, 1fr); } }
.path__item {
  position: relative; padding: var(--s-4); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--sh-1);
}
.path__n {
  font: 600 11px/1 var(--font-num); letter-spacing: .06em; color: var(--c-ink-500);
  display: inline-flex; align-items: center; gap: 6px;
}
.path__n i { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--c-ink-300); }
.path__t { margin-top: 10px; font-size: 14.5px; font-weight: 620; color: var(--text-strong); }
.path__d { margin-top: 4px; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }

/* ---------------------------------------------------------------- lesson grid */
.grid { display: grid; gap: var(--s-3); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: var(--s-5); min-height: 176px; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
}
.card:hover { box-shadow: var(--sh-3); transform: translateY(-2px); border-color: var(--c-ink-200); }
.card:active { transform: translateY(0) scale(.995); }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.card__no { font: 600 12px/1 var(--font-num); letter-spacing: .04em; color: var(--c-ink-500); }
.card__theme {
  font-size: 11px; font-weight: 550; letter-spacing: .02em; color: var(--c-ink-600);
  background: var(--brand-soft); padding: 4px 9px; border-radius: var(--r-pill); white-space: nowrap;
}
.card__title { font-size: 16.5px; font-weight: 640; line-height: 1.3; color: var(--text-strong); letter-spacing: -.015em; }
.card__zh { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.card__meta {
  display: flex; align-items: center; gap: var(--s-4); margin-top: auto; padding-top: var(--s-3);
  border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--text-faint);
}
.card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.card__meta svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- lesson header */
.lhead { border-bottom: 1px solid var(--border-soft); background: var(--surface); }
.lhead__in { padding-top: var(--s-6); padding-bottom: var(--s-5); }
.lhead__eyebrow { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-3); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 11.5px; font-weight: 550; letter-spacing: .02em;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border-soft);
  flex: none; white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip--brand { background: var(--brand-soft); color: var(--c-ink-600); border-color: transparent; }
.chip--gold { background: var(--c-gold-100); color: var(--c-gold-600); border-color: transparent; }
.lhead h1 { font-size: clamp(22px, 5.6vw, 32px); line-height: 1.2; font-weight: 645; color: var(--text-strong); letter-spacing: -.022em; }
.lhead__zh { margin-top: 6px; font-size: 14.5px; color: var(--text-muted); }
.lhead__obj {
  margin-top: var(--s-4); padding: var(--s-4) var(--s-4) var(--s-4) var(--s-5);
  background: var(--surface-2); border-radius: var(--r-md); border-left: 3px solid var(--c-ink-300);
}
.lhead__obj > summary {
  display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
  font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint);
}
.lhead__obj > summary::-webkit-details-marker { display: none; }
.lhead__obj > summary::after { content: "▾"; font-size: 10px; margin-left: auto; transition: transform var(--t-fast); }
.lhead__obj[open] > summary::after { transform: rotate(180deg); }
.lhead__obj ul { margin-top: 10px; display: grid; gap: 7px; }
.lhead__obj li { position: relative; padding-left: 20px; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.lhead__obj li::before {
  content: ""; position: absolute; left: 3px; top: .55em; width: 7px; height: 7px;
  border-radius: 2px; background: var(--c-ink-300);
}

/* tabs */
.tabs {
  position: sticky; top: var(--header-h); z-index: 50;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.tabs__scroll {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  max-width: var(--maxw); margin: 0 auto; padding: 8px var(--s-3);
}
.tabs__scroll::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .tabs__scroll { padding: 8px var(--s-6); } }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: var(--r-pill); font-size: 13.5px; font-weight: 550; color: var(--text-muted);
  border: 1px solid transparent; transition: all var(--t-fast); white-space: nowrap;
}
.tab:hover { background: var(--surface-2); color: var(--text-strong); }
.tab[aria-selected="true"] { background: var(--brand); color: #fff; box-shadow: var(--sh-2); }
.tab__i { font: 600 11px/1 var(--font-num); opacity: .65; }
.tab[aria-selected="true"] .tab__i { opacity: .8; }
.tab__tick { width: 13px; height: 13px; opacity: 0; }
.tab.is-done .tab__tick { opacity: 1; color: var(--c-ok-500); }
.tab[aria-selected="true"].is-done .tab__tick { color: #9fdcbf; }

/* ---------------------------------------------------------------- content blocks */
.lesson-body { padding: var(--s-6) 0 calc(150px + env(safe-area-inset-bottom)); }
.block + .block { margin-top: var(--s-6); }
.prose { max-width: var(--readw); }
.prose p { font-size: 15.5px; line-height: 1.78; color: var(--text); }
.prose p + p { margin-top: var(--s-4); }

.instr {
  display: flex; gap: 10px; align-items: flex-start;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--border-soft);
  font-size: 13.5px; line-height: 1.6; color: var(--text-muted);
}
.instr svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--c-ink-400); }

.h-block { display: flex; align-items: center; gap: 10px; margin: var(--s-8) 0 var(--s-4); }
.h-block:first-child { margin-top: 0; }
.h-block__bar { width: 3px; height: 16px; border-radius: 2px; background: var(--c-gold-500); flex: none; }
.h-block svg { width: 15px; height: 15px; }
.h-block h3 { font-size: 15.5px; font-weight: 640; color: var(--text-strong); letter-spacing: -.01em; }
.h-block--soft { margin: var(--s-6) 0 var(--s-3); }
.h-block--soft h3 { font-size: 14.5px; color: var(--c-ink-600); }
.h-block--soft .h-block__bar { background: var(--c-ink-300); }

.article {
  padding: var(--s-5) var(--s-4) var(--s-6); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--sh-1);
}
@media (min-width: 640px) { .article { padding: var(--s-8) 52px var(--s-8) var(--s-8); } }
.article__head { padding-bottom: var(--s-4); border-bottom: 1px solid var(--border-soft); margin-bottom: var(--s-5); }
.article__kicker { font: 600 10.5px/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--c-gold-600); }
.article__title { margin-top: 8px; font: 600 20px/1.28 var(--font-read); color: var(--text-strong); letter-spacing: -.01em; }
@media (min-width: 640px) { .article__title { font-size: 24px; } }
.article__body { max-width: var(--readw); }
.article__body p {
  font: 400 16.5px/1.86 var(--font-read); color: var(--text);
  letter-spacing: .002em;
}
.article__body p + p { margin-top: var(--s-5); }
.article__h {
  margin: var(--s-6) 0 var(--s-3); font: 650 11.5px/1 var(--font-ui);
  letter-spacing: .1em; text-transform: uppercase; color: var(--c-ink-500);
}
.word { border-radius: 3px; transition: background var(--t-fast); cursor: pointer; padding: 0 1px; }
.word:hover { background: var(--c-gold-100); }
.word.is-picked { background: var(--c-gold-200); }
.pgh { position: relative; }
.pgh__tools {
  position: absolute; right: -42px; top: 3px; display: flex; gap: 2px;
  opacity: 0; transition: opacity var(--t-fast);
}
.pgh:hover .pgh__tools, .pgh:focus-within .pgh__tools { opacity: 1; }
@media (max-width: 860px) {
  .pgh__tools { position: static; justify-content: flex-end; margin-top: 6px; opacity: 1; }
  .pgh__tools .mini { width: 30px; height: 30px; }
}
@media (hover: none) { .pgh:hover .pgh__tools { opacity: 1; } .pgh__tools { opacity: .45; } }
/* 段落喇叭的静态版。它挂在 .block.prose 下面，不在 .pgh 里，
   所以拿不到 .pgh 的定位上下文。少了这条规则，它会退回基类的
   position:absolute + right:-42px，相对视口向右跑 42px，在宽屏上撑出横向滚动条。 */
.pgh__tools--static {
  position: static;
  justify-content: flex-end;
  margin-top: 6px;
  opacity: 1;
}
.pgh__tools--static .mini { width: 30px; height: 30px; }
@media (hover: hover) {
  .pgh__tools--static { opacity: .4; transition: opacity var(--t-fast); }
  .block.prose:hover .pgh__tools--static,
  .pgh__tools--static:focus-within { opacity: 1; }
}
.article__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mini {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: var(--text-faint); background: var(--surface);
}
.mini:hover { color: var(--c-ink-600); background: var(--c-ink-100); }
.mini svg { width: 15px; height: 15px; }
.mini.is-on { color: var(--c-ink-600); background: var(--c-ink-100); }
/* 正在播放的喇叭 */
.mini.is-playing { color: #fff; background: var(--c-ink-600); }
.mini.is-playing svg { animation: say-pulse 1.1s ease-in-out infinite; }
@keyframes say-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
/* 跟着文字走的小喇叭（词汇、例句） */
.mini--inline {
  width: 22px; height: 22px; border-radius: 6px; display: inline-grid;
  vertical-align: -4px; margin-left: 2px; background: transparent;
}
.mini--inline svg { width: 13px; height: 13px; }
.mini--inline:hover { background: var(--c-ink-100); }

/* ---------------------------------------------------------------- vocab */
.vocab { display: grid; gap: var(--s-3); }
@media (min-width: 640px) { .vocab { grid-template-columns: repeat(2, 1fr); } }
.vrow {
  padding: var(--s-4); border-radius: var(--r-md); background: var(--surface);
  border: 1px solid var(--border-soft); box-shadow: var(--sh-1);
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.vrow:hover { border-color: var(--c-ink-200); box-shadow: var(--sh-2); }
.vrow__top { display: flex; align-items: flex-start; gap: var(--s-3); }
.vrow__n {
  flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px;
  display: grid; place-items: center; background: var(--brand-soft);
  font: 600 11px/1 var(--font-num); color: var(--c-ink-600);
}
.vrow__w { flex: 1; min-width: 0; }
.vrow__en { font: 600 16px/1.3 var(--font-ui); color: var(--text-strong); letter-spacing: -.01em; }
.vrow__zh { margin-top: 3px; font-size: 13px; color: var(--c-ink-600); line-height: 1.5; }
.vrow__zh--en { color: var(--text-muted); font-family: var(--font-read); font-size: 13.5px; font-style: italic; }
.vrow__ex {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border);
  font: 400 14px/1.62 var(--font-read); color: var(--text-muted);
}
.vrow__ex b { color: var(--c-ink-600); font-weight: 600; }
.vrow__acts { display: flex; gap: 2px; flex: none; }

/* ---------------------------------------------------------------- exercise */
.ex { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--sh-1); overflow: hidden; }
.ex__head { padding: var(--s-4) var(--s-4) var(--s-3); border-bottom: 1px solid var(--border-soft); }
.ex__no { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--brand-soft); font: 600 10.5px/1 var(--font-num); letter-spacing: .05em; color: var(--c-ink-600); }
.ex__title { margin-top: 8px; font-size: 15.5px; font-weight: 640; color: var(--text-strong); letter-spacing: -.01em; }
.ex__instr { margin-top: 5px; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.ex__list { padding: var(--s-2) var(--s-4) var(--s-2); }
@media (min-width: 640px) { .ex__list { padding: var(--s-3) var(--s-5); } }
.ex__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border-soft); background: var(--surface-2);
}
.ex__score { font-size: 12.5px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ex__score.is-good { color: var(--c-ok-600); }
.ex__score.is-bad { color: var(--c-bad-600); }

.q { padding: var(--s-4) 0; }
.q + .q { border-top: 1px dashed var(--border); }
.q__stem { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.6; color: var(--text-strong); font-weight: 500; }
.q__n { flex: none; font: 600 12px/1.5 var(--font-num); color: var(--c-ink-500); min-width: 16px; }
.q__opts { margin: 10px 0 0 26px; display: grid; gap: 7px; }
.opt {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left;
  padding: 11px 13px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); font-size: 14px; line-height: 1.5; color: var(--text);
  transition: all var(--t-fast); min-height: 44px;
}
.opt:hover { border-color: var(--c-ink-300); background: var(--surface-2); }
.opt__k {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px;
  display: grid; place-items: center; border: 1px solid var(--border);
  font: 600 10.5px/1 var(--font-num); color: var(--text-faint); background: var(--surface);
}
.opt.is-sel { border-color: var(--c-ink-400); background: var(--c-ink-50); }
.opt.is-sel .opt__k { background: var(--c-ink-600); border-color: var(--c-ink-600); color: #fff; }
.opt.is-ok { border-color: var(--c-ok-500); background: var(--c-ok-100); }
.opt.is-ok .opt__k { background: var(--c-ok-500); border-color: var(--c-ok-500); color: #fff; }
.opt.is-no { border-color: var(--c-bad-500); background: var(--c-bad-100); }
.opt.is-no .opt__k { background: var(--c-bad-500); border-color: var(--c-bad-500); color: #fff; }
.opt__mark { margin-left: auto; flex: none; width: 16px; height: 16px; opacity: 0; }
.opt.is-ok .opt__mark--ok, .opt.is-no .opt__mark--no { opacity: 1; }
.opt__mark--ok { color: var(--c-ok-600); } .opt__mark--no { color: var(--c-bad-600); }

.tf { display: flex; gap: var(--s-3); margin: 10px 0 0 26px; }
.tf .opt { flex: 1; justify-content: center; min-height: 46px; max-width: 130px; }
.tf .opt__k { display: none; }

.input {
  width: 100%; min-height: 44px; padding: 10px 13px; margin: 10px 0 0 26px;
  max-width: calc(100% - 26px); border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface); font-size: 14.5px; color: var(--text-strong);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder { color: var(--text-faint); }
.input:focus { outline: none; border-color: var(--c-ink-400); box-shadow: 0 0 0 3px var(--c-ink-100); }
.input.is-ok { border-color: var(--c-ok-500); background: var(--c-ok-100); }
.input.is-no { border-color: var(--c-bad-500); background: var(--c-bad-100); }
.q__ans { margin: 8px 0 0 26px; font-size: 13px; color: var(--c-ok-600); }
.q__ans b { font-weight: 650; }
.q__hintnote { margin: 6px 0 0 26px; font-size: 12.5px; color: var(--text-faint); }

/* answer key */
.keybox { border-radius: var(--r-md); border: 1px dashed var(--c-ink-200); background: var(--c-ink-50); overflow: hidden; }
.keybox summary {
  display: flex; align-items: center; gap: 9px; padding: var(--s-3) var(--s-4);
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--c-ink-600); list-style: none;
}
.keybox summary::-webkit-details-marker { display: none; }
.keybox summary svg { width: 15px; height: 15px; }
.keybox summary::after { content: "▾"; margin-left: auto; font-size: 11px; color: var(--c-ink-400); transition: transform var(--t-fast); }
.keybox[open] summary::after { transform: rotate(180deg); }
.keybox__body { padding: 0 var(--s-4) var(--s-4); font-size: 13.5px; line-height: 1.75; color: var(--text); white-space: pre-wrap; }

/* ---------------------------------------------------------------- cloze */
.cloze {
  padding: var(--s-4); border-radius: var(--r-md); background: var(--surface-2);
  border: 1px solid var(--border-soft);
  font: 400 15.5px/2.05 var(--font-read); color: var(--text);
}
.cloze + .cloze { margin-top: var(--s-4); }
.blank {
  display: inline-block; min-width: 76px; max-width: 160px; padding: 0 6px; margin: 0 2px;
  border: 0; border-bottom: 2px solid var(--c-ink-300); background: transparent;
  font: 600 14.5px/1.5 var(--font-ui); color: var(--c-ink-700); text-align: center;
  border-radius: 2px 2px 0 0;
}
.blank:focus { outline: none; border-bottom-color: var(--c-ink-500); background: var(--c-ink-50); }
.blank.is-ok { border-bottom-color: var(--c-ok-500); background: var(--c-ok-100); color: var(--c-ok-600); }
.blank.is-no { border-bottom-color: var(--c-bad-500); background: var(--c-bad-100); color: var(--c-bad-600); }

/* ---------------------------------------------------------------- sentences / speaking */
.slist { display: grid; gap: var(--s-3); }
.srow {
  display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-4);
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border-soft);
  box-shadow: var(--sh-1);
}
.srow__n { flex: none; font: 600 11.5px/1.7 var(--font-num); color: var(--c-ink-400); min-width: 14px; }
.srow__c { flex: 1; min-width: 0; }
.srow__en { font: 400 15.5px/1.6 var(--font-read); color: var(--text-strong); }
.srow__use { margin-top: 5px; font-size: 12.5px; color: var(--text-muted); }
.srow__use b { font-weight: 600; color: var(--c-ink-600); }
.srow__acts { display: flex; gap: 2px; flex: none; }
.rec { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-muted); flex: none; transition: all var(--t-fast); }
.rec:hover { background: var(--c-ink-100); color: var(--c-ink-600); }
.rec.is-rec { background: var(--c-bad-100); color: var(--c-bad-600); animation: pulse 1.4s infinite; }
.rec svg { width: 16px; height: 16px; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(180,69,60,.35); } 50% { box-shadow: 0 0 0 7px rgba(180,69,60,0); } }

.prompt { padding: var(--s-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border-soft); box-shadow: var(--sh-1); }
.prompt + .prompt { margin-top: var(--s-3); }
.prompt__q { display: flex; gap: 10px; font-size: 15px; line-height: 1.6; color: var(--text-strong); font-weight: 500; }
.prompt__n { flex: none; font: 600 11px/1.9 var(--font-num); color: #fff; background: var(--c-ink-500); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.prompt__hint { margin-top: 10px; font-size: 13px; line-height: 1.65; color: var(--text-muted); }
.prompt__hint b { color: var(--c-gold-600); font-weight: 600; }
.prompt__foot { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }
.timer { font: 600 13px/1 var(--font-num); color: var(--text-muted); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.timer.is-live { color: var(--c-ink-600); }

/* ---------------------------------------------------------------- note / bullets / lists */
.note {
  display: flex; gap: 10px; align-items: flex-start; padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md); background: var(--c-gold-100); border: 1px solid var(--c-gold-200);
  font-size: 13px; line-height: 1.6; color: var(--c-gold-600);
}
.note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.bullets { display: grid; gap: 9px; max-width: var(--readw); }
.bullets li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.7; color: var(--text); display: flex; align-items: flex-start; gap: 6px; }
.bullets li > span { flex: 1; }
.bullets svg { width: 15px; height: 15px; margin-right: 2px; }
.bullets li::before {
  content: ""; position: absolute; left: 4px; top: .62em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--c-gold-500);
}
.dtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dtable th, .dtable td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-soft); }
.dtable th { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); background: var(--surface-2); }
.dtable tr:last-child td { border-bottom: 0; }
.dtablewrap { border: 1px solid var(--border-soft); border-radius: var(--r-md); overflow: hidden; overflow-x: auto; background: var(--surface); }

.tlist { display: grid; gap: 2px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border-soft); background: var(--surface); }
.tlist__row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k a" "v a"; gap: 2px 12px; padding: 12px 14px; align-items: center; }
.tlist__row + .tlist__row { border-top: 1px solid var(--border-soft); }
.tlist__k { grid-area: k; font-size: 14px; font-weight: 600; color: var(--text-strong); }
.tlist__v { grid-area: v; font-size: 13.5px; color: var(--text-muted); }
.tlist__a { grid-area: a; }
.tlist__a .mini { width: 32px; height: 32px; }
@media (min-width: 640px) {
  .tlist__row { grid-template-columns: minmax(150px, 32%) 1fr auto; grid-template-areas: "k v a"; gap: 16px; align-items: center; }
}

/* translate */
.trlist { display: grid; gap: var(--s-2); }
.trrow { display: grid; gap: 8px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border-soft); }
@media (min-width: 640px) { .trrow { grid-template-columns: 1fr 1fr; align-items: center; gap: 16px; } }
.trrow__l { display: flex; align-items: center; gap: 8px; }
.trrow__l .mini { width: 32px; height: 32px; flex: none; }
.trrow__en { font: 500 14.5px/1.5 var(--font-ui); color: var(--text-strong); }
.trrow__ans {
  font-size: 13.5px; color: var(--c-ok-600); font-weight: 600; text-align: left;
  padding: 8px 12px; border-radius: var(--r-sm); background: var(--c-ok-100);
  border: 1px dashed var(--c-ok-500); min-height: 40px; width: 100%;
  transition: background var(--t-fast);
}
.trrow__ans:hover { background: var(--c-ok-100); filter: brightness(.98); }
.trrow__ans.is-hidden {
  color: var(--text-faint); background: var(--surface-2);
  border: 1px dashed var(--border); font-weight: 500;
}

/* ---------------------------------------------------------------- audio dock */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  padding: 0 var(--s-3) calc(10px + env(safe-area-inset-bottom));
  pointer-events: none;
}
.dock__card {
  pointer-events: auto; max-width: calc(var(--maxw) - 24px); margin: 0 auto;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-4); overflow: hidden;
}
.dock__bar { height: 3px; background: var(--border-soft); position: relative; cursor: pointer; }
.dock__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--c-ink-500); transition: width 120ms linear; }
.dock__fill::after {
  content: ""; position: absolute; right: -5px; top: 50%; width: 10px; height: 10px;
  margin-top: -5px; border-radius: 50%; background: var(--c-ink-500); box-shadow: 0 0 0 2px var(--surface);
}
.dock__in { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.dock__play {
  width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; box-shadow: var(--sh-2); transition: transform var(--t-fast), filter var(--t-fast);
}
.dock__play:hover { filter: brightness(1.08); }
.dock__play:active { transform: scale(.94); }
.dock__play svg { width: 18px; height: 18px; }
.dock__mid { flex: 1; min-width: 0; padding: 0 4px; }
.dock__label { font-size: 12.5px; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock__time { font: 500 11px/1.4 var(--font-num); color: var(--text-faint); font-variant-numeric: tabular-nums; }
.dock__tools { display: flex; align-items: center; gap: 2px; flex: none; }
.spd {
  height: 30px; padding: 0 9px; border-radius: var(--r-pill); background: var(--surface-2);
  font: 600 12px/1 var(--font-num); color: var(--text-muted); transition: all var(--t-fast);
}
.spd:hover { background: var(--c-ink-100); color: var(--c-ink-600); }
.spd.is-on { background: var(--c-ink-600); color: #fff; }
.dock__more { display: none; }
@media (min-width: 520px) { .dock__more { display: grid; } }

/* ---------------------------------------------------------------- home extra */
.split { display: grid; gap: var(--s-4); margin-bottom: var(--s-10); }
@media (min-width: 860px) { .split { grid-template-columns: 1.15fr .85fr; align-items: start; } }
.panel {
  padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border-soft); box-shadow: var(--sh-1);
}
.panel h3 { font-size: 15.5px; font-weight: 640; color: var(--text-strong); }
.panel p { margin-top: 10px; font-size: 13.5px; line-height: 1.75; color: var(--text-muted); }
.panel ul { margin-top: var(--s-3); display: grid; gap: 9px; }
.panel li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.62; color: var(--text); }
.panel li svg { width: 15px; height: 15px; flex: none; margin-top: 3px; color: var(--c-ok-500); }
.trrow :is(svg) { width: 15px; height: 15px; }
.prog { display: grid; gap: var(--s-3); margin-top: var(--s-3); }
.prog__row { display: flex; align-items: center; gap: var(--s-3); font-size: 13px; color: var(--text-muted); }
.prog__track { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.prog__track i { display: block; height: 100%; border-radius: 3px; background: var(--c-ink-500); transition: width 600ms var(--ease); }
.prog__pct { font: 600 12px/1 var(--font-num); color: var(--text-strong); min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- inline audio player */
.audioplayer {
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(150deg, var(--c-ink-800), var(--c-ink-700) 58%, var(--c-ink-900));
  color: #eaf2f8; box-shadow: var(--sh-3);
}
.ap__audio { display: none; }
.ap__head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-4) var(--s-3); }
.ap__badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18);
  font: 600 10.5px/1 var(--font-num); letter-spacing: .1em; color: #cfe2ef;
}
.ap__badge svg { width: 13px; height: 13px; }
.ap__meta { min-width: 0; }
.ap__title { font-size: 14.5px; font-weight: 620; color: #fff; letter-spacing: -.01em; }
.ap__sub { margin-top: 2px; font-size: 12px; color: #9fbdd2; }
.ap__body { display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-4) var(--s-3); }
.ap__play {
  width: 52px; height: 52px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--c-ink-800); box-shadow: 0 6px 18px -8px rgba(0,0,0,.55);
  transition: transform var(--t-fast), filter var(--t-fast);
}
.ap__play:hover { filter: brightness(.96); }
.ap__play:active { transform: scale(.94); }
.ap__play svg { width: 20px; height: 20px; }
.ap__rail { flex: 1; min-width: 0; }
.ap__track {
  position: relative; height: 6px; border-radius: 3px; cursor: pointer;
  background: rgba(255,255,255,.2); touch-action: none;
}
.ap__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 3px; background: #8fc4e4; }
.ap__fill::after {
  content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px;
  margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(14,31,48,.35);
}
.ap__time { margin-top: 7px; font: 500 11.5px/1 var(--font-num); color: #a8c6da; font-variant-numeric: tabular-nums; }
.ap__tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: var(--s-3) var(--s-4) var(--s-4); border-top: 1px solid rgba(255,255,255,.1);
}
.ap__tools .btn--outline {
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #dcebf5;
}
.ap__tools .btn--outline:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.34); }
.ap__tools .spd { background: rgba(255,255,255,.08); color: #dcebf5; height: 36px; padding: 0 14px; font-size: 13px; }
.ap__tools .spd:hover { background: rgba(255,255,255,.15); color: #fff; }
.ap__tools .spd.is-on, .ap__tools .btn--outline.is-on { background: #fff; color: var(--c-ink-800); border-color: #fff; }
.ap__tools .btn svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- voice panel */
.voicepop {
  position: fixed; z-index: 96; right: 12px; top: calc(var(--header-h) + 8px);
  width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto;
  padding: var(--s-4); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-4);
  animation: vpfade 180ms var(--ease);
}
@keyframes vpfade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.voicepop__hd { display: flex; align-items: center; justify-content: space-between; }
.voicepop__hd > span { font-size: 14px; font-weight: 650; color: var(--text-strong); }
.voicepop__sec + .voicepop__sec { margin-top: var(--s-4); }
.voicepop__lb { font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.voicepop__rates { display: flex; flex-wrap: wrap; gap: 6px; }
.vpr {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: 42px; padding: 0 15px; border-radius: var(--r-pill); background: var(--surface-2);
  font: 600 12.5px/1 var(--font-num); color: var(--text-muted); border: 1px solid transparent;
  transition: all var(--t-fast);
}
.vpr span { font-size: 10px; font-weight: 500; opacity: .68; }
.vpr:hover { background: var(--c-ink-100); color: var(--c-ink-600); }
.vpr.is-on { background: var(--brand); color: #fff; }
.voicepop__list { display: grid; gap: 4px; max-height: 240px; overflow: auto; padding-right: 4px; }
.vpi {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm); border: 1px solid var(--border-soft);
  background: var(--surface); text-align: left; transition: all var(--t-fast);
}
.vpi:hover { border-color: var(--c-ink-300); background: var(--surface-2); }
.vpi b { font-size: 13.5px; font-weight: 600; color: var(--text-strong); }
.vpi span { font: 500 11px/1 var(--font-num); color: var(--text-faint); }
.vpi.is-on { border-color: var(--c-ok-500); background: var(--c-ok-100); }
.vpi.is-on b { color: var(--c-ok-600); }
.vpi--fixed { cursor: default; }                    /* 语音已固定，不是可点选项 */
.vpi--fixed:hover { border-color: var(--c-ok-500); background: var(--c-ok-100); }
.voicepop__empty { padding: var(--s-4); text-align: center; font-size: 12.5px; color: var(--text-faint); }
.voicepop__tip { margin-top: 10px; font-size: 11.5px; line-height: 1.6; color: var(--text-faint); }

/* 音频来源状态条：显示当前实际生效的来源，云端取不到时会标为回落状态 */
.vpsrc {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 10px; padding: 8px 11px;
  border-radius: var(--r-sm); border: 1px solid var(--border-soft);
  background: var(--surface-2);
  font-size: 11.5px; color: var(--text-muted);
}
.vpsrc__dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--c-ok-500); box-shadow: 0 0 0 3px var(--c-ok-100);
}
.vpsrc b { font-weight: 600; color: var(--text-strong); }
.vpsrc--warn .vpsrc__dot { background: var(--c-gold-500); box-shadow: 0 0 0 3px var(--c-gold-100); }
.vpsrc--warn { border-color: var(--c-gold-200); }

/* 长按钮的播放态（朗读全文 / 朗读原文 / 朗读题目） */
.btn.is-playing {
  background: var(--c-ink-600); border-color: var(--c-ink-600); color: #fff;
}
.btn.is-playing svg { animation: say-pulse 1.1s ease-in-out infinite; }
[data-say-disabled] { opacity: .5; }

/* ---------------------------------------------------------------- site footer */
.sitefoot {
  max-width: var(--maxw); margin: 0 auto;
  padding: var(--s-7) var(--s-4) calc(var(--s-8) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-soft);
}
.sitefoot p {
  margin: 0 auto; max-width: var(--readw);
  font-size: 12.5px; line-height: 1.75; color: var(--text-faint); text-align: center;
}
.sitefoot__diag {
  display: inline-block; margin-top: 4px;
  font-size: 12px; color: var(--text-faint);
  text-decoration: underline; text-underline-offset: 2px;
}
.sitefoot__diag:hover { color: var(--text-muted); }
#btn-voice[aria-expanded="true"] { background: var(--surface-2); color: var(--c-ink-600); }
@media (max-width: 520px) { .voicepop { left: 12px; right: 12px; width: auto; } }

/* ------------------------------------------------------------ 账户与同步 */
.iconbtn--acct { position: relative; }
.iconbtn--acct[aria-expanded="true"] { background: var(--surface-2); color: var(--c-ink-600); }
.iconbtn__dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-ok-500);
  box-shadow: 0 0 0 2px var(--surface);
}
.accountpop {
  position: fixed; z-index: 96; right: 12px; top: calc(var(--header-h) + 8px);
  width: min(340px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto;
  padding: var(--s-4); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-4);
  animation: vpfade 180ms var(--ease);
}
.accountpop__hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.accountpop__hd > span { font-size: 14px; font-weight: 650; color: var(--text-strong); }

.acp__note { margin: 0 0 12px; font-size: 12.5px; line-height: 1.7; color: var(--text-muted); }
.acp__note b { color: var(--text-strong); }
.acp__hint { margin: 10px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--text-faint); }
.acp__hint code {
  font: 500 11px/1 var(--font-num); padding: 1px 5px; border-radius: 4px;
  background: var(--surface-2); color: var(--c-ink-600);
}
.acp__lab {
  display: block; margin: 10px 0 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint);
}
.acp__inp {
  width: 100%; height: 40px; padding: 0 12px;
  border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-strong);
  font: 500 14px/1 var(--font-ui);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.acp__inp:focus { outline: none; border-color: var(--c-ink-400); background: var(--surface); }
.acp__inp::placeholder { color: var(--text-faint); }
.acp__gap { margin-top: 10px; }
.acp__state {
  margin: 12px 0 0; padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--c-ink-100); color: var(--c-ink-700);
  font-size: 12px; line-height: 1.6;
}
.acp__who {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border-soft);
}
.acp__who b { font-size: 13px; font-weight: 600; color: var(--text-strong); word-break: break-all; }
.acp__who span { font-size: 11px; color: var(--c-ok-600); font-weight: 600; letter-spacing: .04em; }
.acp__row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed var(--border-soft);
  font-size: 12.5px; color: var(--text-muted);
}
.acp__row:last-of-type { border-bottom: 0; }
.acp__row b { font-size: 12.5px; font-weight: 600; color: var(--text-strong); text-align: right; }
@media (max-width: 520px) { .accountpop { left: 12px; right: 12px; width: auto; } }

/* ---------------------------------------------------------------- misc */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(14px);
  z-index: 90; padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--c-ink-800); color: #fff; font-size: 13.5px; font-weight: 550;
  box-shadow: var(--sh-4); opacity: 0; pointer-events: none; transition: all var(--t-base);
  max-width: calc(100vw - 40px); text-align: center;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

.wordpop {
  position: fixed; z-index: 95; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-4);
  max-width: 260px; opacity: 0; transform: translateY(6px); transition: all var(--t-fast); pointer-events: none;
}
.wordpop.is-on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.wordpop__w { font: 600 15px/1.3 var(--font-ui); color: var(--text-strong); }
.wordpop__m { margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.wordpop__act { margin-top: 9px; display: flex; gap: 6px; }

.empty { padding: var(--s-10) var(--s-6); text-align: center; color: var(--text-muted); font-size: 14px; }
.empty svg { width: 34px; height: 34px; margin: 0 auto var(--s-4); color: var(--c-ink-200); }
.loader { padding: var(--s-16) 0; display: grid; place-items: center; }
.loader i {
  width: 26px; height: 26px; border-radius: 50%; display: block;
  border: 2.5px solid var(--border); border-top-color: var(--c-ink-500); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.navrow { display: flex; gap: var(--s-3); margin-top: var(--s-10); }
.navrow .btn { flex: 1; min-width: 0; }
.foot { padding: var(--s-8) 0 var(--s-10); border-top: 1px solid var(--border-soft); color: var(--text-faint); font-size: 12.5px; line-height: 1.7; }
.foot b { color: var(--text-muted); font-weight: 600; }

/* 音频自检页（#/diag） */
.diagbox {
  margin-top: var(--s-3);
  border: 1px solid var(--border-soft); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.diagrow {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: 10px 14px; border-top: 1px solid var(--border-soft);
  font-size: 13px; line-height: 1.6;
}
.diagrow:first-child { border-top: 0; }
.diagk { flex: none; width: 152px; color: var(--text-muted); }
.diagv { flex: 1; min-width: 0; color: var(--text-strong); word-break: break-all; }
.diagv i { display: block; margin-top: 3px; font-style: normal; font-size: 11.5px; color: var(--text-faint); }
.diagv--ok { color: var(--c-ok-600); font-weight: 600; }
.diagv--ok i { font-weight: 400; }
.diagv--bad { color: var(--c-bad-600); font-weight: 600; }
.diagv--bad i { font-weight: 400; }
.diagtitle { margin: var(--s-6) 0 var(--s-2); font-size: 13px; font-weight: 600; color: var(--text-strong); line-height: 1.7; }
.diagtitle span { font-weight: 400; font-size: 12px; color: var(--text-faint); }
.diagtitle--ok { color: var(--c-ok-600); font-weight: 400; }
.diagtitle--bad { color: var(--c-bad-600); font-weight: 400; }
@media (max-width: 600px) {
  .diagk { width: 104px; }
  .diagrow { font-size: 12.5px; padding: 9px 11px; }
}

@media print {
  .topbar, .tabs, .dock, .hero__cta, .navrow { display: none !important; }
  body { background: #fff; }
}
