/* ============================================================
   学习小星球 · 五年级学习工作台
   视觉：奶油底 + 糖果色 + 大圆角 + 软阴影（儿童友好）
   ============================================================ */

:root {
  --cream: #FFF8EC;        /* 奶油底 */
  --orange: #FF9F43;       /* 橙 */
  --blue: #4D96FF;         /* 蓝 */
  --green: #6BCB77;        /* 绿 */
  --purple: #B57BFF;       /* 紫 */
  --pink: #FF7BAC;         /* 粉 */
  --yellow: #FFD93D;       /* 黄 */
  --ink: #5B4A3F;          /* 主文字（暖棕） */
  --ink-light: #A08C7E;    /* 次要文字 */
  --card: #FFFFFF;
  --shadow: 0 6px 20px rgba(255, 159, 67, 0.12);
  --radius: 22px;
}

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

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

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}

#app {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: calc(90px + env(safe-area-inset-bottom)); /* 给底部导航和苹果安全区留空间 */
}

/* ============ 顶部状态栏 ============ */
#topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 20px 10px;
  background: linear-gradient(180deg, #FFF8EC 82%, rgba(255,248,236,0));
}

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

.logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow);
}

.greet { font-size: 19px; font-weight: 800; }
.today { font-size: 12px; color: var(--ink-light); margin-top: 1px; }

.topbar-right { display: flex; gap: 8px; }

