﻿/* ==========================================================================
   桃桃拼音屋 · 低幼友好、低饱和、平板优先
   ========================================================================== */

:root {
  --bg: #f8f3ec;
  --bg-deep: #f1e8dd;
  --surface: #fffdf9;
  --surface-soft: #fbf6ef;
  --surface-strong: #ffffff;
  --ink: #4b3f42;
  --ink-strong: #392f33;
  --muted: #776a69;
  --muted-2: #978986;
  --line: rgba(117, 91, 81, 0.14);
  --line-strong: rgba(117, 91, 81, 0.24);
  --peach: #f1b7a6;
  --peach-deep: #c9826c;
  --peach-soft: #fbe9e1;
  --mint: #b8d6c6;
  --mint-deep: #6f9b84;
  --mint-soft: #eaf4ee;
  --sky: #c3dbea;
  --sky-deep: #6f98b1;
  --sky-soft: #eef6fb;
  --lav: #d7cee9;
  --lav-deep: #8577a6;
  --lav-soft: #f2eef9;
  --butter: #f1dfae;
  --butter-deep: #b39457;
  --butter-soft: #fbf3df;
  --star: #deab55;
  --shadow: 0 18px 44px rgba(99, 76, 66, 0.10), 0 3px 10px rgba(99, 76, 66, 0.05);
  --shadow-soft: 0 10px 26px rgba(99, 76, 66, 0.08);
  --radius: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-round: "Yuanti SC", "YouYuan", "Hiragino Maru Gothic ProN", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-pinyin: "Comic Sans MS", "Chalkboard SE", "Andika", "Trebuchet MS", "PingFang SC", sans-serif;
  --nav-h: 82px;
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

[data-theme="snow"] {
  --bg: #f2f7fb;
  --bg-deep: #e7f0f7;
  --surface: #fdfeff;
  --surface-soft: #f5fafd;
  --surface-strong: #ffffff;
  --ink: #405063;
  --ink-strong: #303f51;
  --muted: #697d90;
  --muted-2: #8fa2b3;
  --line: rgba(88, 118, 140, 0.16);
  --line-strong: rgba(88, 118, 140, 0.26);
  --peach: #f2c6ce;
  --peach-deep: #bd8494;
  --peach-soft: #fbf0f2;
  --mint: #bddbd6;
  --mint-deep: #6f9f99;
  --mint-soft: #ecf7f5;
  --sky: #b8d5ed;
  --sky-deep: #6c99ba;
  --sky-soft: #eaf5fc;
  --lav: #d1caea;
  --lav-deep: #867bad;
  --lav-soft: #f1eefb;
  --butter: #f2e2bc;
  --butter-deep: #ab8c51;
  --butter-soft: #fbf5e5;
  --star: #d4ac63;
  --shadow: 0 18px 46px rgba(62, 86, 108, 0.11), 0 3px 10px rgba(62, 86, 108, 0.05);
  --shadow-soft: 0 10px 26px rgba(62, 86, 108, 0.08);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 48px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 8% 4%, rgba(241, 183, 166, 0.20), transparent 30%),
    radial-gradient(circle at 95% 24%, rgba(195, 219, 234, 0.25), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[data-theme="snow"] body {
  background:
    radial-gradient(circle at 10% 2%, rgba(184, 213, 237, 0.38), transparent 33%),
    radial-gradient(circle at 92% 18%, rgba(209, 202, 234, 0.30), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.5;
  background-image: radial-gradient(rgba(120, 93, 82, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
}

[data-theme="snow"] body::before {
  opacity: 0.55;
  background-image: radial-gradient(rgba(88, 118, 140, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:not(:disabled) { cursor: pointer; }
button:disabled { cursor: default; }

a { color: inherit; }

img, svg { display: block; }

h1, h2, h3, p { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-round);
  font-weight: 700;
  line-height: 1.22;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(36px, 4.2vw, 54px); }
h2 { font-size: clamp(22px, 2.2vw, 28px); }
h3 { font-size: 19px; }

::selection { background: var(--butter); color: var(--ink-strong); }

:focus-visible {
  outline: 3px solid var(--lav-deep);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- 背景装饰 --------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.72;
}
.blob-a {
  width: 42vw;
  height: 42vw;
  min-width: 320px;
  min-height: 320px;
  left: -14vw;
  bottom: -12vw;
  background: radial-gradient(circle, rgba(241, 183, 166, 0.22), transparent 68%);
}
.blob-b {
  width: 38vw;
  height: 38vw;
  min-width: 280px;
  min-height: 280px;
  right: -12vw;
  top: 14vh;
  background: radial-gradient(circle, rgba(195, 219, 234, 0.25), transparent 68%);
}
.blob-c {
  width: 28vw;
  height: 28vw;
  min-width: 220px;
  min-height: 220px;
  left: 38vw;
  top: -10vw;
  background: radial-gradient(circle, rgba(215, 206, 233, 0.20), transparent 68%);
}

.ambient-flake {
  position: absolute;
  width: 34px;
  height: 34px;
  color: var(--sky-deep);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
[data-theme="snow"] .ambient-flake { opacity: 0.18; }
.flake-a { left: 5%; top: 22%; width: 26px; height: 26px; transform: rotate(12deg); }
.flake-b { right: 7%; top: 9%; width: 42px; height: 42px; transform: rotate(-16deg); }
.flake-c { right: 18%; bottom: 16%; width: 24px; height: 24px; transform: rotate(22deg); }
.flake-d { left: 18%; bottom: 22%; width: 18px; height: 18px; transform: rotate(36deg); }

/* ---- 顶栏 ------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 16px 28px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(180deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 86%, transparent) 74%, transparent 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  border-radius: 16px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.brand-mark svg { width: 38px; height: 38px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
  font-family: var(--font-round);
  font-size: 20px;
  color: var(--ink-strong);
  letter-spacing: 0.02em;
}
.brand-text small {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.star-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(99, 76, 66, 0.05);
}
.star-chip .icon { width: 20px; height: 20px; color: var(--star); }
.star-chip:hover { border-color: var(--line-strong); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  transition: background 0.18s var(--ease), transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.icon-btn:hover { background: var(--surface-soft); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn.small { width: 38px; height: 38px; border-radius: 12px; }
.icon-btn.small .icon { width: 18px; height: 18px; }

.parent-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
}
.parent-btn .icon { width: 18px; height: 18px; }
.parent-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---- 底部导航 --------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  z-index: 55;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(780px, calc(100% - 24px));
  min-height: var(--nav-h);
  padding: 9px 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 14px 40px rgba(80, 59, 52, 0.14);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 62px;
  padding: 6px 4px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.bottom-nav button .icon { width: 24px; height: 24px; }
.bottom-nav button:hover { color: var(--ink); background: var(--surface-soft); }
.bottom-nav button.is-active {
  background: var(--peach-soft);
  color: var(--ink-strong);
}
.bottom-nav button.is-active .icon { color: var(--peach-deep); }

/* ---- 通用按钮与标签 --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.16s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn:active { transform: scale(0.975); }
.btn .icon { width: 20px; height: 20px; }

.btn-primary {
  background: linear-gradient(135deg, #f6cbbd, var(--peach));
  color: #4a3437;
  border-color: rgba(201, 130, 108, 0.22);
  box-shadow: 0 9px 20px rgba(201, 130, 108, 0.22);
}
.btn-primary:hover { box-shadow: 0 12px 24px rgba(201, 130, 108, 0.28); transform: translateY(-1px); }

.btn-soft {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 5px 14px rgba(99, 76, 66, 0.05);
}
.btn-soft:hover { background: var(--surface-soft); border-color: var(--line-strong); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface); }

.btn-quiet {
  background: var(--surface-soft);
  color: var(--muted);
  border-color: transparent;
  min-height: 48px;
  padding: 10px 16px;
  font-size: 15px;
}
.btn-quiet:hover { color: var(--ink); background: var(--surface); }

.btn-wide { width: 100%; }
.btn-small { min-height: 42px; padding: 8px 14px; font-size: 14px; border-radius: 14px; }
.btn-small .icon { width: 17px; height: 17px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  margin-bottom: 8px;
  padding: 0 8px 0 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  border-radius: 10px;
}
.back-link .icon { width: 18px; height: 18px; }
.back-link:hover { color: var(--ink); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 42px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--peach-deep);
  font-size: 14px;
  font-weight: 600;
}
.text-link .icon { width: 17px; height: 17px; }
.text-link:hover { color: var(--ink); }

.eyebrow {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--peach);
  vertical-align: 2px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 24px;
}
.page-head > div:first-child { min-width: 0; }
.page-sub {
  margin-top: 8px;
  max-width: 46em;
  color: var(--muted);
  font-size: 15px;
}

.foot-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.foot-tip .icon { width: 17px; height: 17px; color: var(--butter-deep); }

/* ---- 页面切换 --------------------------------------------------------- */
.view {
  display: none;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 6px 28px 36px;
}
.view.is-active {
  display: block;
  animation: viewIn 0.26s var(--ease) both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- 首页 ------------------------------------------------------------- */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 10px;
  min-height: 344px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 38px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 24%, rgba(195, 219, 234, 0.46), transparent 34%),
    radial-gradient(circle at 8% 100%, rgba(241, 183, 166, 0.38), transparent 40%),
    linear-gradient(130deg, var(--surface) 0%, var(--peach-soft) 56%, var(--sky-soft) 100%);
  box-shadow: var(--shadow);
}
[data-theme="snow"] .home-hero {
  background:
    radial-gradient(circle at 85% 18%, rgba(209, 202, 234, 0.46), transparent 36%),
    radial-gradient(circle at 8% 100%, rgba(184, 213, 237, 0.48), transparent 42%),
    linear-gradient(130deg, var(--surface) 0%, var(--sky-soft) 52%, var(--lav-soft) 100%);
}
.home-hero::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  right: -120px;
  bottom: -180px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.12), 0 0 0 70px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 30em;
}
.hero-copy h1 {
  font-size: clamp(38px, 4.7vw, 58px);
  letter-spacing: -0.025em;
}
.hero-sub {
  margin-top: 14px;
  max-width: 26em;
  color: var(--muted);
  font-size: 16px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-art {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
}
.hero-halo {
  position: absolute;
  width: min(300px, 78%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.18) 62%, transparent 72%);
}
.mascot {
  position: relative;
  z-index: 1;
  width: min(280px, 92%);
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(153, 105, 88, 0.18));
}
.hero-spark {
  position: absolute;
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 8px rgba(196, 144, 125, 0.25);
  font-size: 24px;
}
.spark-a { right: 12%; top: 16%; }
.spark-b { left: 9%; bottom: 18%; font-size: 17px; opacity: 0.8; }

.resume-slot { margin-top: 18px; }

.resume-card,
.custom-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.resume-icon,
.custom-card-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: var(--mint-soft);
  color: var(--mint-deep);
}
.resume-icon .icon,
.custom-card-icon .icon { width: 24px; height: 24px; }
.resume-copy,
.custom-copy { min-width: 0; }
.resume-copy strong,
.custom-copy strong {
  display: block;
  font-size: 16px;
  color: var(--ink-strong);
}
.resume-copy p,
.custom-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}
.resume-card .btn,
.custom-card .btn { margin-left: auto; flex: 0 0 auto; }

.section-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 2px 14px;
}
.section-intro p { color: var(--muted); font-size: 13px; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.module-card {
  --tone-soft: var(--peach-soft);
  --tone-deep: var(--peach-deep);
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 108px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  box-shadow: 0 8px 24px rgba(99, 76, 66, 0.055);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}
.module-card:active { transform: translateY(0) scale(0.99); }
.module-card.tone-peach { --tone-soft: var(--peach-soft); --tone-deep: var(--peach-deep); }
.module-card.tone-sky { --tone-soft: var(--sky-soft); --tone-deep: var(--sky-deep); }
.module-card.tone-mint { --tone-soft: var(--mint-soft); --tone-deep: var(--mint-deep); }
.module-card.tone-butter { --tone-soft: var(--butter-soft); --tone-deep: var(--butter-deep); }

.module-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 19px;
  background: var(--tone-soft);
  color: var(--tone-deep);
}
.module-icon .icon { width: 28px; height: 28px; }
.module-body { min-width: 0; }
.module-body strong {
  display: block;
  font-family: var(--font-round);
  font-size: 22px;
  color: var(--ink-strong);
  letter-spacing: 0.01em;
}
.module-body > span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.module-go {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  margin-left: auto;
  border-radius: 50%;
  background: var(--tone-soft);
  color: var(--tone-deep);
}
.module-go .icon { width: 17px; height: 17px; }

.home-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}
.home-note { display: flex; align-items: flex-start; gap: 12px; }
.home-note > .icon {
  width: 24px;
  height: 24px;
  margin-top: 2px;
  color: var(--sky-deep);
}
.home-note strong { display: block; font-size: 14px; color: var(--ink); }
.home-note p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.custom-home-slot { margin-top: 14px; }

