/* =========================================================
   苏宝入学准备屋 · 视觉系统
   江南纸感 / 松绿 / 朱砂 / 暖金
   ========================================================= */
:root {
  --paper: #f5eee0;
  --paper-deep: #e9ddc7;
  --card: #fffaf0;
  --card-strong: #fffdf7;
  --ink: #253c33;
  --ink-2: #3d5348;
  --muted: #728077;
  --faint: #97a096;
  --line: rgba(55, 75, 62, .14);
  --line-strong: rgba(55, 75, 62, .24);

  --jade: #3f7a67;
  --jade-deep: #2d5f4f;
  --jade-soft: #dcebe2;
  --gold: #d79a35;
  --gold-deep: #a96f17;
  --gold-soft: #f8e7bd;
  --plum: #bd6577;
  --plum-deep: #984758;
  --plum-soft: #f6dfe3;
  --sky: #6b9faf;
  --sky-deep: #4b7d8c;
  --sky-soft: #dceef1;
  --red: #d45b40;
  --red-deep: #b4452d;
  --red-soft: #f8ddd3;

  --shadow-xs: 0 2px 0 rgba(55, 75, 62, .06);
  --shadow-sm: 0 8px 24px rgba(55, 65, 50, .07);
  --shadow: 0 20px 60px rgba(55, 65, 50, .11);
  --shadow-lg: 0 30px 80px rgba(40, 50, 40, .18);

  --r-xl: 34px;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 13px;

  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --kai: "KaiTi", "STKaiti", "Kaiti SC", "FangSong", "STFangsong", serif;
  --latin: Georgia, "Times New Roman", serif;

  --topbar-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  background:
    radial-gradient(circle at 8% 2%, rgba(215, 154, 53, .15), transparent 30%),
    radial-gradient(circle at 94% 18%, rgba(107, 159, 175, .13), transparent 28%),
    radial-gradient(circle at 50% 105%, rgba(63, 122, 103, .12), transparent 42%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
body.modal-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold-soft); color: var(--ink); }

:focus-visible {
  outline: 3px solid rgba(63, 122, 103, .48);
  outline-offset: 3px;
  border-radius: 8px;
}
button:focus:not(:focus-visible), a:focus:not(:focus-visible) { outline: none; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg use { pointer-events: none; }
svg:not(.svg-sprite) {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 0 0 12px 12px;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

.app {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0 26px;
}

/* ========== 顶栏 ========== */
.topbar {
  position: sticky;
  top: 12px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--topbar-h);
  margin-top: 14px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(255, 255, 255, .54);
  border-radius: 22px;
  background: rgba(255, 250, 240, .87);
  box-shadow: 0 12px 40px rgba(65, 68, 48, .08), inset 0 0 0 1px rgba(84, 100, 80, .06);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 14px 14px 18px 14px;
  color: #fff9ec;
  background: linear-gradient(145deg, #df6a4d, #c84c32);
  box-shadow: inset 0 -3px 0 rgba(90, 25, 10, .18), 0 4px 12px rgba(180, 60, 35, .2);
  font-family: var(--kai);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1;
}
.brand-mark::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -3px;
  width: 11px;
  height: 11px;
  border-radius: 50% 50% 50% 2px;
  background: var(--jade);
  border: 2px solid var(--card);
  transform: rotate(-18deg);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: .98rem; letter-spacing: .02em; }
.brand-text small { margin-top: 2px; color: var(--muted); font-size: .68rem; letter-spacing: .08em; }

.main-nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.main-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 13px;
  border-radius: 13px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: .2s ease;
}
.main-nav a svg { width: 18px; height: 18px; opacity: .78; }
.main-nav a:hover { color: var(--ink); background: rgba(63, 122, 103, .07); }
.main-nav a.is-active { color: var(--ink); background: #f0e6d2; box-shadow: inset 0 0 0 1px rgba(75, 90, 70, .05); }
.main-nav a.is-active svg { color: var(--jade-deep); opacity: 1; }

.topbar-tools { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.star-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(215, 154, 53, .26);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff8e3, #f9e8bb);
  color: var(--gold-deep);
  font-size: .88rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 #fff;
  transition: transform .15s;
}
.star-pill:hover { transform: translateY(-1px); }
.star-pill svg { width: 17px; height: 17px; fill: #e6ae45; stroke: #b37d20; }
.star-pill b { min-width: 1.2em; text-align: left; font-variant-numeric: tabular-nums; }
.star-pill.is-bump { animation: starBump .35s ease; }

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 247, .7);
  color: var(--ink-2);
  transition: .2s;
}
.icon-button:hover { background: var(--card); border-color: var(--line-strong); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button.is-muted { color: var(--faint); background: transparent; }

.parent-button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: #fff9ea;
  font-size: .82rem;
  font-weight: 700;
  transition: .2s;
}
.parent-button:hover { background: #172b24; transform: translateY(-1px); }
.parent-button svg { width: 17px; height: 17px; }

/* ========== 通用 ========== */
.view { display: none; }
.view.is-active { display: block; animation: viewIn .38s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes starBump { 0%,100% { transform: scale(1); } 45% { transform: scale(1.12) rotate(-2deg); } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--jade-deep);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(212, 91, 64, .11);
}
.section { margin-top: 46px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.3vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.section-head p { margin-top: 5px; color: var(--muted); font-size: .88rem; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  color: var(--jade-deep);
  font-size: .82rem;
  font-weight: 700;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.section-link:hover { border-color: currentColor; }
.section-link svg { width: 15px; height: 15px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #fffaf0;
  background: linear-gradient(145deg, #dc6749, #c54c31);
  box-shadow: 0 9px 22px rgba(178, 62, 37, .23), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(178, 62, 37, .3); }
.btn-dark { color: #fff9ea; background: var(--ink); box-shadow: 0 8px 18px rgba(30, 48, 39, .17); }
.btn-soft { color: var(--ink); background: var(--card); border-color: var(--line); box-shadow: var(--shadow-xs); }
.btn-soft:hover { border-color: var(--line-strong); background: #fffdf7; }
.btn-jade { color: #fff; background: var(--jade); box-shadow: 0 8px 18px rgba(47, 103, 85, .2); }
.btn-ghost { color: var(--ink-2); background: transparent; border-color: transparent; padding: 0 12px; }
.btn-ghost:hover { background: rgba(63, 122, 103, .08); }
.btn-sm { min-height: 38px; padding: 0 15px; font-size: .82rem; }
.btn:disabled { opacity: .48; pointer-events: none; }
.btn-block { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 240, .7);
  color: var(--ink-2);
  font-size: .82rem;
  font-weight: 650;
  transition: .18s;
}
.chip:hover { border-color: var(--line-strong); background: var(--card); }
.chip.is-active { background: var(--ink); color: #fff9ea; border-color: var(--ink); box-shadow: 0 4px 12px rgba(35, 55, 45, .16); }
.chip .chip-count { opacity: .58; font-size: .7rem; }

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid rgba(70, 85, 70, .07);
  border-radius: 16px;
  background: #e9dfcb;
  box-shadow: inset 0 1px 3px rgba(60, 65, 45, .07);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  white-space: nowrap;
  transition: .18s;
}
.segmented button:hover { color: var(--ink); }
.segmented button.is-active { color: var(--ink); background: var(--card); box-shadow: 0 3px 10px rgba(60, 65, 45, .11); }
.segmented svg { width: 16px; height: 16px; }

/* ========== 首页 ========== */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, .97fr);
  gap: 8px;
  min-height: 474px;
  margin-top: 26px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: var(--r-xl);
  background:
    linear-gradient(120deg, rgba(255, 251, 241, .95) 0%, rgba(251, 242, 222, .9) 54%, rgba(239, 237, 218, .86) 100%);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(75, 90, 70, .05);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -130px;
  top: -170px;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  background: rgba(238, 197, 108, .17);
  filter: blur(4px);
}
.hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 52px 18px 50px 52px;
}
.hero h1 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 4.1vw, 3.85rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.045em;
}
.hero h1 .name { position: relative; color: var(--jade-deep); }
.hero h1 em {
  position: relative;
  color: var(--red);
  font-style: normal;
  white-space: nowrap;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 3px;
  z-index: -1;
  height: 12px;
  border-radius: 50%;
  background: rgba(232, 180, 90, .33);
  transform: rotate(-1.5deg);
}
.hero-lead {
  max-width: 31em;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: .98rem;
  line-height: 1.85;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed rgba(63, 80, 65, .18);
  color: var(--muted);
  font-size: .8rem;
}
.hero-meta b { color: var(--ink); font-size: 1.03rem; font-variant-numeric: tabular-nums; }
.hero-meta .dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

.hero-art { position: relative; min-height: 420px; align-self: stretch; }
.hero-art .scene {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: 92%;
  object-fit: contain;
  object-position: bottom center;
  z-index: 1;
}
.hero-art .hero-mascot {
  position: absolute;
  right: 14px;
  bottom: 8px;
  z-index: 4;
  width: 190px;
  filter: drop-shadow(0 20px 18px rgba(50, 55, 35, .16));
  animation: floatDeer 6s ease-in-out infinite;
}
@keyframes floatDeer { 0%,100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-9px) rotate(.6deg); } }
.speech {
  position: absolute;
  top: 34px;
  right: 34px;
  z-index: 5;
  padding: 10px 15px;
  border: 1px solid rgba(63, 122, 103, .18);
  border-radius: 16px 16px 4px 16px;
  background: rgba(255, 253, 245, .9);
  color: var(--jade-deep);
  font-size: .78rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transform: rotate(1.5deg);
}
.speech::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-right: 1px solid rgba(63, 122, 103, .18);
  border-bottom: 1px solid rgba(63, 122, 103, .18);
  background: #fffdf5;
  transform: skewY(35deg);
}
.hero-stamp {
  position: absolute;
  left: 18px;
  bottom: 30px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(189, 101, 119, .2);
  border-radius: 8px;
  color: var(--plum-deep);
  background: rgba(255, 249, 243, .72);
  font-family: var(--kai);
  font-size: .72rem;
  letter-spacing: .15em;
  transform: rotate(-3deg);
}

