/* KI-Führerschein – Design-System (SPEC Abschnitt 6) */
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Atkinson Hyperlegible';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/atkinson-hyperlegible-latin-700-normal.woff2') format('woff2');
}

:root {
  --asphalt: #1E2B3C;
  --asphalt-2: #2C3E55;
  --asphalt-3: #3A4F6A;
  --gelb: #FFC20E;
  --gelb-soft: #FFF4CC;
  --blau: #1F5FAD;
  --blau-soft: #E6EEF8;
  --rot: #D62E3A;
  --rot-text: #B5222D;
  --rot-soft: #FBE8EA;
  --gruen: #1E9E52;
  --gruen-text: #157A3F;
  --gruen-soft: #E3F4EA;
  --bg: #FFFFFF;
  --flaeche: #F2F4F7;
  --linie: #D5DAE1;
  --text: #1E2B3C;
  --muted: #5B6575;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(30, 43, 60, .06), 0 4px 16px rgba(30, 43, 60, .06);
  --font: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tap: 48px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
  background: var(--flaeche);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8em; }
a { color: var(--blau); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; border-radius: 6px; }
.on-dark :focus-visible, .topbar :focus-visible { outline-color: var(--gelb); }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.icon-lg { width: 1.6em; height: 1.6em; }

/* ---------- Kopf & Fuß ---------- */
.topbar {
  background: var(--asphalt);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left));
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; }
.topbar .spacer { flex: 1; }
.topbar .plate { height: 26px; width: auto; display: block; }
.topbar .user-chip { display: inline-flex; align-items: center; gap: 8px; color: #fff; background: var(--asphalt-2); border: 0; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .95rem; min-height: 40px; cursor: pointer; }
.topbar .user-chip:hover { background: var(--asphalt-3); }
@media (max-width: 520px) { .topbar .plate { display: none; } .brand span { font-size: 1rem; } }

main { flex: 1; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 20px 16px 40px; }
.wrap.narrow { max-width: 640px; }
.wrap.wide { max-width: 1320px; }

.footer { color: var(--muted); font-size: .9rem; padding: 18px 16px 28px; text-align: center; }
.footer a { color: var(--muted); margin: 0 8px; }

/* ---------- Karten ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card, .stack > * + * { margin-top: 16px; }
.grid > .card, .modules > .card, .bonus-list > .card, .dash-head > .card, .section-cards > .card, .teacher-grid > .card, .stats-grid > .card, .fw-grid > *, .or-grid > *, .pw-list > * { margin-top: 0; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card.dark { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.card.dark .muted { color: #C5CDD8; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 1.25rem; }
.section-title .icon { color: var(--asphalt); }

/* ---------- Buttons ---------- */
.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 10px 20px;
  border-radius: 12px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  background: var(--asphalt);
  color: #fff;
  transition: transform .08s ease, background-color .15s ease, box-shadow .15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--asphalt-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--gelb); color: var(--asphalt); border-color: var(--asphalt); }
