/* Ihle-Kundenkarte – Registrierung
   Erscheinungsbild wie www.ihle.work (Contao-Theme der Agentur):
   roter Kopf mit Logo und Zackenkante, dunkelgrauer Struktur-Hintergrund der IHLE-CARD-Seite (ihle.work/ihlecard),
   Text und Felder stehen wie dort direkt auf dem Grund – keine Inhaltskästen, nur dünne weiße Linien zwischen den Abschnitten;
   Überschriften Khand (Schreibschrift „Hello Lucky“ für Seitentitel), Fließtext Adelle Light, roter Hauptknopf, weiße Rahmenknöpfe.
   Weil alles auf dem dunklen Grund liegt, gibt es nur eine Farbwelt – hell und dunkel eingestellte Geräte sehen dasselbe.
   Aufbau und Begriffe bleiben nah an der bonVito-Seite (Kontakt/Datenschutz/AGB, gleiche Felder).
   Hintergrundbild und die Schriften Adelle/Hello Lucky kommen aus dem ihle.work-Theme (gleiche Domain, kein Fremdserver);
   fehlen sie einmal, bleibt der dunkelgraue Grund bzw. die Ersatzschrift – die Seite funktioniert trotzdem. */

@font-face { font-family: "Khand"; font-weight: 500; font-display: swap; src: url("fonts/Khand-Medium-500.woff2") format("woff2"); }
@font-face { font-family: "Khand"; font-weight: 600; font-display: swap; src: url("fonts/Khand-SemiBold-600.woff2") format("woff2"); }
@font-face { font-family: "Khand"; font-weight: 700; font-display: swap; src: url("fonts/Khand-Bold-700.woff2") format("woff2"); }
@font-face { font-family: "Adelle Light"; font-weight: 400; font-display: swap; src: url("/files/ihle/theme/fonts/Adelle-Light.woff2") format("woff2"); }
@font-face { font-family: "Hello Lucky"; font-weight: 400; font-display: swap; src: url("/files/ihle/theme/fonts/HelloLucky.woff2") format("woff2"); }

:root {
  --rot: #d41317;
  --rot-dunkel: #a80f12;
  --rot-text: #ff7b76;         /* Rot als Schriftfarbe (Sternchen, Links, Fehler): auf dem dunklen Grund heller, sonst reicht der Kontrast nicht */
  --dunkel: #1d1d1b;           /* Fuß: Anthrazit wie der Hintergrund */
  --grund: #343434;            /* Grundton des Hintergrundbilds (bis es geladen ist) */
  --text: #ffffff;             /* Schrift direkt auf dem dunklen Grund */
  --text-leise: #d6d6d6;
  --linie: rgba(255, 255, 255, .3);   /* Trennlinien zwischen den Abschnitten (wie der dünne Strich auf der IHLE-CARD-Seite) */
  --flaeche: rgba(255, 255, 255, .1); /* leicht aufgehellte Flächen für Hinweise, kein Kasten */
  --feld-grund: #ffffff;       /* Eingabefelder bleiben weiß, Schrift darin dunkel */
  --feld-text: #1d1d1b;
  --feld-leise: #5c5c5c;
  --feldrand: #ffffff;
  --fehler: #ff8a80;           /* Meldungen auf dem dunklen Grund */
  --fehler-grund: #3a1715;
  --feld-fehler-grund: #fbeaea;/* fehlerhaftes Feld: zartes Rot im weißen Feld */
  --feld-fehler-rand: #b3261e;
  --ok: #81c784;
  --ok-grund: #16301a;
  --feld-ok-grund: #e8f3e9;    /* gescanntes Feld: zartes Grün im weißen Feld */
  --feld-ok-rand: #2e7d32;
  --radius: 0;
  --breite: 1148px;
  --schrift: "Adelle Light", Georgia, "Times New Roman", serif;
  --khand: Khand, "Arial Narrow", "Segoe UI", sans-serif;
  --schreib: "Hello Lucky", "Segoe Script", cursive;
  /* Hintergrund wie die IHLE-CARD-Seite www.ihle.work/ihlecard (dunkelgraue Struktur), nicht das Holz der übrigen Seiten */
  --hintergrund: url("/files/ihle/theme/images/bg-ihlecard.jpg");
  color-scheme: dark;   /* Seite ist dunkel: Browser-Elemente (Bildlaufleiste, Kästchen) passen sich an; die weißen Felder sagen es unten selbst */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font: 100%/1.5 var(--schrift); overflow-wrap: anywhere; }   /* 100 %: folgt der Schriftgröße des Systems */
