/* app.baimaisai.com — Oberfläche der Vorführungen
   Braucht davor: ../schriften/schriften.css und marke.css (Token und Bausteine der Marke, unverändert kopiert).
   Regeln der Marke: Farben nur über Token · Abstände aus dem 4er-Raster · bewegt werden nur transform und opacity. */

/* Für die Bildschirmfreigabe etwas größer als die Lesespalte der Marke */
@media (min-width: 70rem) { body { font-size: 18px } }
body { min-height: 100vh; display: flex; flex-direction: column }
.app-breite { width: 100%; max-width: 88rem; margin-inline: auto; padding-inline: max(var(--a4), env(safe-area-inset-left, 0px)) max(var(--a4), env(safe-area-inset-right, 0px)) }
@media (min-width: 70rem) { .app-breite { padding-inline: var(--a6) } }

/* ---- Kopf: Leiste und Dauerhinweis ---- */
.kopf { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--linie) }
.kopf-zeile { display: flex; align-items: center; gap: var(--a4); padding-block: var(--a2); min-height: 64px }
.kopf-logo { display: block; height: 44px; width: auto; flex: none }
.kopf-titel { display: flex; flex-direction: column; margin-right: auto; min-width: 0; line-height: 1.25; border-left: 1px solid var(--linie); padding-left: var(--a4) }
.kopf-titel b { font-family: var(--kopf); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.015em }
.kopf-titel span { color: var(--leise); font-size: .85rem }
.abmelden { display: inline-flex; align-items: center; min-height: var(--tippe); padding: var(--a2) var(--a3); border-radius: var(--r2); color: var(--text2); text-decoration: none; font-weight: 500; font-size: .95rem; flex: none }
.abmelden:hover { background: var(--flaeche); color: var(--text) }
.abmelden:active { background: var(--gold-bg) }
.dauerhinweis { background: var(--flaeche); border-top: 1px solid var(--linie); color: var(--text2); font-size: .88rem; line-height: 1.45 }
.dauerhinweis .app-breite { padding-block: var(--a2); display: flex; flex-wrap: wrap; gap: var(--a1) var(--a4) }
.dauerhinweis b { font-weight: 600; color: var(--gold); letter-spacing: .09em; text-transform: uppercase; font-size: .78rem; align-self: center }
.dauerhinweis span + span::before { content: "·"; margin-right: var(--a4); color: var(--rand) }
@media (max-width: 40rem) {
  .kopf { position: static }
  .kopf-zeile { gap: var(--a3) }
  .kopf-logo { height: 36px }
  .kopf-titel { padding-left: var(--a3) }
  .kopf-titel b { font-size: 1rem }
  .kopf-titel span { display: none }
  .dauerhinweis span + span::before { margin-right: var(--a2) }
  .dauerhinweis .app-breite { gap: var(--a1) var(--a2) }
}

/* ---- Reiter innerhalb einer Vorführung ---- */
.reiter { display: flex; gap: var(--a1); padding-top: var(--a4) }
.reiter button { border: 0; background: transparent; cursor: pointer; min-height: var(--tippe); padding: var(--a2) var(--a4); border-radius: var(--r-rund); color: var(--text2); font-weight: 500 }
.reiter button:hover { background: var(--flaeche); color: var(--text) }
.reiter button:active { background: var(--gold-bg) }
.reiter button[aria-current="page"] { background: var(--gold-bg); color: var(--gold); font-weight: 600 }

