:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --sub: #6e6e73;
  --line: #d2d2d7;
  --hair: #e5e5ea;
  --primary: #0071e3;
  --primary-d: #0060c1;
  --primary-soft: #e8f4fd;
  --green: #34c759;
  --green-soft: #e8fcef;
  --red: #ff3b30;
  --red-soft: #ffebeb;
  --orange: #ff9500;
  --purple: #af52de;
  --purple-soft: #f5e6ff;
  --yellow: #ffcc00;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.05);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
input, select, textarea { font-family: inherit; }

/* 顶部栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--hair); color: var(--ink); position: sticky; top: 0; z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; }
.topbar .brand .logo { font-size: 24px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--primary-soft); border-radius: 10px; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.topbar .user .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--hair); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.topbar .switch { background: var(--hair); color: var(--sub); padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 600; }

/* 容器 */
.wrap { max-width: 980px; margin: 0 auto; padding: 22px; }
.grid { display: grid; gap: 16px; }
.grid.cols2 { grid-template-columns: 1fr 1fr; }
.span2 { grid-column: 1 / -1; }
.grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) {
  .grid.cols2, .grid.cols3, .grid.cols4 { grid-template-columns: 1fr; }
  .wrap { padding: 14px; }
}

/* 卡片 */
.card { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.04); }
.card h3 { margin: 0 0 14px; font-size: 17px; font-weight: 700; }
.card h4 { margin: 18px 0 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.muted { color: var(--sub); font-size: 14px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: #fff; padding: 14px 22px; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 600; transition: transform .08s, box-shadow .2s, background .2s; box-shadow: var(--shadow-sm);
  min-height: 48px;
}
.btn:active { transform: scale(.97); }
.btn:hover { background: var(--primary-d); }
.btn.blue { background: var(--primary); box-shadow: var(--shadow-sm); }
.btn.green { background: var(--green); box-shadow: var(--shadow-sm); }
.btn.purple { background: var(--purple); box-shadow: var(--shadow-sm); }
.btn.red { background: var(--red); }
.btn.ghost { background: var(--surface); color: var(--primary); border: 1.5px solid var(--line); box-shadow: none; }
.btn.sm { padding: 10px 16px; font-size: 14px; border-radius: 10px; min-height: 38px; }
.btn.xs { padding: 7px 12px; font-size: 13px; border-radius: 8px; min-height: 32px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 落地页 */
.landing { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; }
.landing .hero { text-align: center; margin-bottom: 28px; }
.landing .hero .logo-mark {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px;
  background: var(--primary); color: #fff; font-size: 32px; font-weight: 300;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.landing .hero .big { font-size: 28px; font-weight: 700; color: var(--ink); letter-spacing: -0.3px; }
.landing .hero p { color: var(--sub); margin-top: 8px; font-size: 15px; }

.login-card { background: var(--surface); border-radius: 24px; padding: 28px; width: 100%; max-width: 400px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.04); }
.login-title { font-size: 20px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.login-foot { text-align: center; margin-top: 18px; }
.login-foot a { color: var(--primary); font-weight: 600; font-size: 14px; }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 16px; background: var(--surface); color: var(--ink); outline: none; min-height: 48px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.field textarea { resize: vertical; min-height: 80px; }

/* 打卡 */
.checkin { text-align: center; }
.checkin .streak { font-size: 34px; font-weight: 800; color: var(--primary); }
.checkin .streak small { font-size: 15px; color: var(--sub); font-weight: 500; }
.dots { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.dot { width: 30px; height: 30px; border-radius: 8px; background: var(--hair); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--sub); }
.dot.on { background: var(--primary); color: #fff; }

/* 统计小卡 */
.stat { text-align: center; }
.stat .num { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat .num.blue { color: var(--primary); }
.stat .num.green { color: var(--green); }
.stat .num.red { color: var(--red); }
.stat .label { font-size: 13px; color: var(--sub); margin-top: 4px; }

/* 练习区 */
.practice { max-width: 760px; margin: 0 auto; }
.q-progress { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; color: var(--sub); font-size: 14px; }
.timer { font-size: 17px; font-weight: 600; color: var(--primary); }
.stem { font-size: 21px; line-height: 1.7; font-weight: 600; margin: 12px 0 22px; }
.options { display: grid; gap: 12px; }
.opt { padding: 16px 18px; border: 2px solid var(--hair); border-radius: 14px; font-size: 17px; background: var(--surface); text-align: left; transition: .12s; min-height: 52px; }
.opt:hover { border-color: var(--primary); }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.answer-input { width: 100%; padding: 16px; font-size: 20px; border: 2px solid var(--hair); border-radius: 14px; text-align: center; min-height: 54px; }
.feedback { margin-top: 20px; border-radius: var(--radius); padding: 20px; }
.feedback.ok { background: var(--green-soft); border: 1px solid #c8f5d2; }
.feedback.no { background: var(--red-soft); border: 1px solid #ffd1d1; }
.feedback .tag { font-size: 15px; font-weight: 700; }
.feedback .tag.ok { color: #157a38; }
.feedback .tag.no { color: #a61616; }
.feedback .row { margin-top: 12px; font-size: 15px; line-height: 1.7; }
.feedback .row b { color: var(--ink); }
.feedback .label2 { color: var(--primary); font-weight: 700; margin-top: 14px; display: block; }

/* 错题本 */
.wb-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px dashed var(--hair); }
.wb-item:last-child { border-bottom: none; }
.wb-item .meta { flex: 1; }
.wb-item .stem-t { font-size: 16px; font-weight: 600; }
.wb-item .tags { font-size: 13px; color: var(--sub); margin-top: 4px; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.badge.pending { background: var(--primary-soft); color: var(--primary-d); }
.badge.done { background: var(--green-soft); color: #157a38; }

/* KPI 行 */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 820px){ .kpis { grid-template-columns: repeat(2,1fr); } }
.kpi { background: var(--surface); border-radius: 18px; padding: 18px; text-align: center; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.04); }
.kpi .n { font-size: 26px; font-weight: 700; color: var(--primary); }
.kpi .l { font-size: 13px; color: var(--sub); margin-top: 4px; }

/* 图表 */
.chart-card { background: var(--surface); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.04); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.bar .fill { width: 100%; border-radius: 6px 6px 0 0; background: var(--primary); min-height: 2px; }
.bar .fill.blue { background: var(--primary); }
.bar .cap { font-size: 10px; color: var(--sub); margin-top: 4px; }
.hbar { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 13px; }
.hbar .name { width: 90px; color: var(--sub); }
.hbar .track { flex: 1; height: 18px; background: var(--hair); border-radius: 999px; overflow: hidden; }
.hbar .val { height: 100%; background: var(--primary); border-radius: 999px; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 6px; }
.tab { flex: 0 0 auto; padding: 11px 18px; border-radius: 12px; background: var(--surface); color: var(--sub); font-weight: 600; font-size: 14px; box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.04); }
.tab.active { background: var(--primary); color: #fff; }
.tabpane { display: none; }
.tabpane.active { display: block; }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--hair); }
th { color: var(--sub); font-weight: 600; font-size: 13px; }

/* 提示横幅 */
.banner { background: var(--primary-soft); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px; font-size: 14px; color: var(--primary-d); font-weight: 600; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: rgba(29,29,31,.92); color: #fff; padding: 13px 22px; border-radius: 12px; font-size: 15px; opacity: 0; transition: .25s; z-index: 99; pointer-events: none; }
.toast.show { opacity: 1; }

.center { text-align: center; }
.mt { margin-top: 16px; }
.gap8 { display: flex; gap: 8px; flex-wrap: wrap; }
.grade-pill { display:inline-block; background:var(--hair); color:var(--ink); border-radius:999px; padding:3px 11px; font-size:13px; font-weight:600; }
.stars-pill { display:inline-block; background:#fff7e6; color:#c08c00; border-radius:999px; padding:3px 11px; font-size:13px; font-weight:700; }

/* 庆祝动画 */
.celebrate { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(245,245,247,0); opacity: 0; transition: opacity .3s; pointer-events: none; }
.celebrate.show { opacity: 1; background: rgba(245,245,247,.45); }
.celebrate-emoji { font-size: 72px; animation: pop .5s ease; }
.celebrate-text { margin-top: 10px; font-size: 22px; font-weight: 700; color: var(--primary); }
.confetti { position: absolute; top: -10%; left: 0; width: 100%; height: 100%; overflow: hidden; }
.confetti span { position: absolute; top: -20px; font-size: 22px; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }
@keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* 徽章 */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.level-row { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }

/* 学生卡片（家长端） */
.student-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.student-card { background: var(--surface); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent; transition: transform .12s, border-color .15s; text-align: center; border: 1px solid rgba(0,0,0,.04); }
.student-card:hover { transform: translateY(-3px); }
.student-card.sel { border-color: var(--primary); }
.sc-avatar { font-size: 42px; }
.sc-name { font-weight: 700; font-size: 17px; margin: 6px 0; }
.sc-meta { font-size: 13px; color: var(--sub); }
.sc-meta.promo { color: var(--purple); font-weight: 700; background: var(--purple-soft); border-radius: 8px; padding: 2px 8px; display: inline-block; margin-top: 4px; }
.student-card .btn.ghost.xs { margin-top: 8px; }

/* 思路框架 / 讲题 / 引导 */
.framework-box { background: var(--bg); border: 1px dashed var(--line); border-radius: 14px; padding: 14px; margin: 10px 0; font-size: 15px; line-height: 1.7; }
.teach-box { background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 18px; }
.guide-msg { background: var(--primary-soft); border-left: 4px solid var(--primary); border-radius: 10px; padding: 12px 14px; margin-top: 10px; font-size: 15px; line-height: 1.7; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; background: var(--surface); padding: 8px 12px; border-radius: 12px; border: 1px solid var(--hair); }
.sess-item { border-bottom: 1px dashed var(--hair); padding: 16px 0; }
.sess-item:last-child { border-bottom: none; }
.big-rate { font-size: 40px; font-weight: 700; color: var(--primary); }
.tag-pill { display: inline-block; background: #f1f3ff; color: #4a56d6; border: 1px solid #dfe3ff; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; margin: 2px 4px 2px 0; }
.coach-row { margin-top: 12px; }
.pointer { cursor: pointer; }
.pointer:hover { box-shadow: 0 8px 22px rgba(0,0,0,.08); }

/* AI 私教对话 */
.chat { max-height: 340px; overflow-y: auto; background: var(--bg); border: 1px solid var(--hair); border-radius: 16px; padding: 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 85%; padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.65; white-space: pre-wrap; }
.chat-msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--hair); }
.chat-msg.me { align-self: flex-end; background: var(--primary); color: #fff; }
.chat-input { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.chat-input input { flex: 1; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--hair); font-size: 15px; min-height: 46px; }
.ai-next { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* 月度成长评语 */
.report-card { background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 20px; margin-top: 6px; }
.report-text { font-size: 16px; line-height: 1.9; color: var(--ink); white-space: pre-wrap; }

/* 讲题多维度评分条 */
.dim-wrap { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; background: var(--bg); border: 1px solid var(--hair); border-radius: 14px; padding: 14px 16px; }
.dim-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.dim-name { width: 72px; color: var(--sub); flex-shrink: 0; }
.dim-track { flex: 1; height: 10px; background: var(--hair); border-radius: 999px; overflow: hidden; }
.dim-fill { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.dim-fill.hi { background: var(--green); }
.dim-fill.mid { background: var(--orange); }
.dim-fill.lo { background: var(--red); }
.dim-val { width: 30px; text-align: right; font-weight: 700; color: var(--ink); }

/* AI 下一步引导卡 */
.guide-card { background: var(--primary-soft); border: 1px solid #d6eaff; border-radius: 16px; padding: 14px 16px; }

/* iPad / 大屏触控优化 */
@media (min-width: 768px) and (max-width: 1024px) {
  html { font-size: 17px; }
  .wrap { max-width: 720px; }
  .btn { min-height: 52px; }
  .opt, .answer-input { min-height: 56px; }
  .tab { padding: 13px 20px; }
  .topbar { padding: 16px 24px; }
}

/* 小屏手机 */
@media (max-width: 480px) {
  .landing .hero .big { font-size: 24px; }
  .login-card { padding: 22px; }
  .stem { font-size: 18px; }
}

/* 弹窗（年级与学期设置） */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: var(--surface); border-radius: 20px; box-shadow: 0 16px 50px rgba(0,0,0,.18); width: 100%; max-width: 360px; padding: 24px; }
.modal .field { margin-top: 14px; }
.modal .field select { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--hair); font-size: 16px; background: var(--surface); }

/* 预习探险（巩固旧 + 预习新） */
.preview-box { margin: 10px 0; }
.preview-tip { background: linear-gradient(135deg,#e8f4fd,#eafaf0); border: 1px solid #cfe9ff; border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.7; color: #134a7a; }
.preview-encourage { background: #eafaf0; border: 1px solid #c8f5d2; border-radius: 14px; padding: 14px 16px; margin-top: 12px; font-size: 15px; line-height: 1.7; color: #157a38; font-weight: 600; }
.hints { margin-top: 10px; }
.hint { background: var(--surface); border: 1px solid var(--hair); border-radius: 12px; padding: 0 14px; margin-top: 8px; }
.hint summary { cursor: pointer; padding: 12px 0; font-size: 15px; font-weight: 600; color: var(--primary); list-style: none; }
.hint summary::-webkit-details-marker { display: none; }
.hint summary::before { content: "🔑 "; }
.hint[open] summary::before { content: "🔓 "; }

/* 教学进度卡（深圳北师大版进度推算） */
.prog-card { background: linear-gradient(135deg,#f4f9ff,#f3fbf5); border: 1px solid var(--hair); border-radius: 16px; padding: 14px 16px; }
.bar { height: 10px; background: #e6ecf3; border-radius: 999px; overflow: hidden; }
.fill { height: 100%; background: linear-gradient(90deg,#34c759,#0071e3); border-radius: 999px; transition: width .5s ease; }
.barlabel { font-size: 13px; color: var(--muted); margin-top: 6px; }
.prog-text { font-size: 14px; margin-top: 8px; line-height: 1.7; color: var(--text); }
.hint > div { padding: 0 0 14px; font-size: 15px; line-height: 1.7; color: var(--ink); }

/* 教材版本/地区标签（管理员后台与学生端共用） */
.tag { display: inline-block; font-size: 12px; color: #0071e3; background: #e8f1fd; border-radius: 8px; padding: 2px 8px; margin-left: 4px; white-space: nowrap; }
.tag.warn { color: #b25000; background: #fff2e0; }

/* 家长端学生卡底部地区/版本标签 */
.student-card .meta-line { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* 顶栏称呼 + 录音状态 */
.topbar .user .who { font-size: 14px; font-weight: 600; color: var(--ink); max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) { .topbar .user .who { display: none; } }
.btn.rec { background: var(--red) !important; color: #fff !important; animation: recpulse 1s infinite; }
@keyframes recpulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ========== 仪表盘精细化（苹果风） ========== */
.dash-top { align-items: stretch; }
.dash-top > .card { display: flex; flex-direction: column; }

/* 打卡月历 */
.checkin-card { padding: 20px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-header h3 { margin: 0; font-size: 17px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav .btn.icon { width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 50%; background: var(--hair); color: var(--ink); font-size: 18px; font-weight: 700; box-shadow: none; }
.cal-nav .btn.icon:hover { background: var(--line); }
#calMonthLabel { font-size: 15px; font-weight: 700; color: var(--ink); min-width: 6.5em; text-align: center; }
.streak-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.streak-row .streak { font-size: 22px; font-weight: 800; color: var(--primary); }
.streak-row .streak small { font-size: 13px; color: var(--sub); font-weight: 500; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-weekdays span { text-align: center; font-size: 12px; font-weight: 600; color: var(--sub); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; flex: 1; }
.cal-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink); background: var(--bg); position: relative; }
.cal-cell.other { color: var(--sub); opacity: .55; background: transparent; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--primary); color: var(--primary); }
.cal-cell.checked { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(0,113,227,.35); }
.cal-cell.checked.today { background: var(--primary); color: #fff; box-shadow: inset 0 0 0 2px #fff, 0 2px 8px rgba(0,113,227,.35); }
.cal-cell .dot { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }

/* 战绩卡 + 标签切换 */
.stats-card { padding: 0; overflow: hidden; }
.stats-tabs { display: flex; border-bottom: 1px solid var(--hair); }
.tab-btn { flex: 1; padding: 14px; background: transparent; border: none; font-size: 15px; font-weight: 600; color: var(--sub); cursor: pointer; transition: .15s; }
.tab-btn.active { color: var(--primary); background: var(--primary-soft); }
.stats-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.stats-pane { display: none; }
.stats-pane.active { display: block; }
.stat { text-align: center; padding: 10px 4px; border-radius: 14px; background: var(--bg); }
.stat .num { font-size: 26px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.stat .num.green { color: var(--green); }
.stat .num.red { color: var(--red); }
.stat .num.blue { color: var(--primary); }
.stat .num.purple { color: var(--purple); }
.stat .num.orange { color: var(--orange); }
.stat .label { font-size: 12px; color: var(--sub); margin-top: 4px; font-weight: 500; }

/* 未完成练习提示 */
.active-session { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--primary-soft); border: 1px solid #d6eaff; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; }
.active-session-info { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); }
.active-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse-dot 1.4s infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* 练习页工具栏 */
.practice-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.practice-toolbar .back-btn { padding-left: 10px; }
.practice-toolbar .q-progress { flex: 1; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink); }
.practice-actions { display: flex; align-items: center; gap: 10px; }
.practice-actions .timer { font-size: 17px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.practice-actions .btn.ghost { color: var(--sub); border-color: var(--hair); }
.practice-actions .btn.ghost:hover { color: var(--primary); border-color: var(--primary); }
.paused-overlay { position: fixed; inset: 0; background: rgba(245,245,247,.78); backdrop-filter: blur(6px); z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.paused-overlay .big { font-size: 28px; font-weight: 700; margin-bottom: 20px; color: var(--ink); }

/* 卡片微动效与层级 */
.card { transition: transform .15s, box-shadow .2s; }
.card:hover { box-shadow: 0 6px 28px rgba(0,0,0,.08); }
.btn { transition: transform .08s, box-shadow .2s, background .2s, border-color .2s; }
.btn:disabled { opacity: .45; }

/* 更精致的空状态与提示 */
.empty-state { text-align: center; padding: 26px; color: var(--sub); }
.empty-state .big { font-size: 40px; margin-bottom: 8px; }