/* Hintergrundbild wie auf ihle.work: fest im Sichtfenster, der Inhalt läuft darüber */
body::before { content: ""; position: fixed; left: 0; top: 0; width: 100%; height: 100vh; z-index: -1; background: var(--grund) var(--hintergrund) center top / cover no-repeat; }
a { color: var(--rot-text); }
[hidden] { display: none !important; }
strong, b { font-family: var(--khand); font-weight: 600; font-size: 1.06em; }

.demo-band { background: #ffc107; color: #2a1a0e; text-align: center; font-family: var(--khand); font-size: .95rem; font-weight: 600; padding: 4px 8px; }

/* ---------------------------------------------------------------- Kopf wie ihle.work
   rote Leiste mit Logo, darunter die Zackenkante; die bonVito-Links (Kontakt/Datenschutz/AGB) stehen am Handy
   als Zeile unter dem Kopf, am Desktop rechts in der roten Leiste (wie die Navigation auf ihle.work) */
.kopf { position: relative; }
.kopf-leiste { position: relative; background: var(--rot); color: #fff; }
/* Zackenkante direkt unter dem roten Balken, ragt 6 px in den Inhalt */
.kopf-leiste::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px; background: url("zacken.svg") repeat-x; pointer-events: none; }
.kopf-innen { max-width: var(--breite); margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.kopf img { display: block; width: auto; height: 42px; }
.reiter ul { max-width: var(--breite); margin: 0 auto; padding: 14px 12px 0; list-style: none; display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; align-items: center; }
.reiter a { display: block; text-align: center; padding: 4px 4px; color: #fff; text-decoration: none; font-family: var(--khand); font-weight: 600; font-size: 1.05rem; line-height: 1.2; overflow-wrap: normal; hyphens: manual; }
.reiter-titel { color: #fff; font-family: var(--khand); font-weight: 500; font-size: .95rem; }

main { max-width: var(--breite); margin: 0 auto; padding: 16px 16px 40px; }
/* Seitentitel: kleine Khand-Zeile und Schreibschrift, wie die Überschriften auf ihle.work */
/* kein Umbruch mitten im Wort (body erlaubt ihn für lange Adressen); auf schmalen Handys etwas kleiner statt „Kundenkont|o“ */
h1 { color: #fff; margin: 8px 0 6px; line-height: 1.05; font-family: var(--schreib); font-weight: 400; font-size: clamp(1.6rem, 12vw, 2.6rem); overflow-wrap: normal; hyphens: manual; }
h1 .kicker { display: block; font-family: var(--khand); font-weight: 700; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
h1:focus { outline: none; }
legend, .knopf, .knopf-zweit, label, .label, h2, .zeigen { font-family: var(--khand); }
.unterzeile { color: #fff; font-family: var(--khand); font-weight: 500; font-size: 1.15rem; line-height: 1.35; margin: 0 0 18px; }

/* Abschnitte ohne Kasten: nur eine dünne Linie darüber trennt sie (wie auf der IHLE-CARD-Seite) */
fieldset { margin: 0 0 24px; padding: 18px 0 0; background: none; border: 0; border-top: 1px solid var(--linie); border-radius: var(--radius); min-width: 0; }
/* Abschnittsüberschriften wie die Schritte auf der IHLE-CARD-Seite: rote Khand-Versalien auf weißem Pinselstrich (pinsel.svg,
   der Strich aus den Agentur-Grafiken). So heben sie sich von den weißen Feldnamen ab – ohne Kasten fehlte sonst jede Stufe. */
legend, .aufgabe .aufgabe-kopf h1, .aufgabe .aufgabe-kopf h2, .schon-registriert strong, .karte-hilfe h2, .fertig h1 {
  display: table; width: auto; max-width: 100%; margin: 0 0 12px; padding: .22em 1.15em .18em .75em; line-height: 1;   /* rechts mehr Luft: dort franst der Strich aus */
  color: var(--rot); font-family: var(--khand); font-weight: 700; text-transform: uppercase; letter-spacing: .01em;
  background: url("pinsel.svg") center / 100% 100% no-repeat;
}
legend { float: left; position: relative; font-size: 1.45rem; }
legend:has(.legend-zusatz) { margin-bottom: 32px; }   /* Platz für den Zusatz unter dem Strich */
legend + * { clear: both; }
/* Zusatz („freiwillig“) nicht auf dem Strich – dort franst er aus –, sondern klein und grau darunter */
.legend-zusatz { position: absolute; left: .75em; top: calc(100% + 3px); white-space: nowrap; font-family: var(--schrift); font-size: .85rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-leise); margin: 0; }

.feld { margin: 0 0 16px; min-width: 0; }
.feld > label, .feld > .label { display: block; font-weight: 600; font-size: 1.05rem; line-height: 1.2; margin: 0 0 5px; }
.pflicht { color: var(--rot-text); margin-left: 2px; }
.fussnote .pflicht { color: inherit; }   /* in der Fußnote bleibt das Sternchen weiß, das helle Rot wirkte dort zu laut */
/* Etikett über der Einwilligung (bonVito-Wortlaut bleibt unverändert dahinter) */
.freiw { display: block; width: fit-content; font-family: var(--khand); font-weight: 600; color: var(--text-leise); font-size: .85rem; line-height: 1.2;
  border: 1px solid var(--linie); border-radius: var(--radius); padding: 1px 8px; margin: 0 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], select {
  /* mind. 16 px (sonst zoomt das iPhone), wächst aber mit größerer Systemschrift mit; Khand wie im Kontaktformular auf ihle.work */
  width: 100%; min-width: 0; height: max(48px, 3em); padding: 0 12px; font: inherit; font-family: var(--khand); font-weight: 500; font-size: max(17px, 1.05rem); color: var(--feld-text);
  background: var(--feld-grund); border: 1px solid var(--feldrand); border-radius: var(--radius);
  appearance: none; -webkit-appearance: none;
  color-scheme: light;   /* weißes Feld: Datumswähler-Symbol und Auswahlliste des Browsers dazu passend hell */
}
::placeholder { color: var(--feld-leise); opacity: 1; }
input[type=date] { display: block; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231d1d1b' stroke-width='2' stroke-linecap='round' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; padding-right: 36px;
}
/* Fokus deckend, nicht halbtransparent: Felder stehen immer auf einer Fläche (Rot darauf ≥ 3:1); Knöpfe und Links
   liegen auch auf Rot und auf dem dunklen Grund – darum zweifarbig: innen Weiß, außen Rot, so ist auf jedem Grund ein Ring zu sehen */
input:focus, select:focus { outline: 3px solid var(--rot); outline-offset: 1px; border-color: var(--rot); }
button:focus-visible, summary:focus-visible, a:focus-visible, input[type=checkbox]:focus-visible { outline: 3px solid #fff; outline-offset: 0; box-shadow: 0 0 0 6px var(--rot); }
.fehlerhaft input, .fehlerhaft select { border-color: var(--feld-fehler-rand); background-color: var(--feld-fehler-grund); }
.meldung { font-size: .88rem; margin: 5px 0 0; color: var(--fehler); display: none; }
.fehlerhaft .meldung { display: block; }
.passt { font-size: .88rem; margin: 5px 0 0; color: var(--ok); display: none; }
.ok .passt { display: block; }

.reihe { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
.reihe > .feld { margin-bottom: 16px; }
.reihe-strasse { grid-template-columns: minmax(0, 1fr) 96px; }
.reihe-ort { grid-template-columns: 110px minmax(0, 1fr); }
.mobil { display: grid; gap: 8px; grid-template-columns: 104px minmax(0, 1fr); }
@media (min-width: 560px) { .reihe-name { grid-template-columns: 1fr 1fr; } }

.pw-feld { position: relative; }
.pw-feld input { padding-right: 96px; }
.zeigen { position: absolute; right: 6px; top: 6px; height: 36px; padding: 0 10px; border: 2px solid transparent; border-radius: var(--radius); background: #e6e6e6; color: var(--feld-text); font: inherit; font-family: var(--khand); font-size: .95rem; font-weight: 600; cursor: pointer; }
.regeln { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; font-size: .85rem; color: var(--text-leise); }
.regeln li::before { content: "○"; display: inline-block; width: 1.2em; }
.regeln li.erfuellt { color: var(--ok); }
.regeln li.erfuellt::before { content: "✓"; }

.hinweis { background: var(--flaeche); border-radius: var(--radius); padding: 12px 14px; font-size: .9rem; margin: 0 0 16px; }
.zeichen { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.zeichen b { font-family: Consolas, "Courier New", monospace; font-size: 1.1rem; background: var(--feld-grund); color: var(--feld-text); border-radius: var(--radius); padding: 0 6px; margin-right: 4px; }

/* Nebenknöpfe: weißer Rahmen auf dem dunklen Grund (Rot bleibt dem Hauptknopf vorbehalten, wie auf der IHLE-CARD-Seite) */
.knopf-zweit { height: 48px; padding: 0 16px; border-radius: var(--radius); border: 2px solid #fff; background: transparent; color: #fff; font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.captcha { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px; align-items: center; }
.captcha-bild { height: max(48px, 3rem); border-radius: var(--radius); border: 1px solid var(--linie); background: #fff; cursor: pointer; padding: 0; overflow: hidden; display: grid; place-items: center; }
.captcha-bild img { width: 100%; height: 100%; object-fit: contain; display: block; }
.captcha-tipp { font-size: .82rem; color: var(--text-leise); margin: 5px 0 0; }
/* Kartennummer: Scannen ist der Hauptweg, Abtippen die Ausweichmöglichkeit */
/* Scannen gehört zur Kartennummer: Rahmenknopf direkt unter dem Feld, kein zweiter Hauptknopf */
.knopf-scan { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 8px 0 0; }
input.kartennummer { font-family: Consolas, "Courier New", monospace; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; font-size: max(16px, 1rem); }   /* mind. 16 px: sonst zoomt das iPhone beim Antippen */
.erkannt { margin: 6px 0 0; font-size: .9rem; font-weight: 600; color: var(--ok); }
.erkannt:empty { display: none; }
.feld.gescannt input { border-color: var(--feld-ok-rand); background-color: var(--feld-ok-grund); }
.zeichenhilfe { margin-top: 8px; }
.zeichenhilfe .hinweis { margin: 8px 0 0; }

/* Scanner über die ganze Seite */
.scanner { position: fixed; inset: 0; z-index: 50; background: #000; color: #fff; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-rahmen { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.scanner-rahmen span {
  /* Quer gehaltenes Handy: Rahmen so klein, dass er zwischen Text oben und Knöpfe unten passt */
  width: min(84vw, 520px, calc((100vh - 200px) * 85.6 / 54)); aspect-ratio: 85.6 / 54; border-radius: 14px;
  border: 3px solid rgba(255,255,255,.95); box-shadow: 0 0 0 100vmax rgba(0,0,0,.5);
}
.scanner.treffer .scanner-rahmen span { border-color: #4caf50; }
.scanner-oben, .scanner-unten { position: absolute; left: 0; right: 0; padding: 16px; text-align: center; }
.scanner-oben { top: 0; padding-top: max(16px, env(safe-area-inset-top)); }
.scanner-oben p { margin: 0; font-family: var(--khand); font-weight: 600; font-size: 1.15rem; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scanner-unten { bottom: 0; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.scanner-status { margin: 0 0 12px; font-size: .95rem; min-height: 1.5em; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scanner-knoepfe { display: flex; gap: 10px; justify-content: center; }
.scanner .knopf-zweit { background: rgba(255,255,255,.92); color: #2a1a0e; border-color: transparent; min-width: 120px; }
.scanner .knopf-zweit[aria-pressed="true"] { background: #ffc107; }

/* Einwilligungen: Kurzfassung sichtbar, bonVito-Volltext wortgleich zum Aufklappen */
.zustimmung { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--linie); }
.zustimmung:first-of-type { border-top: 0; padding-top: 0; }
.zustimmung input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--rot); }
.zustimmung label { font-family: var(--schrift); font-size: .95rem; }
.zustimmung.fehlerhaft label { color: var(--fehler); }
.zustimmung .erklaerung { font-size: .88rem; color: var(--text-leise); margin: 4px 0 0; }
details { margin-top: 6px; font-size: .88rem; color: var(--text-leise); }
summary { cursor: pointer; color: var(--text); font-family: var(--khand); font-weight: 600; font-size: 1rem; }
details p { margin: 8px 0 0; }

.knopf {
  /* Rahmen unsichtbar, aber vorhanden: Im Hochkontrastmodus fällt der Hintergrund weg, der Rahmen zeigt dann den Knopf */
  width: 100%; height: 52px; border: 2px solid transparent; border-radius: var(--radius); background: var(--rot); color: #fff;
  font-size: 1.3rem; font-weight: 600; cursor: pointer;
}
/* Hover nur mit Maus: Auf Touch-Geräten bliebe der Zustand nach dem Antippen hängen */
@media (hover: hover) {
  .reiter a:hover, footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
  .knopf-zweit:hover { background: #fff; color: var(--dunkel); }
  .scanner .knopf-zweit:hover { background: #fff; color: #2a1a0e; }
  .knopf:hover { background: var(--rot-dunkel); }
}
.knopf[disabled] { opacity: .65; cursor: progress; }
.zurueck { background: none; border: 0; padding: 8px 0; margin: 0 0 2px; color: #fff; font: inherit; font-family: var(--khand); font-weight: 600; font-size: 1.05rem; cursor: pointer; }
.fussnote { font-size: .85rem; color: var(--text-leise); margin: 12px 0 0; text-align: center; }

.fehlerbox { background: var(--fehler-grund); color: var(--fehler); border-radius: var(--radius); padding: 12px 14px; margin: 0 0 18px; font-weight: 600; }
.fehlerbox button { display: block; margin-top: 10px; }
.fehlerbox ul { margin: 8px 0 0; padding-left: 20px; }
.fehlerbox .allgemein { margin: 0 0 8px; }
.fehlerbox li { margin: 4px 0; }
.fehlerbox .zum-feld { display: block; margin: 0; padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Abschluss: ohne Kasten, Überschrift in Khand (die Schreibschrift bleibt dem Seitentitel vorbehalten) */
.fertig { padding: 8px 0 24px; }
.fertig h1 { font-size: 1.8rem; margin: 0 0 14px; }
.fertig .haken { width: 64px; height: 64px; border-radius: 50%; background: var(--feld-ok-rand); color: #fff; display: grid; place-items: center; margin: 0 0 14px; }
.fertig #zum-login { width: 100%; justify-content: center; }
.it { text-align: left; }
.it pre { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px; font-size: .8rem; overflow-x: auto; white-space: pre; color: var(--text); }

/* Fuß wie ihle.work: dunkler Streifen, Logo in der Mitte, Links in Khand */
footer { background: var(--dunkel); color: rgba(255,255,255,.85); padding: 36px 16px 28px; font-size: .85rem; text-align: center; }
footer .fuss-innen { max-width: var(--breite); margin: 0 auto; }
footer .fuss-logo { display: block; width: auto; height: 48px; margin: 0 auto 22px; }
footer p { margin: 10px 0 0; }
footer a { color: #fff; font-family: var(--khand); font-weight: 600; font-size: 1.05rem; margin-left: 10px; white-space: nowrap; text-decoration: none; }
footer .copyright { margin-top: 22px; font-family: var(--khand); font-weight: 600; color: #fff; font-size: .95rem; }

/* Startseite in drei Rollen, alle direkt auf dem Grund:
   Information (bonVito) = Khand-Zeile · Nebenweg (Schon registriert?) = schmaler Streifen zwischen zwei Linien · Hauptaufgabe = der Rest */
/* Hinweis zurückhaltend (Fließtext in Grau), nur der erste Satz weiß – er soll nicht mit den Überschriften konkurrieren */
.bonvito-hinweis { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 20px; color: var(--text-leise); font-size: .95rem; line-height: 1.45; }
.bonvito-hinweis strong { color: #fff; font-weight: 600; font-size: 1.06em; }
.bonvito-hinweis svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--text-leise); }
.schon-registriert { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); padding: 16px 0; margin: 0 0 28px; }
.schon-registriert p { margin: 0; flex: 1 1 200px; font-size: .95rem; }
.schon-registriert strong { font-size: 1.25rem; margin-bottom: 8px; }
.schon-registriert .knopf-zweit { flex: 0 0 auto; height: 42px; font-size: 1rem; }

.aufgabe { padding: 0; }
.aufgabe-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; margin: 0 0 4px; }
/* Überschrift der Aufgabe in Khand; der Seitentitel (h1 oben) bleibt in Schreibschrift */
.aufgabe .aufgabe-kopf h1, .aufgabe .aufgabe-kopf h2 { font-size: 1.8rem; margin: 0 0 10px; }
.aufgabe .unterzeile { color: var(--text-leise); font-family: var(--schrift); font-weight: 400; font-size: 1rem; }
.unterzeile .kartennr { color: #fff; }
.schritt-nr { font-family: var(--khand); font-size: .95rem; font-weight: 600; color: var(--text-leise); }
/* Fußzeile des Blocks: ganz unten, über die ganze Breite */
.schritt-unten { margin: 22px 0 0; padding-top: 12px; border-top: 1px solid var(--linie); }
#s-daten > .schritt-unten { margin-top: 16px; }
.kartennr { font-family: Consolas, "Courier New", monospace; overflow-wrap: normal; color: var(--text); }
.captcha-tipp.hervor { color: var(--fehler); font-weight: 600; }

/* Abschluss: die nächsten Schritte (echte Reihenfolge, daher nummeriert) */
.fertig-text { margin: 0 0 18px; }
.naechste { list-style: none; counter-reset: schritt; margin: 0 0 22px; padding: 0; max-width: 520px; text-align: left; }
.naechste li { counter-increment: schritt; position: relative; padding: 0 0 16px 50px; }
.naechste li::before { content: counter(schritt); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--rot); color: #fff; display: grid; place-items: center; font-family: var(--khand); font-weight: 700; font-size: 1.15rem; }
.naechste strong { display: block; font-size: 1.15rem; }
.naechste span { display: block; color: var(--text-leise); font-size: .92rem; }
.naechste b { color: var(--text); overflow-wrap: anywhere; font-family: inherit; font-size: inherit; font-weight: 700; }
.knopf-link { display: inline-flex; align-items: center; text-decoration: none; }

@media (prefers-reduced-motion: no-preference) { .schritt { animation: rein .18s ease-out; } }
@keyframes rein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Kartenrückseite (echtes Foto mit Beispielnummer) und Markierungen darüber – die Karte selbst bleibt rund */
.karte-hinten { display: block; position: relative; border-radius: 3.7% / 5.9%; overflow: hidden; line-height: 0; }
.karte-hinten img { display: block; width: 100%; height: auto; }
.karte-hinten svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.karte-hinten .markierung { fill: rgba(212, 19, 23, .10); stroke: #d41317; stroke-width: 8; }
.karte-hinten .markierung-nicht { fill: none; stroke: #6b5d52; stroke-width: 6; stroke-dasharray: 18 12; }
.karte-hinten-klein { max-width: 320px; margin: 4px 0 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }

.karte-hilfe { display: none; }

/* ---------------------------------------------------------------- Desktop
   Gleiche Farben, Schrift und Begriffe wie am Handy, aber die Breite wird genutzt:
   bonVito-Links rechts in der roten Leiste, Kartenschritt mit Abbildung, Datenschritt zweispaltig, Knopf in normaler Breite. */
@media (min-width: 900px) {
  .kopf-innen { padding: 14px 16px; }
  .kopf img { height: 60px; }
  /* Links in die rote Leiste (rechts, wie die Navigation auf ihle.work) – ohne das HTML zu verdoppeln */
  .reiter { position: absolute; top: 0; right: max(16px, calc((100% - var(--breite)) / 2 + 16px)); height: 88px; display: flex; align-items: center; }
  .reiter ul { display: flex; gap: 6px; padding: 0; align-items: center; }
  .reiter a { padding: 6px 10px; font-size: 1.5rem; font-weight: 700; }
  .reiter-titel { font-size: 1.05rem; margin-right: 4px; }
  main { padding: 36px 16px 64px; }

  h1 { font-size: 4.4rem; margin: 10px 0 8px; }
  h1 .kicker { font-size: 1.4rem; margin-bottom: 0; }
  .unterzeile { max-width: 62ch; font-size: 1.45rem; }

  .bonvito-hinweis { max-width: 78ch; font-size: 1.35rem; line-height: 1.35; gap: 12px; margin: 0 0 24px; }
  .bonvito-hinweis svg { width: 26px; height: 26px; margin-top: 4px; }
  .schon-registriert { padding: 20px 0; margin-bottom: 36px; }
  .schon-registriert p { font-size: 1.05rem; }
  .schon-registriert strong { font-size: 1.4rem; }
  .aufgabe-kopf { margin-bottom: 6px; }
  .aufgabe .aufgabe-kopf h1, .aufgabe .aufgabe-kopf h2 { font-size: 2.1rem; }
  .aufgabe .unterzeile { font-size: 1.05rem; }
  .schritt-nr { font-size: 1rem; }

  /* Kartenschritt: Formular und Kartenabbildung nebeneinander im Block */
  .karte-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 56px; align-items: start; }
  .karte-formular .knopf { width: auto; min-width: 240px; padding: 0 40px; }
  .karte-hilfe { display: block; }
  .karte-hilfe h2 { font-size: 1.45rem; margin: 4px 0 12px; }
  .karten-stapel { position: relative; aspect-ratio: 400 / 310; margin: 34px 0 18px; }
  .karte-vorne { position: absolute; left: 0; top: 0; width: 64%; height: auto; transform: rotate(-6deg); transform-origin: top left;
    border-radius: 3.7% / 5.9%; box-shadow: 0 8px 22px rgba(0, 0, 0, .22); }
  .karten-stapel .karte-hinten { position: absolute; right: 0; bottom: 0; width: 88%; transform: rotate(1.5deg);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45); border-radius: 3.7% / 5.9%; }
  .karte-hilfe .rot { color: var(--rot-text); font-family: var(--khand); font-weight: 600; font-size: 1.06em; }
  .karte-hilfe p { margin: 0 0 10px; }
  .karte-hilfe .leise { color: var(--text-leise); font-size: .92rem; }
  .captcha { grid-template-columns: 160px minmax(0, 220px); }
  /* Kartennummer nur so breit wie die 31 Zeichen – bündig mit der Code-Zeile (160 + 10 + 220 px) */
  input.kartennummer { max-width: 390px; }
  .zeichenhilfe { display: none; }   /* steht am Desktop ausführlicher rechts neben dem Formular */

  /* Datenschritt */
  /* links das Notwendige (Zugangsdaten, AGB), rechts das Freiwillige – am Handy bleibt die Reihenfolge der Seite */
  .daten-raster { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "zugang persoenlich" "einwilligung persoenlich"; gap: 20px; align-items: start; margin-bottom: 24px; }
  .bereich-zugang { grid-area: zugang; }
  .bereich-persoenlich { grid-area: persoenlich; }
  .bereich-einwilligung { grid-area: einwilligung; }
  .daten-raster fieldset { margin: 0; padding: 20px 0 0; }
  legend { font-size: 1.7rem; }
  .reihe-name { grid-template-columns: 1fr 1fr; }
  .absenden-zeile { display: flex; align-items: center; gap: 24px; }
  .absenden-zeile .knopf { width: auto; min-width: 260px; padding: 0 44px; flex: none; }
  .absenden-zeile .fussnote { text-align: left; margin: 0; color: rgba(255,255,255,.85); }

  .fertig { max-width: 720px; margin: 0 auto; padding: 16px 0 40px; }
  .fertig h1 { font-size: 2.1rem; }
  .fertig #zum-login { width: auto; padding: 0 28px; }
  footer { padding: 48px 16px 36px; }
  footer .fuss-logo { height: 60px; }
}
/* Am Handy steht die Fußnote unter dem Knopf */
@media (max-width: 899px) { .absenden-zeile .fussnote { color: rgba(255,255,255,.85); } }

/* Sehr schmale Handys: Kartennummer ohne Sperrung, damit die 31 Zeichen hineinpassen */
@media (max-width: 360px) { input.kartennummer { letter-spacing: 0; padding: 0 6px; } }
/* Kleine Handys (z. B. iPhone SE, 320 px): schmalerer Seitenrand, sonst passen die 31 Zeichen nicht ins Feld */
@media (max-width: 359px) {
  main { padding-left: 12px; padding-right: 12px; }
  legend { font-size: 1.25rem; }   /* „Persönliche Angaben“ auf dem Pinselstrich soll einzeilig bleiben */
  .reiter a { font-size: 1rem; }
}
/* Extrem schmal (z. B. 200 % Zoom oder Bildschirmlupe): alles untereinander statt nebeneinander */
@media (max-width: 300px) {
  .captcha, .mobil, .reihe-ort, .reihe-strasse { grid-template-columns: minmax(0, 1fr); }
  main { padding-left: 10px; padding-right: 10px; }
  .reiter-titel { display: none; }
  .reiter ul { grid-template-columns: repeat(3, auto); padding: 8px 8px 0; }
  .kopf img { height: 34px; }
  h1 { overflow-wrap: anywhere; }   /* lieber ein Umbruch im Wort als seitliches Scrollen */
}
/* Scanner quer: Leisten oben und unten flacher, damit für den Rahmen Platz bleibt */
@media (orientation: landscape) and (max-height: 500px) {
  .scanner-oben { padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
  .scanner-oben p { font-size: .95rem; }
  .scanner-unten { padding: 8px 16px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .scanner-status { margin-bottom: 6px; font-size: .85rem; }
}
/* Druck (z. B. die Abschlussseite): Browser lassen Hintergründe weg – weißer Text auf Weiß wäre dann unsichtbar */
@media print {
  body::before, .reiter, .demo-band, .scanner, .zurueck, .knopf, .knopf-zweit { display: none !important; }
  .kopf-leiste { background: none; }
  .kopf-leiste::after { display: none; }
  body, h1, h1 .kicker, .unterzeile, .unterzeile .kartennr, .bonvito-hinweis, .bonvito-hinweis strong, .bonvito-hinweis svg, .fussnote, .absenden-zeile .fussnote, #s-daten > .schritt-unten,
  footer, footer a, footer .copyright { color: #000 !important; background: none !important; }
  fieldset, .aufgabe, .schon-registriert, .fertig { border: 1px solid #999; }
}
