/* finesse · register=h5 · morph=A-app-shell · A=cream-paper + sage-forest · B=Newsreader-display/system-UI
 * C=hairline-reader-column + edge-TabBar + bottom-sheet · D=feedback-only (rise · press · sheet)
 * E=paper & ink · SOUL=6 SPECTACLE=2 DENSITY=4-6 · route=h5+product
 * ---------------------------------------------------------------------------
   150 DAYS ENGLISH — premium mobile-first reader
   Paper (cream) · ink (green-black) · one accent (forest sage) · hairline over border
   =========================================================================== */

:root {
  /* ---- 产品总纲 §三十二 的视觉系统：80% 中性 · 15% 绿 · 5% 强调 ---- */
  /* ---- 2026-10 改版「方案 B · 冷色清爽」：整体提亮、去掉闷黄 ---- */
  --page:      #F7FAFC;              /* 背景（冷白，比旧米白更清透） */
  --bg:        #FFFFFF;              /* 卡片 / 弹层表面 */
  --panel-2:   #EAF4F6;              /* 浅青底：insets / chips / tracks */
  --border:    rgba(14, 40, 52, .09);
  --border-2:  rgba(14, 40, 52, .16);
  --ink-1:     #111820;              /* 正文（冷黑，对比更强） */
  --ink-2:     #4A5D68;              /* 次级 */
  --ink-3:     #6E8391;              /* 三级 */
  --surround:  #EDF4F7;

  /* ---- brand — ONE accent, locked ---- */
  --accent:      #2FB8A8;            /* 品牌青绿（填充用） */
  --accent-deep: #0E7F72;            /* 文字用青绿：对 #F7FAFC 约 4.8:1 */
  --accent-soft: rgba(47, 184, 168, .14);
  --sage-soft:   #DCF2EE;            /* 浅青 */
  --on-accent:   #FFFFFF;
  --glow:        rgba(47, 184, 168, .28);
  --warm:        #FFB74D;            /* 5% 暖橙强调（比旧橙更亮，提神不闷） */

  /* ---- semantic — functional, never the identity ---- */
  --up:        #4A9EEC;              /* 天空蓝：待复习 / 冷色点缀 */
  --down:      #B0493F;
  --down-soft: rgba(176, 73, 63, .09);
  --warn:      #B4762F;
  --warn-soft: rgba(244, 162, 97, .16);

  /* ---- elevation: hairline first, shadow only for floating surfaces ---- */
  --shadow:    0 1px 3px rgba(29, 36, 31, .05);
  --shadow-lg: 0 -24px 60px -26px rgba(29, 36, 31, .28);

  /* ---- shape — locked tiers ---- */
  --r-lg: 28px;    /* sheet */
  --r:    18px;    /* card / panel */
  --r-sm: 12px;    /* controls */
  --r-xs: 10px;
  --r-pill: 999px;

  /* ---- type ---- */
  --font-display: "Newsreader", ui-serif, "New York", Georgia, "Times New Roman", serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;

  /* ---- frame ---- */
  --pad: 20px;
  --max: 430px;
  --nav-h: 54px;
  --topgap: 6px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.32, .86, .28, 1);

  /* ---- legacy aliases: older markup still references these names ---- */
  --sage: var(--accent);
  --sage-deep: var(--accent-deep);
  --danger: var(--down);
  --danger-soft: var(--down-soft);
  --surface: var(--bg);
  --surface-2: var(--panel-2);
  --line: var(--border);
  --line-2: var(--border-2);
}

/* ===========================================================================
   1 · The h5 frame — body locked, #app scrolls, furniture is absolute
   =========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;   /* kills the grey tap flash */
}

html, body { height: 100%; overflow-x: clip; }

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

body {
  font-family: var(--font-ui);
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.55;
  background: var(--surround);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;               /* the page does NOT scroll — #app does */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.phone {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--page);
  display: flex;
  flex-direction: column;
}

.app {
  flex: 1;
  overflow-y: auto;
  overflow-x: clip;
  overscroll-behavior-y: contain;
  /* no top padding: a sticky top bar sticks to the padding edge, so any padding
     here would leave an uncovered strip that content scrolls through */
  padding: 0 var(--pad) calc(var(--safe-b) + var(--nav-h) + 34px);
}
.app.no-nav { padding-bottom: calc(var(--safe-b) + 44px); }
.app::-webkit-scrollbar, .sheet::-webkit-scrollbar { width: 0; height: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* icons default small; each context sizes them again */
svg { display: block; width: 18px; height: 18px; flex: 0 0 auto; }

/* ===========================================================================
   2 · Type — fixed px (no clamp inside a fixed frame)
   =========================================================================== */

.brand {
  font-size: 11px; font-weight: 650; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-1); white-space: nowrap;
}
.brand-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.h1 { font-size: 28px; line-height: 1.2; font-weight: 650; letter-spacing: -.022em; }
.h2 { font-size: 18px; line-height: 1.28; font-weight: 640; letter-spacing: -.01em; }
.h3 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.sub { font-size: 15px; color: var(--ink-2); }
.tiny {
  font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
}
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.center { text-align: center; }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.grow { flex: 1; min-width: 0; }

/* the display faces — day numbers, lesson titles, phrases, big data */
.today-title, .lesson-title h1, .landing-hero h1, .journey-num,
.flip .word, .sheet-word, .phrase-en, .h1.serif {
  font-family: var(--font-display);
  font-weight: 600;
}

/* ===========================================================================
   3 · Layout primitives — hairlines instead of boxes
   =========================================================================== */