/* ---- Arbeitsfläche: Liste links, Fall rechts ---- */
.arbeit { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--a5); padding-block: var(--a5) var(--a8); align-items: start }
@media (min-width: 60rem) { .arbeit { grid-template-columns: 21rem minmax(0, 1fr); gap: var(--a6) } }
.seitenliste { display: flex; flex-direction: column; gap: var(--a3); min-width: 0 }
@media (min-width: 60rem) { .seitenliste { position: sticky; top: 132px } }
.faelle { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--a1) }
.fall { width: 100%; text-align: left; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 0 var(--a2); align-items: baseline; border: 1px solid transparent; background: transparent; border-radius: var(--r2); padding: var(--a3); cursor: pointer; min-height: var(--tippe); line-height: 1.35 }
.fall:hover { background: var(--flaeche) }
.fall:active { background: var(--gold-bg) }
.fall[aria-current="true"] { background: var(--karte); border-color: var(--linie); box-shadow: var(--schatten) }
.fall .nr { font-family: var(--kopf); font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums }
.fall .titel { font-weight: 600; min-width: 0; overflow-wrap: anywhere }
.fall .unter { grid-column: 2; color: var(--text2); font-size: .88rem; min-width: 0; overflow-wrap: anywhere }
.fall .stand { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--a1); margin-top: var(--a1) }
.fall .stand:empty { display: none }

/* ---- Marken (Status als Text auf eigener Tönung) ---- */
.chip { display: inline-flex; align-items: center; gap: var(--a2); font-size: .82rem; font-weight: 600; line-height: 1.3; padding: var(--a1) var(--a3); border-radius: var(--r-rund); background: var(--flaeche); color: var(--text2); border: 1px solid var(--linie); white-space: nowrap }
.chip.gruen { background: var(--gruen-bg); color: var(--gruen); border-color: transparent }
.chip.gelb { background: var(--gelb-bg); color: var(--gelb); border-color: transparent }
.chip.rot { background: var(--rot-bg); color: var(--rot); border-color: transparent }
.chip.gold { background: var(--gold-bg); color: var(--gold); border-color: transparent }
.punkt { width: .6rem; height: .6rem; border-radius: var(--r-rund); background: currentColor; flex: none }

/* ---- Fall rechts ---- */
.fallflaeche { display: flex; flex-direction: column; gap: var(--a5); min-width: 0 }
.fallkopf { display: flex; flex-wrap: wrap; gap: var(--a4); align-items: flex-end; justify-content: space-between }
.fallkopf .stapel-eng { min-width: 0; flex: 1 1 24rem }
.fallkopf h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem) }
.fallkopf p { color: var(--text2); max-width: 42rem }
.knopf.gross { padding: var(--a3) var(--a5); font-size: 1.05rem; min-height: 52px }
.abschnitt { display: flex; flex-direction: column; gap: var(--a3); min-width: 0 }
.abschnitt > h2 { font-size: 1.2rem }
.flach { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--r3); padding: var(--a4); display: flex; flex-direction: column; gap: var(--a3); min-width: 0 }
@media (min-width: 60rem) { .flach { padding: var(--a5) } }
.brief { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--lauf); font-size: 1em; line-height: 1.65; max-width: 42rem }
.brief mark { background: var(--gold-bg); color: var(--text); border-radius: var(--r1); padding: 0 var(--a1); font-weight: 600 }
.briefkopf { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--a1) var(--a3); font-size: .95rem; padding-bottom: var(--a3); border-bottom: 1px solid var(--linie) }
.briefkopf dt { color: var(--leise) }
.briefkopf dd { margin: 0; font-weight: 600; overflow-wrap: anywhere }
.leer { border: 1px dashed var(--rand); border-radius: var(--r3); padding: var(--a5); color: var(--text2); display: flex; flex-direction: column; gap: var(--a2) }
.leer b { font-family: var(--kopf); font-size: 1.15rem; color: var(--text) }

