/* ============================================================
   文字森林 · 二宝的语文星球 — 1年级暖黄草绿设计系统
   ============================================================ */
@font-face {
  font-family: 'ZCOOL KuaiLe';
  src: url('../fonts/zcool-kuaile.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 1年级：暖黄 + 草绿（PRD 附录B：低年级主色调） */
  --bg0: #fff8e7;
  --bg1: #fdf3d7;
  --bg2: #eef7e2;
  --card: rgba(255, 255, 255, .92);
  --card-strong: #ffffff;
  --card-border: rgba(180, 140, 60, .18);
  --ink: #4a3b2a;
  --ink2: rgba(74, 59, 42, .72);
  --ink3: rgba(74, 59, 42, .5);
  --coral: #ff8a5c;
  --sun: #ffb703;
  --mint: #7fb069;
  --sky: #6ab7c9;
  --lav: #f6b8a0;
  --pink: #f9a8d4;
  --danger: #ff6b6b;
  --good: #66bb6a;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --shadow: 0 10px 30px rgba(180, 140, 60, .16);
  --shadow-sm: 0 6px 16px rgba(180, 140, 60, .13);
  --font: 'ZCOOL KuaiLe', 'YouYuan', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 45%, var(--bg2) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  letter-spacing: .3px;
  font-size: 18px;
}

/* ---------- 柔和圆点背景（1年级：慢、可爱） ---------- */
#stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star {
  position: absolute;
  border-radius: 50%;
  background: #ffd166;
  animation: twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: var(--min, .15); transform: scale(1); }
  50% { opacity: .45; transform: scale(1.25); }
}
.shooting-star { display: none; }
@keyframes twinkle {
  0%, 100% { opacity: var(--min, .25); transform: scale(1); }
  50% { opacity: 1; transform: scale(1.35); }
}
.shooting-star {
  position: absolute;
  width: 110px; height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,.9), transparent);
  border-radius: 2px;
  transform: rotate(-35deg);
  animation: shoot 9s linear infinite;
  opacity: 0;
}
@keyframes shoot {
  0% { opacity: 0; transform: translate(0, 0) rotate(-35deg); }
  2% { opacity: 1; }
  6% { opacity: 0; transform: translate(-380px, 260px) rotate(-35deg); }
  100% { opacity: 0; transform: translate(-380px, 260px) rotate(-35deg); }
}

/* ---------- 布局 ---------- */
#app {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 20px 90px;
}
#app.route-in { animation: popIn .42s cubic-bezier(.2, .9, .3, 1.2); }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  padding: 22px;
}
.card-strong { background: var(--card-strong); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid var(--card-border);
  font-size: 13px;
  color: var(--ink2);
}
.chip.big { font-size: 14px; padding: 7px 16px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, .18);
}
.pill.crystal { background: linear-gradient(135deg, #4cc9f0, #7dd3fc); color: #083344; }
.pill.streak { background: linear-gradient(135deg, #ff9f43, #ffd166); color: #5c3a00; }

/* ---------- 按钮（3D 厚底） ---------- */
.btn {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .28), var(--shadow-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  user-select: none;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .28); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: grayscale(.4); }
.btn-coral { background: linear-gradient(135deg, #ff8a5c, #ff6b6b); }
.btn-sun { background: linear-gradient(135deg, #ffd166, #ffb347); color: #5c3a00; }
.btn-mint { background: linear-gradient(135deg, #6ee7b7, #34d399); color: #064e3b; }
.btn-sky { background: linear-gradient(135deg, #7dd3fc, #38bdf8); color: #0c4a6e; }
.btn-lav { background: linear-gradient(135deg, #c4b5fd, #a78bfa); color: #312e81; }
.btn-ghost {
  background: rgba(255, 255, 255, .1);
  border: 1.5px solid var(--card-border);
  box-shadow: none;
  color: var(--ink2);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .18); color: var(--ink); }
.btn.big { font-size: 19px; padding: 16px 40px; }
.btn.small { font-size: 14px; padding: 8px 18px; }

/* ---------- 吉祥物 ---------- */
.mascot-img { border-radius: 50%; object-fit: cover; border: 3px solid rgba(255, 209, 102, .55); background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); animation: float 3s ease-in-out infinite; }
.mascot-img.clickable { cursor: pointer; }
.mascot-img.clickable:hover { animation: wiggle .5s ease-in-out; }
.mascot-img.mascot-sad { filter: grayscale(.35) brightness(.92); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.m-expr { display: none; }
/* 小思狐（1年级 emoji 角色） */

/* ---------- 对话气泡 ---------- */
.bubble {
  position: relative;
  background: #fff;
  color: #2d3250;
  border-radius: 22px;
  padding: 15px 19px;
  font-size: 15.5px;
  line-height: 1.75;
  box-shadow: var(--shadow);
  animation: popIn .35s cubic-bezier(.2, .9, .3, 1.15);
}
.bubble::before {
  content: '';
  position: absolute;
  left: 26px; top: -12px;
  border: 12px solid transparent;
  border-bottom-color: #fff;
  border-top: 0;
}
.bubble .bubble-name {
  font-size: 12px;
  color: #ff8a5c;
  font-weight: 700;
  display: block;
  margin-bottom: 3px;
}

/* ---------- 打字机与 loading ---------- */
.typing-dots { display: inline-flex; gap: 4px; padding: 6px 2px; }
.typing-dots i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: bounceDot 1.1s ease-in-out infinite;
}
.typing-dots i:nth-child(2) { animation-delay: .15s; background: var(--sun); }
.typing-dots i:nth-child(3) { animation-delay: .3s; background: var(--mint); }
@keyframes bounceDot {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-7px); opacity: 1; }
}

/* ---------- 步进条 ---------- */
.stepper { display: flex; gap: 8px; margin-bottom: 20px; }
.step {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--ink3);
  font-size: 12.5px;
  position: relative;
}
.step .step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  border: 2px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  transition: all .3s ease;
}
.step.done { color: var(--ink2); }
.step.done .step-dot { background: linear-gradient(135deg, var(--mint), var(--good)); border-color: transparent; }
.step.active { color: var(--ink); }
.step.active .step-dot {
  background: linear-gradient(135deg, var(--coral), #ff6b6b);
  border-color: transparent;
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(255, 138, 92, .22);
  animation: pulse 1.6s ease-in-out infinite;
}
.step::after {
  content: '';
  position: absolute;
  top: 17px; left: calc(50% + 20px);
  width: calc(100% - 40px); height: 3px;
  background: rgba(255, 255, 255, .12);
  border-radius: 3px;
}
.step:last-child::after { display: none; }
.step.done::after { background: linear-gradient(90deg, var(--mint), var(--good)); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(255, 138, 92, .22); }
  50% { box-shadow: 0 0 0 11px rgba(255, 138, 92, .08); }
}

/* ---------- 顶部状态栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  padding-right: 116px;   /* 给右上角「返回学习入口」浮动按钮留空间 */
}
.topbar .left { display: flex; align-items: center; gap: 12px; }
.topbar .right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar .greet { font-size: 15px; color: var(--ink2); line-height: 1.4; }

/* ---------- 星球 ---------- */
.planet-hero {
  width: 210px; height: 210px;
  border-radius: 50%;
  margin: 6px auto 14px;
  position: relative;
  box-shadow: 0 0 60px rgba(255, 209, 102, .35), inset -18px -18px 50px rgba(0, 0, 0, .35), inset 12px 12px 40px rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center;
  animation: spin-slow 26s linear infinite;
}
.planet-hero::after {
  content: '';
  position: absolute; inset: -16px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, .25);
  animation: spin-rev 20s linear infinite;
}
.planet-hero::before {
  content: '';
  position: absolute; inset: -30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
}
.planet-hero .planet-emoji { font-size: 78px; filter: drop-shadow(0 10px 16px rgba(0,0,0,.3)); }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }

.planet-card {
  position: relative;
  border-radius: var(--r-lg);
  padding: 20px;
  cursor: pointer;
  border: 1px solid var(--card-border);
  transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.planet-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--pc1, var(--coral)), var(--pc2, var(--sun)));
  opacity: .28;
  transition: opacity .2s ease;
}
.planet-card:hover { transform: translateY(-5px) scale(1.015); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.planet-card:hover::before { opacity: .38; }
.planet-card.locked { filter: grayscale(.75) brightness(.62); cursor: not-allowed; }
.planet-card.locked:hover { transform: none; }
.planet-card .pc-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; }
.planet-card .pc-emoji {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, .25);
  box-shadow: inset 0 -6px 14px rgba(0, 0, 0, .3);
}
.planet-card .pc-title { font-size: 20px; font-weight: 700; }
.planet-card .pc-sub { font-size: 13px; color: var(--ink2); margin-top: 3px; }
.planet-card .pc-status {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  font-size: 12px; padding: 4px 11px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .2);
}