.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.module-card {
  --tone: var(--gold);
  --tone-deep: var(--gold-deep);
  --tone-soft: var(--gold-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 254px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--card-strong), #fbf4e6);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(70, 85, 70, .055);
  overflow: hidden;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s;
}
.module-card::before {
  content: "";
  position: absolute;
  top: -34px;
  right: -30px;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background: var(--tone-soft);
  opacity: .74;
  transition: transform .3s;
}
.module-card::after {
  content: attr(data-deco);
  position: absolute;
  right: 10px;
  top: 58px;
  color: var(--tone);
  font-family: var(--kai);
  font-size: 4.4rem;
  line-height: 1;
  opacity: .075;
  transform: rotate(-8deg);
  pointer-events: none;
}
.module-card:hover { transform: translateY(-5px); box-shadow: 0 20px 42px rgba(55, 65, 50, .12); border-color: rgba(255, 255, 255, .95); }
.module-card:hover::before { transform: scale(1.12) translate(-4px, 4px); }
.module-card.is-gold { --tone: var(--gold); --tone-deep: var(--gold-deep); --tone-soft: var(--gold-soft); }
.module-card.is-plum { --tone: var(--plum); --tone-deep: var(--plum-deep); --tone-soft: var(--plum-soft); }
.module-card.is-jade { --tone: var(--jade); --tone-deep: var(--jade-deep); --tone-soft: var(--jade-soft); }
.module-card.is-sky { --tone: var(--sky); --tone-deep: var(--sky-deep); --tone-soft: var(--sky-soft); }
.module-icon {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: var(--tone-soft);
  color: var(--tone-deep);
  font-size: 1.48rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.module-card h3 { position: relative; z-index: 2; margin-top: 19px; font-family: var(--serif); font-size: 1.3rem; letter-spacing: -.01em; }
.module-card .module-copy { position: relative; z-index: 2; margin-top: 6px; color: var(--muted); font-size: .8rem; line-height: 1.65; }
.module-foot { position: relative; z-index: 2; margin-top: auto; padding-top: 18px; }
.module-progress { display: flex; align-items: center; gap: 8px; }
.bar { position: relative; flex: 1; height: 6px; border-radius: 99px; background: #ece2d0; overflow: hidden; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--tone); width: 0; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.module-progress span { color: var(--tone-deep); font-size: .69rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.module-cta { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--tone-deep); font-size: .76rem; font-weight: 800; }
.module-cta svg { width: 16px; height: 16px; transition: transform .2s; }
.module-card:hover .module-cta svg { transform: translateX(4px); }

.home-lower { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; margin-top: 16px; }
.panel {
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, rgba(255, 253, 247, .9), rgba(250, 243, 230, .9));
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(70, 85, 70, .045);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-head h2, .panel-head h3 { font-family: var(--serif); font-size: 1.22rem; line-height: 1.3; }
.panel-head p { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.daily-panel { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 22px; align-items: center; }
.ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ring {
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(var(--jade) calc(var(--p) * 1%), #e9dfcb 0);
  box-shadow: inset 0 0 0 1px rgba(60, 80, 65, .06);
}
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--card); box-shadow: 0 2px 8px rgba(55, 65, 50, .07); }
.ring strong { position: relative; z-index: 1; font-family: var(--serif); font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ring small { position: relative; z-index: 1; display: block; margin-top: 2px; color: var(--muted); font-size: .59rem; text-align: center; }
.ring-label { color: var(--muted); font-size: .68rem; text-align: center; }
.task-list { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 8px;
  border-radius: 12px;
  color: var(--ink-2);
  font-size: .82rem;
  transition: background .18s;
}
.task-row:hover { background: rgba(63, 122, 103, .055); }
.task-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid #cfc3ad;
  border-radius: 50%;
  color: transparent;
  background: rgba(255, 255, 255, .55);
  flex: 0 0 auto;
}
.task-dot svg { width: 13px; height: 13px; stroke-width: 2.5; }
.task-row.is-done .task-dot { color: #fff; background: var(--jade); border-color: var(--jade); }
.task-row.is-done .task-text { color: var(--muted); }
.task-row .task-xp { margin-left: auto; color: var(--gold-deep); font-size: .66rem; font-weight: 800; }
.task-row.is-done .task-xp { color: var(--jade); }
.task-caption { color: var(--muted); font-size: .7rem; }
.daily-actions { display: flex; justify-content: flex-end; margin-top: 9px; }

.growth-panel { display: flex; flex-direction: column; }
.growth-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 17px; }
.growth-stat { padding: 12px 8px; border-radius: 14px; background: rgba(255, 255, 255, .53); border: 1px solid rgba(70, 85, 70, .07); text-align: center; }
.growth-stat b { display: block; font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.growth-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: .64rem; }
.badge-strip { display: flex; gap: 7px; margin-top: 17px; flex-wrap: wrap; }
.badge-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 59px;
  border: 1px solid rgba(70, 85, 70, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .52);
  font-size: 1.15rem;
  filter: grayscale(1);
  opacity: .42;
}
.badge-mini.is-earned { filter: none; opacity: 1; background: linear-gradient(160deg, #fffdf7, #f8ebcc); border-color: rgba(215, 154, 53, .22); }
.badge-mini small { margin-top: 1px; color: var(--muted); font-size: .49rem; line-height: 1.1; text-align: center; max-width: 47px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-empty { color: var(--muted); font-size: .76rem; line-height: 1.7; }
.growth-foot { margin-top: auto; padding-top: 13px; }
.growth-foot a { color: var(--jade-deep); font-size: .73rem; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }

.tip-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 16px;
  padding: 23px 28px;
  border: 1px solid rgba(107, 159, 175, .18);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, .55), transparent 35%),
    linear-gradient(130deg, #e5f0ee, #d9e9e5 65%, #e8eee1);
  overflow: hidden;
}
.tip-banner::after {
  content: "“";
  position: absolute;
  right: 22px;
  top: -36px;
  color: rgba(63, 122, 103, .1);
  font-family: var(--serif);
  font-size: 11rem;
  line-height: 1;
  pointer-events: none;
}
.tip-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 253, 247, .72);
  font-size: 1.65rem;
  box-shadow: var(--shadow-xs);
}
.tip-content { position: relative; z-index: 1; flex: 1; min-width: 0; }
.tip-content span { color: var(--jade-deep); font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
.tip-content blockquote { margin-top: 3px; color: var(--ink); font-family: var(--serif); font-size: .98rem; line-height: 1.7; }
.tip-actions { position: relative; z-index: 2; flex: 0 0 auto; }

.site-foot { margin-top: 52px; padding: 26px 0 34px; border-top: 1px dashed rgba(60, 80, 65, .18); color: var(--faint); font-size: .7rem; text-align: center; }
.site-foot p + p { margin-top: 4px; }

/* ========== 页面头部 ========== */
.page-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-top: 26px;
  padding: 32px 34px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 90% 10%, rgba(238, 201, 114, .2), transparent 34%),
    linear-gradient(140deg, rgba(255, 252, 244, .9), rgba(247, 238, 221, .86));
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(70, 85, 70, .045);
  overflow: hidden;
}
.page-head::after {
  content: attr(data-deco);
  position: absolute;
  right: 28px;
  bottom: -47px;
  color: var(--ink);
  font-family: var(--kai);
  font-size: 10rem;
  line-height: 1;
  opacity: .035;
  pointer-events: none;
  transform: rotate(-5deg);
}
.page-head > div:first-child { position: relative; z-index: 1; }
.page-head h1 {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: -.035em;
}
.page-head p { max-width: 48em; margin-top: 8px; color: var(--muted); font-size: .85rem; line-height: 1.75; }
.page-head .head-aside { position: relative; z-index: 2; flex: 0 0 auto; }
.progress-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  padding: 12px 16px;
  border: 1px solid rgba(70, 85, 70, .1);
  border-radius: 16px;
  background: rgba(255, 253, 247, .64);
  box-shadow: var(--shadow-xs);
}
.progress-pill .ring { width: 48px; height: 48px; }
.progress-pill .ring::before { inset: 5px; }
.progress-pill .ring strong { font-size: .77rem; }
.progress-pill .ring small { display: none; }
.progress-pill b { display: block; font-size: .78rem; }
.progress-pill span { display: block; margin-top: 1px; color: var(--muted); font-size: .64rem; }

