:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #607080;
  --line: #d9e1e8;
  --paper: #fbfcfd;
  --panel: #fff;
  --accent: #16796f;
  --accent-strong: #0e5d55;
  --soft: #eaf6f4;
  --good: #257641;
  --bad: #b43131;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 0; overflow-x: hidden; }
body { background: var(--paper); color: var(--ink); }
header { background: #edf6f4; border-bottom: 1px solid var(--line); padding: 18px clamp(16px, 4vw, 42px); }
.top { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
h1 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 38px); line-height: 1.12; letter-spacing: 0; }
.subtitle { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.progress { min-width: 160px; text-align: right; color: var(--accent-strong); font-weight: 800; }
main { max-width: 1120px; margin: 0 auto; padding: 20px clamp(14px, 4vw, 42px) 42px; }
nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
button { min-height: 42px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 0 14px; font: inherit; cursor: pointer; max-width: 100%; }
button.active, .primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 800; }
.ghost { color: var(--accent-strong); border-color: #acd6d0; background: var(--soft); font-weight: 700; }
section { display: none; }
section.active { display: block; }
audio { width: 100%; margin: 10px 0 16px; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.stat { padding: 12px; }
.stat strong { display: block; font-size: 24px; margin-bottom: 2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.card { padding: 14px; }
.card.done { border-color: #9ccfb3; background: #f4fbf6; }
.word { font-size: 26px; font-weight: 850; line-height: 1.18; overflow-wrap: anywhere; }
.meaning { color: var(--muted); margin-top: 4px; min-height: 24px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.section-title { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 12px 0; }
.section-heading { min-width: 0; }
.section-title h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.section-description { margin: 5px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.quiz { display: grid; gap: 14px; }
.question-head { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.option { text-align: left; padding: 12px; min-height: 50px; overflow-wrap: anywhere; }
.option.selected { border-color: var(--accent); background: var(--soft); color: var(--accent-strong); font-weight: 800; }
.option.correct { border-color: var(--good); background: #eef9f1; color: var(--good); font-weight: 800; }
.option.wrong { border-color: var(--bad); background: #fff1f1; color: var(--bad); font-weight: 800; }
.feedback { min-height: 26px; margin-top: 10px; color: var(--muted); font-weight: 800; }
.feedback.good { color: var(--good); }
.feedback.bad { color: var(--bad); }
.results { display: grid; gap: 10px; margin-top: 14px; }
.result-item { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #fff; display: grid; gap: 6px; overflow-wrap: anywhere; }
.result-item.good { border-color: #9ccfb3; background: #f4fbf6; }
.result-item.bad { border-color: #e0a0a0; background: #fff7f7; }
.result-item.pending { background: #f8fafc; }
.result-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.result-head span { font-weight: 800; color: var(--accent-strong); }
.result-item.good .result-head span { color: var(--good); }
.result-item.bad .result-head span { color: var(--bad); }
.empty-result { color: var(--muted); line-height: 1.5; }
.source { margin-top: 10px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .top { grid-template-columns: 1fr; }
  .progress { text-align: left; }
  .options { grid-template-columns: 1fr; }
  .section-title { align-items: flex-start; flex-direction: column; }
  nav button { flex: 1 1 31%; padding-inline: 10px; }
}
