/* ============ 设计变量 ============ */
:root {
  --bg: #f2f5ff;
  --card: #ffffff;
  --primary: #4f7cff;
  --primary-dark: #365fe0;
  --primary-soft: #e8eeff;
  --accent: #ffb020;
  --accent-soft: #fff5df;
  --green: #1cbb6b;
  --green-soft: #e4f9ee;
  --red: #f2545b;
  --red-soft: #fdeceb;
  --purple: #8b5cf6;
  --text: #17203a;
  --muted: #6b7690;
  --line: #e4e9f5;
  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(23, 32, 58, .06);
  --shadow: 0 10px 30px rgba(43, 70, 140, .10);
  --shadow-lg: 0 22px 50px rgba(43, 70, 140, .16);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(79, 124, 255, .16), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(255, 176, 32, .18), transparent 38%),
    radial-gradient(circle at 78% 78%, rgba(139, 92, 246, .12), transparent 45%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

.app-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 32px);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 233, 245, .9);
}

.brand { display: flex; align-items: center; gap: 10px; }

.brand-logo {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, #6f95ff, var(--primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 8px 18px rgba(79, 124, 255, .35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; letter-spacing: .3px; }
.brand-text small { color: var(--muted); font-size: 11px; letter-spacing: .6px; }

.nav { display: flex; gap: 6px; background: #eef2fd; padding: 5px; border-radius: 999px; }
.nav a {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all .18s ease;
}
.nav a:hover { color: var(--primary-dark); }
.nav a.active { background: #fff; color: var(--primary-dark); box-shadow: var(--shadow-sm); }

/* ============ 主体 ============ */
.main {
  flex: 1;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px) clamp(14px, 4vw, 24px) 56px;
}

.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 18px clamp(16px, 4vw, 32px) 30px;
  color: #93a0bb;
  font-size: 12px;
}

/* ============ 通用 ============ */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .8);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .18s ease, background .18s ease;
  user-select: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(135deg, #6f95ff, var(--primary-dark));
  color: #fff;
  box-shadow: 0 10px 22px rgba(79, 124, 255, .32);
}
.btn-primary:hover { box-shadow: 0 14px 28px rgba(79, 124, 255, .42); }
.btn-ghost {
  background: #fff;
  color: var(--primary-dark);
  border: 1.5px solid #d8e2fb;
}
.btn-ghost:hover { background: #f6f9ff; }
.btn-accent {
  background: linear-gradient(135deg, #ffc94d, #f59e0b);
  color: #5b3c00;
  box-shadow: 0 10px 22px rgba(245, 158, 11, .28);
}
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: var(--primary-soft); color: var(--primary-dark);
}
.pill-accent { background: var(--accent-soft); color: #a06b00; }
.pill-green { background: var(--green-soft); color: #0d7d47; }

.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }

h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(22px, 3.4vw, 28px); letter-spacing: .2px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 14px; }
.section-title h2 { font-size: 18px; }
.section-title span { font-size: 12px; color: var(--muted); }

/* ============ 首页 hero ============ */
.hero {
  padding: clamp(20px, 3.6vw, 30px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  background: linear-gradient(135deg, #3f6cf0, #5b86ff 55%, #7fa4ff);
  color: #fff;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; right: -60px; top: -80px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}
.hero::before {
  content: "";
  position: absolute; right: 90px; bottom: -90px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.hero-greet { font-size: 13px; letter-spacing: 1px; opacity: .85; }
.hero-name { font-size: clamp(22px, 3.6vw, 29px); font-weight: 800; margin-top: 4px; }
.hero-sub { font-size: 14px; opacity: .9; margin-top: 8px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-actions .btn { padding: 11px 20px; }
.hero-actions .btn-light { background: #fff; color: var(--primary-dark); box-shadow: 0 10px 22px rgba(9, 27, 80, .22); }

.ring {
  --p: 0;
  width: 138px; height: 138px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(#ffd166 var(--p), rgba(255, 255, 255, .26) 0);
  position: relative;
  flex: none;
}
.ring::before {
  content: "";
  position: absolute; inset: 11px;
  border-radius: 50%;
  background: #4a76f5;
}
.ring-inner { position: relative; text-align: center; line-height: 1.2; }
.ring-inner b { font-size: 26px; display: block; }
.ring-inner small { font-size: 11px; opacity: .85; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.stat b { display: block; font-size: 21px; line-height: 1.3; }
.stat small { color: var(--muted); font-size: 12px; }

/* ============ 年级 tabs ============ */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: all .16s ease;
}
.tab:hover { border-color: #c3d3fb; color: var(--primary-dark); }
.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 124, 255, .28);
}

/* ============ 单元卡 ============ */
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.unit-card {
  padding: 18px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.unit-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.unit-head { display: flex; align-items: flex-start; gap: 12px; }
.unit-emoji {
  width: 44px; height: 44px; flex: none;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--primary-soft);
}
.unit-title { font-weight: 700; font-size: 15px; }
.unit-meta { font-size: 12px; color: var(--muted); }
.bar { height: 7px; border-radius: 999px; background: #eef2fb; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6f95ff, var(--primary-dark)); }
.unit-actions { display: flex; gap: 8px; }
.unit-actions .btn { flex: 1; padding: 9px 12px; font-size: 13px; }

/* ============ 学习页 ============ */
.learn-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.icon-btn {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: all .16s ease;
}
.icon-btn:hover { color: var(--primary-dark); border-color: #c3d3fb; }

.progress-line { flex: 1; }
.progress-line .bar { height: 9px; }
.progress-line small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

.flashcard-wrap { perspective: 1400px; margin: 0 auto 18px; max-width: 720px; }
.flashcard {
  position: relative;
  width: 100%;
  min-height: 340px;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.4, .1, .2, 1);
  cursor: pointer;
}
.flashcard.flipped { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 36px);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .9);
}
.face-front { align-items: center; justify-content: center; text-align: center; }
.face-back { transform: rotateY(180deg); justify-content: center; gap: 14px; }
.face-emoji { font-size: 62px; line-height: 1; margin-bottom: 14px; }
.word-en { font-size: clamp(32px, 6vw, 46px); font-weight: 800; letter-spacing: .5px; }
.word-ph { color: var(--muted); font-size: 16px; margin-top: 6px; }
.word-hint { margin-top: 22px; font-size: 12px; color: #a6b1c9; letter-spacing: .5px; }

.speak-btn {
  position: absolute; right: 16px; top: 16px;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 20px;
  transition: all .16s ease;
}
.speak-btn:hover { background: #dbe6ff; transform: scale(1.06); }

.back-word { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.back-word b { font-size: 26px; }
.back-zh { font-size: clamp(24px, 4.4vw, 32px); font-weight: 800; }
.pos { font-size: 12px; font-weight: 700; color: var(--purple); background: #f2ecff; padding: 3px 9px; border-radius: 8px; }
.example { background: #f7f9ff; border-left: 4px solid #b7c9ff; border-radius: 12px; padding: 14px 16px; }
.example p { font-size: 16px; font-weight: 600; }
.example small { color: var(--muted); }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }

.learn-actions { display: flex; gap: 12px; max-width: 720px; margin: 0 auto; }
.learn-actions .btn { flex: 1; padding: 15px; font-size: 16px; }
.btn-again { background: var(--red-soft); color: #c8323a; }
.btn-know { background: var(--green-soft); color: #0d7d47; }

/* ============ 练习页 ============ */
.quiz-card { padding: clamp(20px, 3.6vw, 32px); }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.quiz-count { font-size: 13px; color: var(--muted); font-weight: 600; }
.quiz-stem { text-align: center; padding: 22px 0 8px; }
.quiz-stem .q-label { font-size: 13px; color: var(--muted); letter-spacing: .5px; }
.quiz-stem .q-en { font-size: clamp(34px, 6.4vw, 48px); font-weight: 800; line-height: 1.2; }
.quiz-stem .q-zh { font-size: clamp(26px, 5vw, 34px); font-weight: 800; }
.quiz-stem .q-sub { font-size: 14px; color: var(--muted); margin-top: 8px; }
.big-speak {
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center;
  margin: 6px auto 0;
  font-size: 34px;
  background: linear-gradient(140deg, #6f95ff, var(--primary-dark));
  color: #fff;
  box-shadow: 0 14px 30px rgba(79, 124, 255, .35);
  transition: transform .16s ease;
}
.big-speak:hover { transform: scale(1.05); }

.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 22px; }
.option {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: #fff;
  border: 2px solid var(--line);
  font-size: 17px; font-weight: 700;
  text-align: left;
  transition: all .16s ease;
}
.option:hover:not(.disabled) { border-color: #b7c9ff; background: #f8faff; transform: translateY(-2px); }
.option .opt-key {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; margin-right: 10px;
  border-radius: 8px;
  background: #eef2fd; color: var(--muted);
  font-size: 12px;
}
.option.correct { border-color: var(--green); background: var(--green-soft); color: #0d7d47; }
.option.wrong { border-color: var(--red); background: var(--red-soft); color: #b8333a; }
.option.disabled { cursor: default; }

.spell-row { display: flex; gap: 10px; margin-top: 22px; }
.spell-input {
  flex: 1;
  padding: 15px 18px;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  outline: none;
  transition: border-color .16s ease;
  background: #fff;
}
.spell-input:focus { border-color: var(--primary); }
.spell-hint { margin-top: 14px; font-size: 14px; color: var(--muted); letter-spacing: 3px; }

.feedback {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  display: none;
}
.feedback.show { display: block; animation: pop .25s ease; }
.feedback.ok { background: var(--green-soft); color: #0d7d47; }
.feedback.no { background: var(--red-soft); color: #b8333a; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ============ 结果页 ============ */
.result { text-align: center; padding: clamp(24px, 4vw, 40px); }
.result-emoji { font-size: 62px; line-height: 1; }
.result h2 { font-size: clamp(24px, 4.4vw, 30px); margin-top: 10px; }
.result-score { font-size: 44px; font-weight: 800; color: var(--primary-dark); margin: 12px 0 2px; }
.result-facts { display: flex; justify-content: center; gap: 24px; margin: 18px 0 22px; flex-wrap: wrap; }
.result-facts div { text-align: center; }
.result-facts b { display: block; font-size: 20px; }
.result-facts small { color: var(--muted); font-size: 12px; }
.result-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ 错词本 ============ */
.wrong-list { display: flex; flex-direction: column; gap: 10px; }
.wrong-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.wrong-item .w-en { font-weight: 800; font-size: 17px; }
.wrong-item .w-zh { font-size: 13px; color: var(--muted); }
.wrong-item .w-times { margin-left: auto; font-size: 12px; font-weight: 700; color: #c8323a; background: var(--red-soft); padding: 4px 10px; border-radius: 999px; }
.wrong-item .icon-btn { box-shadow: none; }

.empty { text-align: center; padding: 50px 20px; }
.empty .empty-emoji { font-size: 50px; }
.empty h3 { margin: 12px 0 6px; }
.empty p { color: var(--muted); font-size: 14px; }

/* ============ 家长端 ============ */
.gate { max-width: 400px; margin: 30px auto; padding: 32px; text-align: center; }
.gate .lock { font-size: 44px; }
.pin-input {
  width: 100%;
  margin: 18px 0 12px;
  padding: 14px;
  text-align: center;
  font-size: 26px;
  letter-spacing: 12px;
  font-weight: 800;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  outline: none;
  background: #fbfcff;
}
.pin-input:focus { border-color: var(--primary); }
.pin-error { color: var(--red); font-size: 13px; min-height: 20px; }

.parent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.metric { padding: 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.metric small { color: var(--muted); font-size: 12px; display: block; }
.metric b { font-size: 24px; display: block; margin-top: 4px; }
.metric b span { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 3px; }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 16px 6px 0; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.chart-bar {
  width: 100%;
  max-width: 34px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #7fa4ff, #4f7cff);
  min-height: 4px;
  transition: height .4s ease;
  position: relative;
}
.chart-bar.today { background: linear-gradient(180deg, #ffd166, #f59e0b); }
.chart-bar.empty { background: #e6ebf7; }
.chart-col small { font-size: 11px; color: var(--muted); }

.weak-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.weak-row:last-child { border-bottom: none; }
.weak-row .rank { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--accent-soft); color: #a06b00; font-size: 12px; font-weight: 800; }
.weak-row .words { flex: 1; }
.weak-row .words b { display: block; font-size: 15px; }
.weak-row .words small { color: var(--muted); font-size: 12px; }

.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.field-row:last-child { border-bottom: none; }
.field-row label { font-size: 14px; font-weight: 600; }
.num-input { width: 90px; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--line); font-size: 15px; text-align: center; outline: none; font-weight: 700; }
.num-input:focus { border-color: var(--primary); }

.danger { color: #b8333a; }

/* ============ 跟读打卡 ============ */
.shadow-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.shadow-mini {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
}
.shadow-mini:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mini-emoji {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 20px;
}
.mini-main { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.mini-main b { font-size: 14px; }
.mini-main small { color: var(--muted); font-size: 11px; }
.mini-go {
  font-size: 12px; font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 6px 12px; border-radius: 999px;
}

.shadow-reader {
  background: #fffdf6;
  border: 1px solid #f2e7cd;
  border-radius: 22px;
  padding: 20px 20px 12px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.reader-title { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed #eadcbb; margin-bottom: 8px; }
.reader-emoji { font-size: 26px; }
.reader-title b { display: block; font-size: 17px; }
.reader-title small { color: #9a8a63; font-size: 12px; }
.reader-lines { display: flex; flex-direction: column; gap: 2px; }
.line {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .16s ease;
}
.line:hover { background: #fff8e6; }
.line.current { background: #fff1cc; box-shadow: inset 3px 0 0 var(--accent); }
.line.speaking { background: #ffe9a8; }
.line.done { opacity: .92; }
.ln { width: 22px; flex: none; text-align: center; font-size: 12px; color: #b5a37a; padding-top: 3px; }
.line-main { flex: 1; }
.line-en { font-size: 17px; font-weight: 600; line-height: 1.5; }
.line-badge {
  min-width: 34px; align-self: center;
  text-align: center;
  font-size: 12px; font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f0e6; color: #a89a76;
}
.line-badge.good { background: var(--green-soft); color: #0d7d47; }
.line-badge.mid { background: var(--accent-soft); color: #a06b00; }
.line-badge.low { background: var(--red-soft); color: #b8333a; }
.line-badge.done { background: #eef2fd; color: var(--primary-dark); }
.word-hit { color: #0d7d47; font-weight: 700; }
.word-miss { color: #c8323a; text-decoration: underline wavy #e88; }

.shadow-panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); }
.shadow-now { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.shadow-now b { font-size: 15px; }
.rec-timer { margin-left: auto; font-size: 12px; color: #c8323a; font-variant-numeric: tabular-nums; }
.shadow-actions { display: flex; gap: 12px; }
.shadow-actions .btn { flex: 1; padding: 14px; }
.rec-btn.recording {
  background: linear-gradient(135deg, #ff7a7a, #e0403f);
  box-shadow: 0 10px 22px rgba(224, 64, 63, .35);
  animation: recPulse 1.2s infinite;
}
/* 只动阴影不动几何：避免自动化工具把按钮判为 unstable 而点不到 */
@keyframes recPulse {
  0%, 100% { box-shadow: 0 10px 22px rgba(224, 64, 63, .35); }
  50% { box-shadow: 0 10px 32px rgba(224, 64, 63, .7); }
}
.score-box {
  display: flex; gap: 16px; align-items: center;
  margin-top: 16px; padding: 16px;
  border-radius: 16px;
  background: #f7fbff;
  border: 1px solid #e2ecff;
}
.score-num { font-size: 38px; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.score-num small { font-size: 13px; font-weight: 700; margin-left: 2px; }
.score-meta { flex: 1; }
.score-meta b { display: block; margin-bottom: 6px; }
.score-words { font-size: 15px; font-weight: 600; line-height: 1.6; margin-bottom: 4px; }
.score-none { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: #fff8e8; color: #8a6b1f; font-size: 14px; }
.shadow-audio { width: 100%; margin-top: 12px; }
.shadow-next { display: flex; justify-content: flex-end; margin-top: 12px; }
.shadow-next .btn { padding: 11px 26px; }

@media (max-width: 620px) {
  .shadow-actions { flex-direction: column; }
  .score-box { flex-direction: column; align-items: flex-start; }
}

/* ============ 档案与任务 ============ */
.child-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 16px; }
.child-tab {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1.5px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: all .16s ease;
}
.child-tab:hover { border-color: #c3d3fb; color: var(--primary-dark); }
.child-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 8px 18px rgba(79, 124, 255, .25); }
.child-tab.add { border-style: dashed; }

.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-item, .task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.task-item.done, .task-row.done { opacity: .75; }
.task-check {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: #eef2fd; color: var(--primary-dark);
  font-size: 13px; font-weight: 800;
}
.task-item.done .task-check, .task-row.done .task-check { background: var(--green-soft); color: #0d7d47; }
.task-main { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.task-main b { font-size: 15px; }
.task-main small { color: var(--muted); font-size: 12px; }
.task-go {
  font-size: 12px; font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 6px 12px; border-radius: 999px;
}

.task-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 14px; font-weight: 600; color: var(--text);
  outline: none;
}
.form-select:focus { border-color: var(--primary); }
.task-form .btn { padding: 10px 20px; }

@media (max-width: 620px) {
  .task-form .form-select { flex: 1; min-width: 120px; }
}

/* ============ toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 34px;
  transform: translate(-50%, 20px);
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(23, 32, 58, .92);
  color: #fff;
  font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: all .25s ease;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 响应式 ============ */
@media (max-width: 620px) {
  .hero { grid-template-columns: 1fr; }
  .ring { width: 112px; height: 112px; justify-self: start; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .options { grid-template-columns: 1fr; }
  .parent-grid { grid-template-columns: 1fr; }
  .nav a { padding: 7px 13px; font-size: 13px; }
  .brand-text small { display: none; }
  .flashcard { min-height: 300px; }
  .footer { flex-direction: column; }
}
