/* Foxy Learning. The look is 狐狸窝 Fox den (2026-12-04): business/english-site/design-system/fox-den.md.
   Every colour comes from the logo and Mariah: an apricot band on each main page, a warm cream page and
   cards, cocoa text, the logo's red for the one main button, caramel for progress, the logo's green for
   what is learned or right, plum for wrong. Never pure white or black, no cool grey, no blue.
   The token names below are the site's older names (kept so every rule follows); the spec's name is
   in the comment. Radii: cards 16, buttons and fields 12, chips 999. System fonts only. */
:root {
  color-scheme: light;
  --paper: #F7F0E6;          /* --page: the page behind everything */
  --paper-deep: #F1E6D6;     /* --page-sunken: quiet fills, tracks, inactive chips */
  --fill-h: #EADBC6;         /* a sunken fill under the pointer */
  --card: #FFF9F1;           /* --card */
  --card-raised: #FFFCF7;    /* --card-raised: the card on the band, dialogs, menus */
  --field: #F1E6D6;          /* input fields (--page-sunken) */
  --line: #E9DAC6;           /* --line: hairlines */
  --line-strong: #D9C4A8;    /* --line-strong */
  --ink: #3B2A22;            /* --text: cocoa ink */
  --ink-soft: #6E5848;       /* --text-2 */
  --ink-faint: #7E6655;      /* --text-3: captions, never for what you must read to act */
  --on-ink: #FFF9F1;         /* text on an ink-coloured button */
  --night: #3B2A22;          /* toasts */
  --band: #F9D9BC;           /* --band: the top band of each main page, the phone's status bar.
                                Apricot, the fox's fur (Martin, 2026-12-04: the oxblood "kinda fight[s]" the logo,
                                "maybe the tone is a bit too heavy?"; he chose the apricot of three mockups) */
  --band-deep: #F4C79F;      /* --band-deep: the band's lower edge */
  --on-band: #3B2A22;        /* titles on the band (cocoa) */
  --on-band-2: #6B4634;      /* subtitles on the band (5.2:1 on the deep edge) */
  --band-btn: rgba(59, 42, 34, .08);   /* a quiet button on the band */
  --red: #C9362B;            /* --action: the one main button per screen */
  --red-dark: #B02E24;       /* --action-hover */
  --on-action: #FFF6EE;      /* text on the main button */
  --red-text: #B02E24;       /* red words (rare: the action's colour as text) */
  --red-soft: #F7DDD5;
  --blue: #9A5A1E;           /* --caramel-deep: what is selected, links, highlighted words (the old blue's jobs) */
  --blue-soft: #F6E3CC;      /* --caramel-tint */
  --caramel: #E39A55;        /* progress bars, rings, the streak flame */
  --gold: #9A6A00;           /* --amber: nearly right (差一点) */
  --gold-soft: #F6EACB;
  --gold-line: #E3CB8C;
  --green: #2F6B3F;          /* --green: learned, right answers */
  --green-soft: #E2EEDF;     /* --green-tint */
  --wrong: #7A3E8E;          /* --plum: wrong answers (red stays for the action alone) */
  --wrong-soft: #F1E4F4;     /* --plum-tint */
  --flame: #9A5A1E;          /* the streak's number (caramel-deep, readable); its icon is --caramel */
  --flame-soft: #F6E3CC;
  --heat-1: #F6E3CC; --heat-2: #E9B37C; --heat-3: #C9762F;
  --focus: #C9362B;
  --bar-bg: rgba(255, 249, 241, .97);
  --radius: 16px;            /* cards */
  --radius-m: 12px;          /* buttons and fields */
  --radius-s: 10px;
  --shadow-s: none;
  --shadow: none;
  --shadow-card: 0 1px 2px rgba(107, 36, 33, .06), 0 4px 14px rgba(107, 36, 33, .06);
  --shadow-l: 0 8px 28px rgba(107, 36, 33, .14);
  --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --serif: var(--sans);      /* one typeface: the system's */
}
html.night {
  color-scheme: dark;
  --paper: #1C1512; --paper-deep: #171110; --fill-h: #2F241E; --card: #2A201B; --card-raised: #33281F; --field: #171110;
  --line: #3C2F27; --line-strong: #4E3E33; --ink: #F3E7D8; --ink-soft: #CDB8A4; --ink-faint: #A99481; --on-ink: #1C1512;
  --night: #3C2F27;
  --band: #3A2A20; --band-deep: #2F2119; --on-band: #F6E6D6; --on-band-2: #D9B9A5; --band-btn: rgba(251, 239, 226, .14);
  --red: #C9362B; --red-dark: #D8463A; --on-action: #FFF6EE; --red-text: #F0917F; --red-soft: #3A201B;
  --blue: #E8A363; --blue-soft: #3D2C1F; --caramel: #E8A363;
  --gold: #E9C46A; --gold-soft: #3A2E14; --gold-line: #6B5420; --green: #7CC48E; --green-soft: #1F3325;
  --wrong: #CDA6DE; --wrong-soft: #33233A; --flame: #E8A363; --flame-soft: #3D2C1F;
  --heat-1: #3D2C1F; --heat-2: #8A5A2E; --heat-3: #E8A363; --focus: #D8463A; --bar-bg: rgba(42, 32, 27, .97);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-l: 0 8px 28px rgba(0, 0, 0, .5);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans);
  font-size: 16px; line-height: 1.55; padding-bottom: 72px; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
small { font-size: 12px; color: var(--ink-soft); margin-left: 4px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 24px; }
h1 span, h2 span { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--ink-soft); margin-left: 8px; letter-spacing: 0; }
main { max-width: 1080px; margin: 0 auto; padding: 16px 16px 32px; min-height: 70vh; }
main:focus { outline: none; }
@media (min-width: 760px) { main { padding: 24px 24px 48px; } h1 { font-size: 28px; } }

/* ---------- top bar and navigation, as learning apps do it ----------
   Phones: a light top bar and a bottom tab bar (百词斩, 墨墨, Duolingo's app).
   Wide screens: a side menu on the left and a right column of today's numbers (Duolingo on the web). */
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 16px; background: var(--paper);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
  /* no backdrop-filter here: it would trap the fixed tab bar inside the top bar */
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; flex: none; box-shadow: var(--shadow-s); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.2; white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
.top-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink-faint); font-size: 13px; white-space: nowrap;
}
.lang-switch svg { width: 16px; height: 16px; }
.lang-switch b { color: var(--ink); font-weight: 700; }
.lang-switch:hover { border-color: var(--ink-faint); }

.main-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--bar-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.main-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 8px 4px 6px; min-height: 56px; color: var(--ink-faint); }
.main-nav a svg { width: 22px; height: 22px; }
.main-nav a span { display: flex; flex-direction: column; align-items: center; font-weight: 600; font-size: 12px; line-height: 1.2; }
.main-nav a small { margin: 0; }
.main-nav a.active { color: var(--red); }
.nav-badge {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--red); color: var(--on-action); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--card);
}
@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .top { padding: 10px 24px; }
  .main-nav { position: static; display: flex; gap: 2px; border: 0; background: none; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .main-nav a { flex-direction: row; min-height: 40px; padding: 0 14px; border-radius: var(--radius-m); gap: 8px; color: var(--ink-soft); }
  .main-nav a svg { width: 18px; height: 18px; }
  .main-nav a span { flex-direction: row; gap: 4px; font-size: 15px; }
  .main-nav a:hover { color: var(--ink); background: var(--paper-deep); }
  .main-nav a.active { color: var(--red); background: var(--red-soft); }
  .nav-badge { position: static; margin-left: 2px; box-shadow: none; }
}
@media (max-width: 420px) { .brand-sub { display: none; } .brand-name { font-size: 16px; } }