.hair { height: 1px; background: var(--border); border: 0; }
.sep { border-top: 1px solid var(--border); }
.section { margin-top: 30px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px 18px;
}

/* ===========================================================================
   4 · Sticky top bars — they own the notch, so nothing scrolls under the clock
   =========================================================================== */

.topbar, .lesson-top, .admin-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 calc(-1 * var(--pad));
  padding: calc(var(--safe-t) + 14px) var(--pad) 10px;
  background: rgba(243, 241, 232, .86);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
}
.lesson-top, .admin-top { flex-direction: column; align-items: stretch; gap: 0; }

/* flat variant: a top bar that is part of the flow, not sticky chrome */
.topbar.flat, .lesson-top.flat {
  position: static; margin-top: 0; background: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  padding-top: calc(var(--safe-t) + 12px);
}

.iconbtn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--r-pill); color: var(--ink-2); margin: -8px -10px -8px 0;
  transition: background .16s ease, transform .12s ease;
}
.iconbtn:active { background: var(--panel-2); transform: scale(.94); }
.iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.back {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px;
  margin-left: -8px; padding: 0 8px 0 4px; color: var(--ink-2); font-size: 15px;
  transition: opacity .15s ease, transform .12s ease;
}
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.back:active { opacity: .55; transform: scale(.97); }

