:root {
  --bg: #f6f7f9; --card: #ffffff; --ink: #1b2430; --muted: #5a6575; --line: #d6dbe3;
  --accent: #1f5fbf; --accent-ink: #ffffff; --ok: #1d6b3f; --ok-bg: #e5f4ea;
  --retry: #8a4b00; --retry-bg: #fdf0dc; --note-bg: #eef2f9; --focus: #1f5fbf;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c; --card: #1b212a; --ink: #e8ecf1; --muted: #a2adbb; --line: #333c49;
    --accent: #6ea1f0; --accent-ink: #0d1520; --ok: #7ed29d; --ok-bg: #173225;
    --retry: #f0b866; --retry-bg: #35280f; --note-bg: #1f2733; --focus: #8fb7f5;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.brand { font-weight: 700; letter-spacing: .02em; }
.notes-toggle { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.notes-toggle input { width: 18px; height: 18px; }
#screen { outline: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.progress { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; margin: 0 0 16px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.skill { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
ul.options { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.opt { width: 100%; text-align: left; background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 14px 14px; font: inherit; cursor: pointer; display: flex; gap: 12px; min-height: 52px; }
.opt .k { font-weight: 700; min-width: 1.2em; color: var(--muted); }
.opt:hover:not(:disabled) { border-color: var(--accent); }
.opt:disabled { cursor: default; }
.opt.chosen { border-color: var(--accent); }
.opt.right { border-color: var(--ok); background: var(--ok-bg); }
.opt.wrong { border-color: var(--retry); background: var(--retry-bg); }
button.primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 12px; padding: 14px 20px; font: inherit; font-weight: 600; min-height: 48px; cursor: pointer; width: 100%; margin-top: 16px; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px 0; }
fieldset.group { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
fieldset.group legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
label.group { display: block; margin: 16px 0 0; }
label.group .legend { display: block; font-weight: 600; margin-bottom: 8px; }
label.group select { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
label.chip { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; min-height: 48px; cursor: pointer; background: var(--card); }
label.chip:has(input:checked) { border-color: var(--accent); background: var(--note-bg); }
label.chip input { width: 18px; height: 18px; margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.feedback { margin-top: 16px; border-radius: 12px; padding: 14px; }
.feedback.ok { background: var(--ok-bg); color: var(--ok); }
.feedback.retry { background: var(--retry-bg); color: var(--retry); }
.feedback strong { display: block; margin-bottom: 4px; }
.feedback p { margin: 0; color: var(--ink); }
.note { margin-top: 14px; padding: 12px 14px; background: var(--note-bg); border-left: 4px solid var(--accent); border-radius: 8px; font-size: 15px; color: var(--ink); }
.note b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
body.notes-off .note { display: none; }
ul.summary { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
ul.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.tag-ok { color: var(--ok); font-weight: 600; white-space: nowrap; }
.tag-retry { color: var(--retry); font-weight: 600; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