.btn.primary:hover { background: #FFD24D; }
.btn.secondary { background: #fff; color: var(--asphalt); border-color: var(--linie); }
.btn.secondary:hover { border-color: var(--asphalt); background: #fff; }
.btn.ghost { background: transparent; color: var(--asphalt); }
.btn.ghost:hover { background: rgba(30, 43, 60, .07); }
.btn.danger { background: var(--rot-text); color: #fff; }
.btn.danger:hover { background: #9C1C26; }
.btn.big { min-height: 60px; font-size: 1.15rem; padding: 14px 28px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 6px 12px; font-size: .9rem; }
.on-dark .btn.secondary, .card.dark .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.on-dark .btn.ghost, .card.dark .btn.ghost { color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.btn-row.end { justify-content: flex-end; }
.btn-row.between { justify-content: space-between; }

/* ---------- Formulare ---------- */
label { font-weight: 700; display: block; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: .9rem; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--text);
  background: #fff;
  border: 2px solid var(--linie);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: var(--tap);
}
input:focus, textarea:focus, select:focus { border-color: var(--blau); outline: none; box-shadow: 0 0 0 3px rgba(31, 95, 173, .25); }
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
input.code-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: 1.3rem; }
.error { color: var(--rot-text); font-weight: 700; margin-top: 8px; }
.local-note { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); background: var(--flaeche); border-radius: 999px; padding: 4px 10px; margin-top: 6px; }
.check-row { display: flex; align-items: center; gap: 10px; font-weight: 400; cursor: pointer; min-height: var(--tap); }
input[type=checkbox], .check-row input { width: 24px; height: 24px; flex: none; accent-color: var(--asphalt); }

/* ---------- Chips / Badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: .875rem; font-weight: 700; background: var(--flaeche); color: var(--asphalt); border: 1px solid var(--linie); white-space: nowrap; }
.chip.yellow { background: var(--gelb); border-color: var(--gelb); }
.chip.dark { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.chip.green { background: var(--gruen-soft); color: var(--gruen-text); border-color: #BFE3CD; }
.chip.red { background: var(--rot-soft); color: var(--rot-text); border-color: #F2C3C8; }
.chip.blue { background: var(--blau-soft); color: var(--blau); border-color: #C3D5EC; }

/* ---------- Fortschritt ---------- */
.progress { height: 10px; background: var(--flaeche); border-radius: 999px; overflow: hidden; border: 1px solid var(--linie); }
.progress > span { display: block; height: 100%; background: var(--asphalt); border-radius: 999px; width: 0; transition: width .4s ease; }
.progress.c1 > span { background: var(--blau); }
.progress.c2 > span { background: var(--gelb); }
.progress.c3 > span { background: var(--gruen); }
.progress.c4 > span { background: var(--rot); }

/* ---------- Merksatz (Schild) ---------- */
.merksatz {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--gelb-soft);
  border: 2px solid var(--asphalt);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 20px;
}
.merksatz .sign { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--gelb); border: 3px solid var(--asphalt); display: grid; place-items: center; }
.merksatz .sign .icon { width: 22px; height: 22px; }
.merksatz strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.merksatz p { margin: 0; font-size: 1.1rem; font-weight: 700; }

.notice { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 14px 16px; background: var(--blau-soft); border: 1px solid #C3D5EC; }
.notice.warn { background: var(--gelb-soft); border-color: #F2D677; }
.notice.danger { background: var(--rot-soft); border-color: #F2C3C8; }
.notice.ok { background: var(--gruen-soft); border-color: #BFE3CD; }
.notice .icon { margin-top: 2px; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; left: 0; right: 0; bottom: max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; pointer-events: none; padding: 0 16px; }
.toast { background: var(--asphalt); color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.25); display: inline-flex; align-items: center; gap: 8px; animation: toast-in .25s ease-out; max-width: 100%; }
.toast .km { color: var(--gelb); }
.toast.error { background: var(--rot-text); }
@keyframes toast-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Dialog ---------- */
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); color: var(--text); }
dialog.modal::backdrop { background: rgba(30, 43, 60, .55); }
dialog.modal .modal-body { padding: 24px; }
dialog.modal h2 { margin-top: 0; }

/* ---------- Start ---------- */
.hero { background: var(--asphalt); color: #fff; border-radius: 20px; padding: 28px 24px; display: grid; gap: 20px; grid-template-columns: auto 1fr; align-items: center; }
.hero img.logo { width: 112px; height: 112px; }
.hero h1 { margin: 0 0 4px; font-size: clamp(1.8rem, 5vw, 2.6rem); }
.hero .sub { color: #C5CDD8; margin: 0 0 10px; }
.hero .claim { display: inline-block; background: var(--gelb); color: var(--asphalt); font-weight: 700; padding: 6px 14px; border-radius: 10px; font-size: 1.1rem; }
@media (max-width: 560px) { .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; } .hero img.logo { width: 88px; height: 88px; } }
.stats-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.stat { background: #fff; border: 1px solid var(--linie); border-radius: 14px; padding: 14px 16px; }
.stat .val { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat .src { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.code-display { font-size: clamp(2rem, 8vw, 3rem); font-weight: 700; letter-spacing: .14em; background: var(--gelb); color: var(--asphalt); border: 3px solid var(--asphalt); border-radius: 14px; padding: 10px 18px; display: inline-block; font-variant-numeric: tabular-nums; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 20px 0 8px; font-size: .95rem; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--linie); }

/* ---------- Fahrschulkarte ---------- */
.dash-head { display: grid; gap: 16px; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
@media (max-width: 760px) { .dash-head { grid-template-columns: 1fr; } }
.welcome h1 { margin-bottom: 6px; }
.welcome .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.tacho-card { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: center; text-align: center; }
.tacho-card > div { flex: 1 1 180px; display: grid; justify-items: center; }
.tacho-card .row { justify-content: center; }
.tacho { width: 180px; height: auto; display: block; }
.tacho .needle { transition: transform 1s cubic-bezier(.2, .8, .2, 1); transform-origin: 100px 100px; }
.odo { display: inline-flex; gap: 3px; font-variant-numeric: tabular-nums; }
.odo span { background: var(--asphalt); color: #fff; font-weight: 700; font-size: 1.5rem; width: 1.15em; text-align: center; border-radius: 6px; padding: 2px 0; }
.odo span.lead { color: #7C8899; }
.odo-unit { font-weight: 700; margin-left: 8px; font-size: 1.1rem; }

.modules { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.module-card { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; align-items: start; position: relative; }
.module-card .plaque { width: 84px; height: 84px; }
.module-card.locked { background: #FAFBFC; }
.module-card.locked .plaque { opacity: .9; }
.module-card .nr { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.module-card h3 { margin: 2px 0 4px; }
.module-card .leit { color: var(--muted); margin-bottom: 10px; font-size: .95rem; }
.module-card .status .chip { white-space: normal; }
.module-card .status { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.module-card .btn { margin-top: 12px; }
.module-card .progress { margin-top: 4px; }
.module-card.done { border-color: var(--asphalt); }

.exam-card, .license-teaser { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; }
.exam-card img, .license-teaser img { width: 84px; height: 84px; }
.license-teaser { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.license-teaser .muted { color: #C5CDD8; }

.bonus-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.bonus { display: flex; flex-direction: column; gap: 8px; }
.bonus .head { display: flex; align-items: center; gap: 10px; }
.bonus .tag { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--asphalt); display: grid; place-items: center; font-weight: 700; flex: none; font-size: .9rem; }
.bonus.done .tag { background: var(--gelb); }
.bonus p { margin: 0; font-size: .95rem; }
.bonus .foot { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
.leader ol { margin: 0; padding-left: 1.4em; }
.leader li { padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; }
.leader li::marker { font-weight: 700; }

/* ---------- Fahrstunde ---------- */
.lesson-head { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; margin-bottom: 16px; }
.lesson-head img { width: 72px; height: 72px; }
.lesson-head h1 { margin: 0; font-size: clamp(1.4rem, 3.4vw, 1.9rem); }
.lesson-head .leit { color: var(--muted); margin: 2px 0 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-weight: 700; color: var(--asphalt); text-decoration: none; min-height: 44px; }
.stepper { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.stepper button { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 2px solid var(--linie); background: #fff; font: inherit; font-size: .92rem; font-weight: 700; color: var(--asphalt); cursor: pointer; }
.stepper button .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--flaeche); font-size: .8rem; }
.stepper button.done .dot { background: var(--asphalt); color: #fff; }
.stepper button.current { border-color: var(--asphalt); background: var(--gelb-soft); }
.stepper button[disabled] { opacity: .5; cursor: not-allowed; }
.step-card h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.step-card .anleitung { font-size: 1.05rem; }
.widget { margin-top: 16px; }

/* Classify */
.classify .counter { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--muted); font-weight: 700; font-size: .95rem; }
.classify .item { background: var(--flaeche); border: 2px dashed var(--linie); border-radius: 16px; padding: 24px 20px; font-size: clamp(1.15rem, 2.8vw, 1.4rem); font-weight: 700; text-align: center; min-height: 120px; display: grid; place-items: center; }
.classify .choices { display: grid; gap: 12px; margin-top: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.classify .choices .btn { min-height: 64px; font-size: 1.15rem; border-color: rgba(0,0,0,.15); }
.feedback { margin-top: 16px; border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; animation: pop .2s ease-out; }
.feedback.ok { background: var(--gruen-soft); border: 2px solid var(--gruen); }
.feedback.no { background: var(--rot-soft); border: 2px solid var(--rot); }
.feedback .icon { width: 28px; height: 28px; flex: none; }
.feedback.ok .icon { color: var(--gruen-text); }
.feedback.no .icon { color: var(--rot-text); }
.feedback strong { display: block; }
.feedback p { margin: 4px 0 0; }
@keyframes pop { from { transform: scale(.97); opacity: .4; } to { transform: none; opacity: 1; } }
.overview { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.overview li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--flaeche); }
.overview li .icon { margin-top: 3px; }
.overview li.ok .icon { color: var(--gruen-text); }
.overview li.no .icon { color: var(--rot-text); }
.overview li .chip { margin-left: auto; }
.score { font-size: 1.2rem; font-weight: 700; margin: 0 0 10px; }
.ampel-zones { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-bottom: 18px; }
.zone { border-radius: 14px; padding: 14px; border: 2px solid var(--asphalt); background: #fff; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.zone .lamp { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--asphalt); }
.zone h4 { margin: 0 0 2px; font-size: 1rem; }
.zone p { margin: 0; font-size: .92rem; }
.zone .bsp { color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* Satzbau-Maschine */
.wm { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
@media (max-width: 860px) { .wm { grid-template-columns: 1fr; } }
.training { background: var(--flaeche); border-radius: 14px; padding: 16px; }
.training ol { margin: 8px 0 0; padding-left: 1.6em; }
.training li { padding: 2px 0; }
.machine { border: 2px solid var(--asphalt); border-radius: 16px; padding: 16px; background: #fff; }
.seg { display: inline-flex; background: var(--flaeche); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; border: 1px solid var(--linie); }
.seg button { min-height: 44px; border: 0; background: transparent; border-radius: 9px; padding: 6px 14px; font: inherit; font-weight: 700; font-size: .95rem; color: var(--asphalt); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button[aria-pressed="true"] { background: var(--asphalt); color: #fff; }
.temp-text { font-size: .92rem; color: var(--muted); margin: 8px 0 14px; min-height: 2.6em; }
.sentence { min-height: 64px; border-radius: 12px; background: var(--flaeche); padding: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 1.15rem; }
.sentence .w { background: #fff; border: 2px solid var(--asphalt); border-radius: 8px; padding: 4px 10px; font-weight: 700; animation: pop .2s ease-out; }
.sentence .w.end { background: var(--asphalt); color: #fff; }
.sentence .placeholder { color: var(--muted); font-size: 1rem; }
.bars { display: grid; gap: 8px; margin-top: 14px; }
.bars .bar { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; gap: 10px; align-items: center; width: 100%; background: #fff; border: 2px solid var(--linie); border-radius: 12px; padding: 8px 12px; font: inherit; color: var(--text); cursor: pointer; min-height: 52px; text-align: left; }
.bars .bar:hover { border-color: var(--asphalt); }
.bars .bar .word { font-weight: 700; font-size: 1.05rem; }
.bars .bar .track { display: block; height: 16px; background: var(--flaeche); border-radius: 999px; overflow: hidden; }
.bars .bar .fill { display: block; height: 100%; background: var(--blau); border-radius: 999px; transition: width .3s ease; }
.bars .bar .num { font-variant-numeric: tabular-nums; font-size: .92rem; color: var(--muted); white-space: nowrap; }
.bars .bar.zero { opacity: .55; }
.bars .bar.picked { border-color: var(--gelb); background: var(--gelb-soft); }
.bars-caption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.made { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.made li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--flaeche); padding: 10px 12px; border-radius: 12px; font-weight: 700; }
.reflect { margin-top: 24px; }
.reflect ol { padding-left: 1.4em; }
.reflect li { margin-bottom: 6px; }
.examples { display: grid; gap: 10px; }
.example { border-left: 0; background: var(--flaeche); border-radius: 12px; padding: 12px 14px; }
.example .s { font-weight: 700; display: block; margin-bottom: 4px; }
table.compare { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; font-size: .98rem; }
table.compare th, table.compare td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linie); }
table.compare tr:last-child td { border-bottom: 0; }
table.compare th { background: var(--asphalt); color: #fff; }
table.compare td:first-child { background: var(--flaeche); width: 40%; }
details.more { border: 1px solid var(--linie); border-radius: 12px; padding: 0 14px; background: #fff; margin-top: 12px; }
details.more summary { min-height: 48px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary .icon { transition: transform .2s; }
details.more[open] summary .icon { transform: rotate(90deg); }
details.more > *:not(summary) { margin-bottom: 14px; }

/* Info 2.1 */
.prompt-compare { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.prompt-box { border-radius: 14px; padding: 16px; border: 2px solid var(--linie); background: #fff; }
.prompt-box.weak { border-color: var(--rot); }
.prompt-box.strong { border-color: var(--gruen); }
.prompt-box h3 { display: flex; gap: 8px; align-items: center; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.prompt-box.weak h3 { color: var(--rot-text); }
.prompt-box.strong h3 { color: var(--gruen-text); }
.bubble-user { background: var(--asphalt); color: #fff; border-radius: 16px 16px 4px 16px; padding: 12px 14px; font-size: 1.02rem; }
.seg-k, .seg-a, .seg-f, .seg-q { border-radius: 4px; padding: 1px 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.bubble-user .seg-k { box-shadow: inset 0 -3px 0 #7FB2EE; }
.bubble-user .seg-a { box-shadow: inset 0 -3px 0 #FFC20E; }
.bubble-user .seg-f { box-shadow: inset 0 -3px 0 #6FD39A; }
.bubble-user .seg-q { box-shadow: inset 0 -3px 0 #F28A93; }
.kafq-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.kafq-tile { border-radius: 14px; padding: 16px; background: #fff; border: 2px solid var(--asphalt); }
.kafq-tile .letter { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; border: 5px solid; margin-bottom: 8px; background: #fff; }
.kafq-tile.k .letter { border-color: var(--blau); color: var(--blau); }
.kafq-tile.a .letter { border-color: var(--gelb); color: var(--asphalt); }
.kafq-tile.f .letter { border-color: var(--gruen); color: var(--gruen-text); }
.kafq-tile.q .letter { border-color: var(--rot); color: var(--rot-text); }
.kafq-tile h4 { margin: 0 0 4px; font-size: 1.1rem; }
.kafq-tile .frage { font-weight: 700; font-size: .95rem; }
.kafq-tile .bsp { color: var(--muted); font-size: .9rem; margin-top: 6px; font-style: italic; }
.navi-box { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.navi-box .navi-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--gruen); color: #fff; display: grid; place-items: center; }
.navi-box .navi-icon .icon { width: 30px; height: 30px; }

/* Promptbaukasten */
.builder { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .builder { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 540px) { .builder { grid-template-columns: 1fr; } }
.brick .top { flex-wrap: wrap; }
.brick .seg { flex-wrap: nowrap; }
.brick { border: 2px solid var(--linie); border-radius: 14px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; cursor: pointer; text-align: left; font: inherit; color: inherit; min-height: 120px; transition: border-color .15s, background-color .15s; }
.brick .top { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.brick .lt { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.brick .lt .letter { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 4px solid var(--linie); font-weight: 700; }
.brick .txt { font-size: .9rem; color: var(--muted); }
.brick.on { border-color: var(--asphalt); background: var(--gelb-soft); }
.brick.on .txt { color: var(--text); }
.brick.k.on .letter { border-color: var(--blau); }
.brick.a .letter { border-color: var(--gelb); }
.brick.f.on .letter { border-color: var(--gruen); }
.brick.q.on .letter { border-color: var(--rot); }
.switch { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #C9CFD8; flex: none; transition: background-color .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
[aria-checked="true"] > .switch, .switch.on, .brick.on .switch { background: var(--asphalt); }
[aria-checked="true"] > .switch::after, .switch.on::after, .brick.on .switch::after { transform: translateX(22px); }
.composer { margin-top: 14px; display: grid; gap: 10px; }
.composer .prompt-preview { background: var(--flaeche); border: 2px solid var(--linie); border-radius: 14px; padding: 12px 14px; min-height: 64px; }
.composer .prompt-preview .seg-k { background: #DCE8F7; }
.composer .prompt-preview .seg-a { background: #FFEFB8; }
.composer .prompt-preview .seg-f { background: #D5F0DF; }
.composer .prompt-preview .seg-q { background: #F9DADD; }
.chat { display: grid; gap: 12px; margin-top: 16px; }
.chat .from-user { justify-self: end; max-width: 88%; }
.chat .from-ai { justify-self: start; max-width: 94%; display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: start; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--gelb); border: 2px solid var(--asphalt); display: grid; place-items: center; }
.avatar .icon { width: 22px; height: 22px; }
.bubble-ai { background: #fff; border: 2px solid var(--linie); border-radius: 16px 16px 16px 4px; padding: 12px 14px; }
.bubble-ai .label { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.typing { display: inline-flex; gap: 5px; padding: 6px 2px; }
.typing i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.navi-tip { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; background: var(--gruen-soft); border: 2px solid var(--gruen); border-radius: 14px; padding: 12px 14px; }
.navi-tip .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--gruen-text); color: #fff; display: grid; place-items: center; }
.navi-tip strong { display: block; }
.seen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; }

/* Halluzination */
.answer-sentences { display: block; line-height: 1.9; }
.sent { font: inherit; color: inherit; background: transparent; border: 0; border-bottom: 2px dotted var(--linie); padding: 2px 4px; margin: 0 1px; border-radius: 6px; cursor: pointer; text-align: left; display: inline; line-height: 1.7; }
.sent:hover { background: var(--flaeche); }
.sent[aria-pressed="true"] { background: var(--rot-soft); border-bottom: 3px solid var(--rot); }
.sent.verified-false { background: var(--rot-soft); border-bottom: 3px solid var(--rot); }
.sent.verified-true { background: var(--gruen-soft); border-bottom: 3px solid var(--gruen); }
.sent-feedback { display: grid; gap: 8px; margin-top: 14px; }
.lexikon { background: #FFFDF5; border: 2px solid var(--asphalt); border-radius: 14px; padding: 16px; margin-top: 12px; }
.lexikon h4 { margin: 0 0 6px; }
.lexikon .src { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }

/* STOPP */
.stopp { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin-bottom: 18px; }
.stopp-tile { background: #fff; border: 1px solid var(--linie); border-radius: 14px; padding: 12px; display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: start; }
.octagon { width: 48px; height: 48px; background: var(--rot); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.stopp-tile p { margin: 0; font-size: .92rem; }
.scenario .situation { background: var(--flaeche); border-radius: 14px; padding: 16px; font-size: 1.08rem; }
.options { display: grid; gap: 10px; margin-top: 14px; }
.option-btn { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; text-align: left; font: inherit; color: inherit; background: #fff; border: 2px solid var(--linie); border-radius: 12px; padding: 12px; min-height: 56px; cursor: pointer; }
.option-btn:hover:not([disabled]) { border-color: var(--asphalt); }
.option-btn .letter { width: 32px; height: 32px; border-radius: 50%; background: var(--flaeche); display: grid; place-items: center; font-weight: 700; }
.option-btn.correct { border-color: var(--gruen); background: var(--gruen-soft); }
.option-btn.wrong { border-color: var(--rot); background: var(--rot-soft); }
.option-btn.selected { border-color: var(--asphalt); background: var(--gelb-soft); }
.option-btn[disabled] { cursor: default; }
.option-btn.dim { opacity: .55; }

/* Bias */
.bias-visual { display: grid; gap: 14px; margin: 14px 0; }
.bias-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 64px; gap: 12px; align-items: center; }
.bias-row .lbl { font-weight: 700; font-size: .95rem; }
.bias-row .track { height: 28px; background: var(--flaeche); border-radius: 8px; overflow: hidden; border: 1px solid var(--linie); }
.bias-row .fill { height: 100%; border-radius: 8px 0 0 8px; }
.bias-row .fill.ai { background: var(--rot); }
.bias-row .fill.real { background: var(--blau); }
.bias-row .val { font-weight: 700; font-size: 1.3rem; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .bias-row { grid-template-columns: 1fr 56px; } .bias-row .lbl { grid-column: 1 / -1; } }

/* Info 4.3 */
.section-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.section-cards .card { margin: 0; }
.template-box { background: var(--flaeche); border: 2px dashed var(--asphalt-3); border-radius: 12px; padding: 12px; font-size: .98rem; margin: 10px 0; }
.quote { font-weight: 700; font-size: 1.05rem; border-radius: 12px; background: var(--gelb-soft); padding: 10px 12px; }

/* Plaketten-Check */
.check-q { padding: 16px 0; border-top: 1px solid var(--linie); }
.check-q:first-of-type { border-top: 0; }
.check-q h3 { font-size: 1.1rem; display: flex; gap: 10px; }
.check-q h3 .n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--asphalt); color: #fff; display: grid; place-items: center; font-size: .9rem; }

/* Plaketten-Animation */
.award { position: fixed; inset: 0; background: rgba(30, 43, 60, .82); display: grid; place-items: center; z-index: 200; padding: 16px; }
.award .inner { background: #fff; border-radius: 24px; padding: 28px 24px; max-width: 420px; width: 100%; text-align: center; animation: award-pop .4s cubic-bezier(.2, .9, .3, 1.3); }
.award img { width: 180px; height: 180px; animation: award-spin 1s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 8px 16px rgba(30,43,60,.25)); }
.award .km { display: inline-block; background: var(--asphalt); color: var(--gelb); font-weight: 700; padding: 6px 14px; border-radius: 999px; margin: 8px 0 14px; }
.award .ring { position: relative; display: inline-block; }
.award .ring::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; border: 4px solid var(--gelb); animation: ring 1.2s ease-out .3s both; }
@keyframes award-pop { from { transform: scale(.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes award-spin { from { transform: rotate(-200deg) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ring { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }

/* ---------- Prüfung ---------- */
.exam-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; background: var(--asphalt); color: #fff; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; position: sticky; top: 72px; z-index: 10; }
.exam-bar .qn { font-weight: 700; }
.exam-bar .timer { font-variant-numeric: tabular-nums; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; background: var(--asphalt-2); border-radius: 999px; padding: 4px 12px; }
.exam-bar .timer.low { background: var(--rot-text); }
.fp { display: inline-flex; align-items: center; gap: 6px; background: var(--gelb); color: var(--asphalt); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: .9rem; }
.exam-q h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
.multi-hint { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .95rem; margin-bottom: 12px; }
.cb-option { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: center; width: 100%; text-align: left; font: inherit; font-size: 1.05rem; color: inherit; background: #fff; border: 2px solid var(--linie); border-radius: 14px; padding: 14px; min-height: 64px; cursor: pointer; margin-bottom: 10px; }
.cb-option .box { width: 32px; height: 32px; border-radius: 8px; border: 3px solid var(--asphalt); display: grid; place-items: center; }
.cb-option .box .icon { opacity: 0; }
.cb-option[aria-checked="true"] { border-color: var(--asphalt); background: var(--gelb-soft); }
.cb-option[aria-checked="true"] .box { background: var(--asphalt); color: #fff; }
.cb-option[aria-checked="true"] .box .icon { opacity: 1; }
.q-overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.q-overview button { min-height: 56px; border-radius: 12px; border: 2px solid var(--linie); background: #fff; font: inherit; font-weight: 700; cursor: pointer; display: grid; place-items: center; line-height: 1.1; }
.q-overview button small { font-weight: 400; font-size: .7rem; color: var(--muted); }
.q-overview button.answered { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.q-overview button.answered small { color: #C5CDD8; }
.q-overview button.current { outline: 3px solid var(--gelb); outline-offset: 1px; }
.result-head { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.result-head .sign { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; border: 8px solid; background: #fff; }
.result-head .sign .icon { width: 48px; height: 48px; }
.result-head.pass .sign { border-color: var(--gruen); color: var(--gruen-text); }
.result-head.fail .sign { border-color: var(--rot); color: var(--rot-text); }
.result-head h1 { margin-bottom: 4px; }
.big-num { font-size: 1.4rem; font-weight: 700; }
.wrong-q { border-top: 1px solid var(--linie); padding: 16px 0; }
.wrong-q h3 { font-size: 1.05rem; }
.wrong-q ul { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.wrong-q li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--flaeche); }
.wrong-q li.is-right { background: var(--gruen-soft); }
.wrong-q li .icon { margin-top: 2px; }
.wrong-q li.is-right .icon { color: var(--gruen-text); }
.wrong-q li.chosen-wrong .icon { color: var(--rot-text); }

/* ---------- Smiley-Feedback ---------- */
.smiley-q { padding: 12px 0; border-top: 1px solid var(--linie); }
.smiley-q:first-of-type { border-top: 0; }
.smiley-q p { font-weight: 700; margin-bottom: 8px; }
.smileys { display: flex; gap: 10px; flex-wrap: wrap; }
.smiley { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 84px; min-height: 76px; padding: 8px; border-radius: 14px; border: 2px solid var(--linie); background: #fff; font: inherit; font-size: .85rem; cursor: pointer; color: var(--text); }
.smiley .icon { width: 34px; height: 34px; }
.smiley[aria-checked="true"] { border-color: var(--asphalt); background: var(--gelb-soft); }
.smiley.s0 .icon { color: var(--gruen-text); }
.smiley.s1 .icon { color: #8A6A00; }
.smiley.s2 .icon { color: var(--rot-text); }

/* ---------- Führerschein-Karte ---------- */
.license-stage { display: grid; justify-items: center; gap: 14px; }
.lic {
  container-type: inline-size;
  width: min(100%, 560px);
  aspect-ratio: 85.6 / 54;
  background: var(--asphalt);
  color: #fff;
  border-radius: 3.6cqw;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(30,43,60,.28);
  font-family: var(--font);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.lic .lic-in { position: absolute; inset: 0; padding: 4.2cqw 4.6cqw; display: grid; grid-template-rows: auto 1fr auto; gap: 2.2cqw; }
.lic .lic-top { display: grid; grid-template-columns: 11cqw 1fr auto; gap: 2.6cqw; align-items: center; }
.lic .lic-top img { width: 11cqw; height: 11cqw; }
.lic .lic-title { font-weight: 700; font-size: 5.2cqw; line-height: 1.05; }
.lic .lic-class { color: var(--gelb); font-weight: 700; font-size: 3cqw; letter-spacing: .04em; }
.lic .lic-school { font-size: 2.4cqw; color: #C5CDD8; }
.lic .lic-plate { height: 6.4cqw; width: auto; align-self: start; position: relative; z-index: 1; }
.lic .lic-mid { display: grid; grid-template-columns: 1fr 22cqw; gap: 3.6cqw; align-items: center; }
.lic dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .8cqw 2.6cqw; font-size: 2.8cqw; align-items: baseline; }
.lic dt { color: #A9B4C3; font-size: 2.3cqw; text-transform: uppercase; letter-spacing: .06em; }
.lic dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.lic dd.name { font-size: 4.6cqw; color: var(--gelb); line-height: 1.05; }
.lic dd.no { font-variant-numeric: tabular-nums; letter-spacing: .05em; }
.lic .qr { background: #fff; border-radius: 2cqw; padding: 1.6cqw; width: 22cqw; height: 22cqw; display: grid; place-items: center; }
.lic .qr img { width: 100%; height: 100%; display: block; }
.lic .lic-bot { display: grid; grid-template-columns: auto 1fr; gap: 2.6cqw; align-items: end; }
.lic .plaques { display: flex; gap: 1.2cqw; }
.lic .plaques img { width: 7.4cqw; height: 7.4cqw; background: #fff; border-radius: 50%; }
.lic .fine { font-size: 1.9cqw; line-height: 1.3; color: #C5CDD8; }
.lic .fine strong { color: #fff; font-weight: 700; }
.lic .corner { position: absolute; right: -9cqw; top: -9cqw; width: 30cqw; height: 30cqw; border-radius: 50%; border: 2.4cqw solid var(--gelb); opacity: .12; }

.rules-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: r; }
.rules-list li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--linie); border-radius: 14px; padding: 10px 14px; font-size: 1.05rem; }
.rules-list .n { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--asphalt); display: grid; place-items: center; font-weight: 700; background: var(--gelb); }

/* ---------- Check-Seite ---------- */
.check-card { margin-top: 24px; text-align: center; }
.check-status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.3rem; padding: 10px 18px; border-radius: 999px; margin: 8px 0 18px; }
.check-status .icon { width: 28px; height: 28px; }
.check-status.ok { background: var(--gruen-soft); color: var(--gruen-text); }
.check-status.no { background: var(--rot-soft); color: var(--rot-text); }
.check-data { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; text-align: left; max-width: 380px; margin: 0 auto 18px; }
.check-data dt { color: var(--muted); }
.check-data dd { margin: 0; font-weight: 700; }

/* ---------- Textseiten ---------- */
.prose h2 { margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.placeholder-box { border: 2px dashed var(--rot); background: var(--rot-soft); border-radius: 12px; padding: 12px 14px; }


/* ---------- Allgemein (Ergänzungen) ---------- */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--gelb); color: var(--asphalt); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }
main:focus { outline: none; }
.strong { font-weight: 700; }
.brand-sub { font-weight: 400; color: #C5CDD8; font-size: .85rem; margin-left: 4px; }
.user-slot { display: flex; align-items: center; gap: 8px; }
.topbar .user-chip.static { cursor: default; }
.topbar .btn.ghost { color: #fff; }
.topbar .btn.ghost:hover { background: var(--asphalt-2); }
@media (max-width: 600px) { .hide-sm { display: none; } .brand-sub { display: none; } }
.center-row { justify-content: center; }
.welcome { position: relative; }
.welcome-plate { width: 208px; max-width: 70%; height: auto; display: block; margin-bottom: 12px; }

/* ---------- Fahrstunde (Ergänzungen) ---------- */
.lesson-head { background: var(--asphalt); color: #fff; border-radius: var(--radius); padding: 16px 18px; }
.lesson-head img { background: #fff; border-radius: 50%; }
.lesson-head .nr { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gelb); }
.lesson-head .leit { color: #C5CDD8; }
.lernziel { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--linie); border-left: 0; border-radius: 12px; padding: 10px 14px; font-size: .98rem; }
.lernziel .icon { color: var(--accent, var(--asphalt)); margin-top: 3px; }
.step-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.after-step:empty { display: none; }
.after-step .merksatz { font-size: 1.05rem; box-shadow: 0 0 0 4px var(--gelb-soft); }
.check-head { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; margin-bottom: 8px; }
.check-head img { width: 64px; height: 64px; }
.exam-intro .check-head { grid-template-columns: 72px 1fr; }
.exam-intro .check-head img { width: 72px; height: 72px; }
.facts { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; background: var(--flaeche); border-radius: 12px; padding: 10px 12px; }
.facts .icon { margin-top: 2px; }
.cb-option .opt-letter { color: var(--muted); }
.fp-box { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 16px; align-items: center; margin: 18px 0 8px; background: var(--flaeche); border-radius: 14px; padding: 14px; }
@media (max-width: 520px) { .fp-box { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.fp-gauge { width: 100%; max-width: 220px; height: auto; display: block; }
.erklaerung { background: var(--blau-soft); border-radius: 10px; padding: 10px 12px; margin: 0; }
.exam .notice { margin-bottom: 14px; }

/* ---------- Plaketten-Animation: Konfetti ---------- */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; opacity: 0; animation: confetti-fall 2s ease-in forwards; }
.confetti i:nth-child(3n) { width: 8px; height: 8px; border-radius: 50%; }
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--drift, 0), 105vh) rotate(540deg); opacity: .9; }
}
.award .inner { position: relative; z-index: 1; }

/* ---------- Führerschein: Rückseite, Paar, Urkunde ---------- */
.license-intro { text-align: center; margin-bottom: 16px; }
.license-intro .muted { max-width: 640px; margin: 0 auto; }
.flip { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 560px)); justify-content: center; width: 100%; }
.flip .lic { width: 100%; }
.lic-back { background: #fff; color: var(--asphalt); border: 1px solid var(--linie); }
.lic-back .lic-in { grid-template-rows: auto auto 1fr auto; gap: 1.6cqw; padding: 4cqw 4.6cqw; }
.lic-back .back-head { display: flex; justify-content: space-between; align-items: baseline; gap: 2cqw; border-bottom: .5cqw solid var(--gelb); padding-bottom: 1.2cqw; }
.lic-back .back-head strong { font-size: 3.4cqw; }
.lic-back .back-head span { font-size: 2.3cqw; color: var(--muted); font-weight: 700; }
.lic-back .berechtigung { font-size: 2.75cqw; line-height: 1.3; margin: 0; font-weight: 700; }
.lic-back .back-rules { margin: 0; padding-left: 3.8cqw; font-size: 2.7cqw; line-height: 1.3; display: grid; gap: .8cqw; align-content: start; }
.lic-back .back-foot { display: flex; justify-content: space-between; gap: 2cqw; font-size: 1.75cqw; color: var(--muted); border-top: 1px solid var(--linie); padding-top: 1cqw; }
.card-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0; width: 100%; max-width: 1000px; margin: 0 auto 16px; break-inside: avoid; page-break-inside: avoid; }
.card-pair .lic { width: 100%; border-radius: 0; box-shadow: none; border: 1px solid #9AA3AF; }
.card-pair .fold { width: 0; border-left: 1.5px dashed #5B6575; }
.sheet { display: grid; gap: 18px; margin-top: 18px; }
.print-note { font-size: 9pt; color: #5B6575; margin: 0 0 4mm; }
.urkunde { background: #fff; border: 3px solid var(--asphalt); border-radius: 18px; padding: 28px 32px; color: var(--asphalt); display: grid; gap: 10px; text-align: center; position: relative; }
.urkunde .u-head { display: grid; grid-template-columns: 96px 1fr 180px; gap: 18px; align-items: center; text-align: left; }
.urkunde .u-head h1 { margin: 0; font-size: 2.4rem; }
.urkunde .u-school, .urkunde .u-class { margin: 0; color: var(--muted); font-weight: 700; }
.urkunde .u-plate { width: 180px; height: auto; }
.urkunde .u-lead { margin: 0; font-size: 1.1rem; }
.urkunde .u-name { margin: 0; font-size: 2.6rem; font-weight: 700; border-bottom: 4px solid var(--gelb); justify-self: center; padding: 0 24px; }
.urkunde .u-plaques { display: flex; justify-content: center; gap: 22px; margin: 6px 0; }
.urkunde .u-plaques figure { margin: 0; display: grid; justify-items: center; gap: 4px; font-weight: 700; font-size: .9rem; }
.urkunde .u-plaques img { width: 70px; height: 70px; }
.urkunde .u-berechtigung { font-weight: 700; margin: 0; }
.urkunde .u-rules { text-align: left; margin: 0 auto; max-width: 760px; padding-left: 1.4em; font-size: .95rem; }
.urkunde .u-foot { display: grid; grid-template-columns: 1fr 1fr 96px; gap: 18px; align-items: end; text-align: left; margin-top: 6px; }
.urkunde .u-sign { border-bottom: 1.5px solid var(--asphalt); height: 36px; margin-bottom: 4px; }
.urkunde .u-no { display: grid; gap: 2px; font-weight: 700; }
.urkunde .u-no .fine { font-weight: 400; font-size: .8rem; color: var(--muted); }
.urkunde .u-qr { width: 96px; height: 96px; }

/* Feedback */
.smiley .face { width: 40px; height: 40px; }
.smileys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.smiley { min-width: 0; text-align: center; line-height: 1.2; }
.rule-choices { display: grid; gap: 8px; }
.rule-choice { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; text-align: left; font: inherit; font-size: .95rem; color: var(--text); background: #fff; border: 2px solid var(--linie); border-radius: 12px; padding: 8px 12px; min-height: 52px; cursor: pointer; }
.rule-choice .rule-n { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--asphalt); display: grid; place-items: center; font-weight: 700; background: #fff; }
.rule-choice[aria-checked="true"] { border-color: var(--asphalt); background: var(--gelb-soft); }
.rule-choice[aria-checked="true"] .rule-n { background: var(--gelb); }

/* ---------- Lehrkraft ---------- */
.login-card { margin-top: 24px; }
.login-head { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; margin-bottom: 18px; }
.teacher-grid { display: grid; gap: 16px; grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; }
@media (max-width: 860px) { .teacher-grid { grid-template-columns: 1fr; } }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: 10px 10px; text-align: left; border-bottom: 1px solid var(--linie); vertical-align: middle; }
table.data thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--flaeche); white-space: nowrap; }
table.data tbody th { font-weight: 700; }
table.data tbody tr:hover { background: #FAFBFC; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data td.actions { white-space: nowrap; text-align: right; }
table.data td.actions .btn { margin-left: 4px; }
table.students td:nth-child(4) { min-width: 150px; }
.code-chip { font-weight: 700; letter-spacing: .08em; background: var(--gelb); border: 2px solid var(--asphalt); border-radius: 8px; padding: 2px 8px; white-space: nowrap; }
.strong-link { font-weight: 700; color: var(--asphalt); }
.ok-text { color: var(--gruen-text); font-weight: 700; }
.mini-plaques { display: inline-flex; gap: 3px; }
.mini-plaques img { width: 26px; height: 26px; flex: none; }
table.data td.plaques-cell { min-width: 128px; white-space: nowrap; }
table.students .chip { white-space: normal; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .empty { padding: 28px 20px; text-align: center; color: var(--muted); }
.card.flush .empty .icon { color: var(--asphalt); }
.class-head { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin-bottom: 16px; }
.class-head h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.ch-qr { width: 160px; height: 160px; border: 1px solid var(--linie); border-radius: 12px; padding: 6px; background: #fff; }
@media (max-width: 700px) { .class-head { grid-template-columns: 1fr; } .ch-qr { justify-self: start; } }
.code-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 4px; }
.code-row .code-display { font-size: clamp(1.6rem, 5vw, 2.2rem); padding: 6px 14px; }
.join-url { color: var(--muted); overflow-wrap: anywhere; margin: 0; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gruen-text); background: var(--gruen-soft); border-radius: 999px; padding: 3px 10px; }
.live-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); animation: live 1.6s infinite; }
.live-dot.stale { color: var(--rot-text); background: var(--rot-soft); }
.live-dot.stale::before { background: var(--rot); animation: none; }
@keyframes live { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.lesson-toggles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); align-items: stretch; margin-bottom: 14px; }
.lesson-toggle { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; text-align: left; font: inherit; color: var(--text); background: #fff; border: 2px solid var(--linie); border-radius: 14px; padding: 8px 12px; min-height: 60px; cursor: pointer; }
.lesson-toggle small { display: block; color: var(--muted); font-size: .8rem; }
.lesson-toggle[aria-pressed="true"] { border-color: var(--asphalt); background: var(--gelb-soft); }
.lesson-toggle[aria-pressed="true"] small { color: var(--gruen-text); font-weight: 700; }
.lesson-toggle[disabled] { cursor: not-allowed; opacity: .85; }
.lesson-toggles .btn { align-self: center; }
.toggles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.toggle { display: grid; grid-template-columns: 24px 1fr 52px; gap: 10px; align-items: center; text-align: left; font: inherit; font-size: .95rem; color: var(--text); background: var(--flaeche); border: 2px solid transparent; border-radius: 12px; padding: 8px 12px; min-height: 52px; cursor: pointer; }
.toggle[aria-checked="true"] { background: #fff; border-color: var(--asphalt); }
.toggle .lbl { font-weight: 700; }
.toggle.mini { grid-template-columns: 52px; min-height: 40px; padding: 4px 6px; background: transparent; border-color: transparent; }
.phase-timer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--linie); }
.phase-timer .lbl { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; margin-right: 4px; }
.stats-grid { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-grid .stat.wide { grid-column: 1 / -1; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-title { font-weight: 700; margin-bottom: 8px; }
.badge-bars, .fb-bars { display: grid; gap: 6px; }
.bb-row { display: grid; grid-template-columns: auto minmax(90px, 160px) 1fr 52px; gap: 10px; align-items: center; }
.fb-bars .bb-row { grid-template-columns: minmax(100px, 140px) 1fr 36px; }
.bb-l { font-size: .9rem; font-weight: 700; }
.bb-track { height: 14px; background: var(--flaeche); border-radius: 999px; overflow: hidden; border: 1px solid var(--linie); }
.bb-track .fill { display: block; height: 100%; background: var(--asphalt); border-radius: 999px; }
.fill.c1 { background: var(--blau); } .fill.c2 { background: var(--gelb); } .fill.c3 { background: var(--gruen); } .fill.c4 { background: var(--rot); }
.bb-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; }
.top-wrong { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.top-wrong li { font-size: .95rem; }
.top-wrong li .chip { margin-left: 6px; }
.fb-q { margin-bottom: 12px; }
.fb-q p { margin-bottom: 6px; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }
.copy-fallback { font-size: .9rem; }

/* ---------- Beamer ---------- */
body.page-beamer { background: var(--asphalt); color: #fff; min-height: 100vh; }
.beamer { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; gap: 1.6vh; padding: 2vh 3vw 1.2vh; }
.bm-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.bm-head > img:first-child { width: clamp(48px, 6vh, 80px); height: auto; }
.bm-title { margin: 0; font-size: clamp(1.4rem, 3.6vh, 2.6rem); }
.bm-claim { margin: 0; color: #C5CDD8; font-size: clamp(.9rem, 2vh, 1.3rem); }
.bm-plate { height: clamp(32px, 5vh, 56px); width: auto; }
.bm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 3vw; align-items: stretch; }
@media (max-aspect-ratio: 1/1) { .bm-grid { grid-template-columns: 1fr; } }
.bm-join { background: var(--asphalt-2); border-radius: 24px; padding: 3vh 2vw; display: grid; justify-items: center; align-content: center; gap: 1.6vh; text-align: center; }
.bm-label { color: #C5CDD8; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: clamp(.85rem, 1.8vh, 1.2rem); display: flex; align-items: center; gap: 8px; justify-content: center; }
.bm-label.small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.bm-code { font-size: clamp(3rem, min(7.5vw, 13vh), 9rem); font-weight: 700; letter-spacing: .08em; color: var(--asphalt); background: var(--gelb); border-radius: 18px; padding: .05em .35em; line-height: 1.15; border: 6px solid #fff; white-space: nowrap; }
.bm-qr-wrap { background: #fff; border-radius: 18px; padding: 12px; }
.bm-qr { width: clamp(170px, 28vh, 360px); height: auto; aspect-ratio: 1; display: block; }
.bm-url { font-size: clamp(1.1rem, 2.8vh, 2rem); font-weight: 700; overflow-wrap: anywhere; }
.bm-stats { display: grid; gap: 1.8vh; align-content: start; }
.bm-bottom { display: grid; gap: 1.4vw; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.bm-bottom > :empty, .bm-bottom > [hidden] { display: none; }
.bm-tacho { display: grid; grid-template-columns: auto 1fr; gap: 2vw; align-items: center; background: var(--asphalt-2); border-radius: 24px; padding: 2vh 2vw; }
.bm-tacho .bm-label { justify-content: flex-start; }
.bm-gauge .tacho { width: clamp(160px, 21vh, 300px); }
.bm-km { font-size: clamp(2.2rem, 6.4vh, 5rem); font-weight: 700; color: var(--gelb); line-height: 1.05; font-variant-numeric: tabular-nums; }
.bm-sub { color: #C5CDD8; font-size: clamp(1rem, 2.2vh, 1.5rem); }
.bm-unlocked { display: grid; gap: 1vh; }
.bm-unlocked .bm-label { justify-content: flex-start; }
.bm-open-list { display: flex; flex-wrap: wrap; gap: 10px; }
.bm-open { font-weight: 700; font-size: clamp(1rem, 2.2vh, 1.5rem); background: #fff; color: var(--asphalt); border-radius: 999px; padding: .2em .8em; border: 4px solid var(--gelb); }
.bm-open.c1 { border-color: #5B9BE6; } .bm-open.c2 { border-color: var(--gelb); } .bm-open.c3 { border-color: #3FCB78; } .bm-open.c4 { border-color: #F06B75; }
.bm-open.exam { background: var(--gelb); border-color: #fff; }
.bm-badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4vw; }
.bm-badge { background: var(--asphalt-2); border-radius: 20px; padding: 1.2vh 1vw; display: grid; justify-items: center; gap: .4vh; }
.bm-badge img { width: clamp(48px, 7vh, 96px); height: auto; }
.bm-badge-n { font-size: clamp(1.8rem, 5vh, 4rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.bm-badge-l { color: #C5CDD8; font-weight: 700; font-size: clamp(.85rem, 1.8vh, 1.2rem); text-align: center; }
.bm-timer { background: #fff; color: var(--asphalt); border-radius: 24px; padding: 1.6vh 2vw; display: grid; justify-items: center; gap: 4px; }
.bm-timer .bm-label { color: var(--muted); }
.bm-clock { font-size: clamp(2.6rem, 9vh, 7rem); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.bm-clock.low { color: var(--rot-text); }
.bm-clock.done { color: var(--rot-text); animation: live 1s infinite; }
.bm-leader { background: var(--asphalt-2); border-radius: 24px; padding: 0 2vw; }
.bm-leader:not(:empty) { padding: 1.6vh 2vw; }
.bm-leader .bm-label { justify-content: flex-start; }
.bm-leader ol { margin: .6vh 0 0; padding-left: 1.6em; font-size: clamp(1rem, 2.3vh, 1.6rem); }
.bm-leader li { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
.bm-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; opacity: .55; transition: opacity .2s; }
.bm-controls:hover, .bm-controls:focus-within { opacity: 1; }
.bm-controls .btn.secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.bm-msg { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 20px; text-align: center; padding: 20px; }
.page-beamer :focus-visible { outline-color: var(--gelb); }
:fullscreen .bm-controls { opacity: .25; }

/* =====================================================================
   v2 – KI-Fahrschule
   ===================================================================== */
.show-xs { display: none; }
@media (max-width: 480px) { .hide-xs { display: none; } .show-xs { display: inline; } }
.connect-btn { display: inline-flex; align-items: center; gap: 8px; color: #fff; background: transparent; border: 1.5px solid rgba(255,255,255,.35); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .92rem; min-height: 40px; cursor: pointer; }
.connect-btn:hover { background: var(--asphalt-2); border-color: rgba(255,255,255,.6); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--blau); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-weight: 700; }
.small-chip { font-size: .72rem; padding: 2px 8px; }
.example-note { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--muted); margin: 12px 0 0; }
.example-note .icon { width: 1.1em; height: 1.1em; margin-top: 2px; }
.connect h2 { display: flex; align-items: center; gap: 8px; }
.welcome-code { font-size: clamp(1.8rem, 7vw, 2.6rem); }

/* Startseite */
.start-top { display: grid; gap: 16px; }
.start-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
@media (max-width: 760px) { .start-grid { grid-template-columns: 1fr; } .join-card:not(.has-code) { display: none; } }
.only-sm { display: none; margin-top: 12px; }
@media (max-width: 760px) { .only-sm { display: inline-flex; } }
@media (max-width: 480px) {
  .module-card, .exam-card, .license-teaser { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .module-card .plaque, .exam-card img, .license-teaser img { width: 56px; height: 56px; }
}
.solo-card h2, .start-grid h2 { display: flex; align-items: center; gap: 8px; }
.solo-card .local-note { margin: 0 0 10px; }
.solo-km { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.join-form .btn.big { margin-top: 4px; }
.module-card { border-top: 6px solid var(--linie); }
.module-card.c1 { border-top-color: var(--blau); }
.module-card.c2 { border-top-color: var(--gelb); }
.module-card.c3 { border-top-color: var(--gruen); }
.module-card.c4 { border-top-color: var(--rot); }
.exam-card .nr, .module-card .nr { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.exam-card h3 { margin: 2px 0 6px; }
.exam-card .btn-row { margin-top: 8px; }
.start-info { margin-top: 24px; }
.start-info .notice { margin: 4px 0 16px; }
.rules-mini { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: .95rem; }

/* Modul-Ansicht */
.lesson-top { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 4px; }
.lesson-top .back-link { margin-bottom: 0; }
.solo-hint { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); background: #fff; border: 1px solid var(--linie); border-radius: 999px; padding: 4px 12px; }
.lesson-head.c2 img { box-shadow: 0 0 0 3px var(--gelb); }
.intro-card .einstieg { font-size: clamp(1.1rem, 2.4vw, 1.3rem); font-weight: 700; line-height: 1.45; margin: 4px 0 14px; }
.route-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.route-list a { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--flaeche); color: var(--text); text-decoration: none; min-height: 52px; border: 2px solid transparent; }
.route-list a:hover { border-color: var(--asphalt); }
.route-list .rl-id { width: 44px; height: 32px; border-radius: 8px; background: var(--asphalt); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.route-list .rl-t { font-weight: 700; }
.route-list .rl-m { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.route-list li.done .icon { color: var(--gruen-text); }
.route-list li.done .rl-id { background: var(--gruen-text); }
.merk-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.merk-list li { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: start; background: var(--gelb-soft); border: 2px solid var(--asphalt); border-radius: 14px; padding: 12px 14px; }
.merk-list .ml-id { width: 44px; height: 44px; border-radius: 50%; background: var(--gelb); border: 3px solid var(--asphalt); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.merk-list strong { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.merk-list p { margin: 2px 0 0; font-weight: 700; font-size: 1.05rem; }
.counter-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--muted); }
.counter-row .dots { display: inline-flex; gap: 6px; }
.counter-row .dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--linie); }
.counter-row .dots i.done { background: var(--asphalt); }
.counter-row .dots i.cur { background: var(--gelb); box-shadow: 0 0 0 2px var(--asphalt); }

/* Prozent-Balken */
.pb-list { display: grid; gap: 8px; }
.pb-row { display: grid; grid-template-columns: minmax(84px, 34%) minmax(0, 1fr) 3.4em; gap: 10px; align-items: center; }
.pb-label { font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; hyphens: auto; -webkit-hyphens: auto; min-width: 0; }
.pb-track { height: 18px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 999px; overflow: hidden; }
.pb-fill { display: block; height: 100%; background: var(--blau); border-radius: 999px; transition: width .5s ease; min-width: 0; }
.pb-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.pb-row.cls .pb-fill { background: var(--asphalt-3); }
.pb-row.mine .pb-fill { background: var(--gelb); }
.pb-row.mine .pb-track { border-color: var(--asphalt); }
.pb-list.compact { gap: 4px; }
.pb-list.compact .pb-row { grid-template-columns: minmax(70px, 40%) minmax(0, 1fr) 3.2em; gap: 6px; font-size: .82rem; }
.pb-list.compact .pb-track { height: 10px; }

/* Wort-Orakel */
.or-card { background: var(--asphalt); color: #fff; border-radius: 18px; padding: clamp(18px, 4vw, 30px); text-align: center; }
.or-sentence { margin: 0; font-size: clamp(1.4rem, 4.2vw, 2.2rem); font-weight: 700; line-height: 1.3; }
.or-slot { display: inline-block; min-width: 3.2em; border-bottom: 4px dashed var(--gelb); color: var(--gelb); padding: 0 .2em; }
.or-slot.filled { border-bottom-style: solid; animation: pop .25s ease-out; }
.or-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); margin-top: 16px; }
.or-tile { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 68px; border-radius: 14px; border: 2px solid var(--asphalt); background: #fff; font: inherit; font-weight: 700; font-size: 1.15rem; color: var(--asphalt); cursor: pointer; padding: 10px; }
.or-tile:hover:not([disabled]) { background: var(--gelb-soft); }
.or-tile.other { border-style: dashed; color: var(--muted); font-size: 1rem; }
.or-tile.chosen { background: var(--gelb); color: var(--asphalt); box-shadow: 0 0 0 3px var(--gelb-soft); }
.or-tile[disabled]:not(.chosen) { opacity: .5; cursor: default; }
.or-results:empty { display: none; }
.or-results { margin-top: 18px; }
.or-grid { display: grid; align-items: start; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.or-box { border: 2px solid var(--linie); border-radius: 16px; padding: 14px 16px; background: #fff; }
.or-box h3 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.or-box.class { border-color: var(--asphalt); }
.or-box.muted-box { background: var(--flaeche); border-style: dashed; }
.or-comment { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; background: var(--blau-soft); border-radius: 12px; padding: 12px 14px; }
.or-comment p { margin: 0; }
.or-summary { display: grid; gap: 8px; margin-bottom: 14px; }
.or-sum-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--flaeche); border-radius: 12px; padding: 10px 12px; }
.or-sum-s { font-weight: 700; flex: 1 1 220px; }

/* Zeitlupe */
.zl-sec { margin-top: 8px; }
.zl-sec + .zl-sec { margin-top: 26px; padding-top: 6px; border-top: 1px solid var(--linie); }
.zl-flow { display: flex; align-items: stretch; gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding: 6px 2px 10px; }
.zl-node { flex: 1 1 0; min-width: 96px; display: grid; justify-items: center; align-content: center; gap: 6px; text-align: center; font: inherit; color: var(--text); background: #fff; border: 2px solid var(--linie); border-radius: 14px; padding: 10px 6px; cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s; }
.zl-node .zl-num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--flaeche); border: 2px solid var(--linie); }
.zl-node .zl-title { font-size: .85rem; font-weight: 700; line-height: 1.2; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.zl-node.past { border-color: var(--asphalt); }
.zl-node.past .zl-num { background: var(--asphalt); color: #fff; border-color: var(--asphalt); }
.zl-node.current { border-color: var(--asphalt); background: var(--gelb-soft); transform: translateY(-3px); box-shadow: 0 6px 14px rgba(30,43,60,.15); }
.zl-node.current .zl-num { background: var(--gelb); border-color: var(--asphalt); }
.zl-arrow { align-self: center; color: var(--muted); flex: none; }
.zl-loop { flex: 3 1 0; display: grid; gap: 6px; border: 2px dashed var(--asphalt-3); border-radius: 18px; padding: 6px 8px 8px; position: relative; background: #FAFBFC; min-width: 330px; transition: background-color .2s, border-color .2s; }
.zl-loop.active { border-color: var(--asphalt); background: var(--blau-soft); }
.zl-loop.pulse .zl-loop-label .icon { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.zl-loop-label { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--asphalt-3); }
.zl-loop-row { display: flex; align-items: stretch; gap: 6px; }
.zl-loop-back { height: 16px; margin: 0 18% 0 18%; border: 2px solid var(--asphalt-3); border-top: 0; border-radius: 0 0 14px 14px; position: relative; }
.zl-loop-back::before { content: ''; position: absolute; left: -7px; top: -7px; border: 6px solid transparent; border-bottom-color: var(--asphalt-3); }
.zl-loop-back span { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); background: inherit; font-size: .72rem; color: var(--muted); background: #FAFBFC; padding: 0 6px; white-space: nowrap; }
.zl-loop.active .zl-loop-back span { background: var(--blau-soft); }
@media (max-width: 860px) {
  .zl-flow { flex-direction: column; overflow: visible; }
  .zl-arrow { transform: rotate(90deg); }
  .zl-node { grid-template-columns: 36px 1fr; justify-items: start; text-align: left; align-items: center; min-width: 0; }
  .zl-node.current { transform: translateX(4px); }
  .zl-loop { min-width: 0; }
  .zl-loop-row { flex-direction: column; }
  .zl-loop-back { display: none; }
}
.zl-detail { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; background: var(--flaeche); border-radius: 14px; padding: 14px 16px; margin-top: 10px; min-height: 108px; }
.zl-detail-num { width: 52px; height: 52px; border-radius: 50%; background: var(--gelb); border: 3px solid var(--asphalt); display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; }
.zl-detail h4 { margin: 2px 0 4px; font-size: 1.15rem; }
.zl-detail p { margin: 0; }
.zl-loop-hint { display: flex; gap: 8px; align-items: center; margin-top: 8px !important; font-weight: 700; color: var(--blau); }
.zl-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 8px; margin-bottom: 14px; }
.zl-tabs button { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; font-weight: 700; color: var(--asphalt); background: #fff; border: 2px solid var(--linie); border-radius: 14px; padding: 10px 12px; min-height: 56px; cursor: pointer; }
.zl-tabs button[aria-selected="true"] { border-color: var(--asphalt); background: var(--gelb-soft); }
.zl-tabs .tab-n { width: 30px; height: 30px; border-radius: 50%; background: var(--asphalt); color: #fff; display: grid; place-items: center; flex: none; font-size: .9rem; }
.zl-player .chat { margin-top: 0; }
.zl-player .from-ai { max-width: 100%; width: 100%; }
.zl-answer { font-size: clamp(1.1rem, 2.6vw, 1.35rem); font-weight: 700; line-height: 1.6; min-height: 1.6em; }
.zl-tok.given { color: var(--muted); }
.zl-tok.new { border-radius: 4px; animation: tok-fade 1.4s ease-out forwards; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
@keyframes tok-fade { 0%, 60% { background: var(--gelb); } 100% { background: transparent; } }
.zl-caret { display: inline-block; width: 3px; height: 1.1em; background: var(--asphalt); margin-left: 4px; vertical-align: -0.15em; animation: live 1s infinite; }
.zl-flyer { position: fixed; z-index: 150; pointer-events: none; font-weight: 700; font-size: 1.15rem; background: var(--gelb); color: var(--asphalt); border: 2px solid var(--asphalt); border-radius: 8px; padding: 0 6px; line-height: 1.5; box-shadow: 0 8px 18px rgba(30,43,60,.25); }
.zl-phases { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 10px; font-size: .85rem; color: var(--muted); }
.zl-ph { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); font-weight: 700; transition: background-color .2s; }
.zl-ph b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--linie); font-size: .75rem; }
.zl-ph.on { background: var(--gelb); color: var(--asphalt); border-color: var(--asphalt); }
.zl-ph.on b { border-color: var(--asphalt); }
.zl-ph.end.on { background: var(--asphalt); color: #fff; }
.zl-ph.end.on b { color: var(--asphalt); }
.zl-phases i { font-style: normal; font-weight: 700; }
.zl-phases i.loop { font-size: 1.1rem; color: var(--blau); }
.zl-cand-box { border: 2px solid var(--asphalt); border-radius: 16px; padding: 12px 14px; background: #fff; }
.zl-cand-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.zl-counter { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.zl-cands { display: grid; gap: 6px; }
.zl-cand { display: grid; grid-template-columns: minmax(90px, 26%) minmax(0, 1fr) 52px minmax(0, auto); gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; border: 2px solid transparent; transition: background-color .2s, border-color .2s; }
.zl-word { font-weight: 700; font-size: 1.05rem; }
.zl-track { height: 18px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 999px; overflow: hidden; }
.zl-fill { display: block; height: 100%; width: 0; background: var(--blau); border-radius: 999px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.zl-p { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.pb-val { white-space: nowrap; }
.zl-controls .btn { flex: 1 1 auto; }
@media (min-width: 700px) { .zl-controls .btn { flex: 0 0 auto; } }
.zl-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.zl-cand.rest { opacity: .55; }
.zl-cand.rest .zl-fill { background: #9AA3AF; }
.zl-cand.chosen { border-color: var(--asphalt); background: var(--gelb-soft); }
.zl-cand.chosen .zl-fill { background: var(--gelb); }
.zl-cand.rolling { background: var(--blau-soft); border-color: var(--blau); }
@media (max-width: 560px) { .zl-cand { grid-template-columns: minmax(80px, 34%) minmax(0, 1fr) 3.6em; gap: 8px; } .zl-tags { grid-column: 1 / -1; justify-content: flex-start; } .zl-tags:empty { display: none; } }
.zl-alert-host:empty { display: none; }
.zl-alert { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; background: var(--rot-soft); border: 3px solid var(--rot); border-radius: 14px; padding: 12px 14px; animation: pop .25s ease-out; }
.zl-alert p { margin: 0; font-weight: 700; }
.zl-alert-body { flex: 1; min-width: 0; }
.zl-alert-bars { margin-top: 8px; max-width: 460px; }
.pb-row.best .pb-fill { background: var(--gruen); }
.pb-list.compact .pb-row.mine .pb-fill { background: var(--rot); }
@media (max-width: 520px) { .zl-alert { flex-direction: column; } }
.zl-alert-tag { flex: none; display: inline-flex; align-items: center; gap: 6px; background: var(--rot-text); color: #fff; font-weight: 700; border-radius: 999px; padding: 4px 12px; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.zl-end:empty { display: none; }
.zl-end { display: grid; gap: 10px; margin-top: 4px; }
.zl-result { border-radius: 14px; padding: 12px 14px; border: 3px solid; }
.zl-result.ok { border-color: var(--gruen); background: var(--gruen-soft); }
.zl-result.bad { border-color: var(--rot); background: var(--rot-soft); }
.zl-result-text { margin: 6px 0 0; font-size: 1.15rem; font-weight: 700; }
.zl-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.zl-result.ok .zl-badge { color: var(--gruen-text); }
.zl-result.bad .zl-badge { color: var(--rot-text); }
.zl-halluzination { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 2px dashed var(--rot); border-radius: 14px; padding: 12px 14px; }
.zl-halluzination p { margin: 0; }
.zl-controls { margin-top: 14px; }
.dice-btn { background: var(--blau); }
.dice-btn:hover { background: #18508F; }
.zl-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linie); }
.zl-zusatz { margin-top: 14px; }
.zl-zusatz ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* Fehler-Radar */
.fw-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: start; }
.fw-card { border: 2px solid var(--linie); border-radius: 16px; padding: 14px; background: #fff; }
.fw-card.found { border-color: var(--gruen); }
.fw-card.missed { border-color: var(--rot); }
.fw-card .chat { margin-top: 8px; }
.fw-card .from-user, .fw-card .from-ai { max-width: 100%; }
.fw-q { font-weight: 700; margin: 14px 0 6px; }
.fw-verdicts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fw-verdict { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 12px; border: 2px solid var(--linie); background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--asphalt); padding: 8px; text-align: center; }
.fw-verdict[aria-pressed="true"].stimmt { border-color: var(--gruen); background: var(--gruen-soft); }
.fw-verdict[aria-pressed="true"].fehler { border-color: var(--rot); background: var(--rot-soft); }
.fw-sicher { display: flex; width: 100%; }
.fw-sicher button { flex: 1 1 0; justify-content: center; }
.fw-richtig { margin: 10px 0 0; background: var(--flaeche); border-radius: 10px; padding: 8px 12px; }
.fw-eval { margin-top: 16px; }
.fw-table td:first-child { width: auto; }
.fw-table th[scope=row] { background: var(--flaeche); color: var(--text); }
.fw-take { display: flex; gap: 10px; align-items: center; background: var(--gelb-soft); border: 2px solid var(--asphalt); border-radius: 12px; padding: 10px 14px; margin: 14px 0; font-size: 1.05rem; }

/* Prompt-Werkstatt */
.pw-hint { margin-bottom: 12px; }
.pw-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pw-list { display: grid; gap: 14px; }
.pw-item { border: 2px solid var(--linie); border-radius: 16px; padding: 14px; background: #fff; display: grid; gap: 8px; }
.pw-item.complete { border-color: var(--gruen); }
.pw-weak { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pw-weak .bubble-user { display: inline-block; }
.pw-item label { margin: 4px 0 0; }
.pw-check { background: var(--flaeche); border-radius: 12px; padding: 10px 12px; }
.pw-check-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pw-check-head strong { display: inline-flex; gap: 6px; align-items: center; }
.pw-badge { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--muted); }
.pw-badge.full { color: var(--gruen-text); }
.pw-chips { display: grid; gap: 8px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .pw-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pw-chip { display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; border: 2px solid var(--linie); border-radius: 12px; padding: 6px 10px; background: #fff; font-size: .9rem; }
.pw-chip b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--linie); font-size: .85rem; }
.pw-chip.k b { border-color: var(--blau); } .pw-chip.a b { border-color: var(--gelb); } .pw-chip.f b { border-color: var(--gruen); } .pw-chip.q b { border-color: var(--rot); }
.pw-chip small { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.pw-lamp { width: 12px; height: 12px; border-radius: 50%; background: #C9CFD8; }
.pw-chip.ok { border-color: var(--gruen); background: var(--gruen-soft); }
.pw-chip.ok .pw-lamp { background: var(--gruen); }
.pw-chip.ok small { color: var(--gruen-text); }
.pw-chip.miss .pw-lamp { background: var(--rot); }
.pw-chip.legend { grid-template-columns: auto auto; grid-template-rows: auto; padding: 4px 10px 4px 4px; border-radius: 999px; }
.pw-tips { margin: 8px 0 0; padding-left: 1.2em; font-size: .9rem; }
.pw-tips:empty { display: none; }
.pw-unplugged { margin-top: 16px; }
.pw-status:empty { display: none; }
.pw-status { margin-top: 12px; }

/* Prüfplakette */
.pp-wrap { margin-bottom: 18px; background: #FFFDF5; }
.pp { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 640px) { .pp { grid-template-columns: 1fr; justify-items: center; } }
.pp-badge { display: grid; justify-items: center; gap: 6px; text-align: center; }
.pp-svg { width: 180px; height: 180px; filter: drop-shadow(0 6px 12px rgba(30,43,60,.18)); }
.pp-badge-t strong { display: block; font-size: 1.2rem; }
.pp-badge-t span { color: var(--muted); font-size: .9rem; }
.pp-list { display: grid; gap: 8px; width: 100%; }
.pp-item { display: grid; grid-template-columns: 38px 1fr 32px; gap: 10px; align-items: center; text-align: left; font: inherit; color: var(--text); background: #fff; border: 2px solid var(--linie); border-radius: 12px; padding: 8px 10px; min-height: 56px; cursor: pointer; }
.pp-item[disabled] { cursor: default; grid-template-columns: 38px 1fr; opacity: 1; }
.pp-n { width: 34px; height: 34px; border-radius: 50%; background: var(--gelb); border: 3px solid var(--asphalt); display: grid; place-items: center; font-weight: 700; }
.pp-txt strong { display: block; }
.pp-txt small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.3; }
.pp-item .box { width: 30px; height: 30px; border-radius: 8px; border: 3px solid var(--asphalt); display: grid; place-items: center; }
.pp-item .box .icon { opacity: 0; }
.pp-item[aria-checked="true"] { border-color: var(--gruen); background: var(--gruen-soft); }
.pp-item[aria-checked="true"] .box { background: var(--gruen); color: #fff; border-color: var(--gruen); }
.pp-item[aria-checked="true"] .box .icon { opacity: 1; }
.pp-print { justify-self: start; }
.pp-page .btn-row { justify-content: space-between; margin-bottom: 14px; }
.pp-card { background: #fff; border: 3px solid var(--asphalt); border-radius: 22px; padding: 22px; display: grid; gap: 16px; }
.pp-card-head { display: flex; align-items: center; gap: 12px; }
.pp-card-head strong { display: block; font-size: 1.2rem; }
.pp-card-head span { color: var(--muted); }
.pp-merk { font-weight: 700; font-size: 1.1rem; background: var(--gelb-soft); border-radius: 12px; padding: 10px 14px; margin: 0; }
.pp-foot { color: var(--muted); font-size: .85rem; margin: 0; text-align: center; }

/* Plakat-Regel, KI-Hinweis, kein Mensch */
.plakat { position: relative; background: #fff; border: 3px solid var(--asphalt); border-radius: 6px; padding: 18px 18px 14px; margin: 0 auto 18px; max-width: 560px; text-align: center; box-shadow: 6px 6px 0 var(--gelb); transform: rotate(-.6deg); }
.plakat-pin { position: absolute; top: -10px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--rot); border: 3px solid var(--asphalt); }
.plakat strong { display: block; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.plakat p { margin: 4px 0 0; font-size: clamp(1.1rem, 2.6vw, 1.35rem); font-weight: 700; }
.notice.extra { margin-top: 14px; }
.ki-hinweis { margin-top: 16px; }
.kein-mensch { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; margin-top: 16px; background: var(--blau-soft); border: 2px solid var(--blau); border-radius: 16px; padding: 14px 16px; }
.kein-mensch .km-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--blau); color: #fff; display: grid; place-items: center; }
.kein-mensch .km-ic .icon { width: 28px; height: 28px; }
.kein-mensch p { margin: 4px 0 0; }
.zone.z-rot { border-color: var(--rot); } .zone.z-gelb { border-color: #C99700; } .zone.z-gruen { border-color: var(--gruen); }
.training-note { margin-top: 14px; }
.training-note p { margin: 4px 0 0; }
.info-sec h3 { font-size: 1.1rem; }

/* Bias: Schätzung */
.bias-q { font-size: 1.15rem; }
.bias-slider { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin: 10px 0; font-weight: 700; color: var(--muted); }
.bias-slider input[type=range] { width: 100%; height: 44px; accent-color: var(--asphalt); }
.bias-est-row { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
@media (max-width: 560px) { .bias-est-row { grid-template-columns: 1fr; justify-items: center; } }
.bias-big { display: grid; justify-items: center; }
.bias-out { font-size: 3rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.bias-big span { color: var(--muted); font-weight: 700; }
.people { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; max-width: 420px; width: 100%; }
.people i { aspect-ratio: 1; border-radius: 50%; background: var(--linie); }
.people i.f { background: var(--blau); }
.bias-row .fill.est { background: var(--gelb); }
.lk-note { margin-top: 12px; }

/* Lehrkraft v2 */
.lt-all { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
table.data th.mod-col { white-space: nowrap; }
table.data th.mod-col img { vertical-align: middle; margin-right: 4px; }
table.data td.mod-cell { white-space: nowrap; text-align: center; }
table.data th.mod-col { text-align: center; }
.mod-badge img { width: 26px; height: 26px; vertical-align: middle; }
.mod-prog { font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; background: var(--gelb-soft); border-radius: 999px; padding: 2px 8px; }
.oracle-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); margin-top: 8px; }
.oracle-item { background: var(--flaeche); border-radius: 12px; padding: 10px 12px; }
.oracle-item p { margin: 0 0 6px; }
.oracle-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .oracle-cols { grid-template-columns: 1fr; } }
.page-teacher h1 + .muted { margin-top: 8px; }

/* Beamer v2 */
.beamer { grid-template-rows: auto 1fr auto; }
.bm-main { display: grid; }
.bm-main > [hidden] { display: none !important; }
.bm-controls { align-items: center; justify-content: space-between; }
.bm-ctrl-group { display: flex; gap: 8px; flex-wrap: wrap; }
.bm-controls .btn[aria-pressed="true"] { background: var(--gelb); color: var(--asphalt); border-color: var(--gelb); }
.bm-ziel { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; margin: 0; font-size: .9rem; }
.bm-ziel select { width: auto; min-height: 40px; padding: 4px 10px; font-size: .9rem; background: var(--asphalt-2); color: #fff; border-color: rgba(255,255,255,.35); }
.bm-oracle { display: grid; gap: 2.4vh; align-content: start; }
.bmo-head { display: grid; grid-template-columns: auto 1fr auto; gap: 2vw; align-items: center; background: var(--asphalt-2); border-radius: 24px; padding: 2vh 2vw; }
.bmo-title { text-align: center; }
.bmo-sentence { margin: .6vh 0 0; font-size: clamp(2rem, 6.5vh, 4.6rem); font-weight: 700; line-height: 1.15; }
.bmo-sentence .or-slot { font-size: inherit; }
.bmo-nav { min-width: 64px; min-height: 64px; }
.on-dark .bmo-nav.btn.secondary { color: #fff; border-color: rgba(255,255,255,.4); }
.bmo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; }
@media (max-aspect-ratio: 1/1) { .bmo-grid { grid-template-columns: 1fr; } }
.bmo-col { background: var(--asphalt-2); border-radius: 24px; padding: 2.4vh 2vw; }
.bmo-col h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(1.2rem, 3.2vh, 2rem); margin-bottom: 1.6vh; }
.pb-list.big { gap: 1.4vh; }
.pb-list.big .pb-row { grid-template-columns: minmax(120px, 30%) minmax(0, 1fr) 3.4em; white-space: nowrap; font-size: clamp(1.1rem, 3vh, 2rem); }
.pb-list.big .pb-track { height: clamp(18px, 3.6vh, 40px); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); }
.pb-list.big .pb-row.cls .pb-fill { background: #8FA3BD; }
.pb-list.big .pb-row.top .pb-fill { background: var(--gelb); }
.pb-list.big .pb-row .pb-fill { background: #5B9BE6; }
.pb-list.big .pb-row.cls.top .pb-fill { background: var(--gelb); }
.bmo-note { display: flex; gap: 10px; align-items: center; color: #C5CDD8; font-size: clamp(.9rem, 2vh, 1.3rem); margin: 0; }

/* QR-Poster */
.qr-tools { margin-bottom: 20px; }
.qr-tools .label { font-weight: 700; display: block; margin-bottom: 6px; }
.qr-picks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.posters { display: grid; gap: 24px; justify-items: center; }
.poster { container-type: inline-size; width: min(100%, 210mm); aspect-ratio: 210 / 297; background: #fff; color: var(--asphalt); border: 1px solid var(--linie); box-shadow: var(--shadow); padding: 6.5cqw 7cqw; display: grid; grid-template-rows: auto auto 1fr auto auto auto; gap: 3cqw; position: relative; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2.4cqw; background: var(--asphalt); }
.poster.c1::before { background: var(--blau); } .poster.c2::before { background: var(--gelb); } .poster.c3::before { background: var(--gruen); } .poster.c4::before { background: var(--rot); }
.poster-head { display: grid; grid-template-columns: 9cqw 1fr auto; gap: 2.4cqw; align-items: center; }
.poster-head > img:first-child { width: 9cqw; height: 9cqw; }
.poster-head strong { display: block; font-size: 4.2cqw; line-height: 1.1; }
.poster-head span { color: var(--muted); font-size: 2.2cqw; }
.poster-plate { height: 5.2cqw; width: auto; }
.poster-mod { display: grid; grid-template-columns: 30cqw 1fr; gap: 4cqw; align-items: center; margin-top: 2cqw; }
.poster-plaque { width: 30cqw; height: 30cqw; }
.poster-kicker { font-size: 2.6cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.poster h2 { font-size: 6.4cqw; line-height: 1.08; margin: 1cqw 0 1.6cqw; }
.poster-leit { font-size: 3.8cqw; font-weight: 700; margin: 0; line-height: 1.25; }
.poster-qr { display: grid; place-items: center; }
.poster-qr img { width: 56cqw; height: 56cqw; border: 1.2cqw solid var(--asphalt); border-radius: 3cqw; padding: 2.4cqw; background: #fff; }
.poster-url { text-align: center; font-size: 4.4cqw; font-weight: 700; letter-spacing: .01em; overflow-wrap: anywhere; }
.poster-code { text-align: center; font-size: 3.4cqw; margin: 0; }
.poster-code strong { background: var(--gelb); border: .5cqw solid var(--asphalt); border-radius: 1.4cqw; padding: .2cqw 1.6cqw; letter-spacing: .08em; }
.poster-foot { display: grid; gap: .8cqw; text-align: center; font-size: 2.4cqw; color: var(--muted); border-top: .3cqw solid var(--linie); padding-top: 2cqw; }
.poster.overview { grid-template-rows: auto auto auto 1fr auto; }
.poster-ovtitle { text-align: center; margin: 1cqw 0 0 !important; }
.ov-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.6cqw; align-content: center; }
.ov-tile { border: .5cqw solid var(--linie); border-radius: 2.6cqw; padding: 2cqw 1.6cqw; display: grid; justify-items: center; gap: 1.4cqw; min-width: 0; }
.ov-tile.c1 { border-color: var(--blau); } .ov-tile.c2 { border-color: var(--gelb); } .ov-tile.c3 { border-color: var(--gruen); } .ov-tile.c4 { border-color: var(--rot); }
.ov-label { display: grid; grid-template-columns: 6cqw 1fr; gap: 1.2cqw; align-items: center; width: 100%; min-height: 7cqw; }
.ov-label img { width: 6cqw; height: 6cqw; }
.ov-label small { display: block; color: var(--muted); font-size: 2cqw; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ov-label strong { font-size: 2.6cqw; line-height: 1.1; }
.ov-label small { font-size: 1.7cqw !important; }
.ov-qr { width: 22cqw; height: 22cqw; }
.ov-url { font-size: 1.9cqw; font-weight: 700; text-align: center; overflow-wrap: anywhere; }

/* Übungsführerschein */
.lic.practice .lic-class { color: #fff; background: var(--rot-text); display: inline-block; padding: 0 1.4cqw; border-radius: 1cqw; }
.lic .qr.practice-mark { background: transparent; display: grid; justify-items: center; align-content: center; gap: .6cqw; padding: 0; }
.lic .qr.practice-mark img { width: 15cqw; height: 15cqw; background: #fff; border-radius: 50%; }
.lic .qr.practice-mark span { font-weight: 700; font-size: 2.6cqw; color: var(--gelb); text-transform: uppercase; letter-spacing: .08em; }
.lic-name-box { max-width: 640px; margin: 0 auto 16px; }
.lic-name-box .notice { margin-bottom: 14px; }
.urkunde .u-practice { margin: 0; font-weight: 700; color: var(--rot-text); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- 404 ---------- */
.notfound { margin-top: 32px; padding: 32px 20px; }
.sign-404 { width: 140px; height: 140px; margin: 0 auto 16px; border-radius: 50%; border: 14px solid var(--rot); display: grid; place-items: center; font-weight: 700; font-size: 2.2rem; color: var(--asphalt); background: #fff; }

/* ---------- Reduzierte Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .confetti { display: none !important; }
}

/* ---------- Druck (SuS) ---------- */
@page urkunde { size: A4 landscape; margin: 12mm; }
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  body { background: #fff; font-size: 11pt; display: block; }
  .topbar, .footer, .no-print, .toast-host { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .license-stage { justify-items: center; margin-bottom: 10mm; }
  .lic { width: 85.6mm; box-shadow: none; border-radius: 3mm; }
  .rules-list li { border: 1px solid #999; break-inside: avoid; font-size: 11pt; padding: 3mm 4mm; }
  .print-only { display: block !important; }
  .print-card .print-urkunde-area, .print-urkunde .print-card-area { display: none !important; }
  .page-license .wrap > :not(.print-only), .page-druck .wrap > .no-print { display: none !important; }
  .card-pair { grid-template-columns: 85.6mm 0 85.6mm; width: 171.2mm; max-width: none; margin: 0 auto 8mm; }
  .card-pair .lic { width: 85.6mm; height: 54mm; border: .2mm solid #777; }
  .card-pair .fold { border-left: .3mm dashed #555; }
  .sheet { display: block; margin: 0; }
  .urkunde { page: urkunde; break-after: page; page-break-after: always; border-radius: 6mm; height: 182mm; box-sizing: border-box; padding: 7mm 14mm; align-content: space-between; gap: 2mm; break-inside: avoid; }
  .urkunde .u-rules { font-size: 10.5pt; }
  .urkunde .u-plaques img { width: 15mm; height: 15mm; }
  .urkunde .u-qr { width: 22mm; height: 22mm; }
  .urkunde .u-head { grid-template-columns: 22mm 1fr 40mm; }
  .urkunde .u-head img:first-child { width: 22mm; height: 22mm; }
  .urkunde .u-plate { width: 40mm; }
  .urkunde:last-child { break-after: auto; page-break-after: auto; }
  .urkunde .u-head h1 { font-size: 26pt; }
  .urkunde .u-name { font-size: 28pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* QR-Poster: jede Seite ein A4-Poster */
  .page-qr .wrap { padding: 0; }
  .page-qr .posters { display: block; }
  .poster { page: poster; width: 210mm; height: 296mm; aspect-ratio: auto; border: 0; box-shadow: none; break-after: page; page-break-after: always; margin: 0; }
  .poster:last-child { break-after: auto; page-break-after: auto; }
  /* Prüfplakette als Karte */
  .pp-page { max-width: 150mm; margin: 0 auto; }
  .pp-card { border-width: .8mm; }
  .pp { grid-template-columns: 45mm 1fr; }
  .pp-svg { width: 42mm; height: 42mm; }
}
@page poster { size: A4 portrait; margin: 0; }
.print-only { display: none; }

/* ================= v3: Lehrkraft-Start, Unterricht, Materialien ================= */
.howto { margin-bottom: 16px; }
.howto-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.howto-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; background: var(--flaeche); border-radius: 14px; padding: 14px; }
.howto-steps p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.hs-n { width: 44px; height: 44px; border-radius: 50%; background: var(--gelb); border: 3px solid var(--asphalt); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; }
.start-cards { margin-bottom: 20px; align-items: stretch; }
.single-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.single-grid .lesson-toggle small { white-space: normal; }
.mat-list { display: grid; gap: 10px; }
.mat-link { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--flaeche); color: var(--text); text-decoration: none; }
.mat-link:hover { background: var(--gelb-soft); }
.mat-link .icon { width: 30px; height: 30px; color: var(--rot); }
.mat-link small { display: block; color: var(--muted); }
.mat-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.mat-item .mat-link:only-child { grid-column: 1 / -1; }
.mat-docx { display: inline-flex; gap: 6px; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--flaeche); color: var(--text); font-weight: 700; text-decoration: none; }
.mat-docx:hover { background: var(--gelb-soft); }
.mat-docx .icon { width: 24px; height: 24px; color: var(--blau); }
.teacher-cta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-top: 16px; }
.teacher-cta p { margin: 0; }
.lesson-card { border: 3px solid var(--asphalt); background: linear-gradient(0deg, #fff, #fff); margin-bottom: 16px; }
.lesson-card .btn.big { font-size: 1.1rem; }
.lc-single { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.lc-single .btn img { width: 22px; height: 22px; }
.ms-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.ms-classes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ms-classes .code-chip { margin-left: 6px; }
.ms-new .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.ms-new input { flex: 1 1 160px; }
.ms-new label { font-weight: 700; }

/* ================= v3: Live-Abstimmung (SuS-Overlay) ================= */
.live-ov { position: fixed; inset: 0; z-index: 900; background: rgba(14, 21, 31, .72); display: grid; place-items: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.live-box { width: min(640px, 100%); max-height: 100%; overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); padding: 20px 20px 22px; }
.live-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.live-head .live-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--gelb); color: var(--asphalt); display: grid; place-items: center; flex: none; }
.live-head .live-ic .icon { width: 26px; height: 26px; }
.live-head h2 { margin: 0; font-size: 1.3rem; }
.live-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.live-step { font-size: .85rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 6px 0; }
.live-q { font-size: 1.2rem; font-weight: 700; margin: 4px 0 10px; line-height: 1.3; }
.live-ctx { background: var(--flaeche); border-radius: 14px; padding: 12px 14px; margin: 0 0 12px; font-size: 1rem; }
.live-ctx .tag { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; background: var(--linie); border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; }
.live-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 96px), 1fr)); }
.live-opts.stack { grid-template-columns: 1fr; }
.live-opt { min-height: 60px; border-radius: 16px; border: 2px solid var(--linie); background: #fff; font: inherit; font-size: 1.1rem; font-weight: 700; color: var(--text); padding: 10px 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; justify-content: center; text-align: center; }
.live-opts.stack .live-opt { justify-content: flex-start; text-align: left; font-weight: 400; }
.live-opt .letter { width: 34px; height: 34px; border-radius: 50%; background: var(--asphalt); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.live-opt:hover { background: var(--gelb-soft); }
.live-opt.chosen { background: var(--gelb); border-color: var(--asphalt); }
.live-opt .dot { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.live-opt.other { color: var(--muted); border-style: dashed; }
.live-sentence { font-size: 1.4rem; font-weight: 700; background: var(--asphalt); color: #fff; border-radius: 16px; padding: 16px; margin: 0 0 12px; }
.live-sentence .gap { color: var(--gelb); border-bottom: 3px dashed var(--gelb); padding: 0 .3em; }
.live-range { display: grid; gap: 10px; margin: 8px 0 14px; }
.live-range output { font-size: 3rem; font-weight: 700; text-align: center; line-height: 1; }
.live-range output small { font-size: 1rem; font-weight: 400; color: var(--muted); margin-left: 6px; }
.live-range input[type=range] { width: 100%; height: 44px; accent-color: var(--rot); }
.live-range .scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.live-done { text-align: center; padding: 10px 6px; }
.live-done .icon { width: 64px; height: 64px; color: var(--gruen); }
.live-done h2 { margin: 6px 0; }
.live-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.live-foot .muted { font-size: .85rem; }

/* ================= v3: Offline-Status ================= */
.net-status { position: fixed; left: 12px; top: 74px; z-index: 800; display: inline-flex; align-items: center; gap: 8px; background: var(--asphalt); color: #fff; border-radius: 999px; padding: 8px 14px; font-size: .9rem; box-shadow: var(--shadow); }
.net-status .icon { width: 18px; height: 18px; color: var(--gelb); }
.net-status.ok .icon { color: #6BD995; }

/* ================= v3.1: Lehrkraft-Accounts ================= */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.register-form .check-row { margin: 8px 0 4px; }
.register-done .done-icon .icon { width: 72px; height: 72px; color: var(--gruen); }
.register-done .lead { font-size: 1.2rem; font-weight: 700; }
.badge-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--rot); color: #fff; font-size: .8rem; font-weight: 700; margin-left: 4px; }
.admin-link { position: relative; text-decoration: none; }
a.user-chip { text-decoration: none; color: inherit; }
.acc-data { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; }
.acc-data dt { color: var(--muted); }
.acc-data dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.pending-list { display: grid; gap: 10px; }
.pending-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; border-left: 6px solid var(--gelb); margin: 0; }
table.accounts .acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
table.accounts td { vertical-align: middle; }
table.accounts .email-cell { overflow-wrap: anywhere; max-width: 260px; }
table.accounts th .chip { margin-left: 6px; }
.temp-pw { font-size: 1.8rem; letter-spacing: .08em; }
.da-choice { border: 1px solid var(--linie); border-radius: 12px; padding: 10px 14px; display: grid; gap: 8px; margin: 0 0 8px; }
.howto-steps li.done { background: var(--gruen-soft); }
.howto-steps li.done .hs-n { background: var(--gruen); color: #fff; }