.streak {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 14px; font-weight: 640; color: var(--ink-1);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.streak svg {
  width: 15px; height: 15px;                       /* 5% 暖橙：只给 streak 火苗 */
  fill: none; stroke: var(--warm); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.streak .flame { display: inline-flex; }

/* ===========================================================================
   5 · Controls
   =========================================================================== */

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 0 18px;
  border-radius: 14px;
  background: var(--accent); color: var(--on-accent);
  font-size: 15.5px; font-weight: 600; letter-spacing: -.008em;
  box-shadow: 0 8px 20px -12px var(--glow);
  transition: transform .14s ease, opacity .14s ease, background .14s ease;
}
.btn:active { transform: scale(.982); opacity: .94; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.ghost { background: transparent; color: var(--ink-1); border: 1px solid var(--border-2); box-shadow: none; }
.btn.ghost:active { background: var(--panel-2); }
.btn.soft { background: var(--accent-soft); color: var(--accent-deep); box-shadow: none; }
.btn.soft:active { background: rgba(55, 98, 76, .17); }
.btn.plain { background: transparent; color: var(--accent-deep); min-height: 46px; font-size: 15px; box-shadow: none; }
.btn.sm { min-height: 46px; font-size: 14.5px; border-radius: 14px; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row .btn { flex: 1; width: auto; }
.btn + .btn { margin-top: 10px; }
.btn-row + .btn { margin-top: 10px; }
.btn svg, .link svg {
  width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}

.link { color: var(--accent-deep); font-weight: 620; font-size: 14px; }
.link:active { opacity: .6; }

/* word / sentence audio */
.play {
  flex: 0 0 auto; width: 44px; height: 44px; margin: -6px -8px 0 0;
  border-radius: var(--r-pill); display: grid; place-items: center;
  background: transparent; color: var(--ink-3);
  transition: transform .12s ease, background .16s ease, color .16s ease;
}
.play:active { transform: scale(.9); background: var(--panel-2); }
.play svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.play.playing { color: var(--accent); }
.play .wave { display: none; }
.play.playing .wave { display: inline-flex; }
.play.playing svg { display: none; }

.wave { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.wave i { display: block; width: 2.5px; height: 6px; border-radius: 2px; background: currentColor; }
.playing .wave i { animation: wave .9s ease-in-out infinite; }
.playing .wave i:nth-child(2) { animation-delay: .15s; }
.playing .wave i:nth-child(3) { animation-delay: .3s; }
.playing .wave i:nth-child(4) { animation-delay: .45s; }
@keyframes wave { 0%, 100% { height: 5px; } 50% { height: 16px; } }

.hint {
  display: flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 12.5px; color: var(--ink-3);
}
.hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }

.bar, .quiz-bar, .thinbar {
  border-radius: var(--r-pill); background: var(--panel-2); overflow: hidden;
}
.bar { height: 3px; margin-top: 14px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width .3s var(--ease); }
.pct-label {
  font-size: 12px; color: var(--ink-3); margin-top: 7px;
  text-align: right; font-variant-numeric: tabular-nums;
}

/* ===========================================================================
   6 · Today — one day, one button, one phrase
   =========================================================================== */

.top-hero { margin-top: 22px; }
.greeting { font-size: 15px; color: var(--ink-2); margin: 20px 0 10px; }
.today-day {
  font-size: 11px; font-weight: 650; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent);
}
.today-title {
  font-size: 30px; line-height: 1.12; letter-spacing: -.024em;
  margin: 10px 0 8px; text-wrap: balance; overflow-wrap: anywhere;
}
.today-meta { font-size: 15px; color: var(--ink-2); letter-spacing: -.005em; }
.top-hero .btn { margin-top: 22px; }

.stat-row { display: flex; margin-top: 26px; gap: 8px; }
.stat-row > div { flex: 1; min-width: 0; }
.stat-row .n {
  font-size: 21px; font-weight: 650; letter-spacing: -.022em;
  font-variant-numeric: tabular-nums;
}
.stat-row .l { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* progress-mini — a hairline, not a card */
.progress-mini { margin-top: 0; }
.progress-mini .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.progress-mini .day { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.progress-mini .pct { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.progress-mini .bar { margin-top: 10px; }

/* ── 方案 B · Today 结构：满幅大图 + 白悬浮卡 + 大数字数据行 ─────────────
   只针对新加的三个类名，不改动任何既有规则，所以不会影响其它页面。 */
body { overflow-x: hidden; }

.hero-photo {
  margin: 4px calc(-1 * var(--pad, 18px)) 0;
  overflow: hidden;
}
.hero-photo img, .hero-photo .art, .hero-photo picture {
  width: 100%; display: block; min-height: 200px; object-fit: cover;   /* 杂志式大图，同时保证手机首屏装得下数据行 */
}
.hero-photo .band, .hero-photo > div { border-radius: 0 !important; }

/* 白色悬浮卡：压在大图下沿，深色字 → 高对比、不闷 */
.top-hero.hero-card {
  position: relative; z-index: 2;
  margin: -44px 0 0;
  padding: 15px 16px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 12px 30px -20px rgba(14, 40, 52, .32);
}
.hero-line   { font-size: 24px; line-height: 1.22; font-weight: 650; letter-spacing: -.025em; color: var(--ink-1); }
.hero-line-2 { font-size: 24px; line-height: 1.22; font-weight: 650; letter-spacing: -.025em; color: var(--accent-deep); margin-bottom: 12px; }

/* 首屏紧凑：手机上把 问候语 / 激励语 / 大图 / 卡片 之间的空隙压到最小 */
.hero-photo { margin-top: 2px; }
.hero-card .btn { margin-top: 10px; }
.hero-stats { margin-top: 14px; }

/* 数据行：大数字 + 细分隔线（去掉卡片感） */
.hero-stats { gap: 0; }
.hero-stats > div { flex: 1; text-align: left; padding: 0 12px; border-left: 1px solid var(--border); }
.hero-stats > div:first-child { border-left: 0; padding-left: 0; }
.hero-stats .n { font-size: 29px; font-weight: 700; letter-spacing: -.02em; color: var(--ink-1); }
.hero-stats .l { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ===========================================================================
   7 · The reader (Lesson)
   =========================================================================== */

.lesson-top .lesson-top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; min-height: 44px;
}
.lesson-top-inner .pct {
  font-size: 12px; font-weight: 600; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.thinbar { height: 2px; }
.thinbar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }

.stages {
  display: flex; gap: 18px; padding: 6px 0 10px;
  overflow-x: auto; scrollbar-width: none;
}
.stages::-webkit-scrollbar { display: none; }
.stage {
  font-size: 12.5px; font-weight: 550; color: var(--ink-3);
  white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
  padding-bottom: 3px; transition: color .2s ease;
}
.stage .num { font-size: 12px; }
.stage[data-state="current"] { color: var(--ink-1); font-weight: 650; box-shadow: inset 0 -2px 0 var(--accent); }
.stage[data-state="done"] { color: var(--accent); }

.lesson-title { margin-top: 26px; }
.lesson-title h1 {
  font-size: 30px; line-height: 1.14; letter-spacing: -.024em;
  margin: 10px 0 8px; text-wrap: balance; overflow-wrap: anywhere;
}
.lesson-title .zh { font-size: 15px; color: var(--ink-2); }

.block { margin-top: 36px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.block-head .t {
  font-size: 11px; font-weight: 650; letter-spacing: .17em;
  text-transform: uppercase; color: var(--ink-3);
}

/* the reading column — whitespace between sentences, no per-sentence card */
.sent {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 28px;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.sent:first-of-type { margin-top: 4px; }
.sent-text { flex: 1; min-width: 0; }
.sent-en {
  font-size: 20px; line-height: 1.68; letter-spacing: -.012em;
  font-weight: 450; color: var(--ink-1);
}
.sent-ipa { margin-top: 6px; font-size: 11.5px; line-height: 1.5; color: var(--ink-3); letter-spacing: .005em; }
.sent-zh { margin-top: 6px; font-size: 13.5px; line-height: 1.62; color: var(--ink-2); }

/* tappable words: core = light green + weight + a hairline, support = plain but alive */
.w, .wt {
  border-radius: 5px; padding: 0 1px; margin: 0 -1px;
  transition: background .14s ease;
}
.w {
  color: var(--accent-deep); font-weight: 600;
  border-bottom: 1px solid rgba(55, 98, 76, .26);
}
.w:active { background: var(--accent-soft); }
.wt:active { background: var(--panel-2); }

/* the day's word list */
/* today's words — packed into a grid so the day's vocabulary is a glance, not a scroll.
   2 columns on a phone, 3 in the desktop column. Tap a word for the sheet (IPA + audio). */
.words-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0 20px;
  margin-top: 4px;
}
.wcell {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px;
  padding: 10px 4px; margin: 0 -4px;
  border-radius: 8px; text-align: left;
  transition: background .14s ease;
}
.wcell:active { background: var(--accent-soft); }
.wcell-en { font-size: 15.5px; font-weight: 600; letter-spacing: -.012em; color: var(--ink-1); }
.wcell-ipa { font-size: 11.5px; color: var(--ink-3); }
.wcell-zh { flex-basis: 100%; margin-top: 1px; font-size: 12.5px; color: var(--ink-2); }

/* the day's phrase — a quiet pull-quote */
.phrase { margin-top: 10px; }
.phrase-en { font-size: 22px; line-height: 1.42; letter-spacing: -.018em; color: var(--ink-1); }
.phrase-zh { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }

/* ===========================================================================
   8 · Quick Check
   =========================================================================== */

.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.quiz-head .count { font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.quiz-head .count.tiny { letter-spacing: .04em; }
.quiz-bar { flex: 1; height: 3px; }
.quiz-bar > i { display: block; height: 100%; background: var(--panel-2); transition: width .25s var(--ease); }
.quiz-bar > i.done { background: var(--accent); }
.quiz-head > i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--panel-2); }
.quiz-head > i.done { background: var(--accent); }

.quiz-q { font-size: 20px; font-weight: 620; line-height: 1.42; letter-spacing: -.015em; text-wrap: balance; }
.quiz-en { font-size: 19px; line-height: 1.68; margin-top: 6px; color: var(--ink-1); }
.quiz-en .blank { display: inline-block; min-width: 62px; border-bottom: 1.5px solid var(--border-2); }

.opts { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 14px 16px;
  border-radius: 15px; border: 1px solid var(--border); background: var(--bg);
  font-size: 16px; font-weight: 500; text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}
.opt:active { transform: scale(.99); }
.opt .mark {
  width: 24px; height: 24px; flex: 0 0 auto; border-radius: var(--r-pill);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  color: transparent; border: 1.5px solid var(--border-2);
}
.opt.correct { border-color: var(--accent); background: var(--accent-soft); }
.opt.correct .mark { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.opt.wrong { border-color: rgba(176, 73, 63, .38); }
.opt.wrong .mark { color: var(--down); border-color: rgba(176, 73, 63, .38); }
.opt.dim { opacity: .5; }

.feedback { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 14.5px; font-weight: 620; }
.feedback.ok { color: var(--accent-deep); }
.feedback.no { color: var(--down); }
.feedback-card { margin-top: 16px; padding: 16px 18px; background: var(--panel-2); border-radius: var(--r); }
.feedback-card .en { font-size: 16px; line-height: 1.6; }
.feedback-card .zh { font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.feedback-card-head {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 12px; font-weight: 650; letter-spacing: .04em; color: var(--accent-deep);
}
.feedback-card-head svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; fill: none; }

.tokens {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; min-height: 54px;
  padding: 12px; border-radius: var(--r); background: var(--panel-2);
}
.tokens:empty::after { content: "点击下面的单词组成句子"; color: var(--ink-3); font-size: 13px; }
.tok {
  min-height: 40px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--border);
  font-size: 15px; font-weight: 550;
  transition: transform .12s ease, background .16s ease;
}
.tok:active { transform: scale(.96); }
.tok.used { opacity: .3; pointer-events: none; }
.tok.slot { background: var(--accent-soft); border-color: transparent; color: var(--accent-deep); }
.tokens-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* finishing a lesson */
.finish { padding: 6px 0 0; text-align: center; }
.check-circle {
  width: 62px; height: 62px; margin: 0 auto 18px;
  border-radius: var(--r-pill); background: var(--accent-soft);
  display: grid; place-items: center;
}
.check-circle svg { width: 26px; height: 26px; stroke: var(--accent); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.finish-hero { text-align: center; padding: 22px 0; }

/* ===========================================================================
   9 · Review
   =========================================================================== */

.flip {
  margin-top: 8px; min-height: 296px; padding: 30px 24px;
  border-radius: var(--r); background: var(--bg); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.flip .word { font-size: 36px; letter-spacing: -.028em; }
.flip .ipa { font-size: 14px; color: var(--ink-3); margin-top: 6px; }
.flip .zh { font-size: 19px; margin-top: 16px; font-weight: 500; }
.flip .ex { margin-top: 18px; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.flip .exz { font-size: 13px; color: var(--ink-3); margin-top: 5px; }
.flip .reveal { color: var(--ink-3); font-size: 13.5px; }
.rate { display: flex; gap: 8px; margin-top: 14px; }
.rate button {
  flex: 1; min-height: 54px; border-radius: 15px;
  border: 1px solid var(--border); background: var(--bg);
  font-size: 14.5px; font-weight: 600; transition: transform .12s ease, background .16s ease;
}
.rate button:active { transform: scale(.98); background: var(--panel-2); }
.rate .again { color: var(--down); }
.rate .hard { color: var(--warn); }
.rate .easy { color: var(--accent-deep); border-color: transparent; background: var(--accent-soft); }
.rate small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }

/* ===========================================================================
   10 · Words / lists / catalog
   =========================================================================== */

.search {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px; border-radius: 15px;
  background: var(--panel-2); border: 1px solid transparent;
  transition: border-color .16s ease, background .16s ease;
}
.search:focus-within { background: var(--bg); border-color: var(--border-2); }
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-size: 16px; appearance: none; -webkit-appearance: none;
}

.seg { display: flex; gap: 8px; }
.seg button {
  min-height: 34px; padding: 0 13px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 560; color: var(--ink-2);
  background: transparent; border: 1px solid var(--border);
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.seg button.on { color: var(--accent-deep); background: var(--accent-soft); border-color: transparent; font-weight: 650; }

.wordrow {
  display: flex; align-items: center; gap: 12px;
  min-height: 62px; padding: 13px 0; width: 100%; text-align: left;
  border-bottom: 1px solid var(--border);
  transition: opacity .15s ease;
}
.wordrow:last-child { border-bottom: 0; }
.wordrow:active { opacity: .55; }
.wordrow .en { font-size: 17px; font-weight: 600; letter-spacing: -.012em; }
.wordrow .ipa { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.wordrow .zh { font-size: 13.5px; color: var(--ink-2); }

.badge {
  width: 24px; height: 24px; flex: 0 0 auto; border-radius: var(--r-pill);
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--panel-2); color: var(--ink-3);
}
.badge svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge.ok { background: var(--accent-soft); color: var(--accent-deep); }

.rowitem {
  display: flex; align-items: center; gap: 12px;
  min-height: 58px; padding: 14px 0;
  width: 100%; text-align: left;          /* a <button> defaults to centred text */
  border-bottom: 1px solid var(--border);
}
.rowitem:last-child { border-bottom: 0; }
.rowitem .t { font-size: 15px; font-weight: 560; letter-spacing: -.005em; }
.rowitem .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.rowitem svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.lock-note { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; padding: 14px 0; }
.lock-note svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.catalog-list { margin-top: 4px; }
.catalog-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 0; border-bottom: 1px solid var(--border); text-align: left;
  transition: opacity .15s ease;
}
.catalog-row:last-child { border-bottom: 0; }
.catalog-row:active { opacity: .55; }
.cday {
  flex: 0 0 auto; width: 38px; font-size: 12px; font-weight: 650;
  color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.catalog-row.done .cday { color: var(--accent); }
.ctxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cen { font-size: 15px; font-weight: 560; letter-spacing: -.005em; }
.czh { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.cmark { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.cmark svg { width: 14px; height: 14px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.map-stage { padding: 4px 0 20px; }
.map-head { margin-bottom: 6px; }

/* ===========================================================================
   11 · Progress
   =========================================================================== */

.journey-num {
  font-size: 46px; line-height: 1.02; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.journey-num span {
  font-family: var(--font-ui); font-size: 15px; font-weight: 500;
  color: var(--ink-3); letter-spacing: -.005em; margin-left: 2px;
}

.metrics { display: flex; margin-top: 26px; gap: 10px; }
.metrics > div { flex: 1; min-width: 0; }
.metrics .ico { width: 18px; height: 18px; color: var(--accent); margin-bottom: 10px; }
.metrics .ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.metrics .n {
  font-size: 19px; font-weight: 650; letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.metrics .l { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.stage-row {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 16px 0; text-align: left;
  border-bottom: 1px solid var(--border);
  transition: opacity .15s ease;
}
.stage-row:last-child { border-bottom: 0; }
.stage-row:active { opacity: .6; }
.stage-row.locked { opacity: .45; }
/* the stage numeral carries the mark — no grey thumbnail box, no per-row placeholder */
.stage-row .snum {
  flex: 0 0 auto; width: 40px;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; letter-spacing: -.02em;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.stage-row.done .snum { color: var(--accent); }
.stage-row .t { font-size: 15px; font-weight: 600; letter-spacing: -.008em; }
.stage-row .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.ring-mini { width: 34px; height: 34px; flex: 0 0 auto; }
.ring-mini text { font-size: 9.5px; font-weight: 650; fill: var(--ink-2); font-variant-numeric: tabular-nums; }

.stage-days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 14px 0 8px; }
.daycel {
  aspect-ratio: 1 / 1; border-radius: var(--r-xs); display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--panel-2);
  font-variant-numeric: tabular-nums;
}
.daycel.done { background: var(--accent-soft); color: var(--accent-deep); }
.daycel.today { background: var(--accent); color: var(--on-accent); }
.daycel.locked { opacity: .45; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stat { text-align: left; }
.stat b {
  display: block; font-size: 24px; font-weight: 650;
  letter-spacing: -.028em; font-variant-numeric: tabular-nums;
}
.stat span { font-size: 11.5px; color: var(--ink-3); }

/* ===========================================================================
   12 · Bottom sheet
   =========================================================================== */

.sheet-host { position: absolute; inset: 0; z-index: 60; }
.sheet-backdrop {
  position: absolute; inset: 0; background: rgba(22, 33, 28, .34);
  opacity: 0; transition: opacity .2s ease;
}
.sheet-host.open .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto;
  max-width: var(--max); max-height: 86%; overflow-y: auto;
  background: var(--bg);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(102%);               /* 102, not 100 — hides the shadow edge */
  transition: transform .29s var(--ease);
  padding-bottom: calc(var(--safe-b) + 18px);
  will-change: transform;
}
.sheet-host.open .sheet { transform: none; }
.sheet-host.dragging .sheet { transition: none; }
.sheet-grip { padding: 12px 0 4px; display: grid; place-items: center; touch-action: none; }
.sheet-grip span { width: 40px; height: 4px; border-radius: var(--r-pill); background: var(--border-2); }
.sheet-body { padding: 10px 22px 6px; }

.sheet-word { font-size: 32px; letter-spacing: -.03em; }
.sheet-ipa { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.sheet-zh { font-size: 16.5px; margin-top: 14px; }
.sheet-ex { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.sheet-ex .en { font-size: 16px; line-height: 1.6; }
.sheet-ex .zh { font-size: 13px; color: var(--ink-2); margin-top: 5px; }
.sheet-actions { margin-top: 18px; display: flex; gap: 10px; }
.sheet-actions .btn { flex: 1; width: auto; min-height: 50px; }
.sheet-more {
  margin-top: 14px; width: 100%; text-align: left;
  font-size: 14px; font-weight: 620; color: var(--accent-deep);
  display: flex; align-items: center; gap: 6px; padding: 8px 0;
}
.sheet-more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sheet-block { margin-top: 12px; padding: 14px; background: var(--panel-2); border-radius: var(--r-sm); }
.sheet-block .pos { font-size: 12px; color: var(--ink-3); }
.sheet-block .line { font-size: 14.5px; line-height: 1.55; margin-top: 6px; }
.sheet-block .line:first-child { margin-top: 0; }

.fav {
  width: 44px; height: 44px; flex: 0 0 auto; margin: -6px -8px 0 0;
  display: grid; place-items: center; border-radius: var(--r-pill);
  color: var(--ink-3); transition: transform .12s ease, color .16s ease;
}
.fav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fav.on { color: var(--accent); }
.fav.on svg { fill: var(--accent-soft); }
.fav:active { transform: scale(.9); }

/* ===========================================================================
   13 · TabBar — OS furniture: a convention, not a design opportunity
   =========================================================================== */

.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 40;
  background: rgba(243, 241, 232, .9);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-b);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  backdrop-filter: saturate(150%) blur(18px);
}
.tabbar-inner { max-width: var(--max); margin: 0 auto; height: var(--nav-h); display: flex; align-items: center; }
.tab {
  flex: 1; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 10.5px; font-weight: 550; letter-spacing: .005em;
  transition: color .2s ease;
}
.tab svg {
  width: 21px; height: 21px; border-radius: var(--r-pill);
  fill: none; stroke: currentColor; stroke-width: 1.65;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke-width .18s var(--ease), transform .16s var(--ease);
}
.tab:active svg { transform: scale(.9); }
.tab.active { color: var(--accent-deep); font-weight: 650; }
.tab.active svg { stroke-width: 2.1; }        /* weight + colour, never a coloured block */

/* ===========================================================================
   14 · Toast, forms, Me
   =========================================================================== */

.toast {
  position: absolute; left: 50%; z-index: 70;
  bottom: calc(var(--safe-b) + var(--nav-h) + 18px);
  transform: translate(-50%, 12px);
  max-width: min(86%, 380px); padding: 11px 18px;
  border-radius: var(--r-pill); background: rgba(22, 33, 28, .94);
  color: var(--on-accent); font-size: 13.5px; font-weight: 500;
  opacity: 0; pointer-events: none; text-align: center;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field select {
  width: 100%; height: 50px; padding: 0 16px;
  border-radius: 15px; border: 1px solid var(--border); background: var(--bg);
  font-size: 16px; appearance: none; -webkit-appearance: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field select:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
#login-user { letter-spacing: .06em; }   /* 不再强制大写：正常显示 admin / wang001 */
.login-hero { padding: 36px 0 8px; text-align: center; }
.login-error {
  margin-top: 10px; padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--down-soft); color: #8E3B33; font-size: 13.5px;
}

.demo-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--panel-2); color: var(--ink-2); font-size: 12px; font-weight: 550;
}
.demo-strip button {
  flex: 0 0 auto; height: 30px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 620;
}
.demo-strip.test { background: var(--accent-soft); color: var(--accent-deep); }
.demo-strip.test button { background: var(--accent); }

.accent-mini {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border-radius: var(--r-pill); background: var(--panel-2); flex: 0 0 auto;
}
.accent-mini button {
  min-width: 40px; height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 650; color: var(--ink-3);
  transition: background .16s ease, color .16s ease;
}
.accent-mini button.on { background: var(--bg); color: var(--accent-deep); }

.avatar {
  width: 54px; height: 54px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-deep);
  display: grid; place-items: center; font-size: 19px; font-weight: 650;
  flex: 0 0 auto; letter-spacing: -.01em;
}
.switch {
  width: 46px; height: 27px; border-radius: var(--r-pill);
  background: var(--panel-2); position: relative; flex: 0 0 auto;
  transition: background .2s ease;
}
.switch i {
  position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: var(--bg);
  box-shadow: 0 1px 2px rgba(24, 40, 32, .18);
  transition: transform .2s var(--ease);
}
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(19px); }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 120px; height: 4px; border-radius: var(--r-pill); background: var(--panel-2);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--border-2);
  box-shadow: 0 1px 3px rgba(24, 40, 32, .2);
}

/* ===========================================================================
   15 · Landing / share / unlock
   =========================================================================== */

.landing-hero { padding: 20px 0 6px; }
.landing-hero h1 {
  font-size: 36px; line-height: 1.1; letter-spacing: -.03em;
  margin: 0 0 16px; text-wrap: balance;
}
.landing-hero p { font-size: 15px; line-height: 1.78; color: var(--ink-2); }

.feature { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.feature:last-child { border-bottom: 0; }
.feature .ico {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: var(--r-xs);
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep);
}
.feature .ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature .t { font-size: 15px; font-weight: 600; }
.feature .s { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin-top: 2px; }

.preview-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px;
  scrollbar-width: none;
}
.preview-strip::-webkit-scrollbar { display: none; }
.preview-strip .thumb {
  flex: 0 0 auto; width: 72px; height: 72px; border-radius: var(--r-sm);
  background: var(--panel-2); display: grid; place-items: center;
}
.preview-strip .thumb svg { width: 44px; height: 44px; }

/* ===========================================================================
   16 · Illustration slots — real image if present, line art if not
   =========================================================================== */

/* ---- v3.0 新增：Learn / Journey / 单词页 / 中文开关（总纲 §十一·§十七·§二十二·§二十六） ---- */

/* Useful Examples —— 例句是阅读的延伸，不加卡片、不加边框，只靠留白分行 */
.ex-row { margin-top: 16px; display: flex; align-items: flex-start; gap: 8px; }
.ex-row > .ex-main { flex: 1; min-width: 0; }
.ex-row[hidden] { display: none; }   /* display:flex 会盖掉 UA 的 [hidden]，必须补回来 */
.ex-row:first-of-type { margin-top: 2px; }
.ex-en { font-size: 17px; line-height: 1.62; letter-spacing: -.01em; color: var(--ink-1); }
.ex-zh { margin-top: 5px; font-size: 13px; line-height: 1.55; color: var(--ink-2); }


.zh-hidden .sent-zh,
.zh-hidden .again-zh { display: none; }

.again-sent {
  margin-top: 18px; font-size: 19px; line-height: 1.68;
  letter-spacing: -.012em; color: var(--ink-1);
}
.again-sent:first-child { margin-top: 4px; }
.again-zh {
  margin-top: 5px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2);
}

/* Learn：Continue 卡 + Journey 卡（两张都做成"可点的一整块"，不是 Card 套 Card） */
.continue-card, .journey-card {
  display: block; width: 100%; text-align: left;
  padding: 16px 18px; border-radius: var(--r);
  background: var(--bg); border: 1px solid var(--border);
  transition: transform .14s ease, background .14s ease;
}
.continue-card:active, .journey-card:active { transform: scale(.99); background: var(--panel-2); }
.cc-eyebrow {
  display: block; font-size: 11px; font-weight: 650; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-deep);
}
.cc-title {
  display: block; margin-top: 8px;
  font-family: var(--font-display); font-size: 22px; font-weight: 600;
  letter-spacing: -.02em; color: var(--ink-1);
}
.cc-meta { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink-2); }
.journey-big {
  display: block; margin-top: 8px;
  font-family: var(--font-display); font-size: 34px; font-weight: 600;
  letter-spacing: -.03em; color: var(--ink-1); font-variant-numeric: tabular-nums;
}
.journey-big i { font-family: var(--font-ui); font-size: 14px; font-style: normal; color: var(--ink-3); }
.journey-sub { display: block; margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.journey-line {
  margin-top: 20px; text-align: center; font-size: 14px; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

/* 单词详情：US / UK 双音标（总纲 §十三） */
.ipa-pair { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.ipa-pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--panel-2); color: var(--ink-1); font-size: 14px;
  transition: background .14s ease, transform .12s ease;
}
.ipa-pill:active { transform: scale(.97); background: var(--sage-soft); }
.ipa-pill b { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--accent-deep); }
.ipa-pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.word-pos {
  margin-top: 16px; font-size: 12px; font-weight: 650; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-3);
}
.word-cn { margin-top: 6px; font-size: 19px; line-height: 1.5; color: var(--ink-1); }

/* Words 列表右侧的 Day / 已学标记 */
.wr-day {
  flex: 0 0 auto; min-width: 26px; text-align: right;
  font-size: 11.5px; font-weight: 650; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.wr-day.ok { color: var(--accent-deep); }
.wr-day svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }

.art-panel {
  position: relative; display: grid; place-items: center;
  border-radius: var(--r); overflow: hidden; background: var(--panel-2);
}
/* real photographs: give them their own aspect, not a fixed strip */
.art-panel.hero { aspect-ratio: 16 / 9; margin-bottom: 20px; }
.art-panel.banner { aspect-ratio: 16 / 9; margin: 16px 0 0; background: none; }
.art-panel.band { aspect-ratio: 2 / 1; margin: 24px 0 0; background: none; }
.art-panel.sm { width: 40px; height: 40px; border-radius: 12px; }
.art-panel .art-fallback { display: grid; place-items: center; color: var(--accent); }
.art-panel.hero .art-fallback svg,
.art-panel.banner .art-fallback svg,
.art-panel.band .art-fallback svg { width: 84px; height: 84px; }
.art-panel.sm .art-fallback svg { width: 28px; height: 28px; }
.art-panel img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 46%; display: block;
}

/* ===========================================================================
   17 · Admin (same palette, higher density)
   =========================================================================== */

.pill-admin {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; padding: 4px 9px;
  border-radius: var(--r-pill); background: var(--ink-1); color: var(--on-accent);
}
.admin-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.admin-card {
  padding: 14px 16px; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--border);
}
.admin-card b {
  display: block; font-size: 23px; font-weight: 650;
  letter-spacing: -.025em; font-variant-numeric: tabular-nums;
}
.admin-card span { font-size: 11.5px; color: var(--ink-3); }
.bar-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.bar-row .bar-name { width: 74px; flex: 0 0 auto; font-size: 13px; color: var(--ink-2); }
.bar-row .bar-track { flex: 1; height: 5px; border-radius: var(--r-pill); background: var(--panel-2); overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: var(--accent); border-radius: var(--r-pill); }
.bar-row .bar-val { width: 32px; text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.adm-user {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 13px 0; border-bottom: 1px solid var(--border); text-align: left;
}
.adm-user:last-child { border-bottom: 0; }
.adm-user .u-name { font-size: 15px; font-weight: 600; }
.adm-user .u-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.adm-user .u-right { text-align: right; flex: 0 0 auto; }
.tag { display: inline-block; padding: 3px 9px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 650; }
.tag.active { background: var(--accent-soft); color: var(--accent-deep); }
.tag.disabled { background: var(--down-soft); color: var(--down); }
.tag.trial { background: var(--warn-soft); color: var(--warn); }
.adm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.adm-actions .btn { min-height: 46px; font-size: 14px; }
.kv {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--ink-2); }
.kv span:last-child { font-weight: 550; text-align: right; }
textarea.note {
  width: 100%; min-height: 78px; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border); font-size: 15px; resize: vertical; appearance: none;
}
textarea.note:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===========================================================================
   18 · Entrance + reduced motion
   =========================================================================== */