/* ---- 认读 ------------------------------------------------------------- */
.pill-tabs,
.parent-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}
.pill-tabs button,
.parent-tabs button {
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.pill-tabs button:hover,
.parent-tabs button:hover { color: var(--ink); }
.pill-tabs button.is-active,
.parent-tabs button.is-active {
  background: var(--surface);
  color: var(--ink-strong);
  box-shadow: 0 3px 10px rgba(99, 76, 66, 0.08);
}
.pill-tabs button span,
.parent-tabs button span {
  margin-left: 6px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 500;
}

.read-info {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  margin: 16px 0;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(99, 76, 66, 0.04);
}
.read-info-mark {
  display: grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 0 9px;
  border-radius: 15px;
  background: var(--peach-soft);
  color: var(--peach-deep);
  font-family: var(--font-pinyin);
  font-size: 24px;
  line-height: 1;
}
.read-info strong { display: block; font-size: 15px; color: var(--ink-strong); }
.read-info span { display: block; margin-top: 1px; color: var(--muted); font-size: 13px; }

.read-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 11px;
}
.read-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 100px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
  color: var(--ink-strong);
  box-shadow: 0 4px 12px rgba(99, 76, 66, 0.035);
  transition: transform 0.16s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.read-tile:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface-soft);
}
.read-tile:active { transform: translateY(0) scale(0.975); }
.read-tile.is-speaking {
  background: var(--peach-soft);
  border-color: color-mix(in srgb, var(--peach) 70%, var(--line));
}
.read-tile-pinyin {
  font-family: var(--font-pinyin);
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.read-tile.is-long .read-tile-pinyin { font-size: clamp(25px, 2.7vw, 33px); }
.read-tile-hint {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 16px;
  color: var(--muted-2);
  font-size: 10px;
}
.read-tile-hint .icon { width: 12px; height: 12px; }

/* ---- 拼读 ------------------------------------------------------------- */
.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 20px;
  align-items: start;
}