/* ---------- buttons, chips, segmented controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--card); color: var(--ink);
  font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center; box-shadow: var(--shadow-s);
  transition: background-color .15s ease-out, border-color .15s ease-out, transform .1s ease-out;
}
.btn:hover { border-color: var(--ink-faint); }
.btn:active { transform: translateY(1px); }
.btn small { color: inherit; opacity: .75; }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--on-action); box-shadow: 0 1px 2px rgba(120, 30, 20, .2), 0 6px 16px rgba(168, 46, 37, .22); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-go { background: var(--green); border-color: var(--green); color: var(--on-action); }
.btn-go:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-gold { background: var(--gold-soft); border-color: var(--gold-line); }
.btn-quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-soft); }
.btn-quiet:hover { background: var(--paper-deep); border-color: transparent; color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; transform: none; }
.btn-block { width: 100%; }
.chip {
  min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card);
  font-size: 14px; color: var(--ink-soft); white-space: nowrap;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-action); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.segs { display: flex; gap: 2px; padding: 3px; border-radius: var(--radius-m); background: var(--paper-deep); max-width: 520px; }
.seg {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 12px;
  border: 0; border-radius: 9px; background: none; color: var(--ink-soft); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.seg b { font-weight: 600; }
.seg small { margin: 0; font-weight: 400; }
.seg[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-s); }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--paper-deep); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); }
.pill svg { width: 14px; height: 14px; }
.pill-done { background: var(--green-soft); color: var(--green); }
.pill-going { background: var(--gold-soft); color: var(--gold); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--field); color: var(--red); font-size: 12px; font-weight: 700; }
kbd { font-family: var(--sans); font-size: 11px; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; opacity: .6; margin-left: 4px; }
@media (hover: none) { kbd { display: none; } }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink-soft);
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------- shared pieces ---------- */
.bar { height: 6px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; margin: 8px 0 4px; }
.bar-fill { height: 100%; background: var(--blue); border-radius: 999px; transition: width .3s ease-out; }
.film-meta { font-size: 13px; color: var(--ink-soft); }
.film-status { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.crumb { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.crumb svg { width: 18px; height: 18px; }
.crumb:hover { color: var(--ink); }
.section-title { margin: 32px 0 12px; font-size: 20px; }
.section-title span { font-size: 13px; }
.empty { color: var(--ink-soft); }
.big { font-size: 20px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.page-head h1 { margin: 8px 0 2px; }
.page-head p { margin: 0; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--red); letter-spacing: .04em; }
.label { font-size: 14px; color: var(--ink-soft); margin-right: 4px; }
.hint-line { font-size: 14px; color: var(--ink-soft); margin: 8px 0 12px; }
.note { font-size: 14px; color: var(--ink-soft); margin: 0; }
.source { font-size: 12px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.linkish { border: 0; background: none; width: 100%; text-decoration: underline; cursor: pointer; font: inherit; color: var(--ink-soft); }
.foot { text-align: center; font-size: 12px; color: var(--ink-faint); padding: 24px 16px 32px; }
.foot a { color: var(--ink-soft); text-decoration: underline; text-underline-offset: 2px; }
.text-field {
  width: 100%; min-height: 48px; font: inherit; font-size: 16px; padding: 8px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--field); color: var(--ink);
}
.text-field:focus, textarea:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(227, 154, 85, .30); }
.text-field::placeholder, textarea::placeholder { color: var(--ink-faint); }
.select { min-height: 44px; max-width: 100%; font: inherit; font-size: 15px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--field); color: var(--ink); }
.field-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.switch, .toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.switch input, .toggle input { width: 18px; height: 18px; accent-color: var(--green); }

/* a surface: white, a hairline, a soft shadow (cards, rows in lists, panels) */
.continue, .stat, .film-card, .clip-row, .card, .word-row, .review-card, .signin-card, .pick, .nb-group, .book-card, .bubble, .solved, .names-box, .unit {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- the tutor fox: a painted card, one picture per mood ---------- */
.fox-slot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fox-slot .fox-img {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius); background: var(--paper-deep); box-shadow: var(--shadow); transform-origin: 50% 85%;
}
.fox-large { width: 96px; }
.fox-small { width: 72px; }
.fox-small .fox-img { border-radius: var(--radius-m); }
@media (min-width: 760px) { .fox-large { width: 128px; } .fox-small { width: 88px; } }
.fox-img.fox-pop { animation: fox-pop .28s ease-out; }
.fox-img.fox-pop.fox-cheer { animation: fox-hop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fox-pop { from { transform: scale(.92); opacity: .6; } to { transform: scale(1); opacity: 1; } }
@keyframes fox-hop { 0% { transform: scale(.92); } 45% { transform: translateY(-10px) scale(1.04); } 100% { transform: translateY(0) scale(1); } }
.fox-caption { font-size: 11px; color: var(--ink-soft); text-align: center; line-height: 1.2; }
.bubble { position: relative; padding: 12px 16px; font-size: 15px; min-height: 48px; flex: 1; box-shadow: var(--shadow-s); }
.bubble::before {
  content: ""; position: absolute; left: -7px; top: 22px; width: 12px; height: 12px; background: var(--card);
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
.bubble .zh { display: block; color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.bubble .btn { margin-top: 12px; }
.bubble .controls .btn { margin-top: 0; }
.welcome, .fox-say { display: flex; gap: 14px; align-items: flex-start; margin: 8px 0 16px; }
.fox-say { margin: 0 0 12px; }
.welcome .bubble, .fox-say .bubble { font-size: 16px; }

/* the verdict after a Check: a printed stamp (the site's vintage touch), then the count */
.fox-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 6px; }
.verdict-stamp {
  display: inline-block; font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.1;
  padding: 4px 10px 5px; border: 2px solid currentColor; border-radius: var(--radius-s); transform: rotate(-2deg); background: var(--card);
}
.verdict-stamp small { font-family: var(--sans); font-size: 12px; font-weight: 600; margin-left: 2px; color: inherit; opacity: .85; }
.verdict-count { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.fox-verdict-right .verdict-stamp, .verdict-stamp.fox-verdict-right { color: var(--green); background: var(--green-soft); }
.fox-verdict-close .verdict-stamp, .verdict-stamp.fox-verdict-close { color: var(--gold); background: var(--gold-soft); }
.fox-verdict-low .verdict-stamp, .verdict-stamp.fox-verdict-low { color: var(--red); background: var(--red-soft); }
.fox-verdict .verdict-stamp { animation: stamp-in .3s ease-out; }
@keyframes stamp-in { from { transform: rotate(-2deg) scale(1.25); opacity: 0; } to { transform: rotate(-2deg) scale(1); opacity: 1; } }
.verdict-line { margin: 4px 0; }
.verdict-line .verdict-stamp { color: var(--green); background: var(--green-soft); }
.verdict-line .verdict-stamp.fox-verdict-close { color: var(--gold); background: var(--gold-soft); }
.verdict-line .verdict-stamp.fox-verdict-low { color: var(--red); background: var(--red-soft); }

/* ---------- home ---------- */
.continue { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 12px; margin-bottom: 16px; }
.continue img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.continue-title { font-family: var(--serif); font-weight: 700; line-height: 1.3; }
.continue-go { width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: var(--on-action); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(168, 46, 37, .25); }
.continue:hover .continue-go { background: var(--red-dark); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0 16px; }
.stats:has(> .stat:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .stats:has(> .stat:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 12px 14px; box-shadow: var(--shadow-s); }
.stat b { display: block; font-size: 24px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.35; }
.stat span small { display: block; margin: 0; font-size: 12px; }
.stat-link { display: block; transition: border-color .15s ease-out; }
.stat-link:hover { border-color: var(--line-strong); }
.stat-link b { color: var(--red); }
@media (max-width: 420px) { .stat { padding: 10px 12px; } .stat b { font-size: 22px; } .stat span { font-size: 12px; } }
.filters { padding-top: 8px; margin-top: 8px; }
.filters .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters .chips .chip { flex: none; }
.shelf h2 { margin: 28px 0 12px; font-size: 20px; }
.film-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.film-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .18s ease-out, box-shadow .18s ease-out; }
.film-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-l); }
.cover { position: relative; background: var(--night); }
.cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.series-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; }
.cover .series-badge { position: absolute; left: 10px; top: 10px; box-shadow: var(--shadow-s); }
.series-retro { background: var(--gold-soft); color: var(--gold); }
.series-cinema { background: var(--blue-soft); color: var(--blue); }
.film-body { padding: 12px 14px 14px; }
.film-name { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.3; }
.film-zh { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- film page ---------- */
.film-hero { display: grid; gap: 20px; margin: 8px 0 12px; }
.film-hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.film-hero h1 { margin: 4px 0 2px; font-size: 26px; }
.blurb { font-family: var(--serif); font-size: 17px; margin: 12px 0; }
.film-hero .btn { margin-top: 16px; }
@media (min-width: 760px) { .film-hero { grid-template-columns: 5fr 6fr; align-items: start; } .film-hero h1 { font-size: 30px; } }
.clip-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.clip-row { display: grid; grid-template-columns: 40px 1fr; gap: 12px 14px; padding: 14px 16px; box-shadow: var(--shadow-s); }
.clip-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; background: var(--paper-deep); color: var(--ink-soft); }
.clip-head { display: flex; align-items: center; gap: 10px; }
.clip-teaser { font-family: var(--serif); color: var(--ink); margin: 4px 0 2px; }
.clip-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.clip-actions .btn { padding: 0 6px; gap: 6px; }
@media (min-width: 760px) {
  .clip-row { grid-template-columns: 40px 1fr auto; align-items: center; }
  .clip-actions { grid-column: 3; display: flex; }
  .clip-actions .btn { padding: 0 14px; }
}

