:root {
  --bg: #FFF9F2;
  --card: #FFFFFF;
  --ink: #2A2118;
  --ink-2: #8A7F73;
  --ink-3: #B9AFA3;
  --line: #EFE6DA;
  --orange: #FF6B35;
  --orange-soft: #FFEDE4;
  --teal: #17A398;
  --teal-soft: #E3F6F4;
  --gold: #FFB703;
  --gold-soft: #FFF4D9;
  --violet: #7B61FF;
  --violet-soft: #EFEBFF;
  --red: #E5484D;
  --green: #1FA971;
  --radius: 22px;
  --shadow: 0 2px 4px rgba(42, 33, 24, .04), 0 8px 24px rgba(42, 33, 24, .06);
  --shadow-lg: 0 4px 8px rgba(42, 33, 24, .05), 0 16px 48px rgba(42, 33, 24, .10);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  display: flex; flex-direction: column;
  height: 100dvh;
  padding-bottom: calc(74px + var(--safe-b));
}

button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
button:disabled { cursor: default; }

/* ---------- 顶部栏 ---------- */
.topbar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) 24px 8px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(145deg, #FF9A5B, var(--orange));
  display: grid; place-items: center; font-size: 20px;
  box-shadow: 0 4px 12px rgba(255, 107, 53, .28);
}
.brand-name { font-size: 19px; font-weight: 600; letter-spacing: .3px; }
.streak {
  display: flex; align-items: center; gap: 6px;
  background: var(--gold-soft); color: #9A6B00;
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600;
}

/* ---------- 主区域 ---------- */
.screen {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 24px 24px;
  display: none;
}
.screen.active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen-head { margin: 10px 0 18px; }
.screen-head h1 { font-size: 27px; font-weight: 600; margin: 0 0 6px; letter-spacing: -.3px; }
.screen-head p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.5; }

/* ---------- 今日任务 ---------- */
.hero {
  background: var(--card); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-main { flex: 1 1 auto; min-width: 0; }
.hero h2 { font-size: 15px; font-weight: 500; color: var(--ink-2); margin: 0 0 6px; }
.hero .big-num { font-size: 44px; font-weight: 600; line-height: 1.1; letter-spacing: -1px; }
.hero .big-num small { font-size: 17px; font-weight: 500; color: var(--ink-2); margin-left: 6px; }
.hero-sub { font-size: 14px; color: var(--ink-2); margin-top: 8px; }

.ring { position: relative; width: 92px; height: 92px; flex: 0 0 auto; }
.ring svg { transform: rotate(-90deg); }
.ring-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 17px; font-weight: 600;
}

/* ---------- 卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 14px; }
.tile {
  background: var(--card); border-radius: 18px; padding: 20px;
  box-shadow: var(--shadow); text-align: left;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .16s ease, box-shadow .16s ease;
  border: 1.5px solid transparent;
}
.tile:active { transform: scale(.975); }
.tile-ico {
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center; font-size: 22px;
}
.tile-t { font-size: 16px; font-weight: 600; }
.tile-d { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.tile .badge {
  align-self: flex-start; font-size: 12px; font-weight: 600;
  padding: 4px 9px; border-radius: 999px; margin-top: 2px;
}

.ico-orange { background: var(--orange-soft); }
.ico-teal { background: var(--teal-soft); }
.ico-gold { background: var(--gold-soft); }
.ico-violet { background: var(--violet-soft); }
.bg-orange { background: var(--orange-soft); color: #C2481A; }
.bg-teal { background: var(--teal-soft); color: #0E7C73; }
.bg-gold { background: var(--gold-soft); color: #9A6B00; }
.bg-violet { background: var(--violet-soft); color: #5A43D6; }

/* ---------- 主按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 28px;
  border-radius: 16px; font-size: 17px; font-weight: 600;
  background: var(--orange); color: #fff;
  box-shadow: 0 6px 18px rgba(255, 107, 53, .30);
  transition: transform .16s ease, opacity .16s ease;
  width: 100%;
}
.btn:active { transform: scale(.98); }
.btn.ghost {
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); border: 1.5px solid var(--line);
}
.btn.soft { background: var(--orange-soft); color: #C2481A; box-shadow: none; }
.btn.mint { background: var(--teal); box-shadow: 0 6px 18px rgba(23, 163, 152, .28); }
.btn:disabled { opacity: .45; box-shadow: none; }

/* ---------- 背单词卡 ---------- */
.study-wrap { max-width: 620px; margin: 0 auto; }
.progress-line {
  height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 20px;
}
.progress-line > i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FFA45B, var(--orange));
  transition: width .3s ease;
}
.word-card {
  background: var(--card); border-radius: 26px; padding: 40px 28px 32px;
  box-shadow: var(--shadow-lg); text-align: center; min-height: 340px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.word-emoji { font-size: 76px; line-height: 1; margin-bottom: 18px; }
.word-en { font-size: 54px; font-weight: 600; letter-spacing: -1px; line-height: 1.1; word-break: break-word; }
.word-zh { font-size: 26px; font-weight: 500; color: var(--ink-2); margin-top: 12px; }
.word-hint { font-size: 14px; color: var(--ink-3); margin-top: 18px; }
.word-tag {
  position: absolute; top: 18px; left: 20px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--bg); padding: 5px 11px; border-radius: 999px;
}
.speak-btn {
  margin-top: 20px; width: 62px; height: 62px; border-radius: 50%;
  background: var(--teal-soft); color: #0E7C73; font-size: 26px;
  display: grid; place-items: center;
  transition: transform .16s ease;
}
.speak-btn:active { transform: scale(.92); }