.practice-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.setting-block { margin-bottom: 24px; }
.setting-block:last-of-type { margin-bottom: 22px; }
.setting-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.setting-label > span { font-size: 15px; font-weight: 700; color: var(--ink-strong); }
.setting-label small { color: var(--muted-2); font-size: 12px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-chip {
  min-height: 46px;
  padding: 8px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 15px;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.choice-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.choice-chip[aria-pressed="true"] {
  background: var(--peach-soft);
  border-color: color-mix(in srgb, var(--peach) 70%, var(--line));
  color: var(--ink-strong);
  font-weight: 600;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 94px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-soft);
  color: var(--muted);
  text-align: left;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.mode-card .icon { width: 22px; height: 22px; margin-bottom: 4px; color: var(--sky-deep); }
.mode-card strong { font-size: 14px; color: var(--ink); line-height: 1.35; }
.mode-card span { font-size: 11.5px; color: var(--muted-2); line-height: 1.35; }
.mode-card:hover { border-color: var(--line-strong); }
.mode-card[aria-pressed="true"] {
  background: var(--sky-soft);
  border-color: color-mix(in srgb, var(--sky) 76%, var(--line));
}
.mode-card[aria-pressed="true"] strong { color: var(--ink-strong); }
.mode-card[aria-pressed="true"] .icon { color: var(--sky-deep); }

.seg-row {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.seg-row button {
  flex: 1;
  min-height: 40px;
  padding: 5px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.seg-row button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink-strong);
  box-shadow: 0 2px 8px rgba(99, 76, 66, 0.08);
}

.custom-entry {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--butter-soft);
  color: var(--muted);
  font-size: 13px;
}
.custom-entry strong { color: var(--ink); }
.custom-entry button { margin-top: 8px; }

.practice-preview {
  position: sticky;
  top: 104px;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 85% 16%, rgba(255, 255, 255, 0.8), transparent 40%),
    linear-gradient(145deg, var(--sky-soft), var(--surface) 52%, var(--peach-soft));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
[data-theme="snow"] .practice-preview {
  background:
    radial-gradient(circle at 85% 16%, rgba(255, 255, 255, 0.85), transparent 40%),
    linear-gradient(145deg, var(--lav-soft), var(--surface) 52%, var(--sky-soft));
}
.preview-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
}
.preview-kicker .icon { width: 15px; height: 15px; color: var(--butter-deep); }
.preview-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 22px 0 12px;
}
.preview-part {
  display: inline-grid;
  place-items: center;
  min-width: 54px;
  min-height: 62px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  font-family: var(--font-pinyin);
  font-size: 36px;
  line-height: 1;
  color: var(--ink-strong);
}
.preview-plus {
  color: var(--muted-2);
  font-size: 22px;
  font-weight: 300;
}
.preview-equals {
  color: var(--muted);
  font-size: 20px;
}
.preview-full {
  font-family: var(--font-pinyin);
  font-size: clamp(54px, 6vw, 78px);
  line-height: 1;
  color: var(--ink-strong);
  letter-spacing: 0.01em;
}
.preview-word {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.preview-char {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-strong);
  font-size: 36px;
}
.preview-word p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.preview-word strong { display: block; color: var(--ink); font-size: 15px; }
.preview-play {
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--peach-deep);
}
.preview-play .icon { width: 20px; height: 20px; margin: auto; }
.preview-note { margin-top: 14px; color: var(--muted); font-size: 12px; }

.tone-preview-list { display: grid; gap: 7px; margin-top: 18px; }
.tone-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  text-align: left;
}
.tone-preview-row:hover { background: rgba(255, 255, 255, 0.9); }
.tone-preview-row .tone-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--peach-soft);
  color: var(--peach-deep);
  font-size: 11px;
}
.tone-preview-row .tone-py { font-family: var(--font-pinyin); font-size: 25px; }
.tone-preview-row .tone-ch { color: var(--muted); font-size: 14px; }
.tone-curve { margin-left: auto; width: 54px; height: 24px; color: var(--peach-deep); opacity: 0.7; }
.tone-curve path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---- 书写 ------------------------------------------------------------- */
.letter-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}
.letter-picker button {
  min-width: 54px;
  min-height: 50px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-pinyin);
  font-size: 23px;
  line-height: 1;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.letter-picker button:hover { border-color: var(--line-strong); color: var(--ink); }
.letter-picker button.is-active {
  background: var(--peach-soft);
  border-color: var(--peach);
  color: var(--ink-strong);
}

.write-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  gap: 20px;
  align-items: start;
}
.write-stage {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.write-stage-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 12px;
}
.letter-badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 18px;
  background: var(--butter-soft);
  color: var(--butter-deep);
  font-family: var(--font-pinyin);
  font-size: 28px;
}
.write-stage-head h2 { font-family: var(--font-pinyin); font-size: 30px; }
.write-stage-head p { color: var(--muted); font-size: 12.5px; }
.write-stage-head .icon-btn { margin-left: auto; }

.stroke-board-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 240 / 300;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf7;
  overflow: hidden;
  touch-action: none;
}
[data-theme="snow"] .stroke-board-wrap { background: #fcfdff; }
.stroke-board { width: 100%; height: 100%; }
.board-guide { stroke: rgba(120, 93, 82, 0.18); stroke-width: 1; }
.board-guide.is-mid { stroke: var(--peach); stroke-opacity: 0.55; stroke-dasharray: 5 5; }
.board-band { fill: rgba(241, 183, 166, 0.07); }
.board-label {
  fill: var(--muted-2);
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.1em;
}
.board-letter-underlay {
  fill: none;
  stroke: rgba(115, 87, 77, 0.10);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.board-stroke {
  fill: none;
  stroke: var(--ink-strong);
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: stroke-dashoffset 0.7s var(--ease), opacity 0.08s linear;
}
.board-stroke.is-drawing {
  opacity: 1;
  stroke-dashoffset: 0;
}
.board-stroke.is-done { opacity: 1; stroke-dashoffset: 0; }
.board-dot {
  fill: var(--peach-deep);
  opacity: 0;
  transition: opacity 0.18s var(--ease);
}
.board-dot.is-on { opacity: 0.9; }

.trace-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: none;
}
.stroke-board-wrap.trace-on .trace-canvas { pointer-events: auto; cursor: crosshair; }
.stroke-board-wrap.trace-on .board-stroke { opacity: 0.16; }
.stroke-board-wrap.trace-on .board-letter-underlay { stroke: rgba(115, 87, 77, 0.13); }

.write-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.write-controls .btn { min-height: 46px; padding: 9px 15px; font-size: 14px; border-radius: 14px; }
.write-tip {
  margin-top: 14px;
  padding: 12px 15px;
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.write-tip strong { color: var(--ink); }

.write-aside { display: grid; gap: 14px; }
.aside-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(99, 76, 66, 0.04);
}
.aside-card h3 { margin-bottom: 4px; font-size: 17px; }
.aside-card > p { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.aside-card.aside-soft { background: var(--butter-soft); border-color: transparent; }

.mirror-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.mirror-item {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--font-pinyin);
  font-size: 32px;
  line-height: 1;
}
.mirror-item:hover { background: var(--peach-soft); }
.mirror-item span { display: block; margin-top: 3px; color: var(--muted-2); font-family: var(--font-ui); font-size: 10px; }

/* ---- 闯关 ------------------------------------------------------------- */
.focus-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--butter-soft);
  color: var(--butter-deep);
  font-size: 13px;
  white-space: nowrap;
}
.focus-badge .icon { width: 17px; height: 17px; }

