/* HSK 单词闯关 - 学生端样式（多邻国风格，绿色主题） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --green: #58cc02; --green-dark: #46a302; --blue: #1cb0f6; --red: #ff4b4b;
  --bg: #f7f9fb; --card: #ffffff; --text: #3c3c3c; --muted: #afafaf;
  --border: #e5e5e5; --gold: #ffc800;
  /* 动态视口高度：手机浏览器地址栏收起/展开时 dvh 实时变化，vh 是固定最大高度（地址栏收起时的尺寸）
     不支持 dvh 的老浏览器忽略第二条声明，自动回退到 1vh */
  --vh: 1vh;
  --vh: 1dvh;
  /* 做题区自适应缩放：随视口高度走，保证任何分辨率一屏放完不滚动 */
  --big-fs: clamp(28px, calc(var(--vh) * 7.2), 52px);        /* 题词大字 */
  --speak-sz: clamp(44px, calc(var(--vh) * 7.2), 64px);      /* 喇叭按钮 */
  --opt-gap: clamp(7px, calc(var(--vh) * 1.5), 12px);        /* 选项间距 */
  --opt-pad: clamp(9px, calc(var(--vh) * 1.8), 15px);        /* 选项内边距 */
  --char-fs: clamp(22px, calc(var(--vh) * 5), 30px);         /* 补全题字块 */
  --char-pad: clamp(9px, calc(var(--vh) * 1.7), 16px);       /* 补全题字块内边距 */
}
html, body { height: 100%; overscroll-behavior: none; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
  display: flex; justify-content: center;
}
/* 做题弹层打开时锁住页面滚动（移动端防止 document 拖动） */
body.no-scroll { overflow: hidden; }
.screen { width: 100%; max-width: 480px; min-height: calc(var(--vh) * 100); display: flex; flex-direction: column; position: relative; background: var(--bg); }
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
#authScreen { justify-content: center; padding: 24px; }
.auth-box { text-align: center; }
.logo { font-size: 64px; margin-bottom: 8px; }
h1 { font-size: 28px; letter-spacing: 2px; }
.sub { color: var(--muted); margin: 6px 0 24px; font-size: 14px; }
.tabs { display: flex; background: #ececec; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.tab { flex: 1; border: none; background: transparent; padding: 10px; border-radius: 10px; font-size: 15px; cursor: pointer; color: #777; }
.tab.active { background: #fff; color: var(--green-dark); font-weight: 700; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.form { display: flex; flex-direction: column; gap: 12px; }
input {
  border: 2px solid var(--border); border-radius: 12px; padding: 14px; font-size: 16px;
  background: #fff; outline: none; text-align: center;
}
input:focus { border-color: var(--blue); }
.btn-primary {
  border: none; border-bottom: 4px solid rgba(0,0,0,.15); background: var(--green); color: #fff;
  border-radius: 14px; padding: 15px; font-size: 17px; font-weight: 800; cursor: pointer; letter-spacing: 1px;
}
.btn-primary:active { transform: translateY(2px); border-bottom-width: 2px; }
.btn-primary:disabled { background: #d7d7d7; cursor: default; }
.hint { color: var(--muted); font-size: 13px; }
.msg { margin-top: 14px; font-size: 14px; min-height: 20px; }
.msg.err { color: var(--red); } .msg.ok { color: var(--green-dark); }

/* ---------- 主界面 ---------- */
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--card); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
.h-right { display: flex; gap: 8px; }
.pill { background: #fff3d6; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; }
.pill.blue { background: #ddf4ff; }

main { flex: 1; padding: 18px 16px 90px; overflow-y: auto; }

nav {
  position: fixed; bottom: 0; width: 100%; max-width: 480px; display: flex;
  background: var(--card); border-top: 1px solid var(--border); z-index: 5;
}
.navbtn {
  flex: 1; border: none; background: none; padding: 8px 0 10px; font-size: 12px;
  color: var(--muted); cursor: pointer; line-height: 1.35;
}
.navbtn span { font-size: 22px; display: block; }
.navbtn.active { color: var(--green-dark); font-weight: 700; }
.navbtn small { font-size: 10px; }

/* ---------- 课程卡片 ---------- */
.section-title { font-size: 19px; font-weight: 800; margin: 6px 0 14px; }
.section-title small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.level-card {
  background: var(--card); border-radius: 16px; padding: 18px; margin-bottom: 14px;
  border: 2px solid var(--border); box-shadow: 0 3px 0 var(--border);
}
.level-card h3 { font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.due-badge { background: var(--gold); color: #6b4d00; font-size: 12px; border-radius: 999px; padding: 3px 10px; }
.level-meta { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.bar { height: 12px; background: #ececec; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); border-radius: 999px; transition: width .4s; }
.card-btn {
  margin-top: 12px; width: 100%; border: none; background: var(--green); color: #fff;
  padding: 12px; border-radius: 12px; font-size: 16px; font-weight: 800;
  border-bottom: 4px solid var(--green-dark); cursor: pointer;
}
.card-btn:active { transform: translateY(2px); border-bottom-width: 2px; }

/* ---------- 专项训练 ---------- */
.practice-panel {
  background: var(--card); border-radius: 16px; padding: 16px; margin-bottom: 14px;
  border: 2px solid #cfe8ff; box-shadow: 0 3px 0 #d5e9f7;
}
.practice-panel h3 { font-size: 16px; margin-bottom: 8px; }
.practice-panel h3 small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.p-label { color: var(--muted); font-size: 12px; margin: 8px 0 6px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--border); background: #fff; color: #777;
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .15s;
}
.chip:active { transform: translateY(1px); }
.chip.on {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.12);
}
.practice-panel .card-btn { margin-top: 14px; }

/* ---------- 训练方式选择弹层 ---------- */
.mode-top { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; }
.mode-top .close-btn { width: 30px; }
.mode-title { flex: 1; text-align: center; font-size: 18px; font-weight: 800; line-height: 1.4; }
.mode-title small { color: var(--muted); font-weight: 400; font-size: 12px; }
.mode-sheet { flex: 1; display: flex; flex-direction: column; padding: 14px 20px 40px; overflow-y: auto; }
.mode-btn { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  border: 2px solid var(--border); border-bottom-width: 5px; background: #fff;
  border-radius: 16px; padding: 16px 18px; cursor: pointer; }
.mode-btn.study { border-color: #b7e1a3; background: #f4ffec; }
.mode-btn .mo-ic { font-size: 28px; }
.mode-btn .mo-t { font-size: 16px; font-weight: 800; }
.mode-btn .mo-t small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 2px; }
.mode-btn .mo-arrow { margin-left: auto; color: var(--muted); font-size: 20px; }
.mode-btn.study .mo-arrow { color: var(--green); }
.mode-btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.mode-panel { margin-top: 16px; background: var(--card); border: 2px solid #cfe8ff;
  border-radius: 16px; padding: 16px; box-shadow: 0 3px 0 #d5e9f7; }
.mode-panel h4 { font-size: 16px; }
.mode-panel h4 small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 6px; }
.mode-panel .chip-row { margin-top: 4px; }

/* 复习页 */
.review-hero {
  background: linear-gradient(135deg, #1cb0f6, #4f7cff); color: #fff; border-radius: 20px;
  padding: 34px 22px; text-align: center; margin-top: 8px;
}
.review-hero .big { font-size: 54px; font-weight: 900; }
.review-hero p { opacity: .9; margin: 6px 0 18px; font-size: 14px; }
.review-hero button {
  background: #fff; color: #1cb0f6; border: none; border-radius: 14px; padding: 13px 40px;
  font-size: 17px; font-weight: 800; cursor: pointer; border-bottom: 4px solid #d3e9f5;
}
.review-hero button:disabled { opacity: .6; }

/* 我的 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-box { background: var(--card); border-radius: 14px; padding: 16px; text-align: center; border: 2px solid var(--border); }
.stat-box .num { font-size: 26px; font-weight: 900; color: var(--green-dark); }
.stat-box .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-bottom: 8px; }
.cal-cell { aspect-ratio: 1; border-radius: 6px; background: #ececec; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #999; }
.cal-cell.l1 { background: #d3f1bb; } .cal-cell.l2 { background: #a8e078; }
.cal-cell.l3 { background: var(--green); color: #fff; }
.board { background: var(--card); border-radius: 14px; border: 2px solid var(--border); padding: 6px 14px; }
.board-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 15px; }
.board-row:last-child { border-bottom: none; }
.board-row .rank { width: 28px; font-weight: 900; color: var(--muted); }
.board-row .rank.r1 { color: var(--gold); } .board-row .rank.r2 { color: #9aa5b1; } .board-row .rank.r3 { color: #cd7f32; }
.board-row .nm { flex: 1; font-weight: 600; }
.board-row.me .nm { color: var(--blue); }
.board-row .sc { font-weight: 800; }
.logout { margin-top: 20px; width: 100%; background: none; border: 2px solid var(--border); border-radius: 12px; padding: 12px; color: var(--muted); font-size: 15px; cursor: pointer; }

/* ---------- 学习弹层 ---------- */
.overlay {
  position: fixed; inset: 0; background: var(--bg); z-index: 50;
  display: flex; flex-direction: column; max-width: 480px; margin: 0 auto;
  overscroll-behavior: contain;
}
.lesson-top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; }
.close-btn { border: none; background: none; font-size: 18px; color: var(--muted); cursor: pointer; padding: 6px; }
.lp-bar { flex: 1; height: 14px; background: #ececec; border-radius: 999px; }
.lp-fill { height: 100%; background: var(--green); border-radius: 999px; width: 0%; transition: width .35s; }
.lesson-body { flex: 1; display: flex; flex-direction: column; padding: 6px 20px 112px; overflow: hidden; min-height: 0; }

.q-prompt { text-align: center; margin: 8px 0 2px; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.q-prompt small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; margin-top: 3px; }
.q-word { text-align: center; margin: 4px 0; flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.q-word .big { font-size: var(--big-fs); font-weight: 900; letter-spacing: 4px; }
.q-word .py { color: var(--blue); font-size: clamp(15px, calc(var(--vh) * 2.4), 19px); margin-top: 4px; flex-shrink: 0; }
.q-word .ps { display: inline-block; background: #ddf4ff; color: #1899d6; border-radius: 6px; font-size: 11px; padding: 2px 8px; margin-top: 8px; flex-shrink: 0; }
.q-word .hint-id { color: var(--muted); font-size: 13px; margin-top: 8px; flex-shrink: 0; }
.speak-btn {
  display: block; margin: 4px auto 2px; border: none; background: #ddf4ff; color: #1899d6;
  width: var(--speak-sz); height: var(--speak-sz); border-radius: 50%; font-size: clamp(20px, calc(var(--vh) * 3.8), 28px); cursor: pointer;
  border-bottom: 4px solid #a5dbf0; flex-shrink: 0;
}
.speak-btn.big { width: min(86px, calc(var(--vh) * 14)); height: min(86px, calc(var(--vh) * 14)); font-size: min(36px, calc(var(--vh) * 6.5)); margin-top: 8px; }
.speak-btn:active { transform: translateY(2px); border-bottom-width: 2px; }
.q-meaning { text-align: center; font-size: clamp(20px, calc(var(--vh) * 4.5), 26px); font-weight: 700; margin: 0; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }

.options { display: flex; flex-direction: column; gap: var(--opt-gap); margin-top: auto; flex-shrink: 0; }
.opt {
  border: 2px solid var(--border); border-bottom-width: 5px; background: #fff; border-radius: 14px;
  padding: var(--opt-pad); font-size: clamp(15px, calc(var(--vh) * 2.7), 18px); cursor: pointer; text-align: left; transition: all .12s;
}
.opt .idx { display: inline-block; color: var(--muted); border: 2px solid var(--border); border-radius: 8px; width: 26px; height: 26px; line-height: 22px; text-align: center; font-size: 13px; margin-right: 10px; }
.opt.selected { border-color: var(--blue); background: #ddf4ff; color: #1899d6; }
.opt.selected .idx { border-color: #84d8ff; color: #84d8ff; }
.opt.correct { border-color: var(--green); background: #d7ffb8; color: var(--green-dark); }
.opt.wrong { border-color: var(--red); background: #ffdfe0; color: var(--red); }

/* 补全题：单字选项 2×2 网格（去掉序号，字放大，紧凑不空旷） */
.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--opt-gap); }
.opt-grid .opt { text-align: center; font-size: var(--char-fs); font-weight: 800; padding: var(--char-pad) 8px; }

.feedback {
  position: fixed; bottom: 0; width: 100%; max-width: 480px; padding: 18px 20px 26px;
  border-radius: 20px 20px 0 0; display: flex; align-items: center; gap: 14px; z-index: 60;
}
.feedback.good { background: #d7ffb8; } .feedback.bad { background: #ffdfe0; }
.fb-icon { font-size: 30px; }
.fb-text { flex: 1; font-weight: 800; font-size: 16px; }
.feedback.good .fb-text { color: var(--green-dark); } .feedback.bad .fb-text { color: var(--red); }
.fb-text small { display: block; font-weight: 400; font-size: 13px; margin-top: 2px; }
.feedback .btn-primary { padding: 12px 26px; }
.feedback.bad .btn-primary { background: var(--red); }

/* 完成页 */
.done { text-align: center; padding-top: 60px; }
.done .emoji { font-size: 70px; }
.done h2 { margin: 16px 0 6px; font-size: 24px; }
.done p { color: var(--muted); font-size: 14px; }
.done .nums { display: flex; justify-content: center; gap: 30px; margin: 26px 0; }
.done .nums .n { font-size: 30px; font-weight: 900; color: var(--gold); }
.done .nums .l { font-size: 12px; color: var(--muted); }

.empty-tip { text-align: center; color: var(--muted); padding: 60px 20px; font-size: 15px; line-height: 1.8; }

/* 选项内英语小字 */
.opt-en { display: block; font-size: 12px; color: #8a8f99; font-weight: 400; margin-top: 2px; }
.opt-py { display: block; font-size: 12px; color: #8a8f99; font-weight: 400; margin-top: 2px; }

/* 排列题 */
.seg-line { min-height: clamp(44px, calc(var(--vh) * 7.5), 58px); border: 2px dashed var(--border); border-radius: 14px; padding: 6px 10px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 6px 0 4px; flex-shrink: 0; }
.seg-line:empty::after { content: "👆 点下面的词语组句"; color: var(--muted); font-size: 13px; }
.seg-bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.seg { border: 2px solid var(--border); background: #fff; border-radius: 12px; padding: clamp(5px, calc(var(--vh) * 1), 8px) clamp(9px, 1.8vw, 14px);
  font-size: clamp(14px, calc(var(--vh) * 2.5), 17px); font-weight: 700; color: inherit; cursor: pointer; transition: all .15s; }
.seg:active { transform: scale(.95); }
.seg-bank .seg.used { opacity: .25; }
.seg.in-ans { border-color: #84d8ff; background: #ddf4ff; color: #1899d6; }
.seg-ok { display: block; margin: 10px auto 0; min-width: 140px; flex-shrink: 0; }
.seg-ok:disabled { opacity: .4; cursor: default; }
.q-arr-word { font-size: clamp(19px, calc(var(--vh) * 3.4), 24px); font-weight: 900; color: var(--blue, #1899d6); }
.q-arr-word .py { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.q-word-static { flex: 0; justify-content: flex-start; }

/* ================= 高级动画层（全 transform/opacity，GPU 合成不卡顿） ================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes shakeX { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes bumpK { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fbUp { 0% { transform: translateY(110%); } 75% { transform: translateY(-8px); } 100% { transform: none; } }
@keyframes iconPop { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes growBar { from { width: 0; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes cfFall { 0% { transform: translateY(calc(var(--vh) * -6)) rotate(0); opacity: 1; } 100% { transform: translateY(calc(var(--vh) * 104)) rotate(760deg); opacity: .85; } }
@keyframes correctPop { 0% { transform: scale(1); } 45% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes trophyIn { 0% { transform: scale(0) rotate(-24deg); } 60% { transform: scale(1.18) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes waveUp { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* --- 登录页 --- */
.auth-box { animation: fadeUp .5s cubic-bezier(.22, 1, .36, 1) both; }
.logo { animation: floatY 3.2s ease-in-out infinite; }

/* --- 页面切换：内容逐个浮入 --- */
#view.view-enter > * { animation: fadeUp .5s cubic-bezier(.22, 1, .36, 1) both; }
#view.view-enter > *:nth-child(2) { animation-delay: .06s; }
#view.view-enter > *:nth-child(3) { animation-delay: .12s; }
#view.view-enter > *:nth-child(4) { animation-delay: .18s; }
#view.view-enter > *:nth-child(5) { animation-delay: .24s; }
#view.view-enter > *:nth-child(6) { animation-delay: .30s; }
#view.view-enter > *:nth-child(7) { animation-delay: .36s; }
#view.view-enter > *:nth-child(8) { animation-delay: .42s; }
#view.view-enter > *:nth-child(n+9) { animation-delay: .48s; }
.bar-fill { animation: growBar .8s cubic-bezier(.22, 1, .36, 1) both; }
.stat-grid .stat-box { animation: popIn .45s both; }
.stat-grid .stat-box:nth-child(2) { animation-delay: .08s; }
.stat-grid .stat-box:nth-child(3) { animation-delay: .16s; }
.stat-grid .stat-box:nth-child(4) { animation-delay: .24s; }
.cal-cell { animation: popIn .35s both; }
.board-row { animation: fadeUp .4s both; }

/* --- 学习弹层：底部滑入 --- */
.overlay { animation: sheetUp .38s cubic-bezier(.22, 1, .36, 1); }
.lp-fill { transition: width .5s cubic-bezier(.22, 1.2, .36, 1); }

/* --- 切题：新题滑入 + 选项弹出 --- */
.q-wrap { display: flex; flex-direction: column; flex: 1; animation: fadeUp .32s cubic-bezier(.22, 1, .36, 1) both; }
.q-wrap .q-word .big { animation: popIn .4s .05s both; }
.options .opt { animation: popIn .38s both; }
.options .opt:nth-child(2) { animation-delay: .07s; }
.options .opt:nth-child(3) { animation-delay: .14s; }
.options .opt:nth-child(4) { animation-delay: .21s; }
.seg-bank .seg { animation: popIn .35s both; }
.seg-bank .seg:nth-child(2) { animation-delay: .06s; }
.seg-bank .seg:nth-child(3) { animation-delay: .12s; }
.seg-bank .seg:nth-child(4) { animation-delay: .18s; }
.seg-bank .seg:nth-child(5) { animation-delay: .24s; }
.seg-bank .seg:nth-child(6) { animation-delay: .30s; }
.seg.in-ans { animation: popIn .22s both; }
.seg-line.shake { animation: shakeX .45s; }
.seg-line.wave .seg { animation: waveUp .55s both; }
.seg-line.wave .seg:nth-child(2) { animation-delay: .08s; }
.seg-line.wave .seg:nth-child(3) { animation-delay: .16s; }
.seg-line.wave .seg:nth-child(4) { animation-delay: .24s; }
.seg-line.wave .seg:nth-child(5) { animation-delay: .32s; }
.seg-line.wave .seg:nth-child(6) { animation-delay: .40s; }

/* --- 判分反馈 --- */
.opt.correct { animation: correctPop .38s; }
.opt.wrong { animation: shakeX .45s; }
.feedback { animation: fbUp .5s cubic-bezier(.2, .9, .3, 1.15); }
.fb-icon { animation: iconPop .45s .08s both; }
.bump { animation: bumpK .45s; display: inline-block; }
#lpFill.full-glow {
  background: linear-gradient(90deg, var(--green) 40%, #8ef04d 50%, var(--green) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear;
}

/* --- 完成页 --- */
.done .emoji { animation: trophyIn .65s .15s both, floatY 2.6s 1s ease-in-out infinite; }
.done h2 { animation: fadeUp .5s .25s both; }
.done p { animation: fadeUp .5s .32s both; }
.done .nums > div { animation: popIn .5s both; }
.done .nums > div:nth-child(2) { animation-delay: .15s; }
.done .btn-primary { animation: popIn .45s .3s both; }
.cf { display: block; position: fixed; top: -20px; z-index: 80; pointer-events: none; animation: cfFall linear both; }

/* --- 桌面 hover 悬浮（手机不吃这些） --- */
@media (hover: hover) {
  .level-card { transition: transform .22s cubic-bezier(.22, 1, .36, 1), box-shadow .22s; }
  .level-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(20, 60, 20, .10); }
  .opt { transition: transform .15s, border-color .15s, background .15s; }
  .opt:not(.selected):not(.correct):not(.wrong):hover { transform: translateY(-2px); border-color: #b9dff5; background: #f4fbff; }
  .card-btn { transition: transform .15s, filter .15s; }
  .card-btn:hover { filter: brightness(1.06); }
  .seg:not(.used):hover { border-color: #b9dff5; transform: translateY(-2px); }
}
/* --- 减少动态偏好：全部关掉 --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- 矮视口（≤600px 高）进一步压缩，做题保持一屏 --- */
@media (max-height: 600px) {
  :root {
    --big-fs: clamp(24px, calc(var(--vh) * 6.5), 36px);
    --speak-sz: clamp(38px, calc(var(--vh) * 6.5), 48px);
    --opt-gap: 6px;
    --opt-pad: clamp(7px, calc(var(--vh) * 1.4), 10px);
    --char-fs: clamp(20px, calc(var(--vh) * 4.5), 26px);
    --char-pad: clamp(7px, calc(var(--vh) * 1.4), 10px);
  }
  .lesson-body { padding-bottom: 104px; }
  .lesson-top { padding: 10px 14px 4px; }
  .q-prompt { margin: 4px 0 0; }
}