.page-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.tool-note { color: var(--muted); font-size: .72rem; }
.panel-stack { margin-top: 20px; }

/* ========== 拼音 ========== */
.pinyin-cat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.pinyin-cat-head h2 { font-family: var(--serif); font-size: 1.35rem; }
.pinyin-cat-head p { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.pinyin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pinyin-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 108px;
  padding: 14px 15px;
  border: 1px solid rgba(70, 85, 70, .1);
  border-radius: 17px;
  background: linear-gradient(155deg, #fffdf7, #faf1df);
  text-align: left;
  transition: .18s ease;
  overflow: hidden;
}
.pinyin-tile::after {
  content: "";
  position: absolute;
  right: -13px;
  bottom: -17px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(215, 154, 53, .11);
}
.pinyin-tile:hover { transform: translateY(-3px); border-color: rgba(215, 154, 53, .35); box-shadow: 0 8px 20px rgba(65, 70, 50, .09); }
.pinyin-tile .py {
  color: var(--ink);
  font-family: var(--latin);
  font-size: 1.72rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.pinyin-tile .ex { margin-top: 5px; color: var(--ink-2); font-size: .8rem; }
.pinyin-tile .ex b { font-family: var(--kai); font-size: 1.08rem; font-weight: 700; }
.pinyin-tile .py-ex { margin-top: 1px; color: var(--muted); font-family: var(--latin); font-size: .68rem; }
.pinyin-tile .heard {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  background: var(--jade);
}
.pinyin-tile.is-heard .heard { display: grid; }
.pinyin-tile .heard svg { width: 10px; height: 10px; stroke-width: 2.8; }
.pinyin-tile .play-dot { position: absolute; right: 12px; bottom: 10px; color: var(--gold-deep); opacity: .55; }
.pinyin-tile .play-dot svg { width: 13px; height: 13px; }
.pinyin-tile:hover .play-dot { opacity: 1; }

.quiz-shell {
  max-width: 860px;
  margin: 22px auto 0;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, rgba(255, 253, 247, .94), rgba(249, 241, 227, .92));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(70, 85, 70, .045);
}
.quiz-top { display: flex; align-items: center; gap: 16px; }
.quiz-top .quiz-bar { flex: 1; }
.quiz-kicker { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .06em; }
.quiz-bar .bar { height: 7px; margin-top: 6px; }
.quiz-bar .bar > i { background: var(--jade); }
.quiz-score { flex: 0 0 auto; color: var(--gold-deep); font-size: .75rem; font-weight: 800; }
.quiz-score b { font-size: 1.05rem; }
.quiz-exit { flex: 0 0 auto; }
.listen-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 22px;
  padding: 25px 20px 21px;
  border: 1px solid rgba(63, 122, 103, .1);
  border-radius: 23px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, .8), transparent 50%),
    linear-gradient(155deg, #e7f0e8, #dcebe2);
  text-align: center;
}
.listen-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  color: #fff9e9;
  background: linear-gradient(145deg, #4e8a76, #346754);
  box-shadow: 0 12px 24px rgba(44, 93, 76, .24), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s;
}
.listen-button:hover { transform: scale(1.05); }
.listen-button svg { width: 31px; height: 31px; stroke-width: 1.7; }
.listen-button::before, .listen-button::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(63, 122, 103, .18);
  border-radius: 50%;
  animation: ringPulse 2.8s ease-out infinite;
}
.listen-button::after { animation-delay: 1.4s; }
@keyframes ringPulse { 0% { transform: scale(.94); opacity: .8; } 70% { transform: scale(1.2); opacity: 0; } 100% { opacity: 0; } }
.listen-caption { margin-top: 15px; color: var(--jade-deep); font-size: .74rem; font-weight: 700; }
.listen-caption span { color: var(--muted); font-weight: 500; }
.question-text { margin-top: 20px; font-family: var(--serif); font-size: clamp(1.18rem, 2.4vw, 1.5rem); line-height: 1.5; text-align: center; }
.question-sub { margin-top: 4px; color: var(--muted); font-size: .74rem; text-align: center; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.choice-grid.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1.5px solid rgba(70, 85, 70, .13);
  border-radius: 16px;
  background: rgba(255, 253, 247, .8);
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
  transition: .16s ease;
}
.choice:hover:not(:disabled) { border-color: rgba(63, 122, 103, .35); background: #fff; transform: translateY(-2px); box-shadow: 0 7px 16px rgba(55, 65, 50, .08); }
.choice .choice-key { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #efe5d1; color: var(--muted); font-size: .67rem; font-weight: 800; }
.choice.is-correct { border-color: var(--jade); background: #e5f1e8; color: var(--jade-deep); box-shadow: 0 0 0 2px rgba(63, 122, 103, .1); }
.choice.is-correct .choice-key { background: var(--jade); color: #fff; }
.choice.is-wrong { border-color: var(--red); background: #fbe9e3; color: var(--red-deep); }
.choice.is-wrong .choice-key { background: var(--red); color: #fff; }
.choice:disabled { cursor: default; }
.feedback {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 14px;
  font-size: .83rem;
  line-height: 1.65;
  animation: viewIn .25s ease;
}
.feedback.is-correct { background: rgba(63, 122, 103, .1); color: var(--jade-deep); border: 1px solid rgba(63, 122, 103, .14); }
.feedback.is-wrong { background: rgba(212, 91, 64, .09); color: #8f3f2d; border: 1px solid rgba(212, 91, 64, .15); }
.feedback strong { display: block; margin-bottom: 2px; font-size: .84rem; }
.game-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.game-actions .hint { color: var(--muted); font-size: .7rem; }
.round-complete { padding: 16px 8px 6px; text-align: center; }
.round-mascot { width: 128px; margin: 0 auto; filter: drop-shadow(0 12px 12px rgba(50, 55, 35, .13)); }
.round-complete h2 { margin-top: 4px; font-family: var(--serif); font-size: 1.8rem; }
.round-complete p { margin-top: 5px; color: var(--muted); font-size: .84rem; }
.round-scoreline { display: flex; justify-content: center; gap: 26px; margin-top: 20px; }
.round-scoreline div { min-width: 74px; }
.round-scoreline b { display: block; color: var(--gold-deep); font-family: var(--serif); font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.round-scoreline span { color: var(--muted); font-size: .66rem; }
.round-stars { display: flex; justify-content: center; gap: 6px; margin-top: 13px; color: var(--gold); font-size: 1.5rem; }
.round-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 21px; }

.tone-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.tone-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px 12px;
  border: 1px solid rgba(70, 85, 70, .1);
  border-radius: 16px;
  background: rgba(255, 253, 247, .7);
  transition: .18s;
}
.tone-card:hover { background: #fff; border-color: rgba(215, 154, 53, .3); transform: translateY(-2px); }
.tone-card .tone-char { color: var(--ink); font-family: var(--kai); font-size: 2.05rem; line-height: 1.1; }
.tone-card .tone-py { margin-top: 2px; color: var(--gold-deep); font-family: var(--latin); font-size: .84rem; }
.tone-card .tone-no { margin-top: 4px; color: var(--muted); font-size: .6rem; }
.tone-panel { margin-top: 16px; }
.tone-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tone-note { color: var(--muted); font-size: .74rem; }
.tone-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 16px; }
.tone-choice {
  padding: 12px 8px;
  border: 1.5px solid rgba(70, 85, 70, .13);
  border-radius: 16px;
  background: rgba(255, 253, 247, .8);
  text-align: center;
  transition: .16s;
}
.tone-choice:hover { border-color: rgba(63, 122, 103, .35); transform: translateY(-2px); }
.tone-choice b { display: block; font-size: 1.1rem; }
.tone-choice span { display: block; margin-top: 2px; color: var(--muted); font-size: .65rem; }
.tone-choice.is-correct { border-color: var(--jade); background: #e5f1e8; }
.tone-choice.is-wrong { border-color: var(--red); background: #fbe9e3; }

/* ========== 识字 ========== */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 9px; margin-top: 20px; }
.char-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 106px;
  padding: 12px 8px 10px;
  border: 1px solid rgba(70, 85, 70, .1);
  border-radius: 17px;
  background:
    linear-gradient(rgba(189, 101, 119, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(189, 101, 119, .05) 1px, transparent 1px),
    linear-gradient(155deg, #fffdf7, #fbf0e4);
  background-size: 33.33% 33.33%, 33.33% 33.33%, auto;
  transition: .18s ease;
  overflow: hidden;
}
.char-tile:hover { transform: translateY(-3px); border-color: rgba(189, 101, 119, .32); box-shadow: 0 8px 20px rgba(65, 60, 50, .09); }
.char-tile .ch { color: var(--ink); font-family: var(--kai); font-size: 2.35rem; font-weight: 700; line-height: 1.08; }
.char-tile .cp { margin-top: 4px; color: var(--plum-deep); font-family: var(--latin); font-size: .75rem; }
.char-tile .cw { margin-top: 1px; color: var(--muted); font-size: .6rem; }
.char-tile .learned-dot { position: absolute; top: 8px; right: 8px; display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 3px rgba(63, 122, 103, .12); }
.char-tile.is-learned .learned-dot { display: block; }
.char-tile.is-learned { border-color: rgba(63, 122, 103, .2); }

.char-detail { text-align: center; }
.char-detail .char-big {
  display: grid;
  place-items: center;
  width: 142px;
  height: 142px;
  margin: 2px auto 0;
  border: 1px solid rgba(189, 101, 119, .16);
  border-radius: 26px;
  background:
    linear-gradient(rgba(189, 101, 119, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(189, 101, 119, .08) 1px, transparent 1px),
    #fffdf7;
  background-size: 50% 50%;
  color: var(--ink);
  font-family: var(--kai);
  font-size: 5rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.char-detail .char-py { margin-top: 13px; color: var(--plum-deep); font-family: var(--latin); font-size: 1.2rem; letter-spacing: .04em; }
.char-detail .char-word { margin-top: 2px; font-family: var(--serif); font-size: 1.08rem; }
.char-detail .char-sentence { max-width: 25em; margin: 13px auto 0; padding: 12px 16px; border-radius: 14px; background: #f6edde; color: var(--ink-2); font-size: .86rem; line-height: 1.7; }
.char-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.trace-hint { margin-top: 9px; color: var(--muted); font-size: .7rem; }
.trace-wrap { display: none; margin-top: 15px; }
.trace-wrap.is-open { display: block; animation: viewIn .25s ease; }
.trace-paper {
  display: block;
  width: min(78vw, 300px);
  height: min(78vw, 300px);
  margin: 0 auto;
  border: 1px solid rgba(189, 101, 119, .16);
  border-radius: 20px;
  background: #fffdf7;
  box-shadow: inset 0 0 30px rgba(189, 101, 119, .05), var(--shadow-xs);
  touch-action: none;
  cursor: crosshair;
}
.trace-tools { display: flex; justify-content: center; gap: 8px; margin-top: 11px; }

.match-board { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.match-col { display: flex; flex-direction: column; gap: 8px; }
.match-col-title { color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .1em; text-align: center; }
.match-btn {
  min-height: 55px;
  padding: 8px 12px;
  border: 1.5px solid rgba(70, 85, 70, .12);
  border-radius: 15px;
  background: rgba(255, 253, 247, .8);
  font-family: var(--latin);
  font-size: 1.05rem;
  font-weight: 700;
  transition: .16s;
}
.match-btn[data-side="char"] { font-family: var(--kai); font-size: 1.65rem; }
.match-btn:hover:not(:disabled) { border-color: rgba(189, 101, 119, .35); background: #fff; transform: translateY(-1px); }
.match-btn.is-selected { border-color: var(--plum); background: var(--plum-soft); box-shadow: 0 0 0 2px rgba(189, 101, 119, .12); }
.match-btn.is-matched { border-color: rgba(63, 122, 103, .25); background: #e8f2eb; color: var(--jade-deep); box-shadow: none; cursor: default; }
.match-btn.is-wrong { animation: shake .35s ease; border-color: var(--red); background: #fbe9e3; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.match-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.match-status { color: var(--muted); font-size: .78rem; }
.match-status b { color: var(--ink); }

/* ========== 数学 ========== */
.math-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.math-card {
  --tone: var(--gold);
  --tone-deep: var(--gold-deep);
  --tone-soft: var(--gold-soft);
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 122px;
  padding: 19px;
  border: 1px solid rgba(70, 85, 70, .1);
  border-radius: 21px;
  background: linear-gradient(155deg, rgba(255, 253, 247, .94), rgba(250, 241, 224, .9));
  text-align: left;
  transition: .2s;
  overflow: hidden;
}
.math-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -31px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--tone-soft);
  opacity: .65;
}
.math-card:hover { transform: translateY(-3px); border-color: var(--tone); box-shadow: 0 12px 28px rgba(60, 65, 50, .1); }
.math-card.is-gold { --tone: var(--gold); --tone-deep: var(--gold-deep); --tone-soft: var(--gold-soft); }
.math-card.is-jade { --tone: var(--jade); --tone-deep: var(--jade-deep); --tone-soft: var(--jade-soft); }
.math-card.is-plum { --tone: var(--plum); --tone-deep: var(--plum-deep); --tone-soft: var(--plum-soft); }
.math-card.is-sky { --tone: var(--sky); --tone-deep: var(--sky-deep); --tone-soft: var(--sky-soft); }
.math-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border-radius: 19px;
  background: var(--tone-soft);
  font-size: 1.65rem;
}
.math-card-text { position: relative; z-index: 1; flex: 1; }
.math-card h3 { font-family: var(--serif); font-size: 1.17rem; }
.math-card p { margin-top: 3px; color: var(--muted); font-size: .74rem; }
.math-card .math-meta { display: flex; align-items: center; gap: 8px; margin-top: 7px; color: var(--tone-deep); font-size: .63rem; font-weight: 800; }
.math-card .math-meta .bar { max-width: 88px; height: 5px; background: rgba(255, 255, 255, .65); }
.math-card .math-meta .bar > i { background: var(--tone); }
.math-card > svg { position: relative; z-index: 1; color: var(--tone-deep); width: 17px; height: 17px; }
.math-level-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 13px; color: var(--muted); font-size: .72rem; }
.math-level-note .tag { padding: 3px 8px; border-radius: 99px; background: #e8dfcc; color: var(--ink-2); font-size: .63rem; font-weight: 700; }
.math-game { max-width: 880px; margin: 20px auto 0; }
.math-game .quiz-top { margin-bottom: 2px; }
.math-question { margin-top: 20px; text-align: center; }
.math-question h2 { font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.62rem); line-height: 1.45; }
.math-question p { margin-top: 4px; color: var(--muted); font-size: .74rem; }
.math-visual {
  min-height: 172px;
  margin-top: 18px;
  padding: 21px 18px;
  border: 1px solid rgba(70, 85, 70, .09);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .72), transparent 65%),
    #f8f0df;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.count-dots { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 7px; max-width: 520px; }
.count-dots .token {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: rgba(255, 253, 247, .7);
  font-size: 1.24rem;
  box-shadow: 0 2px 5px rgba(60, 60, 40, .06);
  animation: tokenIn .35s ease both;
}
@keyframes tokenIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
.count-dots.is-small .token { width: 25px; height: 25px; font-size: 1.02rem; }
.compare-board { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 580px; }
.compare-side { min-height: 130px; padding: 12px; border-radius: 17px; background: rgba(255, 253, 247, .73); border: 1px solid rgba(70, 85, 70, .08); text-align: center; }
.compare-side .compare-label { color: var(--muted); font-size: .65rem; font-weight: 700; }
.compare-side .count-dots { margin-top: 9px; gap: 4px; }
.compare-side .count-dots .token { width: 23px; height: 23px; font-size: .98rem; border-radius: 7px; }
.compare-vs { align-self: center; color: var(--gold-deep); font-family: var(--serif); font-size: 1.2rem; font-weight: 800; }
.equation { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px; }
.equation .num {
  display: grid;
  place-items: center;
  min-width: 58px;
  height: 64px;
  padding: 0 8px;
  border: 1px solid rgba(70, 85, 70, .1);
  border-radius: 15px;
  background: rgba(255, 253, 247, .8);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 800;
}
.equation .op { color: var(--jade-deep); font-family: var(--serif); font-size: 1.65rem; }
.equation .qmark { color: var(--red); border-style: dashed; border-color: rgba(212, 91, 64, .4); background: #fff8ed; }
.add-visual { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; justify-content: center; }
.add-group { position: relative; }
.add-group .group-label { position: absolute; left: 50%; bottom: -17px; transform: translateX(-50%); color: var(--muted); font-size: .59rem; white-space: nowrap; }
.add-plus { color: var(--jade-deep); font-family: var(--serif); font-size: 1.5rem; }
.sub-dots .token.is-gone { opacity: .28; position: relative; }
.sub-dots .token.is-gone::after { content: "×"; position: absolute; color: var(--red); font-size: 1rem; font-weight: 900; }
.pattern-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pattern-item {
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border: 1px solid rgba(70, 85, 70, .1);
  border-radius: 15px;
  background: rgba(255, 253, 247, .8);
  font-size: 1.65rem;
  box-shadow: 0 2px 6px rgba(60, 60, 40, .05);
}
.pattern-item.is-unknown { border: 2px dashed rgba(107, 159, 175, .55); color: var(--sky-deep); background: rgba(220, 238, 241, .45); font-family: var(--serif); font-size: 1.25rem; font-weight: 800; }
.pattern-arrow { color: var(--faint); font-size: 1.1rem; }
.num-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.num-option {
  min-height: 60px;
  border: 1.5px solid rgba(70, 85, 70, .13);
  border-radius: 16px;
  background: rgba(255, 253, 247, .82);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 800;
  transition: .16s;
}
.num-option:hover:not(:disabled) { border-color: rgba(63, 122, 103, .35); transform: translateY(-2px); }
.num-option.is-correct { border-color: var(--jade); background: #e5f1e8; color: var(--jade-deep); }
.num-option.is-wrong { border-color: var(--red); background: #fbe9e3; color: var(--red-deep); }
.num-option.is-text { font-family: var(--sans); font-size: .94rem; }
.math-explain { margin-top: 15px; }
.math-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; }
.math-foot .math-tip { color: var(--muted); font-size: .7rem; }

/* ========== 入学准备 ========== */
.habit-panel { margin-top: 20px; }
.weekly-meter { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border: 1px solid rgba(70, 85, 70, .09); border-radius: 17px; background: rgba(255, 253, 247, .6); }
.weekly-meter .bar { height: 8px; }
.weekly-meter .bar > i { background: linear-gradient(90deg, var(--jade), #6fa78c); }
.weekly-meter b { flex: 0 0 auto; color: var(--jade-deep); font-size: .8rem; font-variant-numeric: tabular-nums; }
.weekly-meter span { flex: 0 0 auto; color: var(--muted); font-size: .68rem; }
.checklist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.check-group {
  --tone: var(--jade);
  --tone-soft: var(--jade-soft);
  padding: 18px;
  border: 1px solid rgba(70, 85, 70, .09);
  border-radius: 20px;
  background: rgba(255, 253, 247, .65);
}
.check-group.is-jade { --tone: var(--jade); --tone-soft: var(--jade-soft); }
.check-group.is-gold { --tone: var(--gold); --tone-soft: var(--gold-soft); }
.check-group.is-plum { --tone: var(--plum); --tone-soft: var(--plum-soft); }
.check-group.is-sky { --tone: var(--sky); --tone-soft: var(--sky-soft); }
.check-title { display: flex; align-items: center; gap: 9px; padding-bottom: 10px; border-bottom: 1px dashed rgba(70, 85, 70, .13); }
.check-title .check-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--tone-soft); font-size: .95rem; }
.check-title h3 { font-family: var(--serif); font-size: 1rem; }
.check-title span { margin-left: auto; color: var(--tone); font-size: .64rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.check-item { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; align-items: flex-start; padding: 9px 7px; margin: 1px -7px; border-radius: 11px; cursor: pointer; transition: background .16s; }
.check-item:hover { background: rgba(63, 122, 103, .05); }
.check-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { display: grid; place-items: center; width: 21px; height: 21px; margin-top: 2px; border: 1.5px solid #cfc3ad; border-radius: 7px; background: rgba(255, 255, 255, .6); color: transparent; transition: .16s; }
.check-box svg { width: 12px; height: 12px; stroke-width: 2.7; }
.check-item input:checked + .check-box { border-color: var(--jade); background: var(--jade); color: #fff; }
.check-item input:focus-visible + .check-box { outline: 3px solid rgba(63, 122, 103, .3); outline-offset: 2px; }
.check-text { font-size: .79rem; line-height: 1.5; }
.check-text small { display: block; margin-top: 1px; color: var(--muted); font-size: .63rem; line-height: 1.45; }
.check-item.is-done .check-text { color: var(--muted); }
.check-item .check-star { margin-left: 3px; color: var(--gold); font-size: .62rem; font-weight: 800; }
.habit-note { margin-top: 13px; color: var(--muted); font-size: .72rem; text-align: center; }

.scenario-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.scenario-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 14px 15px;
  border: 1px solid rgba(70, 85, 70, .1);
  border-radius: 17px;
  background: rgba(255, 253, 247, .7);
  text-align: left;
  transition: .18s;
}
.scenario-card:hover { background: #fff; border-color: rgba(189, 101, 119, .3); transform: translateY(-2px); box-shadow: 0 8px 18px rgba(60, 60, 50, .07); }
.scenario-card .scenario-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px; background: var(--plum-soft); font-size: 1.3rem; }
.scenario-card h3 { font-size: .85rem; line-height: 1.4; }
.scenario-card p { margin-top: 2px; color: var(--muted); font-size: .64rem; }
.scenario-card .done-check { position: absolute; top: 10px; right: 10px; display: none; color: var(--jade); }
.scenario-card .done-check svg { width: 14px; height: 14px; stroke-width: 2.4; }
.scenario-card.is-done .done-check { display: block; }
.scenario-card.is-done { border-color: rgba(63, 122, 103, .18); background: rgba(232, 242, 235, .5); }
.scenario-counter { color: var(--muted); font-size: .72rem; }
.scenario-counter b { color: var(--ink); }
.scenario-detail { text-align: left; }
.scenario-detail .scenario-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; background: var(--plum-soft); color: var(--plum-deep); font-size: .68rem; font-weight: 800; }
.scenario-detail h2 { margin-top: 12px; font-family: var(--serif); font-size: 1.4rem; }
.scenario-detail .scenario-question { margin-top: 9px; color: var(--ink-2); font-size: .9rem; line-height: 1.75; }
.scenario-options { display: flex; flex-direction: column; gap: 8px; margin-top: 17px; }
.scenario-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border: 1.5px solid rgba(70, 85, 70, .12);
  border-radius: 14px;
  background: rgba(255, 253, 247, .8);
  color: var(--ink-2);
  font-size: .82rem;
  line-height: 1.55;
  text-align: left;
  transition: .16s;
}
.scenario-option:hover:not(:disabled) { border-color: rgba(189, 101, 119, .35); background: #fff; }
.scenario-option .opt-key { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; border-radius: 50%; background: #efe5d1; color: var(--muted); font-size: .65rem; font-weight: 800; }
.scenario-option.is-correct { border-color: var(--jade); background: #e5f1e8; }
.scenario-option.is-correct .opt-key { background: var(--jade); color: #fff; }
.scenario-option.is-wrong { border-color: var(--red); background: #fbe9e3; }
.scenario-option.is-wrong .opt-key { background: var(--red); color: #fff; }
.scenario-option:disabled { cursor: default; }
.scenario-explain { margin-top: 13px; }
.scenario-tip { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(70, 85, 70, .14); color: var(--muted); font-size: .73rem; line-height: 1.7; }
.scenario-tip b { color: var(--ink-2); }

.breath-panel { text-align: center; padding: 10px 0 8px; }
.breath-stage { position: relative; display: grid; place-items: center; width: 270px; height: 270px; margin: 18px auto 0; }
.breath-orb {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #eaf4ee, #a9cbbb 55%, #6e9e89);
  box-shadow: 0 18px 40px rgba(63, 110, 90, .18), inset 0 0 40px rgba(255, 255, 255, .28);
  transform: scale(1);
}
.breath-orb::after { content: ""; position: absolute; inset: 20px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; }
.breath-stage.is-running .breath-orb { animation: breatheOrb 10s ease-in-out infinite; }
@keyframes breatheOrb {
  0%, 100% { transform: scale(.88); }
  35%, 45% { transform: scale(1.13); }
  85% { transform: scale(.88); }
}
.breath-copy { position: relative; z-index: 1; color: #fffdf4; text-shadow: 0 1px 6px rgba(30, 60, 45, .24); }
.breath-copy b { display: block; font-family: var(--serif); font-size: 1.42rem; letter-spacing: .08em; }
.breath-copy span { display: block; margin-top: 2px; font-size: .66rem; opacity: .88; }
.breath-time { margin-top: 13px; color: var(--ink-2); font-family: var(--latin); font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.breath-time small { color: var(--muted); font-family: var(--sans); font-size: .66rem; font-weight: 500; }
.breath-actions { display: flex; justify-content: center; gap: 9px; margin-top: 13px; }
.breath-tip { max-width: 35em; margin: 16px auto 0; color: var(--muted); font-size: .75rem; line-height: 1.75; }

.mood-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 16px; }
.mood-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 78px;
  padding: 9px 4px;
  border: 1.5px solid rgba(70, 85, 70, .1);
  border-radius: 15px;
  background: rgba(255, 253, 247, .72);
  font-size: .65rem;
  color: var(--muted);
  transition: .18s;
}
.mood-btn .mood-icon { font-size: 1.55rem; line-height: 1.2; }
.mood-btn:hover { transform: translateY(-2px); background: #fff; border-color: rgba(215, 154, 53, .3); }
.mood-btn.is-active { border-color: var(--gold); background: #fff6dc; color: var(--ink); box-shadow: 0 0 0 2px rgba(215, 154, 53, .1); }
.mood-feedback { display: none; margin-top: 12px; padding: 12px 15px; border-radius: 13px; background: rgba(63, 122, 103, .08); color: var(--jade-deep); font-size: .78rem; line-height: 1.7; }
.mood-feedback.is-show { display: block; animation: viewIn .22s ease; }
.mood-note-wrap { margin-top: 13px; }
.mood-note-wrap label { display: block; margin-bottom: 5px; color: var(--muted); font-size: .7rem; }
textarea {
  width: 100%;
  min-height: 74px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 247, .8);
  color: var(--ink);
  font-size: .8rem;
  line-height: 1.65;
  resize: vertical;
}
textarea:focus { border-color: rgba(63, 122, 103, .4); outline: 3px solid rgba(63, 122, 103, .1); }
.mood-save { display: flex; justify-content: flex-end; margin-top: 9px; }
.mood-history { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; padding-top: 13px; border-top: 1px dashed rgba(70, 85, 70, .14); }
.mood-history span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 99px; background: #efe6d4; color: var(--ink-2); font-size: .65rem; }

/* ========== 家长中心 ========== */
.parent-head { background: linear-gradient(145deg, rgba(239, 245, 240, .94), rgba(250, 244, 230, .9)); }
.lock-wrap { display: grid; place-items: center; min-height: 430px; }
.lock-card { max-width: 460px; margin: 40px auto; padding: 34px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 28px; background: var(--card); box-shadow: var(--shadow); text-align: center; }
.lock-icon { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 auto; border-radius: 19px; background: var(--jade-soft); font-size: 1.7rem; }
.lock-card h1 { margin-top: 16px; font-family: var(--serif); font-size: 1.6rem; }
.lock-card p { margin-top: 6px; color: var(--muted); font-size: .8rem; line-height: 1.7; }
.lock-card .btn { margin-top: 18px; }
.parent-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid rgba(107, 159, 175, .17);
  border-radius: 15px;
  background: rgba(220, 238, 241, .4);
  color: var(--ink-2);
  font-size: .76rem;
  line-height: 1.7;
}
.parent-note svg { width: 18px; height: 18px; margin-top: 2px; color: var(--sky-deep); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stat-card { padding: 18px 16px; border: 1px solid rgba(70, 85, 70, .09); border-radius: 18px; background: rgba(255, 253, 247, .72); }
.stat-card .stat-kicker { color: var(--muted); font-size: .66rem; font-weight: 700; }
.stat-card b { display: block; margin-top: 5px; font-family: var(--serif); font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card span { display: block; margin-top: 3px; color: var(--muted); font-size: .64rem; }
.stat-card.is-jade b { color: var(--jade-deep); }
.stat-card.is-gold b { color: var(--gold-deep); }
.stat-card.is-plum b { color: var(--plum-deep); }
.stat-card.is-sky b { color: var(--sky-deep); }
.parent-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 14px; margin-top: 14px; }
.chart { display: flex; align-items: flex-end; gap: 9px; height: 150px; margin-top: 18px; padding-top: 8px; }
.chart-col { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; }
.chart-bar-wrap { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 110px; }
.chart-bar { width: min(30px, 72%); min-height: 5px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, #77a892, #4e826e); transition: height .5s ease; }
.chart-col.is-today .chart-bar { background: linear-gradient(180deg, #e8b45a, #c58928); }
.chart-col.is-empty .chart-bar { background: #e7ddc9; }
.chart-col .chart-date { color: var(--muted); font-size: .6rem; }
.chart-col .chart-val { color: var(--ink-2); font-size: .62rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-list { display: flex; flex-direction: column; gap: 13px; margin-top: 17px; }
.progress-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 62px; gap: 10px; align-items: center; }
.progress-row .progress-name { color: var(--ink-2); font-size: .73rem; font-weight: 700; }
.progress-row .bar { height: 7px; }
.progress-row .bar > i { background: var(--jade); }
.progress-row .progress-val { color: var(--muted); font-size: .64rem; text-align: right; font-variant-numeric: tabular-nums; }
.mood-log { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.mood-log .mood-pill { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 99px; background: #f1e7d3; color: var(--ink-2); font-size: .67rem; }
.mood-log .mood-pill small { color: var(--muted); font-size: .58rem; }
.mood-log-empty { color: var(--muted); font-size: .72rem; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 17px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { color: var(--ink-2); font-size: .73rem; font-weight: 700; }
.field .field-hint { color: var(--muted); font-size: .63rem; }
.field input[type="text"], .field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 253, 247, .8);
  font-size: .82rem;
}
.field input[type="text"]:focus, .field select:focus { border-color: rgba(63, 122, 103, .4); outline: 3px solid rgba(63, 122, 103, .1); }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed rgba(70, 85, 70, .11); }
.field-row:last-child { border-bottom: 0; }
.field-row .field-row-copy b { display: block; font-size: .78rem; }
.field-row .field-row-copy span { display: block; color: var(--muted); font-size: .64rem; }
.switch { position: relative; display: inline-flex; flex: 0 0 auto; width: 48px; height: 28px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: absolute; inset: 0; border-radius: 99px; background: #d8ccb6; transition: .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(50, 50, 40, .2); transition: .2s; }
.switch input:checked + .track { background: var(--jade); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(63, 122, 103, .3); outline-offset: 2px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.danger-zone { margin-top: 17px; padding-top: 14px; border-top: 1px dashed rgba(212, 91, 64, .2); }
.danger-zone .btn { color: var(--red-deep); border-color: rgba(212, 91, 64, .2); background: rgba(248, 221, 211, .28); }
.danger-zone .btn:hover { background: rgba(248, 221, 211, .6); }
.policy-block { margin-top: 16px; }
.policy-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 13px; }
.policy-point { padding: 13px 11px; border-radius: 14px; background: rgba(255, 253, 247, .64); border: 1px solid rgba(70, 85, 70, .07); }
.policy-point b { display: block; font-family: var(--serif); font-size: .86rem; }
.policy-point span { display: block; margin-top: 3px; color: var(--muted); font-size: .62rem; line-height: 1.55; }
.source-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.source-card { display: block; padding: 13px 15px; border: 1px solid rgba(70, 85, 70, .09); border-radius: 14px; background: rgba(255, 253, 247, .64); transition: .16s; }
.source-card:hover { border-color: rgba(63, 122, 103, .28); background: #fff; }
.source-card b { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .77rem; font-weight: 800; }
.source-card b svg { width: 14px; height: 14px; color: var(--jade); flex: 0 0 auto; }
.source-card span { display: block; margin-top: 3px; color: var(--muted); font-size: .65rem; line-height: 1.6; }
.parent-disclaimer { margin-top: 14px; color: var(--faint); font-size: .63rem; line-height: 1.7; }
.parent-disclaimer a { color: var(--jade-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ========== 模态框 / 反馈 ========== */
.modal-root { position: fixed; inset: 0; z-index: 120; display: none; }
.modal-root.is-open { display: block; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28, 42, 34, .46);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  width: min(540px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 90% 0%, rgba(238, 201, 114, .13), transparent 32%),
    var(--card);
  box-shadow: var(--shadow-lg);
  animation: modalIn .26s cubic-bezier(.2, .8, .2, 1);
  overscroll-behavior: contain;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal.is-wide { width: min(720px, 100%); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(70, 85, 70, .07);
  color: var(--muted);
}
.modal-close:hover { background: rgba(70, 85, 70, .13); color: var(--ink); }
.modal-close svg { width: 16px; height: 16px; }
.modal h2 { font-family: var(--serif); font-size: 1.42rem; line-height: 1.35; }
.modal .modal-kicker { color: var(--jade-deep); font-size: .66rem; font-weight: 800; letter-spacing: .1em; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 21px; }
.modal-section { margin-top: 17px; padding-top: 15px; border-top: 1px dashed rgba(70, 85, 70, .14); }

.welcome-modal { text-align: center; padding-top: 24px; }
.welcome-modal .welcome-mascot { width: 124px; margin: 0 auto -6px; filter: drop-shadow(0 10px 10px rgba(50, 55, 35, .13)); }
.welcome-modal h2 { font-size: 1.65rem; }
.welcome-modal .welcome-lead { max-width: 30em; margin: 8px auto 0; color: var(--muted); font-size: .82rem; line-height: 1.75; }
.welcome-field { margin-top: 20px; text-align: left; }
.welcome-field label { display: block; margin-bottom: 5px; color: var(--ink-2); font-size: .72rem; font-weight: 700; }
.welcome-field input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; background: #fffdf7; font-size: 1rem; }
.welcome-field input:focus { border-color: rgba(63, 122, 103, .42); outline: 3px solid rgba(63, 122, 103, .1); }
.welcome-stages { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.stage-option { position: relative; display: block; padding: 12px 10px; border: 1.5px solid var(--line); border-radius: 13px; background: rgba(255, 253, 247, .8); text-align: center; cursor: pointer; transition: .16s; }
.stage-option input { position: absolute; opacity: 0; }
.stage-option b { display: block; font-size: .82rem; }
.stage-option span { display: block; margin-top: 2px; color: var(--muted); font-size: .62rem; }
.stage-option:has(input:checked) { border-color: var(--jade); background: #eaf3ec; box-shadow: 0 0 0 2px rgba(63, 122, 103, .08); }
.welcome-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 19px; }
.welcome-actions .text-link { border: 0; background: none; color: var(--muted); font-size: .7rem; padding: 6px; }
.welcome-actions .text-link:hover { color: var(--ink); }

.gate-modal { text-align: center; }
.gate-icon { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; background: var(--jade-soft); font-size: 1.6rem; }
.gate-modal h2 { margin-top: 13px; }
.gate-modal p { margin-top: 5px; color: var(--muted); font-size: .76rem; }
.gate-question { margin-top: 19px; padding: 16px; border-radius: 15px; background: #f5ecdc; }
.gate-question b { display: block; font-family: var(--serif); font-size: 1.8rem; letter-spacing: .04em; }
.gate-input-row { display: flex; gap: 8px; margin-top: 13px; }
.gate-input-row input { flex: 1; min-width: 0; height: 45px; padding: 0 13px; border: 1px solid var(--line); border-radius: 11px; background: #fffdf7; text-align: center; font-size: 1.05rem; }
.gate-error { display: none; margin-top: 8px; color: var(--red-deep); font-size: .7rem; }
.gate-error.is-show { display: block; }
.gate-note { margin-top: 12px; color: var(--faint); font-size: .62rem; }

.stars-modal .stars-total { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 8px; color: var(--gold-deep); font-family: var(--serif); font-size: 2rem; font-weight: 800; }
.stars-modal .stars-total svg { width: 29px; height: 29px; fill: #e6ae45; stroke: #b37d20; }
.stars-modal .stars-total small { color: var(--muted); font-family: var(--sans); font-size: .68rem; font-weight: 500; align-self: flex-end; margin-bottom: 7px; }
.achievement-list { display: flex; flex-direction: column; gap: 7px; margin-top: 17px; }
.achievement { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 13px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(70, 85, 70, .07); }
.achievement.is-locked { opacity: .48; filter: grayscale(.8); }
.achievement .ach-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 11px; background: var(--gold-soft); font-size: 1.12rem; }
.achievement b { display: block; font-size: .76rem; }
.achievement span { display: block; margin-top: 1px; color: var(--muted); font-size: .62rem; }
.achievement .ach-state { margin-left: auto; color: var(--jade); font-size: .61rem; font-weight: 800; }

.toast-stack { position: fixed; top: 101px; right: 24px; z-index: 150; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 330px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 13px;
  background: rgba(37, 60, 51, .96);
  color: #fffaf0;
  font-size: .76rem;
  line-height: 1.5;
  box-shadow: 0 12px 30px rgba(30, 40, 30, .2);
  animation: toastIn .25s ease;
}
.toast.is-out { animation: toastOut .25s ease forwards; }
.toast .toast-icon { font-size: 1.05rem; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px) translateX(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-5px); } }

.confetti-canvas { position: fixed; inset: 0; z-index: 140; width: 100%; height: 100%; pointer-events: none; }

/* ========== 打印 ========== */
.print-area { display: none; }
.print-report { color: #1f2c26; font-family: var(--sans); font-size: 10.5pt; line-height: 1.7; }
.print-report h1 { font-family: var(--serif); font-size: 22pt; }
.print-report h2 { margin-top: 16pt; padding-bottom: 4pt; border-bottom: 1px solid #d8d0c0; font-family: var(--serif); font-size: 13pt; }
.print-report .print-head { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 10pt; border-bottom: 2px solid #33473d; }
.print-report .print-head p { color: #5d6a62; font-size: 9pt; }
.print-report .print-stats { display: flex; gap: 8pt; margin-top: 12pt; }
.print-report .print-stat { flex: 1; padding: 8pt; border: 1px solid #ddd4c2; border-radius: 7pt; text-align: center; }
.print-report .print-stat b { display: block; font-family: var(--serif); font-size: 18pt; }
.print-report .print-stat span { color: #5d6a62; font-size: 8pt; }
.print-report ul { margin-top: 5pt; padding-left: 15pt; list-style: disc; }
.print-report li { margin-top: 2pt; }
.print-report .print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14pt; }
.print-report .print-note { margin-top: 14pt; padding: 9pt; border-radius: 6pt; background: #f4f0e7; font-size: 9pt; }
.print-sign { display: flex; justify-content: space-between; margin-top: 34pt; padding-top: 8pt; border-top: 1px dashed #c9c0ae; color: #5d6a62; font-size: 9pt; }

/* ========== 响应式 ========== */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); }
  .hero-copy { padding-left: 38px; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-card { min-height: 224px; }
  .main-nav a { padding: 0 10px; font-size: .8rem; }
  .main-nav a svg { width: 17px; height: 17px; }
  .topbar { gap: 12px; }
  .parent-button span { display: none; }
  .parent-button { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 860px) {
  :root { --topbar-h: 66px; }
  .app { padding: 0 16px; }
  .topbar { top: 8px; margin-top: 8px; height: 66px; border-radius: 18px; padding: 8px 9px 8px 12px; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .brand-mark { width: 39px; height: 39px; font-size: 1.4rem; border-radius: 12px 12px 16px 12px; }
  .brand-text strong { font-size: .88rem; }
  .brand-text small { font-size: .59rem; }
  .main-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 90;
    display: flex;
    justify-content: space-around;
    gap: 0;
    height: 66px;
    margin: 0;
    padding: 5px 6px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 19px;
    background: rgba(255, 250, 240, .94);
    box-shadow: 0 12px 40px rgba(40, 50, 40, .16), inset 0 0 0 1px rgba(70, 85, 70, .06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .main-nav a {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 56px;
    padding: 0 3px;
    border-radius: 13px;
    font-size: .61rem;
    font-weight: 700;
  }
  .main-nav a svg { width: 20px; height: 20px; }
  .main-nav a.is-active { background: #f3e8d4; color: var(--red-deep); }
  .main-nav a.is-active svg { color: var(--red-deep); }
  main { padding-bottom: 92px; }
  .site-foot { padding-bottom: 104px; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin-top: 18px; }
  .hero-copy { padding: 34px 30px 10px; }
  .hero h1 { font-size: clamp(2.05rem, 7.2vw, 3rem); }
  .hero-art { min-height: 300px; margin-top: -10px; }
  .hero-art .scene { height: 100%; }
  .hero-art .hero-mascot { width: 150px; right: 8%; bottom: 4px; }
  .speech { top: 20px; right: 8%; font-size: .7rem; }
  .hero-stamp { display: none; }
  .home-lower { grid-template-columns: 1fr; }
  .tip-banner { align-items: flex-start; padding: 20px; }
  .tip-actions { align-self: center; }
  .page-head { align-items: flex-start; flex-direction: column; padding: 26px; gap: 17px; }
  .page-head .head-aside { width: 100%; }
  .progress-pill { width: max-content; }
  .parent-grid { grid-template-columns: 1fr; }
  .policy-points { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .quiz-shell { padding: 21px; }
  .checklist-grid { grid-template-columns: 1fr; }
  .toast-stack { top: 86px; right: 14px; left: 14px; align-items: stretch; }
  .toast { max-width: none; }
}
@media (max-width: 620px) {
  .brand-text small { display: none; }
  .brand-text strong { font-size: .82rem; }
  .brand { gap: 8px; }
  .topbar-tools { gap: 5px; }
  .star-pill { padding: 0 9px; height: 38px; }
  .icon-button { width: 38px; height: 38px; }
  .parent-button { width: 38px; height: 38px; }
  .hero-copy { padding: 24px 20px 2px; }
  .hero-lead { font-size: .87rem; line-height: 1.72; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .btn { flex: 1; padding: 0 11px; font-size: .82rem; }
  .hero-meta { margin-top: 16px; padding-top: 14px; }
  .hero-art { min-height: 210px; }
  .hero-art .hero-mascot { width: 116px; right: 4%; }
  .segmented { display: flex; width: 100%; flex-wrap: wrap; }
  .segmented button { flex: 1 1 30%; justify-content: center; padding: 0 10px; font-size: .8rem; }
  .segmented.is-four button { flex: 1 1 46%; }
  .speech { top: 15px; right: 5%; font-size: .64rem; padding: 7px 10px; }
  .section { margin-top: 36px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 15px; }
  .section-head p { font-size: .8rem; }
  .module-grid { gap: 10px; }
  .module-card { min-height: 216px; padding: 17px; }
  .module-card h3 { margin-top: 14px; font-size: 1.14rem; }
  .module-card .module-copy { font-size: .72rem; }
  .module-icon { width: 45px; height: 45px; border-radius: 14px; font-size: 1.28rem; }
  .module-card::after { font-size: 3.6rem; }
  .daily-panel { grid-template-columns: 88px minmax(0, 1fr); gap: 13px; }
  .ring { width: 78px; height: 78px; }
  .ring strong { font-size: 1.18rem; }
  .panel { padding: 19px; }
  .tip-banner { flex-direction: column; gap: 11px; }
  .tip-icon { width: 44px; height: 44px; font-size: 1.35rem; }
  .tip-actions { align-self: flex-start; }
  .pinyin-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .pinyin-tile { min-height: 96px; padding: 11px 12px; }
  .pinyin-tile .py { font-size: 1.45rem; }
  .choice-grid.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tone-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-shell { padding: 17px; border-radius: 23px; }
  .quiz-top { gap: 9px; }
  .quiz-exit .btn span { display: none; }
  .choice { min-height: 52px; font-size: .98rem; }
  .scene { opacity: .92; }
  .char-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 7px; }
  .char-tile { min-height: 92px; padding: 9px 6px; }
  .char-tile .ch { font-size: 2rem; }
  .char-tile .cw { display: none; }
  .match-board { gap: 10px; }
  .match-btn { min-height: 49px; font-size: .92rem; }
  .match-btn[data-side="char"] { font-size: 1.45rem; }
  .math-grid { grid-template-columns: 1fr; gap: 9px; }
  .math-card { min-height: 98px; padding: 15px; }
  .math-icon { width: 50px; height: 50px; font-size: 1.4rem; border-radius: 15px; }
  .math-visual { min-height: 150px; padding: 16px 12px; }
  .count-dots { gap: 5px; }
  .count-dots .token { width: 25px; height: 25px; font-size: 1.05rem; border-radius: 7px; }
  .compare-side { min-height: 112px; padding: 9px; }
  .pattern-item { width: 45px; height: 45px; font-size: 1.35rem; }
  .num-option { min-height: 53px; font-size: 1.25rem; }
  .scenario-grid { grid-template-columns: 1fr; }
  .mood-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .mood-btn { min-height: 67px; padding: 7px 2px; }
  .mood-btn .mood-icon { font-size: 1.32rem; }
  .mood-btn { font-size: .58rem; }
  .settings-grid { grid-template-columns: 1fr; }
  .stat-grid { gap: 8px; }
  .stat-card { padding: 14px 12px; }
  .stat-card b { font-size: 1.65rem; }
  .progress-row { grid-template-columns: 70px minmax(0, 1fr) 55px; gap: 7px; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal {
    width: 100%;
    max-height: 91vh;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    padding: 25px 20px calc(22px + env(safe-area-inset-bottom));
    animation: sheetIn .3s cubic-bezier(.2, .8, .2, 1);
  }
  @keyframes sheetIn { from { opacity: .5; transform: translateY(50px); } to { opacity: 1; transform: none; } }
  .modal-close { top: 11px; right: 11px; }
  .lock-card { margin: 20px auto; padding: 26px 20px; }
  .policy-points { gap: 7px; }
  .page-head h1 { font-size: 1.8rem; }
  .page-head::after { font-size: 7rem; bottom: -34px; right: 12px; }
  .page-head { padding: 23px 20px; }
  .page-tools { gap: 8px; }
  .tool-note { width: 100%; }
  .game-actions { flex-direction: column-reverse; align-items: stretch; }
  .game-actions .hint { text-align: center; }
  .round-actions .btn { flex: 1; }
  .breath-stage { width: 230px; height: 230px; }
  .breath-orb { inset: 17px; }
  .breath-copy b { font-size: 1.2rem; }
}
@media (max-width: 390px) {
  .app { padding: 0 12px; }
  .brand-text strong { font-size: .77rem; }
  .star-pill { padding: 0 7px; font-size: .8rem; }
  .star-pill svg { width: 14px; height: 14px; }
  .hero h1 { font-size: 1.82rem; }
  .hero-copy { padding: 22px 16px 2px; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { width: auto; min-height: 44px; }
  .hero-art { min-height: 190px; }
  .hero-art .hero-mascot { width: 102px; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 0; }
  .module-card .module-foot { margin-top: 14px; }
  .daily-panel { grid-template-columns: 1fr; }
  .ring-wrap { flex-direction: row; }
  .ring-label { text-align: left; }
  .page-head { padding: 21px 17px; }
  .quiz-shell { padding: 14px; }
  .listen-button { width: 70px; height: 70px; }
  .choice-grid { gap: 7px; }
  .choice { padding: 8px 7px; font-size: .9rem; }
  .choice .choice-key { display: none; }
  .tone-card .tone-char { font-size: 1.75rem; }
  .math-card h3 { font-size: 1.08rem; }
  .modal { padding-left: 16px; padding-right: 16px; }
}

/* ========== 补充组件 ========== */
.pinyin-cat-head { flex-wrap: wrap; }
.pinyin-cat-head .chips { max-width: 100%; }
.pinyin-detail { text-align: center; }
.pinyin-detail .modal-kicker { display: block; text-align: center; }
.pinyin-detail .big-pinyin {
  margin: 14px auto 0;
  color: var(--ink);
  font-family: var(--latin);
  font-size: clamp(4rem, 12vw, 6.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
}
.pinyin-example {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  color: var(--ink-2);
  font-size: .95rem;
}
.pinyin-example b { font-family: var(--kai); font-size: 1.5rem; }
.pinyin-example span { color: var(--gold-deep); font-family: var(--latin); }
.pinyin-example i { color: var(--faint); font-style: normal; }
.sound-actions { display: flex; justify-content: center; margin-top: 18px; }
.modal-tip {
  max-width: 27em;
  margin: 17px auto 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: #f5ecdc;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.75;
}
.confirm-text { margin-top: 10px; color: var(--muted); font-size: .83rem; line-height: 1.78; }
.num-option.is-emoji { font-family: var(--sans); }
.policy-block h4 { margin-bottom: 6px; font-size: .82rem; }
.policy-list { padding-left: 18px; list-style: disc; color: var(--muted); font-size: .74rem; line-height: 1.8; }
.policy-list li { margin-top: 2px; }
.mood-history .mood-log-empty { padding: 0; background: none; color: var(--muted); font-size: .72rem; }
.check-star { color: var(--gold-deep); font-weight: 800; }
.compare-board { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.math-card { font: inherit; }
.math-card p { line-height: 1.6; }
.print-report .print-head p { text-align: right; line-height: 1.6; }
.print-report .print-grid p { margin-top: 6px; }
.print-report .print-note { line-height: 1.7; }

@media (max-width: 620px) {
  .pinyin-cat-head { display: block; }
  .pinyin-cat-head .chips { margin-top: 10px; }
  .pinyin-example { font-size: .86rem; }
  .compare-board { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }
  .compare-vs { font-size: .85rem; }
  .compare-side .count-dots { gap: 3px; }
  .trace-paper { width: min(82vw, 300px); height: min(82vw, 300px); }
  .modal-tip { font-size: .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

@media print {
  @page { size: A4; margin: 15mm; }
  html, body { background: #fff !important; }
  body::before, .app, .topbar, .site-foot, .modal-root, .toast-stack, .confetti-canvas, .skip-link { display: none !important; }
  .print-area { display: block !important; }
  .print-report { color: #1f2c26; }
}