.confusion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.confusion-card {
  --tone-soft: var(--peach-soft);
  --tone-deep: var(--peach-deep);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  text-align: left;
  box-shadow: 0 6px 18px rgba(99, 76, 66, 0.045);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
  overflow: hidden;
}
.confusion-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); border-color: var(--line-strong); }
.confusion-card:active { transform: scale(0.99); }
.confusion-card.tone-peach { --tone-soft: var(--peach-soft); --tone-deep: var(--peach-deep); }
.confusion-card.tone-sky { --tone-soft: var(--sky-soft); --tone-deep: var(--sky-deep); }
.confusion-card.tone-mint { --tone-soft: var(--mint-soft); --tone-deep: var(--mint-deep); }
.confusion-card.tone-lav { --tone-soft: var(--lav-soft); --tone-deep: var(--lav-deep); }
.confusion-card.tone-butter { --tone-soft: var(--butter-soft); --tone-deep: var(--butter-deep); }
.confusion-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pinyin);
  font-size: 48px;
  line-height: 1;
  color: var(--ink-strong);
}
.confusion-pair .pair-left { color: var(--tone-deep); }
.confusion-pair .pair-slash { color: var(--muted-2); font-size: 22px; font-weight: 300; }
.confusion-title {
  margin-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-strong);
}
.confusion-hint {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.confusion-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}
.confusion-status {
  color: var(--muted-2);
  font-size: 11px;
}
.confusion-status.is-done { color: var(--mint-deep); }
.confusion-go {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 11px;
  background: var(--tone-soft);
  color: var(--tone-deep);
  font-size: 12px;
  font-weight: 600;
}
.confusion-go .icon { width: 14px; height: 14px; }

.sticker-shelf {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.sticker-shelf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}
.sticker-shelf-head h2 { font-size: 21px; }
.sticker-shelf-head p { color: var(--muted); font-size: 12px; }
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.sticker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  border-radius: 17px;
  background: var(--surface-soft);
  color: var(--muted);
}
.sticker-badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--butter-soft);
  color: var(--star);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 -4px 0 rgba(120, 93, 82, 0.05);
}
.sticker-badge svg { width: 30px; height: 30px; }
.sticker.is-earned .sticker-badge { background: var(--star); color: #fffdf7; }
.sticker.is-earned .sticker-badge svg { width: 32px; height: 32px; }
.sticker span { font-size: 10.5px; text-align: center; line-height: 1.3; }
.sticker.is-locked { opacity: 0.48; }
.sticker.is-locked .sticker-badge { filter: grayscale(1); }
.sticker-shelf-empty { color: var(--muted); font-size: 13px; }

/* ---- 我的口袋 --------------------------------------------------------- */
.pocket-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}
.pocket-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.pocket-card.span-2 { grid-column: span 2; }
.pocket-card h2 { font-size: 21px; margin-bottom: 4px; }
.pocket-card-sub { color: var(--muted); font-size: 13px; margin-bottom: 15px; }

.star-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 255, 255, 0.8), transparent 40%),
    linear-gradient(135deg, var(--butter-soft), var(--surface) 52%, var(--peach-soft));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.star-hero-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--butter);
  color: #fffdf7;
  box-shadow: 0 8px 20px rgba(201, 160, 82, 0.25);
}
.star-hero-icon .icon { width: 44px; height: 44px; }
.star-hero-copy > strong {
  display: block;
  font-family: var(--font-pinyin);
  font-size: 44px;
  line-height: 1;
  color: var(--ink-strong);
}
.star-hero-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.star-hero .text-link { margin-left: auto; }

.pocket-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.pocket-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}
.pocket-pill strong { color: var(--ink); font-size: 14px; }

.weak-list { display: grid; gap: 7px; }
.weak-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 7px 9px 7px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
}
.weak-pinyin {
  font-family: var(--font-pinyin);
  font-size: 25px;
  color: var(--ink-strong);
  line-height: 1;
}
.weak-char { color: var(--muted); font-size: 14px; }
.weak-count { margin-left: auto; color: var(--muted-2); font-size: 11px; white-space: nowrap; }
.weak-row .icon-btn { width: 34px; height: 34px; border-radius: 11px; background: var(--surface); }
.weak-row .icon-btn .icon { width: 16px; height: 16px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 22px;
  border-radius: 18px;
  background: var(--surface-soft);
  text-align: center;
}
.empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted-2);
}
.empty-state .empty-icon .icon { width: 26px; height: 26px; }
.empty-state strong { font-size: 15px; color: var(--ink); }
.empty-state p { margin-top: 3px; color: var(--muted); font-size: 12.5px; }

.sticker-book {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sticker-book .sticker { padding: 10px 5px; }
.sticker-book .sticker-badge { width: 48px; height: 48px; }
.sticker-book .sticker-badge svg { width: 25px; height: 25px; }

/* ---- 错题本 ----------------------------------------------------------- */
.mistake-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 15px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--butter-soft);
  color: var(--muted);
  font-size: 13px;
}
.mistake-summary .icon { width: 22px; height: 22px; color: var(--butter-deep); }
.mistake-summary strong { color: var(--ink); }
.mistake-list { display: grid; gap: 9px; }
.mistake-row {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 78px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(99, 76, 66, 0.03);
}
.mistake-main { min-width: 0; flex: 1; }
.mistake-py-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.mistake-py {
  font-family: var(--font-pinyin);
  font-size: 31px;
  line-height: 1.1;
  color: var(--ink-strong);
}
.mistake-char { color: var(--muted); font-size: 17px; }
.mistake-meta { margin-top: 2px; color: var(--muted-2); font-size: 11px; }
.mistake-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.mistake-actions .icon-btn { width: 40px; height: 40px; border-radius: 13px; }
.mistake-actions .icon-btn .icon { width: 18px; height: 18px; }
.mistake-empty { margin-top: 12px; }

