/* Plan152 V8 learning UI. Layout: computer first (left rail), iPad portrait and phones get a top bar and a bottom tab bar.
   Plan178 §2 (owner-decision-v7/v8): one look for the whole app, from the owner's final designs (Plan177 today and
   completion, Plan178 parent, lesson pages and 我的字): a cream page, soft white cards without ink outlines, coral pill
   buttons with a darker edge, dark brown rounded type, 楷体 only on the characters being learned, character tiles with
   only a dashed outer edge, and one set of state colours (已掌握 green, 认识 blue, 还不熟练／再练练 orange, 待学习 grey). */
@font-face {
  font-family: "ShiziKai";
  src: url("/fonts/v8-reading-kai.woff2") format("woff2");
  font-display: swap;
}
/* owner-feedback-title-font-v1/v2: the rounded title lettering of the designs — 站酷快乐体 (OFL; the owner chose it over
   站酷庆科黄油体, “太瘦长了”), subset by scripts/build-v8-title-font.py; only 今天's greeting uses it. */
@font-face {
  font-family: "ShiziTitle";
  src: url("/fonts/v8-title-kuaile.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #3c2718;
  --ink-2: #6a5a4c;
  --muted: #8a7462;
  --paper: #fcf4e9;
  --grid: #efe6dc;
  --card: #fffdf9;
  --line: #f1e6d8;
  --line-2: #ead8c3;
  --coral: #f4664f;
  --coral-edge: #d94f39;
  --coral-ink: #d4452c;
  --coral-tint: #fde1db;
  --sun: #F6B826;
  --sun-tint: #FFF2C9;
  --green: #3f9a4a;
  --green-line: #79b276;
  --green-tint: #eef6ea;
  --orange: #f0a060;
  --orange-ink: #8a3d1c;
  --orange-tint: #fde3c4;
  --orange-pale: #fdf0e3;
  --poly-ink: #e3700b; /* Plan202 C5: a new reading's colour (owner “颜色标橙色”) */
  --blue: #2F6FC0;
  --blue-ink: #1F4F8F;
  --blue-tint: #eaf4fd;
  --blue-line: #b7d0f0;
  --lock: #ece6dd;
  --lock-ink: #a39a90;
  --tile-line: #f0cdb5;
  --cream-btn: #fffaf2;
  --cream-line: #f0c49a;
  --kai: "ShiziKai", "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif;
  --shadow: 0 6px 20px rgba(107, 74, 42, .10);
  --shadow-lift: 0 8px 26px rgba(107, 74, 42, .15);
  --radius: 18px;
  font-family: var(--sans);
  font-size: 17px;
  color: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: var(--vh-full);
  background-color: var(--paper);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
a { color: var(--blue); }

.kai { font-family: var(--kai); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.big { font-size: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* a character kept with its punctuation (keepPunctuation in dom.js): no line starts with “，” */
.keep { white-space: nowrap; }
.spaced { letter-spacing: 0.2em; }
.push { margin-left: auto; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.loading { padding: 40px; font-size: 20px; }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.star-fill { fill: var(--sun); stroke: #c98a12; stroke-width: 1.6; }
.icon.green { color: var(--green); }
.pinyin { color: var(--blue); font-weight: 700; letter-spacing: 0.02em; }
.pinyin.big { font-size: 26px; }

/* ---- character tiles: only a dashed outer edge, nothing inside (owner 2026-10-13, Plan178 §2) ---- */
.tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  border: 2px dashed var(--tile-line);
  border-radius: 14px;
  background-color: var(--card);
  color: var(--ink);
  font-family: var(--kai);
  line-height: 1;
}
.tile-xs { width: 40px; height: 40px; font-size: 27px; border-radius: 10px; }
.tile-sm { width: 64px; height: 64px; font-size: 42px; }
.tile-md { width: 92px; height: 92px; font-size: 62px; border-radius: 16px; }
.tile-lg { width: 100%; aspect-ratio: 1; font-size: clamp(56px, 6vw, 92px); }
.tile-xl { width: 100%; aspect-ratio: 1; font-size: clamp(60px, 7vw, 100px); border-radius: 20px; }
.tile-hero { width: clamp(84px, 14vw, 128px); height: clamp(84px, 14vw, 128px); font-size: clamp(58px, 10vw, 90px); border-radius: 20px; box-shadow: var(--shadow); }
.tilt-1 { transform: rotate(-4deg); background-color: var(--sun-tint); }
.tilt-3 { transform: rotate(3deg); background-color: var(--green-tint); }
.tile.is-yes { border-color: var(--green-line); }
.tile.is-no { border-color: var(--orange); }
.tile.is-known { border-color: #78a8dc; }

/* ---- buttons ---- */
/* One main button per page: a coral pill with a darker edge under it; the second choice a cream pill; quiet ones plain. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  border: 2px solid var(--line-2); background: var(--card); color: var(--ink);
  font-size: 18px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.btn:hover { background: var(--cream-btn); }
.btn-primary { border-color: transparent; background: var(--coral); color: #FFFFFF; box-shadow: 0 5px 0 var(--coral-edge); }
.btn-primary:hover { background: var(--coral); transform: translateY(-1px); box-shadow: 0 6px 0 var(--coral-edge); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--coral-edge); }
.btn-primary.is-waiting { background: #f6a99b; box-shadow: 0 5px 0 #e9907f; }
.btn-blue { border-color: transparent; background: var(--blue); color: #FFFFFF; box-shadow: 0 5px 0 var(--blue-ink); }
.btn-blue:hover { background: var(--blue); }
.btn-secondary { border-color: var(--cream-line); background: var(--cream-btn); }
.btn-secondary:hover { background: #fdf0e0; }
.btn-ghost { border-color: transparent; color: var(--ink-2); background: transparent; }
.btn-ghost:hover { background: rgba(255, 253, 249, .7); }
.btn-quiet { border-color: var(--line-2); color: var(--ink); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 16px; }
.btn-big { min-height: 64px; padding: 0 32px; font-size: 21px; }
.btn-listen { border-color: var(--line-2); background: var(--card); color: var(--ink); }
.btn-listen .icon { color: var(--blue); }
.btn:disabled { opacity: 0.5; box-shadow: none; transform: none; }
.icon-button { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.round-speaker { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border-radius: 50%; border: 0; background: #e3effc; color: var(--blue); }
.link-button { padding: 0; border: 0; background: none; color: var(--blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; text-align: left; }
.pill { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
.pill-coral { background: var(--coral-tint); color: var(--coral-ink); }
.pill-orange { background: var(--orange-pale); color: var(--orange-ink); }
.pill-green { background: var(--green-tint); color: var(--green); }
.pill-blue { background: var(--blue-tint); color: var(--blue-ink); }
.button-stack { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 560px; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }
.button-row > .btn { flex: 1 1 200px; }

/* ---- shell ---- */
#main { min-height: var(--vh-full); }
/* Plan177 owner-feedback-v7 (“左边的导航太宽了”) and v16 (“按照设计图里的更新”): the rail of design 4 v2 — no logo, a big
   picture above each bold name, the current page on a soft peach square, cream with a light edge; a white star pill and
   the grey 家长 / 反馈 below a thin line. */
.app[data-mode="hub"] #main { display: grid; grid-template-columns: 124px minmax(0, 1fr); }
.rail {
  position: sticky; top: 0; height: var(--vh-full); display: flex; flex-direction: column; gap: 14px;
  padding: 18px 12px; background: #fcf9f4; border-right: 1px solid #efe5d8;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 46px; height: 46px; font-size: 32px; border-radius: 12px; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: 0.08em; }
.rail-nav { display: flex; flex-direction: column; gap: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 14px;
  border: 2px solid transparent; border-radius: 16px; background: none; color: var(--ink-2); font-size: 18px; font-weight: 500; text-align: left;
}
.nav-item:hover { background: var(--paper); }
.nav-item.is-on { background: var(--coral-tint); color: #ef4b30; font-weight: 700; }
.rail .nav-item { flex-direction: column; justify-content: center; gap: 6px; min-height: 104px; padding: 10px 2px 8px; border: 0; border-radius: 22px;
  color: #3c2718; font-size: 18px; font-weight: 800; text-align: center; }
.rail .nav-item:hover { background: #f6eee4; }
.rail .nav-item.is-on { background: #fde1db; color: #ef4b30; }
.nav-icon { display: grid; place-items: center; width: 30px; }
.rail .nav-icon { width: auto; }
.nav-art { display: block; width: 58px; height: 58px; object-fit: contain; }
.glyph-icon { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid currentColor; border-radius: 7px; font-size: 18px; line-height: 1; }
.star-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px 0 12px;
  border-radius: 999px; border: 0; background: var(--card); color: var(--ink); font-weight: 700; font-size: 20px; box-shadow: var(--shadow);
}
.star-chip.is-error { font-size: 15px; background: var(--card); }
.star-chip.is-flash { animation: star-pop 900ms ease; }
.parent-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid transparent; background: none; color: var(--ink-2); font-size: 16px; }
.parent-link:hover, .parent-link.is-on { border-color: var(--line-2); background: var(--card); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding-top: 14px; border-top: 2px solid #efe5d8; }
.rail .star-chip { justify-content: center; gap: 8px; min-height: 46px; padding: 0 6px 0 10px; border: 0; background: none; box-shadow: none; font-size: 19px; } /* owner-feedback-star-chip-v1 (“比周围要白，有一个框，把它去掉”): no white box, no border */
.rail .star-chip .num { min-width: 40px; padding: 2px 4px; text-align: center; } /* owner-feedback-star-chip-v1 (“数字上的阴影去掉”): no grey pill behind the number */
.rail .star-chip.is-error { font-size: 13px; padding: 4px 6px; }
.rail .parent-link { justify-content: center; gap: 8px; padding: 0 4px; color: #6a5d52; font-size: 17px; font-weight: 600; }
.link-art { display: block; width: 26px; height: 26px; object-fit: contain; }
/* Short windows (a laptop with the browser bar, an iPad on its side): the same rail, a little tighter. */
@media (max-height: 820px) { .rail { gap: 10px; padding-top: 12px; } .rail .nav-item { min-height: 86px; gap: 4px; font-size: 17px; } .rail .nav-art { width: 46px; height: 46px; } .rail-foot { padding-top: 10px; } }
.topbar, .tabbar { display: none; }
.hub-content { min-width: 0; padding: 36px clamp(20px, 4vw, 56px) 64px; }
.page { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head h1, .page h1 { font-size: clamp(32px, 3vw, 42px); }
.page-head.row { flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px 16px; } /* app review B5: the title next to its way back, not at the far right */
.page-head h1 { font-family: var(--sans); font-weight: 900; color: #3c2718; } /* titles in the rounded sans; 楷体 is for the characters to learn */
.lead { font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.tip, .note-card {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.78); border: 2px dashed var(--line-2); color: var(--ink-2); font-size: 15px; line-height: 1.7;
}
.note-card { background: #fffaf2; border: 2px dashed var(--cream-line); color: var(--ink); } /* app review B6: one kind of note box (cream); blue only means 认识 */
.empty { padding: 18px; border-radius: 16px; border: 2px dashed var(--line-2); background: rgba(255, 255, 255, 0.7); color: var(--ink-2); }
.status-line { font-size: 15px; color: var(--ink-2); }
.status-line.warn { color: var(--orange-ink); font-weight: 700; }
.card { background: var(--card); border: 0; box-shadow: var(--shadow); border-radius: 24px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.card h2 { font-size: 19px; }

/* ---- toast ---- */
.toast {
  position: fixed; z-index: 40; bottom: calc(112px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  max-width: min(640px, calc(100% - 32px)); display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-radius: 18px; border: 0; background: var(--card); box-shadow: var(--shadow-lift); font-size: 16px; line-height: 1.5;
}
.toast[hidden] { display: none; }
/* owner-feedback-v4 (167, walk v2 B53): on a computer there is no tab bar at the bottom, so the toast sits at the top of the
   page instead of over the content near the bottom (it covered 家长账号's email). */
@media (min-width: 1024px) { .toast { top: 20px; bottom: auto; } }
.toast-saving { background: var(--ink); color: #FFFFFF; border-radius: 999px; }
.toast-warn { background: var(--orange-pale); }
.toast-action { flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--cream-line); background: var(--cream-btn); font-weight: 700; }

/* ---- 今天 ---- */
.greeting { display: flex; align-items: center; gap: 14px; font-size: clamp(38px, 4vw, 52px); font-weight: 700; letter-spacing: 0.02em; }
.wave { color: var(--ink); fill: #FFD9A0; stroke-width: 1.5; }
.mission { background: var(--card); border: 0; border-radius: 28px; box-shadow: var(--shadow); padding: 26px 28px; display: flex; flex-direction: column; gap: 20px; }
.mission-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mission-title { font-size: clamp(28px, 3vw, 34px); font-weight: 900; }
.mission-tiles { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.mission-tiles-label { width: 3.6em; font-size: 15px; line-height: 1.4; }
.mission-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.mission-steps { list-style: none; margin: 0; padding: 18px 0 0; border-top: 2px dashed var(--line); display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; color: var(--ink-2); }
.mission-steps li { display: flex; align-items: center; gap: 8px; }
.mission-steps .dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); font-weight: 700; }
.mission-steps .is-done { color: var(--green); font-weight: 700; }
.mission-steps .is-done .dot { background: var(--green); color: #FFFFFF; border-color: var(--green); }
.mission-steps .is-next { color: var(--ink); font-weight: 700; }
.mission-steps .is-next .dot { border-color: var(--ink); }
.today-stats { display: grid; grid-template-columns: minmax(240px, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 14px; }
.goal-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px; background: var(--card); border: 2px solid var(--line); }
.goal-text { display: flex; flex-direction: column; gap: 2px; }
.ring {
  --ring: 0%;
  width: 92px; height: 92px; flex: none; border-radius: 50%; display: grid; place-items: center; align-content: center;
  background: radial-gradient(closest-side, var(--card) 72%, transparent 73% 100%), conic-gradient(var(--blue) var(--ring), var(--grid) 0);
}
.ring.big { width: 150px; height: 150px; }
.ring-num { font-weight: 700; font-size: 22px; font-variant-numeric: tabular-nums; }
.ring.big .ring-num { font-size: 30px; }
.ring-note { font-size: 13px; font-weight: 700; color: var(--green); }
.stat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 116px; padding: 16px;
  border-radius: 22px; border: 2px solid var(--line); background: var(--card); text-align: left;
}
.stat:hover { border-color: var(--ink); }
.stat-blue { background: var(--blue-tint); border-color: var(--blue-line); }
.stat-num { font-size: 40px; line-height: 1; }
.stat-blue .stat-num { color: var(--blue); }
.stat-label { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 700; }
.revisit { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; border: 2px dashed var(--line-2); background: rgba(255, 255, 255, 0.75); text-align: left; }
.revisit-text { flex: 1; font-size: 16px; }
.revisit-go { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-weight: 700; font-size: 15px; }

/* ---- sheets ---- */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; background: rgba(60, 39, 24, 0.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.sheet { width: min(720px, 100%); max-height: calc(var(--vh-full) - 40px); overflow: auto; background: var(--card); border: 0; box-shadow: var(--shadow-lift); border-radius: 28px; padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 16px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 26px; }
.sheet-foot { display: flex; justify-content: flex-end; padding-top: 14px; border-top: 2px dashed var(--line); }
/* 家长锁（Plan166） */
.lock-sheet { width: min(460px, 100%); }
.lock-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 18px; }
.lock-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.lock-row input { width: 6.5em; font-size: 28px; letter-spacing: 0.2em; padding: 6px 12px; border: 2px solid var(--line-2); border-radius: 14px; background: var(--card); color: var(--ink); }
.segmented { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 6px; padding: 6px; border-radius: 999px; background: #f3ebe1; }
.segmented button { min-height: 48px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 17px; }
.segmented button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(107, 74, 42, .12); }
.detail-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.detail-item { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 18px; }
.detail-item .tile-sm { width: 56px; height: 56px; font-size: 38px; }
.detail-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 15px; }

/* ---- focus (lesson flow) ---- */
/* Plan178 (owner-decision-v7, designs resources/plan178-design/inbox/lesson-angle-v2, consistency-v1, lesson-flow-v1):
   学新字, 复习 and 认一认 on a wooden desk in the autumn forest (.is-forest); reading, results and rest on the cream page.
   One header on every lesson page: a round close button, the steps in a soft pill, the star count. */
.app[data-mode="focus"] #main, .app[data-mode="plain"] #main { display: block; }
.focus { min-height: var(--vh-full); display: flex; flex-direction: column; background: var(--paper); }
/* The painting (evidence/178/codex-lesson-backgrounds-prompts-v1.md) scrolls with the page, so the cards stay on its table
   (owner-feedback-desk-scroll-v1: “字卡可以从桌上挪开，有点奇怪” when it stayed fixed). It covers the first screen (--bg-h is
   its height: the window's height, or more on a wide window); a longer page continues on a strip of the same table
   (make-wood-tiles.py). The tabletop begins 37.8% down the painting: --desk-edge. */
.focus.is-forest { --bg-h: max(var(--vh-full), calc(62.54vw / var(--zoom))); --desk-edge: calc(var(--bg-h) * .378);
  background: url("/images/v8-ui/lesson-forest-desk.jpg") center top / auto var(--bg-h) no-repeat,
    url("/images/v8-ui/lesson-forest-wood.jpg") center var(--bg-h) / calc(var(--bg-h) * 1.599) auto repeat-y, #e9b47a; }
.focus-header {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 3vw, 32px); background: rgba(252, 244, 233, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
/* in the forest the header sits on the painting (it scrolls away with the page instead of cutting a band across it) */
.focus.is-forest .focus-header { position: relative; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.focus-title { flex: 1; font-weight: 800; font-size: 19px; text-align: center; }
.focus-header .star-chip { min-height: 46px; font-size: 19px; }
/* Plan213 A: the small 反馈 flag sits before the stars (quick-feedback.css draws it). */
.focus-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.parent-link .afb-dot { width: 9px; height: 9px; margin-left: 4px; border-radius: 50%; background: var(--coral); }
.afb-marks { display: flex; flex-direction: column; gap: 8px; }
.afb-marks h3 { margin: 0; font-size: 17px; }
.afb-marks ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.afb-mark { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--paper); }
.afb-mark-main { flex: 1; min-width: 0; }
.afb-mark-main p { margin: 0; }
.afb-mark-text { font-family: var(--kai); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { flex: 1; list-style: none; margin: 0 auto; padding: 10px 26px 12px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0;
  max-width: 600px; border-radius: 999px; background: rgba(255, 253, 249, .92); box-shadow: var(--shadow); font-size: 16px; font-weight: 700; color: var(--ink); }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; bottom: 10px; left: calc(50% + 15px); right: calc(-50% + 15px); height: 3px; border-radius: 2px; background: #e4ddd3; }
.steps li.is-done:not(:last-child)::after { background: #6cc070; }
.step-dot { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #d5cec5; color: #fff; }
.step-dot .icon { stroke-width: 3; }
.steps .is-done .step-dot { background: #54b860; }
.steps .is-active { color: #ef4b30; }
.steps .is-active .step-dot { background: #fe6a52; box-shadow: 0 0 0 5px #ffe0d9; }
/* owner-decision-story-count-v1 (173): one small dot per reading under 读故事, same height as the one dot it replaces. */
.step-dots { display: flex; align-items: center; justify-content: center; gap: 4px; height: 22px; }
.steps .step-dots .step-dot { width: 11px; height: 11px; background: #d5cec5; box-shadow: none; }
.steps .step-dots .step-dot.is-read { background: #54b860; }
.steps .step-dots .step-dot.is-now { background: #fe6a52; box-shadow: 0 0 0 3px #ffe0d9; }
.focus-body { flex: 1; display: flex; flex-direction: column; }
.panel { width: 100%; max-width: 1040px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 36px) 40px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.panel-center { align-items: flex-start; max-width: 820px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-head h1 { font-size: clamp(30px, 3vw, 38px); }
.display { font-size: clamp(34px, 3.6vw, 50px); font-weight: 900; color: var(--ink); }
/* owner-feedback-title-font-v1/v2 and owner-decision-fun-title-v1: 站酷快乐体 (ShiziTitle) on short headings that celebrate
   — 今天's greeting, the completion headings and the celebration pop-ups — never on text the child reads to learn. */
.fun-title { font-family: "ShiziTitle", var(--sans); font-weight: 400; font-synthesis: none; letter-spacing: .02em; }
.action-bar {
  position: sticky; bottom: 0; z-index: 9; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 3vw, 32px) calc(16px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 253, 249, .94); box-shadow: 0 -4px 18px rgba(107, 74, 42, .08);
}
.action-bar.sticky { margin: 0 calc(-1 * clamp(20px, 4vw, 56px)) -64px; }
.banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: 18px; font-size: 16px; line-height: 1.6; }
.banner-info { background: #fffaf2; box-shadow: inset 0 0 0 2px var(--cream-line); }
.banner-info .icon { color: #b0703a; }
.banner .btn { margin-left: auto; }
.lead strong.yes { color: var(--green); }
.lead strong.no { color: var(--orange-ink); }

/* the desk pages: a title over the sky (or the lesson's wooden sign), the pet peeking over the desk */
.desk-page { max-width: 1240px; gap: 0; padding-top: 18px; }
.desk-head { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; min-height: 120px; padding: 0 clamp(8px, 3vw, 48px); }
/* the cards start where the painted table starts (header 76 px and the panel's 18 px above) */
.is-forest .desk-head { min-height: max(100px, calc(var(--desk-edge) - 94px)); }
/* over the painted trees the title sits on a soft cream patch so the small line under it stays readable */
.desk-title { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; padding: 14px 26px 16px; border-radius: 26px;
  background: rgba(255, 251, 244, .86); box-shadow: 0 6px 18px rgba(107, 74, 42, .12); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.desk-title h1 { font-size: clamp(36px, 4vw, 56px); font-weight: 900; color: #3c2718; letter-spacing: .02em; }
.desk-title h1.is-bright::before, .desk-title h1.is-bright::after { content: ""; display: inline-block; width: .5em; height: .5em; margin: 0 .2em;
  background: linear-gradient(135deg, transparent 42%, #f7b928 42% 58%, transparent 58%); vertical-align: .1em; }
.desk-sub { font-size: 20px; font-weight: 700; color: #6a5a4c; }
.desk-sub.small { font-size: 16px; font-weight: 500; }
.desk-pet { position: relative; align-self: flex-end; display: flex; align-items: flex-start; gap: 6px; margin-bottom: -18px; z-index: 0; }
.desk-pet-art { display: block; width: clamp(130px, 16vw, 210px); height: auto; filter: drop-shadow(0 6px 8px rgba(84, 50, 24, .18)); }
.desk-say { align-self: flex-start; margin-top: 4px; padding: 14px 22px; border-radius: 24px; background: #fffdf9; box-shadow: var(--shadow); font-size: 20px; font-weight: 700; white-space: nowrap; }
/* the cards lie straight on the painted table */
.desk { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; padding: clamp(18px, 2.4vw, 30px) clamp(16px, 3vw, 36px) 22px; }
.desk-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px 22px; flex-wrap: wrap; padding: 8px 6px 0; }
.desk-count { font-size: 20px; font-weight: 800; color: #3c2718; }
.desk-count .num { font-size: 28px; } .desk-count .num.is-some { color: var(--green); }
.desk-tip { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; font-size: 16px; color: #4e3a29; }
.desk-tip .icon { flex: none; color: #c98a12; }

/* rating cards: paper cards on the desk, 认识 green and 再练练 orange once chosen */
.rate-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 22px); }
.rate-grid.cols-1 { grid-template-columns: minmax(0, 240px); }
.rate-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 240px)); }
.rate-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 240px)); }
.rate-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rate-grid:not(.cols-4):not(.cols-5) { justify-content: center; }
.rate { position: relative; min-width: 0; margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.rate > .tile-lg { border: 0; border-radius: 20px; background: #fffdf9; box-shadow: 0 6px 14px rgba(107, 74, 42, .18); position: relative; }
.rate > .tile-lg::before { content: ""; position: absolute; inset: 9%; border: 2px dashed var(--tile-line); border-radius: 10px; pointer-events: none; }
.helped-tag { position: absolute; z-index: 1; top: -10px; right: 8px; padding: 4px 12px; border-radius: 999px; background: #fdf0e3; color: var(--orange-ink); box-shadow: 0 2px 6px rgba(107, 74, 42, .15); font-size: 13px; font-weight: 800; }
.rate-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rate-buttons button { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 52px; padding: 0 6px; border-radius: 999px; font-weight: 800; font-size: 18px; white-space: nowrap; }
.rate-yes { border: 2px solid #bfdfc4; background: #e5f3e7; color: #2f6d36; }
.rate-no { border: 2px solid #f2c28e; background: #fdeedc; color: var(--orange-ink); }
.rate-buttons .rate-yes.is-on { border-color: var(--green); background: #d6efd9; box-shadow: 0 0 0 3px rgba(63, 154, 74, .25); animation: pop 260ms ease; }
.rate-buttons .rate-no.is-on { border-color: #e98a2e; background: #fcd9b3; box-shadow: 0 0 0 3px rgba(240, 160, 96, .3); animation: pop 260ms ease; }
.hint-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; background: none; color: #3c2718; font-size: 17px; font-weight: 700; }
.hint-toggle .icon { color: #c98a12; }
.hint-toggle.is-on { color: #ef4b30; text-decoration: underline; text-underline-offset: 4px; }
.rate .btn-listen, .rate .answer-line { align-self: center; }
/* Plan163 owner-feedback-v6: 家长：早就认识 is a quiet parent button, smaller than the child's 认识／再练练. */
.known-mark { min-height: 40px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--muted, #796551); white-space: nowrap; }
.rate .known-mark { align-self: center; }
.known-note { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.answer-line { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; }
.review-hint { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 18px 28px; padding: 18px 24px; border-radius: 24px; background: #fffdf9; box-shadow: 0 6px 16px rgba(107, 74, 42, .16); }
.review-hint-main { display: flex; flex-direction: column; gap: 10px; padding-right: 24px; border-right: 2px solid #f1e6d8; }
.review-hint-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-hint h2 { font-size: 20px; font-weight: 800; }
.review-hint-sound { display: flex; align-items: center; gap: 22px; }
.review-hint-glyph { font-size: 92px; line-height: 1; }
.review-hint-say { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hint-close { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0; border: 0; background: none; color: #ef4b30; font-size: 15px; font-weight: 700; }
.chevron-up { transform: rotate(-90deg); }
.review-hint-more { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.hint-fold { display: flex; flex-direction: column; gap: 10px; }
.hint-fold-head { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 18px; border: 0; border-radius: 999px; background: #f6f0e8; color: #3c2718; font-size: 18px; font-weight: 700; text-align: left; }
.hint-fold.is-on .hint-fold-head { background: #fdeee2; }
.hint-fold-head .icon { transform: rotate(90deg); } .hint-fold.is-on .hint-fold-head .icon { transform: rotate(-90deg); } /* app review B10: down when closed, up when open, as on 家长 */
.mini-rates { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mini-tile { width: 52px; height: 52px; border-radius: 12px; border: 2px dashed var(--lock-ink); background: var(--card); font-size: 32px; padding: 0; line-height: 1; }
.mini-tile.is-yes { border-color: var(--green-line); }
.mini-tile.is-no { border-color: var(--orange); }

/* sentences and characters to tap */
.sentences { display: flex; flex-direction: column; gap: 10px; }
.sentence { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; padding: 10px 18px 10px 12px; background: #fffdf9; border: 0; border-radius: 18px; box-shadow: 0 2px 10px rgba(107, 74, 42, .08); }
.sentence.has-note { box-shadow: 0 0 0 2px var(--orange), 0 2px 10px rgba(107, 74, 42, .08); }
.sentence-text { flex: 1; min-width: 0; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.6; letter-spacing: .06em; }
.sentence .round-speaker { margin-top: 4px; }
.sentence-note { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--orange-ink); font-size: 16px; }
.sentence-note .kai { font-size: 26px; color: var(--ink); }
.char-tap { font: inherit; color: inherit; background: none; border: 0; padding: 0 1px; border-radius: 6px; line-height: inherit; }
.char-tap:hover { background: var(--sun-tint); }
.char-tap.is-target { border-bottom: 3px dotted #8FB3DF; border-radius: 0; }
.char-tap.poly-new, .poly-new { color: var(--poly-ink); }
/* Plan202 B: a polyphonic character's readings, the 旧字新读音 card (learn page stop, 今天) and its 认一认 item. */
.poly-rows { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.poly-row { display: inline-flex; align-items: baseline; gap: 8px; font: inherit; color: inherit; background: none; border: 0; padding: 2px 8px; border-radius: 8px; }
button.poly-row { cursor: pointer; }
button.poly-row:hover { background: var(--orange-pale); }
.poly-row .pinyin { font-size: 24px; }
.poly-row .kai { font-size: 34px; line-height: 1.2; } /* owner 2026-11-07 “多音字的例词字太小了看不清，放大” */
.poly-row:not(.is-new) { color: var(--ink-2); }
.poly-card { display: grid; gap: 10px; padding: 16px; border: 2px dashed var(--orange); border-radius: 16px; background: var(--orange-pale); }
.poly-card-head { display: flex; align-items: center; gap: 14px; }
.poly-glyph { font-size: 64px; line-height: 1; }
.poly-say { margin: 0; color: var(--ink-2); }
.poly-sentence { margin: 0; font-size: 1.3em; }
.poly-check { margin-top: 18px; }
.poly-check h2 { display: flex; align-items: center; gap: 8px; font-size: 1.1em; }
.poly-rate .poly-word { font-size: 40px; line-height: 1.2; }
.poly-answer { display: flex; align-items: center; gap: 10px; }
.poly-stops { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.poly-stop { width: 56px; height: 56px; font-size: 36px; line-height: 1; border: 2px dashed var(--orange); border-radius: 14px; background: #fffdf9; cursor: pointer; }
.poly-stop.is-on { background: var(--orange-pale); box-shadow: 0 0 0 3px var(--orange); }
.char-tap.is-tapped { background: #fbe7a6; box-shadow: 0 0 0 2px #f2c94c; border-radius: 6px; }
.anno { font: inherit; color: var(--blue-ink); background: none; border: 0; padding: 0; border-bottom: 3px dotted var(--blue); line-height: inherit; }
.anno rt, .anno-static rt, .story-title rt { font-family: var(--sans); font-size: 0.42em; font-weight: 700; color: var(--blue); letter-spacing: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { min-height: 56px; padding: 0 26px; border-radius: 16px; border: 0; background: #fffdf9; box-shadow: 0 2px 10px rgba(107, 74, 42, .1); font-family: var(--kai); font-size: 28px; letter-spacing: .08em; }
.chip:hover { box-shadow: 0 0 0 2px var(--cream-line), 0 2px 10px rgba(107, 74, 42, .1); }

/* 学新字: the lesson's wooden sign, one sheet of paper on the desk (owner-feedback-lesson-perspective-v3: a slight tabletop
   tilt between v5 and flat — only the paper's shape is drawn in perspective; the characters and text stay flat). */
.learn-page .desk-head { align-items: flex-end; padding-bottom: 14px; }
.lesson-sign { position: relative; padding: 12px 34px; border-radius: 14px; background: linear-gradient(180deg, #fbf3e4, #f0dfc4);
  box-shadow: inset 0 0 0 4px #b98451, 0 6px 14px rgba(84, 50, 24, .22); transform: rotate(-2deg); }
.lesson-sign h1 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 900; color: #3c2718; letter-spacing: .06em; white-space: nowrap; }
/* owner-feedback-catchup-desk-pet-v2: a bundle's sign (“第 101、103 课里还没学的字”) is longer: a little smaller, and it wraps
   before the 墨宝 that peeks over the paper's right side (.lesson-paper .desk-pet: right 4%, at most 170px wide). */
.lesson-sign.is-bundle { max-width: calc(96% - clamp(110px, 13vw, 170px) - 24px); }
.lesson-sign.is-bundle h1 { font-size: clamp(22px, 2.2vw, 32px); letter-spacing: .02em; white-space: normal; }
.lesson-paper { --n: 5; position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 18px; margin: 0 clamp(0px, 1.5vw, 20px);
  padding: clamp(22px, 3vw, 36px) clamp(18px, 4vw, 56px) 26px; }
.lesson-paper::before { content: ""; position: absolute; z-index: -1; inset: 0 -1% 0 -1%; border-radius: 26px;
  background: #fbf6ee; box-shadow: 0 0 0 10px #e7c08a, 0 0 0 12px #d6a86d, 0 16px 34px rgba(107, 74, 42, .2);
  transform: perspective(2200px) rotateX(3deg); transform-origin: 50% 100%; }
.lesson-paper .desk-pet { position: absolute; right: 4%; top: 0; margin: 0; transform: translateY(-74%); z-index: -2; }
.lesson-paper .desk-pet-art { width: clamp(110px, 13vw, 170px); }
/* owner-feedback-v11 (163): a card is never wider than in a five-character lesson, so a bundle with one or two characters
   shows normal-size cards in the middle of the sheet instead of one sheet-wide card. */
.lesson-paper { --gap: clamp(10px, 2vw, 28px); --col: min(calc((100% - 4 * var(--gap)) / 5), calc((100% - (var(--n) - 1) * var(--gap)) / var(--n))); }
.learn-tiles { display: grid; grid-template-columns: repeat(var(--n), var(--col)); justify-content: center; gap: var(--gap); }
.learn-tile { position: relative; padding: 0; border: 0; border-radius: 18px; background: #fffdf9; box-shadow: 0 3px 10px rgba(107, 74, 42, .12); font-size: clamp(56px, 6.4vw, 100px); }
.learn-tile::before { content: ""; position: absolute; inset: 7%; border: 2px dashed var(--tile-line); border-radius: 10px; pointer-events: none; }
.learn-tile.is-on { background: #fff6f2; box-shadow: 0 0 0 3px #f2735e, 0 6px 14px rgba(244, 102, 79, .25); }
.learn-tile.is-on::before { border-color: #f6a596; }
/* Plan163: per-character learning — known characters look quieter, visited new ones get a small green mark. */
.learn-tile.is-known { opacity: .6; }
.learn-tile.is-known.is-on { opacity: 1; }
.learn-tile.is-visited:not(.is-on)::before { border-color: var(--green-line); }
.tile-tag { position: absolute; bottom: 6px; left: 0; right: 0; font-family: var(--sans); font-size: 13px; color: var(--green); }
.learn-detail { display: grid; grid-template-columns: repeat(var(--n), var(--col)); justify-content: center; gap: 0 var(--gap); margin-top: -4px; }
/* app-review A2: the pinyin and 听一听 together under the chosen character; at the ends they keep to the inner side. */
.learn-detail > .learn-say { grid-column: var(--at); justify-self: center; display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.learn-detail.at-first > .learn-say { justify-self: start; }
.learn-detail.at-last > .learn-say { justify-self: end; }
.pinyin-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 130px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: #fde3dc; color: #ef4b30; font-size: 32px; font-weight: 800; letter-spacing: .04em; }
.learn-extra { display: flex; align-items: center; justify-content: center; gap: 14px 22px; flex-wrap: wrap; }
.learn-words { font-size: 26px; }
.learn-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px 22px; align-items: start; padding-top: 18px; border-top: 2px solid #efe3d2; }
.learn-row:first-of-type { border-top: 0; }
.learn-tiles + .learn-row, .learn-detail + .learn-row, .learn-extra + .learn-row { border-top: 0; padding-top: 4px; }
.learn-label { display: flex; align-items: center; gap: 12px; }
.learn-label-art { flex: none; width: 46px; height: 46px; object-fit: contain; }
.learn-label h2 { font-size: 24px; font-weight: 900; color: #3c2718; }
.learn-row .chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.learn-lines { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.learn-speed { display: flex; justify-content: flex-end; }
.lesson-foot { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; padding-top: 6px; }
.lesson-count { font-size: 22px; font-weight: 800; color: #3c2718; }
.lesson-foot .btn-primary { min-width: min(100%, 320px); min-height: 60px; font-size: 22px; }
.block { display: flex; flex-direction: column; gap: 12px; }
.block h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 20px; font-weight: 900; }
.supplement h2 .pill { background: var(--sun-tint); color: #8a5a00; }

/* story: one white sheet on the cream page (designs lesson-flow-v1/08–09) */
.story-sheet { max-width: 1280px; margin: 18px max(16px, calc((100% - 1280px) / 2)) 32px; /* app review B14: never against the screen edges */ padding: 26px clamp(18px, 3vw, 40px) 24px; border-radius: 30px; background: #fffdf9; box-shadow: var(--shadow); flex: none;
  width: auto; align-self: stretch; /* owner-feedback-story-width-v1: width 100% plus the margins was 16px wider than the screen */ }
.story-head { display: flex; align-items: center; justify-content: center; gap: 14px 22px; flex-wrap: wrap; }
.story-title { font-size: clamp(32px, 3vw, 44px); font-weight: 900; letter-spacing: .04em; color: #3c2718; }
.story-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.card-nav button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line-2); background: var(--card); color: var(--ink-2); font-weight: 700; font-size: 14px; }
.card-nav .is-on { border-color: transparent; background: var(--coral); color: #FFFFFF; }
.card-nav .is-done { border-color: var(--green-line); color: var(--green); }
.story-body { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.story-figure { margin: 0; border: 0; border-radius: 22px; overflow: hidden; background: var(--green-tint); box-shadow: 0 4px 14px rgba(107, 74, 42, .14); }
.story-figure img { display: block; width: 100%; height: auto; max-height: calc(var(--vh-full) * 0.52); object-fit: contain; }
/* owner-feedback-v14 (173, “图放在左边，很小”): a paged screen's picture sits big above its text, as on the shelf player.
   owner-feedback-v15 (“看下面的字的时候完全看不到图”): a picture's text comes in screens of about 60 characters
   (paging-core.js splitPictureScreens), and the picture leaves room for them under it, on a wider page. */
.story.has-page-figure { --story-pic-h: clamp(220px, calc(var(--vh-full) - 540px), 600px); max-width: 1280px; }
.story.has-page-figure .story-body { align-items: center; }
.story.has-page-figure .story-figure { width: min(100%, calc(var(--story-pic-h) * 4 / 3)); }
.story.has-page-figure .story-figure img { max-height: var(--story-pic-h); }
.story.has-page-figure .story-text { width: auto; }
.story-text { font-size: clamp(28px, 2.6vw, 38px); line-height: 2; letter-spacing: 0.06em; display: flex; flex-direction: column; gap: 6px; max-width: 34em; }
.story-line { display: flex; align-items: flex-start; gap: 14px; }
.story-line .round-speaker { margin-top: 0.4em; }
.story-text p.is-reading { background: var(--blue-tint); border-radius: 12px; box-shadow: 0 0 0 6px var(--blue-tint); }
/* Plan173 owner-feedback-apply-sentence-layout-v1: the accepted sentence reader, across scenes/stories. */
.sentence-reader { position: relative; gap: 8px; margin-top: 8px; padding: 12px 24px 14px; }
.sentence-reader.is-paged { height: calc(var(--vh-full) - 106px); min-height: 560px; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.sentence-reader .story-head { display: block; text-align: center; }
.sentence-reader .story-title { margin: 0; font-size: clamp(32px, 3vw, 42px); line-height: 1.35; }
/* Plan188: the 改编自…… line under the title (first screen, 看整篇), as quiet as the shelf's 出处. */
.story-source { margin: 2px 0 0; text-align: center; }
.story-whole-dialog .story-source { margin: 0 0 8px; text-align: left; }
.sentence-reader .story-tools { justify-content: center; gap: 8px; flex-wrap: wrap; overflow: visible; }
.sentence-reader .story-tools .btn { min-height: 36px; }
.sentence-reader .story-more { position: relative; font-size: 15px; }
.sentence-reader .story-more summary { cursor: pointer; min-height: 36px; padding: 8px 12px; }
.story-more-controls { position: absolute; right: 0; top: 100%; z-index: 12; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-lift); }
.sentence-reader.is-paged .story-body { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
/* 2026-10-30 owner “按这个改” (evidence/173/owner-decision-picture-layout-v1.json, picture-layout-measure-v1.md): picture
   pages from lesson 101 keep 4:3 pictures; landscape screens give the picture about 60% of the width and fold the title row
   (tools move to the page-turn row), portrait screens put the picture on top (see the portrait block below). */
.sentence-reader.is-paged.is-paragraph-reader.has-page-figure:not(.is-opening-page) .story-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; gap: clamp(22px, 3.2vw, 52px); }
.sentence-reader.is-paged.is-paragraph-reader.has-page-figure:not(.is-opening-page) .story-figure { height: 100%; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.sentence-reader.is-paged.is-paragraph-reader.has-page-figure:not(.is-opening-page) .story-figure img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
/* When the page's text would scroll, lesson.js steps the picture column down until it fits (fitPicturePage). */
.sentence-reader.is-paged.is-paragraph-reader.has-page-figure:not(.is-opening-page)[data-fit="1"] .story-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.sentence-reader.is-paged.is-paragraph-reader.has-page-figure:not(.is-opening-page)[data-fit="2"] .story-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sentence-reader.is-paged.is-paragraph-reader.has-page-figure:not(.is-opening-page)[data-fit="3"] .story-body { grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); }
.sentence-reader.is-paged.is-picture-page { display: flex; flex-direction: column; }
.sentence-reader.is-paged.is-picture-page > * { flex: none; }
.sentence-reader.is-paged.is-picture-page > .story-body { flex: 1 1 0; min-height: 0; }
.sentence-reader.is-paged.is-picture-page:has(> .banner) > .story-body, .sentence-reader.is-paged.is-picture-page:has(> .feedback) > .story-body { flex: none; height: clamp(220px, calc(var(--vh-full) - 380px), 620px); }
@media (orientation: landscape) { .sentence-reader.is-picture-page.fold-head .story-head { display: none; } .sentence-reader.is-picture-page > .story-tools { display: none; } }
@media (orientation: portrait) { .sentence-reader.is-picture-page .sentence-foot .story-tools { display: none; } }
.sentence-foot > .foot-left { justify-self: start; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.sentence-reader .sentence-foot .story-tools { justify-content: flex-start; gap: 6px; }
.sentence-foot .story-more-controls { top: auto; bottom: calc(100% + 6px); right: auto; left: 0; }
.sentence-reader.is-paged.is-paragraph-reader.has-page-figure:not(.is-opening-page) .story-text { width: 100%; max-width: none; text-align: left; }
.sentence-reader.is-paged .story-figure { flex: 1 1 0; min-height: 120px; width: 100%; display: flex; justify-content: center; align-items: center; background: none; box-shadow: none; overflow: hidden; }
.sentence-reader.is-paged .story-figure img { width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 18px; }
.sentence-reader .story-text { flex: none; width: 100%; max-width: 26em; text-align: center; font-size: clamp(27px, 2.7vw, 34px); line-height: 1.8; letter-spacing: .025em; padding: 8px 0; }
.sentence-reader .story-line { width: 100%; justify-content: center; align-items: center; gap: 10px; }
.sentence-reader .story-line p { margin: 0; }
.sentence-reader .story-line .round-speaker { flex: none; margin: 0; }
.sentence-reader.is-paged:not(.has-page-figure) .story-body { justify-content: center; }
.sentence-reader.is-paged.is-paragraph-reader:not(.is-opening-page) .story-text { gap: 16px; max-height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; text-align: left; }
.sentence-reader.is-paged.is-paragraph-reader:not(.is-opening-page) .story-line { flex: none; justify-content: flex-start; align-items: center; }
.sentence-reader.is-paged.is-paragraph-reader:not(.has-page-figure) .story-text { max-width: 25em; }
.sentence-reader .sentence-foot { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.sentence-foot > .btn:first-child { justify-self: start; }
.sentence-foot > .btn:last-child { justify-self: end; max-width: 100%; min-width: 0; }
.sentence-reader:not(.is-paged) .sentence-foot { display: flex; justify-content: flex-end; }
.sentence-progress { text-align: center; font-size: 14px; color: var(--ink-2); }
.sentence-progress small { display: block; font-size: 12px; margin-top: 4px; }
.sentence-reader > .help-card { position: fixed; z-index: 20; bottom: 90px; left: 50%; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); max-height: 55vh; overflow: auto; box-shadow: var(--shadow-lift); background: var(--card); }
.sentence-reader:has(> .banner), .sentence-reader:has(> .feedback) { height: auto; min-height: calc(var(--vh-full) - 106px); }
.sentence-reader:has(> .banner) .story-figure, .sentence-reader:has(> .feedback) .story-figure { flex: none; height: clamp(160px, calc(var(--vh-full) - 430px), 540px); }
.story-whole-dialog { width: min(800px, calc(100% - 24px)); max-height: 85vh; border: 0; padding: 22px; border-radius: 24px; color: var(--ink); background: var(--card); box-shadow: var(--shadow-lift); }
.story-whole-dialog::backdrop { background: rgba(60,39,24,.35); }
.story-whole-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: -22px; padding: 10px 0; background: var(--card); }
.story-whole-dialog .story-title { font-size: 32px; }
.story-whole-text { font-size: 28px; line-height: 1.9; }
@media (max-width: 700px) {
  .sentence-reader { margin: 6px 8px 12px; padding: 12px; border-radius: 22px; }
  .sentence-reader.is-paged { height: calc(var(--vh-full) - 100px); min-height: 560px; }
  .sentence-reader.is-paged .story-figure { flex: 0 1 auto; height: calc((100vw - 40px) * .75); min-height: 80px; }
  .sentence-reader.is-paged .story-figure img { width: auto; height: auto; max-height: 100%; }
  .sentence-reader.is-paged.is-paragraph-reader.has-page-figure:not(.is-opening-page) .story-body { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
  .sentence-reader.is-paged.is-paragraph-reader:not(.is-opening-page) .story-text { font-size: 25px; gap: 14px; }
  .sentence-reader .story-text { font-size: 27px; }
  .sentence-reader .story-line { gap: 6px; }
  .sentence-reader .sentence-foot { gap: 6px; }
  .sentence-reader .sentence-foot .btn { padding: 10px 14px; min-height: 48px; font-size: 16px; }
  .sentence-progress small { font-size: 11px; }
  .story-whole-text { font-size: 25px; }
}
/* Portrait picture pages (owner 2026-10-30): picture on top across the card, the page's one or two sentences below. */
@media (orientation: portrait) {
  .sentence-reader.is-paged.is-paragraph-reader.has-page-figure.is-picture-page:not(.is-opening-page) .story-body { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .sentence-reader.is-paged.is-paragraph-reader.has-page-figure.is-picture-page:not(.is-opening-page) .story-figure { flex: 1 0 auto; min-height: min(calc((100vw - 64px) * .75), 42vh); height: 0; }
  .sentence-reader.is-paged.is-paragraph-reader.has-page-figure.is-picture-page:not(.is-opening-page) .story-text { flex: 0 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
}
@media (max-width: 350px) {
  .sentence-reader .story-text { font-size: 25px; }
  .sentence-reader .story-title { font-size: 28px; }
  .sentence-reader .story-line .round-speaker { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
}
/* Plan160: the character being read, and the reading-speed slider. */
.is-speaking, .char-tap.is-speaking { background: var(--sun); color: var(--ink); border-radius: 6px; box-shadow: 0 0 0 2px var(--sun); }
.speed-control { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; background: #fffdf9; box-shadow: inset 0 0 0 2px var(--line-2); font-size: 15px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.speed-control input { width: 120px; accent-color: var(--blue); }
.speed-value { min-width: 3em; font-variant-numeric: tabular-nums; }
.help-card {
  width: min(1040px, 100%); margin: 0 auto;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px 22px;
  background: #fffdf9; border: 0; border-radius: 22px; box-shadow: 0 2px 12px rgba(107, 74, 42, .12);
}
.help-card > .tile-md { border-color: var(--orange); }
.help-anno { box-shadow: 0 0 0 2px var(--blue-line), 0 2px 12px rgba(107, 74, 42, .12); }
.help-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.help-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; font-size: 24px; }
.help-glyphs { font-size: 32px; }
.help-cue { color: var(--ink-2); font-size: 15px; }
.help-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-nav { display: flex; align-items: center; justify-content: center; gap: 18px; }
.page-arrow { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fffdf9; color: #3c2718; box-shadow: 0 2px 10px rgba(107, 74, 42, .14); }
.page-arrow:disabled { opacity: .4; }
.story-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px 22px; flex-wrap: wrap; padding-top: 6px; }
.story-tip { flex: 1 1 300px; display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--ink-2); }
.story-tip .icon { flex: none; color: var(--lock-ink); }
.story-foot-buttons { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.story-foot-buttons .btn-primary { min-width: 220px; min-height: 60px; font-size: 22px; }
.feedback { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; border-radius: 22px; border: 0; background: var(--card); box-shadow: 0 2px 12px rgba(107, 74, 42, .12); max-width: 680px; }
.feedback h2 { font-size: 22px; }
.feedback label { font-weight: 700; }
.feedback select, .feedback textarea, .mark-tools select, .pager select { min-height: 48px; border: 2px solid var(--line-2); border-radius: 14px; padding: 8px 12px; background: var(--card); }
.fb-role { margin: 0; padding: 0; border: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.fb-role legend { font-weight: 700; padding-bottom: 8px; }
.opt { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--line-2); font-weight: 700; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt.is-on { border-color: #f6b8aa; background: var(--coral-tint); color: #ef4b30; }
.opt:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }
.fb-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* results and rest: one white card in the middle of the cream page (designs lesson-flow-v1/04, 12) */
.result-page { align-items: center; justify-content: center; max-width: 1000px; }
.result-sheet { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: clamp(24px, 3vw, 40px) clamp(20px, 5vw, 80px); border-radius: 30px; background: #fffdf9; box-shadow: var(--shadow); }
.result-sheet > h1 { text-align: center; }
.result-sheet .button-stack { align-self: center; align-items: stretch; max-width: 640px; margin-top: 4px; }
.result-sheet .button-stack .btn-primary { min-height: 64px; font-size: 24px; }
.result-sheet .button-stack .btn-ghost { align-self: center; min-height: 40px; font-size: 17px; font-weight: 500; }
.result-sheet.is-rest { align-items: center; gap: 18px; padding-top: 48px; padding-bottom: 56px; text-align: center; }
.rest-art { width: 150px; height: 120px; object-fit: contain; }
.done-head { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
@property --ring { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.done-head .ring { transition: --ring 900ms ease-out; }
.done-head .ring { width: 170px; height: 170px; background: radial-gradient(closest-side, var(--card) 80%, transparent 81% 100%), conic-gradient(#5cb85c var(--ring), var(--grid) 0); }
.done-head .ring-num { font-size: 32px; font-weight: 900; }
.done-text { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 10px; text-align: center; }
.result-card { width: 100%; max-width: 680px; display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; border-radius: 26px; background: var(--card); box-shadow: var(--shadow); }
.result-card:empty { display: none; }
.result-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.result-label { width: 5em; font-weight: 700; font-size: 16px; }
.result-stars { align-self: center; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 22px; border-radius: 999px; background: #fdf6e6; font-size: 19px; }
.result-stars img { width: 34px; height: 34px; object-fit: contain; }
.result-stars strong { font-size: 22px; }
.invite { width: 100%; max-width: 680px; display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 22px; background: #fffdf9; color: var(--ink); box-shadow: var(--shadow); text-decoration: none; text-align: left; }
.invite-light { background: var(--sun-tint); }
.invite-icon { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 18px; background: var(--sun-tint); color: var(--ink); }
.invite-text { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.invite-text strong { font-size: 18px; }

/* narrower: the review hint in one column, the desk rows stacked, the steps smaller */
@media (max-width: 1023px) {
  .review-hint { grid-template-columns: minmax(0, 1fr); }
  .review-hint-main { padding-right: 0; border-right: 0; }
  .learn-row { grid-template-columns: minmax(0, 1fr); }
  .desk-say { white-space: normal; max-width: 220px; font-size: 17px; }
}
@media (max-width: 760px) {
  .steps { padding: 8px 12px 10px; font-size: 13px; }
  .steps li:not(:last-child)::after { left: calc(50% + 13px); right: calc(-50% + 13px); }
  .desk-head { min-height: 0; padding: 0 4px; }
  .desk-title { margin-bottom: 12px; padding: 10px 16px 12px; }
  .desk-title h1 { font-size: 28px; } .desk-sub { font-size: 16px; }
  .desk-pet-art { width: 96px; }
  .desk-say { display: none; }
  .desk { padding: 16px 12px 16px; border-radius: 24px; }
  .rate-grid, .rate-grid.cols-4, .rate-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rate-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson-paper { padding: 18px 12px 18px; }
  .lesson-paper .desk-pet { display: none; }
  .lesson-sign.is-bundle { max-width: none; }
  .lesson-paper { --gap: 6px; }
  .learn-tile { font-size: clamp(36px, 11vw, 56px); border-radius: 12px; }
  .learn-detail { display: flex; justify-content: center; gap: 12px; }
  .learn-row .chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chip { padding: 0 12px; font-size: 24px; }
  .story-sheet { margin: 8px 12px 20px; border-radius: 22px; }
  .story-foot-buttons, .story-foot-buttons .btn { width: 100%; }
  .result-sheet { padding: 22px 16px; }
}

/* ---- 课程 ---- */
/* Plan178 (owner-decision-v6): a path through the autumn forest (design resources/plan178-design/inbox/v1/
   01-course-forest-path-v1.png). Lesson 1 at the bottom; app.js places the stones and signs and draws the path. Each
   stretch of 10 lessons has its scenery (.scene-*), a plain colour until its painting is in public/images/v8-course/. */
.range-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.range-chips button { min-height: 46px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line-2); background: var(--card); color: var(--ink-2); font-weight: 700; }
.range-chips .is-on { border-color: var(--ink); background: var(--ink); color: #FFFFFF; }
/* owner-feedback-course-edges-v1 (“课程背景图左右边没有挨着导航和右边界”): the paintings run from the nav to the window's edge;
   the header, the path and its stones keep the old centred band (--band: the page's former width, at most 1240px). */
.app:has(.page-course) .hub-content { --course-pad: clamp(20px, 4vw, 56px); padding-left: 0; padding-right: 0; background: #fcf4e9; }
@media (max-width: 1023px) { .app:has(.page-course) .hub-content { --course-pad: clamp(16px, 4vw, 32px); } }
.page.page-course { max-width: none; gap: 16px; color: #3c2718; }
.page-course > .course-head, .page-course > .course-sheet { width: min(100% - 2 * var(--course-pad), 1240px); margin-inline: auto; }
.course-head { position: sticky; top: 12px; z-index: 20; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px 18px 12px 26px;
  border-radius: 24px; background: rgba(255, 253, 249, .94); box-shadow: 0 6px 20px rgba(107, 74, 42, .12); }
.course-head h1 { font-size: clamp(28px, 2.6vw, 38px); font-weight: 900; color: #3c2718; padding-right: 18px; border-right: 2px solid #eadccb; }
.course-stats { font-size: 18px; font-weight: 700; color: #6b5644; }
/* Plan197: 第 N 级 · 还差 N 课升级 before the stats. */
.course-level { font-size: 19px; font-weight: 800; color: #3c2718; }
.course-level strong { color: #c2571c; }
.course-legend-btn { margin-left: auto; min-height: 44px; padding: 0 6px; border: 0; background: none; color: #8a7462; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.page-course .btn-secondary { min-height: 46px; border: 2px solid #f0c49a; border-radius: 999px; background: #fffaf2; color: #3c2718; box-shadow: none; font-weight: 800; }
.course-legend { flex-basis: 100%; display: flex; align-items: center; gap: 10px 24px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid #f1e6d8; font-size: 15px; color: #6b5644; }
.course-legend ul { display: flex; gap: 8px 18px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.course-legend li { display: flex; align-items: center; gap: 6px; }
.legend-mark { display: inline-block; width: 24px; height: 22px; background: center / contain no-repeat; }
.legend-mark.state-done { background-image: url("/images/v8-course/stone-sand.png"); }
.legend-mark.state-current { background-image: url("/images/v8-course/stone-gold.png"); }
.legend-mark.state-skipped { background-image: url("/images/v8-course/stone-grey.png"); }
.legend-mark.is-cabin { background-image: url("/images/v8-course/cabin.png"); }
.legend-mark.is-basket { background-image: url("/images/v8-course/basket.png"); }
.course-trail { --band: min(100% - 2 * var(--course-pad), 1240px); --amp: calc(var(--band) * .21); --amp-outer: calc(var(--band) * .33); --tile: 100%; --seam: 90px;
  position: relative; overflow: hidden; background: #f9dca3; }
.path-narrow { display: none; }
/* owner-feedback-course-seams-v1: the paintings come without their fade to cream; a stretch is a column of copies that
   overlap by --seam and blend through a soft mask, and the stretches overlap and blend the same way. Phones show the
   painting larger (--tile) so the trees at its edges stay in view. */
.course-scene { position: absolute; left: 0; right: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; background: #f9dca3;
  -webkit-mask-image: linear-gradient(transparent, #000 var(--seam), #000 calc(100% - var(--seam)), transparent);
  mask-image: linear-gradient(transparent, #000 var(--seam), #000 calc(100% - var(--seam)), transparent); }
.scene-tile { flex: none; width: var(--tile); aspect-ratio: 1586 / 762; background: var(--scene) center / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(transparent, #000 var(--seam), #000 calc(100% - var(--seam)), transparent);
  mask-image: linear-gradient(transparent, #000 var(--seam), #000 calc(100% - var(--seam)), transparent); }
.scene-tile + .scene-tile { margin-top: calc(-1 * var(--seam)); }
.scene-ginkgo { --scene: url("/images/v8-course/scene-ginkgo.jpg"); }
.scene-creek { --scene: url("/images/v8-course/scene-creek.jpg"); }
.scene-maple { --scene: url("/images/v8-course/scene-maple.jpg"); }
.scene-pine { --scene: url("/images/v8-course/scene-pine.jpg"); }
.scene-camp { --scene: url("/images/v8-course/scene-camp.jpg"); }
.course-path { position: absolute; top: 0; left: 50%; width: var(--band); height: 100%; transform: translateX(-50%); z-index: 1; pointer-events: none; }
.course-path path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.course-path-edge { stroke: #dcb781; stroke-width: 62px; }
.course-path-ground { stroke: #fbecd0; stroke-width: 50px; }
.course-mist { position: absolute; left: 0; right: 0; top: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(rgba(252, 248, 240, .78), rgba(252, 248, 240, .62) calc(100% - 150px), rgba(252, 248, 240, 0)); }
.course-signpost { position: absolute; left: calc(50% + var(--dx) * var(--amp)); z-index: 3; transform: translate(-50%, -50%); padding: 2px 8px 2px 4px; border-style: solid; border-width: 10px 26px 10px 12px;
  border-image: url("/images/v8-course/arrow.png") 30 64 30 26 fill / 10px 26px 10px 12px stretch; filter: drop-shadow(0 4px 4px rgba(84, 60, 30, .25));
  color: #3c2718; font-size: 16px; font-weight: 800; white-space: nowrap; }
.course-stone, .course-here { left: calc(50% + var(--dx) * var(--amp)); }
.course-cabin, .course-basket { left: calc(50% + var(--ox) * var(--amp-outer)); }
.course-stone { position: absolute; z-index: 4; transform: translate(-50%, -50%); display: grid; place-items: center; padding: 0; border: 0; background: none; color: #3c2718; }
.course-stone:disabled { cursor: default; }
.stone-disc { position: relative; display: grid; place-items: center; width: 76px; height: 70px; padding-bottom: 9px; font-size: 26px; font-weight: 900;
  background: url("/images/v8-course/stone-grey.png") center / contain no-repeat; filter: drop-shadow(0 6px 6px rgba(84, 60, 30, .22)); transition: transform 120ms ease; }
.course-stone:not(:disabled):hover .stone-disc { transform: translateY(-2px); }
.state-done .stone-disc, .state-catchup .stone-disc, .state-reached .stone-disc { background-image: url("/images/v8-course/stone-sand.png"); }
.state-skipped .stone-disc { color: #2f5f99; }
.state-locked .stone-disc { opacity: .7; color: #8f8578; }
/* the other lessons of the current 补字包 */
.state-current:not(.is-here) .stone-disc { background-image: url("/images/v8-course/stone-gold.png"); }
.course-stone.is-here .stone-disc { width: 112px; height: 94px; padding-bottom: 12px; font-size: 32px; background-image: url("/images/v8-course/stone-gold.png"); }
.course-stone.is-selected .stone-disc { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 6px #f4664f) drop-shadow(0 0 2px #f4664f); }
.stone-mark { position: absolute; right: -6px; top: -6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.mark-leaf { background: url("/images/v8-course/leaf.png") center / 22px no-repeat; }
.mark-skip { background: #fff; color: #2f6fc0; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.mark-lock { right: 50%; top: auto; bottom: -10px; transform: translateX(50%); width: 22px; height: 22px; background: #f6f1ea; color: #8f8578; }
.stone-sign, .cabin-sign { border-style: solid; border-width: 12px 14px; border-image: url("/images/v8-course/board.png") 38 40 fill / 12px 14px stretch; /* the nails stay in the top and bottom edges, off the characters */
  filter: drop-shadow(0 4px 5px rgba(84, 60, 30, .22)); color: #3c2718; }
.stone-sign { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); padding: 0 4px 2px; white-space: nowrap; font-size: 25px; letter-spacing: .06em; }
.course-stone.sign-left .stone-sign { left: auto; right: calc(100% + 12px); }
.state-locked .stone-sign { opacity: .55; filter: none; }
.course-stone.is-here .stone-sign { font-size: 28px; }
.course-here { position: absolute; z-index: 5; width: 0; height: 0; pointer-events: none; }
.course-pet { position: absolute; left: 0; bottom: 18px; transform: translateX(-50%); display: block; width: 150px; height: 150px; }
.course-pet .pet-svg { width: 110px; height: 110px; display: block; margin: 40px auto 0; }
.course-pet .pet3d-portrait, .course-pet canvas { width: 100%; height: 100%; display: block; }
.course-go { position: absolute; left: 72px; top: 34px; pointer-events: auto; min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px; background: #f4664f;
  box-shadow: 0 5px 0 #d94f39; color: #fff; font-size: 22px; font-weight: 800; white-space: nowrap; }
.course-here.sign-left .course-go { left: auto; right: 72px; }
.course-cabin, .course-basket { position: absolute; z-index: 4; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0; border: 0; background: none; color: #3c2718; }
.cabin-art, .basket-art { display: block; width: 110px; height: 88px; background: url("/images/v8-course/cabin.png") center / contain no-repeat; filter: drop-shadow(0 6px 6px rgba(84, 60, 30, .2)); }
.basket-art { width: 86px; height: 84px; background-image: url("/images/v8-course/basket.png"); }
.cabin-sign { display: flex; flex-direction: column; align-items: center; padding: 0 4px 2px; font-size: 14px; line-height: 1.35; white-space: nowrap; }
.cabin-sign strong { font-size: 15px; } .cabin-sign .kai { font-size: 19px; }
.cabin-status { font-size: 12px; font-weight: 800; color: #1b7f53; }
.course-cabin:not(.is-read) .cabin-art { animation: breathe 2.4s ease-in-out infinite; }
.course-sheet { position: sticky; bottom: 16px; z-index: 20; display: flex; flex-direction: column; gap: 12px; padding: 16px 22px; border-radius: 24px;
  background: #fffdf9; box-shadow: 0 8px 26px rgba(107, 74, 42, .18); }
.course-sheet-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 18px; }
.course-sheet-head .kai { font-size: 30px; letter-spacing: .06em; }
.course-sheet-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .course-cabin .cabin-art { animation: none; } }
/* phones: a narrower swing (its own drawing of the path), smaller stones, signs and 墨宝, and a header that scrolls away */
@media (max-width: 760px) {
  .course-trail { --amp: calc(var(--band) * .13); --amp-outer: calc(var(--band) * .3); --tile: 170%; }
  .path-wide { display: none; } .path-narrow { display: block; }
  .course-path-edge { stroke-width: 50px; } .course-path-ground { stroke-width: 40px; }
  .course-head { position: static; gap: 6px 12px; padding: 12px 16px; }
  .course-head h1 { font-size: 26px; padding-right: 0; border-right: 0; }
  .course-stats { flex-basis: 100%; order: 3; font-size: 15px; }
  .course-level { flex-basis: 100%; order: 2; font-size: 16px; }
  .stone-disc { width: 62px; height: 57px; padding-bottom: 7px; font-size: 22px; }
  .course-stone.is-here .stone-disc { width: 90px; height: 76px; font-size: 27px; }
  .stone-sign { left: calc(100% + 8px); padding: 0 2px 1px; font-size: 20px; }
  .course-stone.sign-left .stone-sign { right: calc(100% + 8px); }
  .course-stone.is-here .stone-sign { font-size: 22px; }
  .course-pet { width: 118px; height: 118px; bottom: 14px; }
  .course-pet .pet-svg { width: 88px; height: 88px; margin-top: 30px; }
  /* app-review A4: on a phone the button sits centred under the stone, so a long label never runs off the left edge. */
  .course-go, .course-here.sign-left .course-go { left: 0; right: auto; top: 50px; transform: translateX(-50%); white-space: nowrap; min-height: 48px; padding: 0 20px; font-size: 19px; }
  .course-signpost { font-size: 14px; }
  .cabin-art { width: 80px; height: 64px; } .basket-art { width: 64px; height: 62px; }
}

/* ---- 我的字 ---- */
/* Plan178 (owner-decision-v7, design consistency-v1/05-my-characters-grid-v3): a collection book — tabs in the state
   colours (已掌握 green, 认识 blue, 还不熟练 orange, 待学习 grey, 字族 yellow), a ring-bound cream page of dashed tiles. */
/* the painted room (codex-lesson-backgrounds-prompts-v1.md): the wall and window behind the title, the book on the table */
.app:has(.page-library) .hub-content { --bg-h: max(var(--vh-full), calc((100vw / var(--zoom) - 124px) / 1.599));
  background: url("/images/v8-ui/library-room-desk.jpg") center top / auto var(--bg-h) no-repeat,
    url("/images/v8-ui/library-room-wood.jpg") center var(--bg-h) / calc(var(--bg-h) * 1.599) auto repeat-y, #e9b47a; }
@media (max-width: 1023px) { .app:has(.page-library) .hub-content { --bg-h: max(var(--vh-full), calc(62.54vw / var(--zoom))); } }
.page.page-library { max-width: 1240px; gap: 0; }
.library-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 0 clamp(8px, 2vw, 28px); }
.library-title { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; padding: 14px 26px 18px; min-width: 0; border-radius: 26px;
  background: rgba(255, 251, 244, .88); box-shadow: 0 6px 18px rgba(107, 74, 42, .12); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.library-title h1 { font-size: clamp(40px, 4vw, 58px); font-weight: 900; color: #3c2718; }
.library-total { display: flex; align-items: center; flex-wrap: nowrap; gap: 10px 18px; font-size: 20px; font-weight: 700; color: #3c2718; }
.library-total p { flex: none; white-space: nowrap; }
.library-total strong { font-size: 30px; }
.library-bar { display: block; flex: 0 1 auto; width: min(400px, 34vw); min-width: 90px; height: 22px; border-radius: 999px; background: #ece6dd; overflow: hidden; box-shadow: inset 0 1px 3px rgba(107, 74, 42, .15); }
.library-bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(180deg, #74c96f, #4fae4e); }
.library-pet { flex: none; width: clamp(120px, 14vw, 190px); height: clamp(120px, 14vw, 190px); object-fit: contain; margin-bottom: -40px; position: relative; z-index: 0; filter: drop-shadow(0 6px 8px rgba(84, 50, 24, .18)); }
.library-book { position: relative; z-index: 1; display: flex; flex-direction: column; }
.book-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 8px; margin-bottom: 12px; padding: 0 22px 0 52px; }
.book-tab { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 0 12px; border: 0; border-radius: 18px 18px 0 0;
  font-size: 20px; font-weight: 800; color: #3c2718; opacity: .82; transition: min-height 120ms ease; }
.book-tab.is-on { min-height: 70px; opacity: 1; box-shadow: 0 -3px 10px rgba(107, 74, 42, .1); }
.book-tab-art { width: 34px; height: 34px; object-fit: contain; }
.book-tab-dot { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 18%, #b9b2aa 19%); }
.book-tab-glyph { font-size: 24px; color: #a8761c; }
.book-tab-num { font-size: 20px; }
.book-tab-label { white-space: nowrap; } /* app-review A8: 还不熟练 on one line */
@media (min-width: 1024px) and (max-width: 1279px) { .book-tab { gap: 6px; padding: 0 8px; font-size: 18px; } .book-tab-art { width: 28px; height: 28px; } .book-tab-num { font-size: 18px; } }
.tab-mastered { background: #e2f1df; color: #2f6d36; } .tab-recognized { background: #e3eefb; color: #1f4f8f; }
.tab-review { background: #fde6d2; color: #8a3d1c; } .tab-unseen { background: #ece8e3; color: #5f5650; } .tab-families { background: #fcefc6; color: #7a5a10; }
/* owner-request-library-search-v1: 查一个字 — each result in its tab's colours. */
.library-search { flex: none; width: 230px; display: flex; align-items: center; gap: 4px; }
.library-title-row { display: flex; align-items: center; gap: 14px; }
/* owner-feedback-library-head-v1: 查一个字 folded into a small round magnifier; open, a slim box with × beside it. */
.library-search-open { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: #f4ebde; color: #6a4a2c; box-shadow: inset 0 0 0 1.5px #e6d6bf; cursor: pointer; }
.library-search-open:hover { background: #efe2cf; }
.library-search-open:focus-visible, .library-search-close:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.library-search input { flex: 1 1 auto; min-width: 0; width: 100%; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid #e6d6bf; background: #fffdf8; font-size: 18px; color: #3c2718; }
.library-search-close { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: none; color: #6a5a4c; cursor: pointer; }
.library-search input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.library-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; } /* one ×: ours */
.library-found { display: flex; flex-wrap: wrap; gap: 8px; }
.library-found:empty { display: none; }
.found-item { appearance: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 8px; border: 0; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer; }
.found-char { font-size: 28px; line-height: 1; }
.found-item.status-mastered { background: #e2f1df; color: #2f6d36; } .found-item.status-recognized { background: #e3eefb; color: #1f4f8f; }
.found-item.status-review { background: #fde6d2; color: #8a3d1c; } .found-item.status-unseen, .found-item.is-none { background: #ece8e3; color: #5f5650; }
.found-item.is-none { cursor: default; }
.book-page { position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 280px; padding: 22px clamp(18px, 3vw, 40px) 24px clamp(52px, 6vw, 80px);
  border-radius: 24px; background: #fffdf8; box-shadow: 0 0 0 10px #8fb08a, 0 0 0 12px #7c9c77, 0 14px 30px rgba(107, 74, 42, .18); }
/* the binder rings down the left edge */
.book-page::before { content: ""; position: absolute; left: 14px; top: 26px; bottom: 26px; width: 26px;
  background: radial-gradient(ellipse 13px 7px at 50% 50%, transparent 55%, #c8a165 58% 78%, transparent 82%) 0 0 / 26px 64px repeat-y; }
.book-page.page-mastered { box-shadow: 0 0 0 10px #a9cfa3, 0 0 0 12px #8fbc89, 0 14px 30px rgba(107, 74, 42, .18); }
.book-page.page-recognized { box-shadow: 0 0 0 10px #b5cff0, 0 0 0 12px #98bbe6, 0 14px 30px rgba(107, 74, 42, .18); }
.book-page.page-review { box-shadow: 0 0 0 10px #f3c9a2, 0 0 0 12px #eab384, 0 14px 30px rgba(107, 74, 42, .18); }
.book-page.page-unseen { box-shadow: 0 0 0 10px #d8d2cb, 0 0 0 12px #c9c2ba, 0 14px 30px rgba(107, 74, 42, .18); }
.book-page.page-families { box-shadow: 0 0 0 10px #f2dd9b, 0 0 0 12px #e8cf80, 0 14px 30px rgba(107, 74, 42, .18); }
.book-note { font-size: 17px; color: #6a5a4c; }
.char-group { display: flex; flex-direction: column; gap: 10px; }
.char-group h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; color: #6a5a4c; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-green { background: var(--green); }
.dot-blue { background: var(--blue); }
.dot-grey { background: var(--lock-ink); }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
.char-cell { position: relative; min-height: 54px; border-radius: 12px; border: 2px dashed var(--tile-line); background: var(--card); font-size: 32px; line-height: 1; padding: 0; }
.char-cell:hover { border-style: solid; }
.char-cell.is-on { border-style: solid; border-color: var(--coral); background: #fff6f2; }
.book-page .char-grid { grid-template-columns: repeat(var(--cols, 8), minmax(0, 1fr)); gap: 14px 16px; }
.book-page .char-cell { min-height: 0; aspect-ratio: 1.12; border-radius: 10px; font-size: clamp(44px, 4vw, 60px); }
.page-mastered .char-cell { border-color: #9ccb96; } .page-recognized .char-cell { border-color: #9dbfe8; }
.page-review .char-cell { border-color: #f0b07a; } .page-unseen .char-cell { border-color: #cfc8c0; color: #8a7f76; }
.char-new { position: absolute; top: -9px; right: -9px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #3fa34a; color: #fff;
  font-family: var(--sans); font-size: 14px; font-weight: 800; box-shadow: 0 0 0 2px #fffdf8; }
.char-card { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 22px; background: var(--card); border: 0; box-shadow: var(--shadow-lift); }
.char-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.char-card-main .btn { max-width: 100%; height: auto; padding-top: 6px; padding-bottom: 6px; white-space: normal; text-align: left; } /* app-review A3: the parent button wraps on a phone */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.pager select { border-color: transparent; background: transparent; font-weight: 700; color: #6a5a4c; }
.page-library .growth { margin-top: 40px; }
.page-library .growth > h2 { font-size: clamp(28px, 2.6vw, 36px); font-weight: 900; color: #3c2718; }
.growth-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.growth-stat { display: flex; align-items: center; gap: 18px; padding: 16px 22px; border-radius: 22px; background: #fdf8f0; }
.growth-stat-art { flex: none; width: 84px; height: 72px; object-fit: contain; }
.growth-stat-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.growth-next { font-size: 17px; color: #6a5a4c; }
@media (max-width: 1023px) {
  .book-tabs { padding: 0 8px 0 40px; gap: 6px; }
  .book-tab { flex-direction: column; gap: 2px; min-height: 72px; padding: 6px 4px; font-size: 16px; } .book-tab.is-on { min-height: 82px; }
  .book-tab-num { font-size: 16px; }
}
@media (max-width: 760px) {
  .library-head { padding: 0; }
  .library-title { gap: 6px; margin-bottom: 10px; padding: 10px 14px 12px; }
  .library-title h1 { font-size: 28px; }
  .library-total { flex-wrap: wrap; gap: 6px 10px; font-size: 14px; } .library-total p { flex-basis: 100%; } .library-total strong { font-size: 20px; } .library-bar { flex: 1 1 0; width: auto; height: 14px; min-width: 80px; } .library-search { flex: 0 1 200px; width: auto; min-width: 150px; }
  .library-pet { width: 72px; height: 72px; margin-bottom: -12px; }
  .book-page .pager { flex-wrap: nowrap; gap: 8px; } .book-page .pager .btn { padding: 0 12px; } .book-page .pager select { font-size: 14px; }
  .book-tab, .book-tab.is-on { min-height: 62px; }
  .book-note { font-size: 14px; }
  .book-tabs { grid-template-columns: repeat(5, minmax(64px, 1fr)); overflow-x: auto; padding: 0 2px; scrollbar-width: none; }
  .book-tab { font-size: 14px; } .book-tab-art { width: 26px; height: 26px; }
  .book-page { gap: 10px; padding: 12px 12px 14px 38px; }
  .book-page::before { left: 8px; width: 22px; }
  .book-page .char-grid { gap: 10px; }
  .book-page .char-cell { font-size: 38px; }
}

/* ---- 家长标记 ---- */
.mark-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mark-tools label { font-weight: 700; }
.mark-grid { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.mark-cell { position: relative; display: grid; place-items: center; min-height: 60px; border-radius: 12px; border: 2px dashed var(--tile-line); background: var(--card); font-size: 34px; cursor: pointer; }
.mark-cell input { position: absolute; opacity: 0; pointer-events: none; }
.mark-cell.is-on { background: var(--green-tint); border: 2px solid var(--green-line); color: #2f6d36; } /* app review B13: no filled green with a black edge */
.mark-cell.is-on::after { content: "✓"; position: absolute; top: 2px; right: 6px; font-family: var(--sans); font-size: 13px; font-weight: 900; }
.mark-cell.is-locked { opacity: 0.7; cursor: default; }
.mark-cell:focus-within { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---- 星星 ---- */
.stars-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.star-total { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 24px; background: var(--sun-tint); border: 0; box-shadow: var(--shadow); }
.star-big { display: block; font-size: 56px; line-height: 1; }
.star-unit { font-weight: 700; }
.next-badge { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 18px 22px; border-radius: 24px; background: var(--card); border: 2px solid var(--line); }
.next-badge strong { font-size: 19px; }
.bar-track { display: block; height: 14px; border-radius: 7px; background: var(--lock); overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--blue); }
.badges { display: flex; flex-direction: column; gap: 12px; }
.badges h2, .recent h2 { font-size: 20px; font-weight: 900; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 18px; background: var(--card); border: 2px solid var(--line); text-align: center; }
.badge-medal { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--ink); background: var(--coral); color: #FFFFFF; font-size: 32px; box-shadow: 0 0 0 4px var(--sun); }
.badge-medal.is-locked { background: #EEF3EF; color: #A9B8B2; border: 3px dashed var(--line-2); box-shadow: none; }
.badge-medal.big { width: 120px; height: 120px; font-size: 64px; box-shadow: 0 0 0 7px var(--sun); }
.badge-name { font-size: 14px; font-weight: 700; line-height: 1.3; }
.badge-state { font-size: 12px; color: var(--ink-2); }
.rules summary { cursor: pointer; color: var(--blue); font-weight: 700; min-height: 40px; display: flex; align-items: center; }
.rules p { margin-top: 8px; max-width: 46em; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.recent { display: flex; flex-direction: column; gap: 12px; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.recent-list li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 2px solid var(--line); }
.recent-label { flex: 1; }
.recent-stars { font-size: 19px; }

/* ---- 家长 ---- */
/* Plan178 (owner-decision-v4/v5): 家长 as designs resources/plan178-design/inbox/v2/parent-0[1-5]-*-v2.png. Plainer than the
   child's pages (it is for adults) but the same cream page, soft cards without ink outlines, coral and cream buttons. These
   styles stay under .page-parent until the shared style step of Plan178 brings them to the whole app. */
.app:has(.page-parent) .hub-content { background: #fcf4e9; }
.page.page-parent { max-width: 1240px; gap: 18px; color: #3c2718; }
.page-parent .page-head h1 { font-size: clamp(34px, 3vw, 46px); font-weight: 900; color: #3c2718; }
.page-parent .page-head .muted { color: #7a6552; font-size: 18px; }
.parent-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.parent-dir { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 24px; background: #fffdf9; box-shadow: 0 6px 20px rgba(107, 74, 42, .09); }
.parent-dir a { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 6px 16px; border-radius: 16px; color: #3c2718; font-size: 19px; font-weight: 800; text-decoration: none; }
.parent-dir a:hover { background: #fdf3e6; }
.parent-dir a.is-on { background: #fde8e2; color: #ef4b30; }
.parent-dir-art, .parent-group-art { flex: none; width: 38px; height: 38px; object-fit: contain; }
.parent-groups { display: flex; flex-direction: column; gap: 30px; padding-bottom: 120px; min-width: 0; }
.parent-group h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 26px; font-weight: 900; color: #3c2718; }
.parent-card { container-type: inline-size; padding: 4px 28px 6px; border-radius: 24px; background: #fffdf9; box-shadow: 0 6px 20px rgba(107, 74, 42, .09); }
.prow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 20px; padding: 18px 0; border-top: 1px solid #f1e6d8; }
.parent-card > .prow:first-child, .parent-sub + .prow { border-top: 0; }
.prow.has-mid { grid-template-columns: minmax(120px, 200px) minmax(0, 1fr) auto; }
.prow-main { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.prow-label { font-size: 19px; font-weight: 800; color: #3c2718; }
.prow-sub, .prow-status, .prow-note { font-size: 15px; line-height: 1.55; color: #7a6552; }
.prow-note { grid-column: 1 / -1; margin-top: -4px; }
.prow-what, .prow-fold { min-height: 32px; padding: 0; border: 0; background: none; color: #8a7462; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.prow-sub .prow-what, .prow-status .prow-what { min-height: 0; margin: -8px 0 -8px 12px; padding: 8px 0; vertical-align: baseline; line-height: inherit; } /* a bigger hit area without a taller line */
.prow-fold { display: inline-flex; align-items: center; gap: 4px; align-self: flex-end; text-decoration: none; }
.prow-control { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.prow-help { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; padding: 14px 18px; border-radius: 16px; background: #fdf3e6; color: #6b5644; font-size: 15px; line-height: 1.7; }
.prow.is-sub { margin-left: 22px; padding: 6px 0 14px 18px; border-top: 0; border-left: 2px solid #ecdccb; }
.prow-folding { grid-template-columns: minmax(0, 1fr); }
.prow-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; text-align: left; color: #3c2718; }
.page-parent .chevron-down { transform: rotate(90deg); } .page-parent .chevron-up { transform: rotate(-90deg); }
.parent-sub { margin: 10px 0 0; padding-top: 16px; border-top: 1px solid #f1e6d8; font-size: 17px; font-weight: 900; color: #3c2718; }
.parent-card > .parent-sub:first-child { margin-top: 0; border-top: 0; }
.parent-stars { padding: 8px 0 14px; font-size: 18px; color: #3c2718; }
.page-parent .btn { box-shadow: none; transform: none; }
.page-parent .btn-secondary { min-height: 48px; padding: 0 24px; border: 2px solid #f0c49a; border-radius: 999px; background: #fffaf2; color: #3c2718; font-size: 17px; font-weight: 800; }
.page-parent .btn-secondary:hover { background: #fdf0e0; }
.page-parent .btn-primary { min-width: 140px; min-height: 52px; border: 0; border-radius: 999px; background: #f4664f; box-shadow: 0 4px 0 #d94f39; color: #fff; font-size: 20px; font-weight: 800; letter-spacing: .2em; }
.page-parent .switch { width: 64px; height: 36px; border: 0; background: #e5ddd3; }
.page-parent .switch[aria-checked="true"] { background: #2fb36a; }
.page-parent .switch-knob { top: 3px; left: 3px; width: 30px; height: 30px; border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.page-parent .switch[aria-checked="true"] .switch-knob { left: 31px; }
.page-parent .stepper { gap: 8px; }
.page-parent .step-btn { width: 52px; height: 48px; border: 2px solid #f0d2b4; border-radius: 14px; background: #fffaf2; color: #3c2718; font-size: 24px; }
.page-parent .step-btn:disabled { opacity: .45; }
.page-parent .stepper input, .page-parent .step-value { width: 84px; height: 48px; border: 2px solid #eadfd3; border-radius: 14px; background: #fff; text-align: center; font-size: 22px; }
.page-parent .step-value { display: grid; place-items: center; width: 64px; }
.page-parent .step-unit { font-size: 17px; font-weight: 700; }
.page-parent .quick { width: auto; gap: 10px; }
/* app review E6: the daily play time (乐园、森林和滑车) — six choices wrap on a phone instead of squeezing. */
.page-parent .quick.play-time { flex-wrap: wrap; }
.page-parent .quick.play-time > button:not(.btn) { padding: 0 14px; }
.page-parent .quick > button:not(.btn) { min-height: 44px; padding: 0 18px; border: 2px solid transparent; border-radius: 14px; background: #f6efe6; color: #3c2718; font-size: 17px; }
.page-parent .quick > button.is-on { border-color: #f6b8aa; background: #fde1db; color: #ef4b30; }
.profile { display: flex; align-items: center; gap: 14px; }
.avatar { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #fde3cf; color: #a5512a; font-size: 26px; }
.profile div { display: flex; flex-direction: column; }
.stepper { display: flex; align-items: center; gap: 10px; }
.step-btn { width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--card); font-size: 26px; font-weight: 700; }
.stepper input { width: 96px; height: 52px; border: 2px solid var(--line-2); border-radius: 14px; text-align: center; font-size: 26px; }
.quick { display: flex; align-items: center; gap: 8px; width: 100%; }
.quick > button:not(.btn) { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--line-2); background: var(--card); color: var(--ink-2); font-weight: 700; }
.quick > button.is-on { border-color: var(--ink); background: var(--ink); color: #FFFFFF; }
.intervals { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.interval { padding: 6px 12px; border-radius: 10px; background: var(--blue-tint); }
.page-parent .interval { background: #fde8d4; color: #3c2718; }
.page-parent .spend-log li { border-bottom-color: #ead8c3; }
/* a narrow card (iPad, phone): the wide controls go under their name, the two-button rows stack */
@container (max-width: 680px) {
  .prow.is-wide { grid-template-columns: minmax(0, 1fr); }
  .prow.is-wide .prow-control { justify-content: flex-start; }
  .prow.is-wide .quick { width: 100%; }
}
@container (max-width: 560px) {
  .prow.has-mid, .prow.is-stack { grid-template-columns: minmax(0, 1fr); }
  .prow.is-stack .prow-control { justify-content: stretch; }
  .prow.is-stack .prow-control .btn { flex: 1 1 0; }
}
/* iPad portrait and phones: the directory is a sideways row of chips that stays at the top */
@media (max-width: 1023px) {
  .parent-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .parent-dir { top: 0; z-index: 5; flex-direction: row; gap: 10px; margin: 0 calc(-1 * clamp(16px, 4vw, 32px)); padding: 10px clamp(16px, 4vw, 32px);
    overflow-x: auto; border-radius: 0; background: #fcf4e9; box-shadow: none; scrollbar-width: none; }
  .parent-dir::-webkit-scrollbar { display: none; }
  .parent-dir a { flex: none; min-height: 44px; padding: 0 18px; border-radius: 999px; background: #fffdf9; box-shadow: 0 2px 8px rgba(107, 74, 42, .08); font-size: 16px; }
  .parent-dir-art { display: none; }
  .parent-group h2 { font-size: 24px; scroll-margin-top: 80px; }
  .parent-card { padding: 2px 18px 4px; }
  .prow.is-sub { margin-left: 8px; padding-left: 14px; }
}

/* ---- onboarding / stops ---- */
.plain-main { padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 64px); }
.page-onboarding, .page-blocked { max-width: 760px; }
.hero-tiles { display: flex; gap: 14px; flex-wrap: wrap; }
.form-card { gap: 14px; border: 0; box-shadow: var(--shadow); border-radius: 28px; padding: 28px; align-items: stretch; }
.form-card input { min-height: 62px; border: 2px solid var(--line-2); border-radius: 16px; padding: 0 18px; font-size: 24px; }
.form-card .btn { align-self: flex-start; }

/* ---- celebration ---- */
.celebrate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(29, 52, 56, 0.55); padding: 20px; }
.celebrate-sparkles { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.celebrate-spark { position: absolute; margin: -15px; fill: var(--sun); stroke: var(--ink); stroke-width: 1.5; transform: translate(var(--spark-x), var(--spark-y)); animation: spark 900ms ease-out var(--spark-delay) both; }
.celebrate-card { position: relative; width: min(420px, 100%); padding: 44px 32px 30px; border-radius: 32px; background: var(--card); border: 0; box-shadow: var(--shadow-lift); text-align: center; animation: pop 360ms ease; }
.celebrate-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); }
.celebrate-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.celebrate-star { fill: var(--sun); stroke: var(--ink); stroke-width: 1.2; }
.celebrate-count { font-size: 64px; line-height: 1; font-variant-numeric: tabular-nums; }
.celebrate-title { font-size: 34px; }
.celebrate-line { color: var(--ink-2); }
.celebrate-next { margin-top: 12px; display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--sun-tint); font-weight: 700; font-size: 15px; }

@keyframes pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes star-pop { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.18); background: var(--sun); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes spark { from { transform: translate(0, 0) scale(0.2); opacity: 0; } to { transform: translate(var(--spark-x), var(--spark-y)) scale(1); opacity: 1; } }
/* Star celebration comes alive (owner-feedback-v27): a star rain, twinkling sparkles, a tappable star that bounces when counted. */
.celebrate-spark { animation: spark 900ms ease-out var(--spark-delay) both, spark-twinkle 1.4s ease-in-out calc(900ms + var(--spark-delay)) infinite; }
@keyframes spark-twinkle { 50% { transform: translate(var(--spark-x), var(--spark-y)) scale(0.7) rotate(20deg); opacity: 0.6; } }
.celebrate-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.celebrate-drop { position: absolute; left: var(--drop-x); top: -40px; fill: var(--sun); stroke: var(--ink); stroke-width: 1.5;
  animation: star-drop var(--drop-time) linear var(--drop-delay) infinite; }
@keyframes star-drop { from { transform: translateY(0) rotate(0); } to { transform: translateY(110vh) rotate(360deg); } }
.celebrate-star-btn { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; animation: star-in 700ms cubic-bezier(.3, 1.6, .5, 1) both; }
.celebrate-star-btn .celebrate-star { display: block; animation: star-sway 2.4s ease-in-out 700ms infinite; }
.celebrate-card.is-counted .celebrate-star-btn { animation: star-bounce 500ms ease-out; }
.celebrate-card.is-counted .celebrate-count { animation: pop 360ms ease; color: var(--coral-ink); }
.celebrate-star-btn.is-spun { animation: star-spin 700ms ease-out; }
@keyframes star-in { from { transform: scale(0) rotate(-180deg); } to { transform: none; } }
@keyframes star-sway { 50% { transform: rotate(8deg) scale(1.05); } }
@keyframes star-bounce { 40% { transform: translateY(-18px) scale(1.12); } }
@keyframes star-spin { from { transform: rotate(0) scale(1.15); } to { transform: rotate(360deg) scale(1); } }

/* ---- Plan168 学习报告 and 我的成长 ---- */
.page-report { display: flex; flex-direction: column; gap: 16px; }
.report-summary { display: flex; flex-direction: column; gap: 6px; }
.report-summary h2 { font-size: 19px; }
.report-block, .growth { align-items: stretch; }
.report-block h3, .growth h3 { font-size: 16px; margin-top: 6px; }
.report-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.report-big strong { font-size: 34px; }
.toggle-chip { align-self: flex-start; min-height: 36px; padding: 4px 14px; border-radius: 999px; border: 2px solid var(--line-2); background: var(--card); color: var(--ink-2); font-weight: 700; }
.toggle-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--sun-tint); color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--ink-2); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--ink); }
.swatch-parent { background: var(--green-tint); }
.swatch-mastered { background: var(--green); }
.swatch-recognized { background: var(--blue); }
.curve { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.curve-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; }
/* Plan169 3.1: tick labels sit at their value (--y) and dates at their day (--x). */
.curve-axis { position: relative; min-width: 2.6em; height: 200px; }
.axis-tick { position: absolute; right: 0; bottom: var(--y); transform: translateY(50%); line-height: 1; }
.curve-svg { width: 100%; height: 200px; border-left: 2px solid var(--line-2); border-bottom: 2px solid var(--line-2); }
.grid-line { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.area-reading { fill: var(--orange); }
/* owner-feedback-v5 (Plan169): characters read, on its own axis at the right, in the colour of its line. */
.curve-plot.has-right { grid-template-columns: auto minmax(0, 1fr) auto; }
.curve-axis-right { color: var(--orange-ink); }
.curve-axis-right .axis-tick { right: auto; left: 0; }
.line-right { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.curve-titles { display: flex; justify-content: space-between; gap: 8px; }
.axis-title-left { color: var(--ink-2); }
.axis-title-right { color: var(--orange-ink); }
.swatch-line { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--orange); }
.area-parent { fill: var(--green-tint); stroke: var(--green); stroke-width: 1; vector-effect: non-scaling-stroke; }
.area-mastered { fill: var(--green); }
.area-recognized { fill: var(--blue); }
.curve-dates { position: relative; height: 1.4em; }
.date-tick { position: absolute; left: var(--x); transform: translateX(-50%); white-space: nowrap; }
.date-tick.is-first { transform: none; }
.date-tick.is-last { transform: translateX(-100%); }
.chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.segmented-small { padding: 4px; border-radius: 14px; }
.segmented-small button { min-height: 36px; padding: 0 12px; font-size: 15px; border-radius: 10px; }
.report-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.total-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 16px; background: var(--card); border: 2px solid var(--line-2); min-width: 0; }
.total-tile strong { font-size: 28px; }
.bars-dense { gap: 2px; }
.bars-dense .bar-value { font-size: 11px; }
/* owner-feedback-v2 (Plan169): a date may be wider than its bar; the bars next to it carry none. */
.bars-daily .bar-label { overflow: visible; text-overflow: clip; font-size: 11px; }
.bar-caption { margin: 2px 0 0; }
/* owner-feedback-library-order-growth-v1: a 新认识的字 bar is a button; the open one is outlined. */
.bar-pick { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 8px; }
.bar-pick:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.bar-pick.is-on .bar { box-shadow: 0 0 0 3px var(--ink); }
.bar-pick.is-on .bar-value { font-weight: 800; }
.bar-detail { margin-top: 8px; }
.bar-detail p { margin: 0 0 6px; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; min-height: 150px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.bar-value { font-size: 13px; min-height: 16px; }
.bar-track { position: relative; width: 100%; max-width: 44px; height: 110px; display: flex; align-items: flex-end; }
.bar { display: block; width: 100%; height: var(--h); min-height: 2px; border-radius: 6px 6px 2px 2px; background: var(--ink-2); }
.bar-green { background: var(--green); }
.bar-blue { background: var(--blue); }
.bar-orange { background: var(--orange); }
.bar-goal { position: absolute; left: -3px; right: -3px; bottom: var(--at); border-top: 3px solid var(--ink); }
/* An empty label still takes its line, so every bar starts at the same height (owner-feedback-v3, Plan169). */
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-size: 12px; line-height: 1.5; min-height: 1.5em; }
.meter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.meter-row, .reading-row { display: grid; grid-template-columns: 9em minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.meter-label { font-weight: 700; }
.meter { height: 14px; border-radius: 7px; background: var(--lock); overflow: hidden; }
.meter-fill { display: block; height: 100%; width: var(--w); background: var(--green); }
.hard-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hard-item { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); }
.hard-stuck { border-color: var(--orange); background: var(--orange-pale); }
.hard-recovered { background: var(--green-tint); border-color: var(--green-tint); }
.hard-head { display: flex; align-items: center; gap: 10px; }
.hard-word { font-size: 38px; line-height: 1; }
.hard-char { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hard-single { font-size: 24px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tl-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.tl-marks { display: flex; gap: 2px; }
.tl-mark { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 3px; border-radius: 6px; font-size: 13px; font-weight: 700; }
.tl-ok { background: var(--green); color: #FFFFFF; }
.tl-miss { background: var(--orange); color: var(--ink); }
.tl-help { background: var(--blue-tint); color: var(--blue-ink); }
.tl-parent { background: var(--coral-tint); color: var(--coral-ink); }
.tl-game { background: var(--sun-tint); color: var(--orange-ink); }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 460px; }
.cal-head { text-align: center; }
.cal-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; border-radius: 10px; background: var(--lock); color: var(--lock-ink); }
.cal-cell.is-empty { background: transparent; }
.cal-cell.is-studied { background: var(--blue-tint); color: var(--blue-ink); }
.cal-cell.is-lesson { background: var(--green); color: #FFFFFF; }
/* owner-feedback-v4 (Plan169): one dot per thing done in the learning report's calendar. */
.cal-dots { display: flex; gap: 3px; margin: 2px 0; }
.cal-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-lesson { background: var(--green); }
.dot-catchup { background: var(--orange); }
.dot-review { background: var(--blue); }
.dot-game { background: var(--sun); box-shadow: inset 0 0 0 1px var(--orange-ink); }
.cal-min { font-size: 11px; }
.cal-star { color: var(--sun); font-size: 16px; line-height: 1; }
.growth-big { font-size: 22px; }
.growth-big strong { font-size: 40px; color: var(--green); }
.milestones { display: flex; flex-wrap: wrap; gap: 6px; }
.char-cell.is-static { display: grid; place-items: center; }
@media (max-width: 760px) {
  .meter-row, .reading-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .curve-svg, .curve-axis { height: 160px; }
  .total-tile strong { font-size: 22px; }
  .bar-track { height: 90px; }
}

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

/* ---- iPad portrait, small laptops and phones ---- */
@media (max-width: 1023px) {
  .app[data-mode="hub"] #main { display: block; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .rail { display: none; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px clamp(16px, 4vw, 32px) 0; }
  .topbar-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    padding: 6px 12px env(safe-area-inset-bottom, 0px); background: #fcf9f4; border-top: 1px solid #efe5d8; box-shadow: 0 -4px 16px rgba(107, 74, 42, .06);
  }
  .tabbar .nav-item { flex-direction: column; justify-content: center; gap: 2px; min-height: 76px; padding: 0; font-size: 15px; border: 0; text-align: center; }
  .tabbar .nav-item.is-on { background: none; border: 0; }
  .tabbar .nav-item.is-on .nav-icon { background: var(--coral-tint); border-radius: 999px; }
  .tabbar .nav-icon { width: 56px; height: 34px; display: grid; place-items: center; }
  .tabbar .nav-art { width: 34px; height: 34px; } .tabbar .nav-item.is-on { color: #ef4b30; font-weight: 800; } .tabbar .nav-item.is-on .nav-icon { background: #fde1db; }
  .hub-content { padding: 24px clamp(16px, 4vw, 32px) 40px; }
  .today-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .today-stats .goal-card { grid-column: 1 / -1; }
  .action-bar.sticky { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); margin: 0; border-radius: 20px; }
  .course-sheet, .char-card { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .sheet-wrap { align-items: flex-end; padding: 0; }
  .sheet { width: 100%; border-radius: 32px 32px 0 0; max-height: 85vh; border-bottom: 0; }
}
@media (max-width: 760px) {
  .stars-top { grid-template-columns: minmax(0, 1fr); }
  .mark-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
  .tile-md { width: 68px; height: 68px; font-size: 46px; }
  .mission { padding: 20px; }
  .done-head .ring { width: 110px; height: 110px; }
}
@media (max-width: 480px) {
  .stat { min-height: 96px; padding: 12px; }
  .stat-num { font-size: 32px; }
  .focus-header { gap: 10px; }
  .focus-header .star-chip { display: none; }
}
/* computer: story text next to its picture */
@media (min-width: 1024px) {
  .story.has-figure .story-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; gap: 32px; }
  .story.has-figure .story-figure { position: sticky; top: 96px; }
}

/* Bigger screens: the whole page grows with the window (owner 2026-10-05, Plan155 owner-feedback-v12: “全屏的时候发现页面不会继续放大”).
   The layout is drawn for 1280–1440 wide; past that every size scales together. Zoom also scales vh, so screen-height
   measurements use --vh-full, which divides it back out. */
:root { --zoom: 1; --vh-full: calc(100vh / var(--zoom)); }
@media (min-width: 1600px) { :root { --zoom: 1.12; } }
@media (min-width: 1800px) { :root { --zoom: 1.25; } }
@media (min-width: 2100px) { :root { --zoom: 1.4; } }
@media (min-width: 2400px) { :root { --zoom: 1.6; } }
html { zoom: var(--zoom); }
.star-sub { display: block; margin-top: 4px; }

/* Plan165: parents' app feedback in the 反馈 window and on the stop pages. */
.afb-sheet .afb-form { border: 0; padding: 0; }
.afb-form { max-width: none; width: 100%; border-width: 2px; border-color: var(--line-2); }
.afb-form textarea { width: 100%; resize: vertical; }
.afb-hint { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.afb-context summary, .afb-list summary { cursor: pointer; font-weight: 700; }
.afb-context ul, .afb-list ul { margin: 8px 0 0; padding-left: 18px; }
.afb-list { width: 100%; }
.afb-list li { padding: 10px 0; border-bottom: 1px solid var(--line); list-style: none; }
.afb-list ul { padding-left: 0; }
.afb-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.afb-status { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--line-2); }
.afb-status.is-fixed { border-color: var(--green); color: var(--green); }
.afb-status.is-working { border-color: var(--blue); }
.afb-reply { background: var(--coral-tint); border-radius: 12px; padding: 8px 12px; }
.afb-stop { width: 100%; max-width: 680px; margin-top: 16px; }

/* Plan169: the parent-mark check and 听答案. */
.answer-line { margin: 0; }
.warn-text { color: var(--coral-ink, #9A3412); }

/* Plan170: the placement check, and 测字估计 characters. */
.choice-list { display: grid; gap: 12px; }
.choice-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer; }
.choice-card .pill { margin-left: 8px; }
.compare { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: inherit; } /* owner-decision-v6 (167): as large as the text around it */
.mark-saved { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; }
.mark-saved .big { margin: 0; }
.compare th, .compare td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.placement-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.placement-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 3px solid transparent; border-radius: 18px; background: var(--card); min-height: 48px; }
.placement-tile.is-read { border-color: var(--green); background: var(--green-tint); color: var(--green); }
.mark-cell.is-estimated { outline: 2px dashed var(--green); outline-offset: -4px; }
.dot-estimated { background: var(--green-tint); box-shadow: inset 0 0 0 2px var(--green); }
.swatch-estimated { background: repeating-linear-gradient(45deg, var(--green-tint), var(--green-tint) 3px, #FFFFFF 3px, #FFFFFF 6px); }
.area-estimated { fill: var(--green-tint); stroke: var(--green); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; opacity: 0.7; }
.mark-import { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.mark-import textarea { width: 100%; font-size: 18px; padding: 10px; border-radius: 12px; border: 2px solid var(--line-2); font-family: var(--kai); }
.mark-import .chip.is-on { border-color: var(--green); background: var(--green-tint); }

/* Plan171: character-structure hints (拆 / 合) and phonetic families (字族). */
.char-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 8px 12px; border-radius: 14px; background: var(--sun-tint); }
.hint-eq { display: inline-flex; align-items: flex-end; gap: 6px; font-size: 30px; line-height: 1; }
.hint-part { display: inline-flex; flex-direction: column; align-items: center; min-width: 1.1em; }
.hint-part.is-sound .hint-form { color: var(--blue-ink); }
.hint-part.is-result .hint-form { color: var(--coral-ink); }
.hint-under { font-size: 14px; color: var(--muted); margin-top: 2px; }
.hint-op { font-family: var(--sans); font-size: 20px; color: var(--muted); padding-bottom: 4px; }
.rate .char-hint { justify-content: center; }
.rate .hint-eq { font-size: 24px; }
.family-banner { width: 100%; max-width: 560px; margin: 12px auto 0; }
.family-line { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-radius: 14px; border: 0; background: var(--blue-tint); color: var(--ink); font-size: 18px; cursor: pointer; text-align: left; }
.family-line .kai { flex: 1; }
.family-line[aria-expanded="true"] .icon { transform: rotate(90deg); }
.family-card { margin-top: 10px; padding: 14px; border-radius: 16px; background: var(--card); border: 2px solid var(--line-2); text-align: center; }
.family-ring { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.family-char { min-width: 56px; min-height: 56px; border-radius: 14px; border: 2px solid var(--blue-line); background: var(--blue-tint); color: var(--ink); font-size: 34px; cursor: pointer; }
.family-core { min-width: 72px; min-height: 72px; font-size: 44px; border-color: var(--blue); background: var(--card); color: var(--blue-ink); }
.new-dot { display: inline-block; width: 9px; height: 9px; margin-left: 6px; border-radius: 50%; background: var(--coral); }
.family-gallery { margin-top: 12px; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.family-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; border: 2px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; }
.family-tile.is-on { border-color: var(--blue); background: var(--blue-tint); }
.family-tile-char { font-size: 36px; line-height: 1.1; }
.new-tag { position: absolute; top: 4px; right: 6px; bottom: auto; left: auto; padding: 0 6px; border-radius: 8px; font-size: 12px; background: var(--coral); color: #fff; }
.family-line .pill { background: var(--sun); }

/* ---- Plan175 share cards ---- */
.page-share .share-preview { display: flex; justify-content: center; }
.page-share .switch-row { display: flex; align-items: center; justify-content: flex-start; gap: 10px; } /* app review B4: the box next to its words */
.page-share .switch-row input { width: 22px; height: 22px; margin: 0; accent-color: var(--green); }
.share-canvas { width: min(420px, 100%); height: auto; border: 0; border-radius: 18px; box-shadow: var(--shadow); background: var(--card); }
.page-share input[type="text"] { width: 100%; max-width: 320px; min-height: 48px; padding: 0 14px; border: 2px solid var(--line-2); border-radius: 14px; font-size: 18px; }
.share-note { display: flex; align-items: center; gap: 10px; }

/* ---- Plan173 paged reading ---- */
.page-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-dots { display: flex; gap: 8px; }
/* App review F (书架“自己读” on a phone): an episode of 15+ screens made the dots wider than the screen and the whole page
   slid sideways; the dots now wrap onto a second row between the two buttons. */
.page-dots { min-width: 0; flex-wrap: wrap; justify-content: center; row-gap: 6px; }
.page-dot { flex: none; }
.page-dot { width: 12px; height: 12px; border-radius: 999px; border: 0; background: #e2dbd2; }
.page-dot.is-on { background: var(--coral); }
.sentence-picture { width: min(220px, 40%); border-radius: 14px; box-shadow: 0 2px 10px rgba(107, 74, 42, .14); }

/* ---- Plan174 audio picture-book shelf ---- */
/* Plan178 (design consistency-v1/06-bookshelf-progress-v2): wooden shelves, one per series with its name on a wooden
   sign; the books stand on the plank; the share of known characters is always one blue bar with its number. */
/* the painted wall (shelf-wall.jpg) covers the first screen and scrolls with the page, then the wall's own colour */
.app:has(.page-shelf) .hub-content { --hub-x: clamp(20px, 4vw, 56px); --bg-h: max(var(--vh-full), calc((100vw / var(--zoom) - 124px) / 1.598));
  background: #fbeddf url("/images/v8-ui/shelf-wall.jpg") center top / auto var(--bg-h) no-repeat; }
@media (max-width: 1023px) { .app:has(.page-shelf) .hub-content { --hub-x: clamp(16px, 4vw, 32px); --bg-h: max(var(--vh-full), calc(62.58vw / var(--zoom))); } }
.page.page-shelf { max-width: none; gap: 22px; }
/* owner-feedback-title-font-v1 / owner-feedback-shelf-line-v1: no visible title and no explaining line — only today's count,
   on the right (was the title and a long line in the middle, owner-feedback-shelf-look-v1). */
.shelf-head { display: flex; align-items: center; justify-content: flex-end; padding-top: 4px; }
.shelf-today { display: inline-flex; align-items: center; gap: 10px; padding: 10px 22px 10px 14px; border-radius: 999px; background: #fffdf9; box-shadow: var(--shadow); font-size: 18px; font-weight: 700; }
.shelf-today img { width: 32px; height: 32px; object-fit: contain; }
/* owner-feedback-shelf-look-v2: no side post; the chunky sign stands on the left end of the board; low books standing on the
   board, only the chosen one with its buttons (the big 听 over its bottom edge); more books than a board holds go on to
   another board under it, without a sign. */
/* owner-feedback-shelf-more-series-v1 “不要弄太挤”: room between the shelves; the page scrolls down */
/* owner-feedback-shelf-edges-v1: the shelves start right at the navigation and end close to the window's right edge */
.shelf-case { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 64px); margin: 0 calc(min(20px, var(--hub-x)) - var(--hub-x)) 0 calc(-1 * var(--hub-x)); }
.shelf-pot { align-self: flex-end; width: clamp(150px, 16vw, 230px); margin: -6px calc(min(20px, var(--hub-x)) - var(--hub-x)) 0 0; }
.shelf-row { position: relative; display: grid; grid-template-columns: clamp(190px, 19vw, 290px) minmax(0, 1fr); align-items: end; gap: 0 14px; padding: 0 64px 30px 0; }
/* the painted board under the books (stretched along its grain); its top surface is the 22 px above the books' feet */
.shelf-row::after { content: ""; position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; height: 52px;
  background: url("/images/v8-ui/shelf-board.png") center / 100% 100% no-repeat; filter: drop-shadow(0 10px 10px rgba(107, 74, 42, .25)); }
/* the painted blank sign on the left end of the board; the series name on its front */
.shelf-sign { position: relative; z-index: 1; align-self: end; display: grid; place-items: center; aspect-ratio: 380 / 149; margin: 0 0 -6px; padding: 16% 13% 3% 4%;
  text-align: center; font-size: clamp(26px, 2.5vw, 36px); line-height: 1; font-weight: 400; color: #4a2c16; -webkit-text-stroke: .8px currentColor;
  background: url("/images/v8-ui/shelf-sign-1.png") center / 100% 100% no-repeat; filter: drop-shadow(0 8px 6px rgba(107, 74, 42, .25)); }
.shelf-sign.sign-2 { background-image: url("/images/v8-ui/shelf-sign-2.png"); }
.shelf-leaves { position: absolute; z-index: 2; bottom: 22px; pointer-events: none; }
.shelf-leaves.leaves-1 { right: 0; width: 64px; } .shelf-leaves.leaves-2 { right: 1%; width: 40px; } .shelf-leaves.leaves-3 { right: 0; width: 58px; }
/* the books of one series on one board: --row of them show, more slide sideways (the board stays) */
.shelf-slider { position: relative; z-index: 1; min-width: 0; }
.shelf-cards { --row: 4; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--row) - 1) * 22px) / var(--row)); gap: 22px; align-items: end;
  margin: -14px 0 -34px; padding: 14px 0 34px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.shelf-cards::-webkit-scrollbar { display: none; }
.shelf-cards > * { scroll-snap-align: start; }
.shelf-slide { position: absolute; z-index: 4; top: 42%; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255, 253, 249, .95); color: #3c2718; box-shadow: var(--shadow-lift); }
.shelf-slide.is-prev { left: -18px; } .shelf-slide.is-next { right: -24px; }
/* a low book with thickness: a coloured spine on the left, the pages showing on the right and at the bottom */
.shelf-book { --spine: #7fae7a; position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; margin: 0 8px 0 0;
  padding: 10px 12px 12px 20px; border-radius: 8px 14px 14px 8px; background: #fffaf2; text-align: center; cursor: pointer;
  box-shadow: inset 11px 0 0 var(--spine), inset 13px 0 0 rgba(0, 0, 0, .08), 0 8px 14px rgba(107, 74, 42, .22); }
.shelf-book::after { content: ""; position: absolute; z-index: -1; top: 7px; right: -7px; bottom: -5px; left: 14px; border-radius: 4px 12px 10px 4px;
  background: repeating-linear-gradient(90deg, #f6eddd 0 2px, #e3d5bd 2px 3px); box-shadow: 0 5px 8px rgba(107, 74, 42, .18); }
.shelf-book:nth-child(4n+2) { --spine: #e3a75d; }
.shelf-book:nth-child(4n+3) { --spine: #6f9bd2; }
.shelf-book:nth-child(4n+4) { --spine: #d9806e; }
.shelf-book:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.shelf-book.is-chosen { cursor: default; padding-bottom: 34px; box-shadow: inset 11px 0 0 var(--spine), inset 13px 0 0 rgba(0, 0, 0, .08), 0 0 0 3px #f2735e, 0 0 18px rgba(244, 102, 79, .45), 0 8px 14px rgba(107, 74, 42, .22); }
.shelf-book-title { margin: 0; white-space: nowrap; font-size: clamp(20px, 2vw, 30px); font-weight: 400; color: #3c2718; letter-spacing: .06em; -webkit-text-stroke: .7px currentColor; }
.shelf-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px 10px 4px 4px; background: var(--sun-tint); display: grid; place-items: center; }
.shelf-cover img { width: 100%; height: 100%; object-fit: cover; }
.shelf-cover > .kai { font-size: 26px; }
.shelf-book.is-locked .shelf-cover img { filter: saturate(.5) brightness(.95); }
.shelf-cover-lock { position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 253, 249, .92); color: #6a5a4c; }
.shelf-time { font-size: 15px; color: #6a5a4c; }
.shelf-known { display: flex; flex-direction: column; align-items: stretch; gap: 3px; }
.shelf-known-bar { display: block; height: 9px; border-radius: 999px; background: #e6e1da; overflow: hidden; }
.shelf-known-fill { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.shelf-known-text { font-size: 14px; color: #5a4a3c; }
.shelf-badge { align-self: center; display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-ink); font-size: 13px; font-weight: 700; }
.shelf-badge.is-read { background: #fdf6e6; color: #7a5a10; }
.shelf-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
/* the chosen book's buttons sit over its bottom edge */
.shelf-book-actions { position: absolute; z-index: 3; left: 18px; right: 10px; bottom: 0; transform: translateY(50%); display: flex; justify-content: center; gap: 8px; }
.shelf-book-actions .btn { flex: 1 1 0; min-height: 52px; padding: 0 10px; font-size: 22px; }
.shelf-book-actions .btn-secondary { font-size: 18px; }
.shelf-locked-note { padding: 8px 12px; border-radius: 14px; background: #fffdf9; box-shadow: var(--shadow); font-size: 14px; color: #6a5a4c; }
/* the painted 准备中 book, as wide as a book, its word over the cover */
.shelf-coming { position: relative; align-self: end; margin-right: 8px; }
.shelf-coming img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; object-position: bottom; filter: drop-shadow(0 8px 10px rgba(107, 74, 42, .18)); }
.shelf-coming-text { position: absolute; left: 10%; right: 0; top: 9%; text-align: center; font-size: 18px; font-weight: 700; color: #a8998a; }
/* the listening and reading page: a back pill, the series over the title, one white page */
.shelf-player-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 64px; }
.shelf-back { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }
.shelf-flag { position: absolute; right: 0; top: 50%; transform: translateY(-50%); } /* Plan213 A */
.shelf-player-title { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.shelf-series { font-size: 16px; font-weight: 700; color: #6a5a4c; }
.shelf-player-title h1 { font-size: clamp(30px, 3vw, 44px); font-weight: 900; color: #3c2718; letter-spacing: .04em; }
.shelf-sheet { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px clamp(16px, 3vw, 40px) 20px; border-radius: 30px; background: #fffdf9; box-shadow: var(--shadow); }
.shelf-sheet .shelf-captions { align-self: stretch; align-items: center; text-align: center; }
.shelf-sheet .shelf-bar { flex-direction: column; }
.shelf-sheet .shelf-controls { justify-content: center; }
.shelf-sheet .shelf-controls:not(.shelf-extras) .btn { min-width: 150px; min-height: 60px; font-size: 22px; }
.shelf-sheet .shelf-read-body { align-self: stretch; }
.shelf-source { text-align: center; }
.pause-mark { display: inline-block; width: 14px; height: 18px; border-left: 5px solid currentColor; border-right: 5px solid currentColor; }
@media (max-width: 1023px) {
  .shelf-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding-right: 0; }
  .shelf-leaves { display: none; }
  .shelf-sign { justify-self: start; width: 210px; margin: 0 0 10px; padding: 34px 27px 6px 8px; font-size: 24px; } /* % padding would follow the whole row here */
  .shelf-cards { gap: 16px; grid-auto-columns: calc((100% - (var(--row) - 1) * 16px) / var(--row)); }
  .shelf-slide.is-prev { left: -10px; } .shelf-slide.is-next { right: -10px; }
}
@media (max-width: 599px) {
  .shelf-player-head { flex-direction: column; gap: 8px; }
  .shelf-back { position: static; transform: none; align-self: flex-start; }
  .shelf-flag { top: 0; transform: none; }
  .shelf-sheet .shelf-controls:not(.shelf-extras) .btn { min-width: 0; flex: 1; }
  .shelf-book-actions .btn { min-height: 46px; font-size: 18px; }
}
.shelf-picture { position: relative; margin: 0 auto; width: min(100%, calc(var(--shelf-pic-h) * 4 / 3)); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 22px; background: var(--sun-tint); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(107, 74, 42, .14); }
.shelf-picture img { width: 100%; height: 100%; object-fit: cover; transform-origin: center; }
.shelf-picture.is-empty { align-content: center; gap: 8px; }
.shelf-picture-title { font-size: clamp(36px, 6vw, 56px); }
.shelf-picture img.is-moving { animation-duration: var(--motion-ms, 12000ms); animation-delay: var(--motion-delay, 0ms); animation-timing-function: linear; animation-fill-mode: both; }
.shelf-picture img.motion-zoom-in.is-moving { animation-name: shelf-zoom-in; }
.shelf-picture img.motion-zoom-out.is-moving { animation-name: shelf-zoom-out; }
.shelf-picture img.motion-pan-right.is-moving { animation-name: shelf-pan-right; }
.shelf-picture img.motion-pan-left.is-moving { animation-name: shelf-pan-left; }
@keyframes shelf-zoom-in { from { transform: scale(1); } to { transform: scale(1.12); } }
@keyframes shelf-zoom-out { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes shelf-pan-right { from { transform: scale(1.12) translateX(-4%); } to { transform: scale(1.12) translateX(4%); } }
@keyframes shelf-pan-left { from { transform: scale(1.12) translateX(4%); } to { transform: scale(1.12) translateX(-4%); } }
@media (prefers-reduced-motion: reduce) { .shelf-picture img.is-moving { animation: none; } }
.shelf-captions { display: flex; flex-direction: column; gap: 6px; min-height: 7em; }
.shelf-caption { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.8; }
.shelf-caption.is-title { font-size: clamp(32px, 4vw, 44px); }
.shelf-caption .is-grey { color: var(--lock-ink); }
.shelf-caption ruby { ruby-position: over; }
.shelf-caption rt { font-family: var(--font-ui, system-ui), sans-serif; font-size: 0.45em; letter-spacing: 0; color: var(--muted); }
.shelf-next { margin: 0; font-size: 20px; }
.shelf-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.shelf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
/* owner-feedback-v8 (“图太大了导致一页没办法既看图又看字”): the picture leaves room for the caption and the buttons. */
.page-shelf-player { --shelf-pic-h: clamp(170px, calc(var(--vh-full) - 500px), 600px); }
.page-shelf-reader { --shelf-pic-h: clamp(150px, calc(var(--vh-full) * 0.34), 360px); }
.shelf-read-body { display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 1024px) {
  .page-shelf-reader { --shelf-pic-h: clamp(220px, calc(var(--vh-full) - 300px), 480px); }
  .shelf-read-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; gap: 32px; }
  .shelf-read-body .shelf-picture { position: sticky; top: 96px; }
}
/* phones: the arrows without words, no next-sentence preview, a smaller picture (owner-feedback-v8) */
@media (max-width: 599px) {
  .page-shelf-player { --shelf-pic-h: clamp(140px, calc(var(--vh-full) - 600px), 300px); }
  .page-shelf-reader { --shelf-pic-h: clamp(130px, calc(var(--vh-full) * 0.26), 240px); }
  .shelf-controls .wide-only, .shelf-next { display: none; }
  .shelf-captions { min-height: 4em; }
  .shelf-bar { display: contents; }
  .shelf-caption { font-size: 24px; }
  .shelf-caption.is-title { font-size: 30px; }
  .page-shelf-player .shelf-controls:not(.shelf-extras), .page-shelf-reader .page-nav { position: sticky; flex-wrap: nowrap; justify-content: space-between; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 5; padding: 10px; background: var(--card); box-shadow: var(--shadow-lift); border-radius: 20px; }
}
.shelf-reading { display: flex; flex-direction: column; gap: 8px; font-size: clamp(28px, 2.6vw, 36px); line-height: 2.05; letter-spacing: 0.05em; }
.shelf-reading p { margin: 0; }
.shelf-reading p.is-title { font-size: 1.2em; }
.shelf-reading ruby { ruby-position: over; }
.shelf-reading rt { font-family: var(--font-ui, system-ui), sans-serif; font-size: 0.42em; color: var(--muted); letter-spacing: 0; }

/* ---- app review D (phones and iPad upright), 2026-10-15 ---- */
@media (max-width: 760px) {
  /* D1: the top bar in one row — the 字 mark without its name, then 星星、家长、反馈 */
  .topbar { padding-top: 12px; gap: 8px; }
  .topbar .brand-name { display: none; }
  .topbar-tools { flex-wrap: nowrap; gap: 2px; }
  .topbar .parent-link { min-height: 40px; padding: 0 8px; gap: 4px; font-size: 15px; }
  /* D2: 复习 and 认一认 one character per row (the character left, its buttons right), so five fit without much scrolling */
  .rate-grid, .rate-grid.cols-2, .rate-grid.cols-3, .rate-grid.cols-4, .rate-grid.cols-5 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rate { display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: center; }
  .rate > .tile-lg { grid-row: 1 / span 3; width: 88px; height: 88px; font-size: 56px; }
  .rate > :not(.tile-lg):not(.helped-tag):not(legend) { grid-column: 2; }
  .rate .char-hint { grid-column: 1 / -1 !important; }
  .rate .helped-tag { z-index: 1; }
  .rate-buttons button { min-height: 48px; }
  /* D4: the reading tools in one row that slides sideways instead of three rows above the text */
  .story-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding-bottom: 2px; }
  .story-tools > * { flex: none; }
  .story-tools .speed-control input { width: 90px; }
  /* D5: 开始听 gets the room; the arrows stay small; the speed is not under the tab bar */
  .shelf-sheet .shelf-controls:not(.shelf-extras) .btn { flex: none; min-width: 56px; padding: 0 12px; }
  .shelf-sheet .shelf-controls:not(.shelf-extras) .btn-primary { flex: 1; }
  .page-shelf-player { padding-bottom: 80px; }
  /* D6: the save bar is lower and slimmer, so it covers less of the characters */
  .page-mark .action-bar.sticky { gap: 8px; padding: 8px 12px; }
  .page-mark .action-bar.sticky .status-line:empty { display: none; }
}

/* Plan183 《我的第一本书》: the book by the path after lesson 5 (faded with a lock until lessons 1–5 are done), and 读小书. */
.my-books { display: flex; flex-wrap: wrap; gap: 22px; padding: 6px 4px 12px; }
.my-book { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 200px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.book-art { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 10px 14px 14px 10px; overflow: hidden; background: #f3e4cc; box-shadow: -6px 0 0 #b9875a, 0 6px 12px rgba(84, 60, 30, .25); }
.book-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.my-book:not(.is-open) .book-art img { filter: grayscale(.6) opacity(.65); }
.book-lock { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #8a6d55; }
.my-book-title { font-size: 20px; }
.my-book-status { font-size: 14px; color: var(--ink-2); }
/* owner-feedback-v4 (167): a book's name and its pinyin stay on one line; the stories in a theme book under it. */
.book-done-name { white-space: nowrap; display: inline-block; }
.book-done-stories { font-size: .9em; }
.book-done-cover { width: 100%; border-radius: 16px; margin: 6px 0 12px; box-shadow: 0 4px 12px rgba(84, 60, 30, .2); }
.book-sheet .book-title { margin: 18px 0 6px; text-align: center; font-size: clamp(36px, 6vw, 56px); }
.book-sheet .book-lines .sentence-text { font-size: clamp(36px, 5.4vw, 52px); }
@media (max-width: 760px) { .my-book { width: 150px; } }
/* Plan184 step 3 (D9): a small key beside a lesson whose key word opens something in 乐园, on the side away from its sign. */
.course-key { position: absolute; z-index: 5; left: calc(50% + var(--dx) * var(--amp) + var(--kx) * 58px); transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 2px solid #e2c27a; border-radius: 50%; background: #fff8e6;
  font-size: 19px; line-height: 1; box-shadow: 0 2px 4px rgba(84, 60, 30, .2); }
.course-key.is-open { border-color: #8cc59a; background: #eef8f0; }
.course-key.is-on { outline: 3px solid #f2b84b; outline-offset: 2px; }
.course-key-list { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.course-key-list li { display: flex; align-items: center; gap: 12px; }
.course-key-picture { font-size: 30px; }
.course-key-sheet .item-name { font-size: 28px; }

/* owner-decision-v17 (Plan184 parent-park-settings-draft-v1): one line on how it is now, under each block's title in 乐园和宠物. */
.parent-now { margin: -4px 0 10px; padding: 8px 12px; border-radius: 12px; background: #f4efe3; color: #4b4033; font-size: 15px; line-height: 1.6; }
.parent-now strong { margin-right: 2px; color: #2f4a3f; }
.parent-fold-rows .prow { padding-left: 0; padding-right: 0; }

/* Plan184 winter, the whole app (owner-decision-winter-app-v1; codex-winter-app-v1.md): December to February each autumn
   picture gives way to its winter version (-winter, the same size and layout; app.js sets html[data-season]). */
html[data-season="winter"] .focus.is-forest { background-image: url("/images/v8-ui/lesson-forest-desk-winter.jpg"), url("/images/v8-ui/lesson-forest-wood.jpg"); }
html[data-season="winter"] .app:has(.page-library) .hub-content { background-image: url("/images/v8-ui/library-room-desk-winter.jpg"), url("/images/v8-ui/library-room-wood.jpg"); }
html[data-season="winter"] .app:has(.page-shelf) .hub-content { background-image: url("/images/v8-ui/shelf-wall-winter.jpg"); }
html[data-season="winter"] .shelf-sign { background-image: url("/images/v8-ui/shelf-sign-1-winter.png"); }
html[data-season="winter"] .shelf-sign.sign-2 { background-image: url("/images/v8-ui/shelf-sign-2-winter.png"); }
html[data-season="winter"] .scene-ginkgo { --scene: url("/images/v8-course/scene-ginkgo-winter.jpg"); }
html[data-season="winter"] .scene-creek { --scene: url("/images/v8-course/scene-creek-winter.jpg"); }
html[data-season="winter"] .scene-maple { --scene: url("/images/v8-course/scene-maple-winter.jpg"); }
html[data-season="winter"] .scene-pine { --scene: url("/images/v8-course/scene-pine-winter.jpg"); }
html[data-season="winter"] .scene-camp { --scene: url("/images/v8-course/scene-camp-winter.jpg"); }
html[data-season="winter"] .mark-leaf { background-image: url("/images/v8-course/leaf-winter.png"); }
html[data-season="winter"] .legend-mark.is-cabin, html[data-season="winter"] .cabin-art { background-image: url("/images/v8-course/cabin-winter.png"); }
html[data-season="winter"] .course-trail { background-color: #eef3f7; }

/* Plan184 spring (owner-decision-spring-v1 S1; codex-spring-v2.md, spring-app-bg-v3): March to May each autumn picture gives way
   to its spring version (-spring, the same size and layout). */
html[data-season="spring"] .focus.is-forest { background-image: url("/images/v8-ui/lesson-forest-desk-spring.jpg"), url("/images/v8-ui/lesson-forest-wood.jpg"); }
html[data-season="spring"] .app:has(.page-library) .hub-content { background-image: url("/images/v8-ui/library-room-desk-spring.jpg"), url("/images/v8-ui/library-room-wood.jpg"); }
html[data-season="spring"] .app:has(.page-shelf) .hub-content { background-image: url("/images/v8-ui/shelf-wall-spring.jpg"); }
html[data-season="spring"] .shelf-sign { background-image: url("/images/v8-ui/shelf-sign-1-spring.png"); }
html[data-season="spring"] .shelf-sign.sign-2 { background-image: url("/images/v8-ui/shelf-sign-2-spring.png"); }
html[data-season="spring"] .scene-ginkgo { --scene: url("/images/v8-course/scene-ginkgo-spring.jpg"); }
html[data-season="spring"] .scene-creek { --scene: url("/images/v8-course/scene-creek-spring.jpg"); }
html[data-season="spring"] .scene-maple { --scene: url("/images/v8-course/scene-maple-spring.jpg"); }
html[data-season="spring"] .scene-pine { --scene: url("/images/v8-course/scene-pine-spring.jpg"); }
html[data-season="spring"] .scene-camp { --scene: url("/images/v8-course/scene-camp-spring.jpg"); }
html[data-season="spring"] .mark-leaf { background-image: url("/images/v8-course/leaf-spring.png"); }
html[data-season="spring"] .legend-mark.is-cabin, html[data-season="spring"] .cabin-art { background-image: url("/images/v8-course/cabin-spring.png"); }
/* Plan184 summer (owner-decision-summer-v1 S1; codex-summer-v1.md): June to August each autumn picture gives way to its summer
   version (-summer: the same picture with the maple and ginkgo leaves green). The cabin has no autumn leaves and stays as it is. */
html[data-season="summer"] .focus.is-forest { background-image: url("/images/v8-ui/lesson-forest-desk-summer.jpg"), url("/images/v8-ui/lesson-forest-wood.jpg"); }
html[data-season="summer"] .app:has(.page-library) .hub-content { background-image: url("/images/v8-ui/library-room-desk-summer.jpg"), url("/images/v8-ui/library-room-wood.jpg"); }
html[data-season="summer"] .app:has(.page-shelf) .hub-content { background-image: url("/images/v8-ui/shelf-wall-summer.jpg"); }
html[data-season="summer"] .shelf-sign { background-image: url("/images/v8-ui/shelf-sign-1-summer.png"); }
html[data-season="summer"] .shelf-sign.sign-2 { background-image: url("/images/v8-ui/shelf-sign-2-summer.png"); }
html[data-season="summer"] .scene-ginkgo { --scene: url("/images/v8-course/scene-ginkgo-summer.jpg"); }
html[data-season="summer"] .scene-creek { --scene: url("/images/v8-course/scene-creek-summer.jpg"); }
html[data-season="summer"] .scene-maple { --scene: url("/images/v8-course/scene-maple-summer.jpg"); }
html[data-season="summer"] .scene-pine { --scene: url("/images/v8-course/scene-pine-summer.jpg"); }
html[data-season="summer"] .scene-camp { --scene: url("/images/v8-course/scene-camp-summer.jpg"); }
html[data-season="summer"] .mark-leaf { background-image: url("/images/v8-course/leaf-summer.png"); }

/* Plan168 report redesign: parent-only typography and disclosure; shared child charts retain their layout. */
.page-report { gap: 28px; font-size: 18px; line-height: 1.65; --muted: #756454; }
.page-report > * { min-width: 0; }
.page-report .small { font-size: 16px; }
.page-report h2 { font-family: var(--sans); font-size: 26px; line-height: 1.35; }
.page-report .report-block h3 { font-size: 20px; margin-top: 18px; }
.page-report .report-block { padding: 32px; gap: 20px; border-radius: 26px; scroll-margin-top: 92px; }
.report-hero { padding: 28px 32px; border-radius: 28px; background: #edf4e8; border: 1px solid #dce8d5; }
.report-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.report-period { color: #58664c; font-size: 16px; margin-top: 8px; }
.report-hero-art { width: 94px; height: 86px; object-fit: contain; }
.report-week-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin: 20px 0 24px; }
.report-stat { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.report-stat p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; line-height: 1.25; }
.report-stat strong { font-size: 36px; font-weight: 750; letter-spacing: -.04em; }
.report-stat > span, .report-stat p > span { font-size: 16px; color: var(--ink-2); }
.report-week-stats .report-stat:first-child strong { font-size: 56px; color: #325c37; }
.report-week-stats .report-stat { justify-content: flex-end; gap: 10px; }
.report-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.report-nav a { color: var(--ink-2); text-decoration: none; padding: 10px 18px; border: 1px solid var(--line-2); border-radius: 24px; background: var(--card); font-size: 16px; }
.report-nav a:hover { background: var(--green-tint); color: #325c37; }
.report-details { border-top: 1px solid var(--line-2); }
.report-details > summary { cursor: pointer; padding: 14px 4px; font-size: 16px; font-weight: 600; color: var(--ink-2); }
.report-details[open] > summary { color: var(--ink); }
.report-detail-body { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 18px; }
.report-detail-body p { max-width: 70ch; }
.report-hero .report-details { border-color: #d2dfc9; }
.report-hero .report-detail-body { padding-bottom: 0; }
.page-report .report-big strong { font-size: 48px; line-height: 1.2; color: #325c37; }
.report-estimate { display: block; flex-basis: 100%; font-size: 16px; color: var(--ink-2); }
.report-lifetime { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 20px 24px; border-radius: 18px; background: #faf5ed; }
.page-report .toggle-chip, .page-report .segmented button { min-height: 44px; font-size: 16px; }
.page-report .curve { gap: 18px; padding-top: 14px; }
.page-report .curve-axis, .page-report .curve-svg { height: 240px; }
.page-report .curve-axis, .page-report .curve-dates, .page-report .curve-titles { font-size: 14px; }
.page-report .bars { overflow-x: auto; grid-auto-columns: minmax(76px, 1fr); padding: 6px 4px 10px; gap: 12px; }
.page-report .bar-track { height: 140px; max-width: 34px; }
.page-report .bar-value, .page-report .bar-label { font-size: 14px; }
.page-report .meter-list { gap: 16px; }
.page-report .meter-row { grid-template-columns: 7em minmax(60px, 1fr) auto; }
.page-report .meter { height: 18px; border-radius: 12px; }
.page-report .reading-row { grid-template-columns: minmax(100px, .7fr) minmax(0, 2fr) minmax(100px, 1fr); padding: 18px 0; border-bottom: 1px solid var(--line); gap: 14px; }
.page-report .reading-row strong { color: #325c37; font-size: 20px; }
.page-report .hard-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.page-report .hard-item { padding: 24px; border: 1px solid #efd6b9; gap: 16px; }
.page-report .hard-word { font-size: 44px; }
.page-report .hard-char { align-items: stretch; }
.report-char-link { align-self: flex-start; border: 0; border-radius: 12px; background: var(--card); padding: 10px 14px; min-height: 44px; color: var(--ink); font: inherit; cursor: pointer; }
.page-report .tl-day { padding: 8px; }
.page-report .tl-mark { font-size: 16px; min-width: 28px; height: 28px; }
.page-report .calendar { max-width: 680px; width: 100%; align-self: center; gap: 8px; }
.page-report .cal-cell { min-height: 76px; color: #756454; }
.page-report .cal-cell.is-studied { background: #edf4e8; color: #325c37; }
.page-report .cal-day { font-size: 20px; }
.page-report .cal-min { font-size: 14px; }
.page-report .legend { gap: 12px 20px; }
.report-empty { padding: 20px; border-radius: 16px; background: #faf5ed; color: var(--ink-2); }
.page-report :is(a, button, summary):focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.report-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.report-compare-item { min-width: 0; }
.page-report .report-compare-item h3 { margin: 0 0 16px; }
.report-compare-bar { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 12px 0; font-size: 16px; }
.report-compare-track { height: 12px; background: #f0ede7; border-radius: 8px; overflow: hidden; }
.report-compare-fill { display: block; width: var(--w); height: 100%; background: #457d4b; border-radius: inherit; }
.report-compare-bar.is-previous .report-compare-fill { background: #b7b1a7; }
.report-compare-bar strong { min-width: 2ch; text-align: right; }
.report-comparison-note { color: var(--ink-2); font-size: 16px; }
.report-distribution { display: flex; width: 100%; height: 24px; overflow: hidden; border-radius: 10px; background: var(--lock); }
.report-distribution > span { flex: var(--count); min-width: 0; border-right: 2px solid var(--card); background: var(--color); }
.report-status-legend { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 16px; }
.report-status-legend span { display: inline-flex; align-items: center; gap: 8px; }
.report-status-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--color); flex: none; }
@media (max-width: 1000px) {
  .report-comparison { grid-template-columns: 1fr; gap: 16px; }
  .report-compare-item + .report-compare-item { border-top: 1px solid var(--line); padding-top: 20px; }
}
@media (max-width: 760px) {
  .page-report { gap: 20px; }
  .page-report .report-block, .report-hero { padding: 24px 20px; border-radius: 22px; }
  .page-report h2 { font-size: 24px; }
  .report-week-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .report-week-stats .report-stat:first-child strong { font-size: 44px; }
  .report-stat strong { font-size: 32px; }
  .report-hero-art { width: 66px; height: 70px; }
  .report-nav { gap: 8px; }
  .report-nav a { padding: 8px 14px; }
  .report-lifetime { padding: 18px 14px; gap: 14px; }
  .page-report .hard-list { grid-template-columns: minmax(0, 1fr); }
  .page-report .meter-row, .page-report .reading-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .page-report .calendar { gap: 4px; }
  .page-report .cal-cell { min-height: 66px; }
  .page-report .cal-day { font-size: 18px; }
  .page-report .cal-min { font-size: 14px; }
  .page-report .curve-axis, .page-report .curve-svg { height: 180px; }
  .page-report .curve-titles { flex-wrap: wrap; }
  .page-report .report-big strong { font-size: 42px; }
}

@media (max-width: 600px) {
  .page-report .curve-dates .date-tick:not(.is-first):not(.is-last) { display: none; }
}

/* Plan168 period selection applies to the complete parent report. */
.report-period-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.page-report .report-period-picker .segmented { display: flex; flex-wrap: wrap; }
.report-calendars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 28px; }
.report-month { min-width: 0; }
.page-report .report-month h3 { margin: 0 0 16px; }
@media (max-width: 760px) {
  .page-report .report-period-picker .segmented { width: 100%; }
  .page-report .report-period-picker button { flex: 1; padding: 0 10px; }
}

/* Plan175 v5: one parent-gated recap dialog, with the same canvas used by preview and download. */
.page-recaps { gap: 20px; }
.page-recaps .segmented { flex-wrap: wrap; }
.page-recaps .segmented button { min-height: 44px; font-size: 17px; }
.recap-date { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 18px; }
.recap-date input, .recap-date select { font: inherit; max-width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); color: var(--ink); }
.recap-settings { gap: 12px; }
.recap-settings input[type=text] { font-size: 18px; width: min(100%,420px); }
.share-legacy { display:flex; flex-direction:column; gap:20px; }
.recap-popup { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; background:#3c271866; padding:16px; }
.recap-popup-sheet { display:flex; flex-direction:column; gap:14px; width:min(460px,100%); max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain; padding:20px; background:var(--paper); border-radius:26px; box-shadow:var(--shadow-lift); }
.recap-popup-head { display:flex; align-items:center; justify-content:space-between; gap:12px; position:sticky; top:-20px; z-index:1; background:var(--paper); padding:8px 0; }
.recap-popup-head h2 { font:700 23px/1.4 var(--sans); }
.recap-popup-head button { min-width:44px; min-height:44px; }
.recap-popup-preview { display:flex; justify-content:center; }
.recap-popup .share-canvas { width:100%; max-width:390px; height:auto; }
.recap-popup .segmented button { min-height:44px; font-size:17px; }
.recap-popup-actions { display:flex; flex-direction:column; gap:10px; text-align:center; }
.recap-popup-actions p { font-size:16px; }
@media(max-width:480px) { .recap-popup { padding:10px; } .recap-popup-sheet { padding:16px; max-height:calc(100dvh - 20px); } .recap-popup-head { top:-16px; } }

/* Plan183 personal books: readable directories on phone and tablet. */
.book-contents { width: min(700px, calc(100vw - 32px)); max-height: 85dvh; overflow: auto; border: 0; border-radius: 24px; padding: 24px; background: #fffdf7; color: var(--ink); }
.book-contents::backdrop { background: #16271980; }
.book-contents header, .collection-reader-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.book-contents-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; width: 100%; }
.book-contents-list li { border-bottom: 1px solid #dedbcd; padding-bottom: 12px; }
.book-contents-list li > button:first-child { display: flex; align-items: center; gap: 16px; width: 100%; border: 0; border-radius: 12px; padding: 12px; background: #f4f1e6; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.book-contents-list strong { font-size: 24px; line-height: 1.5; overflow-wrap: anywhere; }
.book-contents-list small { display: block; font-size: 16px; margin-top: 8px; }
.book-contents-list img { width: 84px; height: 63px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.first-book-contents { width: min(100%, 700px); margin: auto; }
.collection-art { display: grid; place-items: center; background: #e4edda; min-height: 150px; font-size: 64px; }
.collection-reader-bar { font-size: 16px; margin-bottom: 12px; }
@media (max-width: 420px) { .book-contents { padding: 16px; } .book-contents-list strong { font-size: 21px; } .book-contents-list img { width: 60px; height: 48px; } }

/* Plan183 accepted scrapbook design. Scoped to books; lesson prose and other dialogs keep their own layout. */
.mybook-directory { width: min(570px, calc(100vw - 24px)); padding: 24px; background: radial-gradient(ellipse at 100% 0, #dbead9, transparent 42%), #fbf6e9; }
.mybook-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mybook-hero { position: relative; display: block !important; min-height: 225px; padding: 28px 0 24px; }
.mybook-hero-copy { position: relative; width: calc(100% - 175px); z-index: 1; }
.mybook-hero-copy > small { color: #7e8c70; font-size: 14px; }
.mybook-hero h2 { font-size: clamp(28px, 4vw, 38px); line-height: 1.25; color: #38584c; margin: 12px 0; font-weight: 400; overflow-wrap: anywhere; }
.mybook-hero p { color: #8d8b70; font-size: 14px; line-height: 1.6; margin: 0; }
.mybook-mascot { object-fit: contain; width: 195px; height: 215px; position: absolute; right: -8px; bottom: 0; }
.mybook-mascot.is-small { width: 54px; height: 58px; position: static; flex: 0 0 auto; }
.mybook-paper { position: relative; border: 1px solid #e6ddc9; border-radius: 10px 20px 20px 10px; background: #fffdf6; padding: 18px 20px 10px 28px; margin: 0 8px 20px 0; box-shadow: 4px 4px 0 #f1ead9, 5px 5px 0 #dcd4bf, 8px 8px 0 #faf5e9, 9px 9px 0 #ddd5c1; }
.mybook-paper:before { content: ''; position: absolute; top: 12px; bottom: 12px; left: 11px; width: 2px; background: repeating-linear-gradient(to bottom, #dfd5bc 0 3px, transparent 3px 9px); }
.mybook-paper-head { display: flex; align-items: center; justify-content: flex-start !important; gap: 18px; min-height: 34px; padding-right: 24px; }
.mybook-paper-head h3 { font-size: 25px; font-weight: 400; margin: 0; color: #826c45; }
.mybook-paper-head > span { color: #948970; font-size: 14px; }
.mybook-ribbon { position: absolute; right: 20px; top: -4px; width: 22px; height: 43px; background: #77a49a; clip-path: polygon(0 0,100% 0,100% 100%,50% 80%,0 100%); }
.mybook-paper .book-contents-list { margin: 8px 0 0; gap: 0; }
.mybook-paper .book-contents-list li { position: relative; padding: 0; border-bottom: 1px solid #eee8d9; }
.mybook-paper .book-contents-list li:last-child { border: 0; }
.mybook-paper .book-contents-list li > button:first-child { background: transparent; gap: 16px; padding: 17px 0; border-radius: 8px; }
.mybook-paper .book-contents-list .mybook-thumb { display: block; width: 74px; height: 62px; border: 1px solid #e4dccd; background: white; padding: 3px; border-radius: 4px; box-shadow: 1px 3px 5px #7b6b5020; transform: rotate(-3deg); flex-shrink: 0; }
.mybook-paper .book-contents-list li:nth-child(even) .mybook-thumb { transform: rotate(3deg); }
.mybook-paper .book-contents-list .mybook-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.mybook-entry-copy { flex: 1; min-width: 0; }
.mybook-paper .book-contents-list strong { font-size: 25px; font-weight: 400; color: #4d503b; line-height: 1.4; }
.mybook-paper .book-contents-list small { color: #948974; font-size: 14px; margin-top: 6px; }
.mybook-entry-number { font-size: 12px; color: #c1b493; align-self: flex-start; margin-top: 8px; }
.mybook-paper li.is-bookmarked { background: #edf3e9; border-radius: 10px; padding: 0 8px 8px; }
.mybook-resume { background: #729782; color: #fffdf3; margin: 0 0 5px 90px; border: 0; }
.mybook-collect-note { color: #94876c; text-align: center; font-size: 16px; line-height: 1.8; padding: 10px 16px; }
.mybook-first-directory .story-body { display: block; }
.mybook-first-directory .story-head > span { display: none; }
.mybook-first-directory .first-book-contents { max-width: 570px; }
.mybook-keepsake { width: min(520px, calc(100vw - 24px)); max-height: 90dvh; overflow: auto; border: 1px solid #dcd0ad; border-radius: 24px; background: #fff8e9; padding: 24px; color: #766743; }
.mybook-keepsake::backdrop { background: #233d2b70; }
.mybook-memory-page { text-align: center; margin-top: 22px; padding: 26px 16px; border: 1px solid #d9cba6; border-radius: 18px; box-shadow: 0 0 0 7px #efe5cb; }
.mybook-memory-page > small { font-size: 15px; color: #958666; }
.mybook-memory-page h2 { font-size: 30px; font-weight: 400; }
.mybook-memory-page .mybook-mascot { position: static; width: 100%; height: 240px; }
.mybook-memory-date { color: #a38c5a; letter-spacing: 2px; font-size: 18px; }
.mybook-memory-page p { font-size: 16px; line-height: 1.8; }
.mybook-memory-stamp { display: inline-grid; place-items: center; border: 1px solid #b6a279; border-radius: 50%; width: 70px; height: 70px; font-size: 14px; transform: rotate(-12deg); color: #a58d5c; margin-top: 14px; }
@media (max-width: 420px) {
  .mybook-directory { padding: 16px; }
  .mybook-hero-copy { width: calc(100% - 125px); }
  .mybook-hero .mybook-mascot { width: 145px; height: 180px; right: -10px; }
  .mybook-paper { padding-left: 24px; padding-right: 12px; }
  .mybook-paper .book-contents-list li > button:first-child { gap: 12px; }
  .mybook-paper .book-contents-list .mybook-thumb { width: 56px; height: 49px; }
  .mybook-paper .book-contents-list strong { font-size: 22px; }
  .mybook-entry-number { display: none; }
  .mybook-resume { margin-left: 68px; }
}

/* Plan175: animate only the in-app trend preview, never the export canvas. */
.recap-trend-preview { display:flex; flex-direction:column; align-items:center; gap:8px; width:min(420px,100%); }
.recap-trend-preview .share-canvas { width:100%; }
.recap-trend-preview button { min-height:44px; font-size:16px; }
.recap-trend-preview p { font-size:16px; text-align:center; }

/* Plan183 collection covers: approved scene art when available, current companion otherwise. */
.collection-cover { display: flex; flex-direction: column; aspect-ratio: 3 / 4; padding: 18px 14px 14px 18px; border: 1px solid #d5d6bd; border-radius: 5px 12px 12px 5px; background: linear-gradient(105deg, #d5dfc1 0, #eff3df 13%, #e5edd5 100%); box-shadow: -5px 0 0 #8eaa82, 0 7px 13px #4d5b3b24; }
.collection-cover:before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 1px; background: #b8c1a655; }
.collection-cover.palette-1 { background: linear-gradient(105deg, #c5d9d9, #edf4ee 13%, #dcebe7); box-shadow: -5px 0 0 #7fa3a0, 0 7px 13px #4d5b3b24; border-color: #c7d6cc; }
.collection-cover.palette-2 { background: linear-gradient(105deg, #e4ceb4, #fbf0dc 13%, #f1dfc5); box-shadow: -5px 0 0 #bd936c, 0 7px 13px #4d5b3b24; border-color: #ddcfb7; }
.collection-cover.palette-3 { background: linear-gradient(105deg, #d4cbd9, #f5eef1 13%, #e9dfe9); box-shadow: -5px 0 0 #a196ac, 0 7px 13px #4d5b3b24; border-color: #d8cdd5; }
.collection-cover-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 20px; line-height: 1.3; color: #586448; }
.collection-cover-number { font: 22px Georgia, serif; color: #9b8961; }
.collection-cover-picture { display: grid; place-items: center; flex: 1; min-height: 0; position: relative; margin: 14px 0 10px; }
.collection-cover .collection-cover-picture img { width: 100%; height: 100%; min-height: 0; object-fit: contain; position: absolute; inset: 0; }
.collection-cover.has-scene .collection-cover-picture { border: 5px solid #fffaf0; border-radius: 3px; box-shadow: 0 3px 7px #695a3a24; transform: rotate(-2deg); }
.collection-cover.has-scene .collection-cover-picture img { object-fit: cover; }
.collection-cover .collection-cover-picture img.is-cover-fallback { object-fit: contain; padding: 22px; }
.collection-cover-bottom { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: #8c8067; line-height: 1.5; }
.collection-cover-line { height: 1px; width: 22px; background: #a79d7c66; }
@media (max-width: 760px) { .collection-cover { padding: 13px 10px 10px 14px; } .collection-cover-top { font-size: 17px; } .collection-cover-number { font-size: 18px; } .collection-cover-picture { margin-top: 10px; } }
/* Missing historical story art uses a companion thumbnail, never a different story's illustration. */
.mybook-paper .book-contents-list .is-companion-thumb { background: #edf2e4; transform: none; }
.mybook-paper .book-contents-list .is-companion-thumb img { position: static; object-fit: contain; width: 100%; height: 100%; }
.collection-reader-bar { justify-content: flex-end; gap: 12px; margin-bottom: 10px; }
.collection-reader-bar .mybook-mascot { margin-right: 0; }
.collection-reader-bar > span { margin-right: auto; color: var(--ink-2); font-size: 14px; }
.collection-reader-bar .btn { min-height: 40px; padding: 8px 14px; font-size: 15px; }

/* Earlier editions keep their original text; their shelf is separate from the illustrated current collection. */
.mybook-history { margin-top: 32px; border-top: 1px solid #dfd3bd; padding-top: 22px; }
.mybook-history > summary { font-size: 21px; color: #705c46; cursor: pointer; padding: 12px 0; }
.historical-cover { background: #f2e9d9; padding: 24px; justify-content: space-around; text-align: center; color: #705c46; }
.historical-cover strong { font-size: clamp(22px, 3vw, 34px); line-height: 1.5; }
.historical-thumb { display: grid; place-items: center; height: 100%; background: #f2e9d9; color: #705c46; font-size: 24px; }
/* Plan197 升级页: the level medal over the result sheet. */
.level-up-sheet > h1, .level-up-sheet > .lead, .level-up-sheet > .muted { text-align: center; }
.level-badge { align-self: center; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #ffe9a8, #f2b632 60%, #d98e1c); box-shadow: 0 0 0 6px #fff3cf, 0 8px 22px rgba(194, 120, 20, .35); }
.level-badge .num { font-size: 52px; font-weight: 900; color: #7a3d0a; }
/* Plan197 3A: the 书架 tab's dot, 新 on a story newly readable alone, and the level that makes a story readable. */
.nav-icon { position: relative; }
.nav-dot { position: absolute; top: 0; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: #e2462b; box-shadow: 0 0 0 2px #fffdf9; }
.shelf-cover { position: relative; }
.shelf-new { position: absolute; top: 6px; left: 6px; padding: 1px 8px; border-radius: 999px; background: #e2462b; color: #fff; font-size: 14px; font-weight: 800; line-height: 1.5; }
.shelf-level { display: block; }
/* Plan196 §9: the parent's 课程安排 (a list, not the course path). */
.page-course-plan { display: flex; flex-direction: column; gap: 14px; }
.course-plan-level { border-radius: 18px; background: var(--paper, #fffdf9); border: 1px solid var(--line-2); }
.course-plan-level > summary { cursor: pointer; padding: 14px 18px; font-size: 18px; }
.course-plan-list { list-style: none; margin: 0; padding: 0 10px 10px; }
.course-plan-row { display: grid; grid-template-columns: 5.5em 6em 1fr auto; align-items: center; gap: 10px; padding: 10px 8px; border-top: 1px solid var(--line-2); }
.course-plan-row.is-here { background: var(--blue-tint); border-radius: 12px; }
.course-plan-row.state-locked { color: var(--ink-2); }
.course-plan-chars { font-size: 24px; letter-spacing: 0.08em; }
.course-plan-row .pill { height: 26px; font-size: 13px; }
.course-plan-unit { display: block; margin-top: 2px; color: var(--ink-2); }
.course-plan-unit.unit-bundle { color: var(--orange-ink); font-weight: 600; }
.course-plan-count p { margin: 0 0 6px; }
@media (max-width: 560px) {
  .course-plan-row { grid-template-columns: auto 1fr auto; }
  .course-plan-row .pill { grid-column: 3; grid-row: 1; }
  .course-plan-reads { grid-column: 1 / -1; grid-row: 2; }
}

/* R5 (r4-r5-draft-v1.md): 乐园里 on the level-up result page. */
.level-park { margin: 14px 0 6px; padding: 12px 16px; border-radius: 18px; background: var(--card); text-align: left; }
.level-park p { margin: 6px 0; font-size: 20px; line-height: 1.7; }
.level-park-chip { display: inline-block; margin: 2px 6px; padding: 2px 10px; border-radius: 999px; background: var(--cream-btn, #fff6df); white-space: nowrap; }
.level-park-more { font-weight: 700; }

/* Plan205: the two story questions after reading, before 认一认. */
.quiz-sheet { max-width: 760px; }
.quiz-sheet .quiz-count { margin: 0; text-align: center; }
.quiz-sheet .quiz-q { margin: 0; font-size: clamp(28px, 4.4vw, 40px); line-height: 1.45; text-align: center; }
.quiz-answers { display: flex; flex-direction: column; gap: 12px; }
.quiz-answer { min-height: 64px; justify-content: center; border: 2px solid var(--cream-line); border-radius: 22px; background: var(--cream-btn); color: var(--ink); font-size: clamp(24px, 3.6vw, 32px); }
.quiz-answer:disabled { cursor: default; opacity: 1; }
.quiz-answer.is-wrong { border-color: var(--line-2); background: var(--lock); color: var(--lock-ink); }
.quiz-answer.is-right { border-color: var(--green); background: #d6efd9; box-shadow: 0 0 0 3px rgba(63, 154, 74, .25); animation: pop 260ms ease; }
.quiz-say { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; font-size: 24px; font-weight: 800; }
.quiz-say.is-right { color: var(--green); }
.quiz-say.is-again { color: var(--orange-ink); }
.quiz-quote { padding: 14px 18px; border-radius: 18px; background: var(--sun-tint); }
.quiz-quote p { margin: 0; }
.quiz-quote .kai { font-size: clamp(22px, 3.2vw, 28px); line-height: 1.6; }

/* owner-feedback-time-left-visible-v1 (owner 2026-11-03 “按A：顶部常驻”): 今天还能用 N 分钟 at the top of 今天, 课程, 我的字, 书架 */
/* Sticky so it stays in view on long pages (课程 scrolls to the current lesson). */
.app-time-left { position: sticky; top: 8px; z-index: 20; width: fit-content; margin: 0 0 8px auto; padding: 4px 12px;
  border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-weight: 700; }

/* owner-feedback-v10/v12 (163): 今天有 N 篇故事 — tick any, at least one; each lists the day's new characters it holds. */
.story-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; width: 100%; max-width: 760px; margin: 12px auto 18px; }
.story-choice { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: left; }
.story-choice { position: relative; cursor: pointer; font: inherit; color: inherit; }
.story-choice.is-on { border: 2px solid var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); }
.story-choice-tick { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); background: var(--paper); }
.story-choice.is-on .story-choice-tick { background: var(--green); border-color: var(--green); color: #fff; }
.story-choice-title { margin: 0; font-size: 1.3rem; }
.story-choice-chars { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; }
.story-choice-char { display: inline-grid; place-items: center; min-width: 2.2em; height: 2.2em; border-radius: 10px; background: var(--paper);
  border: 2px solid var(--coral); color: var(--ink); font-size: 1.4rem; }

/* Plan204 step 6: V9 additions (only drawn when the server sends a V9 switch). */
.level-recap { margin: 6px 0 0; font-size: 1.15rem; }
.shelf-known-row { grid-template-columns: clamp(190px, 19vw, 290px) minmax(0, 1fr); align-items: center; }
.shelf-known { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-radius: 18px; background: rgba(255, 252, 244, .92); }
.shelf-known p { margin: 0; font-size: 1.15rem; }
.mybook-directory li.is-unread button { opacity: .92; }
.mybook-directory li.is-waiting button { opacity: .55; cursor: default; }
.level-next-stop { margin: 6px 0 0; font-size: 1.2rem; }
.my-book-level { display: block; font-size: .7em; font-weight: 400; opacity: .8; }
/* Plan204 step 6 (owner-feedback-v5): V9 lessons 41–100 two-sentence picture pages on portrait screens — the text takes the
   height it needs and the picture shrinks (not below 20% of the screen), so the page's one or two sentences show without scrolling. */
@media (orientation: portrait) {
  .sentence-reader.is-paged.is-v9-pair.has-page-figure.is-picture-page:not(.is-opening-page) .story-figure { flex: 1 1 0; min-height: 20vh; }
  .sentence-reader.is-paged.is-v9-pair.has-page-figure.is-picture-page:not(.is-opening-page) .story-text { flex: 0 0 auto; }
}
/* Plan214 §1: 怎么陪孩子用 */
.guide-sheet { gap: 10px; }
.guide-count { margin: 0; }
.guide-title { margin: 0; font-size: 22px; }
.guide-lines { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; line-height: 1.65; }
.guide-actions { margin-top: 6px; }
/* owner-feedback-family-notice-v1: the new-family window. */
.family-notice .family-card { margin: 12px 0 22px; }
/* Plan215: the 家长 page's 小贴士 and its dot on “家长”. */
.parent-link .tip-dot { margin-left: 2px; }
.parent-tip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; padding: 14px 18px; border-radius: 18px; background: var(--card); border: 2px solid var(--line-2); box-shadow: var(--shadow-soft, none); }
.parent-tip-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff3d6; color: #c98a00; flex: none; }
.parent-tip-text { flex: 1 1 260px; min-width: 0; }
.parent-tip-text p { margin: 4px 0 0; color: var(--ink-2); line-height: 1.6; }
.parent-tip-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* owner-decision-untaught-families-v1: a shared part that is not taught, with its reading above it. */
.family-part { position: relative; display: inline-grid; place-items: center; padding-top: 14px; border-style: dashed; cursor: default; }
.family-part-pinyin { position: absolute; top: 2px; left: 0; right: 0; font-size: 13px; line-height: 1; color: var(--ink-2); font-family: var(--font-ui, inherit); }