/* ---------- 英雄卡 ---------- */
.hero-card {
  border-radius: var(--r-lg);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
  animation: popIn .45s cubic-bezier(.2, .9, .3, 1.15);
}
.hero-card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--hc1, var(--coral)), var(--hc2, var(--sun)));
  opacity: .34;
}
.hero-card::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  top: -140px; right: -100px;
}
.hero-card .hc-inner { position: relative; z-index: 1; }
.hero-card h1 { font-size: 40px; font-weight: 700; margin: 6px 0 2px; text-shadow: 0 4px 14px rgba(0,0,0,.3); }
.hero-card .hc-author { font-size: 16px; color: var(--ink2); }

/* ---------- 目标列表 ---------- */
.goal-list { list-style: none; display: grid; gap: 10px; }
.goal-list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px;
  background: rgba(255, 255, 255, .07);
  border-radius: var(--r-md);
  border: 1px solid var(--card-border);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- 生字 ---------- */
.zi {
  color: var(--sun);
  font-weight: 700;
  border-bottom: 2px dashed rgba(255, 209, 102, .65);
  cursor: pointer;
  padding: 0 1px;
  border-radius: 4px;
  transition: background .15s ease;
}
.zi:hover { background: rgba(255, 209, 102, .18); }
.zi.flash { background: rgba(255, 209, 102, .35); animation: pulse-zi .6s ease; }
@keyframes pulse-zi {
  0% { box-shadow: 0 0 0 0 rgba(255, 209, 102, .6); }
  100% { box-shadow: 0 0 0 14px rgba(255, 209, 102, 0); }
}

.zi-card {
  position: fixed;
  z-index: 100;
  min-width: 210px;
  background: #fff;
  color: #2d3250;
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  animation: popIn .25s cubic-bezier(.2, .9, .3, 1.2);
}
.zi-card .zc-char { font-size: 46px; font-weight: 700; color: var(--coral); line-height: 1; font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }
.zi-card .zc-pinyin { font-size: 17px; color: var(--sky); margin-top: 2px; font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }
.zi-card .zc-mean { font-size: 14px; margin-top: 8px; color: #4b5563; }
.zi-card .zc-group { font-size: 13px; margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.zi-card .zc-group span {
  background: #fff1e6; color: #c2571f;
  padding: 3px 10px; border-radius: 999px;
}
.zi-card .zc-head { display: flex; align-items: center; gap: 10px; }

/* 生字表抽屉 */
.drawer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  background: rgba(30, 34, 80, .98);
  border-radius: 28px 28px 0 0;
  padding: 20px 22px 30px;
  box-shadow: 0 -14px 50px rgba(0, 0, 0, .5);
  animation: slideUp .35s cubic-bezier(.2, .9, .3, 1.1);
  max-height: 62vh;
  overflow-y: auto;
}
.drawer .zi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 14px; }
.drawer .zi-tile {
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--card-border);
  border-radius: var(--r-md);
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.drawer .zi-tile:hover { background: rgba(255, 255, 255, .16); transform: translateY(-2px); }
.drawer .zi-tile.active { background: rgba(255, 209, 102, .22); border-color: var(--sun); }
.drawer .zi-tile .zt-char { font-size: 30px; color: var(--sun); font-weight: 700; font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }
.drawer .zi-tile .zt-pinyin { font-size: 13px; color: var(--sky); margin-top: 2px; font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }

/* ---------- 课文阅读 ---------- */
.lesson-text { font-size: 17px; line-height: 2.15; color: var(--ink); font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; letter-spacing: .03em; }
.lesson-text p { margin-bottom: 16px; text-indent: 2em; }
.read-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---------- 概念卡 / 易错卡 ---------- */
.concept-card { margin-bottom: 14px; }
.concept-card .cc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.concept-card .cc-title { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.concept-card .cc-body { font-size: 15px; color: var(--ink2); line-height: 1.85; margin-top: 8px; }
.concept-card .cc-example {
  margin-top: 10px;
  font-size: 14px;
  color: var(--sun);
  background: rgba(255, 209, 102, .1);
  border-left: 3px solid var(--sun);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 9px 13px;
  line-height: 1.7;
}
.ai-panel {
  margin-top: 12px;
  background: rgba(124, 211, 252, .1);
  border: 1px solid rgba(124, 211, 252, .3);
  border-radius: var(--r-md);
  padding: 13px 16px;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink);
  animation: slideUp .3s ease;
}
.ai-panel .ai-tag {
  font-size: 12px;
  color: #083344;
  background: var(--sky);
  border-radius: 999px;
  padding: 2px 10px;
  margin-right: 8px;
}

.pitfall-card {
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 12px;
  background: rgba(255, 107, 107, .08);
  border: 1px solid rgba(255, 107, 107, .3);
}
.pitfall-card .pf-title { font-size: 16px; font-weight: 700; color: #ffd1c2; display: flex; align-items: center; gap: 8px; }
.pitfall-card .pf-detail { font-size: 14.5px; color: var(--ink2); margin-top: 7px; line-height: 1.75; }
.pitfall-card .pf-tip {
  font-size: 14px; margin-top: 9px;
  background: rgba(255, 209, 102, .12);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  color: var(--sun);
  line-height: 1.7;
}

/* ---------- 闯关 ---------- */
.quiz-wrap { max-width: 640px; margin: 0 auto; }
.q-progress { display: flex; gap: 8px; justify-content: center; margin: 6px 0 18px; }
.q-progress .qp {
  width: 13px; height: 13px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  transition: all .25s ease;
}
.q-progress .qp.done { background: linear-gradient(135deg, var(--mint), var(--good)); transform: scale(1.1); }
.q-progress .qp.cur { background: var(--coral); transform: scale(1.45); box-shadow: 0 0 0 5px rgba(255, 138, 92, .2); }

.quiz-card { animation: slideUp .35s ease; }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.quiz-question { font-size: 21px; font-weight: 700; line-height: 1.6; margin-bottom: 20px; }

.quiz-opt {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, .07);
  border: 2px solid var(--card-border);
  border-radius: var(--r-md);
  padding: 15px 18px;
  margin-bottom: 12px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 16.5px;
  color: var(--ink);
  transition: all .16s ease;
}
.quiz-opt:hover:not(:disabled) { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .35); transform: translateX(4px); }
.quiz-opt:disabled { cursor: default; }
.quiz-opt .qo-key {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: all .2s ease;
}
.quiz-opt.correct { background: rgba(52, 211, 153, .16); border-color: var(--good); }
.quiz-opt.correct .qo-key { background: var(--good); color: #064e3b; }
.quiz-opt.wrong { background: rgba(255, 107, 107, .16); border-color: var(--danger); animation: shake .5s ease; }
.quiz-opt.wrong .qo-key { background: var(--danger); color: #fff; }
.quiz-opt.dimmed { opacity: .35; }

.feedback-card { margin-top: 16px; animation: slideUp .35s ease; }
.feedback-card .fb-explain { font-size: 15px; line-height: 1.8; color: var(--ink2); margin-top: 8px; }

/* ---------- 结果页 ---------- */
.score-ring { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .sr-num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 700;
}
.score-ring .sr-num small { font-size: 15px; color: var(--ink3); font-weight: 400; }

.dim-bar-row { margin-bottom: 12px; }
.dim-bar-row .dim-name { font-size: 14px; color: var(--ink2); margin-bottom: 6px; display: flex; justify-content: space-between; }
.dim-bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.dim-bar .dim-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--coral), var(--sun));
  transition: width 1s cubic-bezier(.2, .8, .3, 1);
  width: 0;
}

.mistake-card {
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 107, 107, .35);
  background: rgba(255, 107, 107, .07);
  padding: 15px 17px;
  margin-bottom: 12px;
}
.mistake-card .mk-q { font-size: 15px; font-weight: 600; margin-bottom: 7px; line-height: 1.6; }
.mistake-card .mk-row { font-size: 14px; margin: 4px 0; }
.mistake-card .mk-ans { color: var(--danger); }
.mistake-card .mk-right { color: var(--good); }
.mistake-card .mk-ai {
  margin-top: 10px;
  background: rgba(255, 255, 255, .06);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  font-size: 13.5px;
  color: var(--ink2);
  line-height: 1.75;
}