.streak, .stars {
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

/* ============ 页面容器 ============ */
#pages { padding: 8px clamp(18px, 3vw, 40px) 0; }

.page { display: none; animation: pageIn .35s ease; }
.page.active { display: block; }

@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  margin: 22px 4px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title::before {
  content: '';
  width: 5px; height: 16px;
  border-radius: 3px;
  background: var(--orange);
}

/* ============ 首页 Banner ============ */
.banner {
  margin-top: 6px;
  border-radius: 26px;
  padding: 22px 20px;
  background: linear-gradient(120deg, #FFE3C2, #FFD3E8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.banner::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
}
.banner h2 { font-size: 22px; font-weight: 900; line-height: 1.35; }
.banner p { margin-top: 8px; font-size: 13px; color: #B0601F; font-weight: 600; }
.banner-emoji { font-size: 58px; z-index: 1; animation: float 3s ease-in-out infinite; }

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

/* ============ 今日进度卡 ============ */
.progress-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: transform .15s;
}
.progress-card:active { transform: scale(0.98); }

.ring { width: 92px; height: 92px; flex-shrink: 0; }
.ring-bg { fill: none; stroke: #F3E9DC; stroke-width: 10; }
.ring-fg {
  fill: none;
  stroke: var(--orange);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;  /* 2πr，r=52 */
  stroke-dashoffset: 326.7;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset .8s cubic-bezier(.4,0,.2,1);
}
.ring-center { position: relative; }
.ring-center { margin-left: -74px; width: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.ring-num { font-size: 20px; font-weight: 900; }
.ring-label { font-size: 11px; color: var(--ink-light); }

.progress-info { flex: 1; }
.progress-title { font-size: 16px; font-weight: 800; }
.progress-sub { font-size: 12px; color: var(--ink-light); margin-top: 4px; }
.progress-cta { font-size: 13px; color: var(--orange); font-weight: 700; margin-top: 8px; }

/* 首页口算快捷入口 */
.quick-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .15s;
}
.quick-card:active { transform: scale(0.98); }
.quick-emoji {
  width: 50px; height: 50px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #FFE3C2, #FFD3A8);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.quick-title { font-size: 15px; font-weight: 800; }
.quick-sub { font-size: 12px; color: var(--ink-light); margin-top: 3px; }
.quick-arrow { margin-left: auto; font-size: 20px; color: var(--ink-light); }

/* 首页复习提醒:多条卡片之间留缝 */
#reviewWrap .quick-card { margin-bottom: 10px; }
#reviewWrap .quick-title b { color: var(--orange); }

/* ============ 动画课堂 ============ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.course-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s;
}
.course-card:active { transform: scale(0.96); }
.course-card .cc-emoji {
  width: 52px; height: 52px;
  margin: 0 auto 8px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.course-card .cc-name { font-size: 14px; font-weight: 800; }
.course-card .cc-sub { font-size: 11px; color: var(--ink-light); margin-top: 3px; }

/* 动画课堂列表页 */
.course-list { display: flex; flex-direction: column; gap: 12px; }

.course-row {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .15s;
}
.course-row:active { transform: scale(0.98); }
.course-row .cc-emoji {
  width: 54px; height: 54px;
  flex-shrink: 0;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.course-row .cc-name { font-size: 16px; font-weight: 800; }
.course-row .cc-sub { font-size: 12px; color: var(--ink-light); margin-top: 3px; }
.course-row .cc-arrow { margin-left: auto; font-size: 20px; color: var(--ink-light); }

/* ============ 播放页 ============ */
.page-head { margin: 8px 0 14px; }
.page-head h2 { font-size: 22px; font-weight: 900; }
.page-head p { font-size: 13px; color: var(--ink-light); margin-top: 3px; }

.back-btn {
  border: none;
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
  cursor: pointer;
  margin-bottom: 10px;
}

.player-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

#animCanvas {
  width: 100%;
  height: auto;
  aspect-ratio: 880 / 520;
  background: #FFFDF8;
  border-radius: 16px;
  border: 2px dashed #F3E9DC;
}

.player-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.ctl-btn {
  border: none;
  background: #FFF3E4;
  color: #B0601F;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s;
}
.ctl-btn:active { transform: scale(0.95); }
.ctl-btn.primary { background: var(--orange); color: #fff; }
.ctl-btn.small { padding: 7px 14px; font-size: 13px; }

.explain {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #FFF8EC;
  font-size: 14px;
  line-height: 1.7;
  min-height: 24px;
  color: #8A6A3F;
}

/* ============ 任务页 ============ */
.oral-card {
  background: linear-gradient(120deg, #FFE3C2, #FFD3E8);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  margin-bottom: 4px;
}
.oral-emoji {
  width: 50px; height: 50px;
  background: #fff;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.oral-title { font-size: 16px; font-weight: 800; }
.oral-sub { font-size: 12px; color: #B0601F; margin-top: 3px; font-weight: 600; }
.oral-status { margin-left: auto; font-size: 13px; font-weight: 800; color: #B0601F; }

.task-item {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.task-check {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid #E8DCCE;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  color: transparent;
  transition: all .2s;
}
.task-check.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.task-body { flex: 1; }
.task-name { font-size: 15px; font-weight: 800; }
.task-detail { font-size: 12px; color: var(--ink-light); margin-top: 3px; }

.task-reward {
  font-size: 12px;
  font-weight: 800;
  color: #E8862C;
  background: #FFF3E4;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

/* 读课本计时器 */
.timer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  background: #F0F7FF;
  color: var(--blue);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}
.timer-chip .t-time { font-size: 15px; font-variant-numeric: tabular-nums; }

.parent-note {
  margin-top: 20px;
  background: #F3EDE3;
  border-radius: var(--radius);
  padding: 14px 16px;
}
.parent-note-title { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.parent-note-body { font-size: 12.5px; color: var(--ink-light); line-height: 1.8; }

/* ============ 我的页 ============ */
.me-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 16px;
}
.me-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
  box-shadow: var(--shadow);
}
.me-head h2 { font-size: 21px; font-weight: 900; }
.me-head p { font-size: 12px; color: var(--ink-light); margin-top: 2px; }

.me-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}
.stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { font-size: 24px; font-weight: 900; color: var(--orange); }
.stat-label { font-size: 12px; color: var(--ink-light); margin-top: 4px; }

.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.badge {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}
.badge .b-emoji { font-size: 30px; filter: grayscale(1) opacity(0.35); }
.badge.locked .b-emoji { filter: grayscale(1) opacity(0.35); }
.badge.unlocked .b-emoji { filter: none; animation: pop .5s ease; }
.badge .b-name { font-size: 11px; font-weight: 800; margin-top: 6px; }
.badge .b-desc { font-size: 10px; color: var(--ink-light); margin-top: 2px; }

@keyframes pop {
  0% { transform: scale(0.3) rotate(-20deg); }
  70% { transform: scale(1.2) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}

.history-box { font-size: 12.5px; color: var(--ink-light); line-height: 2; }
.history-box .h-empty { text-align: center; padding: 10px 0; }

/* ============ 弹层 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(91, 74, 63, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-mask.show { display: flex; }

.modal {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn .3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-head h3 { font-size: 18px; font-weight: 900; }

/* 口算 */
.oral-question {
  text-align: center;
  font-size: 44px;
  font-weight: 900;
  color: var(--ink);
  padding: 22px 0 6px;
}
.oral-answer {
  display: flex;
  gap: 10px;
  margin: 14px 0 10px;
}
.oral-answer input {
  flex: 1;
  border: 3px solid #F3E9DC;
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  outline: none;
  color: var(--ink);
}
.oral-answer input:focus { border-color: var(--orange); }
.oral-progress { text-align: center; font-size: 13px; color: var(--ink-light); font-weight: 600; }
.oral-feedback {
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  min-height: 24px;
  margin-top: 8px;
}
.oral-feedback.ok { color: var(--green); }
.oral-feedback.no { color: #FF5A5F; }

/* 任务编辑 */
.edit-hint { font-size: 12.5px; color: var(--ink-light); margin-bottom: 12px; }
.edit-item {
  background: #FBF6EC;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.edit-item .e-row { display: flex; align-items: center; gap: 8px; }
.edit-item .e-row2 { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.edit-item .e-name { flex: 1; }
.edit-item .e-reward { width: 64px; text-align: center; }
.edit-item .e-minutes { width: 76px; text-align: center; }
.edit-item .e-detail { flex: 1; }
.edit-item input {
  border: 2px solid #F3E9DC;
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  color: var(--ink);
  background: #fff;
}
.edit-item input:focus { border-color: var(--blue); }
.e-label { font-size: 12px; color: var(--ink-light); white-space: nowrap; }
.edit-actions { display: flex; gap: 10px; margin-top: 14px; }
.edit-actions .ctl-btn { flex: 1; }

/* 徽章解锁提示 */
.badge-toast {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 22px;
  padding: 18px 30px;
  text-align: center;
  box-shadow: 0 16px 50px rgba(91, 74, 63, 0.28);
  z-index: 300;
  animation: btIn .45s cubic-bezier(.34,1.56,.64,1);
  min-width: 220px;
}
.badge-toast.hide { animation: btOut .4s ease forwards; }
.bt-emoji { font-size: 52px; animation: pop .5s ease; }
.bt-name { font-size: 16px; font-weight: 900; margin-top: 8px; }
.bt-desc { font-size: 12px; color: var(--ink-light); margin-top: 4px; }
@keyframes btIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(0.6); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes btOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(0.9); }
}

/* ============ 底部导航 ============ */
#tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1120px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -6px 24px rgba(255, 159, 67, 0.14);
  display: flex;
  justify-content: space-around;
  padding: 8px env(safe-area-inset-right) calc(10px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
  z-index: 60;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  color: var(--ink-light);
  font-size: 11px;
  font-weight: 700;
  transition: all .2s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.tab .tab-emoji { font-size: 22px; }
.tab.active { color: var(--orange); transform: translateY(-3px); }
.tab.active .tab-emoji { transform: scale(1.15); }

/* 星星飞行动画（任务完成时） */
.star-fly {
  position: fixed;
  font-size: 30px;
  pointer-events: none;
  z-index: 200;
  animation: starFly 1s ease-out forwards;
}
@keyframes starFly {
  0%   { opacity: 1; transform: translateY(0) scale(0.5) rotate(0); }
  60%  { transform: translateY(-70px) scale(1.4) rotate(180deg); }
  100% { opacity: 0; transform: translateY(-140px) scale(0.8) rotate(360deg); }
}

/* ============================================================
   v2 追加：课本单元 / 三件套 / 触屏适配（平板）
   ============================================================ */

/* ---- 触屏基础 ----
   touch-action: manipulation 消除双击缩放延迟；禁选中防误拖 */
html, body { touch-action: manipulation; }
.unit-head, .lesson-row, .practice-card, .course-card, .course-row,
.tab, .task-check, .timer-chip { user-select: none; -webkit-user-select: none; }

/* 底部导航在单元详情/播放页隐藏（防误触返回） */
body.hide-tab #tabbar { display: none; }
body.hide-tab #app { padding-bottom: 30px; }

/* 触屏目标最小 48px（平板手指友好） */
.ctl-btn { min-height: 48px; }
.tab { min-height: 52px; }
.task-check { width: 36px; height: 36px; }
.back-btn { min-height: 44px; }

/* ---- 首页：继续学习卡 ---- */
.continue-card {
  margin-top: 12px;
  background: linear-gradient(120deg, #D6F0F6, #E9DDFF);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s;
}
.continue-card:active { transform: scale(0.98); }
.continue-emoji {
  width: 52px; height: 52px;
  flex-shrink: 0;
  background: #fff;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.continue-info { flex: 1; }
.continue-title { font-size: 16px; font-weight: 800; }
.continue-sub { font-size: 12px; color: var(--ink-light); margin-top: 3px; }

/* ---- 课本：单元卡片 ---- */
.unit-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}
.unit-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform .15s;
}
.unit-head:active { transform: scale(0.98); }
.unit-emoji {
  width: 58px; height: 58px;
  flex-shrink: 0;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.unit-info { flex: 1; }
.unit-title { font-size: 17px; font-weight: 800; }
.unit-brief { font-size: 12.5px; color: var(--ink-light); margin-top: 4px; line-height: 1.5; }
.unit-tags {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  flex-wrap: wrap;
}
.u-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-light);
  background: #F7F1E7;
  border-radius: 999px;
  padding: 5px 12px;
}
.u-tag.ok {
  color: #1E7B3A;
  background: #DCF3E0;
}

/* ---- 单元详情：讲/练/测 ---- */
.lesson-row {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .15s;
}
.lesson-row:active { transform: scale(0.98); }
.lesson-row .cc-emoji {
  width: 54px; height: 54px;
  flex-shrink: 0;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.lesson-row .cc-name { font-size: 16px; font-weight: 800; }
.lesson-row .cc-sub { font-size: 12px; color: var(--ink-light); margin-top: 3px; }
.empty-tip {
  background: #F7F1E7;
  border-radius: 14px;
  padding: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-light);
}

.practice-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .15s;
}
.practice-card:active { transform: scale(0.98); }
.practice-emoji {
  width: 58px; height: 58px;
  flex-shrink: 0;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.practice-info { flex: 1; }
.practice-name { font-size: 16px; font-weight: 800; }
.practice-sub { font-size: 12px; color: var(--ink-light); margin-top: 4px; line-height: 1.5; }

/* 练习/测验内嵌容器 */
#practiceBox, #quizBox { margin-top: 10px; }

/* ---- 手机学习地图入口 ---- */
.map-entry-card {
  width: 100%;
  border: 0;
  margin: 4px 0 14px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #DDEBFF, #E9DDFF 58%, #FFE3C2);
  box-shadow: var(--shadow);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.map-entry-card:active { transform: scale(.98); }
.map-entry-icon { font-size: 32px; }
.map-entry-main { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.map-entry-main strong { font-size: 16px; }
.map-entry-main span { font-size: 12px; color: var(--ink-light); line-height: 1.45; }

.map-overview-card {
  background: #fff;
  border-radius: 22px;
  padding: 17px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.map-overview-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.map-overview-top span { color: var(--orange); font-weight: 800; }
.map-progress { height: 10px; background: #F2EADB; border-radius: 99px; overflow: hidden; margin: 12px 0; }
.map-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--pink)); transition: width .4s ease; }
.map-legend { display: flex; justify-content: space-between; color: var(--ink-light); font-size: 12px; }

#learningMap { position: relative; padding-left: 17px; }
#learningMap::before { content: ''; position: absolute; left: 31px; top: 20px; bottom: 24px; width: 4px; border-radius: 5px; background: #E6DCCF; }
.map-node { position: relative; padding-left: 36px; margin-bottom: 14px; }
.map-route-dot {
  position: absolute; z-index: 2; left: 0; top: 19px;
  width: 31px; height: 31px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 4px solid #E6DCCF;
  color: var(--ink-light); font-size: 12px; font-weight: 900;
}
.map-node.completed .map-route-dot { background: var(--green); border-color: #CDECCF; color: #fff; }
.map-node-head {
  width: 100%; border: 0; border-radius: 20px; padding: 12px;
  background: #fff; box-shadow: var(--shadow); color: var(--ink);
  display: grid; grid-template-columns: 46px minmax(0,1fr) auto 16px;
  align-items: center; gap: 9px; text-align: left; font-family: inherit;
}
.map-node-emoji { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.map-node-title { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.map-node-title strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.map-node-title small { color: var(--ink-light); font-size: 11px; }
.map-node-tags { display: flex; gap: 3px; }
.map-mini-tag { width: 21px; height: 21px; border-radius: 50%; background: #F3ECE1; display: flex; align-items: center; justify-content: center; color: var(--ink-light); font-size: 9px; font-weight: 800; }
.map-mini-tag.ok { color: #fff; background: var(--green); }
.map-fold { color: var(--ink-light); transition: transform .2s; }
.map-node.expanded .map-fold { transform: rotate(180deg); }
.map-node-detail { display: none; margin: 8px 0 0; padding: 15px; background: rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 5px 16px rgba(91,74,63,.08); }
.map-node.expanded .map-node-detail { display: block; animation: pageIn .25s ease; }
.map-detail-block { margin-bottom: 13px; }
.map-detail-block b { display: block; font-size: 13px; margin-bottom: 7px; }
.map-detail-block p, .map-detail-block li { font-size: 12.5px; line-height: 1.65; color: #6F5D50; }
.map-detail-block ul { padding-left: 19px; }
.map-detail-block.warning, .map-detail-block.advice { border-radius: 13px; padding: 10px 11px; background: #FFF2E2; }
.map-detail-block.advice { background: #EAF6EC; }
.map-chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.map-chip-list span { font-size: 11.5px; color: #486380; background: #E9F2FF; border-radius: 99px; padding: 5px 9px; }
.map-go-unit, .report-empty .map-go-unit {
  width: 100%; border: 0; border-radius: 14px; padding: 12px;
  color: #fff; background: linear-gradient(135deg, var(--orange), #FF7B54);
  font-family: inherit; font-weight: 800; font-size: 14px;
}

/* ---- 单元学习报告 ---- */
.report-entry-icon { background: linear-gradient(135deg, #D9F5DC, #DDEBFF); }
.report-entry.report-pending { opacity: .76; }
.report-hero { display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: 24px; background: linear-gradient(135deg, #FFF1D7, #FFE2EA); box-shadow: var(--shadow); }
.report-score-ring { --score: 0deg; flex: 0 0 94px; width: 94px; height: 94px; border-radius: 50%; padding: 9px; background: conic-gradient(var(--orange) var(--score), rgba(255,255,255,.72) 0); }
.report-score-ring > div { width: 100%; height: 100%; border-radius: 50%; background: #fff; display: flex; align-items: baseline; justify-content: center; padding-top: 21px; }
.report-score-ring strong { font-size: 32px; color: var(--orange); }
.report-score-ring span { font-size: 14px; color: var(--ink-light); }
.report-hero-copy small { color: var(--ink-light); }
.report-hero-copy h3 { margin: 5px 0; font-size: 19px; }
.report-hero-copy p { color: var(--ink-light); font-size: 12px; }
.report-stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; margin: 13px 0; }
.report-stat-grid > div { min-width: 0; background: #fff; border-radius: 17px; padding: 13px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.report-stat-grid strong { font-size: 18px; color: #785C49; overflow-wrap: anywhere; }
.report-stat-grid span { font-size: 11.5px; color: var(--ink-light); }
.report-card { margin: 13px 0; padding: 17px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.report-card h3 { font-size: 15px; margin-bottom: 13px; }
.report-check-list > div { display: flex; gap: 11px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #EEE4D6; }
.report-check-list > div:last-child { border: 0; }
.report-check-list > div > span { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: #EFE8DD; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; }
.report-check-list > div.ok > span { background: var(--green); color: #fff; }
.report-check-list p { display: flex; flex-direction: column; gap: 2px; }
.report-check-list b { font-size: 13px; }
.report-check-list small { color: var(--ink-light); }
.report-history { height: 132px; display: flex; align-items: flex-end; gap: 10px; padding-top: 10px; }
.report-history-item { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.report-history-item i { width: min(30px,70%); min-height: 12px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--blue), #8AB9FF); }
.report-history-item span { font-size: 12px; font-weight: 800; margin: 3px 0; }
.report-history-item small { font-size: 9px; color: var(--ink-light); white-space: nowrap; }
.report-ability { display: flex; flex-direction: column; gap: 7px; padding: 12px; border-radius: 14px; background: #EDF5FF; }
.report-ability strong { color: #386A9E; }
.report-ability span, .report-card li { color: #6F5D50; font-size: 12.5px; line-height: 1.65; }
.report-warning { background: #FFF6E9; }
.report-warning ul { padding-left: 19px; }
.report-wrong { padding: 9px 0; border-bottom: 1px dashed #EEE4D6; display: flex; flex-direction: column; gap: 4px; }
.report-wrong:last-child { border: 0; }
.report-wrong b { font-size: 13px; }
.report-wrong span { color: #B0601F; font-size: 12px; }
.report-next { padding: 17px; margin: 13px 0; color: #245D31; background: #E5F5E7; border-radius: 20px; }
.report-next p { font-size: 13px; line-height: 1.65; margin: 7px 0 12px; }
.report-next button, .qz-report-btn { border: 0; border-radius: 12px; padding: 10px 14px; background: #fff; color: #2D6D3B; font-family: inherit; font-weight: 800; }
.qz-report-btn { margin-top: 8px; color: #8A531E; }
.report-empty { text-align: center; padding: 32px 20px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.report-empty-emoji { font-size: 48px; }
.report-empty h3 { margin: 10px 0 7px; }
.report-empty p { color: var(--ink-light); font-size: 13px; line-height: 1.7; margin-bottom: 17px; }

@media (max-width: 380px) {
  .map-node-head { grid-template-columns: 42px minmax(0,1fr) 16px; }
  .map-node-tags { grid-column: 2; }
  .map-node-emoji { width: 42px; height: 42px; }
  .map-node-title strong { white-space: normal; line-height: 1.25; font-size: 13px; }
  .map-fold { grid-column: 3; grid-row: 1 / span 2; }
}

/* ---- 错题本 ---- */
.wrong-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed #F0E6D8;
}
.wrong-item .wrong-q { font-weight: 700; color: var(--ink); }
.wrong-item .wrong-ans { color: var(--ink-light); white-space: nowrap; }
.wrong-item .wrong-ex { display: block; color: #B0601F; font-size: 13px; line-height: 1.6; margin-top: 4px; }
.wrong-actions { margin-bottom: 8px; }

/* 测验答错后的讲解 */
.qz-ex { color: #B0601F; font-weight: 600; font-size: 13px; line-height: 1.6; }

/* ---- 平板竖屏：内容更宽时放大字号 ---- */
@media (min-width: 600px) {
  #app { max-width: 1120px; }
  #tabbar { max-width: 1120px; }
  .greet { font-size: 22px; }
  .today { font-size: 13px; }
  .section-title { font-size: 18px; }
  .unit-title { font-size: 19px; }
  .unit-brief { font-size: 14px; }
  .course-grid { grid-template-columns: repeat(3, 1fr); }
  .banner h2 { font-size: 26px; }
}

/* 宽屏时让动画和练习真正利用可用空间，避免内容缩成手机卡片大小。 */
@media (min-width: 900px) {
  #pages { padding-left: clamp(28px, 4vw, 56px); padding-right: clamp(28px, 4vw, 56px); }
  .course-grid { grid-template-columns: repeat(4, 1fr); }
  .player-box { padding: 18px; }
  #animCanvas { border-radius: 20px; }
  .player-controls .ctl-btn { min-width: 112px; }
}

/* ============================================================
   v2 动手练习（✋练一练）
   ============================================================ */
.stage-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; }
.stage-title { font-weight: 700; font-size: 17px; }
.stage-sub { color: #999; font-size: 13px; flex: 1; }

.pc-tip { font-size: 15px; color: #7a5c3e; background: #FFF4E0; border-radius: 12px;
  padding: 10px 14px; margin: 10px 0; line-height: 1.5; }
.pc-tip b { color: #E8590C; }

.pc-canvas { touch-action: none; display: block; max-width: 100%; margin: 0 auto;
  background: #FFFDF7; border-radius: 16px; border: 2px solid #F0E6D2; }

.pc-status { text-align: center; margin: 8px 0; font-size: 15px; color: #666; }
.pc-status b { color: #E8590C; font-size: 17px; }

.pc-ok { background: #E6F9EC; border: 2px solid #7BD88F; color: #1E7B3A; border-radius: 14px;
  padding: 12px 16px; text-align: center; font-size: 16px; margin-top: 10px; line-height: 1.6; }
.pc-ok b { font-size: 19px; }

.pc-btns { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.p-btn { min-height: 48px; padding: 10px 20px; border: none; border-radius: 14px;
  background: #FFE3C2; color: #7A4A12; font-size: 16px; font-weight: 700; }
.p-btn.big { flex: 1; min-height: 56px; font-size: 17px; background: #FFF1DC; border: 2px solid #F5C98F; }
.p-btn:active { transform: scale(0.97); }

.p-input { min-height: 48px; width: 96px; border: 2px solid #E3D3B8; border-radius: 12px;
  text-align: center; font-size: 20px; font-weight: 700; }
.pc-answer { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }

.pc-formula { text-align: center; font-size: 30px; font-weight: 800; color: #5B3A8E;
  margin: 12px 0; letter-spacing: 2px; }
.pc-question { text-align: center; font-size: 18px; color: #666; margin: 8px 0; }
.pc-opts { display: flex; gap: 10px; flex-direction: column; max-width: 420px; margin: 0 auto; }

.pc-feedback { text-align: center; font-size: 15px; margin: 8px 0; min-height: 22px; line-height: 1.7; }
.pc-feedback.ok { color: #1E7B3A; font-weight: 700; }
.pc-feedback.no { color: #D64545; }

/* touch-action:none：移动端拖动时不被浏览器当作滚动手势拦截，pointermove 才能正常收到 */
.pc-ruler { cursor: grab; position: absolute; touch-action: none; }
.pc-ruler:active { cursor: grabbing; }
.pc-area { position: relative; max-width: 100%; touch-action: none; }
.pc-area canvas { display: block; touch-action: none; }

/* ---- 练习5-9 补充样式 ---- */
.p-btn.sel { background: #5B8DEF; border-color: #4D7CE8; color: #FFF; }
.pc-vertical { text-align: right; font-size: 26px; font-weight: 800; color: #3D2E1F;
  background: #FFFDF7; border: 2px solid #E3D3B8; border-radius: 14px;
  padding: 12px 26px; max-width: 300px; margin: 0 auto; }
.pc-vertical .op { font-size: 20px; }
.pc-vertical .line { border-top: 3px solid #3D2E1F; margin: 4px 0; }
.pc-vertical .hole { display: inline-block; min-width: 30px; border-bottom: 3px solid #FF9F43;
  color: #FF9F43; text-align: center; }
.pc-vertical .prod { color: #4D96FF; }
.pc-stu { font-size: 19px; font-weight: 700; color: #5B3A8E; background: #F3EEFF;
  border: 2px dashed #C9B8F0; border-radius: 12px; padding: 10px 16px; display: inline-block; }
.pc-code { font-size: 20px; font-weight: 800; color: #4D96FF; letter-spacing: 2px; }

/* ============================================================
   ⚡ 方法小讲堂（借鉴「小学尖子生」：白板板书 + 黑红大字）
   ============================================================ */
.method-card { background: #FFF; border: 2px solid #F0E6D2; border-radius: 16px;
  padding: 12px 14px; margin-bottom: 12px; cursor: pointer; }
.method-card:active { transform: scale(0.98); }
.method-top { display: flex; align-items: center; gap: 12px; }
.method-emoji { width: 44px; height: 44px; border-radius: 14px; display: flex;
  align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.method-info { flex: 1; min-width: 0; }
.method-name { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.method-stars { font-size: 12px; letter-spacing: 1px; }
.method-hook { font-size: 13px; color: var(--ink-light); margin-top: 4px; line-height: 1.5; }
.method-unit { font-size: 11px; color: #B08D5C; background: #FFF8EC; border-radius: 8px;
  display: inline-block; padding: 3px 10px; margin-top: 8px; }
.method-card .cc-arrow { margin-left: auto; font-size: 18px; color: var(--ink-light); }

/* 白板讲解：米白底 + 黑字 + 红色答案（对标博主封面） */
.whiteboard { background: #FBF6E8; border: 3px solid #E8DCC0; border-radius: 18px;
  padding: 16px; margin: 12px 0; box-shadow: inset 0 0 0 3px #FFFDF7; }
.wb-title { text-align: center; font-size: 20px; font-weight: 900; color: #3D2E1F;
  margin-bottom: 12px; letter-spacing: 1px; }
.wb-step { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.wb-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: #3D2E1F; color: #FFF; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.wb-text { font-size: 16px; font-weight: 700; color: #3D2E1F; line-height: 1.6; }
.wb-text b { color: #3D2E1F; }
.wb-text .wb-ans { color: #E8590C; font-size: 19px; }
.wb-tip { background: #FFE9D2; border: 2px dashed #F5C98F; border-radius: 12px;
  padding: 10px 14px; font-size: 15px; font-weight: 700; color: #7A4A12; margin-top: 8px; }
.wb-done { width: 100%; max-width: 420px; margin: 10px auto 4px; display: block;
  font-size: 17px; }

/* 方法讲堂：答题反馈持久行（答对/答错后仍留在白板上方） */
.mt-state { margin: 0 0 10px; }

/* ============================================================
   语文听写 / 英语单词（vocab.js）
   ============================================================ */
.vc-row { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; align-items:center; }
.vc-gap { margin-top:2px; }
.vc-label { font-size:14px; color:var(--ink2,#7a7a8c); }
.vc-chip {
  border:2px solid #E3E3EF; background:#fff; border-radius:999px;
  padding:8px 16px; font-size:14px; font-weight:600; color:#55556a;
  cursor:pointer; transition:all .15s;
}
.vc-chip.small { padding:5px 12px; font-size:13px; }
.vc-chip.on { border-color:var(--orange,#FF9F43); background:#FFF3E6; color:#D9730D; }
.vc-chip.wrong { border-color:#FFC9C9; color:#D94545; }
.vc-chip.wrong.on { background:#FFEDED; border-color:#FF8A8A; }
.vc-stat { font-size:14px; color:var(--ink2,#7a7a8c); margin:4px 0 10px; }
.vc-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:10px; }
.vc-cell {
  background:#fff; border-radius:14px; padding:12px 10px; text-align:center;
  box-shadow:0 2px 8px rgba(80,80,120,.07); cursor:pointer; transition:transform .12s;
}
.vc-cell:active { transform:scale(.96); }
.vc-cell.wrong { background:#FFF0F0; }
.vc-cell-t { font-size:14px; font-weight:700; color:#33334a; }
.vc-cell-s { font-size:12px; color:#9999aa; margin-top:2px; }
.vc-cell-preview {
  margin-top:6px; color:#68687a; font-size:11px; line-height:1.45;
  overflow:hidden; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
}
.vc-tip { margin-top:16px; font-size:13px; color:#8a8a9c; background:#F6F6FB; border-radius:12px; padding:12px 14px; line-height:1.6; }

/* 听写播报 */
.dict-stage { text-align:center; padding:36px 16px; }
.dict-count { font-size:18px; color:#55556a; }
.dict-count b { font-size:26px; color:var(--orange,#FF9F43); }
.dict-bar { height:10px; background:#EEEEF4; border-radius:99px; margin:18px auto; max-width:420px; overflow:hidden; }
.dict-bar-in { height:100%; background:linear-gradient(90deg,#FFB35C,#FF9F43); border-radius:99px; transition:width .4s; }
.dict-hint { font-size:15px; color:#8a8a9c; margin:14px 0 26px; }
.dict-btns { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-bottom:16px; }
.ctl-btn.big { padding:13px 26px; font-size:16px; }
.ctl-btn.warn { background:#FFE9C9; color:#B36A00; }
.ctl-btn.big.full { width:100%; margin-top:14px; }

/* 核对 */
.check-list { display:flex; flex-direction:column; gap:8px; margin-bottom:18px; }
.check-item {
  display:flex; align-items:center; gap:10px; background:#fff;
  border-radius:12px; padding:10px 14px; box-shadow:0 1px 6px rgba(80,80,120,.06);
}
.check-item.bad { background:#FFF0F0; }
.check-w { flex:1; font-size:19px; font-weight:700; color:#33334a; }
.ck-btn {
  width:40px; height:40px; border-radius:50%; border:2px solid #E3E3EF;
  background:#fff; font-size:18px; color:#bbb; cursor:pointer;
}
.ck-btn.on { border-color:#3ECF8E; background:#E6FBF1; color:#1F9D66; }
.ck-btn.bad.on { border-color:#FF8A8A; background:#FFEDED; color:#D94545; }

/* 结算 */
.done-box { text-align:center; padding:40px 20px; }
.done-emoji { font-size:64px; }
.done-title { font-size:22px; font-weight:800; color:#33334a; margin:12px 0; }
.done-sub { font-size:14px; color:#8a8a9c; margin-bottom:22px; line-height:1.7; }

/* 英语模式卡 */
.eng-modes { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-top:6px; }
.eng-mode {
  background:#fff; border-radius:16px; padding:18px 12px; text-align:center;
  box-shadow:0 2px 10px rgba(80,80,120,.08); cursor:pointer; transition:transform .12s;
}
.eng-mode:active { transform:scale(.96); }
.eng-mode.off { opacity:.4; pointer-events:none; }
.em-emoji { font-size:34px; }
.em-t { font-size:16px; font-weight:800; color:#33334a; margin:8px 0 4px; }
.em-s { font-size:12px; color:#9999aa; line-height:1.5; }

/* 单词卡 */
.flash {
  background:linear-gradient(135deg,#EAF3FF,#D8E9FF); border-radius:20px;
  min-height:220px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; margin:16px auto; max-width:460px; cursor:pointer; padding:24px;
  box-shadow:0 4px 14px rgba(80,110,180,.12);
}
.flash.flip { background:linear-gradient(135deg,#EAFBF1,#D6F5E3); }
.flash-w { font-size:38px; font-weight:800; color:#2B3A67; }
.flash-w.small { font-size:20px; color:#4a5a80; }
.flash-ph { font-size:17px; color:#7a8bb0; }
.flash-zh { font-size:26px; font-weight:800; color:#1F7A4D; text-align:center; line-height:1.5; }
.flash-tap { font-size:12px; color:#9aa5c0; margin-top:8px; }

/* 听音/拼写 */
.listen-box { text-align:center; margin:26px 0; }
.opt-list { display:flex; flex-direction:column; gap:10px; max-width:460px; margin:0 auto 18px; }
.opt-btn {
  background:#fff; border:2px solid #E3E3EF; border-radius:14px; padding:14px;
  font-size:17px; font-weight:600; color:#33334a; cursor:pointer; text-align:center;
}
.opt-btn.right { border-color:#3ECF8E; background:#E6FBF1; color:#1F9D66; }
.opt-btn.bad { border-color:#FF8A8A; background:#FFEDED; color:#D94545; }
.spell-zh { font-size:20px; font-weight:700; color:#33334a; margin-top:14px; }
.spell-box { display:flex; gap:10px; max-width:460px; margin:0 auto; }
.spell-input {
  flex:1; border:2px solid #E3E3EF; border-radius:14px; padding:13px 16px;
  font-size:19px; font-weight:600; color:#33334a; outline:none;
}
.spell-input:focus { border-color:var(--orange,#FF9F43); }
.spell-fb { text-align:center; min-height:34px; margin:14px 0; font-size:17px; }
.fb-ok { color:#1F9D66; font-weight:700; }
.fb-bad { color:#D94545; }

/* 我的页错词 */
.vw-line { font-size:14px; color:#55556a; line-height:1.8; margin-bottom:6px; }
.vw-tip { font-size:12px; color:#9a9aac; margin-top:6px; }

/* ============================================================
   思路分解演示器（page-decompose）
   「数字自动按思路分解进每个框」
   ============================================================ */
#page-decompose .page-head h2 { margin-bottom: 4px; }

.ds-ex-list { display:flex; flex-direction:column; gap:10px; }
.ds-ex-card {
  display:flex; align-items:center; gap:12px; background:var(--card,#fff);
  border-radius:var(--radius,18px); padding:12px 14px; cursor:pointer;
  box-shadow:var(--shadow,0 6px 20px rgba(255,159,67,0.12));
  transition:transform .15s;
}
.ds-ex-card:active { transform:scale(.98); }
.ds-ex-note, .ds-note {
  font-size:13px; color:var(--ink-light,#A08C7E); line-height:1.7;
  background:#FFF4DE; border-radius:14px; padding:12px 14px; margin-top:4px;
}
.ds-note { margin-top:14px; }

.ds-stage-inner {
  background:#FFFDF7; border:3px solid #E8DCC0; border-radius:18px;
  padding:16px; margin-top:14px;
}
.ds-head { display:flex; align-items:center; gap:8px; margin-bottom:14px; }
.ds-head .ds-title { flex:1; font-size:16px; font-weight:800; color:#3D2E1F; }

.ds-layout {
  background:#FBF6E8; border-radius:14px; padding:22px 18px;
  min-height:210px; display:flex; align-items:center; justify-content:center;
}
/* 竖式乘法布局 */
.ds-rows { display:flex; flex-direction:column; align-items:flex-end; }
.ds-row { display:flex; gap:6px; }
.ds-digit {
  width:40px; height:48px; display:flex; align-items:center; justify-content:center;
  font-size:28px; font-weight:800; color:#3D2E1F;
}
.ds-rowb { margin-top:2px; }
.ds-op { width:40px; display:flex; align-items:center; justify-content:center;
  font-size:24px; font-weight:800; color:#3D2E1F; }
.ds-line { width:100%; border-top:3px solid #5B4A3F; margin:10px 0; }
.ds-rowprod { gap:6px; }
.ds-prod {
  width:40px; height:48px; display:flex; align-items:center; justify-content:center;
  font-size:30px; font-weight:800; color:#fff; background:#E3DFD4; border-radius:10px;
  transition:background .3s, transform .3s;
}
.ds-prod.ds-on { background:linear-gradient(135deg,#4D96FF,#3B7FE0); transform:translateY(-2px);
  box-shadow:0 4px 10px rgba(77,150,255,.3); }
.ds-carrybox {
  width:64px; text-align:center; margin-left:14px; align-self:center;
  background:#FFF1C6; border:2px dashed #FFB300; border-radius:12px; padding:8px 4px;
}
.ds-carriertag { font-size:11px; color:#B7791F; font-weight:700; margin-bottom:4px; }
.ds-carrynum {
  height:26px; font-size:20px; font-weight:800; color:#E8611C;
}
.ds-carrynum.ds-on { animation:dsPop .4s ease; }

.ds-caption {
  margin:14px 4px; font-size:15px; line-height:1.8; color:#3D2E1F; min-height:54px;
  background:#FFF4DE; border-radius:12px; padding:10px 14px;
}
.ds-caption b { color:var(--blue,#4D96FF); }
.ds-caption .wb-ans { color:#D94545; }

.ds-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:center; }
.ds-controls .ctl-btn { font-size:14px; padding:9px 12px; }
.ds-stepinfo { font-size:13px; color:var(--ink-light,#A08C7E); font-weight:700; margin-left:4px; }

@keyframes dsPop {
  0% { transform:scale(.4); opacity:.3; }
  60% { transform:scale(1.15); }
  100% { transform:scale(1); opacity:1; }
}

/* 例子按题型分组 */
.ds-group { margin-bottom:14px; }
.ds-group-title {
  font-size:14px; font-weight:800; color:#3D2E1F; margin:4px 2px 8px;
  display:flex; align-items:center; gap:6px;
}
.ds-group-title::after {
  content:""; flex:1; height:2px; background:linear-gradient(90deg,#E8DCC0,transparent);
}

/* 混合运算布局 */
.ds-mixed { display:flex; flex-direction:column; align-items:center; gap:14px; width:100%; }
.ds-mixexpr {
  font-size:26px; font-weight:800; color:#3D2E1F; letter-spacing:1px;
  background:#FFF4DE; border-radius:14px; padding:12px 22px;
}
.ds-mixsteps { display:flex; flex-direction:column; gap:12px; width:100%; max-width:340px; }
.ds-mixrow {
  display:flex; align-items:center; justify-content:center; gap:12px;
  min-height:52px;
}
.ds-mixlabel {
  min-width:120px; text-align:center; font-size:22px; font-weight:800; color:#3D2E1F;
}
.ds-mixeq { font-size:24px; font-weight:800; color:#3D2E1F; }
.ds-mixres { width:64px; height:48px; font-size:26px; }

/* ============================================================
   语音朗读设置（手机在线 TTS）
   ============================================================ */
.otts-card {
  background:#FFFDF7; border:2px solid #E8DCC0; border-radius:16px;
  padding:14px; margin-bottom:12px;
}
.otts-row {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-size:15px; font-weight:700; color:#3D2E1F; margin:8px 0 4px;
}
.otts-hint { font-size:12px; color:#A08C7E; line-height:1.6; margin:4px 0 8px; }
.otts-input {
  width:100%; border:2px solid #E3DFD4; border-radius:12px; padding:11px 12px;
  font-size:15px; color:#3D2E1F; outline:none; background:#fff;
}
.otts-input:focus { border-color:var(--orange,#FF9F43); }
.otts-save { margin-top:10px; width:100%; }
.otts-fb { min-height:20px; font-size:14px; margin-top:8px; }
.otts-fb.ok { color:var(--green,#6BCB77); font-weight:700; }

/* 开关 */
.switch { position:relative; display:inline-block; width:50px; height:28px; flex-shrink:0; }
.switch input { opacity:0; width:0; height:0; }
.switch .slider {
  position:absolute; inset:0; background:#E3DFD4; border-radius:28px;
  transition:.25s; cursor:pointer;
}
.switch .slider::before {
  content:""; position:absolute; width:22px; height:22px; border-radius:50%;
  left:3px; top:3px; background:#fff; transition:.25s; box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background:var(--orange,#FF9F43); }
.switch input:checked + .slider::before { transform:translateX(22px); }

/* 设置里 select 与 input 一致外观 */
select.otts-input {
  appearance:auto;
  cursor:pointer;
}

/* ============================================================
   语文单元课堂
   ============================================================ */
.chinese-entry { background:linear-gradient(135deg,#FFF8E3,#F1FFF0); border-color:#F3D79B; }
.cn-book-tabs { display:flex; gap:10px; flex-wrap:wrap; margin:4px 0 14px; }
.cn-overview {
  padding:16px; margin-bottom:14px; border-radius:18px; background:linear-gradient(135deg,#FFF1D6,#FFFDF7);
  border:2px solid #F4D39C; box-shadow:var(--shadow);
}
.cn-overview > div:first-child { display:flex; justify-content:space-between; gap:10px; margin-bottom:10px; }
.cn-overview strong { font-size:18px; }
.cn-overview span { color:var(--ink-light); font-size:13px; font-weight:700; }
.cn-unit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.cn-unit-card {
  width:100%; min-height:94px; border:2px solid #F0E3CF; border-radius:18px; background:#fff; color:var(--ink);
  padding:14px; display:flex; align-items:center; gap:12px; text-align:left; font:inherit; cursor:pointer; box-shadow:0 4px 12px rgba(92,74,63,.06);
}
.cn-unit-card.learned { border-color:#9DDFAB; background:#F5FFF6; }
.cn-unit-no {
  width:38px; height:38px; flex:0 0 38px; border-radius:13px; display:flex; align-items:center; justify-content:center;
  font-size:17px; font-weight:900; color:#815A2C; background:#FFE7B6;
}
.cn-unit-card.learned .cn-unit-no { color:#257D3A; background:#CFF3D5; }
.cn-unit-main { min-width:0; display:flex; flex-direction:column; gap:6px; flex:1; }
.cn-unit-main strong { font-size:16px; }
.cn-unit-main small { color:var(--ink-light); line-height:1.45; }
.cn-inline-back {
  border:0; background:transparent; color:#7D674F; font:inherit; font-size:14px; font-weight:800; padding:6px 0 12px; cursor:pointer;
}
.cn-hero {
  padding:20px; border-radius:22px; background:linear-gradient(135deg,#FFE6B8,#FFF3D8 52%,#EFFFF0); box-shadow:var(--shadow);
}
.cn-hero > span { display:inline-block; padding:4px 10px; border-radius:999px; background:#fff; color:#B16F19; font-size:12px; font-weight:900; }
.cn-hero h3 { font-size:24px; margin:10px 0 7px; }
.cn-hero p { line-height:1.7; color:#796653; }
.cn-text-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.cn-text-list span { padding:12px; border-radius:14px; background:#fff; box-shadow:0 3px 10px rgba(0,0,0,.05); font-size:14px; font-weight:700; }
.cn-text-list b { display:inline-flex; width:24px; height:24px; margin-right:8px; border-radius:8px; align-items:center; justify-content:center; background:#EAF2FF; color:#3974C8; }
.cn-focus-card,.cn-empty-accum,.cn-accum-card,.cn-quiz-card { padding:18px; border-radius:20px; background:#fff; box-shadow:var(--shadow); }
.cn-focus-card ul { padding-left:22px; line-height:1.9; }
.cn-writing { display:flex; justify-content:space-between; gap:10px; margin-top:12px; padding:12px; border-radius:14px; background:#FFF7E7; }
.cn-writing span { color:#9D631B; font-weight:800; }
.cn-accum-card { border:2px solid #F3D79B; background:linear-gradient(180deg,#FFFDF8,#FFF9E9); }
.cn-accum-head { display:flex; justify-content:space-between; align-items:start; gap:12px; }
.cn-accum-head > div { display:flex; flex-direction:column; gap:4px; }
.cn-accum-head strong { font-family:"STKaiti","KaiTi","楷体",serif; font-size:24px; color:#714719; }
.cn-accum-head small { color:#A17B4E; }
.cn-best { border-radius:999px; padding:5px 9px; background:#E8F8EB; color:#2C853F; font-size:12px; font-weight:900; }
.cn-lines { margin:17px 0; padding:16px; border-radius:16px; background:rgba(255,255,255,.78); text-align:center; }
.cn-lines p { font-family:"STKaiti","KaiTi","楷体",serif; font-size:clamp(18px,4.8vw,24px); line-height:1.9; color:#4A3423; }
.cn-actions { display:flex; flex-wrap:wrap; gap:9px; justify-content:center; }
.cn-read-status { min-height:22px; margin-top:10px; color:#8A6B45; font-size:13px; line-height:1.6; text-align:center; }
.cn-empty-accum { text-align:center; border:2px dashed #E2CFB0; color:#6E5A47; }
.cn-empty-accum p { margin:9px 0 14px; line-height:1.6; color:var(--ink-light); }
#chineseQuizBox { margin-top:14px; }
.cn-quiz-card .pc-question { margin-top:15px; }
.cn-quiz-done { text-align:center; }
.cn-quiz-done h3 { font-size:22px; margin:6px 0; }
.cn-quiz-done p { color:var(--ink-light); margin-bottom:13px; }

@media (max-width:640px) {
  .cn-unit-grid,.cn-text-list { grid-template-columns:1fr; }
  .cn-unit-card { min-height:82px; padding:12px; }
  .cn-hero { padding:17px; }
  .cn-hero h3 { font-size:21px; }
  .cn-overview > div:first-child { align-items:flex-start; flex-direction:column; }
  .cn-actions .ctl-btn { flex:1 1 calc(50% - 9px); }
  .cn-writing { flex-direction:column; }
}