/* ---- Laufband: drei Stationen ---- */
.laufband { display: flex; flex-direction: column; gap: var(--a3); scroll-margin-top: 132px }
@media (max-width: 40rem) { .laufband { scroll-margin-top: var(--a4) } }
.stationen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--a2) }
.station { border: 1px solid var(--linie); border-top: 3px solid var(--linie); border-radius: var(--r2); background: var(--karte); padding: var(--a3); display: flex; flex-direction: column; gap: var(--a1); min-width: 0; color: var(--leise) }
.station .schritt-nr { font-family: var(--kopf); font-size: .9rem; font-variant-numeric: tabular-nums }
.station b { font-weight: 600; overflow-wrap: anywhere }
.station small { font-size: .88rem; line-height: 1.4 }
.station[data-stand="laeuft"] { border-top-color: var(--gold-hell); color: var(--text); box-shadow: var(--schatten) }
.station[data-stand="laeuft"] .schritt-nr { color: var(--gold) }
.station[data-stand="fertig"] { border-top-color: var(--gruen); color: var(--text2) }
.station[data-stand="fertig"] .schritt-nr { color: var(--gruen) }
.station[data-stand="fehler"] { border-top-color: var(--rot); color: var(--text) }
.station[data-stand="fehler"] .schritt-nr { color: var(--rot) }
.station[data-stand="laeuft"] b::after { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-left: var(--a2); border-radius: var(--r-rund); background: var(--gold-hell); animation: puls 1.2s var(--kurve) 12 alternate }
@keyframes puls { from { opacity: .25; transform: scale(.8) } to { opacity: 1; transform: scale(1) } }
.laufzeile { display: flex; flex-wrap: wrap; gap: var(--a2) var(--a4); align-items: center; color: var(--text2); font-size: .92rem; font-variant-numeric: tabular-nums }
.laufbalken { flex: 1 1 12rem; height: 6px; border-radius: var(--r-rund); background: var(--flaeche); border: 1px solid var(--linie); overflow: hidden }
.laufbalken i { display: block; height: 100%; background: var(--gold-hell); transform-origin: left; transform: scaleX(0); transition: transform 400ms linear }
@media (max-width: 40rem) { .stationen { grid-template-columns: minmax(0, 1fr) } .station { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: var(--a1) var(--a2) } .station small { flex-basis: 100% } }

/* ---- Urteil ---- */
.urteil { border-radius: var(--r3); padding: var(--a4) var(--a5); display: flex; flex-wrap: wrap; gap: var(--a2) var(--a4); align-items: center; justify-content: space-between }
.urteil.gruen { background: var(--gruen-bg); color: var(--gruen) }
.urteil.gelb { background: var(--gelb-bg); color: var(--gelb) }
.urteil.rot { background: var(--rot-bg); color: var(--rot) }
.urteil .wort { display: flex; align-items: center; gap: var(--a3); font-family: var(--kopf); font-weight: 600; font-size: clamp(1.5rem, 3.6vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.2 }
.urteil .wort .punkt { width: .9rem; height: .9rem }
.urteil .wohin { color: var(--text); font-size: .95rem; overflow-wrap: anywhere; min-width: 0 }
@media (max-width: 40rem) { .urteil { padding: var(--a4) } }

/* ---- Angaben als Paare ---- */
.angaben { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: var(--a4) var(--a5); margin: 0 }
.angaben div { display: flex; flex-direction: column; gap: var(--a1); min-width: 0 }
.angaben dt { font-size: .78rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--leise) }
.angaben dd { margin: 0; font-weight: 600; overflow-wrap: anywhere }
.angaben .breit { grid-column: 1 / -1 }
.angaben .dateiname { font-family: var(--kopf); font-size: clamp(1.15rem, 2.4vw, 1.5rem); letter-spacing: -0.015em; line-height: 1.25 }

/* ---- Abweichungen ---- */
.abweichungen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: abw }
.abweichungen li { counter-increment: abw; display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: var(--a1) var(--a3); align-items: baseline; padding: var(--a3) 0; border-top: 1px solid var(--linie) }
.abweichungen li:first-child { border-top: 0; padding-top: 0 }
.abweichungen li::before { content: counter(abw); font-family: var(--kopf); font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums }
.abweichungen .was { min-width: 0; display: flex; flex-direction: column; gap: var(--a1) }
.abweichungen .was b { font-weight: 600 }
.abweichungen .was span { color: var(--text2); font-size: .95rem; overflow-wrap: anywhere }
.abweichungen .was span i { font-style: normal; color: var(--leise) }
@media (max-width: 40rem) { .abweichungen li { grid-template-columns: 2rem minmax(0, 1fr) } .abweichungen .chip { grid-column: 2; justify-self: start } }
.meldeliste { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: var(--a2) }
.meldeliste li { overflow-wrap: anywhere }
.tabelle table { min-width: 30rem }
.tabelle td .chip { font-size: .78rem }