/* ---------- 报告 ---------- */
.report-section { margin-bottom: 16px; }
.report-section h3 { font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.report-summary { font-size: 16.5px; line-height: 2; }
.report-highlight { display: flex; gap: 9px; padding: 8px 0; color: var(--ink2); font-size: 15px; line-height: 1.6; }
.weak-card {
  border-radius: var(--r-md);
  padding: 13px 16px;
  margin-bottom: 10px;
  background: rgba(255, 107, 107, .08);
  border: 1px solid rgba(255, 107, 107, .3);
}
.weak-card .wk-point { font-weight: 700; color: #ffd1c2; }
.weak-card .wk-why { font-size: 13.5px; color: var(--ink3); margin: 3px 0 6px; }
.weak-card .wk-sug { font-size: 14px; color: var(--ink2); line-height: 1.7; }
.parent-tip {
  display: flex; gap: 10px;
  background: rgba(255, 209, 102, .1);
  border: 1px solid rgba(255, 209, 102, .3);
  border-radius: var(--r-md);
  padding: 12px 15px;
  margin-bottom: 10px;
  font-size: 14.5px;
  color: var(--ink2);
  line-height: 1.75;
}

/* ---------- 成就 ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.badge {
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--card-border);
  padding: 18px 12px;
  text-align: center;
  transition: transform .18s ease;
}
.badge:hover { transform: translateY(-4px); }
.badge .bd-emoji { font-size: 42px; }
.badge .bd-name { font-weight: 700; margin-top: 8px; }
.badge .bd-desc { font-size: 12.5px; color: var(--ink3); margin-top: 4px; line-height: 1.5; }
.badge .bd-date { font-size: 12px; color: var(--good); margin-top: 6px; }
.badge.locked { filter: grayscale(1); opacity: .45; }

/* ---------- 视角切换 ---------- */
.seg { display: inline-flex; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink2);
  border: none;
  background: transparent;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.seg button.on { background: #fff; color: #2d3250; font-weight: 700; box-shadow: var(--shadow-sm); }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 26px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: rgba(30, 34, 80, .96);
  border: 1px solid var(--card-border);
  color: var(--ink);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14.5px;
  box-shadow: var(--shadow);
  animation: slideInRight .35s cubic-bezier(.2, .9, .3, 1.2);
  display: flex; align-items: center; gap: 9px;
  max-width: 340px;
}
.toast.ok { border-color: rgba(52, 211, 153, .5); }
.toast.err { border-color: rgba(255, 107, 107, .55); }
.toast.leaving { animation: slideOutRight .3s ease forwards; }
@keyframes slideInRight { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideOutRight { to { transform: translateX(120%); opacity: 0; } }

/* ---------- Modal ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(10, 12, 32, .68);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .25s ease;
}
.modal-card {
  background: linear-gradient(160deg, #2a2f6b, #1e2250);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  padding: 26px 26px 22px;
  max-width: 520px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  animation: popIn .32s cubic-bezier(.2, .9, .3, 1.18);
}
.modal-card .mc-title { font-size: 20px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- 动效 keyframes ---------- */
@keyframes popIn {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
@keyframes shakeCard {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
@keyframes crystalFly {
  0% { opacity: 0; transform: translateY(24px) scale(.4) rotate(-12deg); }
  60% { opacity: 1; transform: translateY(-8px) scale(1.15) rotate(4deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

/* ---------- 工具类 ---------- */
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; } .mt-28 { margin-top: 28px; }
.mb-14 { margin-bottom: 14px; }
.flex { display: flex; } .flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex-center { display: flex; align-items: center; justify-content: center; gap: 10px; }
.grow { flex: 1; }
.text-2 { color: var(--ink2); }
.text-3 { color: var(--ink3); }
.text-sun { color: var(--sun); }
.text-mint { color: var(--mint); }
.fs-13 { font-size: 13px; } .fs-14 { font-size: 14px; } .fs-15 { font-size: 15px; }
.wrap { flex-wrap: wrap; }

/* ---------- 课文动画 ---------- */
.video-frame { overflow: hidden; }
.vd-lg video { aspect-ratio: 16/9; }
@media (max-width: 768px) {
  .vd-lg video { aspect-ratio: auto; height: 78vh; width: 100%; object-fit: contain; }
}

/* ---------- 背诵卡 ---------- */
.font-kai { font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; letter-spacing: .02em; }
.recall-card { perspective: 1200px; width: 100%; max-width: 680px; min-height: 420px; margin: 0 auto; }
.recall-card .rc-inner { position: relative; width: 100%; min-height: 420px; transform-style: preserve-3d; transition: transform .45s ease; }
.recall-card.flip .rc-inner { transform: rotateY(180deg); }
.rc-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; justify-content: center; }
.rc-front { background: linear-gradient(135deg, #ffd166, #ff8a5c); color: #4a3b1f; }
.rc-back { background: linear-gradient(135deg, #eef2f7, #dde6f0); color: #26303c; transform: rotateY(180deg); }
.rc-text { white-space: normal; text-align: left; font-size: 16.5px; line-height: 2.05; max-height: 300px; overflow-y: auto; margin: 0; }
.rc-back .btn-ghost { color: #26303c; border-color: rgba(38, 48, 60, .35); background: rgba(255, 255, 255, .55); }
.rc-back .btn-ghost:hover { background: rgba(255, 255, 255, .85); }
.rc-back .btn-sky { color: #fff; }
.kw { background: rgba(255, 196, 66, .55); color: #4a2e00; border-radius: 4px; padding: 0 3px; font-weight: 700; }

/* ---------- 思维导图（标准 SVG / markmap） ---------- */
.mm-scroll { overflow: auto; max-height: 72vh; }
.mm-svg { display: block; }
.mm-markmap { background: transparent; }
.mm-markmap .markmap-node text { fill: #f2ead6; font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; font-size: 13px; }
.mm-markmap .markmap-link { stroke: rgba(255, 209, 102, .35); }
.mm-fo { font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; font-size: 14.5px; line-height: 1.7; color: #f2ead6; width: 100%; height: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 14px; border: 1.5px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .07); white-space: pre-wrap; word-break: break-all; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); transition: transform .15s ease, border-color .15s ease; }
.mm-fo:hover { transform: translateY(-2px); border-color: var(--sun); }
.mm-fo-root { font-size: 16px; font-weight: 700; color: #4a3b1f; background: linear-gradient(135deg, #ffd166, #ff8a5c); border: none; text-align: center; cursor: default; }
.mm-group { color: var(--mint); font-weight: 700; background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .4); }
.mm-sec { color: var(--sky); border-color: rgba(125, 211, 252, .4); background: rgba(125, 211, 252, .08); }
.mm-tag { font-style: normal; color: rgba(255, 255, 255, .5); font-size: 12px; margin-left: 6px; font-weight: 400; }
/* ---------- 朗读页：文章框 + 框外批注列 + 现实意义编号 ---------- */
.read-layout { display: flex; gap: 22px; align-items: flex-start; }
.read-card { flex: 1 1 0; min-width: 0; }
.read-notes { width: 330px; flex-shrink: 0; position: relative; }
.para-no { display: inline-block; font-size: 14px; font-weight: 700; color: var(--sun); margin-right: 8px; vertical-align: 1px; font-family: 'KaiTi', 'STKaiti', '楷体', serif; }
.side-card { position: relative; border: 1.5px dashed rgba(255, 209, 102, .5); border-radius: 14px; background: rgba(255, 209, 102, .07); padding: 10px 12px; box-shadow: 0 5px 14px rgba(0, 0, 0, .22); }
.side-card::before { content: ''; position: absolute; left: -22px; top: 16px; width: 20px; border-top: 2px dotted rgba(255, 209, 102, .55); }
.side-card::after { content: ''; position: absolute; left: -7px; top: 12px; width: 10px; height: 10px; background: var(--sun); border: 2px solid var(--bg1); border-radius: 50%; }
.sc-label { font-size: 12px; color: var(--sun); font-weight: 700; margin-bottom: 4px; }
.sc-line { font-size: 13px; line-height: 1.75; color: #e8dfc8; }
.sc-line b { color: var(--sun); }
.pn-guide { margin: 0 0 14px; padding: 10px 14px; background: rgba(125, 211, 252, .07); border-left: 3px solid rgba(125, 211, 252, .6); border-radius: 0 10px 10px 0; font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }
.pn-guide .pn-label { font-size: 12.5px; color: var(--sky); font-weight: 700; margin-bottom: 4px; }
.pn-guide .pn-line { font-size: 14px; line-height: 1.85; color: #e8dfc8; }
.pn-guide .pn-line b { color: var(--sky); }
.sec-ol { margin: 4px 0 0 20px; padding: 0; }
.sec-ol li { font-size: 15px; line-height: 1.9; color: #f2ead6; margin-bottom: 10px; font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }
.sec-ol li b { color: var(--sun); }
@media (max-width: 900px) {
  .read-layout { flex-direction: column; }
  .read-notes { width: 100%; }
  .side-card::before { display: none; }
  .side-card::after { display: none; }
}

/* ---------- 口语表达 · 导师对话 ---------- */
.chat-box { display: flex; flex-direction: column; gap: 14px; padding: 6px 2px; max-height: 52vh; overflow-y: auto; }
.chat-msg { display: flex; gap: 10px; align-items: flex-end; }
.chat-msg.me { flex-direction: row-reverse; }
.chat-avatar { flex-shrink: 0; }
.msg-bubble { max-width: 78%; padding: 11px 15px; border-radius: 16px; font-size: 15px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.ai-bubble { background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 209, 102, .35); border-bottom-left-radius: 4px; color: #f2ead6; }
.me-bubble { background: linear-gradient(135deg, var(--coral), #ff6b6b); color: #fff; border-bottom-right-radius: 4px; }
.me-name { font-size: 11px; color: var(--ink3); align-self: flex-end; }
.chat-input { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(180deg, transparent, var(--bg1) 30%); }
.sp-textarea { width: 100%; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #f5f5f5; padding: 10px 12px; font-size: 15px; line-height: 1.6; resize: vertical; box-sizing: border-box; }
.sp-textarea:focus { outline: none; border-color: var(--sun); }
.sp-review { background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 14px; font-size: 15px; line-height: 1.9; text-align: left; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 教材中心 ---------- */
.unit-badge { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #4a3b1f; background: linear-gradient(135deg, var(--sun), var(--coral)); flex-shrink: 0; }
.unit-locked { opacity: .45; }
.catalog-lesson { flex: 1; min-width: 130px; text-align: center; padding: 14px 10px; border-radius: 14px; border: 1.5px dashed rgba(255, 209, 102, .35); background: rgba(255, 209, 102, .06); cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.catalog-lesson:hover { transform: translateY(-2px); border-color: var(--sun); }
.cl-emoji { font-size: 30px; }
.cl-title { font-size: 14px; margin-top: 4px; color: #f2ead6; }
.cl-sub { font-size: 12px; color: var(--ink3); margin-top: 2px; }

/* ---------- 响应式 ---------- */
@media (max-width: 620px) {
  #app { padding: 12px 12px 80px; }
  .hero-card h1 { font-size: 30px; }
  .quiz-question { font-size: 18px; }
  .step { font-size: 11px; }
}

/* ============================================================
   1年级大字号覆盖层（暖黄草绿 + 24px+ 大字 + 大按钮）
   ============================================================ */
.text-1 { font-size: 30px; font-weight: 700; line-height: 1.5; }
.text-2 { font-size: 24px; font-weight: 700; line-height: 1.5; }
.text-3 { font-size: 19px; line-height: 1.6; }
.text-sun { color: var(--sun); }
.text-leaf { color: var(--mint); }

.btn { font-size: 24px; padding: 14px 30px; border-radius: 999px; min-height: 58px; }
.btn.big { font-size: 27px; padding: 18px 44px; min-height: 66px; }
.btn.small { font-size: 20px; padding: 10px 22px; min-height: 48px; }
.btn.bigger { font-size: 30px; padding: 20px 50px; min-height: 74px; }

.card { border-radius: 28px; }
.bubble { font-size: 23px; line-height: 1.8; border-radius: 26px; }
.bubble .bubble-name { font-size: 16px; }
.chip { font-size: 18px; padding: 9px 20px; }
.chip.big { font-size: 20px; padding: 10px 22px; }
.pill.crystal { font-size: 20px; }

.lesson-text { font-size: 30px; line-height: 2.2; }
.concept-card .cc-title { font-size: 26px; }
.concept-card .cc-body { font-size: 22px; line-height: 1.9; }
.pitfall-card .pf-title { font-size: 24px; }
.pitfall-card .pf-detail { font-size: 21px; line-height: 1.8; }
.pitfall-card .pf-tip { font-size: 19px; }
.quiz-question { font-size: 28px; }
.zi-card .zc-char { font-size: 72px; }
.zi-card .zc-pinyin { font-size: 26px; }
.zi-card .zc-mean { font-size: 22px; }
.zi-card .zc-group span { font-size: 20px; padding: 6px 16px; border-radius: 999px; }
.drawer .zi-tile .zt-char { font-size: 44px; }
.drawer .zi-tile .zt-pinyin { font-size: 20px; }
.topbar .greet { font-size: 20px; }

/* 识字闪卡专用 */
.flashcard {
  perspective: 1200px;
}
.flashcard .fc-inner {
  position: relative; width: 100%; min-height: 380px;
  transition: transform .5s ease;
  transform-style: preserve-3d;
}
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.flashcard .fc-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 32px; padding: 30px;
}
.flashcard .fc-front { background: linear-gradient(145deg, #fff3d1, #ffe29a); }
.flashcard .fc-back { background: linear-gradient(145deg, #e8f5dc, #c9e3ae); transform: rotateY(180deg); }
.fc-char { font-size: 150px; line-height: 1; color: var(--ink); font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }
.fc-pinyin { font-size: 44px; color: var(--sky); margin-top: 10px; }
.fc-mean { font-size: 26px; margin-top: 14px; }
.fc-group { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; }
.fc-group span { font-size: 22px; background: #fff; padding: 8px 20px; border-radius: 999px; box-shadow: var(--shadow-sm); }

/* 识字/拼音大卡网格 */
.zi-grid-big { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
.zi-tile-big { background: #fff; border-radius: 22px; padding: 16px 8px; text-align: center; cursor: pointer; box-shadow: var(--shadow-sm); border: 3px solid transparent; }
.zi-tile-big:hover { border-color: var(--sun); }
.zi-tile-big .zb-char { font-size: 52px; font-weight: 700; font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }
.zi-tile-big .zb-pinyin { font-size: 22px; color: var(--sky); margin-top: 4px; }
.zi-tile-big .zb-mean { font-size: 18px; color: var(--ink2); margin-top: 2px; }

/* 拼音卡 */
.py-card { background: #fff; border-radius: 24px; padding: 18px 12px; text-align: center; cursor: pointer; box-shadow: var(--shadow-sm); border: 3px solid transparent; }
.py-card:hover { border-color: var(--sky); }
.py-card .py-char { font-size: 44px; font-weight: 700; color: var(--sky); }
.py-card .py-name { font-size: 20px; color: var(--ink2); margin-top: 4px; }
.py-card .py-example { font-size: 18px; margin-top: 6px; color: var(--ink3); }
.py-card .py-emoji { font-size: 30px; margin-top: 4px; }

/* 大评分按钮 */
.rate-btn { font-size: 26px; padding: 18px 26px; border-radius: 26px; border: none; cursor: pointer; font-family: var(--font); transition: transform .15s ease, box-shadow .15s ease; }
.rate-btn:hover { transform: translateY(-3px); }
.rate-btn:active { transform: scale(.96); }
.rate-ok { background: linear-gradient(145deg, #a5d6a7, #66bb6a); color: #fff; box-shadow: 0 8px 20px rgba(102, 187, 106, .4); }
.rate-mid { background: linear-gradient(145deg, #ffe082, #ffb703); color: #fff; box-shadow: 0 8px 20px rgba(255, 183, 3, .4); }
.rate-no { background: linear-gradient(145deg, #ffab91, #ff8a5c); color: #fff; box-shadow: 0 8px 20px rgba(255, 138, 92, .4); }

/* 大入口卡 */
.entry-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px 16px; border-radius: 28px; cursor: pointer; background: #fff; box-shadow: var(--shadow); border: 3px solid var(--card-border); transition: transform .18s ease; }
.entry-card:hover { transform: translateY(-5px) scale(1.02); }
.entry-card .ec-emoji { font-size: 56px; }
.entry-card .ec-title { font-size: 26px; font-weight: 700; }

/* 进度条 */
.progress-track { height: 22px; background: #f0e6cf; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--sun), var(--mint)); border-radius: 999px; transition: width .4s ease; }

/* ============================================================
   重构版样式（学习流 / 阅读角 / 图鉴，生图替换 emoji）
   ============================================================ */
.mascot-avatar { width: 60px; height: 60px; border-radius: 22px; object-fit: cover; box-shadow: var(--shadow-sm); }
.topbar .left { display: flex; align-items: center; gap: 10px; }

/* 字卡 */
.flashcard { perspective: 1400px; max-width: 560px; margin: 0 auto; }
.flashcard .fc-inner { position: relative; width: 100%; min-height: 420px; transition: transform .55s ease; transform-style: preserve-3d; }
.flashcard.flipped .fc-inner { transform: rotateY(180deg); }
.flashcard .fc-face { position: absolute; inset: 0; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 34px; padding: 26px; box-shadow: var(--shadow); }
.flashcard .fc-front { background: linear-gradient(160deg, #fff3d1, #ffe29a); }
.flashcard .fc-back { background: linear-gradient(160deg, #e8f5dc, #c9e3ae); transform: rotateY(180deg); }
.fc-char { font-size: 150px; line-height: 1; color: var(--ink); font-family: 'KaiTi', 'STKaiti', '楷体', 'SimSun', serif; }
.fc-pinyin { font-size: 42px; color: var(--sky); margin-top: 8px; }
.fc-group { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.fc-group span { font-size: 24px; background: #fff; padding: 8px 20px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.fc-example { margin-top: 16px; font-size: 22px; color: var(--ink2); text-align: center; line-height: 1.7; background: rgba(255,255,255,.7); padding: 10px 16px; border-radius: 16px; }
.fc-wordimg { width: 150px; height: 150px; border-radius: 24px; object-fit: cover; margin-top: 12px; box-shadow: var(--shadow-sm); }

/* 词语小课堂 */
.word-class-card { padding: 22px; border-radius: 26px; }
.wc-img { width: min(320px, 78vw); aspect-ratio: 1; object-fit: cover; border-radius: 26px; box-shadow: var(--shadow); }
.wc-img-placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(145deg, #fff3d1, #ffe29a); font-size: 60px; font-weight: 700; color: var(--ink); font-family: 'KaiTi','STKaiti','楷体','SimSun',serif; }

/* 阅读 */
.read-card:hover { transform: translateY(-4px); }
.zi-hl { color: var(--coral); font-weight: 700; cursor: pointer; }

/* 图鉴 tabs */
.tabs { display: flex; gap: 10px; }
.tab { flex: 1; padding: 14px; border-radius: 18px; border: 3px solid var(--card-border); background: #fff; font-size: 22px; font-family: var(--font); cursor: pointer; color: var(--ink2); }
.tab.active { background: linear-gradient(145deg, #fff3d1, #ffe29a); border-color: var(--sun); color: var(--ink); font-weight: 700; }

/* 通用 */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex { display: flex; }
.grow { flex: 1; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.mt-20 { margin-top: 20px; }
.mb-14 { margin-bottom: 14px; }
.grid { display: grid; gap: 14px; }

/* 语音按钮（一按开始 · 再按结束） */
.voice-btn {
  width: 132px; height: 132px; border-radius: 50%;
  border: none; cursor: pointer;
  background: linear-gradient(145deg, #fff3d1, #ffe29a);
  box-shadow: var(--shadow);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.voice-btn:hover { transform: scale(1.06); }
.voice-btn:active { transform: scale(.94); }
.voice-btn:disabled { opacity: .7; }
.voice-btn.listening {
  background: linear-gradient(145deg, #e8f5dc, #c9e3ae);
  animation: voice-pulse 1.2s ease-in-out infinite;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(127, 176, 105, .45); }
  50% { box-shadow: 0 0 0 26px rgba(127, 176, 105, 0); }
}
.voice-icon { width: 72px; height: 72px; border-radius: 22px; object-fit: cover; }

/* 字卡背面可点读 */
.fc-word { cursor: pointer; transition: transform .12s ease; }
.fc-word:hover { transform: translateY(-2px); background: #fff7e0; }
.fc-word:active { transform: scale(.94); }
.fc-example { cursor: pointer; }
.fc-example:hover { background: #fff; }

/* AI 对话界面（词语小课堂 · 豆包式） */
.talk-box {
  height: 62vh; min-height: 380px; max-height: 720px; overflow-y: auto; padding: 14px;
  background: #fdf6e3; border-radius: 22px; margin-top: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.talk-bubble { display: flex; gap: 10px; align-items: flex-end; max-width: 88%; }
.talk-bubble.assistant { align-self: flex-start; }
.talk-bubble.user { align-self: flex-end; justify-content: flex-end; }
.talk-text {
  background: #fff; padding: 12px 16px; border-radius: 18px;
  font-size: 21px; line-height: 1.7; box-shadow: var(--shadow-sm);
}
.talk-bubble.user .talk-text {
  background: linear-gradient(145deg, #fff3d1, #ffe29a);
  border-bottom-right-radius: 4px;
}
.talk-bubble.assistant .talk-text { border-bottom-left-radius: 4px; }
.talk-input { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; max-width: 100%; }
.talk-input input {
  flex: 1 1 100%; min-width: 0; width: 100%; box-sizing: border-box; font-size: 21px; padding: 12px 16px; border-radius: 16px;
  border: 3px solid var(--card-border); font-family: var(--font); outline: none;
}
.talk-input input:focus { border-color: var(--sun); }
.talk-input .talk-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; max-width: 100%; }

/* 对话输入区麦克风（小尺寸） */
.talk-input .voice-btn { width: 64px; height: 64px; flex-shrink: 0; }
.talk-input .voice-icon { width: 36px; height: 36px; border-radius: 12px; }
.talk-input .voice-btn.listening { animation: voice-pulse 1.2s ease-in-out infinite; }

/* ============================================================
   首页三入口大卡片（左插画 + 右文字）
   ============================================================ */
.hub-card {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid var(--card-border);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hub-card:hover { transform: translateY(-5px) scale(1.01); box-shadow: 0 14px 30px rgba(180, 140, 60, .28); border-color: rgba(180, 140, 60, .4); }
.hub-card:active { transform: scale(.98); }
.hub-card .hub-img { width: 42%; min-width: 132px; background: linear-gradient(160deg, #fff3d6, #eaf6dc); }
.hub-card .hub-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-card .hub-body { flex: 1; padding: 24px 20px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.hub-card .hub-title { font-size: 30px; font-weight: 800; color: var(--ink); }
.hub-card .hub-sub { font-size: 17px; color: var(--ink2); line-height: 1.55; }
.hub-card .hub-sub b { color: var(--leaf); }
.hub-card .hub-sub b.sun { color: var(--sun); }
@media (max-width: 480px) {
  .hub-card { flex-direction: column; }
  .hub-card .hub-img { width: 100%; height: 150px; min-width: 0; }
  .hub-card .hub-body { padding: 18px 20px; }
}

/* ============================================================
   手机端适配层（≤480px：整体字号降档、间距收紧，适配手机窗口）
   ============================================================ */
@media (max-width: 480px) {
  #app { padding: 10px 10px 70px; }
  .text-1 { font-size: 24px; }
  .text-2 { font-size: 20px; }
  .text-3 { font-size: 16px; }
  .topbar { padding-right: 96px; }
  .topbar .greet { font-size: 17px; }
  .btn { font-size: 20px; padding: 12px 26px; min-height: 50px; }
  .btn.big { font-size: 22px; padding: 14px 34px; min-height: 58px; }
  .btn.small { font-size: 18px; padding: 8px 18px; min-height: 44px; }
  .btn.bigger { font-size: 24px; padding: 16px 40px; min-height: 64px; }
  .bubble { font-size: 19px; line-height: 1.7; border-radius: 22px; }
  .chip { font-size: 16px; padding: 7px 16px; }
  .chip.big { font-size: 17px; padding: 8px 18px; }
  .pill.crystal { font-size: 17px; }
  .fc-char { font-size: 92px; }
  .fc-pinyin { font-size: 32px; }
  .fc-group span { font-size: 19px; padding: 6px 16px; }
  .fc-example { font-size: 18px; padding: 8px 12px; }
  .fc-wordimg { max-width: 62vw; max-height: 130px; }
  .zi-tile-big .zb-char { font-size: 40px; }
  .zi-tile-big .zb-pinyin { font-size: 17px; }
  .lesson-text { font-size: 23px; line-height: 2; }
  .concept-card .cc-title { font-size: 22px; }
  .concept-card .cc-body { font-size: 19px; }
  .pitfall-card .pf-title { font-size: 20px; }
  .pitfall-card .pf-detail { font-size: 18px; }
  .quiz-question { font-size: 23px; }
  .talk-text { font-size: 18px; padding: 10px 14px; }
  .talk-input input { font-size: 18px; padding: 10px 14px; }
  .talk-input .voice-btn { width: 50px; height: 50px; }
  .talk-input .voice-icon { width: 28px; height: 28px; }
  .talk-actions .btn { font-size: 17px; padding: 9px 16px; min-height: 44px; }
  .wc-img { width: min(250px, 70vw); border-radius: 20px; }
  .hub-card .hub-title { font-size: 24px; }
  .hub-card .hub-sub { font-size: 15px; }
  .card { border-radius: 22px; }
  .entry-card .ec-title { font-size: 22px; }
}

/* ============================================================
   闪卡页专用：卡片/按钮缩小，整体控制在一个手机屏幕内
   （root 带 .fc-page 时生效，由 home.js renderCard 控制）
   ============================================================ */
.fc-page .topbar { padding: 4px 0 0; }
.fc-page .mascot-avatar { width: 40px; height: 40px; border-radius: 14px; }
.fc-page .topbar .text-2 { font-size: 18px !important; }
.fc-page .topbar .text-3 { font-size: 13px !important; }
.fc-page .pill { font-size: 13px; padding: 3px 10px; }
.fc-page .btn.small { font-size: 13px; padding: 5px 12px; min-height: 30px; }
.fc-page .progress-track { height: 12px; }
.fc-page .flashcard .fc-inner { min-height: 250px; }
.fc-page .flashcard .fc-face { border-radius: 24px; padding: 12px 14px; }
.fc-page .fc-front .fc-char { font-size: 104px; }
.fc-page .fc-back .fc-char { font-size: 64px; }
.fc-page .fc-pinyin { font-size: 22px; margin-top: 4px; }
.fc-page .fc-group { gap: 8px; margin-top: 8px; }
.fc-page .fc-group span { font-size: 16px; padding: 4px 12px; }
.fc-page .fc-example { margin-top: 8px; font-size: 15px; padding: 6px 12px; line-height: 1.5; }
.fc-page .fc-wordimg { width: 96px; height: 96px; margin-top: 6px; border-radius: 16px; }
.fc-page .fc-front .text-3 { font-size: 12px; margin-top: 6px; }
.fc-page .rate-btn { font-size: 17px; padding: 10px 18px; border-radius: 18px; }
.fc-page .fc-say-wrap { margin-top: 8px; }
.fc-page .fc-back .btn { margin-top: 6px; font-size: 14px; padding: 6px 14px; min-height: 30px; }
.fc-page .mt-8 { margin-top: 8px; }
.fc-page .mt-12 { margin-top: 12px; }
