/* Hocus Chokus Dojo – Verwaltung. Eckiges Design: Knöpfe 6 px, Karten 10 px, keine Pillen. */
:root {
  --anthrazit: #1a1a1a;
  --rot: #d72929;
  --rot-dunkel: #b31f1f;
  --grau: #5c6670;
  --grau-hell: #9e9e9e;
  --linie: #e2e2e2;
  --hintergrund: #f1f1f1;
  --weiss: #ffffff;
  --gruen: #2e9e4f;
  --gelb: #f2c200;
  --text: #1a1a1a;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--schrift); color: var(--text); background: var(--hintergrund); line-height: 1.45; }
a { color: var(--rot-dunkel); }
img { max-width: 100%; height: auto; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
small, .hinweis { color: var(--grau); }

/* Testumgebung */
.testbanner { background: #f2a900; color: #1a1a1a; text-align: center; font-weight: 600; font-size: .82rem; padding: .3rem .6rem; letter-spacing: .02em; }

/* Kopf */
.kopf { background: var(--anthrazit); color: #fff; }
.kopf-innen { max-width: 1200px; margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.marke { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; }
.marke img { width: 40px; height: 40px; background: #fff; border-radius: 6px; padding: 3px; }
/* 20.09.2026 (Inhaber): Auf den oeffentlichen Dokumentseiten (Anmeldung, Unterschreiben) darf das Logo groesser sein. */
body.dokument .marke img { width: 56px; height: 56px; padding: 5px; }
body.dokument .marke strong { font-size: 1.15rem; }
.marke span { display: flex; flex-direction: column; line-height: 1.1; }
.marke small { color: #bbb; font-size: .75rem; }
.nav { display: flex; gap: .15rem; flex-wrap: wrap; flex: 1; }
.nav a { color: #ddd; text-decoration: none; padding: .45rem .7rem; border-radius: 6px; font-weight: 500; }
.nav a:hover { background: #333; color: #fff; }
.nav a.aktiv { background: var(--rot); color: #fff; }
.benutzer { display: flex; align-items: center; gap: .6rem; margin-left: auto; font-size: .9rem; }
.benutzer form { margin: 0; }

/* Inhalt */
.inhalt { max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.fuss { text-align: center; color: var(--grau); font-size: .8rem; padding: 1rem; }
.fuss .debug { color: var(--rot); font-weight: 600; }
.seitenkopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.seitenkopf .unterzeile { margin: 0; color: var(--grau); }
.aktionen { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.karte { background: var(--weiss); border-radius: 10px; padding: 1.1rem 1.25rem; margin-bottom: 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.karte > h2:first-child { margin-top: 0; }
.karten-kopf { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; }
.karten-kopf h2 { margin: 0; white-space: nowrap; }
.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); align-items: start; }
.raster-2 { display: grid; gap: 1rem; grid-template-columns: 2fr 1fr; align-items: start; }
/* 21.09.2026 (Inhaber): Die Einstellungen fließen in Spalten statt im Raster zu stehen. Im Raster ist
   jede ZEILE so hoch wie ihre höchste Karte – neben der hohen Stripe-Karte blieb darunter genau so viel
   Luft, wie sie höher ist. Beim Spaltenfluss gibt es keine Zeilen, also auch keine Löcher.
   Die Lesereihenfolge bleibt stimmig: Erst wird die linke Spalte ganz gefüllt, dann die rechte – das
   ist die Reihenfolge im Quelltext, Tastatur und Vorlesehilfen gehen denselben Weg wie das Auge.
   column-width statt fester Spaltenzahl: Der Browser nimmt so viele Spalten, wie hineinpassen – am
   Handy eine, am breiten Schirm drei. */
.raster.spalten { display: block; columns: 27rem; column-gap: 1rem; }
.raster.spalten > .karte,
.raster.spalten > .kennzahlen { break-inside: avoid; }   /* sonst steht die halbe Karte in der nächsten Spalte */
.raster.spalten > .voll { column-span: all; }            /* Ersatz für grid-column: 1/-1, das ohne Raster wirkungslos wäre */
@media (max-width: 800px) { .raster-2 { grid-template-columns: 1fr; } }

/* Meldungen */
.meldung { padding: .7rem 1rem; border-radius: 6px; margin-bottom: 1rem; border-left: 4px solid var(--grau); background: #fff; }
.meldung.ok { border-color: var(--gruen); }
.meldung.fehler { border-color: var(--rot); }
.meldung.hinweis { border-color: var(--gelb); }
.fehlerliste { margin: 0 0 1rem; padding: .7rem 1rem .7rem 2rem; background: #fff3f3; border: 1px solid #f3c1c1; border-radius: 6px; }

/* Kennzahlen */
.kennzahlen { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 1rem; }
.kennzahl { background: #fff; border-radius: 10px; padding: .9rem 1rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); text-decoration: none; color: inherit; display: block; }
.kennzahl b { display: block; font-size: 1.7rem; line-height: 1.1; }
.kennzahl span { color: var(--grau); font-size: .85rem; }
.kennzahl.warn b { color: var(--rot); }

/* Tabellen */
.tabelle-huelle { overflow-x: auto; }
/* 21.09.2026 (Inhaber): Breite Tabellen lassen sich mit gehaltener Maustaste schieben – die Rollleiste
   sitzt bei langen Tabellen weit unten ausserhalb des Bildes. Die Klasse setzt app.js nur dann, wenn
   die Tabelle wirklich breiter ist als das Fenster; sonst waere der Greifzeiger eine Luege. */
.tabelle-huelle.schiebbar { cursor: grab; }
.tabelle-huelle.schiebt { cursor: grabbing; user-select: none; }
.tabelle-huelle.schiebt a, .tabelle-huelle.schiebt img { pointer-events: none; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--linie); vertical-align: middle; }
th { font-weight: 600; color: var(--grau); font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
/* 20.09.2026 (Inhaber): breite Tabellen – die Zeile darf beim Seitwaertsscrollen nicht verloren gehen.
   Zebrastreifen zuerst, Ueberfahren danach: bei gleicher Spezifitaet gewinnt die spaetere Regel.
   tr.warn und die Statusfarben haben hoehere Spezifitaet und bleiben unberuehrt. */
tr:nth-child(even) td { background: #f6f6f6; }
tr:hover td { background: #eaeef1; }
td.zahl, th.zahl { text-align: right; white-space: nowrap; }
td.knapp, th.knapp { white-space: nowrap; }
tr.gedaempft td { color: var(--grau-hell); }
.leer { color: var(--grau); padding: .5rem 0; }

/* Chips + Gurte */
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 6px; font-size: .78rem; font-weight: 600; background: #e8e8e8; color: #333; white-space: nowrap; }
.chip.leer { background: #f0f0f0; color: var(--grau); font-weight: 400; }
.status-aktiv, .vstatus-aktiv { background: #dff3e5; color: #1b6b35; }
.status-pausiert, .vstatus-pausiert { background: #fff2c9; color: #7a5a00; }
.status-gekuendigt, .vstatus-gekuendigt { background: #ffe0d6; color: #9a3a12; }
.status-ehemalig, .vstatus-beendet { background: #ececec; color: #666; }
.status-interessent, .vstatus-geplant { background: #dde9fb; color: #1f4f9a; }
.chip.status-geplant { background: #fff3cd; color: #7a5a00; }   /* Promotionssystem: „knapp davor" */
.gurt-symbol { display: inline-flex; align-items: center; gap: .45rem; vertical-align: middle; white-space: nowrap; }
/* 19.09.2026 (Inhaber: "die texte liegen uebereinander"): Kinderguertel haben lange Namen ("Grey/White Belt", "Orange/Black
   Belt"). Zusammen mit dem Zusatz "von ..." wurde die Zeile so eng, dass beides aneinanderklebte. Der Zusatz bekommt darum
   eine eigene Zeile unter dem Guerteleintrag - unabhaengig von Fensterbreite, Zoom und Schriftgroesse. */
.gurtliste li > small { flex: 1 0 100%; margin-top: -.2rem; }
.gurt-symbol svg { display: block; height: 15px; width: auto; flex: none; }
.gurt-symbol .gurt-text { display: inline-flex; flex-direction: column; line-height: 1.1; }
.gurt-symbol .gurt-text b { font-size: .82rem; font-weight: 600; }
.gurt-symbol .gurt-text small { font-size: .7rem; color: var(--grau); }
.gurt-symbol.mittel svg { height: 22px; }
.gurt-symbol.mittel .gurt-text b { font-size: .95rem; }
.gurt-symbol.mittel .gurt-text small { font-size: .78rem; }
.gurt-symbol.gross { gap: .7rem; }
.gurt-symbol.gross svg { height: 32px; }
.gurt-symbol.gross .gurt-text b { font-size: 1.2rem; }
.gurt-symbol.gross .gurt-text small { font-size: .85rem; }

/* Knöpfe */
.knopf { display: inline-block; background: var(--rot); color: #fff; border: 0; border-radius: 6px; padding: .5rem .9rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.knopf:hover { background: var(--rot-dunkel); }
.knopf.zweit { background: var(--anthrazit); }
.knopf.zweit:hover { background: #333; }
.knopf.hell { background: #e5e5e5; color: #1a1a1a; }
.knopf.hell:hover { background: #d5d5d5; }
.knopf.klein { padding: .3rem .6rem; font-size: .85rem; }
.knopf.gefahr { background: #fff; color: var(--rot-dunkel); border: 1px solid var(--rot); }
.knopf.gefahr:hover { background: #fff0f0; }
.knopf[disabled] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline; margin: 0; }

/* Formulare */
.formular { display: grid; gap: .8rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }   /* Megatest 2026-09-17: bei 200 % Zoom nicht breiter als der Bildschirm */
.formular .breit { grid-column: 1 / -1; }
/* 20.09.2026 (Inhaber: „auf dem Desktop extrem komisch formatiert"): .formular ist ein Spaltengitter, und JEDES
   direkte Kind wird eine Zelle. Auf der Anmeldeseite landeten dadurch Überschriften, Erklärtexte, Rechtstexte,
   Häkchen und das Unterschriftenfeld in 220-Pixel-Spalten neben den Eingabefeldern. Was kein Feld ist, gehört
   über die ganze Breite. */
.formular > h2, .formular > h3, .formular > h4, .formular > p, .formular > ul, .formular > details,
.formular > fieldset, .formular > canvas, .formular > label, .formular > script,
.formular > div.meldung, .formular > div.karte { grid-column: 1 / -1; }
.formular > canvas { max-width: 100%; }
.feld label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .2rem; }
/* 20.09.2026: frueher nur „.feld .pflicht" – das Sternchen in der Erklaerungszeile ueber dem Formular steht
   in einem Absatz und waere als einziges schwarz geblieben. */
.pflicht { color: var(--rot); }
.feld input, .feld select, .feld textarea { width: 100%; font: inherit; padding: .5rem .6rem; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff; color: inherit; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: 2px solid var(--rot); outline-offset: 1px; border-color: var(--rot); }
.feld input[readonly] { background: #f5f5f5; }
.feld.kaestchen { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.feld.kaestchen input { width: auto; }
.feld .hinweis { display: block; margin-top: .2rem; font-size: .8rem; }
.formular-fuss { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.filter { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filter .feld { margin: 0; min-width: 150px; }
.filter .feld.suche { flex: 1; min-width: min(220px, 100%); }

/* Listen / Details */
.details dl { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.details dt { color: var(--grau); font-size: .85rem; }
.details dd { margin: 0; }
.zeitleiste { list-style: none; margin: 0; padding: 0; }
.zeitleiste li { padding: .4rem 0; border-bottom: 1px solid var(--linie); display: flex; gap: .75rem; align-items: baseline; flex-wrap: wrap; }
.zeitleiste time { color: var(--grau); font-size: .85rem; min-width: 7.5rem; }
/* 22.09.2026 (Inhaber): Die Zahl „3 eingecheckt" klappt die Namen auf. Die Liste ist ein GESCHWISTER des Ausklappers –
   so bleibt die Zahl in der Zeile, und die Namen nehmen darunter die volle Breite (die Zeile ist flex mit Umbruch). */
.zeitleiste .wer-schalter > summary { cursor: pointer; list-style: none; user-select: none; }
.zeitleiste .wer-schalter > summary::-webkit-details-marker { display: none; }
.zeitleiste .wer-schalter > summary::after { content: " ▾"; }
.zeitleiste .wer-schalter[open] > summary::after { content: " ▴"; }
.zeitleiste .wer { display: none; flex: 1 0 100%; list-style: none; margin: .2rem 0 .3rem; padding: .4rem .7rem; background: var(--hell, #f6f6f6); border-radius: 6px; columns: 14rem; column-gap: 1.2rem; }
.zeitleiste .wer-schalter[open] + .wer { display: block; }
.zeitleiste .wer li { display: block; border: 0; padding: .12rem 0; break-inside: avoid; }
/* 22.09.2026 (Inhaber): Personenkarten – Foto, Name, Gürtel, Uhrzeit. „das macht es viel persönlicher". Ein Raster, das
   so viele Karten nebeneinander stellt, wie hineinpassen (am Handy eine). Eckig wie der Rest: 10 px für Karten. */
.leute { list-style: none; margin: .3rem 0 .2rem; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); }
.leute li { display: block; border: 0; padding: 0; min-width: 0; }
.leute .person { display: flex; align-items: center; gap: .65rem; padding: .45rem .55rem; border: 1px solid var(--linie); border-radius: 10px; background: #fff; text-decoration: none; color: inherit; height: 100%; }
.leute .person:hover { border-color: var(--rot); }
.leute .person > span { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.leute .person b { font-size: .95rem; line-height: 1.2; overflow-wrap: anywhere; }
.leute .person:hover b { color: var(--rot-dunkel); }
.leute .person small { color: var(--grau); font-size: .8rem; line-height: 1.25; overflow-wrap: anywhere; }
.leute .person .gurt-symbol, .leute .person .chip { margin-top: .15rem; align-self: flex-start; }
/* „Gesichter": Foto oben, Vorname fett, Nachname darunter. Für schmale Plätze – der Ausklapper in „Heute im Dojo" ist am
   Desktop nur rund 340 px breit (gemessen); liegende Karten stünden dort einspaltig, als Gesichter passen drei nebeneinander. */
.leute.gesichter { grid-template-columns: repeat(auto-fill, minmax(5.6rem, 1fr)); }
.leute.gesichter .person { flex-direction: column; text-align: center; gap: .35rem; padding: .55rem .3rem .5rem; }
.leute.gesichter .person .avatar { width: 60px; height: 60px; min-width: 60px; border-radius: 8px; }
.leute.gesichter .person > span { align-items: center; width: 100%; }
.leute.gesichter .person b { font-size: .88rem; }
.leute.gesichter .person .nn { display: block; font-weight: 400; font-size: .8rem; }
.leute.gesichter .person .gurt-symbol, .leute.gesichter .person .chip { align-self: center; }
/* Im Ausklapper von „Heute im Dojo": das Raster ersetzt die Spalten der schlichten Namensliste. */
.zeitleiste .wer.leute { columns: auto; padding: .5rem; }
.zeitleiste .wer-schalter[open] + .wer.leute { display: grid; }
.seiten { display: flex; gap: .3rem; margin-top: .75rem; flex-wrap: wrap; }
.seiten a, .seiten span { padding: .3rem .6rem; border-radius: 6px; background: #fff; text-decoration: none; border: 1px solid var(--linie); }
.seiten .aktiv { background: var(--anthrazit); color: #fff; border-color: var(--anthrazit); }

/* Wochenplan */
.woche { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); }   /* Megatest 2026-09-17: 200 % Zoom */
.tag h3 { background: var(--anthrazit); color: #fff; padding: .35rem .6rem; border-radius: 6px; font-size: .9rem; }
.kurs { background: #fff; border-left: 4px solid var(--rot); border-radius: 6px; padding: .45rem .6rem; margin-bottom: .5rem; font-size: .88rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.kurs b { display: block; }
.kurs.inaktiv { opacity: .5; }
.kurs .zeit { color: var(--grau); }

/* Login */
.login-box { max-width: 420px; margin: 3rem auto; }
.login-box .marke-gross { text-align: center; margin-bottom: 1rem; }
.login-box .marke-gross img { width: 90px; height: 90px; }

/* Fotos */
.avatar { width: 36px; height: 36px; min-width: 36px; border-radius: 6px; object-fit: cover; vertical-align: middle; background: #e6e6e6; display: inline-block; flex: none; }
.avatar.gross { width: 48px; height: 48px; min-width: 48px; }
.avatar.mittel { width: 52px; height: 52px; min-width: 52px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.mg-zeile { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; }
.mg-zeile b { color: var(--rot-dunkel); font-size: 1.02rem; }
.mg-zeile:hover b { text-decoration: underline; }
table td:has(> .mg-zeile) { padding-top: .35rem; padding-bottom: .35rem; }
.foto-gross { width: 100%; max-width: 260px; height: auto; border-radius: 10px; display: block; margin-bottom: .6rem; }
.foto-knoepfe { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.foto-knoepfe label.knopf { cursor: pointer; }

/* Mitgliederbereich */
.mein-inhalt { max-width: 760px; }
.profil { display: flex; gap: 1rem; align-items: center; }
.profil img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: #e6e6e6; flex: none; }
.profil h1 { margin: 0; }
.profil > div { min-width: 0; flex: 1 1 auto; }                  /* Handy: Textblock darf schmaler werden als sein Inhalt */
.profil .gurt-symbol { white-space: normal; flex-wrap: wrap; }   /* „Blue Belt, 3 Stripes" bricht bei Bedarf um statt seitlich zu scrollen */
/* 21.09.2026 (Inhaber): „Heute im Dojo" im Mitgliederbereich. Vorbei = gedämpft, das Nächste = roter Strich links. */
.heute-liste li.vorbei { opacity: .5; }
.heute-liste li.jetzt { box-shadow: inset 3px 0 0 var(--rot); padding-left: .6rem; }
.heute-liste li.faellt-aus time { text-decoration: line-through; color: var(--grau); }
#stundenplan { scroll-margin-top: 4.5rem; }
.sp-filter { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: -.2rem 0 .7rem; }
.sp-filter form { margin: 0; }                /* der Sprung landet unter der festen Kopfzeile, nicht dahinter */
.code-zeile { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .7rem 1.25rem; }
.code-zeile .code { font-size: 1.15rem; letter-spacing: .1em; }
.code-zeile details { flex: 1 1 100%; }
.code-zeile summary { display: inline-block; list-style: none; cursor: pointer; }
.code-zeile summary::-webkit-details-marker { display: none; }
.svg-diagramm { width: 100%; height: auto; display: block; }
.svg-diagramm text { font-family: inherit; }
.heatmap { max-width: 100%; min-width: 440px; }
.balken-liste { display: grid; gap: .35rem; }
.balken-zeile { display: grid; grid-template-columns: minmax(2.4rem, auto) 1fr 2.2rem; gap: .5rem; align-items: center; font-size: .9rem; }
.balken-zeile .balken-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 12rem; }
.balken { display: block; height: 12px; background: #eee; border-radius: 3px; overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--rot); border-radius: 3px; }
.balken-wert { text-align: right; color: var(--grau); }
.familie form { margin: 0; }

/* Check-in-Tablet */
[hidden] { display: none !important; }
.kiosk-inhalt { max-width: 1100px; }
.kiosk-hinweis { max-width: 560px; margin: 2rem auto; text-align: center; }
.kiosk-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 760px) { .kiosk-spalten { grid-template-columns: 1fr; } }
.code-anzeige { font-size: 2.6rem; letter-spacing: .25em; text-align: center; font-weight: 700; margin: .2rem 0 .4rem; min-height: 3.2rem; font-variant-numeric: tabular-nums; }
.kiosk-fehler { color: var(--rot); text-align: center; font-weight: 600; min-height: 1.4rem; margin: 0 0 .4rem; }
.tastatur { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; max-width: 340px; margin: 0 auto; }
.tastatur button { font: inherit; font-size: 1.8rem; font-weight: 600; padding: .85rem 0; border-radius: 8px; border: 1px solid #d5d5d5; background: #fff; cursor: pointer; color: inherit; }
.tastatur button:active { background: #eee; }
.tastatur button.ok { background: var(--rot); color: #fff; border-color: var(--rot); }
.tastatur button.loeschen { color: var(--grau); display: flex; align-items: center; justify-content: center; }
.tastatur button.loeschen svg { width: 32px; height: 32px; }
.tastatur button.loeschen:active { color: var(--anthrazit); }
#suche { width: 100%; font: inherit; font-size: 1.4rem; padding: .8rem; border: 1px solid #c9c9c9; border-radius: 8px; }
#suche:focus { outline: 2px solid var(--rot); border-color: var(--rot); }
.treffer { display: grid; gap: .5rem; margin-top: .8rem; }
.treffer-zeile { display: flex; align-items: center; gap: .8rem; padding: .5rem .7rem; border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; text-align: left; font: inherit; cursor: pointer; color: inherit; }
.treffer-zeile:active { background: #f3f3f3; }
.treffer-zeile img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: #e6e6e6; flex: none; }
.treffer-zeile b { font-size: 1.15rem; display: block; }
.treffer-zeile small { color: var(--grau); }
.treffer-zeile .gurt-zeile { margin-left: auto; }
.gurt-zeile { display: block; margin: .15rem 0; }
.gurt-zeile:empty { display: none; }
.teilnehmer-karte .gurt-zeile svg { height: 14px; }
#b-gurt .gurt-symbol svg { height: 26px; }
.kiosk-bestaetigen { text-align: center; max-width: 560px; margin: 0 auto; }
.kiosk-bestaetigen img { width: 240px; height: 240px; border-radius: 10px; object-fit: cover; margin: .5rem auto; display: block; background: #e6e6e6; }
.kiosk-bestaetigen h2 { font-size: 1.8rem; margin: .4rem 0; }
.kiosk-bestaetigen img { width: 200px; height: 200px; }
.knopf.gross { font-size: 1.35rem; padding: .9rem 1.6rem; }
.kurs-liste { display: grid; gap: .5rem; }
.kurs-zeile { display: flex; align-items: center; gap: .8rem; padding: .5rem .7rem; border: 1px solid #e2e2e2; border-radius: 8px; background: #fff; }
.kurs-zeile.zustand-laeuft { border-color: var(--gruen); box-shadow: inset 4px 0 0 var(--gruen); }
.kurs-zeile.zustand-bald, .kurs-zeile.zustand-vorbei { box-shadow: inset 4px 0 0 var(--rot); }
.kurs-zeile.zustand-abgesagt, .kurs-zeile.zustand-spaeter { opacity: .6; }
.kurs-zeit { font-weight: 600; white-space: nowrap; min-width: 6.5rem; }
.kurs-name { flex: 1; min-width: 0; }
.kurs-name b { display: block; }
.kurs-name small { color: var(--grau); }
.zaehler { display: inline-flex; align-items: center; gap: .35rem; font: inherit; font-weight: 700; padding: .45rem .7rem; border-radius: 8px; border: 1px solid #d5d5d5; background: #fff; cursor: pointer; color: var(--anthrazit); }
.zaehler:active { background: #eee; }
.kurswahl { display: grid; gap: .5rem; text-align: left; margin: .5rem 0 1rem; }
.kurswahl-knopf { display: block; width: 100%; text-align: left; font: inherit; padding: .7rem .9rem; border: 2px solid #d5d5d5; border-radius: 8px; background: #fff; cursor: pointer; color: inherit; }
.kurswahl-knopf b { display: block; font-size: 1.1rem; }
.kurswahl-knopf span { color: var(--grau); font-size: .9rem; }
.kurswahl-knopf.gewaehlt { background: #dff3e5; border-color: var(--gruen); }
.kurswahl-knopf.gewaehlt b::before { content: "✓ "; color: var(--gruen); }
.kurswahl-knopf.schon { opacity: .55; cursor: default; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 1rem; overflow: auto; z-index: 50; }
.overlay-karte { width: 100%; max-width: 900px; margin-top: 1rem; }
.teilnehmer { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .8rem; }
.teilnehmer-karte { text-align: center; }
.teilnehmer-karte img { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: #e6e6e6; display: block; margin: 0 auto .3rem; }
.teilnehmer-karte b { display: block; font-size: .95rem; }
.teilnehmer-karte small { color: var(--grau); }

/* Dokumente (Vertrag lesen, unterschreiben, drucken) */
.dok-huelle { max-width: 860px; margin: 0 auto; }
.dok-leiste { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.dok { background: #fff; border-radius: 10px; padding: 1.5rem 1.6rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); font-size: .95rem; line-height: 1.5; }
.dok h1 { font-size: 1.5rem; letter-spacing: .04em; margin: 0 0 .2rem; }
.dok h2 { font-size: 1.2rem; letter-spacing: .04em; margin: 1.6rem 0 .1rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.dok h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
.dok .dok-untertitel { color: var(--grau); margin: 0 0 .8rem; }
.dok-tabelle { border-collapse: collapse; margin: .5rem 0 .8rem; }
.dok-tabelle th { text-align: left; font-weight: 600; color: var(--grau); padding: .15rem .8rem .15rem 0; vertical-align: top; white-space: nowrap; border: 0; font-size: .9rem; text-transform: none; letter-spacing: 0; }
.dok-tabelle td { padding: .15rem 0; border: 0; }
.dok ul { padding-left: 1.3rem; }
.dok .dok-klein { font-size: .85rem; color: var(--grau); }
.dok-formular { margin-top: 1.5rem; padding-top: 1rem; border-top: 2px solid var(--anthrazit); }
/* 20.09.2026 (Inhaber: „die 3 Checkboxen sind nicht aligned"): Das Kaestchen bekommt eine feste Groesse und
   darf nicht schrumpfen – sonst rutschen die Zeilen gegeneinander, sobald der Text unterschiedlich lang ist. */
.dok-haken { display: flex; gap: .55rem; align-items: flex-start; padding: .35rem 0; }
.dok-haken input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: .15rem 0 0; }
.dok-haken > span { flex: 1 1 auto; min-width: 0; }

/* Tarifwahl als Karten statt als Punkteliste (Inhaber 20.09.2026): blass gruen, sobald eine gewaehlt ist. */
.tarif-wahl { display: grid; gap: .5rem; }
.tarif-karte { display: block; border: 2px solid #d5d5d5; border-radius: 10px; padding: .7rem .8rem; cursor: pointer;
    background: #fff; transition: background .12s ease, border-color .12s ease; }
.tarif-karte:hover { border-color: #9fbf9f; }
.tarif-karte.gewaehlt { background: #eaf6ea; border-color: #5d9c5d; }
/* 20.09.2026 (Inhaber: „der Auswahlknopf ist immer noch nicht gerade neben dem Text"): Die Titelzeile ist eine
   eigene Flex-Zeile. So sitzt der Knopf IMMER mittig zum Titel – unabhaengig von Schriftgroesse und davon, wie
   viele Zeilen darunter stehen. Ein fester Abstand von oben verrutscht bei jeder Aenderung wieder. */
.tarif-kopf { display: flex; align-items: center; gap: .55rem; }
.tarif-kopf input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: #5d9c5d; }
.tarif-zeile { display: block; margin-top: .25rem; padding-left: calc(1.1rem + .55rem); font-size: .85em; }

/* § 8 Abs 1 FAGG (ab 27.09.2026): Die Pflichtangaben muessen „klar und in hervorgehobener Weise" unmittelbar vor
   dem Bestellknopf stehen. Darum ein eigener, abgesetzter Kasten - nicht bloss ein Absatz im Fliesstext. */
/* 20.09.2026 (Inhaber): Die Ruecktrittsbelehrung ist Pflichttext und muss vollstaendig dastehen – aber sie darf
   das Formular nicht erschlagen. Kleiner gesetzt, engerer Zeilenabstand, deutlich abgesetzt. Der Pflichtkasten
   nach § 8 Abs 1 unmittelbar vor dem Knopf bleibt bewusst GROSS, der muss hervorgehoben sein. */
.belehrung { font-size: .82em; line-height: 1.45; color: #444; border-left: 3px solid #d5d5d5; padding: .1rem 0 .1rem .8rem; }
.belehrung h3 { font-size: 1em; margin: 0 0 .3rem; color: #1a1a1a; }
.belehrung h4 { font-size: .95em; margin: .6rem 0 .15rem; color: #1a1a1a; }
.belehrung p { margin: .25rem 0; }

.bestellhinweis { border: 2px solid #1a1a1a; border-radius: 10px; padding: .8rem .9rem; margin: 1rem 0 .4rem; background: #fff; }
.bestellhinweis h4 { margin: 0 0 .5rem; font-size: 1rem; }
.bestellhinweis dl { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .8rem; margin: 0; }
.bestellhinweis dt { font-weight: 600; }
.bestellhinweis dd { margin: 0; }
.signatur-feld { display: block; width: 100%; height: 220px; border: 2px dashed #9e9e9e; border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; }
.dok-signatur { margin-top: 1.5rem; padding-top: 1rem; border-top: 2px solid var(--anthrazit); }
.dok-signatur img { max-width: 480px; width: 100%; height: auto; border-bottom: 1px solid #333; display: block; }
body.dokument .inhalt { max-width: 900px; }
@media print {
  .drucken-weg, .dok-leiste, .fuss { display: none !important; }
  body { background: #fff; }
  .dok { box-shadow: none; padding: 0; border-radius: 0; font-size: 11pt; }
  .inhalt { padding: 0; }
}

/* Personal-Konten als Blöcke (kein seitliches Scrollen) */
.konten { display: grid; gap: .6rem; }
.konto { border: 1px solid var(--linie); border-radius: 8px; padding: .7rem .9rem; }
.konto.gedaempft { opacity: .6; }
.konto-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; flex-wrap: wrap; }
.konto-rechte { margin-top: .5rem; }
.inline-details { display: inline-block; vertical-align: middle; }
.inline-details summary { display: inline-block; list-style: none; cursor: pointer; }
.inline-details summary::-webkit-details-marker { display: none; }

/* Rechte-Kästchen (Einstellungen) */
.rechte-liste { display: grid; gap: .4rem; }
.rechte-zeile { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; padding: .4rem .5rem; border: 1px solid var(--linie); border-radius: 6px; background: #fff; cursor: pointer; }
.rechte-zeile input { margin-top: .25rem; }
.rechte-zeile small { color: var(--grau); }

/* Code-Anzeige */
code, .code { font-family: ui-monospace, Consolas, monospace; background: #f3f3f3; padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }
.gross-code { font-size: 1.6rem; letter-spacing: .15em; font-weight: 700; }

@media (max-width: 640px) {
  .kopf-innen { gap: .5rem; }
  .nav { order: 3; flex: 0 0 100%; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .2rem; }   /* eigene Zeile, seitlich wischbar (flex:1 hätte sie in den Rest der ersten Zeile gequetscht) */
  .nav a { white-space: nowrap; }
  .benutzer span { display: none; }
  th, td { padding: .4rem .45rem; }
}

/* Dashboard-Kacheln (Reihenfolge je Konto, Anordnen-Modus) */
.kacheln > .kachel { min-width: 0; }
.kacheln > .kachel.breit { grid-column: 1 / -1; }
.kacheln > .kachel > .karte, .kacheln > .kachel > .kennzahlen { margin-bottom: 0; }
.kacheln.anordnen > .kachel { border: 2px dashed #c9c9c9; border-radius: 10px; padding: .4rem; background: #fafafa; }
.kacheln.anordnen > .kachel.versteckt > .karte, .kacheln.anordnen > .kachel.versteckt > .kennzahlen { opacity: .35; }
.kacheln.anordnen > .kachel.ziehen { opacity: .4; }
.kacheln.anordnen > .kachel.ziel { border-color: var(--rot); background: #fff4f4; }
.kachel-leiste { display: flex; align-items: center; gap: .5rem; padding: .2rem .3rem .5rem; cursor: grab; flex-wrap: wrap; }
.kachel-leiste b { flex: 1 1 auto; }
.kachel-griff { font-size: 1.2rem; color: var(--grau); line-height: 1; }
.kachel-knoepfe { display: flex; gap: .3rem; }

/* Check-in: fehlende Unterschrift + Trainer-PIN */
.unterschrift-box { text-align: left; }
.unterschrift-box .aktionen { display: flex; gap: .5rem; flex-wrap: wrap; }
.pin-karte { max-width: 420px; text-align: center; }
.pin-tastatur { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; max-width: 340px; margin: 0 auto; }
.pin-tastatur button { font: inherit; font-size: 1.6rem; font-weight: 600; padding: .8rem 0; border-radius: 8px; border: 1px solid #d5d5d5; background: #fff; cursor: pointer; color: inherit; }
.pin-tastatur button:active { background: #eee; }
.pin-tastatur button.ok { background: var(--rot); color: #fff; border-color: var(--rot); }
.pin-tastatur button.loeschen { color: var(--grau); }
.teilnehmer-karte .chip { display: inline-block; margin-top: .25rem; }

/* Handy: nichts darf breiter als der Bildschirm sein (Inhaber 2026-09-14) */
body { overflow-x: hidden; }
.raster > *, .raster-2 > *, .kacheln > .kachel, .karte, .konto, .kachel > * { min-width: 0; }
.details dd, .details dt, .zeitleiste li > span, .zeitleiste small, .zeitleiste a, .hinweis, .karte p, .kennzahl span, .meldung, .leer, .konto-kopf, .aktionen { overflow-wrap: anywhere; }
/* Tabellen NICHT umbrechen lassen: sie scrollen in .tabelle-huelle seitlich; mit overflow-wrap:anywhere quetschte der Browser
   die Spalten am Handy so eng, dass Namen buchstabenweise umbrachen (Inhaber 2026-09-14) */
td, th { overflow-wrap: normal; }
.tabelle-huelle td:first-child { white-space: nowrap; }
/* 20.09.2026: Die erste Spalte bleibt beim Scrollen nach rechts stehen, damit der Name neben dem Knopf steht.
   Gemessen an den Tarifen: 1435 px Tabelle in 1104 px Huelle – 331 px Scrollweg, und der Name war weg.
   Der Hintergrund MUSS gesetzt sein, sonst scheint der darunter durchlaufende Inhalt durch; er wird darum
   je Zeilenzustand (normal / Zebra / ueberfahren) mitgefuehrt. Der Schatten ersetzt den Rahmen, den
   border-collapse an einer klebenden Zelle nicht zuverlaessig zeichnet.
   Erst ab 600 px: am Handy frisst eine festgeklebte Namensspalte zu viel vom knappen Platz. */
@media (min-width: 600px) {
  .tabelle-huelle th:first-child, .tabelle-huelle td:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--weiss); box-shadow: 1px 0 0 var(--linie);
  }
  .tabelle-huelle tr:nth-child(even) td:first-child { background: #f6f6f6; }
  .tabelle-huelle tr:hover td:first-child { background: #eaeef1; }
  .tabelle-huelle tr.warn td:first-child { background: #fff3e0; }
}
.zeitleiste li > span { min-width: 0; flex: 1 1 8rem; }
.karte svg[viewBox]:not(.gurt-symbol svg) { max-width: 100%; height: auto; }
.feld input, .feld select, .feld textarea { max-width: 100%; box-sizing: border-box; }

/* Zaehlleiste Mitgliederliste: Status-Chips mit Zahlen, anklickbar = Filter */
.zaehlleiste { display: flex; flex-wrap: wrap; gap: .35rem; margin: .2rem 0 .8rem; }
.zaehlleiste .chip { text-decoration: none; }
.zaehlleiste .chip.aktiv-filter { outline: 2px solid var(--rot); outline-offset: 1px; }
/* Promotionssystem: Balken mit Soll-Wert, Monatsleiste (voll / aktiv / entschuldigt / Pause) */
.pm-balken .balken-zeile { grid-template-columns: minmax(7rem, auto) 1fr 5.2rem; }
.pm-monate { display: flex; flex-wrap: wrap; gap: 3px; margin-top: .5rem; align-items: center; }
.pm-monate i, .pm-legende i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: #e0e0e0; vertical-align: middle; }
.pm-voll { background: #2e7d32 !important; }
.pm-aktiv { background: #9ccc65 !important; }
.pm-entschuldigt { background: #90caf9 !important; }
.pm-pause { background: #e0e0e0 !important; }
.pm-laufend { background: #fff !important; border: 1px dashed #999; box-sizing: border-box; }
.pm-vorher { background: #fff !important; border: 1px dotted #bbb; box-sizing: border-box; }
.pm-legende { margin: .3rem 0 0; font-size: .78rem; }
.pm-legende i { width: 10px; height: 10px; margin: 0 .15rem 0 .5rem; }
th .sortlink { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
th .sortlink.aktiv { color: var(--rot); border-bottom-style: solid; }

/* Vertragsdokument am Handy: lange Werte (E-Mail, Adresse) umbrechen statt abschneiden */
.dok-tabelle td, .dok-tabelle th { overflow-wrap: anywhere; white-space: normal; }
.tabelle-huelle tr.warn td{background:#fff3e0}
.status-gast { background: #dff0ee; color: #0f5e56; }
.status-archiv { background: #f3f3f3; color: #8a8a8a; }

/* Mitgliederbereich: Karten anordnen (0.9.23) - Leiste ueber dem Raster */
.mein .anordnung-leiste { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.mein .anordnung-leiste .kachel-knoepfe { flex-wrap: wrap; }

/* Megatest 2026-09-17: Check-in-Tablet – Bestätigung in zwei Blöcken (quer nebeneinander, „Einchecken" ohne Scrollen), Tippflächen ab 44 px,
   kein Doppeltipp-Zoom auf Tasten, dasselbe Löschen-Symbol auf der PIN-Tastatur */
.kiosk-bestaetigen .b-knoepfe { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: 1rem 0 .4rem; }
.kiosk .tastatur button, .kiosk .pin-tastatur button, .kiosk .knopf, .kiosk .zaehler, .kiosk .kurswahl-knopf, .kiosk .treffer-zeile { touch-action: manipulation; }
.unterschrift-box .knopf, #o-zu, #pin-abbrechen { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.zaehler { min-height: 44px; min-width: 44px; justify-content: center; }
.pin-tastatur button.loeschen { display: flex; align-items: center; justify-content: center; }
.pin-tastatur button.loeschen svg { width: 30px; height: 30px; }
@media (orientation: landscape) and (min-width: 900px) {
  #schritt-bestaetigen:not([hidden]) { display: grid; grid-template-columns: minmax(220px, 32%) 1fr; gap: 0 1.5rem; align-items: start; max-width: 1060px; text-align: left; }
  #schritt-bestaetigen .b-person { text-align: center; }
  #schritt-bestaetigen .b-aktion { padding-top: .5rem; }
  #schritt-bestaetigen .b-knoepfe { flex-direction: row; align-items: stretch; }
  #schritt-bestaetigen .b-knoepfe .knopf { flex: 1 1 0; }
}

/* Megatest 2026-09-17: Überbreiten – lange Adressen und Listen in code umbrechen (Einstellungen → Stripe), aufgeklappte Kurzformulare
   (Personal-Konten: Mitglied, Passwort, PIN) nie breiter als der Bildschirm; Mitgliederliste am Laptop: die E-Mail in der letzten Spalte darf
   umbrechen, statt die Tabelle seitlich zu verlängern */
code { overflow-wrap: anywhere; }
.inline-details { max-width: 100%; }
.inline-details form.inline select, .inline-details form.inline input { max-width: 100% !important; }
@media (min-width: 1000px) { .tabelle-huelle td:last-child > small:only-child { overflow-wrap: anywhere; } .tabelle-huelle th.knapp { white-space: normal; } }
@media (max-width: 300px) {                         /* ≈ 200 % Zoom am Handy */
  .karten-kopf h2 { white-space: normal; }
  .profil { flex-wrap: wrap; }
  .gurt-symbol { flex-wrap: wrap; white-space: normal; max-width: 100%; }
}

/* Zweiter Faktor (22.09.2026) */
.login-box.zf-breit { max-width: 480px; }
.zf-schritte { padding-left: 1.3rem; margin: .8rem 0; }
.zf-schritte li { margin-bottom: .6rem; }
.zf-qr { display: block; width: 220px; height: 220px; margin: .6rem auto; }
.zf-qr svg { display: block; width: 100%; height: 100%; }
.zf-hand summary { cursor: pointer; color: var(--grau); font-size: .9rem; }
.zf-geheimnis { font-family: ui-monospace, Consolas, "Courier New", monospace; letter-spacing: .08em; word-break: break-all; background: #f6f6f6; padding: .5rem .7rem; border-radius: 6px; text-align: center; margin: .5rem 0 .2rem; }
.feld.zf-code input { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 1.35rem; letter-spacing: .25em; text-align: center; }
.zf-ersatz { display: grid; grid-template-columns: repeat(2, 1fr); gap: .3rem 1rem; list-style: none; margin: .6rem 0 .9rem; padding: .7rem 1rem; background: #f6f6f6; border-radius: 6px; font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: 1.05rem; }
@media (min-width: 600px) { .zf-ersatz { grid-template-columns: repeat(4, 1fr); } }
.zf-aktion { margin-top: .6rem; }
.zf-aktion summary { display: inline-block; cursor: pointer; }
.zf-geraete { list-style: none; margin: 0 0 .8rem; padding: 0; }
.zf-geraete li { padding: .4rem 0; border-bottom: 1px solid var(--linie, #e5e5e5); }
.zf-pflicht { margin: 0 0 1rem; }
.zf-pflicht select { font: inherit; padding: .3rem .5rem; border: 1px solid #c9c9c9; border-radius: 6px; }
.benutzer .konto-link { color: #fff; text-decoration: none; border-bottom: 1px dotted rgba(255,255,255,.5); }