/* ---------- lesson: Watch, Dictation, Words ---------- */
.lesson-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.lesson-title { font-family: var(--serif); font-weight: 700; font-size: 18px; }
.lesson-title, .page-head h1 { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lesson-progress { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 180px; font-size: 13px; color: var(--ink-soft); }
.lesson-progress .bar { flex: 1; margin: 0; }
.step-link {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font-family: var(--sans);
}
.step-link svg { width: 18px; height: 18px; }
.step-link:hover { border-color: var(--ink-faint); }
.step-off { opacity: .35; }
.page-head h1 .step-link { font-size: 16px; }
/* the three modes of a clip: underlined tabs, as in Flinty */
.tabs { display: flex; gap: 4px; margin: 12px 0 20px; border-bottom: 1px solid var(--line); }
.tabs .tab {
  flex: 1; max-width: 200px; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 8px 6px;
  font-weight: 600; color: var(--ink-soft); border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs .tab span { display: flex; flex-direction: column; line-height: 1.2; }
.tabs .tab small { margin: 0; }
.tabs .tab:hover { color: var(--ink); }
.tabs .tab[aria-current="page"], .tabs .tab[aria-selected="true"] { color: var(--red); border-bottom-color: var(--red); }
@media (min-width: 560px) { .tabs .tab span { flex-direction: row; gap: 6px; align-items: baseline; } }
.clip-nav { display: flex; justify-content: space-between; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 12px; }

.player { position: relative; border-radius: var(--radius); overflow: hidden; background: #1A1210; box-shadow: var(--shadow); }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #1A1210; cursor: pointer; }
.player.dictating video { cursor: default; }
.slot-small .player { box-shadow: none; }
.subs { position: absolute; left: 0; right: 0; bottom: 9%; text-align: center; pointer-events: none; padding: 0 6%; }
.subs .en, .subs .zh { display: inline-block; background: rgba(20, 16, 14, .74); color: var(--on-action); padding: 2px 10px; border-radius: 6px; font-size: clamp(14px, 2.4vw, 20px); margin-top: 4px; }
.subs .zh { color: #F8EBCB; font-size: clamp(13px, 2.1vw, 18px); }
.player.dictating .subs { display: none; }
.player.watching .subs { bottom: calc(62px + 5%); }
.clip-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #16130F; color: var(--on-band); }
.clip-play { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--red); color: var(--on-action); display: grid; place-items: center; }
.clip-play .icon-pause { display: none; }
.player.playing .clip-play .icon-play { display: none; }
.player.playing .clip-play .icon-pause { display: block; }
.clip-play svg { fill: currentColor; }
.clip-play .icon-pause { fill: none; stroke-width: 3; }
#clipSeek { flex: 1; min-width: 0; height: 44px; accent-color: var(--gold); cursor: pointer; }
.clip-time { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clip-done { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.sub-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 8px; }
@media (max-width: 559px) { .sub-modes .label { flex-basis: 100%; } }

/* Watch: the transcript; on wide screens the clip stays on the left and the lines scroll beside it */
.transcript { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.transcript li { display: flex; align-items: stretch; gap: 4px; border-radius: var(--radius-m); }
.transcript li > button[data-action="seek"] {
  flex: 1; min-width: 0; text-align: left; border: 0; background: none; border-radius: var(--radius-m);
  padding: 10px 12px; display: grid; grid-template-columns: 44px 1fr; gap: 8px;
}
.transcript li > button[data-action="seek"]:hover { background: var(--paper-deep); }
.transcript li.now { background: var(--card); box-shadow: var(--shadow-s); outline: 1px solid var(--line); }
.transcript li.now .t-en { font-weight: 600; }
.t-time { font-size: 12px; color: var(--ink-faint); padding-top: 3px; font-variant-numeric: tabular-nums; }
.t-en { display: block; }
.t-zh { display: block; font-size: 14px; color: var(--ink-soft); }
mark.vocab { background: var(--gold-soft); color: inherit; border-bottom: 2px solid var(--gold-line); padding: 0 2px; border-radius: 3px; }
button.vocab-link { border: 0; padding: 0 2px; font: inherit; background: var(--gold-soft); border-bottom: 2px solid var(--gold-line); border-radius: 3px; }
@media (min-width: 1000px) {
  .watch-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
  .watch-main { position: sticky; top: 92px; }
  .watch-side .hint-line { margin-top: 0; }
  .watch-side .transcript { max-height: calc(100vh - 190px); overflow-y: auto; padding: 2px 6px 2px 2px; scrollbar-width: thin; }
}
/* the bookmark beside a line: saves the whole sentence */
.line-save { flex: none; width: 44px; min-height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-faint); border-radius: 10px; padding: 0; }
.line-save:hover { background: var(--paper-deep); color: var(--ink); }
.line-save[aria-pressed="true"] { color: var(--red); }
.line-save[aria-pressed="true"] svg { fill: var(--red); }
.solved-line .line-save { display: inline-grid; vertical-align: middle; width: 36px; min-height: 36px; }

/* Dictation */
.dict-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .dict-grid { grid-template-columns: 5fr 6fr; align-items: start; } }
.line-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--card); padding: 0; }
.dot-done { background: var(--green); border-color: var(--green); }
.dot-now { outline: 2px solid var(--red); outline-offset: 2px; }
/* a play button while its sound plays: a small square in place of the triangle; press again to stop */
.is-playing svg { display: none; }
.is-playing::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 2px; background: currentColor; }
.names-box { margin-top: 16px; padding: 12px 14px; border-style: dashed; box-shadow: none; }
.name-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.name-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 10px; border-radius: var(--radius-s); font-family: var(--serif); font-weight: 700; font-size: 16px; background: var(--green-soft); color: var(--green); }
.names-box .note { margin: 4px 0 0; font-size: 13px; }
textarea {
  width: 100%; font: inherit; font-size: 18px; line-height: 1.45; padding: 12px 14px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-m); background: var(--field); color: var(--ink); resize: vertical; box-shadow: inset 0 1px 2px rgba(45, 32, 18, .04);
}
#turns { display: grid; gap: 16px; margin-top: 8px; }
.turn { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.turn:last-child { border-bottom: 0; padding-bottom: 0; }
.turn-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.speaker { display: inline-block; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.speaker::after { content: ":"; }
.speaker-narrator { background: var(--paper-deep); }
.speaker-0 { background: var(--gold-soft); }
.speaker-1 { background: var(--blue-soft); }
.speaker-2 { background: var(--green-soft); }
.speaker-3 { background: var(--red-soft); }
.play-turn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card); display: grid; place-items: center; padding: 0; }
.play-turn svg { width: 15px; height: 15px; fill: currentColor; }
.play-turn-slow { width: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.play-turn-slow svg { fill: none; }
.turn-check-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.turn-done { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 700; font-size: 14px; }
.turn-done svg { stroke: var(--green); }
.dict-actions { position: sticky; bottom: 0; z-index: 6; background: var(--paper); backdrop-filter: blur(8px); padding: 10px 0; margin-top: 12px; border-top: 1px solid var(--line); }
.dict-actions:empty, .dict-actions:not(:has(.btn:not([hidden]))) { display: none; }
@media (max-width: 759px) { .dict-actions { bottom: calc(57px + env(safe-area-inset-bottom)); } }
.keys { font-size: 12px; color: var(--ink-faint); margin: 8px 0 0; }
/* the word boxes under a typed line */
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.w { display: inline-flex; align-items: center; min-height: 36px; padding: 2px 9px; border-radius: var(--radius-s); font-size: 17px; font-family: var(--serif); border: 1.5px solid var(--line-strong); background: var(--card); }
.w.ok { background: var(--green-soft); border-color: transparent; color: var(--green); font-weight: 600; }
.w.gap { background: transparent; border-style: dashed; border-color: var(--ink-faint); letter-spacing: 3px; color: var(--ink-faint); }
.w.gap b { color: var(--red); letter-spacing: 0; }
.w .hyphen { color: var(--red); font-weight: 700; padding: 0 1px; }
.w.shown { background: var(--red-soft); border-color: transparent; color: var(--red); }
.w.ok, .w.shown { animation: pop .2s ease-out; }
@keyframes pop { from { transform: scale(.92); } to { transform: scale(1); } }
/* a wrong guess shown in its gap, in red, above the dashes */
.w.has-guess { flex-direction: column; align-items: flex-start; gap: 0; padding: 3px 9px 2px; border-color: var(--red); }
.w.has-guess .guess { color: var(--red); font-size: 15px; line-height: 1.2; letter-spacing: 0; font-weight: 600; }
.w.has-guess .guess s { text-decoration-thickness: 2px; }
.w.has-guess .guess u.bad, .spelt u.bad { text-decoration: underline wavy var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px; background: var(--red-soft); border-radius: 2px; }
.w.has-guess .guess i.miss, .spelt i.miss { display: inline-block; width: 2px; height: .95em; margin: 0 2px; background: var(--red); vertical-align: -2px; border-radius: 1px; }
.w.has-guess .dashes { font-size: 14px; line-height: 1.2; }
.solved { margin-top: 16px; padding: 14px 16px; background: var(--green-soft); border-color: transparent; box-shadow: none; }
.solved-turn { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.solved-turn + .solved-turn { margin-top: 12px; }
.solved-en { font-family: var(--serif); font-size: 18px; }
.solved-zh { color: var(--ink-soft); margin-top: 4px; }

/* ---------- word cards (a clip's Words tab) ---------- */
.cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 90px; box-shadow: var(--shadow-s); }
.card.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { background: var(--gold-soft); } 100% { background: var(--card); } }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; }
.kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 999px; align-self: flex-start; color: var(--ink-soft); background: var(--paper-deep); }
.kind-slang { background: var(--red-soft); color: var(--red-text); }
.kind-phrase { background: var(--gold-soft); color: var(--gold); }
.kind-word { background: var(--green-soft); color: var(--green); }
.kind-everyday { background: var(--blue-soft); color: var(--blue); }
.kind-unit { background: var(--wrong-soft); color: var(--wrong); }
.kind-sentence { background: var(--blue-soft); color: var(--blue); }
.phrase { font-size: 22px; margin: 0; }
.card .zh { font-size: 16px; }
.example { font-family: var(--serif); font-size: 16px; border-left: 3px solid var(--gold-line); padding-left: 12px; margin: 4px 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.card-actions .btn { box-shadow: none; }
.star[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold-line); }
.star[aria-pressed="true"] svg { fill: var(--gold); stroke: var(--gold); }

