/* KLeiN – Gestaltung: ruhig, systemnah (Apple-ähnlich), UKJ-Blau als Akzent, heller und dunkler Modus */
:root {
  color-scheme: light dark;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f2f2f7;
  --surface-3: #e5e5ea;
  --label: #1c1c1e;
  --label-2: rgba(60, 60, 67, 0.72);
  --label-3: rgba(60, 60, 67, 0.5);
  --sep: rgba(60, 60, 67, 0.16);
  --accent: #0056a2;
  --accent-hover: #00488a;
  --accent-text: #0056a2;
  --accent-tint: rgba(0, 86, 162, 0.09);
  --accent-tint-2: rgba(0, 86, 162, 0.16);
  --orange: #f28130;
  --orange-text: #b35400;
  --green: #248a3d;
  --green-tint: rgba(36, 138, 61, 0.12);
  --red: #d70015;
  --red-tint: rgba(215, 0, 21, 0.1);
  --amber: #a85a00;
  --amber-tint: rgba(242, 129, 48, 0.14);
  --bar: rgba(249, 249, 251, 0.8);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.18);
  --radius: 14px;
  --radius-lg: 22px;
  --header-h: 56px;
  --nav-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --surface-3: #3a3a3c;
    --label: #f5f5f7;
    --label-2: rgba(235, 235, 245, 0.72);
    --label-3: rgba(235, 235, 245, 0.45);
    --sep: rgba(84, 84, 88, 0.6);
    --accent: #1f74c4;
    --accent-hover: #2a82d6;
    --accent-text: #6cb0f2;
    --accent-tint: rgba(108, 176, 242, 0.14);
    --accent-tint-2: rgba(108, 176, 242, 0.24);
    --orange-text: #ffa45c;
    --green: #30d158;
    --green-tint: rgba(48, 209, 88, 0.16);
    --red: #ff453a;
    --red-tint: rgba(255, 69, 58, 0.16);
    --amber: #ffb340;
    --amber-tint: rgba(255, 159, 10, 0.16);
    --bar: rgba(28, 28, 30, 0.78);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 80px); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--label); font-family: var(--font); font-size: 17px; line-height: 1.47;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--accent-text); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; border-radius: 8px; }
main { flex: 1; outline: none; }
main:focus, main:focus-visible { outline: none; }
.step-title:focus, .step-title:focus-visible { outline: none; }
[hidden] { display: none !important; }