.fadein { animation: rise .24s var(--ease) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.stagger > * { animation: rise .24s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; }
.stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .17s; }
.stagger > *:nth-child(5) { animation-delay: .22s; }
.stagger > *:nth-child(6) { animation-delay: .27s; }

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .fadein, .stagger > * { animation: none !important; }
  .wave > i { animation: none !important; }
}

/* ===========================================================================
   19 · Desktop — a website, not a phone mock
   Normal page scrolling, one centred reading column, no bezel and no frame.
   (Below 560px nothing here applies: the phone layout is the primary product.)
   =========================================================================== */

@media (min-width: 560px) {
  html, body { height: auto; overflow-y: visible; overflow-x: clip; }
  body { display: block; background: var(--page); }
  .phone { display: block; height: auto; overflow: visible; }
  .app {
    max-width: 560px; margin: 0 auto;
    overflow: visible; overscroll-behavior-y: auto;
  }
  .tabbar { position: fixed; }
  .tabbar-inner { max-width: 560px; }
  .sheet-host, .toast { position: fixed; }   /* .phone no longer bounds the viewport */
}

/* ── Words: 过滤 / chips / 分页（2026-10 UI 阶段）───────────────── */
#app .seg { flex-wrap: wrap; }
.sheet-title { font: 600 13px/1.4 var(--ui); letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); margin: 2px 2px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none; border: 1px solid var(--line); background: var(--card);
  color: var(--ink-2); font: 500 13px/1 var(--ui); padding: 9px 12px;
  border-radius: var(--r-pill); min-height: 36px;
}
.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-deep); font-weight: 620; }
.wf-wrap { padding-bottom: calc(8px + var(--safe-b)); }
.wf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.wf-head b { font-size: 17px; font-weight: 640; }
.wf-grp { margin-bottom: 18px; }
.wf-t { font-size: 12px; font-weight: 620; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px; }
.wr-zh { text-align: right; max-width: 128px; }

