/* Towerful – Oberfläche. Grundaufbau aus den ersten Mockups; Aussehen seit 14.10.2026 nach dem
   Design-System „F" (docs/design/towerful/, Tokens in towerful.css) – siehe Abschnitt „Design F" unten. */

* { box-sizing: border-box; }
/* Wie eine native App: die Seite selbst scrollt und federt nie, nur die Inhaltsbereiche (.scroll).
   Kein Doppeltipp-Zoom, kein Markieren und kein Kontextmenü auf Bedienelementen. */
html, body { margin: 0; height: 100%; overflow: hidden; touch-action: manipulation; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, .text, .lage-text, .muster p, .tower-text, .eigener { -webkit-user-select: text; user-select: text; }
.scroll { -webkit-overflow-scrolling: touch; }
/* Gedrückt-Zustand wie unter iOS: kurz abdunkeln statt Hover */
:is(.zeile-uebung, .uebung-karte, .schritt-zeile, .zf-zeile, .chip, .filter button, .tabs button, .seitenleiste .eintrag, .kategorien .eintrag, .art-karte, .fortsetzen, .schalterzeile, .hilfen-zeile):active { opacity: .6; transition: opacity 0s; }
body {
  background: var(--surface); color: var(--ink);
  font: 400 16px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; -webkit-user-select: none; user-select: none; }
button:disabled { cursor: default; color: inherit; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
p { margin: 0; }

/* App-Fläche füllt immer das Fenster. Ab 600 px stehen die Bildschirme als mittige Spalte,
   die Übung wird ab 900 px zweispaltig wie im Desktop-Mockup 1l (siehe unten). */
#app { position: fixed; inset: 0; container-type: inline-size; background: var(--surface); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* Typografie */
.display { font: 600 32px/1.12 var(--font-sans); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.title { font: 600 24px/1.2 var(--font-sans); letter-spacing: -.01em; margin: 0; }
.heading { font: 600 18px/1.3 var(--font-sans); margin: 0; }
.body-s { font: 400 14px/1.45 var(--font-sans); }
.label { font: 600 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.data { font: 600 14px/1.3 var(--font-mono); }
.meta { font: 400 11px/1.5 var(--font-mono); color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.ink3 { color: var(--ink-3); }
.intro { font: 400 16px/1.5 var(--font-sans); color: var(--ink-2); text-wrap: pretty; }

/* Bildschirm: Kopf + scrollender Inhalt + fester Dock */
.screen { display: flex; flex-direction: column; height: 100%; }
.scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.scroll > * { flex-shrink: 0; }
.scroll.weit { padding: 22px 22px 16px; gap: 22px; }
.scroll.abschluss { padding: 28px 20px 16px; gap: 22px; }
.dock { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--chrome-line); background: var(--surface); }
.lesen-inhalt { display: flex; flex-direction: column; gap: 12px; }
.lesen-inhalt > * { flex-shrink: 0; }
.ctx .ctx-lage { display: none; }
.tipp-zeile { display: none; }
.unter { display: flex; justify-content: center; align-items: center; height: 36px; font: 500 14px var(--font-sans); color: var(--ink-2); gap: 6px; }
.unter button { min-height: 36px; padding: 0 6px; }

/* Marke */
.markenzeile { display: flex; justify-content: space-between; align-items: center; padding-top: env(safe-area-inset-top); }
.marke { display: inline-flex; align-items: center; gap: 10px; font: 600 18px var(--font-sans); letter-spacing: -.01em; }
.marke { gap: 8px; }
/* Towerful-Zeichen: farbig auf hellem, weiß auf dunklem Grund */
.marke i { width: 30px; height: 30px; flex: none; background: url(icons/towerful-farbig.svg) center / contain no-repeat; }
[data-theme=dark] .marke i { background-image: url(icons/towerful-weiss.svg); }
.markenzeile .meta2 { font: 500 12px var(--font-mono); color: var(--ink-3); }

/* Karten */
.card { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.card.tower { gap: 14px; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; font: 600 11px var(--font-mono); letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; }

/* Knöpfe */
.btn { height: 44px; padding: 0 14px; border-radius: var(--r-btn-s); border: 1px solid var(--line-3); background: transparent; font: 500 14px var(--font-sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background var(--t-fast); }
.btn:active { background: var(--surface-2); }
.btn.voll { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.btn.gross { height: 56px; border-radius: var(--r-btn); font: 600 16px var(--font-sans); width: 100%; }
.btn.rand { border: 1.5px solid var(--ink); }
.btn.text { border: 0; height: 44px; font: 500 15px var(--font-sans); width: 100%; }
.btn.start { height: 64px; border-radius: 18px; font: 600 17px var(--font-sans); width: 100%; justify-content: space-between; padding: 0 22px; }
.btn.start .pfeil { font: 400 22px var(--font-sans); }
.btn .kuerzel { font: 500 11px var(--font-mono); color: var(--ink-3); display: none; }
.knopfreihe { display: flex; gap: 8px; }
.knopfreihe > * { flex: 1; }
.dreieck { width: 0; height: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; flex: none; }
.link { text-decoration: underline; text-underline-offset: 3px; font-weight: 600; font-size: 14px; }
.icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Kopf im Übungsschritt: × | Titel | Zähler, darunter die Fortschrittsleiste */
.kopf { padding: calc(14px + env(safe-area-inset-top)) 16px 12px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; column-gap: 8px; row-gap: 12px; border-bottom: 1px solid var(--chrome-line); background: var(--surface); }
.kopf .stepbar { grid-column: 1 / -1; grid-row: 2; }
.kopf .zaehler { grid-column: 3; grid-row: 1; }
.kopf .mitte { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.kopf .mitte b { font: 600 15px var(--font-sans); }
.kopf .mitte span { font: 500 11px var(--font-mono); color: var(--ink-3); text-transform: uppercase; }
.kopf .zaehler { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; font: 600 13px var(--font-mono); }
.schliessen { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font: 400 22px var(--font-sans); color: var(--ink-2); flex: none; }
/* Schließen gut sichtbar: runde Fläche mit Rand (Bug 949) */
.kopf .schliessen, .schliessen.rund { width: 40px; height: 40px; border-radius: 20px; background: var(--raised); border: 1px solid var(--line-3); color: var(--ink); font-size: 24px; line-height: 1; }
.schliessen.rund .icon, .kopf .schliessen .icon { width: 18px; height: 18px; stroke-width: 2; }
.schliessen.klein { width: 32px; height: 32px; border-radius: 16px; font-size: 20px; }
.stepbar { display: flex; gap: 4px; padding: 0 4px; }
.stepbar i { flex: 1; height: 4px; border-radius: 2px; background: var(--step-open); }
.stepbar i.fertig { background: var(--ink); }
.stepbar i.jetzt { background: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink); }

/* Kontextzeile */
.ctx { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.ctx::-webkit-scrollbar { display: none; }
.ctx button { background: var(--surface-2); border-radius: 8px; padding: 6px 9px; font: 600 11px var(--font-mono); letter-spacing: .02em; min-height: 30px; white-space: nowrap; flex: none; }

/* Lage */
.lage-text { font: 400 16px/1.55 var(--font-sans); text-wrap: pretty; }
.lage-text b { font-weight: 600; }
.lage-auftrag { font: 600 16px/1.4 var(--font-sans); }

/* Tower-Karte */
.welle { display: flex; align-items: center; gap: 3px; height: 44px; }
.welle b { width: 4px; border-radius: 2px; background: var(--ink); flex: none; }
.welle b.offen { background: var(--wave-off); }
.tower-status { display: flex; justify-content: space-between; align-items: baseline; font: 500 14px var(--font-sans); }
.tower-status .zeit { font: 500 13px var(--font-mono); color: var(--ink-3); }
.tower-hinweis { font: 500 14px/1.4 var(--font-sans); color: var(--ink-2); }
.tower-text { font: 400 15px/1.55 var(--font-sans); color: var(--ink-strong); border-top: 1px dashed var(--line); padding-top: 12px; text-wrap: pretty; }

/* Transkript */
.transkript { border-radius: var(--r-card); padding: 14px 18px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.transkript .kopfzeile { color: var(--ink-2); }
.transkript .text { font: 400 15px/1.5 var(--font-sans); min-height: 1.5em; text-wrap: pretty; }

/* Sprechtaste */
@keyframes laufen { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }

/* Hinweis */
.notice { background: var(--raised); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; margin-bottom: 6px; }
.notice .zeichen { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--fill-2); display: flex; align-items: center; justify-content: center; font: 600 14px var(--font-mono); }
.notice .inhalt { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.notice b { font: 600 15px/1.3 var(--font-sans); }
.notice p { font: 400 14px/1.45 var(--font-sans); color: var(--ink-2); text-wrap: pretty; }
.notice .link { padding-top: 4px; align-self: flex-start; }

/* Ergebnis: fehlerfrei */
.fehlerfrei { border-radius: var(--r-card); padding: 18px; background: var(--raised); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.fehlerfrei .zeile { display: flex; gap: 14px; align-items: flex-start; }
.fehlerfrei .zeile > div { display: flex; flex-direction: column; gap: 4px; }
.fehlerfrei .titel { font: 600 18px var(--font-sans); }
.fehlerfrei .text { font: 400 14px/1.45 var(--font-sans); color: var(--ink-2); }
.fehlerfrei .ton { border-top: 1px solid var(--line-2); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.okkreis { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; }
.okkreis .icon { stroke-width: 2.4; }
.okkreis.klein { width: 24px; height: 24px; }
.okkreis.klein .icon { width: 14px; height: 14px; }

/* Ergebnis: Befunde */
.befunde { border-radius: var(--r-card); background: var(--raised); border: 1px solid var(--line); display: flex; flex-direction: column; }
.befunde .bkopf { padding: 14px 18px; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line-2); }
.befunde .bkopf b { font: 600 17px var(--font-sans); }
.befunde .bkopf span { font: 400 13px var(--font-sans); color: var(--ink-3); }
.befunde .eigener { padding: 12px 18px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.befunde .eigener .text { font: 400 15px/1.55 var(--font-sans); }
.befunde .glabel { padding: 12px 18px 4px; display: flex; align-items: center; gap: 8px; font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.befunde .glabel.inhalt { color: var(--content-text); }
.befunde .glabel.aussprache { color: var(--pron-text); }
.form-quadrat { width: 10px; height: 10px; background: var(--content); display: inline-block; flex: none; }
.form-kreis { width: 10px; height: 10px; border-radius: 50%; background: var(--pron); display: inline-block; flex: none; }
.befunde .zeilen { padding: 6px 18px 12px; display: flex; flex-direction: column; gap: 6px; font: 400 14px/1.45 var(--font-sans); }
.befund-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.befund-zeile .btn { height: 36px; flex: none; }
.wert-falsch { font: 500 14px var(--font-mono); text-decoration: line-through; }
.wert-richtig { font: 600 14px var(--font-mono); }
.mark-falsch { background: color-mix(in oklch, var(--content) 14%, transparent); border-bottom: 2px solid var(--content); padding: 0 1px; }
.mark-aussprache { border-bottom: 2px dotted var(--pron); }
.mark-fehlt { border: 1px dashed var(--content); color: var(--content-text); font: 600 11px var(--font-mono); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
.befunde .ton { border-top: 1px solid var(--line-2); padding: 12px 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.ton-kopf { display: flex; justify-content: space-between; font: 500 13px var(--font-sans); color: var(--ink-2); width: 100%; }
.digits { display: flex; gap: 6px; flex-wrap: wrap; }
.digit { width: 52px; height: 56px; border-radius: 10px; border: 1.5px solid var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.digit b { font: 600 18px var(--font-mono); }
.digit small { font: 500 10px var(--font-mono); text-transform: uppercase; }
.digit.falsch { background: var(--pron); border-color: var(--pron); color: #fff; }
.digit.unklar { border: 1.5px dashed var(--pron); color: var(--pron-text); }
.befunde .muster-knopf { border-top: 1px solid var(--line-2); padding: 0 18px; min-height: 48px; display: flex; justify-content: space-between; align-items: center; width: 100%; }
.muster { margin: 0 18px 16px; padding: 14px 16px; background: var(--surface-2); border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.muster p { font: 400 15px/1.55 var(--font-sans); }

/* Listen und Kacheln */
.liste { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.liste > * + * { border-top: 1px solid var(--line-2); }
.zeile-uebung { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; min-height: 48px; }
.icao { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--fill-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.icao b { font: 600 11px var(--font-mono); }
.icao small { font: 500 10px var(--font-mono); color: var(--ink-3); }
.icao.gross { width: 52px; height: 52px; }
.icao.gross b { font-size: 12px; }
.zeile-uebung .texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.zeile-uebung .texte b { font: 600 15px/1.3 var(--font-sans); }
.zeile-uebung .texte span { font: 400 13px/1.35 var(--font-sans); color: var(--ink-3); }
.badge { flex: none; font: 500 11px var(--font-mono); padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line-3); color: var(--ink-2); }
.liste-kopf { display: flex; align-items: baseline; justify-content: space-between; }
.liste-kopf b { font: 600 20px var(--font-sans); }
.liste-kopf span { font: 400 13px var(--font-sans); color: var(--ink-3); }
.filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filter::-webkit-scrollbar { display: none; }
.filter button { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line-3); font: 500 14px var(--font-sans); white-space: nowrap; }
.filter button[aria-pressed=true] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.gruppe-8 { display: flex; flex-direction: column; gap: 8px; }
.gruppe-12 { display: flex; flex-direction: column; gap: 12px; }
.schritte-liste .zeile { display: flex; gap: 14px; padding: 16px 18px; }
.schritte-liste .nr { font: 600 13px var(--font-mono); color: var(--ink-3); width: 20px; flex: none; }
.schritte-liste .zeile div { display: flex; flex-direction: column; gap: 2px; }
.schritte-liste b { font: 600 15px var(--font-sans); }
.schritte-liste span { font: 400 14px/1.4 var(--font-sans); color: var(--ink-3); }

/* Chips (Prüfungs-Besonderheiten) */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 44px; padding: 0 16px 0 12px; border-radius: 22px; display: inline-flex; align-items: center; gap: 8px; font: 500 14px var(--font-sans); }
.chip.an { background: var(--ink); color: var(--on-ink); }
.chip.an .chip-zeichen { background: var(--on-ink); color: var(--ink); }
.chip.aus { border: 1.5px dashed var(--line-4); color: var(--ink-strong); }
.chip.aus .chip-zeichen { border: 1.5px solid var(--line-4); color: var(--ink-2); }
.chip-zeichen { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.chip-zeichen .icon { width: 11px; height: 11px; stroke-width: 3; }
.mono-chip { font: 500 11px var(--font-mono); padding: 4px 8px; border-radius: 6px; background: var(--dunkel-chip); color: var(--dunkel-chip-text); }

/* Weitermachen */
.weiter-karte { background: var(--dunkel); color: var(--auf-dunkel); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.weiter-karte .label { color: var(--auf-dunkel-2); }
.weiter-karte .weiter-text { display: flex; flex-direction: column; gap: 14px; }
.weiter-karte .titelblock { display: flex; flex-direction: column; gap: 4px; }
.weiter-karte .titelblock b { font: 600 18px var(--font-sans); }
.weiter-karte .titelblock span { font: 400 14px var(--font-sans); color: var(--auf-dunkel-2); }
.weiter-karte .stepbar { padding: 0; }
.weiter-karte .stepbar i { background: var(--dunkel-offen); box-shadow: none; }
.weiter-karte .stepbar i.fertig { background: var(--auf-dunkel); }
.weiter-karte .fortsetzen { height: 48px; border-radius: 14px; background: var(--auf-dunkel); color: var(--dunkel); font: 600 15px var(--font-sans); display: flex; align-items: center; justify-content: center; width: 100%; }

/* Schalter */
.schalterzeile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; }
.schalterzeile .texte { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.schalterzeile b { font: 600 15px var(--font-sans); }
.schalterzeile .erkl { font: 400 13px/1.4 var(--font-sans); color: var(--ink-3); text-wrap: pretty; }
.toggle { flex: none; display: flex; align-items: center; gap: 8px; }
.toggle small { font: 500 11px var(--font-mono); color: var(--ink-3); }
.toggle[data-an=true] small { color: var(--ink); }
.toggle i { width: 52px; height: 32px; border-radius: 16px; background: var(--muted-fill); box-shadow: inset 0 0 0 1.5px var(--line-4); position: relative; transition: background var(--t-fast); }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.22); transition: transform var(--t-fast); }
.toggle[data-an=true] i { background: var(--ink); box-shadow: none; }
.toggle[data-an=true] i::after { transform: translateX(20px); box-shadow: none; background: var(--on-ink); }
.segmented { display: flex; padding: 3px; border-radius: 12px; background: var(--fill-2); }
.segmented button { flex: 1; height: 38px; border-radius: 9px; font: 500 14px var(--font-sans); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.segmented button[aria-pressed=true] { background: var(--raised); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.segmented.gross { padding: 4px; border-radius: 16px; background: var(--muted-fill); }
.segmented.gross button { height: auto; min-height: 56px; border-radius: 12px; gap: 2px; font: 500 15px var(--font-sans); }
.segmented.gross button[aria-pressed=true] { font-weight: 600; }
.segmented button small { font: 400 12px var(--font-sans); color: var(--ink-3); }

/* Abschnitte (Einstellungen) */
.abschnitt { display: flex; flex-direction: column; gap: 8px; }
.abschnitt > .liste { margin-top: 4px; }
.abschnitt .erkl { font: 400 14px/1.45 var(--font-sans); color: var(--ink-2); }
.seitentitel { font: 600 26px var(--font-sans); letter-spacing: -.01em; margin: 0; }
.wahlzeile { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.wahlzeile b { font: 600 15px var(--font-sans); }

/* Einrichten */
.einrichten-kopf { background: var(--dunkel); color: var(--auf-dunkel); padding: calc(14px + env(safe-area-inset-top)) 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.einrichten-kopf .zeile { display: flex; justify-content: space-between; align-items: center; }
.einrichten-kopf .schliessen { color: var(--auf-dunkel-2); }
.einrichten-kopf .zeile span { font: 500 11px var(--font-mono); letter-spacing: .08em; color: var(--auf-dunkel-2); padding-right: 8px; text-transform: uppercase; }
.einrichten-kopf .block { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.einrichten-kopf .icao-gross { font: 500 40px/1 var(--font-mono); letter-spacing: .04em; }
.einrichten-kopf .uebungstitel { font: 600 22px/1.2 var(--font-sans); letter-spacing: -.01em; }
.einrichten-kopf .beschreibung { font: 400 14px/1.45 var(--font-sans); color: var(--auf-dunkel-2); }
.einrichten-kopf .chips { gap: 6px; padding-top: 4px; }
.einrichten-inhalt { padding: 22px 16px 8px; display: flex; flex-direction: column; gap: 26px; }
.frage { display: flex; flex-direction: column; gap: 12px; }
.frage > .heading, .frage > .fragekopf { padding: 0 4px; }
.fragekopf { display: flex; flex-direction: column; gap: 3px; }
.fragekopf span:not(.heading) { font: 400 13px var(--font-sans); color: var(--ink-3); }
.art-karten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.art-karte { border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line-3); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.art-karte[aria-pressed=true] { background: var(--raised); box-shadow: inset 0 0 0 2px var(--ink); }
.art-karte .kopf2 { display: flex; justify-content: space-between; align-items: center; font: 600 16px var(--font-sans); }
.auswahlkreis { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-4); display: flex; align-items: center; justify-content: center; }
[aria-pressed=true] .auswahlkreis { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.auswahlkreis .icon { width: 12px; height: 12px; stroke-width: 3; }
.leiste { display: flex; align-items: center; gap: 3px; }
.leiste i { flex: 1; height: 4px; border-radius: 2px; background: var(--ink); }
.leiste i.punkt { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.leiste i.grau { background: var(--line-4); }
.leiste i.punkt.ende { width: 12px; height: 12px; background: var(--ink-2); }
.art-karte ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.art-karte li { display: flex; gap: 8px; align-items: baseline; font: 400 13px/1.4 var(--font-sans); }
.art-karte li .marker { flex: none; width: 12px; font: 600 12px var(--font-sans); }
.art-karte li .marker .icon { width: 12px; height: 12px; stroke-width: 2.6; vertical-align: -1px; }
.art-karte li.aus { color: var(--ink-2); }
.hilfen-zeile { min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 12px 4px 0; border-top: 1px solid var(--line); font: 500 15px var(--font-sans); width: 100%; }
.hilfen-zeile .winkel { font: 400 20px var(--font-sans); color: var(--ink-2); transition: transform var(--t-fast); }
.hilfen-zeile[aria-expanded=true] .winkel { transform: rotate(90deg); }
.fuss { padding: 12px 16px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--chrome-line); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.fuss .satz { font: 400 14px/1.5 var(--font-sans); color: var(--ink-strong); padding: 0 4px; text-wrap: pretty; }
.fuss .satz b { font-weight: 600; color: var(--ink); }
.check { min-height: 36px; display: flex; align-items: center; justify-content: center; gap: 8px; font: 400 13px var(--font-sans); color: var(--ink-2); }
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line-4); margin: 0; display: grid; place-items: center; }
.check input:checked { background: var(--ink); box-shadow: none; }
.check input:checked::after { content: ''; width: 5px; height: 9px; border: solid var(--on-ink); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }

/* Tabs und Rahmen der Bereiche (Handy: Tabs unten über die ganze Breite) */
.screen.nav .seitenleiste { display: none; }
.screen.nav .bereich { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tabs .segment { flex: 1; display: flex; }
.tabs { display: flex; border-top: 1px solid var(--line); background: var(--surface); padding: 6px 8px calc(14px + env(safe-area-inset-bottom)); }
.tabs button { flex: 1; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font: 500 12px var(--font-sans); color: var(--ink-3); }
.tabs button::before { content: ''; width: 18px; height: 3px; border-radius: 2px; }
.tabs button[aria-current=page] { color: var(--ink); font-weight: 600; }
.tabs button[aria-current=page]::before { background: var(--ink); }

/* Bottom-Sheet (1c) */
.sheet-hg { position: fixed; inset: 0; background: rgba(21,25,28,.42); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.sheet { background: var(--raised); width: 100%; border-radius: 28px 28px 0 0; padding: 12px 24px calc(22px + env(safe-area-inset-bottom)); max-height: 90%; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.sheet .griff { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line-3); flex: none; }
.sheet .symbol { width: 56px; height: 56px; border-radius: 16px; background: var(--dunkel); display: flex; align-items: center; justify-content: center; flex: none; }
.sheet .symbol::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--transmit); }
.sheet .textblock { display: flex; flex-direction: column; gap: 10px; }
.sheet .textblock p { font: 400 15px/1.5 var(--font-sans); color: var(--ink-2); text-wrap: pretty; }
.sheet textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-3); background: var(--surface); resize: vertical; font: 400 16px/1.5 var(--font-sans); }
.punkte { display: flex; flex-direction: column; gap: 12px; font: 400 15px/1.45 var(--font-sans); }
.punkte div { display: flex; gap: 12px; }
.punkte div::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--ink); }
.sheet .knoepfe { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }

/* Zusammenfassung (1m) */
.zf-label { font: 500 11px var(--font-mono); letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; padding-top: env(safe-area-inset-top); }
.zf-zahl { display: flex; flex-direction: column; gap: 6px; }
.zf-zahl .zeile { display: flex; align-items: baseline; gap: 10px; }
.gross-zahl { font: 600 64px/1 var(--font-sans); letter-spacing: -.03em; }
.zf-zahl .von { font: 500 22px var(--font-sans); color: var(--ink-2); }
.zf-zahl p { font: 400 15px/1.5 var(--font-sans); color: var(--ink-2); text-wrap: pretty; }
.schritt-zeile { display: flex; align-items: center; gap: 12px; padding: 12px 16px; width: 100%; min-height: 52px; }
.schritt-zeile .nr { font: 600 12px var(--font-mono); color: var(--ink-3); width: 20px; flex: none; }
.schritt-zeile .texte { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.schritt-zeile b { font: 600 14px var(--font-sans); }
.schritt-zeile .texte span { display: flex; gap: 10px; font: 400 13px var(--font-sans); color: var(--ink-2); }
.schritt-zeile .ansehen { font: 500 13px var(--font-sans); text-decoration: underline; text-underline-offset: 3px; }
.zf-fuss { padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.zf-fuss .knopfreihe { gap: 10px; }

/* Pflicht-Footer */
footer.pflicht { font: 400 11px/1.5 var(--font-mono); color: var(--ink-3); text-align: center; }

/* Mitschrift: leere Fläche (Bug 966), nur „Leeren" oben rechts */
.notizen { position: relative; height: 30vh; min-height: 220px; background-color: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.notizen canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; }
.notizen-leeren { position: absolute; top: 10px; right: 12px; height: 32px; padding: 0 10px; border-radius: 8px; font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

/* Einrichten-Formular als eigene Seite (Handy) */
.einrichten-panel { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.merken-zeile { padding: 10px 16px; }
.merken-zeile .check { justify-content: flex-start; }
.start-rechts { display: inline-flex; align-items: center; gap: 10px; }

/* Ergebnis einblenden */
.erscheint { animation: erscheinen var(--t-result) both; }
@keyframes erscheinen { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}


/* Einrichten-Kopf hell (Bug 950): Kachel, Titel, eine Zeile Eckdaten */
.einrichten-kopf.hell { background: var(--surface); color: var(--ink); padding: calc(14px + env(safe-area-inset-top)) 16px 18px; gap: 16px; border-bottom: 1px solid var(--chrome-line); }
.einrichten-kopf.hell .zeile { justify-content: flex-start; gap: 12px; }
.einrichten-kopf.hell .zeile .label { padding: 0; }
.einrichten-kopf.hell .kopf-zeile { display: flex; align-items: center; gap: 14px; }
.einrichten-kopf.hell .titelblock { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.einrichten-kopf.hell .titelblock b { font: 600 20px/1.25 var(--font-sans); letter-spacing: -.01em; }
.einrichten-kopf.hell .titelblock span { font: 400 14px/1.4 var(--font-sans); color: var(--ink-3); }
.einrichten-kopf.hell .icao.gross { width: 56px; height: 56px; border-radius: 14px; }
.einrichten-kopf.hell .icao.gross b { font-size: 13px; }

/* Eintippen an der Stelle der Sprechtaste (Bug 948) */
.eintipp { background: var(--raised); border: 1px solid var(--line); border-radius: 22px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.eintipp-kopf { display: flex; justify-content: space-between; align-items: center; }
.eintipp textarea { width: 100%; min-height: 84px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--ink); background: var(--raised); resize: none; font: 400 16px/1.5 var(--font-sans); }
.eintipp .eingabe-knoepfe .btn { height: 48px; }
.einrichten-kopf.hell .zeile .label { color: var(--ink-3); }
.einrichten-kopf.hell .schliessen { color: var(--ink); }

/* Einrichten kompakt (Bug 958): Zeilen mit Wert, Details klappen beim Antippen auf */
.einrichten-inhalt.kompakt { gap: 14px; }
.einricht-liste { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; }
.einricht-abschnitt + .einricht-abschnitt { border-top: 1px solid var(--line-2); }
.einricht-zeile { width: 100%; min-height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 12px; text-align: left; }
.einricht-zeile .titel { font: 600 15px var(--font-sans); flex: none; }
.einricht-zeile .wert { flex: 1; min-width: 0; text-align: right; font: 400 14px var(--font-sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.einricht-zeile .winkel { font: 400 20px var(--font-sans); color: var(--ink-3); transition: transform var(--t-fast); }
.einricht-zeile[aria-expanded=true] .winkel { transform: rotate(90deg); }
.einricht-detail { padding: 2px 16px 16px; display: flex; flex-direction: column; gap: 12px; animation: erscheinen var(--t-result) both; }
.einricht-detail .detail-hinweis { font: 400 13px var(--font-sans); color: var(--ink-3); }
.einricht-detail .hilfen-zeile { padding-top: 12px; }

/* Schließen-Knöpfe mit Symbol statt Zeichen, damit das × genau mittig sitzt (Bug 956) */
.schliessen .icon { width: 18px; height: 18px; stroke-width: 2; }
.schliessen.klein .icon { width: 16px; height: 16px; }

/* Prüfungsflug: Karte auf „Üben" und Planung */
.flug-karte { display: flex; align-items: center; gap: 16px; width: 100%; padding: 18px 20px; border-radius: 20px; background: var(--raised); border: 1px solid var(--line); text-align: left; }
.flug-karte .flug-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.flug-karte .flug-text b { font: 600 18px/1.25 var(--font-sans); }
.flug-karte .flug-text > span:last-child { font: 400 14px/1.4 var(--font-sans); color: var(--ink-3); }
.flug-karte .flug-weiter { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 14px; background: var(--ink); color: var(--on-ink); font: 600 15px var(--font-sans); }
.flug-karte .flug-weiter .winkel { font: 400 20px var(--font-sans); }
.flug-hinweis { font: 400 14px/1.5 var(--font-sans); color: var(--ink-2); text-wrap: pretty; }
.flugplan { display: flex; flex-direction: column; gap: 18px; }
.flug-frage { display: flex; flex-direction: column; gap: 10px; }
.platz-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.platz-chip { min-height: 56px; padding: 8px 10px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-3); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; text-align: left; }
.platz-chip b { font: 600 13px var(--font-mono); }
.platz-chip span { font: 400 13px var(--font-sans); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.platz-chip[aria-pressed=true] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.platz-chip[aria-pressed=true] span { color: var(--auf-dunkel-2); }
[data-theme=dark] .platz-chip[aria-pressed=true] span { color: var(--ink-3); }
.platz-chip:disabled { opacity: .35; }

/* Anmeldung (Einladungscode) */
.code-feld { height: 60px; width: 100%; padding: 0 18px; border-radius: var(--r-btn); border: 1.5px solid var(--line-3); background: var(--raised); font: 600 24px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.code-feld:focus { outline: none; border-color: var(--ink); }
.code-feld::placeholder { color: var(--line-4); }
.mitte { text-align: center; }
.feld { height: 50px; width: 100%; padding: 0 14px; border-radius: var(--r-btn-s); border: 1px solid var(--line-3); background: var(--raised); font: 400 16px var(--font-sans); }
.feld:focus { outline: none; border-color: var(--ink); }

/* Admin-Bereich */
.admin-kopf { display: flex; flex-direction: column; gap: 14px; }
.admin-inhalt { display: flex; flex-direction: column; gap: 22px; }
.kpi-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.kpi { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font: 600 24px var(--font-sans); letter-spacing: -.01em; }
.kpi span { font: 500 13px var(--font-sans); color: var(--ink-2); }
.kpi small { font: 400 12px var(--font-mono); color: var(--ink-3); }
.admin-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; width: 100%; font: 400 15px var(--font-sans); }
.admin-zeile > span { display: flex; flex-direction: column; }
.admin-zeile small { font: 400 12px var(--font-mono); color: var(--ink-3); }
.admin-zeile b { font: 600 15px var(--font-mono); margin-left: auto; }
.admin-zeile .icon, .admin-konto .icon { width: 18px; height: 18px; stroke: var(--ink-3); fill: none; stroke-width: 1.75; flex: none; }
.admin-konto { display: flex; align-items: center; gap: 12px; padding: 14px 16px; width: 100%; }
.admin-konto .texte { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.admin-konto b { font: 600 16px var(--font-sans); display: flex; gap: 8px; align-items: center; }
.admin-konto span { font: 400 14px var(--font-sans); color: var(--ink-2); }
.admin-konto small { font: 400 12px var(--font-mono); color: var(--ink-3); }
.marke-klein { font: 600 10px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--content-text); border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; }
.balken-tage { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); }
.balken-tage > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.balken-tage i { width: 100%; max-width: 22px; background: var(--ink); border-radius: 4px 4px 0 0; }
.balken-tage small { font: 400 10px var(--font-mono); color: var(--ink-3); }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-funkliste { display: flex; flex-direction: column; gap: 10px; }
.admin-funk .kopfzeile { display: flex; justify-content: space-between; gap: 8px; font: 400 12px var(--font-mono); color: var(--ink-3); flex-wrap: wrap; }
.admin-schritt { font: 500 13px var(--font-mono); color: var(--ink-2); }
.admin-funk .vergleich { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: baseline; }
.admin-funk .vergleich p { font: 400 15px/1.45 var(--font-sans); -webkit-user-select: text; user-select: text; }
.befund-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.klein { height: auto; font: 500 12px var(--font-mono); padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line-3); }
.chip.klein.inh { color: var(--content-text); border-color: currentColor; }
.chip.klein.aus { color: var(--pron-text); border-color: currentColor; }
.chip.klein.ok { color: var(--ok); border-color: currentColor; }
.admin-funk audio { width: 100%; height: 36px; }
.code-gross { font: 600 34px var(--font-mono); letter-spacing: .12em; text-align: center; padding: 14px; border-radius: var(--r-card); background: var(--fill-2); -webkit-user-select: all; user-select: all; }
.link-zeile { font: 400 13px var(--font-mono); color: var(--ink-2); word-break: break-all; text-align: center; -webkit-user-select: all; user-select: all; }
a.btn { text-decoration: none; color: inherit; }
a.btn.voll { color: var(--on-ink); }
.btn.text.gefahr { color: var(--content-text); }
.feld-mit-knopf { position: relative; }
.feld-mit-knopf .feld { padding-right: 96px; }
.feld-knopf { position: absolute; right: 6px; top: 6px; height: 38px; padding: 0 12px; border-radius: 10px; font: 500 14px var(--font-sans); color: var(--ink-2); }
.trenner-oder { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font: 500 12px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.trenner-oder::before, .trenner-oder::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.konto-zeile { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.konto-zeile .texte { display: flex; flex-direction: column; min-width: 0; }
.konto-zeile .erkl { font: 400 13px var(--font-sans); color: var(--ink-3); overflow-wrap: anywhere; }

/* Profil */
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font: 600 15px var(--font-sans); }
.avatar.gross { width: 48px; height: 48px; font-size: 20px; }
.profil-karte { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-card); text-align: left; }
.profil-karte .texte { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.profil-karte b { font: 600 16px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profil-karte small { font: 400 13px var(--font-sans); color: var(--ink-3); }
.profil-karte .icon { width: 18px; height: 18px; stroke: var(--ink-3); fill: none; stroke-width: 1.75; }
.profil-kopf { display: flex; align-items: center; gap: 16px; }
.profil-kopf .texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profil-kopf b { font: 600 20px var(--font-sans); overflow-wrap: anywhere; }
.profil-kopf small { font: 400 14px var(--font-sans); color: var(--ink-3); }

/* Admin-Bereich (Neuaufbau) */
.scroll.seite.admin { gap: 20px; }
.admin-kopf { display: flex; flex-direction: column; gap: 14px; }
.admin-oben { display: flex; flex-direction: column; gap: 12px; }
.zurueck-link { display: inline-flex; align-items: center; gap: 4px; height: 36px; font: 500 15px var(--font-sans); color: var(--ink-2); align-self: flex-start; }
.zurueck-link .icon, .seitenleiste .zurueck .icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; }
.admin-titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.admin-aktion:empty { display: none; }
.kpi span { order: 0; }
.kpi b { order: 1; }
.kpi small { order: 2; }
.admin-kosten { gap: 12px; }
.admin-kosten .balken-tage { border: 0; padding: 0; background: none; height: 140px; }
.admin-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 12px var(--font-mono); color: var(--ink-3); }
.avatar.klein { width: 28px; height: 28px; font-size: 13px; }
.admin-konto { align-items: center; }
.admin-konto.blass b, .admin-tabelle tr.blass td { color: var(--ink-3); }
.tabelle-karte { padding: 0; overflow-x: auto; }
.admin-tabelle { width: 100%; border-collapse: collapse; font: 400 14px var(--font-sans); }
.admin-tabelle th { text-align: left; font: 600 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.admin-tabelle td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.admin-tabelle tbody tr { cursor: pointer; }
.admin-tabelle tbody tr:hover { background: var(--fill-3); }
.admin-tabelle tbody tr:last-child td { border-bottom: 0; }
.admin-tabelle .zahl { text-align: right; font-family: var(--font-mono); }
.admin-tabelle .person { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.admin-werte { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.admin-werte > div { background: var(--fill-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-werte span { font: 400 12px var(--font-sans); color: var(--ink-3); }
.admin-werte b { font: 600 16px var(--font-sans); }
.admin-zeilenknoepfe { display: flex; gap: 8px; }
.admin-zeilenknoepfe .btn { flex: 1; }
.feld.klein { height: 40px; font-size: 14px; width: auto; min-width: 0; max-width: 100%; }
.fehlertext { color: var(--content-text); }
.code-hinweis { text-align: center; }
.admin-konto .avatar { color: var(--on-ink); font: 600 15px var(--font-sans); }