/* ---- 家长区 ----------------------------------------------------------- */
.parent-tabs { margin-bottom: 18px; }
.parent-section {
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.parent-section h2 { font-size: 20px; margin-bottom: 4px; }
.parent-section-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.parent-section h3 { font-size: 15px; margin: 18px 0 8px; }
.parent-section h3:first-of-type { margin-top: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stat-tile {
  padding: 14px;
  border-radius: 17px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.stat-tile span { display: block; color: var(--muted); font-size: 11.5px; }
.stat-tile strong {
  display: block;
  margin-top: 4px;
  color: var(--ink-strong);
  font-family: var(--font-pinyin);
  font-size: 30px;
  line-height: 1.1;
}
.stat-tile small { color: var(--muted-2); font-size: 10px; }

.chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding: 12px 8px 0;
  border-bottom: 1px solid var(--line);
}
.chart-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}
.chart-bar-track {
  position: relative;
  width: 100%;
  max-width: 38px;
  flex: 1;
  display: flex;
  align-items: flex-end;
  border-radius: 9px 9px 4px 4px;
  background: var(--surface-soft);
  overflow: hidden;
}
.chart-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, var(--peach), var(--peach-deep));
}
.chart-day.is-today .chart-bar { background: linear-gradient(180deg, var(--mint), var(--mint-deep)); }
.chart-day span { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.chart-day strong { color: var(--ink); font-size: 11px; font-weight: 600; }

.report-table { display: grid; gap: 7px; }
.report-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 7px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
}
.report-row .weak-pinyin { font-size: 22px; }
.report-row .report-date { margin-left: auto; color: var(--muted-2); font-size: 10.5px; }
.report-row .report-count { color: var(--peach-deep); font-size: 12px; font-weight: 600; white-space: nowrap; }
.report-row .icon-btn { width: 34px; height: 34px; border-radius: 10px; }

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.settings-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}
.settings-card h3 { margin: 0 0 4px; font-size: 14px; }
.settings-card > p { color: var(--muted); font-size: 11.5px; margin-bottom: 10px; }
.settings-card .seg-row { background: var(--surface); }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 4px 0;
  cursor: pointer;
}
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-row > span { font-size: 14px; color: var(--ink); }
.switch-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted-2) 35%, var(--surface));
  transition: background 0.2s var(--ease);
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(70, 51, 45, 0.16);
  transition: transform 0.2s var(--ease);
}
.switch-row input:checked + .switch { background: var(--mint-deep); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 3px solid var(--lav-deep); outline-offset: 3px; }

.form-row { margin-bottom: 15px; }
.form-row > label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.form-row .hint { margin-top: 5px; color: var(--muted-2); font-size: 11.5px; }
.select,
.text-input {
  width: 100%;
  min-height: 46px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  appearance: none;
}
.select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.settings-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.range-line {
  display: flex;
  align-items: center;
  gap: 10px;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--peach-deep);
  box-shadow: 0 2px 6px rgba(99, 76, 66, 0.22);
}
input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
}
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--peach-deep);
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.volume-row > span { flex: 0 0 42px; font-size: 13px; color: var(--ink); }

.parent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.danger-zone {
  border-color: color-mix(in srgb, var(--peach-deep) 28%, var(--line));
  background: color-mix(in srgb, var(--peach-soft) 64%, var(--surface));
}
.danger-zone h2 { color: var(--ink-strong); }
.hint-box {
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}
.hint-box strong { color: var(--ink); }

.custom-builder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.custom-builder .form-row { margin-bottom: 0; }
.custom-builder .span-2 { grid-column: span 2; }

/* ---- 答题 ------------------------------------------------------------- */
body[data-view="quiz"] .topbar,
body[data-view="quiz"] .bottom-nav,
body[data-view="quiz"] .ambient { display: none; }
body[data-view="quiz"] { padding-bottom: 28px; }
body[data-view="quiz"]::before { opacity: 0.35; }

.quiz-view {
  width: min(880px, 100%);
  padding-top: 18px;
}
.quiz-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  margin-bottom: 14px;
}
.quiz-top .back-link { margin: 0; flex: 0 0 auto; }
.quiz-dots {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 24px;
}
.quiz-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width 0.22s var(--ease), background 0.22s var(--ease);
}
.quiz-dot.is-done { background: var(--mint-deep); }
.quiz-dot.is-current { width: 24px; background: var(--peach-deep); }
.quiz-sound { width: 42px; height: 42px; border-radius: 14px; flex: 0 0 auto; }

.quiz-stage { min-height: 520px; }
.quiz-card {
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: quizIn 0.25s var(--ease) both;
}
@keyframes quizIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.quiz-kicker { color: var(--muted); font-size: 12px; letter-spacing: 0.12em; }
.quiz-title { margin-top: 2px; font-size: 17px; color: var(--muted); font-family: var(--font-ui); font-weight: 500; }
.quiz-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.quiz-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 196px;
  padding: 14px 8px 18px;
  text-align: center;
}
.quiz-pinyin {
  font-family: var(--font-pinyin);
  font-size: clamp(58px, 9vw, 88px);
  line-height: 1.05;
  color: var(--ink-strong);
  letter-spacing: 0.005em;
}
.quiz-pinyin.is-long { font-size: clamp(48px, 7.5vw, 76px); }
.quiz-char {
  font-family: var(--font-round);
  font-size: clamp(66px, 10vw, 96px);
  line-height: 1.1;
  font-weight: 700;
  color: var(--ink-strong);
}
.quiz-char-sub { margin-top: 6px; color: var(--muted); font-size: 13px; }
.quiz-speaker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 172px;
  min-height: 172px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.9), transparent 40%),
    linear-gradient(145deg, var(--sky-soft), var(--peach-soft));
  color: var(--peach-deep);
  box-shadow: 0 12px 30px rgba(99, 76, 66, 0.10);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.quiz-speaker:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.quiz-speaker:active { transform: scale(0.97); }
.quiz-speaker .icon { width: 52px; height: 52px; }
.quiz-speaker span { color: var(--muted); font-size: 12px; }
.quiz-hint { margin-top: 10px; color: var(--muted-2); font-size: 12px; text-align: center; }

.parts-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}
.part-chip {
  display: inline-grid;
  place-items: center;
  min-width: 43px;
  min-height: 43px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--ink);
  font-family: var(--font-pinyin);
  font-size: 25px;
  line-height: 1;
}
.part-chip.is-final { background: var(--peach-soft); color: var(--peach-deep); }
.parts-plus { color: var(--muted-2); font-size: 16px; }
.parts-arrow { color: var(--muted); font-size: 16px; padding: 0 2px; }
.parts-note { width: 100%; margin-top: 6px; color: var(--muted); font-size: 11px; text-align: center; }

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.option-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
  color: var(--ink-strong);
  line-height: 1.2;
  transition: transform 0.15s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.option-btn:hover { background: var(--surface); border-color: var(--line-strong); transform: translateY(-1px); }
.option-btn:active { transform: scale(0.985); }
.option-btn .option-char {
  font-family: var(--font-round);
  font-size: clamp(34px, 4.5vw, 46px);
  font-weight: 700;
}
.option-btn .option-pinyin {
  font-family: var(--font-pinyin);
  font-size: clamp(27px, 3.6vw, 38px);
}
.option-btn .option-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-family: var(--font-ui);
  font-size: 10px;
}
.option-btn.is-selected { background: var(--sky-soft); border-color: var(--sky); }
.option-btn.is-gentle {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--peach-deep) 40%, var(--line));
  background: var(--peach-soft);
  color: var(--muted);
  opacity: 0.75;
}
.option-btn.is-correct {
  background: var(--mint-soft);
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 35%, transparent);
}
.option-btn.is-correct::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mint-deep);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.option-btn.is-muted { opacity: 0.55; }
.option-btn:disabled { cursor: default; transform: none; }

