/* Notfall-App. Baut auf ehbs-web.css auf und nutzt nur dessen Tokens.
   Grundsatz: auf dem Handy in zehn Sekunden erfassbar. Große Schrift, starke Kontraste, das Wichtigste oben. */

:root { --notleiste-hoehe: 68px; --sicherheit-gruen: #00843d; --sicherheit-rot: #c8102e; }
body { background: var(--ehbs-white); padding-bottom: calc(var(--notleiste-hoehe) + env(safe-area-inset-bottom)); font-size: 1.0625rem; }
.haupt { max-width: 40rem; margin: 0 auto; padding: var(--space-4) var(--space-4) var(--space-8); }

/* Kopf */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--ehbs-line); background: var(--ehbs-white); }
.kopf__marke { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ehbs-text); min-width: 0; }
.kopf__marke img { height: 34px; width: auto; flex: none; }
.kopf__ort { font-weight: 700; font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf__sprachen { display: flex; gap: 2px; flex: none; }
.kopf__sprachen a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; font-weight: 700;
  text-decoration: none; color: var(--ehbs-primary); border-radius: var(--radius); }
.kopf__sprachen a[aria-current="true"] { background: var(--ehbs-primary); color: var(--ehbs-white); }

/* Ablauf */
.ablauf__kopf { display: flex; gap: var(--space-3); align-items: center; margin-bottom: var(--space-3); }
.ablauf__zeichen { width: 56px; height: 56px; flex: none; }
.ablauf__titel { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem); margin: 0; }
.ablauf__ort { margin: var(--space-1) 0 0; color: var(--ehbs-text-sek); font-weight: 700; }

.kurz { font-size: 1.3rem; line-height: 1.35; font-weight: 700; margin: 0 0 var(--space-4);
  padding: var(--space-4); border-left: 8px solid var(--ehbs-primary); background: var(--ehbs-primary-tint); border-radius: var(--radius); }
