:root {--amber:#98ddfa}
.shell {max-width:900px}
#storage-note {padding:12px 14px;margin-bottom:16px;border:1px solid var(--line);border-radius:var(--ui-radius,14px);background:var(--panel);color:var(--ui-text,#eef4fa)}
.hero {min-height:0;background:linear-gradient(120deg,#20384b,#15222e);padding:20px}
.hero .words {max-width:100%}
.hero h1 {font-size:clamp(28px,3.4vw,36px)}
.hero p {max-width:52ch}
.hero .eyebrow {color:#9edcf7}
.hero .hero-stats {margin-top:13px;color:#bcd2e1;font-size:13px}
.quiz-presets {margin-top:16px;padding:0;border:1px solid var(--line);border-radius:var(--ui-radius,14px);background:var(--panel)}
.quiz-presets summary {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;padding:12px 14px;cursor:pointer;font-size:15px;font-weight:650;list-style:none}
.quiz-presets summary::-webkit-details-marker {display:none}
.quiz-presets summary::after {content:"";display:inline-block;flex:none;width:8px;height:8px;border:solid currentColor;border-width:0 1.7px 1.7px 0;transform:rotate(45deg);color:#9edcf7;margin:0 4px 4px 0}
.quiz-presets[open] summary::after {transform:rotate(225deg);margin-bottom:-3px}
.quiz-presets summary span {margin-left:auto;font-weight:400;font-size:12px;color:var(--muted)}
.quiz-presets-body {display:grid;gap:10px;padding:0 14px 14px}
.quiz-presets summary:focus-visible {outline:2px solid var(--ui-accent,#9bdafa);outline-offset:3px;border-radius:inherit}
.quiz-preset-row {display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px}
.quiz-preset-row label {display:grid;gap:4px;flex:1 1 170px;min-width:0;color:var(--muted);font-size:13px}
.quiz-preset-row :is(input,select) {width:100%;min-width:0;min-height:44px;padding:9px 10px;border:1px solid var(--line);border-radius:var(--ui-control-radius,10px);background:#111d29;color:var(--ui-text,#eef4fa);font:inherit;font-size:16px}
.quiz-presets .secondary:disabled {opacity:.55;cursor:default}
.quiz-presets [role="status"]:empty {display:none}
.selection-tools {display:flex;justify-content:space-between;align-items:center;gap:12px;margin:20px 0 12px}
.selection-tools h2 {font-size:19px}
.text-button {padding:8px 2px;border:0;background:none;color:#a6def7;min-height:44px;font-size:13px}
.trainer-section {border:1px solid var(--line);border-radius:var(--ui-radius,14px);background:var(--panel);margin-bottom:10px;overflow:hidden}
.trainer-section summary {display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer;padding:14px;list-style:none;font-size:16px;font-weight:700}
.trainer-section summary::-webkit-details-marker {display:none}
.trainer-section summary::after {content:"";display:inline-block;flex:none;width:8px;height:8px;border:solid currentColor;border-width:0 1.7px 1.7px 0;transform:rotate(45deg);color:#9edcf7;margin:0 4px 4px 0}
.trainer-section[open] summary::after {transform:rotate(225deg);margin-bottom:-3px}
.trainer-section summary small {color:var(--muted);font-size:12px;font-weight:500;margin-left:auto}
.trainer-section[data-trainer=betrieb] {border-top:2px solid #98d7f6}
.trainer-section[data-trainer=tempo] {border-top:2px solid #dfc3f8}
.trainer-section[data-trainer=fahrplan] {border-top:2px solid #f2cd91}
.trainer-section[data-trainer=signale] {border-top:2px solid #a1ddbd}
.trainer-section[data-trainer=rangieren] {border-top:2px solid #ffc49b}
.trainer-section[data-trainer=bremsen] {border-top:2px solid #f3b7c4}
.topic-options {padding:0 12px 8px}
.topic-check {display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 8px;border-top:1px solid var(--line-soft);cursor:pointer}
.topic-check input {appearance:auto;accent-color:#9dddf9;width:21px;height:21px;margin:0;flex-shrink:0}
.topic-check:has(input:checked) {border-radius:10px;background:#203747}
.topic-check span {min-width:0;flex:1}
.topic-check strong {display:block;font-size:14px;line-height:1.3}
.topic-check small {display:block;color:var(--muted);font-size:12px;margin-top:3px;line-height:1.3}
.topic-check .count {flex:0 0 auto;font:700 12px/1 ui-monospace,monospace;color:#b7c9d6}
.group-tools {display:flex;justify-content:space-between;padding:0 18px 8px}
.setup {margin:22px 0}
.setup-section + .setup-section {margin-top:20px}
.setup-section h2 {font-size:17px;margin-bottom:9px}
.selection-summary {position:sticky;bottom:0;z-index:2;padding:12px max(0px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom));margin-top:16px;background:#0d151ff5;border-top:1px solid var(--ui-border,#304356);backdrop-filter:blur(10px)}
.selection-summary p {font-size:13px;color:#bccddd;margin-bottom:9px}
.selection-summary .action {width:100%}
.action:disabled {opacity:.45}
.field .written {font-size:16px;max-width:100%}
.feedback p + p {margin-top:7px}
.feedback .answer-label {font-weight:800;color:#cfe5f3}
.typed-answer {white-space:pre-wrap;overflow-wrap:anywhere}
.quiz-heading .eyebrow {line-height:1.6}
.selected-list {color:var(--muted);font-size:13px;margin-top:10px}
.selected-list span {display:block;margin-top:4px}
.summary .score {margin-top:12px}
.question-source {color:#a9bfd0;font-size:12px;margin:4px 0 12px}
.mistake {overflow-wrap:anywhere}
.brand-name {font-size:12px}
.brand-mark {background:#97ddfa}
@media(min-width:680px) {.topic-options {display:grid;grid-template-columns:1fr 1fr;gap:0 12px}.setup {display:grid;grid-template-columns:1fr 1fr;gap:20px}.setup-section + .setup-section {margin-top:0}}

.topic-search {margin:0 0 12px}
.topic-search label {display:block;font-size:14px;font-weight:650;margin-bottom:5px}
.topic-search > div {display:flex;gap:10px;align-items:center}
.topic-search input {min-width:0;flex:1;width:100%}
.topic-search .text-button {flex:0 0 auto}
.topic-search p {min-height:1.5em;margin:6px 0 0;font-size:13px;color:var(--muted)}
.quiz-selected-topics {border:1px solid var(--line);border-radius:12px;background:var(--panel);margin-bottom:12px}
.quiz-selected-topics summary {min-height:44px;padding:11px 12px;cursor:pointer;font-weight:600;font-size:14px}
.quiz-selected-topics ul {list-style:none;padding:0 12px 8px;margin:0}
.quiz-selected-topics li {display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line-soft);padding:5px 0;font-size:13px}
.quiz-selected-topics li span {min-width:0;overflow-wrap:anywhere}
.quiz-selected-topics small {display:block;color:var(--muted);font-size:12px}
.quiz-selected-topics .text-button {flex-shrink:0}
.trainer-section[hidden],.topic-check[hidden] {display:none}
.selection-summary {top:0;bottom:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;margin:12px 0;padding:8px 0;border-top:0;border-bottom:1px solid var(--line);backdrop-filter:none;background:var(--bg,#0d151f)}
.selection-summary p {margin:0;line-height:1.45}
.selection-summary .action {width:auto;white-space:nowrap;font-size:14px;padding:10px 12px}
.trainer-section,.topic-check,.quiz-selected-topics {scroll-margin-top:110px}
@media(max-width:360px) {.topic-search > div {flex-wrap:wrap}.topic-search input {flex-basis:100%}.selection-summary {gap:8px}.selection-summary p {font-size:12px}}