/* ── iOS 真机专项（2026-10）：触控延迟 / 滚动手感 / 弹层串滚 ─────── */
.app { -webkit-overflow-scrolling: touch; }
.btn, .chip, .tab, .play, .wordrow, .catalog-row, .ipa-pill, .stage-row {
  touch-action: manipulation;            /* 去掉 300ms 延迟与双击缩放 */
}
.chip { min-height: 40px; padding: 10px 14px; }   /* 过滤 chip 触区更接近 44px 指南 */
.sheet { overscroll-behavior: contain; }          /* 弹层滚动不把背景页面一起带着滚 */
.sheet-body { padding-bottom: calc(var(--safe-b) + 22px); }  /* 键盘/Home 条都不挡最后一行 */
.progress-mini .bar { margin-top: 10px; }

/* ===========================================================================
   20 · 跟读 · 录音 → 回放 → 重录（2026-10）
   每颗 🔊 右边多一颗 🎤；点它弹出底部面板，录下来自己听。纯本地，不上传。
   =========================================================================== */

/* 🔊 + 🎤 打包成一对，整体占位和原来那颗 🔊 相当，不给正文多挤一行 */
.aud-pair { display: inline-flex; align-items: center; flex: 0 0 auto; margin: -6px -8px 0 0; }
.aud-pair > .play { margin: 0; }
.aud-pair > .play.mic { width: 38px; height: 38px; color: var(--ink-3); }
.aud-pair > .play.mic.rec { color: var(--down); }
.aud-pair > .play.mic.rec svg { animation: micpulse 1.1s ease-in-out infinite; }
@keyframes micpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.82); }
}