/* ---------- word books (词汇书) ---------- */
.books { display: grid; gap: 16px; margin-top: 8px; }
@media (min-width: 760px) { .books { grid-template-columns: 1fr 1fr; } }
.book-card { display: grid; grid-template-columns: 56px 1fr; overflow: hidden; transition: transform .18s ease-out, box-shadow .18s ease-out; }
.book-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-l); }
.book-spine { display: grid; place-items: center; }
.book-spine span { writing-mode: vertical-rl; font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .2em; color: var(--on-action); }
.book-basic .book-spine { background: var(--green); }
.book-advanced .book-spine { background: var(--red); }
.book-body { padding: 16px 18px 18px; }
.book-body h2 { margin: 4px 0 4px; font-size: 24px; }
.book-about { font-weight: 600; margin: 0 0 6px; }
.source-note { margin-top: 18px; }
.units { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.unit { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; min-height: 68px; box-shadow: var(--shadow-s); border-radius: var(--radius-m); transition: border-color .15s ease-out; }
.unit:hover { border-color: var(--line-strong); }
.unit b { font-size: 17px; }
.unit-first { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-count { font-size: 12px; font-weight: 600; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.unit-going { border-color: var(--gold-line); background: var(--gold-soft); }
.unit-going .unit-count { color: var(--gold); }
.unit-done { border-color: var(--green); background: var(--green-soft); }
.unit-done .unit-count { color: var(--green); }
.unit-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.word-rows { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 860px; }
.word-row { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-s); }
.word-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.book-word { font-family: var(--serif); font-size: 24px; font-weight: 700; }
.phonetic { color: var(--ink-soft); font-family: "Lucida Sans Unicode", "Arial Unicode MS", var(--sans); font-size: 15px; }
.exam-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); margin-right: 4px; }
.meaning { font-size: 15px; }
.meanings-hidden .meaning, .meanings-hidden .example .t-zh { filter: blur(6px); transition: filter .15s; }
.meanings-hidden .word-row:hover .meaning, .meanings-hidden .word-row:hover .t-zh { filter: none; }
.ex-source { display: inline-block; margin-top: 2px; font-family: var(--sans); font-size: 11px; color: var(--ink-faint); text-decoration: underline; text-underline-offset: 2px; }
span.ex-source { text-decoration: none; }
.example-missing { color: var(--ink-soft); font-family: var(--sans); font-size: 13px; border-left-style: dashed; }
.in-films ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.in-films li { display: grid; grid-template-columns: 36px 1fr; gap: 8px; align-items: center; }
.in-films li > span { display: flex; flex-direction: column; }
.film-line { font-family: var(--serif); }
.word-row .card-actions .btn { box-shadow: none; }
/* word sounds: a round sound button before each word, and the US / UK switch */
.word-sound-big { width: 44px; height: 44px; }
.word-sound.is-playing { background: var(--ink); border-color: var(--ink); color: var(--on-action); }
.accent-switch { max-width: 220px; }
.accent-switch .seg { font-size: 13px; padding: 0 12px; min-height: 36px; }
body:not(.has-word-sounds) .word-sound, body:not(.has-word-sounds) .accent-switch { display: none; }

/* ---------- My words (生词本) ---------- */
.nb-tabs { margin-bottom: 12px; }
.nb-tabs .tab .count, .nb-group summary .count { font-size: 12px; font-weight: 700; color: var(--ink-soft); background: var(--paper-deep); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.nb-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 8px; }
.search { flex: 1 1 220px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--field); color: var(--ink-faint); }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(227, 154, 85, .30); }
.nb-group { margin: 12px 0; overflow: hidden; box-shadow: var(--shadow-s); }
.nb-group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 16px; cursor: pointer; font-family: var(--serif); font-weight: 700; }
.nb-group summary::-webkit-details-marker { display: none; }
.nb-group summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); margin: 0 4px 4px; transition: transform .15s ease-out; }
.nb-group[open] summary::after { transform: rotate(-135deg); margin-bottom: 0; }
.nb-group-title { flex: 1; min-width: 0; }
.nb-group-title small { font-family: var(--sans); font-weight: 400; margin-left: 6px; font-size: 13px; }
.nb-rows { list-style: none; margin: 0; padding: 0; }
.nb-group .nb-rows { border-top: 1px solid var(--line); }
.nb-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 64px; border-bottom: 1px solid var(--line); }
.nb-row:last-child { border-bottom: 0; }
.nb-main { flex: 1; min-width: 0; }
.nb-term { font-family: var(--serif); font-size: 18px; }
.nb-line { font-family: var(--serif); font-size: 17px; }
.nb-zh { color: var(--ink-soft); font-size: 14px; overflow-wrap: anywhere; }
.nb-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.nb-actions { display: flex; align-items: center; gap: 6px; flex: none; }
@media (max-width: 520px) { .nb-row { flex-wrap: wrap; } .nb-actions { margin-left: 24px; } }
.state-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-strong); }
.state-learning { background: var(--gold); border-color: var(--gold); }
.state-known { background: var(--green); border-color: var(--green); }
.badge-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin: 6px 6px 0 0; }
.tag-zhan { background: var(--green-soft); color: var(--green); }
.tag-hard { background: var(--red-soft); color: var(--red); }
.nb-check { width: 20px; height: 20px; flex: none; accent-color: var(--red); margin: 0; }
.nb-bar {
  position: sticky; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-l);
}
.nb-bar-count { font-weight: 700; margin-right: auto; }
@media (max-width: 759px) { .nb-bar { bottom: calc(62px + env(safe-area-inset-bottom)); } }

/* ---------- review ---------- */
.review-count { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); max-width: 560px; margin: 0 auto; font-variant-numeric: tabular-nums; }
.review-count .bar { flex: 1; }
.review-count .pill { flex: none; }
.review-card { max-width: 560px; margin: 16px auto; padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: var(--shadow-l); }
.huge { font-size: 36px; margin: 4px 0; }
.review-word { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.review-word .phrase { margin: 0; }
.review-card .accent-switch { margin: 0 auto; }
.review-back { border-top: 1px solid var(--line); padding-top: 16px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.review-back .example { text-align: left; }
.review-card .controls { justify-content: center; }
.review-sentence textarea { width: 100%; }
.review-sentence .slots { justify-content: center; }
.zhan { min-height: 36px; padding: 0 12px; font-family: var(--serif); font-weight: 700; color: var(--red); border: 1px solid var(--line-strong); background: var(--card); box-shadow: none; }
.zhan small { font-family: var(--sans); font-weight: 600; color: inherit; }
/* the three grades: one even row; the wait each would give sits under its name */
.grade-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 8px; }
.grade { flex-direction: column; gap: 0; min-height: 64px; padding: 8px 4px; line-height: 1.2; position: relative; }
.grade span { font-size: 17px; font-weight: 700; }
.grade span small { display: block; margin: 0; font-size: 12px; font-weight: 600; color: inherit; opacity: .8; }
.grade .wait { font-size: 12px; font-weight: 600; opacity: .75; margin-top: 2px; }
.grade kbd { position: absolute; top: 4px; right: 6px; margin: 0; }
@media (hover: none) { .grade kbd, .review-card kbd { display: none; } }
.spelt { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--red); margin-left: 8px; }
.spell-field { max-width: 360px; text-align: center; font-family: var(--serif); font-size: 24px; }
/* 自选: a folding panel under the start */
.pick { margin: 8px 0 24px; box-shadow: var(--shadow-s); }
.pick summary { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 8px 18px; cursor: pointer; font-weight: 700; list-style: none; }
.pick summary::-webkit-details-marker { display: none; }
.pick summary small { font-weight: 400; }
.pick summary svg { color: var(--ink-soft); transition: transform .15s ease-out; }
.pick[open] summary svg { transform: rotate(180deg); }
#pickPanel { padding: 8px 18px 18px; border-top: 1px solid var(--line); }
.pick-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 12px; align-items: center; padding: 6px 0; }
.pick-row .chips { margin: 0; }
.pick-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.pick-selects { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-go { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; }
@media (max-width: 600px) {
  .pick-row { grid-template-columns: 1fr; }
  .pick-row .chips-scroll { margin-right: -18px; padding-right: 18px; }
}
.scopes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 16px; }

