/* GD – gemeinsames Stylesheet (Aufnahme, Prüfansicht, Hinweise).
 * Nur Code und Gestaltung, nie Daten (11.1). Farbe ist Aussage, nie allein: jede Markierung
 * trägt Symbol UND Text (7.9). Rot = muss entschieden werden, Gelb/Orange = prüfen,
 * Grau = zurückhaltend. Bewusst KEIN Grün in der Prüfansicht (kein „grünes Häkchen“, 11.2).
 */
:root {
  --haus: #00507a;
  --haus-hell: #e6f0f6;
  --text: #1b1b1b;
  --leise: #5a5a5a;
  --rand: #c8c8c8;
  --flaeche: #ffffff;
  --grund: #f4f5f7;
  --rot: #b00020;
  --rot-hell: #fdecee;
  --gelb: #8a5a00;
  --gelb-hell: #fff4d6;
  --grau: #5a5a5a;
  --grau-hell: #efefef;
  --fokus: #ffbf47;
  /* Flächen mit weißer Schrift (Kopf, Hauptknopf, großer Aufnahmeknopf, laufender Status) */
  --haus-voll: #00507a;
  --haus-voll-hover: #003d5c;
  --rot-voll: #b00020;
  --gelb-voll: #8a5a00;
  --auf-voll: #ffffff;
  color-scheme: light dark;
}

/* Dunkles Farbschema nach Systemeinstellung (Wunsch des Users 04.11.2026). Nur die Tokens
 * wechseln; Rot/Gelb bleiben Aussage (7.9), aufgehellt für dunklen Grund. Das Unterschriftfeld
 * bleibt bewusst weiß (Papier), der Dunkelmodus der Aufnahme (.dunkel, 11.2) ist davon unabhängig. */
@media (prefers-color-scheme: dark) {
  :root {
    --haus: #7cc0e8;
    --haus-hell: #13324a;
    --text: #e8eaed;
    --leise: #a8adb4;
    --rand: #3c4148;
    --flaeche: #1c1f24;
    --grund: #121417;
    --rot: #ff8a95;
    --rot-hell: #3a1418;
    --gelb: #f2c25b;
    --gelb-hell: #352a0c;
    --grau: #a8adb4;
    --grau-hell: #2a2e34;
    --haus-voll: #0b5f8a;
    --haus-voll-hover: #0e70a3;
  }
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; line-height: 1.45;
}
main { max-width: 1400px; margin: 0 auto; padding: 1rem; }
main:focus { outline: none; }
h1 { font-size: 1.5rem; margin: 0 0 .75rem; }
h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
a { color: var(--haus); }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
[hidden] { display: none !important; }

.sprung { position: absolute; left: -999px; }
.sprung:focus { left: 1rem; top: .5rem; background: var(--flaeche); padding: .5rem; z-index: 10; }

.kopf {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center;
  background: var(--haus-voll); color: var(--auf-voll); padding: .6rem 1rem;
}
.kopf .marke { font-weight: 600; }
.kopf .kennung { flex: 1 1 auto; }
.kopf .konto { display: flex; gap: .5rem; align-items: center; }
.fuss { text-align: center; color: var(--leise); font-size: .85rem; padding: 1rem; }

.karte {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 6px;
  padding: 1rem 1.25rem; margin: 0 0 1rem;
}
.klein { font-size: .875rem; color: var(--leise); }
.inline { display: inline; }
.liste { list-style: none; padding: 0; margin: 0; }
.liste > li { padding: .5rem 0; border-bottom: 1px solid var(--grau-hell); }
.liste > li:last-child { border-bottom: 0; }

