/* ============================================================
 * Rue的学习屋 — 样式（蓝紫渐变 · 移动优先 · 抽屉导航）
 * ============================================================ */
:root {
  --bg: #fff7ec;
  --bg2: #fffdf8;
  --card: #ffffff;
  --ink: #2f2a24;
  --muted: #9a8f80;
  --line: #ece6f5;
  --sun: #ffb347;
  --sun-deep: #ff9f1c;
  --green: #2ecc71;
  --green-deep: #27ae60;
  --blue: #54a0ff;
  --pink: #ff6b9d;
  --purple: #a55eea;
  --red: #ff5252;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(123, 92, 255, 0.14);
  --sidebar-w: 248px;
  /* 蓝紫主题强调色 */
  --accent: #7b5cff;
  --accent-deep: #5b3df5;
  --accent2: #9b4dff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #6A4C9C 0%, #4E4F97 40%, #577C8A 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  overscroll-behavior: none;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; }
img { max-width: 100%; }

/* ---------- 布局：纵向（顶栏在上，内容在下滚动） ---------- */
#app { display: flex; flex-direction: column; min-height: 100vh; }

/* 侧边导航：默认隐藏为抽屉，点击左上角小块展开 */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #ffffff, #f1edff);
  border-right: 1px solid rgba(123, 92, 255, .18);
  display: flex; flex-direction: column; padding: 18px 14px;
  height: 100%; z-index: 50;
  transform: translateX(-105%); transition: transform .25s;
  box-shadow: 0 0 40px rgba(20, 10, 40, .25);
}
.sidebar.open { transform: translateX(0); }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; box-shadow: var(--shadow); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 16px; }
.sun-badge { font-size: 13px; color: var(--sun-deep); font-weight: 700; }

.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  border: none; background: transparent;
  padding: 12px 14px; border-radius: 12px;
  font-size: 15.5px; color: var(--ink); text-align: left;
  transition: all .15s;
}
.nav-item .ni { font-size: 20px; }
.nav-item:hover { background: #f3efff; }
.nav-item.active { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-weight: 700; box-shadow: var(--shadow); }

.sidebar-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px dashed rgba(123, 92, 255, .25); }
.switch-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 4px 6px; }

.main { flex: 1; min-width: 0; padding: 16px 16px 56px; }
.page { max-width: 980px; margin: 0 auto; }