/* ---------- progress ---------- */
.calendar { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; max-width: 520px; }
.day { aspect-ratio: 1; border-radius: 4px; background: var(--paper-deep); }
.day-1 { background: var(--heat-1); }
.day-2 { background: var(--heat-2); }
.day-3 { background: var(--heat-3); }
.legend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-faint); margin-top: 8px; }
.legend .day { width: 12px; height: 12px; aspect-ratio: auto; }
.progress-row { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.progress-row img { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.progress-info b { font-family: var(--serif); }

/* ---------- account, sign-in, about, toast ---------- */
.account { flex: none; }
.account-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--on-action); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.account-btn svg { width: 18px; height: 18px; }
.account-btn span { display: flex; flex-direction: column; line-height: 1.1; }
.account-btn small { margin: 0; font-size: 11px; }
.account-menu { position: relative; }
.account-avatar {
  list-style: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--red); color: var(--on-action); font-weight: 700; font-size: 17px; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line-strong);
}
.account-avatar::-webkit-details-marker { display: none; }
.account-menu .menu {
  position: absolute; right: 0; top: 50px; z-index: 30; min-width: 220px; display: flex; flex-direction: column;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-l); padding: 6px;
}
.account-menu .menu a, .account-menu .menu button { text-align: left; min-height: 44px; padding: 10px 12px; border: 0; background: none; border-radius: var(--radius-s); font-weight: 600; }
.account-menu .menu a:hover, .account-menu .menu button:hover { background: var(--paper-deep); }
.menu-name { padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-weight: 700; display: flex; flex-direction: column; }
.menu-name small { margin: 0; font-weight: 400; }
/* narrow phones: the language button keeps only its globe, so the name fits */
@media (max-width: 420px) {
  .account-btn { padding: 0 12px; }
  .account-btn span small { display: none; }
  .lang-switch { width: 36px; padding: 0; justify-content: center; }
  .lang-switch .lang-names { display: none; }
  .brand { min-width: 0; }
  .brand-name { overflow: hidden; text-overflow: ellipsis; }
}

.signin-card { max-width: 440px; margin: 24px auto; padding: 24px; box-shadow: var(--shadow-l); }
.signin-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.signin-head h1 { margin: 0 0 4px; }
.signin-head h1 span { display: block; margin: 2px 0 0; }
.signin-head p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.signin-head small { margin: 0; }
.signin-tabs { margin-top: 18px; }
.signin-tabs .tab { max-width: none; }
.signin-form { display: flex; flex-direction: column; gap: 6px; }
.signin-form .field-label { margin-top: 10px; margin-bottom: 0; }
.signin-form .btn-primary { margin-top: 16px; }
.phone-field { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--field); overflow: hidden; }
.phone-field .country { display: grid; place-items: center; padding: 0 12px; font-weight: 700; background: var(--paper-deep); border-right: 1px solid var(--line); }
.phone-field input { flex: 1; min-width: 0; min-height: 48px; border: 0; font: inherit; font-size: 16px; padding: 8px 12px; outline: none; }
.phone-field:focus-within { border-color: var(--ink); }
.code-field { display: flex; gap: 8px; }
.code-field .btn { flex: none; white-space: nowrap; }
.code-field .btn small { margin-left: 4px; }
.consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--red); }
.consent a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.form-error { color: var(--red); font-size: 14px; min-height: 20px; margin: 4px 0; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; text-align: center; }
.qr { width: 168px; height: 168px; border: 1px solid var(--line-strong); border-radius: 10px; background: repeating-conic-gradient(var(--ink) 0 25%, var(--on-action) 0 50%) 0 0 / 24px 24px; box-shadow: inset 0 0 0 12px var(--on-action); }
.qr-box p { margin: 0; }
.skip { display: block; text-align: center; margin-top: 16px; min-height: 44px; padding-top: 10px; color: var(--ink-soft); font-weight: 600; }
.skip small { display: block; margin: 0; }

.about { max-width: 720px; }
.about section { margin-bottom: 24px; }
.about h2 { font-size: 20px; margin: 0 0 8px; }
.about h2 span { font-size: 14px; }
.about a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.about li { margin-bottom: 6px; }

.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 12px;
  background: var(--night); color: var(--on-band); border-radius: var(--radius-m); padding: 10px 12px 10px 16px; box-shadow: var(--shadow-l);
  max-width: calc(100vw - 32px); font-size: 15px;
}
.toast-undo { border: 0; background: rgba(251, 239, 226, .14); color: var(--on-action); border-radius: var(--radius-s); min-height: 36px; padding: 0 12px; font-weight: 700; }
.toast-in { animation: toast-up .22s ease-out; }
@keyframes toast-up { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 760px) { .toast { bottom: 28px; } }

/* ---------- phones: rows of chips scroll sideways; small buttons keep to one language ---------- */
@media (max-width: 600px) {
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .chips-scroll .chip { flex: none; }
  .code-field .btn small { display: none; }
  .nb-tabs .tab { padding: 8px 4px; }
}


/* ---------- Today: the goal ring, the week, the streak (home card and the side column) ---------- */
.today { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 4px 0 24px; }
.today-hello { display: flex; gap: 12px; align-items: flex-start; }
.today-words { flex: 1; font-size: 15px; padding-top: 2px; }
.today-words .zh { display: block; color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.today-nums { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.today-num { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 4px; border-radius: var(--radius-m); }
.today-num > div { display: flex; flex-direction: column; min-width: 0; }
.today-num b { font-size: 18px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.today-goal b { font-size: 15px; }
.today-num span { font-size: 12px; color: var(--ink-soft); line-height: 1.3; }
.today-link:hover { background: var(--paper-deep); }
.today-link b { color: var(--red); }
.today-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--paper-deep); color: var(--ink-soft); }
.today-icon svg { width: 18px; height: 18px; }
.today-icon-flame { background: var(--flame-soft); color: var(--flame); }
.today-icon-red { background: var(--red-soft); color: var(--red); }
.flame { fill: currentColor; stroke: none; }
.today .continue { margin: 14px 0 0; box-shadow: none; background: var(--paper); border-color: var(--line); }
@media (max-width: 420px) {
  .today-nums { grid-template-columns: 1fr 1fr 1fr; }
  .today-goal > div:not(.ring) { display: none; }
  .today-num { justify-content: center; }
}
.ring { position: relative; width: 52px; height: 52px; flex: none; }
.ring svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.ring-track { stroke: var(--paper-deep); }
.ring-fill { stroke: var(--gold); transition: stroke-dasharray .4s ease-out; }
.ring-done .ring-fill { stroke: var(--green); }
.ring > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.ring > span b { font-size: 16px; line-height: 1; }
.ring > span small { margin: 0; font-size: 11px; }
.ring-done > span { color: var(--green); }
.ring-done > span svg { width: 22px; height: 22px; stroke-width: 3; }
.week { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0; margin: 8px 0 0; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.week-name { font-size: 12px; color: var(--ink-faint); font-weight: 600; }
.week-dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-deep); color: var(--on-action); }
.week-dot svg { width: 15px; height: 15px; stroke-width: 3; }
.week-done .week-dot { background: var(--flame); }
.week-later .week-dot { background: transparent; border: 1.5px dashed var(--line-strong); }
.week-today .week-name { color: var(--ink); }
.week-today .week-dot { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--flame); }
.streak-chip { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--flame); font-variant-numeric: tabular-nums; }
.streak-chip svg { width: 18px; height: 18px; }