.ablauf--brand .kurz { border-left-color: var(--sicherheit-rot); background: var(--ehbs-tint-warnung); }
.ablauf--erste-hilfe .kurz { border-left-color: var(--sicherheit-gruen); background: #e6f3ec; }

.ablauf__knoepfe { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.knopf-gross { min-height: 56px; font-size: 1.1rem; gap: var(--space-2); justify-content: center; width: 100%; }

.schritte { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; gap: var(--space-3); }
.schritt { display: grid; grid-template-columns: 40px 96px 1fr; gap: var(--space-3); align-items: start;
  padding: var(--space-3); border: 1px solid var(--ehbs-line); border-radius: var(--radius); background: var(--ehbs-white); }
.schritt:not(:has(.schritt__bild)) { grid-template-columns: 40px 1fr; }
.schritt__nr { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ehbs-primary); color: var(--ehbs-white); font-weight: 700; font-size: 1.2rem; }
.ablauf--brand .schritt__nr { background: var(--sicherheit-rot); }
.ablauf--erste-hilfe .schritt__nr { background: var(--sicherheit-gruen); }
.schritt__bild { width: 96px; height: 96px; object-fit: contain; border-radius: var(--radius); background: var(--ehbs-bg-soft); }
.schritt__haupt { font-weight: 700; font-size: 1.15rem; line-height: 1.3; margin: 0; }
.schritt__mehr { margin: var(--space-1) 0 0; color: var(--ehbs-text-sek); }
.schritt.ist-aktiv { outline: 3px solid var(--ehbs-yellow); }
@media (max-width: 380px) { .schritt { grid-template-columns: 36px 72px 1fr; } .schritt__bild { width: 72px; height: 72px; } }

.infobox { margin: var(--space-2) 0 0; padding: var(--space-3); background: var(--ehbs-tint-hinweis); border-radius: var(--radius); }
.infobox--sammel { background: #e6f3ec; }
.infobox strong { display: block; }

.achtung { margin: 0 0 var(--space-6); padding: var(--space-4); border: 2px solid var(--sicherheit-rot); border-radius: var(--radius); background: var(--ehbs-tint-warnung); }
.achtung h2, .helferbox h2 { font-size: 1.15rem; margin-bottom: var(--space-2); }
.achtung ul, .helferbox ul { margin: 0; padding-left: 1.2rem; }
.achtung li, .helferbox li { margin-bottom: var(--space-1); }

/* Helfer-Inhalte nur in der Helfer-Ansicht */
.nur-helfer { display: none; }
.helfer .nur-helfer { display: block; }
.helferbox { margin: 0 0 var(--space-6); padding: var(--space-4); border-left: 8px solid var(--ehbs-yellow); background: var(--ehbs-tint-hinweis); border-radius: var(--radius); }

.geraet { margin: 0 0 var(--space-6); display: grid; grid-template-columns: 96px 1fr; gap: var(--space-3); align-items: center; }
.geraet img { width: 96px; height: 160px; object-fit: contain; }
.geraet figcaption { color: var(--ehbs-text-sek); }

.video { margin-bottom: var(--space-6); }
.video h2 { font-size: 1.15rem; }
.video__rahmen { position: relative; padding-top: 56.25%; background: var(--ehbs-dark); border-radius: var(--radius); overflow: hidden; }
.video__rahmen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.verwandt h2 { font-size: 1.15rem; }
.verwandt ul, .liste { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; gap: var(--space-2); }
.verwandt a, .liste a { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-2) var(--space-3);
  border: 1px solid var(--ehbs-line); border-radius: var(--radius); text-decoration: none; color: var(--ehbs-text); font-weight: 700; }
.verwandt a:hover, .liste a:hover { border-color: var(--ehbs-primary); color: var(--ehbs-primary); }
.liste small { display: block; font-weight: 400; color: var(--ehbs-text-sek); }
.ablauf__fuss { border-top: 1px solid var(--ehbs-line); padding-top: var(--space-3); }
.freigabe-offen { color: var(--ehbs-text); background: var(--ehbs-tint-hinweis); padding: var(--space-2) var(--space-3); border-radius: var(--radius); }
.offen { background: var(--ehbs-yellow); color: var(--ehbs-text); padding: 0 .3em; border-radius: 3px; font-style: italic; font-weight: 400; }

/* Auswahl am Verbandkasten */
.auswahl { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; gap: var(--space-2); }
.auswahl__knopf { display: flex; align-items: center; min-height: 64px; padding: var(--space-3) var(--space-4); border-radius: var(--radius);
  color: var(--ehbs-white); text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.auswahl__knopf:hover { color: var(--ehbs-white); filter: brightness(.92); }
.auswahl__knopf--rot { background: var(--sicherheit-rot); }
.auswahl__knopf--gruen { background: var(--sicherheit-gruen); }
.auswahl__knopf--blau { background: var(--ehbs-primary); }

/* Sammelplatz */
.sammelplatz { margin: 0 0 var(--space-6); padding: var(--space-4); border-radius: var(--radius); background: var(--sicherheit-gruen); color: var(--ehbs-white); }
.sammelplatz__label { margin: 0; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: var(--fs-small); }
.sammelplatz__name { margin: var(--space-1) 0 var(--space-2); font-size: clamp(1.6rem, 1.3rem + 2vw, 2.25rem); font-weight: 700; line-height: 1.15; }
.sammelplatz__text { margin: 0; font-size: 1.1rem; }
.sammelplatz .offen { font-size: 1.2rem; }
.sammelplatz__bild { margin-top: var(--space-3); border-radius: var(--radius); }
.plan img { border: 1px solid var(--ehbs-line); border-radius: var(--radius); }

/* Brandschutzordnung */
.bso-a { margin-bottom: var(--space-6); padding: var(--space-4); background: var(--sicherheit-rot); color: var(--ehbs-white); border-radius: var(--radius); }
.bso-a h2 { color: var(--ehbs-white); font-size: 1.2rem; }
.bso-a a { color: var(--ehbs-white); }
.bso-a__liste { margin: 0; padding-left: 1.4rem; font-size: 1.1rem; display: grid; gap: var(--space-2); }
.bso__abschnitt { border: 1px solid var(--ehbs-line); border-radius: var(--radius); margin-bottom: var(--space-2); }
.bso__abschnitt summary { padding: var(--space-3) var(--space-4); font-weight: 700; cursor: pointer; min-height: 48px; display: flex; align-items: center; }
.bso__abschnitt ul { margin: 0; padding: 0 var(--space-4) var(--space-3) 2.2rem; }
.bso__abschnitt li { margin-bottom: var(--space-2); }

/* Standort-Startseite */
.standort__titel { font-size: 1.6rem; }
.kacheln { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.kachel { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--space-2); min-height: 108px;
  padding: var(--space-3); border-radius: var(--radius); color: var(--ehbs-white); text-decoration: none; font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.kachel:hover { color: var(--ehbs-white); filter: brightness(.92); }
.kachel img { background: var(--ehbs-white); border-radius: 6px; padding: 2px; }
.kachel--rot { background: var(--sicherheit-rot); }
.kachel--gruen { background: var(--sicherheit-gruen); }
.kachel--blau { background: var(--ehbs-primary); }

/* Codes */
.codes { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.codes__eintrag { display: flex; gap: var(--space-3); align-items: center; border: 1px solid var(--ehbs-line); border-radius: var(--radius); padding: var(--space-2); word-break: break-all; }

/* Fuß und Rolle */
.fuss { max-width: 40rem; margin: 0 auto; padding: var(--space-4); border-top: 1px solid var(--ehbs-line); }
.fuss p { margin-bottom: var(--space-2); }
.rollenschalter { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-3);
  border: 2px solid var(--ehbs-primary); border-radius: 999px; background: var(--ehbs-white); color: var(--ehbs-primary); font: inherit; font-weight: 700; cursor: pointer; }
.rollenschalter__punkt { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; }
.helfer .rollenschalter { background: var(--ehbs-yellow); border-color: var(--ehbs-yellow); color: var(--ehbs-text); }
.helfer .rollenschalter__punkt { background: currentColor; }
.fuss__rolle { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* Notleiste unten, immer sichtbar */
.notleiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: var(--space-2);
  padding: var(--space-2) var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom)); background: var(--ehbs-white); border-top: 1px solid var(--ehbs-line);
  box-shadow: 0 -4px 12px rgba(0,0,0,.08); }
.notleiste a { flex: 1; display: flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 52px;
  border-radius: var(--radius); font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--ehbs-white); }