.rate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.rate-row.three { grid-template-columns: repeat(3, 1fr); }
.rate {
  min-height: 76px; border-radius: 18px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  font-size: 16px; font-weight: 600; border: 1.5px solid var(--line); background: var(--card);
  transition: transform .16s ease;
}
.rate:active { transform: scale(.97); }
.rate small { font-size: 11px; font-weight: 500; color: var(--ink-3); letter-spacing: .2px; }
.rate.forgot { background: #FFF1F1; border-color: #FFD5D6; color: var(--red); }
.rate.vague { background: var(--gold-soft); border-color: #FFE6AE; color: #9A6B00; }
.rate.know { background: var(--teal-soft); border-color: #BFE9E5; color: #0E7C73; }

/* ---------- 刷题 ---------- */
.q-card {
  background: var(--card); border-radius: 24px; padding: 32px 26px;
  box-shadow: var(--shadow); max-width: 620px; margin: 0 auto;
}
.q-text { font-size: 27px; font-weight: 600; line-height: 1.45; text-align: center; }
.q-sub { font-size: 15px; color: var(--ink-2); text-align: center; margin-top: 10px; }
.options { display: grid; gap: 11px; margin-top: 26px; }
.opt {
  min-height: 62px; border-radius: 16px; border: 1.5px solid var(--line);
  background: var(--card); font-size: 18px; font-weight: 500;
  display: flex; align-items: center; padding: 14px 20px; gap: 12px;
  text-align: left; transition: transform .14s ease, border-color .14s ease;
}
.opt:active { transform: scale(.99); }
.opt .key {
  width: 26px; height: 26px; border-radius: 8px; background: var(--bg);
  display: grid; place-items: center; font-size: 13px; color: var(--ink-2); flex: 0 0 auto;
}
.opt.right { border-color: var(--green); background: #EDFBF4; color: #0F7A50; }
.opt.wrong { border-color: var(--red); background: #FFF1F1; color: #B3272B; }
.opt.reveal { border-color: var(--green); background: #EDFBF4; }

.q-feedback {
  margin-top: 18px; padding: 16px 18px; border-radius: 16px;
  font-size: 15px; line-height: 1.6; display: none;
}
.q-feedback.show { display: block; }
.q-feedback.ok { background: #EDFBF4; color: #0F7A50; }
.q-feedback.no { background: #FFF1F1; color: #B3272B; }
.q-feedback b { font-weight: 600; }

.math-input {
  width: 100%; min-height: 72px; border-radius: 18px; border: 1.5px solid var(--line);
  background: var(--bg); font-size: 32px; font-weight: 600; text-align: center;
  color: var(--ink); outline: none; margin-top: 24px;
  font-family: inherit;
}
.math-input:focus { border-color: var(--orange); background: #fff; }

/* ---------- 家长端 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--card); border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 30px; font-weight: 600; letter-spacing: -.5px; }
.stat span { font-size: 13px; color: var(--ink-2); }
.stat.good b { color: var(--green); }
.stat.warn b { color: var(--orange); }

.panel {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.panel h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.panel .cap { font-size: 13px; color: var(--ink-2); margin: 0 0 16px; }

.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.heat-cell {
  aspect-ratio: 1; border-radius: 7px; background: #F5EFE7;
  display: grid; place-items: center; font-size: 11px; color: var(--ink-3);
}
.heat-cell.l1 { background: #FFE0CF; color: #C2481A; }
.heat-cell.l2 { background: #FFB98F; color: #8A3E14; }
.heat-cell.l3 { background: var(--orange); color: #fff; }

.wrong-list { display: flex; flex-direction: column; gap: 2px; }
.wrong-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 15px;
}
.wrong-item:last-child { border-bottom: none; }
.wrong-item .we { font-weight: 600; min-width: 108px; }
.wrong-item .wz { color: var(--ink-2); flex: 1 1 auto; }
.wrong-item .wc {
  font-size: 12px; font-weight: 600; color: var(--red);
  background: #FFF1F1; padding: 3px 9px; border-radius: 999px;
}

.empty { text-align: center; padding: 32px 16px; color: var(--ink-3); font-size: 14px; line-height: 1.6; }

/* ---------- PIN 门 ---------- */
.gate {
  max-width: 320px; margin: 40px auto; text-align: center;
}
.gate-ico { font-size: 44px; margin-bottom: 14px; }
.gate h2 { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.gate p { font-size: 14px; color: var(--ink-2); margin: 0 0 24px; line-height: 1.5; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin-bottom: 26px; }
.pin-dot {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--line); transition: background .16s ease, transform .16s ease;
}
.pin-dot.on { background: var(--orange); transform: scale(1.15); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button {
  height: 62px; border-radius: 16px; background: var(--card);
  font-size: 23px; font-weight: 500; box-shadow: var(--shadow);
  transition: transform .14s ease;
}
.keypad button:active { transform: scale(.95); }
.keypad button.fn { font-size: 16px; color: var(--ink-2); background: transparent; box-shadow: none; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 6px;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: rgba(255, 249, 242, .92);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(239, 230, 218, .8);
  z-index: 50;
}
.tab {
  flex: 1 1 0; max-width: 150px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border-radius: 14px;
  font-size: 11px; font-weight: 500; color: var(--ink-3);
  transition: color .16s ease, background .16s ease;
}
.tab-i { font-size: 21px; line-height: 1; filter: grayscale(1) opacity(.55); transition: filter .16s ease; }
.tab.on { color: var(--orange); background: var(--orange-soft); }
.tab.on .tab-i { filter: none; }

/* ---------- 完成页 ---------- */
.done-wrap { max-width: 480px; margin: 20px auto; text-align: center; }
.done-emoji { font-size: 84px; margin-bottom: 8px; }
.done-wrap h2 { font-size: 26px; font-weight: 600; margin: 0 0 10px; }
.done-wrap p { font-size: 16px; color: var(--ink-2); margin: 0 0 28px; line-height: 1.6; }
.done-stats { display: flex; justify-content: center; gap: 12px; margin-bottom: 28px; flex-wrap: wrap; }
.done-stat { background: var(--card); border-radius: 16px; padding: 16px 22px; box-shadow: var(--shadow); min-width: 96px; }
.done-stat b { display: block; font-size: 24px; font-weight: 600; }
.done-stat span { font-size: 12px; color: var(--ink-2); }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b));
  transform: translate(-50%, 20px); opacity: 0;
  background: rgba(42, 33, 24, .93); color: #fff;
  padding: 13px 22px; border-radius: 14px; font-size: 15px; font-weight: 500;
  pointer-events: none; transition: all .26s cubic-bezier(.2, .9, .3, 1);
  z-index: 100; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 设置项 ---------- */
.setting {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.setting:last-child { border-bottom: none; }
.setting .sl { font-size: 15px; font-weight: 500; }
.setting .sd { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.4; }
.stepper { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.stepper button { width: 42px; height: 42px; font-size: 19px; color: var(--ink-2); }
.stepper span { min-width: 44px; text-align: center; font-size: 16px; font-weight: 600; }

/* 平板与横屏优化 */
@media (min-width: 820px) {
  .screen { padding: 8px 40px 32px; }
  .topbar { padding-left: 40px; padding-right: 40px; }
  .word-en { font-size: 64px; }
  .q-text { font-size: 31px; }
  body { padding-bottom: calc(84px + var(--safe-b)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ==========================================================
   科目与导航
   ========================================================== */

.back-bar { padding: 14px 0 0; }
.back-bar button {
  font-size: 15px; color: var(--ink-2); font-weight: 500;
  padding: 8px 2px; min-height: 40px;
}

.subj-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.subj-card {
  text-align: left; border-radius: 20px; padding: 20px 22px;
  background: var(--card); box-shadow: var(--shadow);
  border-left: 5px solid var(--line);
  transition: transform .16s ease;
}
.subj-card:active { transform: scale(.985); }
.subj-en { border-left-color: var(--teal); }
.subj-cn { border-left-color: var(--orange); }
.subj-ma { border-left-color: var(--gold); }

.subj-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.subj-ico { font-size: 24px; line-height: 1; }
.subj-tag {
  font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  background: var(--bg); padding: 4px 9px; border-radius: 999px;
}
.subj-name { font-size: 22px; font-weight: 600; letter-spacing: -.3px; margin-bottom: 4px; }
.subj-desc { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.subj-foot {
  font-size: 13px; font-weight: 600; color: var(--orange);
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
}

.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick {
  background: var(--card); border-radius: 16px; padding: 14px 10px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  align-items: center; gap: 4px; text-align: center;
}
.quick:active { transform: scale(.97); }
.q-ico { font-size: 20px; }
.q-t { font-size: 13.5px; font-weight: 600; }
.q-s { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 筛选 chips ---------- */
.chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--card); color: var(--ink-2); box-shadow: var(--shadow);
  min-height: 38px;
}
.chip.on { background: var(--orange); color: #fff; box-shadow: 0 4px 14px rgba(255, 107, 53, .28); }

.start-banner {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #FF8A5B, var(--orange));
  color: #fff; border-radius: 18px; padding: 18px 22px; margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(255, 107, 53, .26);
  text-align: left;
}
.start-banner:active { transform: scale(.985); }
.sb-t { font-size: 16px; font-weight: 600; }
.sb-s { font-size: 12.5px; opacity: .88; margin-top: 3px; }
.sb-arrow { font-size: 20px; }

/* ---------- 主题卡 ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 11px; }
.topic-card {
  background: var(--card); border-radius: 16px; padding: 16px 12px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
  align-items: center; gap: 6px; text-align: center;
}
.topic-card:active { transform: scale(.96); }
.tc-emoji { font-size: 26px; line-height: 1; }
.tc-name { font-size: 14px; font-weight: 600; }
.tc-count { font-size: 11.5px; color: var(--ink-3); }

/* ---------- 单词表 ---------- */
.word-list { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.word-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.word-row:last-child { border-bottom: none; }
.wr-emoji { font-size: 24px; width: 32px; text-align: center; flex: 0 0 auto; }
.wr-main { flex: 1 1 auto; min-width: 0; }
.wr-en { font-size: 16px; font-weight: 600; }
.wr-zh { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.wr-lv {
  font-size: 11px; font-weight: 600; color: var(--ink-3);
  background: var(--bg); padding: 4px 9px; border-radius: 999px; flex: 0 0 auto;
}
.wr-lv.mid { background: var(--gold-soft); color: #9A6B00; }
.wr-lv.max { background: var(--teal-soft); color: #0E7C73; }
.wr-speak {
  width: 40px; height: 40px; border-radius: 50%; background: var(--teal-soft);
  font-size: 17px; flex: 0 0 auto; display: grid; place-items: center;
}
.wr-speak:active { transform: scale(.9); }

/* ---------- 拼音 ---------- */
.pinyin-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.py-cell {
  min-width: 44px; text-align: center; padding: 9px 8px;
  background: var(--bg); border-radius: 10px;
  font-size: 15px; font-weight: 500; font-family: var(--font-mono, ui-monospace, monospace);
}
.py-cell.hl { background: var(--orange-soft); color: #C2481A; font-weight: 600; }

.py-table { display: flex; flex-direction: column; }
.py-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.py-row:last-child { border-bottom: none; }
.py-word { font-size: 16px; font-weight: 600; min-width: 76px; }
.py-py { font-size: 13.5px; color: var(--ink-2); flex: 1 1 auto; }
.py-book { font-size: 11px; color: var(--ink-3); }

/* ---------- 量词 / 配对 ---------- */
.measure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.measure-item {
  background: var(--bg); border-radius: 10px; padding: 10px 12px;
  font-size: 14px; color: var(--ink-2);
}
.measure-item b { color: var(--orange); margin-right: 2px; }

.pair-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pair {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--bg); border-radius: 10px; padding: 10px;
  font-size: 14.5px; font-weight: 500;
}
.pair i { color: var(--ink-3); font-style: normal; font-size: 13px; }

/* ---------- 成语 ---------- */
.idiom-item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.idiom-item:last-child { border-bottom: none; }
.idiom-w { font-size: 16.5px; font-weight: 600; letter-spacing: 1px; }
.idiom-m { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; line-height: 1.6; }
.idiom-u { font-size: 13px; color: var(--teal); margin-top: 5px; line-height: 1.6; }

/* ---------- 词片 ---------- */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.word-chip {
  background: var(--bg); border-radius: 9px; padding: 7px 12px;
  font-size: 14px; color: var(--ink);
}
.phrase-group { margin-bottom: 16px; }
.phrase-group:last-child { margin-bottom: 0; }
.phrase-theme { font-size: 13px; font-weight: 600; color: var(--orange); margin-bottom: 8px; }

/* ---------- 古诗 ---------- */
.poem-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.poem-head h3 { margin: 0; }
.poem-meta { font-size: 12px; color: var(--ink-3); }
.poem-body {
  margin-top: 14px; font-size: 16.5px; line-height: 2;
  font-family: var(--font-serif, "Songti SC", "STSong", serif);
  letter-spacing: .5px;
}
.poem-note {
  margin-top: 14px; padding: 12px 14px; background: var(--gold-soft);
  border-radius: 10px; font-size: 13px; color: #6B4A00; line-height: 1.65;
}

/* ---------- 好句 ---------- */
.sent-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.sent-item:last-child { border-bottom: none; }
.sent-text {
  font-size: 15.5px; line-height: 1.75;
  font-family: var(--font-serif, "Songti SC", "STSong", serif);
}
.sent-meta { display: flex; gap: 7px; margin: 7px 0; }
.sent-skill {
  font-size: 11px; font-weight: 600; color: #5A43D6;
  background: var(--violet-soft); padding: 3px 8px; border-radius: 999px;
}
.sent-theme { font-size: 11px; color: var(--ink-3); padding: 3px 0; }
.sent-tip { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }

.skill-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.skill-item:last-child { border-bottom: none; }
.skill-name { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.skill-what { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }
.skill-eg { font-size: 13.5px; color: var(--ink); margin-top: 7px; line-height: 1.65; }
.skill-warn {
  font-size: 12.5px; color: #9A6B00; background: var(--gold-soft);
  padding: 8px 11px; border-radius: 9px; margin-top: 9px; line-height: 1.6;
}

/* ---------- 数学知识点 ---------- */
.kp-list { display: flex; flex-direction: column; }
.kp-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; text-align: left; width: 100%;
}
.kp-item:last-child { border-bottom: none; }
.kp-name { font-weight: 500; }
.kp-arrow { color: var(--ink-3); font-size: 18px; }

.book-tag {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  color: #0E7C73; background: var(--teal-soft);
  padding: 4px 10px; border-radius: 999px;
}

.tip-line { font-size: 14px; line-height: 1.85; color: var(--ink); }
.tip-line + .tip-line { margin-top: 4px; }

.eg-item { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.eg-item:last-child { border-bottom: none; }
.eg-q { font-size: 16px; font-weight: 600; }
.eg-a { font-size: 13.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.65; }

.warn-panel { background: var(--gold-soft); box-shadow: none; }
.warn-panel h3 { color: #6B4A00; }
.warn-panel .tip-line { color: #6B4A00; font-size: 13.5px; }

.drill-btns { display: flex; flex-direction: column; gap: 10px; }

/* ---------- 专项列表 ---------- */
.drill-list { display: flex; flex-direction: column; gap: 9px; }
.drill-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--card); border-radius: 15px; padding: 16px 18px;
  box-shadow: var(--shadow); text-align: left; width: 100%;
}
.drill-item:active { transform: scale(.985); }
.di-n { font-size: 15.5px; font-weight: 600; }
.di-d { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.di-arrow { color: var(--ink-3); font-size: 17px; }

/* ---------- 答题 ---------- */
.q-top { display: flex; align-items: center; gap: 14px; margin: 12px 0 16px; }
.q-quit { font-size: 15px; color: var(--ink-2); padding: 8px 4px; min-height: 40px; }
.q-counter { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.q-tag {
  position: absolute; top: 16px; left: 18px;
  font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  background: var(--bg); padding: 4px 10px; border-radius: 999px;
}
.q-emoji { text-align: center; font-size: 48px; line-height: 1; margin-bottom: 12px; }
.q-card { position: relative; }

.subj-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.subj-stat:last-child { border-bottom: none; }
.ss-name { font-weight: 500; min-width: 56px; }
.ss-total { color: var(--ink-2); flex: 1 1 auto; font-size: 13px; }
.ss-acc { font-weight: 600; color: var(--ink-2); }
.ss-acc.good { color: var(--green); }

.btn-sm {
  width: auto; min-height: 42px; padding: 0 16px;
  font-size: 14px; border-radius: 12px; flex: 0 0 auto;
}

@media (min-width: 820px) {
  .subj-grid { grid-template-columns: repeat(3, 1fr); }
  .subj-desc { min-height: 40px; }
  .quick-row { gap: 14px; }
  .drill-list { display: grid; grid-template-columns: 1fr 1fr; }
}


/* ==========================================================
   v2.2 新增：英语模块入口 / 字母表 / 拼读 / 多音字 / 形近字 / 部首
   ========================================================== */

.mod-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin: 4px 0 18px;
}
.mod-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 14px 12px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); text-align: left; cursor: pointer;
  font-family: inherit; box-shadow: var(--shadow);
}
.mod-card:active { transform: scale(.98); }
.mc-ico { font-size: 20px; }
.mc-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.mc-sub { font-size: 11.5px; color: var(--ink-3); }

/* 字母表 */
.letter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.letter-cell {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 6px; border-radius: 14px; background: var(--bg);
}
.lc-pair { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: 1px; }
.lc-pair span { color: var(--orange); font-weight: 600; margin-left: 2px; }
.lc-ipa { font-size: 11.5px; color: var(--ink-3); }
.lc-word {
  margin-top: 4px; border: none; background: var(--orange-soft); color: var(--ink);
  font-size: 11.5px; padding: 4px 8px; border-radius: 8px; cursor: pointer; font-family: inherit;
}
.lc-zh { font-size: 11px; color: var(--ink-2); }

/* 自然拼读 */
.ph-key {
  font-size: 26px; font-weight: 700; color: var(--orange);
  border-bottom: 3px solid var(--orange-soft); padding: 0 4px;
}
.ph-ipa { font-size: 14px; color: var(--ink-2); }

/* 多音字 */
.read-row { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.read-py {
  font-size: 15px; font-weight: 600; color: var(--orange);
  background: var(--orange-soft); padding: 3px 10px; border-radius: 8px;
}
.read-eg { font-size: 14.5px; color: var(--ink); }
.read-tip { font-size: 12.5px; color: var(--ink-3); margin: 3px 0 0 2px; }

/* 形近字 */
.sim-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sim-item:last-child { border-bottom: none; }
.sim-chars { display: flex; align-items: center; gap: 10px; }
.sim-chars b { font-size: 22px; color: var(--ink); }
.sim-chars i { font-size: 11px; color: var(--ink-3); font-style: normal; }
.sim-eg { font-size: 14px; color: var(--ink); margin-top: 4px; }
.sim-tip { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* 部首 */
.rad-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rad-item:last-child { border-bottom: none; }
.rad-char {
  flex: 0 0 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--orange);
  background: var(--orange-soft); border-radius: 12px;
}
.rad-main { flex: 1 1 auto; min-width: 0; }
.rad-name { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.rad-mean { font-weight: 400; font-size: 12.5px; color: var(--ink-2); margin-left: 8px; }
.rad-eg { font-size: 13px; color: var(--ink-2); margin-top: 2px; }

@media (min-width: 820px) {
  .letter-grid { grid-template-columns: repeat(5, 1fr); }
  .mod-row { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

/* ==========================================================
   v2.3 卡通化 + 单词卡片 + 数学年级分组
   ========================================================== */

:root { --radius: 26px; --pink: #FF8FA3; --sky: #4CC9F0; }

/* 面板更圆更厚，标题前加彩色圆点 */
.panel {
  border: 2px solid #FFF1E6;
  border-radius: 24px;
  box-shadow: 0 3px 0 #FFF1E6, var(--shadow);
}
.panel h3 {
  font-size: 16.5px; display: flex; align-items: center; gap: 8px;
}
.panel h3::before {
  content: ''; width: 9px; height: 9px; border-radius: 50%;
  background: var(--orange); flex: 0 0 auto;
}

/* 立体按钮：按下去真的会“陷”一下 */
.btn {
  border-radius: 20px; font-weight: 700;
  box-shadow: 0 5px 0 #DA4A17, 0 10px 22px rgba(255, 107, 53, .22);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #DA4A17; }
.btn.soft {
  box-shadow: 0 4px 0 #EEE2D4, 0 6px 14px rgba(42, 33, 24, .05);
}
.btn.soft:active { transform: translateY(3px); box-shadow: 0 1px 0 #EEE2D4; }

/* 底部导航：圆角浮起 + 选中态糖果色 */
.tabbar {
  border-top: none; border-radius: 26px 26px 0 0;
  box-shadow: 0 -6px 24px rgba(42, 33, 24, .07);
}
.tab.on {
  background: linear-gradient(180deg, #FFF1E6, #FFE1CE);
  color: #D95315;
}
.tab.on .tab-i { filter: none; transform: translateY(-1px) scale(1.08); }
.tab-i { transition: filter .16s ease, transform .16s ease; }

/* 主题卡：厚描边 + 轻微歪一点，手感更玩具 */
.topic-card {
  border: 2px solid #FFF1E6; border-radius: 20px;
  box-shadow: 0 3px 0 #FFF1E6, var(--shadow);
  transition: transform .14s ease;
}
.topic-card:active { transform: scale(.95) rotate(-1.2deg); }
.tc-emoji { font-size: 28px; animation: bob 3.2s ease-in-out infinite; }

/* 选项按钮同样立体 */
.opt { border-width: 2px; border-radius: 18px; }
.opt:active { transform: scale(.985) translateY(1px); }

/* ---------- 单词卡片 ---------- */

.card-banner {
  background: linear-gradient(135deg, #7B61FF, #4CC9F0) !important;
  box-shadow: 0 8px 22px rgba(91, 108, 240, .28) !important;
}
.card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin: 8px 2px 10px;
}
.card-topic { font-size: 15.5px; font-weight: 700; }
.card-prog {
  font-size: 12.5px; color: var(--ink-2); background: var(--card);
  padding: 4px 12px; border-radius: 999px; box-shadow: var(--shadow);
}
.bar {
  height: 10px; border-radius: 999px; background: #FFE9DC;
  overflow: hidden; margin-bottom: 18px;
}
.bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FFB703, #FF6B35);
  transition: width .28s ease;
}

.word-card {
  position: relative; cursor: pointer;
  background: linear-gradient(180deg, #FFFFFF, #FFF7F0);
  border: 3px solid #FFE3D0; border-radius: 32px;
  min-height: 44vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 36px 20px;
  box-shadow: 0 10px 0 #FFF1E6, 0 16px 36px rgba(255, 107, 53, .13);
  transition: transform .18s ease;
}
.word-card:active { transform: scale(.985); }
.wc-emoji { font-size: 80px; line-height: 1; animation: bob 2.8s ease-in-out infinite; }
.wc-en {
  font-size: 40px; font-weight: 800; letter-spacing: .5px;
  text-align: center; word-break: break-word;
}
.wc-zh { font-size: 25px; font-weight: 700; color: var(--orange); }
.wc-tap { font-size: 13.5px; color: var(--ink-3); }
.wc-lv {
  position: absolute; top: 16px; left: 18px;
  font-size: 12px; color: var(--ink-2); background: #fff;
  padding: 4px 11px; border-radius: 999px; box-shadow: var(--shadow);
}
.wc-speak {
  position: absolute; top: 12px; right: 14px;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: #fff; font-size: 21px; box-shadow: var(--shadow);
}

.card-actions { display: flex; gap: 12px; margin-top: 18px; }
.card-actions .btn { flex: 1 1 0; min-height: 58px; }
.card-actions .btn[disabled] { opacity: .4; box-shadow: none; }
.card-foot { display: flex; gap: 10px; margin-top: 12px; }
.mini {
  flex: 1 1 0; min-height: 46px; border-radius: 15px;
  border: 1.5px solid var(--line); background: var(--card);
  font-size: 13.5px; color: var(--ink-2); font-family: inherit;
}
.mini:active { transform: translateY(1px); }

/* ---------- 数学年级分组 ---------- */

.grade-block { margin-bottom: 22px; }
.grade-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 10px; }
.grade-title { font-size: 15.5px; font-weight: 700; }
.grade-tag {
  font-size: 11.5px; color: var(--ink-2); background: var(--card);
  padding: 3px 10px; border-radius: 999px; box-shadow: var(--shadow);
}
.grade-block.now .grade-title { color: #D95315; }
.grade-block.now .grade-tag { color: #B4500F; background: #FFEDE4; }
.grade-block.ahead .grade-tag { color: #5B45C9; background: #EFEBFF; }
.di-g { font-size: 11px; font-weight: 500; color: var(--ink-3); margin-left: 8px; }

.hint-card {
  background: #FFF7E8; border: 2px dashed #FFD9A8; border-radius: 18px;
  padding: 12px 14px; font-size: 13px; line-height: 1.75; color: #8A5A22;
  margin-bottom: 16px;
}
.book-count { font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-left: 8px; }
.chips .chip i { font-style: normal; font-size: 10px; opacity: .75; margin-left: 4px; }

/* 单词行可点，给个反馈 */
.word-row { cursor: pointer; transition: transform .14s ease; }
.word-row:active { transform: scale(.99); }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  .tc-emoji, .wc-emoji { animation: none; }
}

/* ==========================================================
   v2.4 蛋仔元素 + 卡片引擎 + 闯关引导
   ========================================================== */

/* ---------- 蛋仔吉祥物（纯 CSS 画） ---------- */
.egg {
  position: relative; width: 66px; height: 76px; flex: 0 0 auto;
  animation: egg-wobble 2.6s ease-in-out infinite;
}
.egg-body {
  position: absolute; inset: 0 0 8px 0;
  background: linear-gradient(160deg, #FFFDF7 0%, #FFE9C9 55%, #FFD9A8 100%);
  border: 2.5px solid #F3D3A8;
  border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  box-shadow: inset -6px -8px 14px rgba(240, 190, 130, .35), 0 6px 14px rgba(200, 150, 100, .18);
}
.egg-eye {
  position: absolute; top: 42%; width: 9px; height: 11px;
  background: #3B2A1C; border-radius: 50%;
}
.egg-eye.l { left: 28%; }
.egg-eye.r { right: 28%; }
.egg-eye::after {
  content: ''; position: absolute; top: 1px; left: 1px;
  width: 3.5px; height: 3.5px; border-radius: 50%; background: #fff;
}
.egg-cheek {
  position: absolute; top: 56%; width: 11px; height: 7px;
  background: #FFB3A7; border-radius: 50%; opacity: .8;
}
.egg-cheek.l { left: 15%; }
.egg-cheek.r { right: 15%; }
.egg-mouth {
  position: absolute; top: 59%; left: 50%; transform: translateX(-50%);
  width: 12px; height: 7px;
  border-bottom: 2.5px solid #3B2A1C; border-radius: 0 0 12px 12px;
}
.egg-foot {
  position: absolute; bottom: 0; width: 20px; height: 10px;
  background: #FFC98B; border-radius: 50%;
}
.egg-foot.l { left: 12px; }
.egg-foot.r { right: 12px; }

.egg-sm { width: 40px; height: 46px; }
.egg-sm .egg-eye { width: 6px; height: 7px; }
.egg-sm .egg-cheek { width: 7px; height: 5px; }
.egg-sm .egg-mouth { width: 8px; height: 5px; border-bottom-width: 2px; }
.egg-sm .egg-foot { width: 13px; height: 7px; }
.egg-sm .egg-foot.l { left: 7px; }
.egg-sm .egg-foot.r { right: 7px; }

.egg-lg { width: 150px; height: 172px; }
.egg-lg .egg-eye { width: 20px; height: 24px; }
.egg-lg .egg-cheek { width: 26px; height: 16px; }
.egg-lg .egg-mouth { width: 28px; height: 16px; border-bottom-width: 5px; }
.egg-lg .egg-foot { width: 46px; height: 22px; }
.egg-lg .egg-foot.l { left: 26px; }
.egg-lg .egg-foot.r { right: 26px; }

.egg.happy { animation: egg-hop 1.1s ease-in-out infinite; }

@keyframes egg-wobble {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-3px); }
}
@keyframes egg-hop {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-18px) scale(1.04, .96); }
  70% { transform: translateY(0) scale(.97, 1.03); }
}

/* ---------- 首页闯关入口 ---------- */
.egg-banner {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 16px; margin-bottom: 16px;
  border: none; border-radius: 26px;
  background: linear-gradient(135deg, #FFE3C4 0%, #FFD1E3 55%, #DCCBFF 100%);
  box-shadow: 0 8px 0 #F3D8C2, 0 14px 30px rgba(255, 160, 120, .22);
  text-align: left; font-family: inherit;
  transition: transform .14s ease;
}
.egg-banner:active { transform: translateY(3px); box-shadow: 0 3px 0 #F3D8C2; }
.eb-egg { flex: 0 0 auto; }
.eb-main { flex: 1 1 auto; min-width: 0; }
.eb-title { font-size: 18px; font-weight: 800; color: #6B3A12; letter-spacing: .3px; }
.eb-sub { font-size: 12.5px; color: #9A6B44; margin-top: 3px; }
.eb-go {
  flex: 0 0 auto; font-size: 13.5px; font-weight: 700; color: #fff;
  background: #FF6B35; padding: 8px 14px; border-radius: 999px;
  box-shadow: 0 3px 0 #DA4A17;
}

/* ---------- 闯关表扬页 / 完成页 ---------- */
.praise-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 74vh; text-align: center; gap: 10px; padding: 20px;
}
.praise-title { font-size: 23px; font-weight: 800; color: #6B3A12; margin-top: 6px; }
.praise-sub { font-size: 14.5px; color: var(--ink-2); }
.praise-stars { font-size: 26px; letter-spacing: 6px; margin: 6px 0; }
.praise-btn { max-width: 320px; margin-top: 10px; }
.done-list {
  width: 100%; max-width: 340px; background: var(--card);
  border: 2px solid #FFF1E6; border-radius: 18px; padding: 12px 16px; margin: 6px 0;
}
.done-row {
  display: flex; justify-content: space-between; font-size: 13.5px;
  padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--ink-2);
}
.done-row:last-child { border-bottom: none; }

/* ---------- 卡片引擎 ---------- */
.deck-card { min-height: 46vh; }
.deck-card .wc-en.long { font-size: 27px; line-height: 1.35; }
.deck-back {
  font-size: 16px; line-height: 1.85; color: var(--ink);
  text-align: left; width: 100%; max-width: 560px;
  background: #FFFAF3; border-radius: 18px; padding: 14px 16px;
  max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.deck-card .wc-lv { font-weight: 600; }

/* ==========================================================
   v2.5 今日任务卡 + 学习计划
   ========================================================== */

.today-card {
  background: linear-gradient(160deg, #FFF6EC 0%, #FFEFE2 45%, #FFE7F1 100%);
  border: 2.5px solid #FFE0CB;
  border-radius: 28px;
  padding: 16px 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 7px 0 #FFEEE0, 0 14px 30px rgba(255, 152, 110, .18);
}
.today-top { display: flex; align-items: center; gap: 12px; }
.tb-egg { flex: 0 0 auto; }
.today-main { flex: 1 1 auto; min-width: 0; }
.today-title { font-size: 18px; font-weight: 800; color: #6B3A12; }
.today-sub { font-size: 12.5px; color: #99705A; margin-top: 3px; line-height: 1.5; }
.today-badge {
  flex: 0 0 auto; font-size: 14px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #FFA15C, #FF6B35);
  padding: 7px 13px; border-radius: 999px;
  box-shadow: 0 3px 0 #DA4A17;
}
.today-bar { margin: 14px 0 10px; height: 12px; }
.today-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.td-chip {
  font-size: 12px; color: var(--ink-2); background: #fff;
  padding: 5px 11px; border-radius: 999px;
  border: 1.5px solid #FFE6D6;
}
.td-chip.done { color: #1B7F58; background: #E8F8F0; border-color: #C9EBDC; }
.today-start { width: 100%; min-height: 60px; font-size: 17.5px; letter-spacing: .5px; }

.plan-link {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--card); border: 2px solid #FFF1E6; border-radius: 20px;
  padding: 12px 14px; margin-bottom: 16px; text-align: left;
  font-family: inherit; box-shadow: 0 3px 0 #FFF1E6, var(--shadow);
}
.plan-link:active { transform: translateY(2px); }
.pl-ico { font-size: 20px; }
.pl-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-main b { font-size: 14px; color: var(--ink); font-weight: 700; }
.pl-main i { font-size: 12px; color: var(--ink-3); font-style: normal; }
.pl-arrow { color: var(--ink-3); font-size: 18px; }

/* 计划页 */
.plan-card {
  background: linear-gradient(160deg, #FFFFFF, #FFF8F2);
  border: 2.5px solid #FFE6D6; border-radius: 28px;
  padding: 18px 16px 20px; margin-bottom: 18px;
  box-shadow: 0 7px 0 #FFF1E6, 0 14px 30px rgba(255, 152, 110, .14);
}
.plan-top { display: flex; align-items: center; gap: 14px; }
.plan-ring { position: relative; flex: 0 0 auto; width: 104px; height: 104px; }
.plan-ring svg { display: block; }
.plan-ring-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 800; color: #D95315;
}
.plan-main { flex: 1 1 auto; min-width: 0; }
.plan-title { font-size: 16px; font-weight: 800; color: #6B3A12; margin-bottom: 6px; line-height: 1.35; }
.plan-line { font-size: 12.5px; color: var(--ink-2); line-height: 1.85; }
.plan-line b { color: var(--ink); font-weight: 700; }

.plan-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0 12px;
}
.ps {
  display: flex; flex-direction: column; gap: 3px; align-items: center;
  background: #FFFAF4; border: 1.5px solid #FFEEDF; border-radius: 14px; padding: 9px 6px;
}
.ps span { font-size: 11px; color: var(--ink-3); }
.ps b { font-size: 13.5px; color: var(--ink); font-weight: 700; }

.plan-warn {
  background: #FFF6E5; border: 1.5px dashed #FFD79A; border-radius: 14px;
  padding: 9px 12px; font-size: 12.5px; color: #8A5A22; line-height: 1.6; margin-bottom: 12px;
}
.plan-start { width: 100%; min-height: 58px; font-size: 17px; }
.plan-mini { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 10px; }

.plan-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.plan-opt {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  padding: 12px 8px; border-radius: 16px; cursor: pointer; font-family: inherit;
  border: 2px solid var(--line); background: var(--card);
  box-shadow: 0 3px 0 #F3EADF;
}
.plan-opt:active { transform: translateY(2px); box-shadow: 0 1px 0 #F3EADF; }
.plan-opt b { font-size: 15px; color: var(--ink); }
.plan-opt span { font-size: 11.5px; color: var(--ink-3); }
.plan-opt.on {
  border-color: #FFC9AC; background: #FFF3EA;
  box-shadow: 0 3px 0 #FFD9C2;
}
.plan-opt.on b { color: #D95315; }
.plan-opt.on span { color: #B4693C; }
.plan-tip { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-top: 12px; }
.panel-sub { font-size: 12.5px; color: var(--ink-3); margin: 2px 0 0; }

/* ==========================================================
   v2.6 单元化：单元列表 / 单元卡片 / 题量选择
   ========================================================== */

/* ---------- 语文：编号单元列表 ---------- */
.unit-bar { height: 8px; border-radius: 999px; background: var(--orange-soft); overflow: hidden; margin-bottom: 14px; }
.unit-bar i { display: block; height: 100%; background: linear-gradient(90deg, #FF9A6B, var(--orange)); border-radius: 999px; transition: width .4s ease; }

.unit-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.unit-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--card); border: none; border-radius: 18px; box-shadow: var(--shadow);
  padding: 13px 14px; font-family: inherit; cursor: pointer;
  transition: transform .14s ease;
}
.unit-row:active { transform: scale(.985); }
.unit-row.is-done { background: #F4FBF8; }
.unit-num {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft); color: #D95315; font-size: 15px; font-weight: 700;
}
.unit-num.done { background: var(--green); color: #fff; font-size: 17px; }
.ur-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ur-main b { font-size: 15.5px; color: var(--ink); }
.ur-main i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.ur-arrow { color: var(--ink-3); font-size: 18px; }

/* ---------- 数学：单元卡片 ---------- */
.unit-panel { padding: 14px 14px 12px; }
.unit-panel.unit-done { background: #F7FCF9; }
.unit-head { display: flex; align-items: center; gap: 10px; }
.uh-main {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  background: none; border: none; padding: 0; text-align: left; font-family: inherit; cursor: pointer;
}
.unit-no {
  font-size: 11px; font-weight: 700; color: #B4500F;
  background: var(--orange-soft); padding: 2px 9px; border-radius: 999px;
  letter-spacing: .5px;
}
.uh-main h3 { margin: 0; font-size: 16px; color: var(--ink); line-height: 1.35; }
.unit-check {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--card); color: var(--ink-3);
  font-size: 16px; font-family: inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.unit-check.done { background: var(--green); border-color: var(--green); color: #fff; }
.unit-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.unit-desc {
  font-size: 12px; color: var(--ink-3); min-width: 0; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.unit-foot .btn {
  width: auto; flex: 0 0 auto; min-height: 40px; padding: 0 16px;
  font-size: 13.5px; white-space: nowrap; border-radius: 13px;
}
.unit-panel .kp-list { margin-top: 10px; }

/* ---------- 单元页操作按钮组 ---------- */
.unit-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.unit-actions .btn {
  flex: 1 1 auto; margin: 0; width: auto; min-height: 46px; padding: 0 14px;
  font-size: 14.5px; white-space: nowrap;
}

/* ---------- 刷题页题量快选 ---------- */
.cnt-chips { align-items: center; margin-bottom: 14px; }
.cnt-label { font-size: 12.5px; color: var(--ink-2); padding-right: 2px; }

/* ==========================================================
   v2.7 云同步面板
   ========================================================== */
.book-count.ok { color: var(--green); }

.sync-box {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 4px;
  background: var(--violet-soft); border-radius: 16px;
}
.sync-code {
  flex: 1; min-width: 0; text-align: center;
  font-size: 22px; font-weight: 700; letter-spacing: 3px;
  color: var(--violet); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.sync-note { flex: 0 0 auto; font-size: 11px; color: #7A6BC4; }
