:root {
  color-scheme: light;
  --paper: #f3f2e9;
  --panel: #fffefb;
  --ink: #1e302b;
  --muted: #53635a;
  --green: #194b41;
  --deep-green: #163b36;
  --line: #d9dfd6;
  --sage: #e9f1e7;
  --rust: #8c3829;
  --rust-wash: #fbf0eb;
  --gold: #d5bc7d;
  font: 16px/1.65 'Microsoft JhengHei', 'PingFang TC', 'Noto Sans TC', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }
a { color: var(--green); text-underline-offset: 0.23em; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #96651d;
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }

.masthead { color: #fffdf5; background: var(--deep-green); border-bottom: 2px solid var(--gold); }
.masthead-inner {
  max-width: 40rem;
  margin: auto;
  min-height: 64px;
  padding: 12px 20px;
  display: flex;
  gap: 10px 24px;
  justify-content: space-between;
  align-items: center;
}
.publisher { font-size: 1.08rem; font-weight: 750; letter-spacing: 0.13em; }
.series { color: #e1e9de; font-size: 0.88rem; }
main { width: min(100% - 28px, 36rem); margin: clamp(22px, 7vw, 65px) auto 0; }
.sheet {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: clamp(19px, 5vw, 36px);
  background: var(--panel);
  box-shadow: 0 12px 32px #193b3010;
}
.opening { padding-block: clamp(30px, 8vw, 54px); }
.eyebrow { color: var(--green); font-size: 0.86rem; letter-spacing: 0.06em; font-weight: 700; }
h1 { margin-top: 8px; font-size: clamp(2rem, 7.4vw, 3.3rem); line-height: 1.2; letter-spacing: -0.035em; }
h1 span { white-space: nowrap; }
.lead { margin-top: 16px; color: var(--muted); }
.load-status { margin-top: 22px; color: var(--muted); }
.actions { display: grid; gap: 10px; margin-top: 22px; }
.small, .footnote, .source { color: var(--muted); font-size: 0.85rem; }
.footnote { margin-top: 14px; }
footer { padding: 20px 12px 28px; color: var(--muted); text-align: center; font-size: 0.82rem; }

.button, .text-button { font-weight: 700; cursor: pointer; }
.button {
  width: 100%;
  min-height: 48px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 9px;
}
.primary { background: var(--green); color: #fff; }
.primary:hover:not(:disabled) { background: var(--deep-green); }
.primary:disabled { background: #e5eae4; color: #55635a; cursor: default; }
.secondary { background: var(--panel); color: var(--green); border-color: var(--line); }
.secondary:hover { background: var(--sage); }
.text-button {
  min-height: 44px;
  padding: 4px 0;
  color: var(--green);
  background: transparent;
  border: none;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}
#reload { margin-top: 12px; }
.round-bar { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.round-bar .text-button { flex: none; font-size: 0.87rem; }
.progress-label { font-size: 0.88rem; font-variant-numeric: tabular-nums; color: var(--muted); }
progress { width: 100%; height: 8px; margin: 5px 0 20px; display: block; accent-color: var(--green); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 15px; font-size: clamp(1.07rem, 4.8vw, 1.3rem); line-height: 1.58; font-weight: 750; }
.choices { display: grid; gap: 8px; }
.choice {
  display: grid;
  grid-template-columns: 18px 1.2rem minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
  min-height: 49px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}
.choice input { margin: 0.32em 0 0; accent-color: var(--green); width: 16px; height: 16px; }
.letter { color: var(--green); font-weight: 700; }
.choice:has(:checked), .choice.correct { background: var(--sage); border-color: var(--green); }
.choice.incorrect { background: var(--rust-wash); border-color: var(--rust); }
.choice:has(:disabled) { cursor: default; }
.choice-text { overflow-wrap: break-word; }
#confirm, #next { margin-top: 17px; }
.feedback { margin-top: 17px; padding: 12px 14px; border-radius: 8px; background: var(--sage); }
.feedback[data-correct="false"] { background: var(--rust-wash); }
.verdict { margin-bottom: 5px; font-weight: 750; color: var(--green); }
.feedback[data-correct="false"] .verdict { color: var(--rust); }
.reference { margin-top: 9px; color: var(--green); font-weight: 650; font-size: 0.9rem; }
.source { margin-top: 3px; }

h2 { margin-top: 4px; font-size: 1.75rem; }
.score { display: flex; gap: 10px; align-items: baseline; margin: 5px 0 15px; color: var(--green); }
.score strong { font-size: 3.3rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.score span { font-weight: 700; }
.review-details { background: var(--sage); border-radius: 8px; padding: 11px 14px; }
.review-details h3 { color: var(--green); font-size: 1rem; }
.review-details ul { margin: 5px 0 2px; padding-inline-start: 1.2em; }
.book { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.book p { color: var(--muted); font-size: 0.9rem; }
.book a { display: inline-flex; min-height: 44px; gap: 7px; align-items: center; font-weight: 700; }