/* Progress: the streak first, then the numbers, the week of reviews ahead, the calendar, the films */
.streak-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 8px 0 16px; }
.streak-count { display: flex; align-items: baseline; gap: 6px; color: var(--flame); }
.streak-count svg { width: 26px; height: 26px; align-self: center; }
.streak-count b { font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.streak-count span { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.streak-goal { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; color: var(--ink-soft); }
@media (max-width: 520px) {
  .streak-hero { grid-template-columns: 1fr auto; }
  .streak-hero .fox-slot { display: none; }
}
.forecast { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; max-width: 520px; height: 128px; padding: 12px 14px 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); }
.fc-day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.fc-bar { width: 100%; max-width: 28px; border-radius: 6px 6px 3px 3px; background: var(--heat-1); }
.fc-day:first-child .fc-bar { background: var(--red); }
.fc-count { font-size: 12px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; min-height: 16px; }
.fc-name { font-size: 12px; color: var(--ink-faint); white-space: nowrap; }

/* the column beside the page (wide screens only) */
.rail { display: none; }
.rail-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s); padding: 16px; }
.rail-card h2 { font-family: var(--sans); font-size: 16px; margin: 0 0 4px; letter-spacing: 0; }
.rail-card p { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.rail-head { display: flex; justify-content: space-between; align-items: center; }
.rail-goal { display: flex; gap: 14px; align-items: center; }
.rail-goal p { margin: 0; }
.rail-signin { background: var(--paper-deep); box-shadow: none; }

/* a review session: the tab bar steps aside on phones, as in learning apps */
@media (max-width: 759px) {
  body.in-session { padding-bottom: 0; }
  body.in-session .main-nav { display: none; }
  body.in-session .foot { display: none; }
}

/* ---------- wide screens: a side menu on the left, the page, today's column on the right ---------- */
@media (min-width: 1100px) {
  body { padding-left: 240px; }
  .top {
    position: fixed; top: 0; left: 0; bottom: 0; width: 240px; z-index: 20;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 24px;
    padding: 24px 16px; border-bottom: 0; border-right: 1px solid var(--line); background: var(--paper);
  }
  .brand { padding: 0 8px; }
  .main-nav { flex-direction: column; gap: 4px; }
  .main-nav a { min-height: 48px; padding: 0 14px; gap: 12px; font-size: 16px; justify-content: flex-start; }
  .main-nav a svg { width: 22px; height: 22px; }
  .main-nav a span { font-size: 16px; }
  .nav-badge { margin-left: auto; }
  .top-tools { margin-top: auto; flex-direction: column; align-items: stretch; gap: 10px; }
  .lang-switch { justify-content: center; min-height: 40px; }
  .account-btn { width: 100%; justify-content: center; min-height: 44px; }
  .account-menu .menu { top: auto; bottom: 52px; left: 0; right: auto; }
  .shell { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
  main { max-width: none; padding: 32px 0 48px; }
  body.has-rail .shell { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
  body.has-rail .rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; padding: 32px 0; }
  body.has-rail .today-nums { display: none; }
  .watch-main { top: 24px; }
  .toast { left: calc(50% + 120px); }
}

/* dictation: tap a word for its meaning; per-line Show answer and the line's Chinese */
.w-tap { cursor: pointer; transition: box-shadow .12s ease-out; }
.w-tap:hover, .w-tap:focus-visible { box-shadow: 0 0 0 2px currentColor; }
.turn-check-row { flex-wrap: wrap; }
.turn-extras { display: inline-flex; gap: 2px; margin-left: auto; }
.turn-extras .btn { min-height: 40px; padding: 0 10px; }
.turn-extras [data-action="turn-zh"][aria-pressed="true"] { background: var(--paper-deep); color: var(--ink); }
.turn-shown { font-size: 14px; font-weight: 600; color: var(--red); }
.turn-zh { margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--gold-line); background: var(--card); border-radius: 0 var(--radius-s) var(--radius-s) 0; color: var(--ink-soft); font-size: 15px; }
.word-pop {
  position: absolute; z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-l); padding: 12px 14px 14px; animation: pop-in .14s ease-out;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.pop-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pop-word { font-family: var(--serif); font-size: 22px; }
.pop-close { margin-left: auto; width: 36px; height: 36px; border-color: transparent; }
.pop-zh { margin-top: 6px; font-size: 15px; }
.word-pop .note, .word-pop .film-meta { margin: 6px 0 0; }
.pop-actions { display: flex; gap: 8px; margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ================= v2 (2026-12-04): 狐英语 Fox English =================
   Grey page, white surfaces with no outline, round buttons, one red button per screen,
   blue for progress and selection, the system typeface only. Night: html.night. */
body { transition: background-color .15s ease-out; }
h1, h2, h3 { letter-spacing: 0; font-weight: 800; }
h1 { font-size: 26px; }
.continue, .stat, .film-card, .clip-row, .card, .word-row, .review-card, .signin-card, .pick, .nb-group, .book-card, .bubble, .solved,
.names-box, .unit, .today, .streak-hero, .forecast, .rail-card, .nb-bar, .panel { border: 0; }
.top { background: var(--paper); border-bottom: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; box-shadow: none; }
.brand-name { font-size: 19px; font-weight: 800; }
.brand-sub { display: none; }
.main-nav { border-top: 1px solid var(--line); }
.main-nav a.active { color: var(--red-text); }
.nav-badge { box-shadow: 0 0 0 2px var(--card); }
@media (min-width: 760px) { .main-nav { border-top: 0; } .main-nav a.active { background: var(--card); color: var(--red-text); } .main-nav a:hover { background: var(--paper-deep); } }
@media (min-width: 1100px) { .top { border-right: 0; } }

.btn { border: 0; border-radius: 999px; background: var(--paper-deep); box-shadow: none; }
.btn:hover { background: var(--fill-h); }
.card .btn, .word-row .btn, .review-card .btn, .signin-card .btn, .clip-row .btn, .today .btn, .panel .btn, .nb-bar .btn, .word-pop .btn { background: var(--paper); }
.card .btn:hover, .word-row .btn:hover, .review-card .btn:hover, .clip-row .btn:hover { background: var(--paper-deep); }
.btn.btn-primary, .btn.btn-go { background: var(--red); color: var(--on-action); box-shadow: none; min-height: 52px; font-size: 16px; font-weight: 700; }
.btn.btn-primary:hover, .btn.btn-go:hover { background: var(--red-dark); }
.btn.btn-small.btn-primary { min-height: 44px; font-size: 15px; }
.btn.btn-gold { background: var(--gold-soft); color: var(--gold); }
.btn.btn-quiet { background: transparent; }
.btn.btn-quiet:hover { background: var(--paper-deep); }
.chip { border: 0; background: var(--card); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.card .chip, .pick .chip, .panel .chip { background: var(--paper); }
.card .chip[aria-pressed="true"], .pick .chip[aria-pressed="true"], .panel .chip[aria-pressed="true"] { background: var(--ink); }
.segs { border-radius: 999px; background: var(--paper-deep); }
.seg { border-radius: 999px; }
.icon-btn, .step-link, .play-turn { border: 0; background: var(--paper-deep); color: var(--ink); }
.card .icon-btn, .word-row .icon-btn, .review-card .icon-btn, .nb-row .icon-btn, .word-pop .icon-btn { background: var(--paper); }
.lang-switch { border: 0; background: var(--card); color: var(--ink-soft); }
.theme-switch { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--card); color: var(--ink); display: grid; place-items: center; padding: 0; }
.theme-switch svg { width: 18px; height: 18px; }
.theme-switch .icon-sun, html.night .theme-switch .icon-moon { display: none; }
html.night .theme-switch .icon-sun { display: block; }
.account-btn { background: var(--ink); color: var(--on-ink); border: 0; }
.account-avatar { box-shadow: none; }
.account-menu .menu { border: 0; }
.pill, .tag, .exam-tag, .kind { background: var(--paper); }
.pill-done { background: var(--green-soft); }
.pill-going { background: var(--blue-soft); color: var(--blue); }
.eyebrow { color: var(--ink-soft); letter-spacing: 0; }
.text-field, .select, textarea, .search, .phone-field { border: 1.5px solid transparent; background: var(--field); border-radius: var(--radius-m); box-shadow: none; }
html:not(.night) .signin-card .text-field, html:not(.night) .card .text-field, html:not(.night) .review-card .text-field { background: var(--paper); }
.text-field:focus, textarea:focus, .select:focus, .search:focus-within { border-color: var(--blue); }
.switch input, .toggle input, .nb-check, .consent input { accent-color: var(--blue); }
.consent a, .about a { color: var(--blue); }
.toast { color: var(--on-action); border-radius: 14px; }
/* v2: Undo is a text button in a warm colour, as on the canvas, and never wraps */
.toast-undo { background: transparent; color: #F3C9A0; min-height: 44px; white-space: nowrap; flex: none; }
.toast-undo:hover { background: rgba(251, 239, 226, .10); }
/* a page with a bottom action bar (dictation, review, select): the toast shows just above the bar */
body.has-actions .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
/* the terms and privacy dialog: a near-full-height sheet on phones, a centred dialog on wide screens;
   the head and the 我已阅读 button stay put, the text scrolls between them */
body.policy-open { overflow: hidden; }
.policy-scrim { z-index: 60; }
.policy-sheet { height: 92vh; max-height: 92vh; overflow: hidden; }
@media (min-width: 760px) { .policy-sheet { height: min(82vh, 780px); max-width: 640px; } }
.policy-body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 4px 20px 16px; font-size: 15px; line-height: 1.75; color: var(--ink);
}
.policy-body:focus { outline: none; }
.policy-body h2 { margin: 22px 0 8px; font-size: 18px; }
.policy-body h3 { margin: 18px 0 6px; font-size: 16px; }
.policy-body p, .policy-body li { margin: 0 0 8px; }
.policy-body ul, .policy-body ol { margin: 0 0 8px; padding-left: 20px; }
.policy-body hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.policy-body table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 0 0 12px; }
.policy-body th, .policy-body td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.policy-gap { background: var(--gold-soft); color: var(--gold); border-radius: 4px; padding: 0 2px; }
.policy-sheet .v2-sheet-foot { box-shadow: 0 -1px 0 var(--line); }

/* a film line not yet written in dictation: a quiet note stands where its English would be */
.line-locked { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-faint); font-size: 14px; font-weight: 500; }
.line-locked svg { width: 15px; height: 15px; }
.learn-locked h2 { display: flex; align-items: center; gap: 8px; }
.learn-locked h2 svg { width: 18px; height: 18px; color: var(--ink-faint); }