.notleiste svg { width: 24px; height: 24px; }
.notleiste__112 { background: var(--sicherheit-rot); }
.notleiste__sammel { background: var(--sicherheit-gruen); }
.notleiste__sammel img { background: var(--ehbs-white); border-radius: 4px; }
.notleiste a:hover { color: var(--ehbs-white); filter: brightness(.92); }

/* Spieler: Schritt für Schritt im Vollbild */
.spieler { width: 100%; max-width: 40rem; height: 100%; max-height: 100%; margin: 0 auto; padding: var(--space-4); border: 0;
  flex-direction: column; gap: var(--space-3); background: var(--ehbs-white); }
.spieler[open] { display: flex; overflow-y: auto; }
.spieler::backdrop { background: rgba(0,0,0,.6); }
.spieler__oben { display: flex; align-items: center; gap: var(--space-2); }
.spieler__stand { flex: 1; font-weight: 700; font-size: 1.1rem; }
.spieler__ton, .spieler__zu { min-height: 44px; min-width: 44px; border: 2px solid var(--ehbs-primary); background: var(--ehbs-white);
  color: var(--ehbs-primary); border-radius: var(--radius); font: inherit; font-weight: 700; cursor: pointer; }
.spieler__zu { font-size: 1.6rem; line-height: 1; }
/* Bildbereich nimmt nur den Platz, den Kopf, Text und Knöpfe übrig lassen, das Medium liegt fest darin */
.spieler__bild { flex: 1 1 0; min-height: 96px; position: relative; }
.spieler__bild img, .spieler__bild video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
video.schritt__bild { display: block; }
.spieler__text { flex: none; font-size: clamp(1.25rem, 1rem + 1.6vw, 1.6rem); font-weight: 700; line-height: 1.25; margin: 0; }
.spieler__mehr { flex: none; font-size: 1.05rem; color: var(--ehbs-text-sek); margin: 0; }
.spieler__unten { display: grid; grid-template-columns: 1fr 2fr; gap: var(--space-2); }
.spieler__unten .ehbs-btn { min-height: 60px; font-size: 1.15rem; }
.spieler__takt .ehbs-btn { width: 100%; min-height: 56px; }

/* Takt für die Herzdruckmassage */
.taktpunkt { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--sicherheit-rot); opacity: .35; }
.takt-an .taktpunkt { animation: takt var(--takt-dauer, 545ms) infinite; }
@keyframes takt { 0% { opacity: 1; transform: scale(1.35); } 40% { opacity: .35; transform: scale(1); } 100% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .takt-an .taktpunkt { animation-duration: var(--takt-dauer, 545ms); transform: none; } }

/* Begleiter (Stufe 2) */
.begleiter__eingabe { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.begleiter__eingabe textarea { font: inherit; font-size: 1.15rem; padding: var(--space-3); border: 2px solid var(--ehbs-line); border-radius: var(--radius); min-height: 96px; }
.begleiter__eingabe textarea:focus { border-color: var(--ehbs-primary); outline: none; }
.begleiter__frage { font-size: 1.3rem; font-weight: 700; }
.begleiter__antworten { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-2); }
.begleiter__antworten .ehbs-btn { min-height: 56px; }
.mikro.hoert { background: var(--sicherheit-rot); border-color: var(--sicherheit-rot); color: var(--ehbs-white); }

@media print { .notleiste, .kopf__sprachen, .fuss__rolle, .ablauf__knoepfe { display: none; } body { padding: 0; } }

/* Prüfseite für die fachliche Durchsicht */
.pruefen__liste { list-style: none; padding: 0; display: grid; gap: var(--space-4); margin-bottom: var(--space-8); }
.pruefen__schritt { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-4); align-items: start; border-bottom: 1px solid var(--ehbs-line); padding-bottom: var(--space-3); }
.pruefen__medium img, .pruefen__medium video { width: 220px; height: 220px; object-fit: contain; background: var(--ehbs-bg-soft); border-radius: var(--radius); display: block; }
.pruefen__herkunft { display: block; font-size: var(--fs-small); color: var(--ehbs-text-sek); margin-top: var(--space-1); }
@media (max-width: 480px) { .pruefen__schritt { grid-template-columns: 1fr; } }