/* 顶栏：始终显示，左上角为展开导航的小块 */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
  background: linear-gradient(135deg, #6A4C9C, #577C8A);
  color: #fff; position: sticky; top: 0; z-index: 30; box-shadow: var(--shadow);
}
.topbar-title { font-weight: 700; font-size: 17px; }
.icon-btn {
  background: rgba(255, 255, 255, .22); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 12px; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.icon-btn:active { background: rgba(255, 255, 255, .38); }
.scrim { display: block; position: fixed; inset: 0; background: rgba(20, 10, 40, .42); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 45; }
.scrim.show { opacity: 1; pointer-events: auto; }

/* iPhone 刘海 / 底部安全区 */
@supports (padding-top: env(safe-area-inset-top)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .toast-box { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px;
  border: 1px solid #fff;
}
.card h2, .card h3 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card .sub { color: var(--muted); font-size: 13px; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

.btn {
  border: none; border-radius: 12px; padding: 10px 16px;
  font-size: 14.5px; background: #f3ece0; color: var(--ink);
  transition: transform .08s, filter .15s; font-weight: 600;
}
.btn:active { transform: scale(.96); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; }
.btn.green { background: linear-gradient(135deg, var(--green), var(--green-deep)); color: #fff; }
.btn.ghost { background: #fff; border: 1px solid rgba(123, 92, 255, .25); }
.btn.danger { background: #ffe3e3; color: var(--red); }
.btn.tiny { padding: 6px 10px; font-size: 12.5px; border-radius: 9px; background: #f3ece0; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }

.tag { display: inline-block; background: #efeaff; color: var(--accent-deep); border-radius: 8px; padding: 2px 8px; font-size: 12px; }
.tag.blue { background: #e7f1ff; color: #2f6fdb; }
.tag.green { background: #e4f9ee; color: #1d9b57; }
.tag.pink { background: #ffe7f1; color: #d6518a; }

.chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; font-size: 13px; }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

input[type=text], input[type=number], input[type=date], input[type=time], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; background: #fffdf8; color: var(--ink); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; }

/* ---------- 进度条 ---------- */
.progress { height: 9px; background: #ece6f5; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-deep)); border-radius: 999px; }
.progress.green > i { background: linear-gradient(90deg, var(--green), var(--green-deep)); }
.progress.blue > i { background: linear-gradient(90deg, #74b9ff, #2f6fdb); }

/* ---------- 首页 ---------- */
.hero {
  background: linear-gradient(135deg, #6A4C9C, #577C8A 60%, #4E4F97);
  color: #fff; border-radius: 20px; padding: 20px; position: relative; overflow: hidden;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.hero h1 { margin: 0 0 4px; font-size: 22px; }
.hero .sun-big { font-size: 34px; font-weight: 800; }
.hero .fire { font-size: 15px; background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 4px 12px; display: inline-block; margin-top: 8px; }
.hero .deco { position: absolute; right: -10px; top: -10px; font-size: 90px; opacity: .18; }
.countdowns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.cd { background: rgba(255, 255, 255, .20); border-radius: 14px; padding: 10px; text-align: center; }
.cd .d { font-size: 22px; font-weight: 800; }
.cd .l { font-size: 12px; opacity: .9; }

/* 备考模块 · 考试倒计时（位于刷题量上方） */
.exam-cd { margin-bottom: 16px; }
.exam-cd .cd-list { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.exam-cd .cd-item { background: #f7f4ff; border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; }
.exam-cd .cd-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.exam-cd .cd-name { font-weight: 800; font-size: 15px; color: #3a2b5e; }
.exam-cd .cd-days { font-weight: 800; font-size: 15px; }
.exam-cd .cd-date { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.timer-card { display: flex; align-items: center; gap: 16px; }
.timer-clock { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent-deep); letter-spacing: 1px; }
.timer-dots { display: flex; gap: 4px; }
.timer-dots i { width: 7px; height: 7px; border-radius: 50%; background: #e0d8f5; }
.timer-dots i.on { background: var(--green); }

/* 首页：新版学习时长计时卡（左总时长 / 右三模块各自计时） */
.timer-card.tm-new { flex-direction: row; align-items: stretch; gap: 16px; }
.tm-left { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.tm-l-label { font-size: 13px; color: var(--muted); }
.tm-total { font-size: 34px; font-weight: 800; color: var(--accent-deep); font-variant-numeric: tabular-nums; letter-spacing: 1px; line-height: 1.2; }
.tm-l-hint { margin-top: 6px; }
.tm-right { display: flex; flex-direction: column; gap: 8px; min-width: 132px; justify-content: center; }
.tm-mini { display: flex; align-items: center; justify-content: space-between; background: #f7f4ff; border-radius: 10px; padding: 7px 10px; }
.tm-m-label { font-size: 13px; color: #5a4b7a; }
.tm-m-val { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; }
.sun-click { cursor: pointer; }
.sun-click:active { transform: scale(0.97); }
@media (max-width: 480px) {
  .timer-card.tm-new { flex-direction: column; }
  .tm-right { min-width: 0; }
}

.stat-mini { text-align: center; padding: 8px; }
.stat-mini .v { font-size: 22px; font-weight: 800; }
.stat-mini .l { font-size: 12px; color: var(--muted); }

.subject-card { cursor: pointer; transition: transform .1s; }
.subject-card:active { transform: scale(.98); }

/* ---------- 日历 ---------- */
.cal-head { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 8px; }
.cal-title { font-weight: 700; }
.cal-nav { width: 32px; height: 32px; border-radius: 50%; border: none; background: #efeaff; font-size: 18px; color: var(--accent-deep); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid span { aspect-ratio: 1/1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; border-radius: 9px; position: relative; }
.cal-week span { font-size: 12px; color: var(--muted); aspect-ratio: auto; padding: 4px 0; }
.cal-cell.empty { background: transparent; }
.cal-cell { background: #f7f4ff; }
.cal-cell.today { outline: 2px solid var(--accent); }
.cal-cell.checked { background: #d8f5e3; color: var(--green-deep); font-weight: 700; }
.cal-cell b { font-size: 9px; color: var(--green-deep); }
.cal-dot { position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
/* 日历状态色：已打卡=绿，未打卡=红，未来=灰；容器随弹框自适应 */
.cal-cell.unchecked { background: #ffe9ec; color: #c0392b; }
.cal-cell.unchecked .cal-dot { background: #c0392b; }
.cal-cell.future { background: #f4f1f8; color: #b9aecb; }
.cal-detail { min-height: 20px; text-align: center; margin-top: 10px; }

/* ---------- 滚轴选择器 ---------- */
.scroll-picker { max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: #fffdf8; }
.scroll-list { padding: 6px; }
.scroll-item { text-align: center; padding: 10px; border-radius: 9px; color: var(--muted); }
.scroll-item.sel { background: var(--accent); color: #fff; font-weight: 700; }

/* ---------- 错题 / 收藏条目 ---------- */
.item { background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.item .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item .q { font-weight: 600; white-space: pre-wrap; }
.item .a { color: var(--green-deep); margin-top: 4px; white-space: pre-wrap; }
.item .photo { margin-top: 8px; max-height: 160px; border-radius: 10px; display: block; }
.item.clickable { cursor: pointer; transition: transform .1s, box-shadow .1s; }
.item.clickable:active { transform: scale(.985); box-shadow: 0 4px 14px rgba(60,40,90,.12); }
.voice-bar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; margin-top: 8px; max-width: 220px; }
.voice-wave { flex: 1; height: 18px; background: repeating-linear-gradient(90deg, var(--blue) 0 2px, transparent 2px 5px); border-radius: 4px; }
.voice-dur { font-size: 12px; color: var(--muted); }

/* ---------- 滑动卡片（佳句/词语） ---------- */
.slider { position: relative; overflow: hidden; border-radius: 16px; }
.slider-track { display: flex; transition: transform .35s ease; }
.slide { min-width: 100%; padding: 24px 22px; box-sizing: border-box; }
.slide.s1 { background: linear-gradient(135deg, #efeaff, #d9c9ff); }
.slide.s2 { background: linear-gradient(135deg, #e7f1ff, #cfe2ff); }
.slide.s3 { background: linear-gradient(135deg, #ffe7f1, #ffd2e6); }
.slide .big { font-size: 19px; line-height: 1.6; font-weight: 600; }
.slide .meta { margin-top: 10px; font-size: 13px; color: var(--muted); }
.slider-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.slider-dots i { width: 8px; height: 8px; border-radius: 50%; background: #d9cffa; }
.slider-dots i.on { background: var(--accent); }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .7); font-size: 18px; }
.slider-nav.prev { left: 6px; }
.slider-nav.next { right: 6px; }

/* ---------- 试卷分析 ---------- */
.paper-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fffdf8; }
.paper-item .ph { display: flex; justify-content: space-between; align-items: center; }
.score-big { font-size: 26px; font-weight: 800; color: var(--accent-deep); }

/* ---------- 萌宠 ---------- */
.pet-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pet-card { background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); text-align: center; border: 1px solid #fff; }
.pet-emoji { font-size: 56px; line-height: 1; }
.pet-emoji.dirty { filter: grayscale(.5) brightness(.85); }
.pet-name { font-weight: 700; margin: 6px 0 2px; }
.fly { position: absolute; font-size: 18px; animation: fly 1.6s infinite; }
@keyframes fly { 0%{transform:translate(0,0)} 50%{transform:translate(6px,-8px)} 100%{transform:translate(0,0)} }
.pet-status { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; text-align: left; }
.pet-status .bar { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pet-status .bar .progress { flex: 1; }

.shop-item { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #fffdf8; }
.shop-item .ico { font-size: 34px; }
.shop-item .info { flex: 1; }
.shop-item .price { color: var(--sun-deep); font-weight: 700; font-size: 13px; }

/* ---------- Modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .42); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; z-index: 1000; padding: 16px; }
.modal-overlay.show { opacity: 1; }
.modal-box { background: #fff; border-radius: 18px; padding: 18px; width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto; transform: translateY(12px); transition: transform .2s; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal-overlay.show .modal-box { transform: translateY(0); }
.modal-wide { max-width: 560px; }
.modal-pad h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* 刷题白色弹窗样式 */
.quiz-pop { text-align: center; }
.quiz-pop .q-num { font-size: 44px; font-weight: 800; color: var(--accent-deep); }
.quiz-pop .q-label { color: var(--muted); font-size: 13px; }
.quiz-pop .q-row { display: flex; justify-content: space-around; margin: 14px 0; }
.quiz-pop .q-correct .q-num { color: var(--green-deep); }
.quiz-pop .q-time .q-num { font-size: 28px; }

/* ---------- Toast ---------- */
.toast-box { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(40, 34, 28, .92); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transform: translateY(10px); transition: all .3s; max-width: 86vw; text-align: center; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok { background: rgba(39, 174, 96, .95); }
.toast-warn { background: rgba(230, 126, 34, .95); }

/* ---------- 语音输入 ---------- */
.voice-field { width: 100%; }
.voice-row { display: flex; align-items: center; gap: 10px; }
.voice-btn.recording { background: var(--red); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .6 } }
.voice-preview { margin-top: 8px; }

/* ---------- 错题拍照/语音区 ---------- */
.media-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .big { font-size: 40px; }

/* ---------- 阅读 ---------- */
.reading-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; background: #fffdf8; }
.reading-card .title { font-weight: 700; font-size: 16px; }
.reading-card .author { color: var(--muted); font-size: 12px; }
.reading-text { margin: 8px 0; line-height: 1.8; }
.reading-text mark { background: #fff2b8; padding: 1px 2px; border-radius: 3px; cursor: pointer; }

/* ---------- 顶部小标题 ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.section-title h2 { margin: 0; font-size: 20px; }

/* ---------- 输入组 ---------- */
.inline-form { display: flex; gap: 8px; margin-bottom: 12px; }
.inline-form input { flex: 1; }

/* ---------- 计划表 ---------- */
.plan-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.plan-item .cb { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--accent); flex: 0 0 22px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; }
.plan-item.done .cb { background: var(--green); border-color: var(--green); }
.plan-item.done .txt { text-decoration: line-through; color: var(--muted); }
.plan-item .txt { flex: 1; }

/* ---------- 生词本 ---------- */
.vocab-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fffdf8; }
.vocab-card .word { font-weight: 800; font-size: 17px; }

/* ---------- 复盘条目 ---------- */
.review-entry { border-left: 3px solid var(--accent); padding: 4px 10px; margin: 6px 0; background: #f3efff; border-radius: 0 8px 8px 0; }
.review-entry .k { font-size: 12px; color: var(--muted); }

/* ========== 备考板块：八大学习模块 & 刷题引擎 ========== */

/* 三统计卡片行 */
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: #fff; border-radius: 18px; padding: 18px 14px;
  text-align: center; box-shadow: var(--shadow);
}
.stat-card .sc-val { font-size: 32px; font-weight: 800; color: #9b6fc4; line-height: 1.2; }
.stat-card .sc-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* 今日学习卡片 */
.study-today {
  background: linear-gradient(135deg, #f0e6ff, #e8dff5);
  border-radius: 20px; padding: 16px 18px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.study-today .st-icon { font-size: 40px; flex-shrink: 0; }
.study-today .st-info { flex: 1; min-width: 0; }
.study-today .st-title { font-weight: 700; font-size: 17px; color: #6A4C9C; margin: 0 0 2px; }
.study-today .st-sub { font-size: 13px; color: var(--muted); }
.study-today .st-time { font-size: 28px; font-weight: 800; color: #c47ab3; white-space: nowrap; }

/* 八大模块标题 */
.module-header {
  display: flex; align-items: center; gap: 8px;
  padding-left: 12px; border-left: 4px solid #c47ab3;
  margin-bottom: 14px;
}
.module-header h2 { margin: 0; font-size: 19px; }

/* 模块卡片 */
.mod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mod-card {
  background: #fff; border-radius: 20px; padding: 18px 16px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .12s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.mod-card:active { transform: scale(.97); }
.mod-card .mod-icon-wrap {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 10px;
}
.mod-card .mod-name { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.mod-card .mod-desc { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0 0 10px; }
.mod-card .mod-bar { height: 7px; background: #f0e6f0; border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.mod-card .mod-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #c47ab3, #9b6fc4); border-radius: 999px; }
.mod-card .mod-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

/* 各模块图标背景色 */
.mod-icon-yuyan   { background: #f0e6ff; }
.mod-icon-luoji   { background: #e6f7ed; }
.mod-icon-shuliang { background: #e6f0ff; }
.mod-icon-ziliao  { background: #ffeef0; }
.mod-icon-zhengzhi { background: #f5ecff; }
.mod-icon-changshi{ background: #e6f5ff; }
.mod-icon-shenlun { background: #fff5e6; }
.mod-icon-zonghe  { background: #e6fff0; }

/* ====== 刷题界面 ====== */
.quiz-container { max-width: 600px; margin: 0 auto; }
.quiz-progress-bar {
  display: flex; gap: 6px; justify-content: center; margin-bottom: 16px;
}
.quiz-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0d8ea; transition: background .2s; }
.quiz-dot.done { background: #9b6fc4; }
.quiz-dot.current { background: #6A4C9C; transform: scale(1.25); }
.quiz-dot.wrong { background: #ff5252; }

.qz-card {
  background: #fff; border-radius: 20px; padding: 20px 18px;
  box-shadow: var(--shadow); margin-bottom: 16px;
}
.qz-qnum { font-size: 13px; color: #9b6fc4; font-weight: 700; margin-bottom: 8px; }
.qz-text { font-size: 15.5px; line-height: 1.75; margin-bottom: 16px; word-break: break-word; }
.qz-opts { display: flex; flex-direction: column; gap: 10px; }
.qz-opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 14px; border: 2px solid #ede8f5;
  cursor: pointer; transition: all .12s; font-size: 15px; line-height: 1.5;
  background: transparent;
}
.qz-opt:active { transform: scale(.98); }
.qz-opt.selected { border-color: #6A4C9C; background: #f5eeff; }
.qz-opt.correct { border-color: var(--green-deep); background: #e8fbe8; }
.qz-opt.wrong { border-color: var(--red); background: #ffeaea; }
.qz-opt .opt-lbl {
  width: 26px; height: 26px; border-radius: 50%;
  background: #f0e8fa; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #6A4C9C; flex-shrink: 0;
}
.qz-opt.selected .opt-lbl { background: #6A4C9C; color: #fff; }
.qz-opt.correct .opt-lbl { background: var(--green-deep); color: #fff; }
.qz-opt.wrong .opt-lbl { background: var(--red); color: #fff; }

/* 解析区 */
.qz-explain {
  background: #faf6ff; border-radius: 14px; padding: 14px 16px;
  margin-top: 12px; border-left: 4px solid #c47ab3;
  display: none;
}
.qz-explain.show { display: block; }
.qz-explain .qe-title { font-size: 14px; font-weight: 700; color: #6A4C9C; margin: 0 0 6px; }
.qz-explain .qe-body { font-size: 14px; line-height: 1.65; color: #444; }

/* 结果页 */
.quiz-result {
  text-align: center; padding: 30px 20px;
}
.quiz-result .qr-score { font-size: 56px; font-weight: 800; }
.quiz-result .qr-label { font-size: 15px; color: var(--muted); margin-top: 4px; }
.quiz-result .qr-detail { display: flex; justify-content: center; gap: 24px; margin: 20px 0; }
.quiz-result .qr-dv { text-align: center; }
.quiz-result .qr-dv .dv-v { font-size: 26px; font-weight: 800; }
.quiz-result .qr-dv .dv-l { font-size: 12px; color: var(--muted); }

/* ========== 积累板块：日积月累 & 千锤百炼 ========== */
.daily-badge {
  display: inline-block; background: linear-gradient(135deg, #efeaff, #e3d5ff);
  color: #6A4C9C; font-size: 12.5px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* 区块标题 */
.acc-block { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
.acc-block .ab-bar { width: 4px; height: 22px; border-radius: 999px; background: linear-gradient(180deg, #c47ab3, #9b6fc4); flex-shrink: 0; }
.acc-block .ab-title { font-size: 18px; font-weight: 800; color: #3a2d52; }
.acc-block .ab-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* 好词卡片 */
.acc-word-card { text-align: center; padding: 30px 18px; }
.acc-word-card .aw-word { font-size: 34px; font-weight: 800; color: #5a3d8a; letter-spacing: 2px; }
.acc-word-card .aw-py { font-size: 14px; color: var(--muted); margin-top: 8px; }
.acc-word-card .aw-src { font-size: 11.5px; color: #b9a7d6; margin-top: 14px; }

/* 佳句卡片 */
.acc-sent-card { text-align: left; padding: 28px 22px; }
.acc-sent-card .as-text { font-size: 19px; line-height: 1.8; font-weight: 600; color: #3a2d52; }
.acc-sent-card .as-src { font-size: 12px; color: var(--muted); margin-top: 16px; text-align: right; }

/* 阅读卡片（缩略） */
.acc-read-card {
  background: #fff; border-radius: 18px; padding: 16px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow); cursor: pointer; border-left: 4px solid #9b6fc4;
  transition: transform .12s;
}
.acc-read-card:active { transform: scale(.99); }
.acc-read-card .ar-title { font-weight: 800; font-size: 17px; color: #3a2d52; }
.acc-read-card .ar-author { color: var(--muted); font-size: 12px; margin-top: 2px; }
.acc-read-card .ar-snippet { font-size: 14px; line-height: 1.7; color: #555; margin: 10px 0 8px; }
.acc-read-card .ar-src { font-size: 11.5px; color: #b9a7d6; }

/* 词语详情弹窗 */
.wd-head { text-align: center; margin-bottom: 14px; }
.wd-word { font-size: 30px; font-weight: 800; color: #5a3d8a; letter-spacing: 2px; }
.wd-py { font-size: 15px; color: var(--muted); margin-top: 6px; }
.wd-sec { margin-top: 14px; }
.wd-label { font-size: 13px; font-weight: 700; color: #c47ab3; margin-bottom: 6px; }
.wd-meaning { font-size: 15px; line-height: 1.8; color: #444; white-space: pre-wrap; }
.wd-tag { font-size: 12px; color: var(--muted); margin-top: 10px; }
.wd-src, .sd-src { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: right; }

/* 佳句详情弹窗 */
.sd-text { font-size: 18px; line-height: 1.85; font-weight: 600; color: #3a2d52; white-space: pre-wrap; }
.sd-meta { font-size: 12.5px; color: var(--muted); margin: 12px 0; }
.sd-type { background: #f0e6ff; color: #6A4C9C; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; }
.sd-sec { margin-top: 14px; }

/* 文章全文弹窗 */
.article-modal { max-width: 680px; }
.article-modal .ar-head { text-align: center; margin-bottom: 12px; }
.article-modal .ar-title { font-size: 20px; font-weight: 800; color: #3a2d52; }
.article-modal .ar-author { font-size: 13px; color: var(--muted); margin-top: 4px; }
.article-text {
  font-size: 16px; line-height: 1.95; color: #333; white-space: pre-wrap;
  max-height: 56vh; overflow-y: auto; padding: 6px 2px; user-select: text; -webkit-user-select: text;
}
.article-text::selection, .article-text ::selection { background: #ffe08a; }

/* 选中收录浮层 */
.collect-backdrop { position: fixed; inset: 0; z-index: 60; background: transparent; }
.collect-popup {
  position: fixed; z-index: 61; width: 280px; max-width: 90vw;
  background: #fff; border-radius: 16px; padding: 14px;
  box-shadow: 0 12px 40px rgba(60,40,90,.28); border: 1px solid #efe6fb;
}
.collect-popup .cp-label { font-size: 13px; font-weight: 700; color: #6A4C9C; }
.collect-popup .cp-prev {
  font-size: 13px; line-height: 1.5; color: #444; background: #f7f2ff;
  border-radius: 10px; padding: 8px 10px; margin: 8px 0; max-height: 72px; overflow-y: auto;
  -webkit-line-clamp: 3;
}
.collect-popup .cp-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.collect-popup .collect-select {
  flex: 1; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  font-size: 14px; background: #fff; color: #333;
}
.collect-popup .collect-note {
  width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); font-size: 14px; resize: vertical; font-family: inherit;
}
.collect-popup .cp-actions { display: flex; gap: 8px; margin-top: 10px; }
.collect-popup .cp-actions .btn { flex: 1; }

/* 千锤百炼头部与开始卡 */
.acc-quiz-head { display: flex; gap: 12px; margin-bottom: 14px; }
.acc-quiz-head .qh-item {
  flex: 1; background: #fff; border-radius: 16px; padding: 12px;
  text-align: center; box-shadow: var(--shadow);
}
.acc-quiz-head .qh-item b { display: block; font-size: 24px; font-weight: 800; color: #9b6fc4; }
.acc-quiz-head .qh-item span { font-size: 12px; color: var(--muted); }
.acc-start { padding: 30px 20px; }
.acc-start .big-emoji { font-size: 46px; }
.acc-start h3 { margin: 8px 0 4px; }

/* 题卡顶部：退出按钮 */
.quiz-container { position: relative; }
.qz-topbar { display: flex; justify-content: flex-start; margin-bottom: 8px; }
.qz-exit {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1.5px solid #e3d5ff; color: #9b6fc4;
  font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 999px;
  cursor: pointer; transition: all .12s;
}
.qz-exit:active { transform: scale(.97); background: #f5eeff; }

/* 题干空格高亮 */
.qz-text .blank { color: #6A4C9C; font-weight: 800; background: #f3ecff; padding: 0 6px; border-radius: 6px; }

/* 移动端 */
@media (max-width: 820px) {
  .main { padding: 14px 14px 48px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .countdowns { grid-template-columns: repeat(3, 1fr); }
  .timer-clock { font-size: 32px; }
  .stat-cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card { padding: 14px 10px; }
  .stat-card .sc-val { font-size: 26px; }
  .mod-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .countdowns { grid-template-columns: 1fr; }
  .cd { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
  .stat-cards { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .stat-card { padding: 12px 8px; border-radius: 14px; }
  .stat-card .sc-val { font-size: 22px; }
  .stat-card .sc-label { font-size: 11.5px; }
  .mod-grid { grid-template-columns: 1fr; }
}

/* ============ 英语模块 ============ */
.en-host { margin-top: 4px; }

/* 单词长条卡片 */
.en-word-card {
  background: #fffdf8; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px; cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.en-word-card:active { transform: scale(.985); box-shadow: 0 4px 14px rgba(60,40,90,.1); }
.en-w-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.en-w-word { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.en-w-name { font-weight: 800; font-size: 18px; color: var(--accent-deep); }
.en-w-phon { font-size: 12.5px; color: var(--muted); }
.en-spk {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid #e3d5ff; background: #f7f1ff; color: #9b6fc4;
  font-size: 15px; cursor: pointer; transition: all .12s;
}
.en-spk:active { transform: scale(.92); background: #efe4ff; }
.en-w-pos-mean { margin-top: 6px; font-size: 14px; color: #444; }
.en-pos { color: var(--accent); font-weight: 700; }
.en-w-book { margin-top: 4px; }

/* 单词/生词 详情 */
.en-d-word { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.en-d-name { font-weight: 800; font-size: 26px; color: var(--accent-deep); }
.en-d-phon { font-size: 14px; color: var(--muted); }
.en-d-word .en-spk { align-self: center; }
.en-d-pos { font-size: 14px; color: var(--accent); margin-bottom: 8px; }
.en-d-block { margin-top: 10px; }
.en-d-h { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.en-d-list { margin: 0; padding-left: 20px; }
.en-d-list li { margin-bottom: 4px; line-height: 1.5; }
.en-d-list.en-d-sent li { font-style: italic; color: #555; }

/* 词书弹窗列表 */
.en-book-list { max-height: 56vh; overflow-y: auto; margin: 4px -4px 0; padding: 0 4px; }
.en-book-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.en-book-item:active { background: #faf6ff; }
.en-book-item .en-w-word { flex: 1; }
.en-book-item .en-w-pos-mean { flex: 1.4; }
.en-book-item .en-spk { flex: none; }

/* 练习：听音 / 提交反馈 */
.qz-listen { text-align: center; margin: 4px 0 10px; }
.qz-actions { margin-top: 14px; }
.qz-feedback { font-weight: 700; margin-bottom: 6px; }
.qz-feedback.ok { color: var(--green-deep); }
.qz-feedback.bad { color: #ff5252; }

/* 详情：例句翻译 / 相近词·相反词 */
.en-d-list.en-d-sent li { font-style: normal; color: #555; }
.en-sent-en { font-style: italic; color: #555; }
.en-sent-trans { color: var(--muted); font-size: 13px; margin-top: 3px; padding-left: 10px; border-left: 3px solid #e3d5ff; line-height: 1.5; }
.en-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.en-chip { display: inline-block; background: #f3ecff; color: var(--accent-deep); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.en-chip.ant { background: #ffeef0; color: #c0392b; }

/* 练习：解析 */
.qz-exp { margin-top: 10px; background: #f7f4ff; border-left: 4px solid var(--accent); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; line-height: 1.55; color: #444; }
.qz-exp-h { font-weight: 800; color: var(--accent-deep); margin-right: 6px; }

/* 生词本缩略卡片（练习 tab） */
.en-nw-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 8px; }
.en-nw-thumb { background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; transition: transform .1s, background .1s; }
.en-nw-thumb:active { transform: scale(.97); background: #f7f1ff; }
.en-nw-t-word { font-weight: 800; font-size: 14px; color: var(--accent-deep); }
.en-nw-t-mean { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 萌宠卡通形象（内联 SVG，替代 emoji） ---------- */
.pet-fig { width: 110px; height: 110px; margin: 0 auto; }
.pet-fig svg { width: 100%; height: 100%; display: block; animation: petBob 2.6s ease-in-out infinite; transform-origin: center bottom; }
.pet-fig.small { width: 52px; height: 52px; flex: 0 0 auto; }
.pet-fig.big { width: 130px; height: 130px; margin: 0 auto 6px; }
.pet-fig.dirty svg { filter: grayscale(.45) brightness(.9); }
.pet-card .pet-fig { cursor: pointer; }
@keyframes petBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* 宠物商店分区 */
.store-section { margin-bottom: 16px; }
.store-section .store-h { font-size: 16px; margin: 6px 2px 10px; display: flex; align-items: center; gap: 6px; }
.pet-shop-item .pet-fig { flex: 0 0 auto; }