/* ---- Entwurf: Handlung ---- */
.handlung { display: flex; flex-wrap: wrap; gap: var(--a3); align-items: center; padding-top: var(--a3); border-top: 1px solid var(--linie) }
.handlung .leise { flex: 1 1 14rem; max-width: none }

/* ---- Regelblatt ---- */
.regelblatt { flex: 1; display: flex; flex-direction: column; gap: var(--a5); padding-block: var(--a5) var(--a8) }
.regelkopf { display: flex; flex-direction: column; gap: var(--a2); max-width: 42rem }
.regeln { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--a4) }
@media (min-width: 44rem) { .regeln { grid-template-columns: repeat(2, minmax(0, 1fr)) } }
@media (min-width: 70rem) { .regeln { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
.regel { background: var(--karte); border: 1px solid var(--linie); border-top: 3px solid var(--gold-hell); border-radius: var(--r3); padding: var(--a4); display: flex; flex-direction: column; gap: var(--a3); min-width: 0 }
.regel > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--a2) }
.regel h3 { font-family: var(--kopf); font-size: 1.15rem; letter-spacing: -0.015em }
.regel .feld label { font-weight: 500; font-size: .92rem; color: var(--text2) }
.regel .eingabe.zahl { max-width: 8rem; font-variant-numeric: tabular-nums; font-weight: 600 }
.regel .eingabe[aria-invalid="true"] { border-color: var(--rot); outline-color: var(--rot) }
.regel .eingabe.geaendert { background: var(--gold-bg) }
.regel ol { margin: 0; padding-left: 1.3rem; color: var(--text2); font-size: .95rem; display: flex; flex-direction: column; gap: var(--a1) }
select.eingabe { appearance: auto; cursor: pointer }
.regelfuss { display: flex; flex-wrap: wrap; gap: var(--a3); align-items: center }
.feldfehler { color: var(--rot); font-size: .9rem; font-weight: 500 }

/* ---- Anmeldung ---- */
.anmeldeseite { flex: 1; display: grid; place-items: center; padding: var(--a6) var(--a4) }
.anmeldung { width: 100%; max-width: 27rem; display: flex; flex-direction: column; gap: var(--a5) }
.anmeldung .logo { height: 112px; width: auto; align-self: center }
.anmeldung .kasten { padding: var(--a5); gap: var(--a4) }
.anmeldung h1 { font-size: 1.7rem }
.anmeldung form { display: flex; flex-direction: column; gap: var(--a4) }
.anmeldung .knopf { width: 100% }
.anmeldung .eingabe { min-height: 48px }
.anmeldung .fusszeile { text-align: center; color: var(--leise); font-size: .88rem }
.fehlerfeld { background: var(--rot-bg); color: var(--rot); border-radius: var(--r2); padding: var(--a3) var(--a4); font-weight: 500; font-size: .95rem }
.eingabe[aria-invalid="true"] { border-color: var(--rot) }

.seitenfuss { border-top: 1px solid var(--linie); color: var(--leise); font-size: .85rem }
.seitenfuss .app-breite { padding-block: var(--a4) }

@media (prefers-reduced-motion: reduce) {
  .station[data-stand="laeuft"] b::after { animation: none }
  .laufbalken i { transition: none }
}
.angaben dd .meldeliste { font-weight: 400 }
.anmeldung h1 { text-align: center }
.passwortfeld { position: relative }
.passwortfeld .eingabe { padding-right: 7rem }
.passwortfeld button { position: absolute; right: var(--a1); top: var(--a1); bottom: var(--a1); border: 0; background: transparent; color: var(--gold); font-weight: 600; font-size: .9rem; padding: 0 var(--a3); border-radius: var(--r1); cursor: pointer; min-width: var(--tippe) }
.passwortfeld button:hover { background: var(--flaeche) }
.passwortfeld button:active { background: var(--gold-bg) }
