/* ATLAS – Übung und Abnahme: Stoppuhr, Wertungsbögen je SR-Platz, Ergebnis. Nutzt die Farbvariablen aus atlas.css. */
.uhr { font-variant-numeric: tabular-nums; font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: .02em; color: var(--text); }
.uhr.laeuft { color: var(--feuer-600); }
.uhr-tasten { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.uhr-tasten .knopf { min-height: 56px; font-size: 17px; padding: 8px 20px; }
.zeitliste td, .zeitliste th { font-variant-numeric: tabular-nums; }

/* SR-Plätze in ihren Farben */
.sr-plaetze { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sr { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 2px solid var(--linie-2);
      background: var(--flaeche); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 40px; }
.sr[aria-pressed="true"] { border-color: var(--text); box-shadow: 0 0 0 2px var(--fokus); }
.sr .farbe { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #6b7280; display: inline-block; }
.farbe-weiß { background: #ffffff; } .farbe-rot { background: #dc2626; } .farbe-blau { background: #2563eb; }
.farbe-gelb { background: #facc15; } .farbe-grün { background: #16a34a; }

/* Fehlerkatalog zum Antippen */
.katalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.fehlerknopf { text-align: left; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; min-height: 56px; width: 100%;
               border: 1px solid var(--linie-2); border-radius: 8px; background: var(--flaeche); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.fehlerknopf:hover { background: var(--flaeche-hover); }
.fehlerknopf .punkte { flex: 0 0 auto; min-width: 40px; text-align: center; font-weight: 700; border-radius: 6px; padding: 2px 6px;
                       background: var(--rot-grund); color: var(--rot-text); }
.fehlerknopf .anzahl { margin-left: auto; font-weight: 700; color: var(--feuer-600); }
.katalog-zeile { display: flex; gap: 6px; align-items: stretch; }
.katalog-zeile .knopf { flex: 0 0 auto; }
.bereich { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--leise); margin-top: 8px; text-transform: uppercase; letter-spacing: .04em; }
.phase { grid-column: 1 / -1; font-size: 15px; font-weight: 700; margin-top: 16px; padding: 4px 8px; border-left: 4px solid var(--feuer-600); background: var(--flaeche-hover); }
.wortlaut { grid-column: 1 / -1; margin: 4px 0 6px; padding: 6px 10px; border: 1px dashed var(--linie-2); border-radius: 6px; font-style: italic; }
.storniert { text-decoration: line-through; color: var(--leise); }

/* Ergebnis */
.ergebnis { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.kennzahl { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; }
.kennzahl .wert { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kennzahl .name { font-size: 13px; color: var(--leise); }
.bestanden { background: var(--gruen-grund); color: var(--gruen-text); border-color: var(--gruen-linie); }
.nicht-bestanden { background: var(--rot-grund); color: var(--rot-text); border-color: var(--rot-linie); }
.chip.ja { background: var(--gruen-grund); color: var(--gruen-text); }
.chip.nein { background: var(--rot-grund); color: var(--rot-text); }

@media (max-width: 640px) { .uhr { font-size: 48px; } }

/* Vergleich der Bewerter */
tr.abweichung td { background: color-mix(in srgb, #f59e0b 14%, transparent); }

/* Druckansicht der Wertungsbögen */
.druckbogen { background: #fff; color: #111; border: 1px solid #d1d5db; border-radius: 8px; padding: 16px; margin: 16px 0; }
.druckkopf { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.druck-titel { font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.druck-titel .farbe { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #6b7280; }
.druckbogen h3 { margin: 14px 0 6px; font-size: 1rem; }
.druckliste, .druckfelder { width: 100%; border-collapse: collapse; font-size: .9rem; }
.druckliste th, .druckliste td, .druckfelder th, .druckfelder td { border: 1px solid #9ca3af; padding: 4px 6px; text-align: left; vertical-align: top; color: #111; background: #fff; }
.druckfelder { width: auto; min-width: 280px; }
.druckfelder td { min-width: 180px; }
.druckfelder.fuss { margin-top: 12px; }
.druckbereich td { font-weight: 700; background: #f3f4f6 !important; }
.leerzeile td { height: 26px; }
@media print {
    .druckbogen { border: 0; margin: 0; padding: 0; break-after: page; }
    .druckbogen:last-of-type { break-after: auto; }
    .druckliste tr { break-inside: avoid; }
    .inhalt { padding: 0 !important; max-width: none !important; }
}

/* Regelwerk-Editor */
.json-editor { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: .85rem; line-height: 1.35; }
pre.vergleich { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; max-height: 420px; overflow: auto; padding: 8px; border: 1px solid var(--rand, #d1d5db); border-radius: 6px; white-space: pre-wrap; }
pre.vergleich .zeile { display: block; }
pre.vergleich .neu { background: color-mix(in srgb, #16a34a 18%, transparent); }
pre.vergleich .weg { background: color-mix(in srgb, #dc2626 18%, transparent); text-decoration: line-through; }
pre.vergleich .luecke { color: #6b7280; }
details.verlauf { border-top: 1px solid var(--rand, #e5e7eb); padding: 6px 0; }

/* Punktereserve live in der Stoppuhr (Bewertung V1): groß, rot unter der Warnschwelle */
.reserve { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.reserve-posten { background: var(--gruen-grund); border: 1px solid var(--gruen-linie); color: var(--gruen-text); border-radius: 8px; padding: 8px 12px; }
.reserve-posten .wert { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.reserve-posten .name { font-size: 13px; }
.reserve-posten.knapp { background: var(--rot-grund); border-color: var(--rot-linie); color: var(--rot-text); }

/* Suche im Fehlerkatalog (V2) */
.katalog-suche { margin: 8px 0; max-width: 480px; }

/* Bewertungsmodus für das Tablet (V5): Uhr und Reserve oben fixiert, große Tasten, hoher Kontrast */
.bewertungsmodus .uhr-oben { position: sticky; top: 0; z-index: 5; background: var(--flaeche); border-bottom: 2px solid var(--linie-2); padding: 8px 0; margin-bottom: 12px; }
.bewertungsmodus .uhr-oben > .karte { margin: 0; }
.bewertungsmodus .fehlerknopf { min-height: 64px; font-size: 18px; border-width: 2px; border-color: var(--linie-2); color: var(--text); }
.bewertungsmodus .fehlerknopf .punkte { font-size: 18px; }
.bewertungsmodus .knopf { min-height: 56px; font-size: 17px; }
.bewertungsmodus .knopf.klein { min-height: 48px; font-size: 16px; }
.bewertungsmodus .sr-plaetze .sr { min-height: 56px; font-size: 17px; }
.reiter { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--linie-2); margin: 12px 0; }
.reiter button { background: none; border: 0; border-bottom: 4px solid transparent; padding: 12px 16px; font: inherit; font-size: 17px; color: var(--text-2); cursor: pointer; min-height: 56px; }
.reiter button[aria-selected="true"] { border-bottom-color: var(--feuer-600); color: var(--text); font-weight: 700; }
.bewertungsmodus .uhr-oben .uhr { font-size: 44px; }
.bewertungsmodus .uhr-oben .karte .karte { padding: 8px 12px; }
.bewertungsmodus .uhr-oben .reserve-posten .wert { font-size: 22px; }
/* Die Stoppuhr im Bewertungsmodus folgt der Einstellung „wandert mit“ auch auf niedrigen Bildschirmen (Alpha-Rückmeldung vom 03.11.2026, 08:07 Uhr) */
/* Vorprüfung PSA und Fahrzeug (V6) */
.vp-personen { display: grid; gap: 10px; }
.vp-person { border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px; background: var(--flaeche-2); }
.vp-name { margin-bottom: 6px; }
.vp-tasten { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-zeile { display: flex; gap: 6px; align-items: stretch; flex: 1 1 280px; }
.vp-taste { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px; text-align: left; flex: 1 1 auto;
            border: 1px solid var(--linie-2); border-radius: 8px; background: var(--flaeche); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.vp-taste:hover { background: var(--flaeche-hover); }
.vp-taste .punkte { margin-left: auto; font-weight: 700; border-radius: 6px; padding: 2px 6px; background: var(--flaeche-2); }
.vp-taste .anzahl { font-weight: 700; color: var(--feuer-600); }
.vp-taste.mangel { background: var(--rot-grund); color: var(--rot-text); border-color: var(--rot-linie); font-weight: 600; }
.vp-taste.mangel .punkte { background: var(--rot-linie); }
.vp-stichproben { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.vp-stichprobe { display: grid; grid-template-columns: 1fr auto; gap: 4px 6px; align-items: center; }
.vp-stichprobe label { grid-column: 1 / -1; font-size: 13px; color: var(--leise); }

/* Abfahrtskontrolle (V9): geloste Fahrzeugfunktionen groß zum Abhaken */
.abfahrt-liste { display: grid; gap: 8px; margin: 8px 0; }
.abfahrt-funktion { font-size: 20px; font-weight: 600; min-height: 48px; }
.abfahrt-funktion input { width: 28px; height: 28px; }

/* Funktionskarten zum Austeilen (V13) */
.funktionskarten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.funktionskarte { border: 3px solid var(--text); border-radius: 12px; padding: 24px 16px; text-align: center; background: var(--flaeche); break-inside: avoid; }
.funktionskarte .kurz { font-size: 72px; font-weight: 800; line-height: 1; }
.funktionskarte .lang { font-size: 20px; margin-top: 8px; }
.funktionskarte .person { font-size: 16px; color: var(--leise); margin-top: 6px; }
@media print { .funktionskarten { grid-template-columns: 1fr 1fr; } .funktionskarte { border-color: #000; color: #000; } }
/* Befehls- und Lagemeldungs-Prüfliste (V7) */
.befehle { margin-bottom: 12px; }
.bf-zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.bf-nr { font-weight: 700; min-width: 20px; }
.vp-taste.genannt { background: var(--gruen-grund); color: var(--gruen-text); border-color: var(--gruen-linie); font-weight: 600; }

/* Probeabnahme-Assistent (V16) */
.assistent { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.assistent .schritt { border: 1px solid var(--linie); border-left: 6px solid var(--linie-2); border-radius: 8px; padding: 10px 12px; background: var(--flaeche); }
.assistent .schritt.offen { border-left-color: var(--feuer-600); }
.assistent .schritt.laeuft { border-left-color: #f59e0b; }
.assistent .schritt.erledigt { border-left-color: var(--gruen); }
.assistent .schritt.gesperrt { opacity: .7; }
.countdown { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--feuer-600); }
.vp-taste.optional:not(.genannt) { border-style: dashed; color: var(--leise); }

/* Fotos, Sprachnotizen und Video-Zeitmarken (V19) */
.medien summary { cursor: pointer; padding: 4px 0; }
.medien h3 { margin: 14px 0 6px; font-size: 16px; }
.medien .unsichtbar { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.medien label.knopf { position: relative; cursor: pointer; }
.medien-liste { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.medien-liste li { border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px; background: var(--flaeche); }
.medien-liste img { max-width: 100%; max-height: 320px; display: block; margin-top: 8px; border-radius: 6px; }
.medien-liste audio { width: 100%; margin-top: 8px; }
@media print { .medien { display: none; } }
.einwilligung ul { line-height: 1.5; }
.einwilligung .unterschriften { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.einwilligung .unterschriften div { border-top: 1px solid var(--text); padding-top: 4px; font-size: 13px; }

/* Stationsbetrieb Module (V20) */
.stationen { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.station { border-top: 6px solid var(--linie-2); }
.station.bestanden { border-top-color: var(--gruen); }
.station.nicht-bestanden { border-top-color: var(--rot-linie); }
/* Offizieller Wertungsbogen nach Anlage 3 (V17) */
.anlage3 .a3-pruefen { max-width: 320px; font-size: .8rem; }
.anlage3 .a3-kopf { width: 100%; margin-top: 8px; }
.anlage3 .a3-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.anlage3 .a3-kuerzel { font-size: 1.4rem; font-weight: 700; border: 2px solid #111; padding: 4px 10px; align-self: flex-start; }
.anlage3 .a3-block { margin-top: 8px; }
.anlage3 .a3-unterschriften { margin-top: 12px; }
.anlage3 .a3-zeichnen td { height: 40px; vertical-align: bottom; }
.anlage3 .a3-ermittlung { border: 2px solid #111; padding: 8px; margin-top: 12px; }
.anlage3 .a3-psa th, .anlage3 .a3-psa td { font-size: .8rem; }
@media (max-width: 640px) { .anlage3 .a3-spalten { grid-template-columns: 1fr; } }
/* Stoppuhr wandert beim Scrollen mit (Einstellung uebung.uhr.mitlaufend, Alpha-Rückmeldung vom 03.11.2026) */
.uhr-mitlaufend { position: sticky; top: 0; z-index: 5; background: var(--flaeche); padding: 4px 0; }
.uhr-mitlaufend > .karte { margin: 0 0 12px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.bewertungsmodus .uhr-oben.fest { position: static; }
.zur-uhr { position: fixed; right: 16px; bottom: 16px; z-index: 20; min-height: 44px; padding: 8px 14px; border-radius: 22px;
           border: 1px solid var(--linie-2); background: var(--flaeche); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
           box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.zur-uhr:focus-visible { outline: 3px solid var(--feuer-600); outline-offset: 2px; }
@media print { .uhr-mitlaufend { position: static; } .zur-uhr { display: none; } }

/* Kompakte Uhr-Übersicht (Alpha-Rückmeldung vom 03.11.2026, 08:01 Uhr) */
.stoppuhr > .leiste h2 { font-size: 17px; }
.stoppuhr .uhr-abschnitte { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.stoppuhr .uhr-abschnitt { flex: 1 1 260px; margin: 0; padding: 8px 12px; }
.stoppuhr .uhr { font-size: 44px; }
.stoppuhr .uhr-tasten { margin-top: 6px; gap: 6px; }
.stoppuhr .uhr-tasten .knopf { min-height: 48px; font-size: 16px; padding: 6px 14px; }
.stoppuhr .reserve { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin-top: 6px; }
.stoppuhr .reserve-posten { padding: 4px 10px; }
.stoppuhr .reserve-posten .wert { font-size: 20px; }
@media (max-width: 640px) { .stoppuhr .uhr { font-size: 38px; } }

/* Meldungen im Bogen quittieren: Klick öffnet die Frage, Wischen nach links = in Ordnung, nach rechts = nicht in Ordnung
   (Alpha-Rückmeldungen vom 03.11.2026, 08:01, 08:04 und 08:05 Uhr). Die Enden zeigen die Richtung farbig. */
.schritt-wisch { position: relative; cursor: pointer; touch-action: pan-y; user-select: none; border-left: 6px solid var(--gruen);
    border-right: 6px solid var(--rot); border-radius: 6px; margin: 4px 0; background: var(--flaeche); }
.schritt-wisch > .wortlaut { margin: 0; border: 0; }
.schritt-wisch.wisch-links { background: var(--gruen-grund); }
.schritt-wisch.wisch-rechts { background: var(--rot-grund); }
.schritt-wisch:focus-visible { outline: 3px solid var(--feuer-600); outline-offset: 2px; }
.schritt-frage { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 10px 8px; cursor: default; }
.schritt-frage .knopf { min-height: 44px; }
.schritt-frage .ok { background: var(--gruen-grund); border-color: var(--gruen); color: var(--gruen-text); }
.schritt-frage .nok { background: var(--rot-grund); border-color: var(--rot); color: var(--rot-text); }
.wisch-geist { display: block; width: 72px; min-height: 32px; margin: 2px 0; padding: 2px 8px; font-size: 13px; opacity: .55; border-radius: 6px;
    border: 1px dashed var(--linie-2); background: var(--flaeche-2); color: var(--text-2); cursor: pointer; }
.wisch-geist.links { margin-right: auto; border-left: 6px solid var(--gruen); }
.wisch-geist.rechts { margin-left: auto; border-right: 6px solid var(--rot); }
.wisch-geist:hover, .wisch-geist:focus-visible { opacity: 1; }
/* „…“ öffnet die Auswahl, wenn der Klick direkt quittiert; Punkte direkt am Schritt (Alpha-Rückmeldungen vom 03.11.2026, 10:29 und 10:32 Uhr) */
.schritt-mehr { position: absolute; top: 4px; right: 10px; min-width: 40px; min-height: 32px; border: 1px solid var(--linie-2); border-radius: 6px;
    background: var(--flaeche-2); color: var(--text-2); cursor: pointer; font-weight: 700; }
.schritt-wisch:has(> .schritt-mehr) { padding-right: 52px; }
.schritt-wisch.inline-fehler { cursor: default; background: var(--rot-grund); }
.schritt-wisch.inline-fehler .schritt-frage { align-items: center; }
.schritt-summe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0; font-size: 14px; }
@media print { .schritt-wisch { border-left-width: 1px; border-right-width: 1px; } .schritt-frage, .wisch-geist { display: none; } }

/* Start ausgegraut, bis alle SR bereit sind; lässt sich mit Rückfrage übergehen (Alpha-Rückmeldung vom 03.11.2026, 10:41 Uhr) */
.stoppuhr .knopf.ausgegraut { opacity: .5; filter: grayscale(1); }
.stoppuhr .knopf.ausgegraut:hover, .stoppuhr .knopf.ausgegraut:focus-visible { opacity: .8; }

/* Bewertung abschließen und Einladung (Alpha-Rückmeldung vom 03.11.2026, 10:41 Uhr) */
.abschluss .eigene-zeile td { font-weight: 600; background: var(--flaeche-2); }
.abschluss .wartebild { margin-top: 8px; }
.abschluss .alpha-leiste { margin-top: 8px; border-top: 1px dashed var(--linie); padding-top: 8px; }
.einladung { position: fixed; right: 16px; bottom: 16px; z-index: 60; max-width: 360px; background: var(--flaeche);
  border: 2px solid var(--rot, #b91c1c); border-radius: 10px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.einladung p { margin: 6px 0 10px; }
@media (max-width: 480px) { .einladung { left: 16px; right: 16px; max-width: none; } }