/* the phrase inside an example sentence: the phrase to look up, then its meaning */
.ex-phrase { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 2px 0 0; font-size: 14px; }
.ex-phrase b { color: var(--blue); font-weight: 700; }
.ex-phrase span { color: var(--ink-soft); }

/* example-sentence play buttons wait until the recordings are on the site */
body:not(.has-example-sounds) .example-sound { display: none; }
.example-sound { flex: none; width: 40px; height: 40px; background: var(--paper); color: var(--ink); }
.example-sound.is-playing { background: var(--ink); color: var(--on-ink); }

/* home */
.today { padding: 18px; }
.today-nums { border-top: 0; margin-top: 0; padding-top: 0; }
.today .continue { background: var(--paper); margin-top: 16px; }
.today-icon { background: var(--paper); }
.continue-go { box-shadow: none; }
.continue img, .progress-row img { border-radius: 12px; }
.ring-fill { stroke: var(--blue); }
.ring-done .ring-fill { stroke: var(--green); }
.film-card:hover, .book-card:hover { transform: none; box-shadow: none; }
.series-retro, .series-cinema { background: var(--card-raised); color: var(--ink); }
.film-name { font-size: 17px; }
.shelf h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.shelf h2 a { font-size: 14px; font-weight: 600; color: var(--blue); }
.film-hero img { box-shadow: none; }
.blurb { font-size: 16px; color: var(--ink-soft); }
.clip-num { background: var(--paper); }

/* lessons */
.tabs { border-bottom: 0; gap: 2px; padding: 3px; border-radius: 999px; background: var(--paper-deep); }
.tabs .tab { max-width: none; min-height: 40px; border: 0; border-radius: 999px; margin: 0; padding: 4px 6px; }
.tabs .tab[aria-current="page"], .tabs .tab[aria-selected="true"] { background: var(--card); color: var(--ink); }
.player { box-shadow: none; }
#clipSeek { accent-color: var(--on-action); }
.transcript li.now { outline: 0; }
.transcript li > button[data-action="seek"]:hover { background: var(--paper-deep); }
mark.vocab, button.vocab-link { background: var(--blue-soft); border-bottom: 0; color: inherit; }
.line-save[aria-pressed="true"], .line-save[aria-pressed="true"] svg { color: var(--blue); fill: var(--blue); }
.dot { border: 0; background: var(--line-strong); width: 18px; height: 6px; border-radius: 999px; }
.dot-done { background: var(--green); }
.dot-now { outline: 0; background: var(--blue); width: 28px; }
.line-dots { gap: 5px; align-items: center; }
.status-line { min-height: 24px; margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.status-line .verdict-stamp { transform: none; border: 0; border-radius: 999px; font-size: 14px; padding: 4px 12px; margin-right: 8px; animation: none; }
.status-line .zh { display: none; }
.fox-verdict { display: inline-flex; margin: 0; }
.names-box { border-style: none; background: var(--card); }
.turn { padding: 16px; border: 0; border-radius: var(--radius); background: var(--card); }
.turn:last-child { padding-bottom: 16px; }
#turns { gap: 12px; }
.turn textarea { background: var(--paper); }
html.night .turn textarea { background: var(--field); }
.speaker { background: none; padding: 0; font-size: 15px; }
.speaker-0, .speaker-1, .speaker-2, .speaker-3, .speaker-narrator { background: none; }
.dict-actions { background: var(--paper); border-top: 0; }
.w { border: 0; border-radius: 10px; min-height: 40px; font-size: 18px; font-weight: 600; background: var(--paper); }
.w.ok { background: var(--green-soft); color: var(--green); }
.w.gap { background: var(--paper); color: var(--ink-soft); border: 0; }
.w.gap b { color: var(--ink); }
.w.shown { background: var(--paper); color: var(--ink); }
.w.has-guess { border: 0; background: var(--wrong-soft); }
.w.has-guess .guess { color: var(--wrong); }
.w.has-guess .guess u.bad, .spelt u.bad { text-decoration-color: var(--wrong); background: none; }
.w.has-guess .guess i.miss, .spelt i.miss { background: var(--wrong); }
.w .hyphen { color: inherit; }
.pt { align-self: flex-end; margin-left: -4px; font-size: 20px; font-weight: 700; color: var(--ink-soft); line-height: 40px; }
.turn-shown { color: var(--ink-soft); }
.turn-zh { border-left: 0; background: var(--paper); border-radius: var(--radius-s); }
.solved { background: var(--card); }
.example { border-left: 3px solid var(--line-strong); }
.star[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); }
.star[aria-pressed="true"] svg { fill: var(--blue); stroke: var(--blue); }
.kind-slang, .kind-phrase, .kind-word, .kind-everyday, .kind-unit, .kind-sentence { background: var(--paper); color: var(--ink-soft); }

/* books */
.book-card { grid-template-columns: 1fr; }
.book-spine { display: none; }
.unit { border-radius: var(--radius-m); }
.unit-going { background: var(--card); }
.unit-going .unit-count { color: var(--blue); }
.unit-done { background: var(--card); }
.book-word { font-size: 22px; font-weight: 800; }
.meaning { color: var(--ink); }

/* my words, review */
.nb-tabs .tab .count, .nb-group summary .count { background: var(--paper); }
.state-learning { background: var(--blue); border-color: var(--blue); }
.tag-zhan { background: var(--paper); color: var(--ink-soft); }
.review-card { box-shadow: none; }
.zhan { font-weight: 600; color: var(--ink-soft); background: var(--paper); border: 0; }
.spelt { color: var(--wrong); }
.grade { border-radius: var(--radius-m); }
.week-done .week-dot { background: var(--flame); }
.week-later .week-dot { border-color: var(--line-strong); }
.week-today .week-dot { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--flame); }
.fc-day:first-child .fc-bar { background: var(--blue); }
.progress-row { border-bottom: 0; background: var(--card); border-radius: var(--radius-m); padding: 12px; margin-bottom: 10px; }

/* the fox: the whole figure, standing behind the card below her; on three screens only */
.popfox { position: relative; height: 262px; margin: 8px 0 0; overflow: visible; pointer-events: none; }
.popfox img { position: absolute; bottom: 0; left: 50%; height: 276px; width: auto; max-width: none; transform: translateX(-50%); filter: drop-shadow(0 8px 10px rgba(107, 36, 33, .18)); }
.under { position: relative; z-index: 1; margin-top: -30px; }
.panel { background: var(--card); border-radius: var(--radius); padding: 20px; }
.panel h2 { margin: 0 0 6px; font-size: 20px; }
.panel p { margin: 0 0 14px; color: var(--ink-soft); }
.panel .btn-block + .btn-block { margin-top: 8px; }
.empty-state { background: var(--card); border-radius: var(--radius); padding: 24px 20px; margin: 8px 0 16px; }
.empty-state h2 { margin: 0 0 6px; font-size: 18px; }
.empty-state p { margin: 0 0 14px; color: var(--ink-soft); font-size: 15px; }
.fox-slot, .bubble::before { display: none; }
.welcome, .fox-say { display: block; }
.bubble { box-shadow: none; padding: 20px; border-radius: var(--radius); }
.bubble .zh { font-size: 15px; }
.signin-card { box-shadow: none; }
.signin-head h1 { font-size: 24px; }
.streak-hero { grid-template-columns: 1fr auto; }