/* ---------- Kopfzeile (Milchglas) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900; height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 12px;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
}
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--label);
  transition: background .2s;
}
.icon-btn:hover { background: var(--accent-tint); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.logo { display: inline-flex; border-radius: 8px; }
.logo img { height: 30px; width: auto; }
@media (prefers-color-scheme: dark) { .logo { background: #fff; padding: 5px 8px; } .logo img { height: 24px; } }

.segmented {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px;
  background: var(--surface-3); border-radius: 9px;
}
.segmented > * {
  min-width: 44px; min-height: 30px; padding: 4px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 7px; background: transparent; color: var(--label); text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .02em; cursor: pointer; transition: background .2s var(--ease), box-shadow .2s;
}
.segmented > .active, .segmented > [aria-checked="true"] { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
@media (prefers-color-scheme: dark) { .segmented > .active, .segmented > [aria-checked="true"] { background: #636366; } }
.lang-switch { margin-left: auto; }

/* ---------- Menü ---------- */
.offcanvas { position: fixed; inset: 0; z-index: 1200; }
.offcanvas-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.32); opacity: 0; transition: opacity .25s; }
.offcanvas-panel {
  position: absolute; top: 8px; left: 8px; bottom: 8px; width: min(320px, calc(100vw - 16px));
  padding: 64px 12px 16px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  transform: translateX(calc(-100% - 16px)); transition: transform .3s var(--ease); overflow-y: auto;
}
.offcanvas.open .offcanvas-backdrop { opacity: 1; }
.offcanvas.open .offcanvas-panel { transform: none; }
.offcanvas-close { position: absolute; top: 10px; right: 10px; background: var(--surface-2); width: 36px; height: 36px; }
.offcanvas-close svg { width: 18px; height: 18px; }
.offcanvas ul { list-style: none; margin: 0; padding: 0; }
.offcanvas li a { display: block; padding: 13px 14px; border-radius: 10px; color: var(--label); text-decoration: none; font-size: 17px; }
.offcanvas li a:hover { background: var(--accent-tint); color: var(--accent-text); }
.offcanvas li a[aria-current="page"] { background: var(--accent-tint); color: var(--accent-text); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 24px;
  border: 0; border-radius: var(--radius); font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .2s, transform .12s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-tinted { background: var(--accent-tint); color: var(--accent-text); }
.btn-tinted:hover:not(:disabled) { background: var(--accent-tint-2); }
.btn-plain { background: transparent; color: var(--accent-text); padding-left: 12px; padding-right: 12px; }
.btn-plain:hover:not(:disabled) { background: var(--accent-tint); }
.btn-gray { background: var(--surface-2); color: var(--label); }
.btn-gray:hover:not(:disabled) { background: var(--surface-3); }
.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-success { color: #000; } }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Karten ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)); }

/* ---------- Start ---------- */
.page-start { padding: clamp(28px, 7vh, 72px) 0 56px; }
.start-card { padding: clamp(28px, 5vw, 48px); text-align: center; }
.eyebrow { margin: 0 0 10px; color: var(--accent-text); font-size: 15px; font-weight: 600; letter-spacing: .04em; }
.large-title { margin: 0 auto; max-width: 620px; font-size: clamp(30px, 5.2vw, 46px); line-height: 1.1; font-weight: 700; letter-spacing: -0.022em; overflow-wrap: break-word; hyphens: manual; }
.stage { margin: 32px auto 0; max-width: 380px; }
.stage-anim { animation: rise .35s var(--ease); }
.start-meta { margin-top: 22px; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 8px; }

.field-label { display: block; margin-bottom: 10px; color: var(--label-2); font-size: 15px; font-weight: 600; }
.form-field {
  width: 100%; height: 64px; padding: 0 16px; text-align: center; border: 0; border-radius: var(--radius);
  background: var(--surface-2); color: var(--label); font: 600 32px/1 var(--font); font-variant-numeric: tabular-nums;
  outline: none; transition: box-shadow .2s;
}
.form-field::placeholder { color: var(--label-3); font-weight: 500; }
.form-field:focus { box-shadow: 0 0 0 3px var(--accent-tint-2); }
.form-field.error { box-shadow: 0 0 0 2px var(--red); }
.field-error { margin: 10px 0 0; color: var(--red); font-size: 15px; }
.stage .btn-block { margin-top: 14px; }
.sex-control { display: grid; width: 100%; }
.sex-control > * { min-height: 50px; font-size: 17px; font-weight: 600; border-radius: 10px; }

/* ---------- Testansicht ---------- */
.page-test { padding: 0 0 calc(var(--nav-h) + var(--safe-b) + 24px); }
.test-bar {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 800;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
}
.test-bar-inner { max-width: 760px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-left)); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; }
.btn-end { min-height: 36px; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--red); background: var(--red-tint); }
.btn-end:hover { filter: brightness(.96); }
.progress { min-width: 0; }
.segments { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.seg { height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--surface-3); cursor: pointer; position: relative; transition: background .25s; }
.seg::after { content: ""; position: absolute; inset: -10px 0; }
.seg.done { background: var(--accent); }
.seg.current { background: var(--accent-tint-2); box-shadow: inset 0 0 0 1.5px var(--accent); }
.seg.done.current { background: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }

.timer { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.timer svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 4; }
.timer .track { stroke: var(--surface-3); }
.timer .ring { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.timer .time { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.timer.low .ring { stroke: var(--red); }
.timer.low .time { color: var(--red); }
.timer.low { animation: pulse 1s ease-in-out infinite; }

.step { padding-top: 20px; animation: rise .35s var(--ease); }
.step.back { animation-name: rise-back; }
.step-card { padding: clamp(22px, 4vw, 36px); }
.step-kicker { margin: 0 0 4px; color: var(--accent-text); font-size: 15px; font-weight: 600; }
.step-title { margin: 0 0 18px; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.item { padding: 20px 0; border-top: 0.5px solid var(--sep); }
.item:first-of-type, .step-title + .item, .validation-note + .item { border-top: 0; padding-top: 4px; }
.q { margin: 0; font-size: clamp(20px, 2.6vw, 24px); line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.hint { margin: 6px 0 0; color: var(--label-2); font-size: 16px; }
.stimulus { margin: 18px 0 0; padding: 18px; border-radius: var(--radius); background: var(--surface-2); text-align: center; font-size: clamp(20px, 2.8vw, 26px); font-weight: 600; letter-spacing: -0.01em; }
.stimulus.sentence { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.4; }
.words { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.letters { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: clamp(22px, 3.4vw, 30px); font-variant-numeric: tabular-nums; }
.pace-item { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5em; padding: 4px 6px; border-radius: 10px; transition: background-color .12s, color .12s, transform .12s; }
.words .pace-item { padding: 8px 18px; background: var(--surface); }
.pace-pending .pace-item, .pacing .pace-item:not(.shown) { visibility: hidden; }
.pacing .pace-item { opacity: .28; }
.pacing .pace-item.pace-on { opacity: 1; }
.pace-item { transition: background-color .12s, color .12s, transform .12s, opacity .12s; }
.pace-item.pace-on { background: var(--accent); color: #fff; transform: scale(1.08); }
.pace { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; }
.btn-pace { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.btn-pace[aria-pressed="true"], .btn-pace[aria-pressed="true"]:hover:not(:disabled) { background: var(--accent); color: #fff; }

.answer-row { margin-top: 18px; }
.answer-row.with-label { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 2.4fr); align-items: center; gap: 12px; margin-top: 12px; }
.answer-label { font-size: 19px; font-weight: 600; }
.answer-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answer {
  min-height: 60px; padding: 10px 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--radius); background: var(--surface-2); color: var(--label);
  font-size: 17px; font-weight: 600; cursor: pointer; transition: background .18s, color .18s, transform .12s var(--ease), box-shadow .18s;
}
.answer svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.answer-yes svg { color: var(--green); }
.answer-no svg { color: var(--red); }
.answer:hover { background: var(--surface-3); }
.answer:active { transform: scale(.97); }
.answer-yes[aria-pressed="true"] { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(36, 138, 61, 0.28); }
.answer-no[aria-pressed="true"] { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(215, 0, 21, 0.24); }
.answer[aria-pressed="true"] svg { color: inherit; }
@media (prefers-color-scheme: dark) { .answer-yes[aria-pressed="true"] { color: #000; } }

.rule { display: flex; gap: 8px; margin: 10px 0 0; color: var(--label-2); font-size: 15px; line-height: 1.4; }
.rule::before { content: "i"; flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--label-3); color: var(--surface); font: 700 12px/1 Georgia, serif; font-style: italic; }

.naming { margin-top: 16px; }
.naming-item[hidden] { display: none; }
.naming-item { scroll-margin-top: calc(var(--header-h) + 90px); }
.naming-img { margin: 0; padding: 14px; background: #fff; border-radius: var(--radius); border: 0.5px solid var(--sep); display: flex; justify-content: center; }
.naming-img img { max-height: min(48vh, 420px); width: auto; }
@media (max-height: 900px) { .naming-img img { max-height: calc(100dvh - 520px); min-height: 160px; } }
.naming-item .answer-row { margin-top: 12px; }
.naming-item .answer-buttons { margin-top: 0; }

.test-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 850;
  padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + var(--safe-b)) max(16px, env(safe-area-inset-left));
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
}
.test-nav-inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.test-nav .btn svg { width: 18px; height: 18px; }

/* ---------- Hinweise ---------- */
.validation-note { display: flex; gap: 10px; margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; background: var(--accent-tint); color: var(--label); font-size: 15px; line-height: 1.45; text-align: left; }
.validation-note::before { content: ""; flex-shrink: 0; width: 4px; border-radius: 2px; background: var(--accent); }
.stage .validation-note { margin: 16px 0 0; }
.note-timeout { background: var(--amber-tint); }
.note-timeout::before { background: var(--orange); }

/* ---------- Dialoge (Alert bzw. Bottom Sheet) ---------- */
.modal-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.36); animation: fade .2s ease; }
.modal { width: 100%; max-width: 400px; padding: 26px 24px 20px; text-align: center; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: pop .28s var(--ease); }
.modal-icon { width: 48px; height: 48px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--amber-tint); color: var(--orange-text); }
.modal-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.modal h3 { margin: 0 0 10px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.modal p { margin: 0 0 22px; color: var(--label-2); font-size: 16px; line-height: 1.5; }
.modal p strong { color: var(--label); }
.modal-buttons { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
@media (max-width: 600px) {
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 12px 20px calc(20px + var(--safe-b)); animation-name: sheet; }
  .modal::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto 18px; border-radius: 3px; background: var(--surface-3); }
  .modal-buttons { grid-auto-flow: row; }
  .modal-buttons .btn { order: -1; }
  .modal-buttons .btn:last-child { order: -2; }
}

/* ---------- Hinweisleisten ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); z-index: 1100; transform: translateX(-50%);
  width: max-content; max-width: calc(100vw - 24px); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px;
  background: var(--surface); color: var(--label); border-radius: 999px; box-shadow: var(--shadow-lg), 0 0 0 0.5px var(--sep);
  font-size: 15px; animation: toast-in .35s var(--ease);
}
.toast .btn { min-height: 36px; padding: 6px 16px; border-radius: 999px; font-size: 15px; }
.toast-text { flex: 1; }
body.testing .toast { bottom: calc(var(--nav-h) + var(--safe-b) + 12px); }
.notice-bar { background: var(--amber-tint); color: var(--label); font-size: 15px; }
.notice-inner { max-width: 760px; margin: 0 auto; padding: 4px max(8px, env(safe-area-inset-right)) 4px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 8px; }
.notice-close { width: 36px; height: 36px; }
.notice-close svg { width: 16px; height: 16px; }

/* ---------- Ergebnis ---------- */
.page-result { padding: 24px 0 56px; }
.result-hero { padding: clamp(26px, 5vw, 44px) clamp(20px, 4vw, 40px); text-align: center; }
.score-ring { position: relative; width: 168px; height: 168px; margin: 0 auto 18px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring circle { fill: none; stroke-width: 12; }
.score-ring .track { stroke: var(--surface-2); }
.score-ring .ring { stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease); }
.score-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-value strong { font-size: 56px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.score-value span { margin-top: 4px; color: var(--label-2); font-size: 15px; font-weight: 600; }
.cat-large .ring { stroke: var(--red); }
.cat-small .ring { stroke: var(--orange); }
.cat-none .ring { stroke: var(--green); }
.result-title { margin: 0; font-size: clamp(26px, 4.4vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.cat-large .result-title { color: var(--red); }
.cat-small .result-title { color: var(--amber); }
.cat-none .result-title { color: var(--green); }
.result-hero .validation-note { margin: 18px auto 0; max-width: 520px; }
.scale { display: grid; grid-template-columns: 7fr 2fr 2fr; gap: 3px; max-width: 420px; margin: 24px auto 0; }
.scale div { padding-top: 10px; font-size: 13px; color: var(--label-2); font-weight: 600; font-variant-numeric: tabular-nums; position: relative; }
.scale div::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: 3px; opacity: .35; }
.scale .s-large::before { background: var(--red); }
.scale .s-small::before { background: var(--orange); }
.scale .s-none::before { background: var(--green); }
.scale .on { color: var(--label); }
.scale .on::before { opacity: 1; }

.section-header { margin: 28px 4px 8px; color: var(--label-2); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list li { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-top: 0.5px solid var(--sep); }
.list li:first-child { border-top: 0; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-weight: 600; }
.list-sub { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; color: var(--label-2); font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 4px; }
.chip svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chip.ok svg { color: var(--green); }
.chip.no svg { color: var(--red); }
.list-value { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list-value.muted { color: var(--label-3); font-weight: 500; }
.list .total { background: var(--surface-2); }
.list .total .list-title, .list .total .list-value { font-size: 18px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.result-privacy { margin: 14px 4px 0; color: var(--label-2); font-size: 14px; text-align: center; }
.result-empty { padding: 36px 24px; text-align: center; }
.result-empty p { color: var(--label-2); margin: 0 0 20px; }

/* ---------- Inhaltsseiten ---------- */
.page-content { padding: 24px 0 56px; }
.prose { padding: clamp(24px, 4vw, 44px); overflow-wrap: break-word; }
.prose h2:first-child, .page-title { margin-top: 0; font-size: clamp(28px, 4.4vw, 38px); line-height: 1.15; letter-spacing: -0.02em; }
.prose h2 { font-size: 24px; letter-spacing: -0.01em; margin: 1.8em 0 .5em; }
.prose h3 { font-size: 19px; margin: 1.6em 0 .4em; }
.prose h4 { font-size: 17px; margin: 1.4em 0 .3em; }
.prose p, .prose li { color: var(--label); }
.prose ul { padding-left: 1.3em; }
.prose img { border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { border-bottom: 0.5px solid var(--sep); padding: 8px; text-align: left; }
.prose .validation-note { display: block; border-left: 4px solid var(--accent); }
.prose .validation-note::before { display: none; }
.muted { color: var(--label-2); }

/* ---------- Fußzeile ---------- */

/* ---------- Bewegung ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise-back { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .logo img { height: 24px; }
  .test-bar-inner { gap: 10px; }
  .timer, .timer svg { width: 46px; height: 46px; }
  .timer .time { font-size: 12px; }
  .answer { min-height: 56px; font-size: 16px; padding: 8px 10px; }
  .answer-row.with-label { grid-template-columns: 1fr; gap: 8px; }
  .naming { grid-template-columns: 1fr; }
  .letters { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 14px 10px; font-size: 22px; }
  .letters .pace-item { min-width: 0; padding: 4px 0; }
  .result-actions { grid-template-columns: 1fr; }
  .list li { padding: 12px 14px; }
}
@media (max-width: 380px) {
  .btn-end { padding: 6px 10px; font-size: 14px; }
  .answer { gap: 6px; padding: 8px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.offcanvas-panel .menu-pdf { margin-top: 8px; padding-top: 8px; border-top: 0.5px solid var(--sep); }
.pace-lead { color: var(--label-2); font-size: 15px; font-variant-numeric: tabular-nums; }

/* Punkt / Kein Punkt: feine Linie */
.answer { border: 1px solid #000; }
@media (prefers-color-scheme: dark) { .answer { border-color: rgba(255, 255, 255, 0.55); } }
/* Einzelergebnis ausklappbar */
.breakdown { margin-top: 20px; overflow: hidden; padding: 0; }
.breakdown summary { display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none; font-size: 17px; font-weight: 600; }
.breakdown summary::-webkit-details-marker { display: none; }
.breakdown summary::after { content: ""; width: 9px; height: 9px; margin-left: 4px; border-right: 2px solid var(--label-3); border-bottom: 2px solid var(--label-3); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.breakdown[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.breakdown .summary-value { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--label-2); }
.breakdown .list { border-top: 0.5px solid var(--sep); }
.offcanvas-panel .menu-version { margin-top: 12px; padding: 0 14px; color: var(--label-2); font-size: 13px; }