.feedback {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 15px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 19px;
  animation: feedbackIn 0.2s var(--ease) both;
}
@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.feedback.is-correct { background: var(--mint-soft); border-color: color-mix(in srgb, var(--mint) 64%, transparent); }
.feedback.is-retry { background: var(--peach-soft); border-color: color-mix(in srgb, var(--peach) 64%, transparent); }
.feedback.is-reveal { background: var(--butter-soft); border-color: color-mix(in srgb, var(--butter) 64%, transparent); }
.feedback-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--mint-deep);
}
.feedback.is-retry .feedback-icon { color: var(--peach-deep); }
.feedback.is-reveal .feedback-icon { color: var(--butter-deep); }
.feedback-icon .icon { width: 20px; height: 20px; }
.feedback-copy { flex: 1; min-width: 0; }
.feedback-copy strong { display: block; font-size: 15px; color: var(--ink-strong); }
.feedback-copy p { margin-top: 2px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.feedback-copy .feedback-pinyin {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font-family: var(--font-pinyin);
  font-size: 22px;
}
.feedback-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.feedback-actions .btn { min-height: 38px; padding: 6px 12px; font-size: 13px; border-radius: 11px; }
.feedback-actions .icon-btn { width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, 0.64); }

.quiz-next-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.quiz-next-row .btn { min-width: 132px; }
.quiz-next-row .btn-primary { margin-left: auto; }
.quiz-small-note { color: var(--muted-2); font-size: 11px; }

.session-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px 12px 8px;
}
.summary-glow {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.9), transparent 42%),
    var(--butter-soft);
  color: var(--star);
  box-shadow: 0 12px 28px rgba(201, 160, 82, 0.16);
}
.summary-glow .icon { width: 52px; height: 52px; }
.session-summary h2 { font-size: 30px; }
.session-summary > p { margin-top: 6px; max-width: 28em; color: var(--muted); font-size: 14px; }
.summary-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.summary-stat {
  min-width: 112px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.summary-stat strong {
  display: block;
  font-family: var(--font-pinyin);
  font-size: 30px;
  line-height: 1.1;
  color: var(--ink-strong);
}
.summary-stat span { color: var(--muted); font-size: 11px; }
.summary-sticker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 10px 15px;
  border-radius: 16px;
  background: var(--butter-soft);
  color: var(--muted);
  font-size: 12px;
}
.summary-sticker .sticker-badge { width: 42px; height: 42px; }
.summary-sticker .sticker-badge svg { width: 24px; height: 24px; }
.summary-sticker strong { display: block; color: var(--ink); font-size: 13px; }
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}
.summary-new-friends {
  width: 100%;
  margin-top: 18px;
  padding: 12px 15px;
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}
.summary-new-friends strong { color: var(--ink); }
.summary-new-friends .mini-pinyin {
  display: inline-block;
  margin: 4px 3px 0;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-pinyin);
  font-size: 18px;
}

/* ---- 声音浮层 --------------------------------------------------------- */
.sound-popover {
  position: fixed;
  top: 78px;
  right: max(18px, calc((100vw - 1180px) / 2 + 18px));
  z-index: 80;
  width: min(304px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgba(74, 55, 48, 0.18);
  animation: popIn 0.18s var(--ease) both;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(-5px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.popover-head strong { font-size: 15px; }
.popover-note { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.sound-popover .btn { margin-top: 10px; }

/* ---- 弹层、休息提醒、提示 -------------------------------------------- */
.modal-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(67, 52, 48, 0.34);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal-card {
  width: min(440px, 100%);
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 27px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(53, 39, 35, 0.24);
  animation: popIn 0.2s var(--ease) both;
}
.modal-card h2 { font-size: 24px; }
.modal-card p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.break-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 24% 20%, rgba(241, 183, 166, 0.28), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(195, 219, 234, 0.36), transparent 35%),
    var(--bg);
}
.break-card {
  width: min(480px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.break-card .mascot { width: 150px; margin: 0 auto 4px; }
.break-card h2 { font-size: 27px; }
.break-card p { margin-top: 7px; color: var(--muted); font-size: 14px; }
.break-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}
.break-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom));
  z-index: 110;
  transform: translateX(-50%) translateY(8px);
  padding: 9px 17px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  color: #fffdf9;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  z-index: 200;
}

/* ---- 打印 ------------------------------------------------------------- */
.print-sheet { display: none; }