.mic-panel {
  position: absolute; left: 0; right: 0; z-index: 60;
  padding: 0 var(--pad) 10px;
  pointer-events: none;                    /* 只有卡片本身吃点击，底下正文照样能滚 */
}
.mic-panel[hidden] { display: none; }
.mic-inner {
  pointer-events: auto;
  max-width: var(--max); margin: 0 auto;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 -16px 44px -20px rgba(29, 36, 31, .32);
  padding: 12px 14px 14px;
}
.mic-head { display: flex; align-items: flex-start; gap: 10px; }
.mic-label {
  flex: 0 0 auto; padding-top: 3px;
  font-size: 10.5px; font-weight: 650; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3);
}
.mic-text {
  flex: 1; min-width: 0;
  font-family: var(--font-display); font-size: 15px; line-height: 1.45; color: var(--ink-1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mic-x {
  flex: 0 0 auto; width: 30px; height: 30px; margin: -5px -5px 0 0;
  border-radius: var(--r-pill); display: grid; place-items: center; color: var(--ink-3);
}
.mic-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mic-actions { display: flex; gap: 8px; margin-top: 12px; }
.mic-btn {
  flex: 1; min-height: 46px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 14px; font-weight: 620; color: var(--ink-1); background: var(--panel-2);
  touch-action: manipulation;
  transition: transform .12s ease, background .16s ease, color .16s ease, opacity .16s ease;
}
.mic-btn:active { transform: scale(.97); }
.mic-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mic-btn.primary { background: var(--accent); color: var(--on-accent); }
.mic-btn.primary.rec { background: var(--down); }
.mic-btn[disabled] { opacity: .4; }
.mic-hint { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
/* 面板是压在正文上的浮层：撑出一段底部留白，最后一句不会被它盖住 */
.phone.mic-open .app { padding-bottom: calc(var(--safe-b) + var(--nav-h) + 172px); }
.phone.mic-open .app.no-nav { padding-bottom: calc(var(--safe-b) + 172px); }

@media (prefers-reduced-motion: reduce) {
  .aud-pair > .play.mic.rec svg { animation: none !important; }
}

/* ⚠️ 这条必须写在上面那组基础样式**之后**。
   桌面端 .phone 是"整页高度"（不是一屏），如果跟读面板还是 absolute，
   它会被钉在整页最底部 —— 也就是滚不到的地方，表现就是"点了 🎤 什么也没发生"。
   同优先级的规则后者胜，所以位置不能挪到前面去。 */
@media (min-width: 560px) {
  .mic-panel { position: fixed; }     /* 跟着视口走，永远贴在底部导航上方 */
  .mic-inner { max-width: 560px; }
}