/* Knöpfe: Verb im Infinitiv, höchstens ein Hauptknopf je Seite */
.knopf {
  font: inherit; cursor: pointer; border: 1px solid var(--haus); background: var(--flaeche);
  color: var(--haus); border-radius: 4px; padding: .45rem .9rem; text-decoration: none;
  display: inline-block;
}
.knopf:hover { background: var(--haus-hell); }
.knopf:disabled { cursor: not-allowed; opacity: .55; }
.knopf.haupt { background: var(--haus-voll); color: var(--auf-voll); border-color: var(--haus-voll); }
.knopf.haupt:hover { background: var(--haus-voll-hover); }
.knopf.gefahr { border-color: var(--rot); color: var(--rot); }
.knopf.gross { font-size: 1.25rem; padding: .8rem 1.6rem; }
.klein-knopf { padding: .2rem .55rem; font-size: .875rem; }
.knopf.hoer { padding: .1rem .45rem; font-size: .8rem; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.haken { display: inline-flex; gap: .5rem; align-items: flex-start; }
.haken input { margin-top: .25rem; width: 1.15rem; height: 1.15rem; }
select { font: inherit; padding: .25rem; max-width: 100%; }

/* Meldungen */
.meldung { padding: .6rem .9rem; border-radius: 4px; margin: 0 0 1rem; border: 1px solid var(--rot);
  background: var(--rot-hell); color: var(--rot); }
.meldung.info { border-color: var(--haus); background: var(--haus-hell); color: var(--haus); }
.warnung { color: var(--gelb); background: var(--gelb-hell); padding: .4rem .6rem; border-radius: 4px; }

/* Aufnahme: großer Status (5.2) */
.statusfeld {
  display: flex; align-items: center; gap: 1rem; font-size: 1.4rem; font-weight: 600;
  padding: 1rem 1.25rem; border-radius: 6px; margin-bottom: 1rem; background: var(--grau-hell);
}
.statusfeld[data-zustand="laeuft"] { background: var(--rot-voll); color: var(--auf-voll); }
.statusfeld[data-zustand="pausiert"], .statusfeld[data-zustand="unterbrochen"] {
  background: var(--gelb-hell); color: var(--gelb); }
.statusfeld .laufzeit { margin-left: auto; font-variant-numeric: tabular-nums; }
.status-symbol { font-size: 1.6rem; }
.rec { color: var(--rot); }
.pegelzeile { display: flex; gap: .75rem; align-items: center; }
meter { width: 100%; max-width: 420px; height: 1.4rem; }
.ankuendigung { background: var(--haus-hell); padding: .6rem .8rem; border-radius: 4px; }
#qr { display: block; margin: .5rem 0; image-rendering: pixelated; }
.link-text { word-break: break-all; }
.dialog { border: 2px solid var(--haus); }

/* Prüfansicht: Markierungen immer Symbol + Text */
.marke { display: inline-block; padding: .05rem .4rem; border-radius: 3px; margin: .1rem .2rem .1rem 0;
  font-size: .9rem; }
.marke.stufe-rot { background: var(--rot-hell); color: var(--rot); border: 1px solid var(--rot); }
.marke.stufe-gelb { background: var(--gelb-hell); color: var(--gelb); border: 1px solid #d9a400; }
.marke.stufe-grau { background: var(--grau-hell); color: var(--grau); border: 1px solid var(--rand); }
.marke.erledigt { opacity: .6; }
.ziel[data-offen="ja"] { border-left: 4px solid var(--rot); padding-left: .6rem; }
.ziel[data-offen="nein"] { border-left: 4px solid transparent; padding-left: .6rem; }
.beleg { margin: .2rem 0 .2rem 1rem; }
.kuerzel { font-weight: 600; }
.segment { display: inline; }

.spalten { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1rem; }
@media (max-width: 1000px) { .spalten { grid-template-columns: 1fr; } }
.spalte-transkript .transkript { list-style: none; padding: 0; margin: 0; max-height: 80vh; overflow: auto; }
.transkript li { padding: .35rem .2rem; border-bottom: 1px solid var(--grau-hell); }
.transkript li.lexikon { background: var(--gelb-hell); }
.transkript li:target { outline: 3px solid var(--fokus); }
.kennung-text { font-family: Consolas, monospace; color: var(--leise); }
.kennung-link { font-family: Consolas, monospace; font-size: .85rem; }

.abschnitt { border-top: 1px solid var(--grau-hell); padding-top: .25rem; }
.zeichen { font-size: .85rem; font-weight: normal; color: var(--leise); }
.zeichen.ueber { color: var(--rot); font-weight: 600; }
.satz { margin: .4rem 0; }
.satz-text { margin: .2rem 0; }
.satz[data-entscheidung="gestrichen"] .satz-text { text-decoration: line-through; color: var(--leise); }
/* K8_ENTWURF 22 (S-4): kompakte Ansicht der Gesamtabnahme, Details eingeklappt */
.satz-kurz[data-entscheidung="gestrichen"] { text-decoration: line-through; color: var(--leise); }
.gesamt .bereich h3 { margin-bottom: .2rem; }
.details-ansicht > summary { cursor: pointer; font-weight: 600; padding: .6rem 0; }
.satz[data-entscheidung="bestaetigt"] .satz-text { font-weight: 500; }
[data-entscheidung="abgelehnt"] strong { text-decoration: line-through; }
.sperren li { color: var(--rot); border-bottom: 0; padding: .15rem 0; }
.quelle { border-top: 1px solid var(--grau-hell); padding-top: .5rem; }
details > summary { cursor: pointer; padding: .3rem 0; font-weight: 600; }
#hoerprobe-spieler { position: sticky; top: 0; z-index: 5; width: 100%; margin-bottom: .5rem; }
.hinweis-seite { max-width: 720px; margin: 2rem auto; }
progress { width: 100%; max-width: 420px; height: 1.2rem; }

/* Eigenständiger Weg (K8_ENTWURF 2.3, K8d-1): Startseite und Ergebnisseite */
.feld-text { width: 100%; font: inherit; padding: .5rem; border: 1px solid var(--rand);
  border-radius: 4px; background: var(--flaeche); color: var(--text); resize: vertical; }
.checkliste, .profilwahl { border: 1px solid var(--rand); border-radius: 4px; margin: 0 0 1rem;
  padding: .5rem 1rem; }
.checkliste .liste > li { padding: .25rem 0; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { text-align: left; padding: .35rem .5rem; border-bottom: 1px solid var(--grau-hell);
  vertical-align: top; }
@media (max-width: 700px) { .tabelle thead { display: none; } .tabelle td { display: block; border: 0; }
  .tabelle tr { display: block; border-bottom: 1px solid var(--rand); padding: .35rem 0; } }

/* K8d-2 (K8_ENTWURF 2.7.3, D54): Labor-Band auf Aufnahme-, Prüf- und Startseite am Handy */
.labor-band { border: 2px solid var(--gelb); background: var(--gelb-hell); }

/* K8d-2 (11.2): Handy – Startseite /s/mobil und Aufnahmeseite /h (handy.js) */
.handy .kopf { padding: .4rem .75rem; font-size: .9rem; }
.handy .fuss { padding: .5rem; font-size: .75rem; }
.handy main { padding: .75rem; }
.handy #aufnahme .knopfreihe, .handy #start { display: none; }
.knopf.breit { display: block; width: 100%; }
.eingabe { font: inherit; padding: .5rem; width: 100%; max-width: 30rem; border: 1px solid var(--rand);
  border-radius: 4px; }
.eingabe.gross, .ziffern.gross { font-size: 1.5rem; letter-spacing: .05em; }
.ziffern { font-family: Consolas, monospace; font-variant-numeric: tabular-nums; }
.wahl { font-size: 1.1rem; padding: .25rem 0; }
.handy-steuerung { text-align: center; }
.grossknopf {
  width: 60vmin; height: 60vmin; min-width: 12rem; min-height: 12rem; max-width: 22rem; max-height: 22rem;
  border-radius: 50%; border: 0; background: var(--rot-voll); color: var(--auf-voll); font: inherit; font-size: 1.5rem;
  font-weight: 600; cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.grossknopf[data-zustand="pausiert"] { background: var(--gelb-voll); }
.grossknopf[data-zustand="bereit"] { background: var(--haus-voll); }
.grossknopf:disabled { opacity: .5; cursor: not-allowed; }
#halten { max-width: 22rem; }
.wischen { width: 100%; max-width: 22rem; padding: 1rem; text-align: left;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.dunkel { position: fixed; inset: 0; background: #000; z-index: 1000; color: #555;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; }
.dunkel-zeile { margin: 0; font-variant-numeric: tabular-nums; }
.dunkel-punkt { color: #8a0018; font-size: .9rem; }
.dunkel-punkt.pausiert { color: #6a5a20; }
.aufwachen { min-width: 44px; min-height: 44px; padding: .75rem 1.25rem; background: transparent;
  color: #444; border: 1px solid #222; border-radius: 4px; font: inherit; }
.abholcode { font-size: 1.1rem; }
.unterschrift-karte { border-top: 1px solid var(--grau-hell); padding-top: .5rem; margin-top: .5rem; }
canvas.unterschrift { display: block; touch-action: none; width: 100%; max-width: 600px;
  aspect-ratio: 3 / 1; background: #fff; border: 1px solid var(--rand); border-radius: 4px; }
.handy #stopp-dialog, .handy #verwerfen-dialog { position: fixed; left: .5rem; right: .5rem; bottom: .5rem;
  z-index: 900; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); }
/* K8d-3 (11.5): Abholcode groß und gut lesbar (Ziffern fester Breite), Unterschrift als Bild */
.abholcode-gross { font-size: 2.2rem; font-weight: 700; letter-spacing: .25em;
  font-variant-numeric: tabular-nums; font-family: ui-monospace, monospace; }
.abholcode-klein { font-weight: 700; letter-spacing: .1em; font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace; }
.unterschrift-bild img { display: block; max-width: 100%; height: auto; background: #fff;
  border: 1px solid var(--grau-hell); }
.entwicklung-band { border-left: .4rem solid #b00020; }