/* one red button per screen: the rest are quiet */
.clip-actions .btn.btn-primary, .btn.btn-primary[data-action="play-passage"], #checkBtn.btn-primary {
  background: var(--paper-deep); color: var(--ink); min-height: 48px; font-size: 15px; font-weight: 600;
}
.clip-row .clip-actions .btn.btn-primary { background: var(--paper); }
.clip-done { display: block; }
.round-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0 16px; }
.round-stats .stat { background: var(--paper); border-radius: var(--radius-m); }
.cover { border-radius: 14px; overflow: hidden; }
@media (max-width: 759px) {
  .film-grid { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .film-card { background: none; border-radius: 0; overflow: visible; }
  .film-body { padding: 8px 2px 0; }
  .film-name { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .film-zh, .film-card .bar, .film-card .film-status, .cover .series-badge { display: none; }
  .section-title { margin: 24px 0 4px; }
}
.ring > span svg { transform: none; }
.grade[data-grade="1"] { background: var(--wrong-soft); color: var(--wrong); }
.grade[data-grade="2"] { background: var(--gold-soft); color: var(--gold); }
.grade[data-grade="3"] { background: var(--green-soft); color: var(--green); min-height: 64px; font-size: 15px; }
.grade[data-grade="3"]:hover { background: var(--green-soft); }
@media (hover: none) { .keys { display: none; } }
.pt { margin-left: -5px; }

/* ================= 狐狸窝 Fox den (2026-12-04): the band, the lead card, the family =================
   design-system/fox-den.md §4 and §5. The tokens at the top of this file carry the colours. */

/* buttons and fields 12 px, cards 16 px; chips and segmented switches stay round */
.btn { border-radius: var(--radius-m); }
.btn.btn-primary, .btn.btn-go { color: var(--on-action); }
.text-field, .select, textarea, .search, .phone-field { border-radius: var(--radius-m); }

/* the bottom bar's active tab: caramel-deep by day (the light band would vanish there), caramel by night */
.main-nav a.active { color: var(--blue); }
html.night .main-nav a.active { color: var(--caramel); }
@media (min-width: 760px) {
  .main-nav a.active { color: var(--blue); background: var(--blue-soft); }
  html.night .main-nav a.active { color: var(--caramel); background: var(--blue-soft); }
}

/* progress fills are caramel; selected things and links keep caramel-deep (--blue) */
.ring-fill { stroke: var(--caramel); }
.bar i, .bar > span, .progress-bar i { background: var(--caramel); }
.dot-now { background: var(--caramel); }
.flame { color: var(--caramel); fill: var(--caramel); }

/* the band: the body's top is painted oxblood down to --band-end (set by app.js, placeBandEnd) */
body.has-band {
  background: linear-gradient(180deg, var(--band) 0, var(--band-deep) 100%) 0 0 / 100% var(--band-end, 240px) no-repeat, var(--paper);
}
body.has-band main { position: relative; z-index: 1; padding-top: 0; }
.page-band {
  position: relative; z-index: 0; display: flex; align-items: flex-end; gap: 12px;
  max-width: 1080px; margin: 0 auto; padding: 10px 16px 6px; min-height: 88px; color: var(--on-band);
}
@media (min-width: 760px) { .page-band { padding: 18px 24px 22px; min-height: 120px; } }
/* wide screens: the page fills its column under the band's title. (Centring margins on a grid item
   made the column shrink to its content: 词汇书 and 生词本 sat in a narrow strip in the middle.) */
@media (min-width: 1100px) { body.has-rail .shell > main { margin-left: 0; margin-right: 0; width: 100%; } }
.band-text { flex: 1; min-width: 0; padding-bottom: 6px; }
.band-title { margin: 0; color: var(--on-band); font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: 0; }
.band-context { margin: 4px 0 0; color: var(--on-band-2); font-size: 14px; line-height: 1.4; }
.band-back { position: absolute; top: 4px; left: 8px; display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 8px; color: var(--on-band-2); font-size: 14px; font-weight: 600; }
.band-back:hover { color: var(--on-band); }
/* a button on the band's right (进度: the way to Settings and the account) */
.band-action {
  flex: none; align-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border-radius: var(--radius-m); background: var(--band-btn); color: var(--on-band); font-size: 14px; font-weight: 600;
}
.band-action svg { width: 18px; height: 18px; }
body[data-band="film"] .page-band { padding-top: 48px; }
body[data-band="film"] .band-title { font-size: 21px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.band-fox { flex: none; align-self: flex-end; height: 128px; width: auto; margin: 0 -4px -44px 0; filter: drop-shadow(0 6px 10px rgba(107, 52, 20, .22)); }
@media (min-width: 760px) { .band-fox { height: 150px; } }

/* the header sits on the band (phones and tablets); the wide-screen side menu keeps the page colour */
body.has-band .top { background: var(--band); border-bottom: 0; }
body.has-band .top .brand-name { color: var(--on-band); }
body.has-band .top .theme-switch, body.has-band .top .lang-switch { background: var(--band-btn); color: var(--on-band); }
body.has-band .top .lang-switch b { color: var(--on-band); }
html.night body.has-band .top .account-btn { background: var(--on-band); color: var(--band); }
@media (min-width: 760px) and (max-width: 1099px) {
  body.has-band .main-nav a { color: var(--on-band-2); }
  body.has-band .main-nav a:hover { background: var(--band-btn); color: var(--on-band); }
  body.has-band .main-nav a.active { background: var(--band-btn); color: var(--on-band); }
}
@media (min-width: 1100px) {
  body.has-band .top { background: var(--paper); }
  body.has-band .top .brand-name { color: var(--ink); }
  body.has-band .top .theme-switch, body.has-band .top .lang-switch { background: var(--card); color: var(--ink); }
  body.has-band .top .lang-switch b { color: var(--ink); }
  body.has-band .top .account-btn { background: var(--ink); color: var(--on-ink); }
  .page-band { grid-column: 1 / -1; width: 100%; padding-left: 0; padding-right: 0; }
}

/* Home and a film's page: the lead card overlaps the band, raised, with the warm shadow */
body[data-band="home"] .lib-today { background: var(--card-raised); box-shadow: var(--shadow-card); }
body[data-band="film"] .lib-film-cover { box-shadow: var(--shadow-card); }

/* 词汇书, 生词本, 进度: the band ends cleanly under its title (placeBandEnd), and the page starts
   below it with a normal gap; nothing sticks out of the colour */
body[data-band="books"] .page-band,
body[data-band="words"] .page-band,
body[data-band="progress"] .page-band { padding-bottom: 18px; }
body[data-band="books"] main,
body[data-band="words"] main,
body[data-band="progress"] main { padding-top: 16px; }
@media (min-width: 760px) {
  body[data-band="books"] main, body[data-band="words"] main, body[data-band="progress"] main { padding-top: 24px; }
}
/* wide screens: the band and the page are rows of one grid, 32 px apart. That gap is the space under
   the band on the three pages; Home pulls its card up over the band's edge by the same 40 px as phones */
@media (min-width: 1100px) {
  body.has-rail[data-band="books"] main, body.has-rail[data-band="words"] main, body.has-rail[data-band="progress"] main { padding-top: 0; }
  body.has-rail[data-band="home"] .shell > main { margin-top: -40px; }
}

/* the band carries the title: the page's own heading steps aside */
body[data-band="books"] #view > .page-head,
body[data-band="words"] .acct-titlerow h1,
body[data-band="film"] .lib-film > .v2-topbar,
body[data-band="film"] .lib-film-head > h1,
body[data-band="film"] .lib-film-head > .lib-film-zh { display: none; }

/* 生词本: its 选择 / 复习 row is the first row of the page, right-aligned (the band has the title) */
body[data-band="words"] .acct-titlerow { justify-content: flex-end; margin: 0 0 12px; }

/* night: a plain button on a card is lifted cocoa, not the sunken near-black */
html.night .btn:not(.btn-primary):not(.btn-go):not(.btn-quiet),
html.night .card .btn, html.night .panel .btn, html.night .today .btn { background: #3A2D25; color: var(--ink); }
html.night .btn:not(.btn-primary):not(.btn-go):not(.btn-quiet):hover { background: #45362D; }