@media print {
  @page { margin: 16mm 14mm; }
  body {
    padding: 0 !important;
    background: #fff !important;
    color: #222 !important;
    font-size: 12pt;
  }
  body::before, body::after, .ambient, .topbar, .bottom-nav, .sound-popover,
  .toast, .modal-root, .break-overlay, .view, .skip-link { display: none !important; }
  .print-sheet {
    display: block !important;
    color: #222;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  }
  .print-title { font-size: 24pt; font-weight: 700; margin: 0 0 4mm; }
  .print-sub { font-size: 10.5pt; color: #555; margin: 0 0 7mm; }
  .print-table { width: 100%; border-collapse: collapse; }
  .print-table th, .print-table td {
    border: 1px solid #bbb;
    padding: 3.6mm 3mm;
    text-align: left;
    vertical-align: middle;
  }
  .print-table th { background: #f3f3f3; font-size: 10pt; }
  .print-table td { font-size: 13pt; }
  .print-pinyin { font-family: "Comic Sans MS", "Microsoft YaHei", sans-serif; font-size: 20pt; }
  .print-char { font-size: 18pt; }
  .print-check { font-size: 10pt; color: #555; white-space: nowrap; }
  .print-tip { margin-top: 7mm; font-size: 10pt; color: #555; line-height: 1.7; }
  .print-footer { margin-top: 8mm; font-size: 9pt; color: #777; }
}

/* ---- 响应式 ----------------------------------------------------------- */
@media (max-width: 1020px) {
  .practice-layout { grid-template-columns: 1fr; }
  .practice-preview { position: static; order: -1; padding: 20px; }
  .preview-main { margin: 14px 0 8px; }
  .preview-full { font-size: 58px; }
  .preview-part { min-width: 46px; min-height: 52px; font-size: 30px; }
  .preview-word { margin-top: 10px; padding-top: 10px; }
  .write-layout { grid-template-columns: 1fr; }
  .write-aside { grid-template-columns: 1fr 1fr; }
  .confusion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticker-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --nav-h: 76px; }
  body { font-size: 17px; padding-bottom: calc(var(--nav-h) + 34px + env(safe-area-inset-bottom)); }
  .topbar { padding: 12px 16px 8px; }
  .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
  .brand-mark svg { width: 34px; height: 34px; }
  .brand-text strong { font-size: 18px; }
  .brand-text small { display: none; }
  .top-actions { gap: 6px; }
  .star-chip { min-height: 42px; padding: 7px 11px; font-size: 15px; }
  .icon-btn { width: 42px; height: 42px; border-radius: 14px; }
  .parent-btn { min-height: 42px; padding: 7px 11px; border-radius: 14px; }
  .parent-btn span { display: none; }

  .view { padding: 4px 16px 30px; }
  .page-head { align-items: flex-start; gap: 12px; margin: 12px 0 18px; }
  .page-head > .btn { flex: 0 0 auto; }
  .page-sub { font-size: 13.5px; }
  h1 { font-size: clamp(33px, 9vw, 44px); }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 24px 22px 16px;
    border-radius: 30px;
  }
  .hero-art { min-height: 196px; margin-top: -4px; }
  .mascot { width: min(206px, 64%); }
  .hero-halo { width: 220px; }
  .hero-copy h1 { font-size: clamp(34px, 9vw, 43px); }
  .hero-sub { font-size: 14px; margin-top: 10px; }
  .hero-actions { margin-top: 18px; }
  .hero-actions .btn { min-height: 50px; padding: 11px 18px; font-size: 15px; }
  .spark-a { right: 18%; top: 10%; }
  .spark-b { left: 18%; bottom: 12%; }

  .resume-card, .custom-card { flex-wrap: wrap; padding: 14px; gap: 11px; }
  .resume-card .btn, .custom-card .btn { width: 100%; margin-left: 0; }
  .section-intro { margin-top: 24px; }
  .module-grid { grid-template-columns: 1fr; gap: 10px; }
  .module-card { min-height: 90px; padding: 15px; gap: 13px; border-radius: 20px; }
  .module-icon { width: 50px; height: 50px; border-radius: 16px; }
  .module-icon .icon { width: 25px; height: 25px; }
  .module-body strong { font-size: 20px; }
  .home-strip { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }

  .pill-tabs, .parent-tabs { width: 100%; }
  .pill-tabs button, .parent-tabs button { flex: 1; padding: 8px 10px; font-size: 13px; }
  .read-info { min-height: 66px; padding: 10px 13px; border-radius: 18px; }
  .read-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
  .read-tile { min-height: 86px; border-radius: 17px; }
  .read-tile-pinyin { font-size: 31px; }
  .read-tile.is-long .read-tile-pinyin { font-size: 26px; }

  .practice-panel { padding: 18px; border-radius: 24px; }
  .mode-grid { grid-template-columns: 1fr; gap: 6px; }
  .mode-card { flex-direction: row; align-items: center; min-height: 58px; gap: 10px; }
  .mode-card .icon { margin: 0; }
  .mode-card strong { font-size: 14px; }
  .mode-card span { margin-left: auto; font-size: 11px; text-align: right; }
  .practice-preview { border-radius: 24px; }
  .preview-full { font-size: 52px; }

  .letter-picker { gap: 6px; }
  .letter-picker button { min-width: 48px; min-height: 46px; font-size: 21px; }
  .write-stage { padding: 15px; border-radius: 24px; }
  .write-aside { grid-template-columns: 1fr; }
  .write-controls .btn { min-height: 44px; padding: 8px 12px; font-size: 13px; }

  .confusion-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .confusion-card { min-height: 175px; padding: 14px; border-radius: 20px; }
  .confusion-pair { font-size: 40px; }
  .confusion-title { font-size: 14px; margin-top: 9px; }
  .confusion-hint { font-size: 11px; }
  .sticker-shelf { padding: 16px; border-radius: 24px; }
  .sticker-grid { grid-template-columns: repeat(3, 1fr); }
  .sticker { padding: 9px 4px; }
  .sticker-badge { width: 50px; height: 50px; }

  .pocket-grid { grid-template-columns: 1fr; }
  .pocket-card.span-2 { grid-column: auto; }
  .star-hero { padding: 18px; flex-wrap: wrap; }
  .star-hero-icon { width: 68px; height: 68px; }
  .star-hero-copy > strong { font-size: 36px; }
  .star-hero .text-link { margin-left: 0; }
  .sticker-book { grid-template-columns: repeat(3, 1fr); }

  .parent-section { padding: 18px; border-radius: 24px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .custom-builder { grid-template-columns: 1fr; }
  .custom-builder .span-2 { grid-column: auto; }
  .settings-grid-2 { grid-template-columns: 1fr; }
  .report-row { flex-wrap: wrap; gap: 6px 10px; }
  .report-row .report-date { margin-left: 0; }
  .report-row .icon-btn { margin-left: auto; }

  .quiz-view { padding: 10px 14px 24px; }
  .quiz-top { gap: 6px; margin-bottom: 8px; }
  .quiz-top .back-link { font-size: 12px; }
  .quiz-dots { gap: 4px; }
  .quiz-dot { width: 7px; height: 7px; }
  .quiz-dot.is-current { width: 18px; }
  .quiz-sound { width: 38px; height: 38px; }
  .quiz-card { padding: 18px 14px 20px; border-radius: 26px; }
  .quiz-prompt { min-height: 164px; padding: 10px 4px 14px; }
  .quiz-pinyin { font-size: clamp(48px, 13vw, 64px); }
  .quiz-pinyin.is-long { font-size: clamp(40px, 11vw, 56px); }
  .quiz-speaker { min-width: 138px; min-height: 138px; padding: 16px; }
  .quiz-speaker .icon { width: 42px; height: 42px; }
  .options-grid { gap: 8px; }
  .option-btn { min-height: 78px; border-radius: 18px; padding: 9px 10px; }
  .option-btn .option-char { font-size: 36px; }
  .option-btn .option-pinyin { font-size: 27px; }
  .feedback { padding: 12px; gap: 9px; border-radius: 16px; }
  .feedback-actions { flex-direction: column; align-items: stretch; }
  .feedback-actions .btn, .feedback-actions .icon-btn { min-height: 34px; }
  .quiz-next-row { justify-content: stretch; }
  .quiz-next-row .btn { flex: 1; }
  .session-summary { padding-top: 18px; }
  .summary-glow { width: 76px; height: 76px; }
  .summary-glow .icon { width: 42px; height: 42px; }
  .session-summary h2 { font-size: 26px; }

  .bottom-nav {
    width: calc(100% - 16px);
    bottom: calc(8px + env(safe-area-inset-bottom));
    min-height: var(--nav-h);
    padding: 7px 6px;
    border-radius: 24px;
    gap: 1px;
  }
  .bottom-nav button { min-height: 58px; font-size: 10px; border-radius: 16px; padding: 4px 1px; }
  .bottom-nav button .icon { width: 22px; height: 22px; }

  .sound-popover { top: 68px; right: 12px; }
  .toast { bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) {
  .brand-text strong { font-size: 17px; }
  .star-chip { padding: 7px 9px; gap: 4px; }
  .star-chip .icon { width: 18px; height: 18px; }
  .top-actions { gap: 5px; }
  .icon-btn { width: 40px; height: 40px; }
  .parent-btn { min-width: 40px; padding: 7px 9px; }
  .confusion-grid { grid-template-columns: 1fr; }
  .confusion-card { min-height: 158px; }
  .confusion-pair { font-size: 44px; }
  .confusion-foot { padding-top: 9px; }
  .option-btn .option-pinyin { font-size: 25px; }
  .select, .text-input { font-size: 16px; }
}

@media (max-height: 620px) and (orientation: landscape) {
  .home-hero { grid-template-columns: 1.3fr 0.7fr; min-height: 0; }
  .hero-art { min-height: 180px; }
  .mascot { width: 180px; }
  .quiz-card { padding-top: 14px; }
  .quiz-prompt { min-height: 130px; }
  .quiz-speaker { min-width: 118px; min-height: 118px; }
  .quiz-speaker .icon { width: 36px; height: 36px; }
}

/* ---- 降低动画 --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* small follow-up styles */
.choice-chip small { font-size: 11px; color: var(--muted-2); font-weight: 500; }
.quiz-pinyin-line { display: flex; align-items: center; justify-content: center; gap: 12px; }
.prompt-speak { width: 42px; height: 42px; border-radius: 14px; background: var(--surface-soft); }
.option-tone-curve { display: block; margin: 2px auto 0; width: 44px; height: 18px; opacity: .55; }
.option-tone-curve .tone-curve { width: 44px; height: 18px; }
.pocket-card a, .pocket-card button { text-decoration: none; }

/* layout refinements after visual review */
.pocket-pill strong {
  display: inline;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
}
[data-view="write"] .page-head { margin: 8px 0 12px; }
[data-view="write"] .page-head h1 { font-size: clamp(34px, 4vw, 48px); }
.read-tile-hint { opacity: .42; }
.read-tile-hint .icon { width: 13px; height: 13px; }
.stroke-board-wrap { max-width: 380px; }

@media (max-width: 760px) {
  .practice-preview { padding: 14px 16px; }
  .practice-preview .preview-word,
  .practice-preview .preview-note { display: none; }
  .practice-preview .preview-main { margin: 8px 0 0; }
  .practice-preview .preview-kicker { font-size: 11px; }
  .practice-preview .preview-part { min-width: 41px; min-height: 44px; padding: 3px 8px; font-size: 25px; }
  .practice-preview .preview-full { font-size: 40px; }
  .practice-preview .tone-preview-list { grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 9px; }
  .practice-preview .tone-preview-row { min-height: 40px; padding: 4px 7px; gap: 6px; }
  .practice-preview .tone-preview-row .tone-py { font-size: 21px; }
  .practice-preview .tone-preview-row .tone-ch { font-size: 12px; }
  .practice-preview .tone-preview-row .tone-num { width: 20px; height: 20px; font-size: 9px; }
  .practice-preview .tone-preview-row .tone-curve { display: none; }
  [data-view="write"] .page-head { margin: 4px 0 8px; }
  [data-view="write"] .page-head h1 { font-size: 34px; }
  [data-view="write"] .page-head .page-sub { margin-top: 3px; }
  .letter-picker {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 2px 1px 6px;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .letter-picker::-webkit-scrollbar { display: none; }
  .letter-picker button { flex: 0 0 48px; min-width: 48px; min-height: 46px; }
  .write-stage { padding: 12px; }
  .write-stage-head { margin-bottom: 8px; gap: 10px; }
  .letter-badge { width: 46px; height: 46px; font-size: 24px; border-radius: 15px; }
  .write-stage-head h2 { font-size: 26px; }
  .stroke-board-wrap { max-width: 300px; }
  .write-controls { gap: 6px; margin-top: 10px; }
  .write-controls .btn { min-height: 42px; padding: 7px 11px; font-size: 12.5px; border-radius: 13px; }
  .write-controls .btn .icon { width: 17px; height: 17px; }
  .write-tip { margin-top: 10px; padding: 9px 12px; font-size: 12px; }
}

@media (max-height: 820px) and (min-width: 761px) {
  [data-view="write"] .page-head { margin: 2px 0 8px; }
  [data-view="write"] .page-head h1 { font-size: 42px; }
  .stroke-board-wrap { max-width: 320px; }
  .write-stage { padding: 16px; }
  .write-controls { margin-top: 10px; }
  .practice-layout { gap: 14px; }
  .practice-panel { padding: 18px; }
  .setting-block { margin-bottom: 16px; }
  .mode-card { min-height: 82px; }
  .practice-preview { padding: 20px; }
  .practice-preview .preview-word { margin-top: 10px; padding-top: 10px; }
  .page-head { margin-top: 8px; margin-bottom: 16px; }
}

/* 平板横屏 / 矮屏：把最重要的操作留在第一屏 */
@media (min-width: 761px) and (max-height: 940px) {
  [data-view="write"] .page-head {
    margin: 0 0 8px;
    align-items: center;
  }
  [data-view="write"] .page-head .eyebrow,
  [data-view="write"] .page-head .page-sub { display: none; }
  [data-view="write"] .page-head h1 { font-size: 28px; }
  .stroke-board-wrap { max-width: 300px; }
  .write-stage { padding: 14px; }
  .write-stage-head { margin-bottom: 6px; }
  .write-controls { margin-top: 8px; }
  .write-tip { margin-top: 9px; }
}
@media (min-width: 761px) and (max-height: 800px) {
  .stroke-board-wrap { max-width: 280px; }
}
@media (min-width: 761px) and (max-height: 820px) {
  [data-view="practice"] .page-head {
    margin: 4px 0 10px;
    align-items: center;
  }
  [data-view="practice"] .page-head .eyebrow,
  [data-view="practice"] .page-head .page-sub { display: none; }
  [data-view="practice"] .page-head h1 { font-size: 32px; }
  [data-view="practice"] .practice-panel { padding: 16px; }
  [data-view="practice"] .setting-label { margin-bottom: 6px; }
  [data-view="practice"] .setting-block { margin-bottom: 12px; }
  [data-view="practice"] .mode-card { min-height: 70px; }
  [data-view="practice"] .mode-card .icon { margin-bottom: 1px; }
  [data-view="practice"] .mode-card span { font-size: 10.5px; }
  #typeChips .choice-chip small { display: none; }
  #typeChips .choice-chip { padding: 8px 20px; }
  [data-view="practice"] .btn-wide { min-height: 50px; }
  [data-view="practice"] .foot-tip { display: none; }
}
@media (max-width: 760px) {
  .letter-picker {
    -webkit-mask-image: linear-gradient(to right, #000 91%, transparent 100%);
    mask-image: linear-gradient(to right, #000 91%, transparent 100%);
  }
}
@media (max-width: 370px) {
  .brand-text strong { font-size: 15px; }
  .theme-btn { display: none; }
  .star-chip { padding: 6px 8px; }
}

@media (max-width: 760px) {
  #typeChips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  #typeChips .choice-chip {
    min-height: 44px;
    padding: 7px 4px;
    font-size: 13.5px;
    text-align: center;
  }
  #typeChips .choice-chip small { display: none; }
}

.option-btn.is-tone {
  flex-direction: column;
  gap: 3px;
}
.option-btn.is-tone .option-tone-curve { margin-top: 0; }
@media (max-width: 760px) {
  .feedback {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 6px 9px;
  }
  .feedback-icon { grid-column: 1; grid-row: 1; }
  .feedback-copy { grid-column: 2; grid-row: 1; }
  .feedback-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    justify-content: flex-end;
  }
  .feedback-actions .btn { min-height: 38px; }
}
.topbar { background-color: var(--bg); background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 74%, transparent 100%); }
.bottom-nav { background-color: var(--surface); }
.toast { background-color: var(--ink); }

@media (max-width: 760px) {
  [data-view="practice"] .page-sub { display: none; }
  [data-view="practice"] .page-head { margin: 8px 0 12px; }
  [data-view="practice"] .practice-panel { padding: 16px; }
  [data-view="practice"] .setting-block { margin-bottom: 17px; }
  [data-view="practice"] .practice-preview { padding: 12px 14px; }
  [data-view="practice"] .preview-full { font-size: 36px; }
  [data-view="practice"] .preview-part { min-width: 38px; min-height: 40px; font-size: 23px; }
  [data-view="practice"] .btn-wide { min-height: 50px; }
}

@media (max-width: 760px) {
  [data-view="practice"] .page-head { margin: 4px 0 9px; }
  [data-view="practice"] .practice-preview { padding: 10px 13px; }
  [data-view="practice"] .setting-block { margin-bottom: 12px; }
  [data-view="practice"] .mode-card { min-height: 50px; padding: 7px 10px; }
  [data-view="practice"] .mode-card span { display: none; }
  [data-view="practice"] .mode-card .icon { margin-bottom: 0; }
  [data-view="practice"] .btn-wide { min-height: 48px; }
}
