/* ==========================================================
   QR-Vorerfassung – Schritt für Schritt, iPhone zuerst
   Basis fischers-lagerhaus.de (Montserrat, Schiefergrau, eckig),
   kontrastreicher mit Grautönen
   ========================================================== */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/montserrat-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/montserrat-700.woff2") format("woff2"); }

:root {
    --anthrazit: #22282d;      /* Kopf, Buttons, Auswahl */
    --schiefer: #414c5c;       /* Hausfarbe Shop */
    --text: #1d2226;
    --text-2: #4f5861;
    --text-3: #7d858e;
    --grund: #e4e7ea;          /* Seitenhintergrund */
    --feld: #eef0f2;           /* Eingabefelder */
    --feld-hover: #e6e9ec;
    --linie: #c5cbd2;
    --linie-hell: #d9dde2;
    --weiss: #ffffff;
    --ok: #2f7d55;
    --ok-hell: #e3f1e9;
    --fehler: #b8452a;
    --fehler-hell: #f9ebe6;
    --schrift: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --schatten: 0 1px 2px rgba(20,24,28,0.06), 0 8px 24px rgba(20,24,28,0.08);
    --unten: env(safe-area-inset-bottom);
    color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--grund);
    color: var(--text);
    font: 400 16px/1.5 var(--schrift);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--schiefer); }

/* ---------- Testleiste ---------- */
.testleiste {
    background: #f4d35e;
    color: #3d3100;
    padding: calc(6px + env(safe-area-inset-top)) 16px 6px;
    font-size: 13px;
}
.testleiste form { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; }
.testleiste label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; }
.testleiste select {
    flex: 1; min-height: 36px; padding: 0 10px;
    font: 500 16px var(--schrift); color: var(--text);
    background: rgba(255,255,255,0.7); border: 0; border-radius: 0;
}

/* ---------- Kopf ---------- */
.kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: var(--anthrazit);
}
body > .kopf:first-child { padding-top: calc(16px + env(safe-area-inset-top)); }
.logo {
    display: block;
    width: 150px;
    height: auto;
    filter: brightness(0) invert(1);   /* graues Logo -> weiß auf Anthrazit */
}
.kopf-filiale {
    color: #c9ced4;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: right;
}

/* ---------- Fortschritt ---------- */
.fortschritt {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 12px 20px 10px;
    padding-top: calc(12px + env(safe-area-inset-top));
    background: rgba(228,231,234,0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.kopf + .fortschritt { padding-top: 12px; }
.fortschritt-segmente { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; max-width: 560px; margin: 0 auto; }
.fortschritt-segmente span { height: 4px; background: var(--linie); transition: background 0.3s; }
.fortschritt-segmente span.fertig { background: var(--schiefer); }
.fortschritt-segmente span.aktiv { background: var(--anthrazit); }
.fortschritt-text {
    max-width: 560px; margin: 8px auto 0;
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-2);
}

/* ---------- Inhalt ---------- */
main {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px 24px;
}
.block, .schritt {
    background: var(--weiss);
    padding: 28px 22px 30px;
    box-shadow: var(--schatten);
}
.wizard.bereit .schritt { display: none; }
.wizard.bereit .schritt.aktiv { display: grid; }
.wizard:not(.bereit) .schritt:not([data-schritt="0"]) { display: none; }  /* bis JS bereit ist */
.schritt { display: grid; gap: 22px; }
.schritt.rein-vor { animation: rein-rechts 0.32s cubic-bezier(.2,.8,.2,1); }
.schritt.rein-zurueck { animation: rein-links 0.32s cubic-bezier(.2,.8,.2,1); }
@keyframes rein-rechts { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes rein-links { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .schritt.rein-vor, .schritt.rein-zurueck, .wackeln { animation: none !important; } }

.wizard.bereit .schritt:not(.schritt-start) .eyebrow { display: none; }   /* steht schon in der Fortschrittsleiste */
.eyebrow {
    margin: 0 0 -14px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-3);
}
h1, h2 { font-family: var(--schrift); font-weight: 700; color: var(--text); margin: 0; letter-spacing: -0.01em; outline: none; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 26px; line-height: 1.2; }
.lead { margin: 0; font-size: 16px; color: var(--text-2); }
.optional {
    margin-left: 6px; padding: 1px 6px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-3); background: var(--feld);
}
.pflicht .bedingt-aus { display: none; }
.versteckt { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Start: Ablauf */
.schritt-start { gap: 20px; }
.wizard.bereit .schritt-start { cursor: pointer; -webkit-tap-highlight-color: transparent; }   /* Tipp auf die Karte = „Los geht's“ (app.js) */
/* Ablauf auf der Startseite: Ziffernblöcke wie bis 02.10.26 (Tipp auf die Karte startet, app.js) */
.ablauf { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--linie-hell); }
.ablauf li {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid var(--linie-hell);
    font-weight: 500;
}
.ablauf span {
    width: 30px; height: 30px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--anthrazit); color: #fff; font-size: 13px; font-weight: 700;
}
.start-hinweis { margin: -8px 0 0; font-size: 16px; color: var(--text); }

/* ---------- Felder ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.feld { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.feld > label, .feld > legend, .frage > legend {
    padding: 0;
    font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-2);
}
.feld > legend { margin-bottom: 8px; }
input:not([type=radio]):not([type=checkbox]), select {
    width: 100%;
    min-height: 56px;
    padding: 0 16px;
    font: 500 18px var(--schrift);          /* >= 16px: iOS zoomt nicht */
    color: var(--text);
    background: var(--feld);
    border: 0;
    border-bottom: 2px solid var(--linie);
    border-radius: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: #a2a9b1; font-weight: 400; }
input:focus, select:focus {
    background: var(--weiss);
    border-bottom-color: var(--anthrazit);
    box-shadow: inset 0 0 0 2px var(--anthrazit);
}
input.auto { background: var(--ok-hell); }
select {
    background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
    background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
}
.reihe { display: grid; gap: 12px; }
.reihe-strasse { grid-template-columns: 1fr 5.5em; }
.reihe-plz { grid-template-columns: 7em 1fr; }

/* Geburtsdatum */
.geb-eingabe { display: flex; align-items: center; gap: 8px; }
.geb-eingabe span { font-size: 22px; font-weight: 700; color: var(--text-3); }
.geb-eingabe input { text-align: center; font-size: 22px; letter-spacing: 0.06em; padding: 0 6px; }
#geb_tt, #geb_mm { width: 4em; }
#geb_jjjj { width: 5.6em; }
.info { margin: 0; min-height: 1.3em; font-size: 14px; font-weight: 500; color: var(--text-3); }
.info.ok { color: var(--ok); }
.info.ok::before { content: "✓ "; font-weight: 700; }
.info.fehler { color: var(--fehler); }

/* ---------- Auswahl (Anrede, Ja/Nein) ---------- */
.frage { display: grid; gap: 10px; }
.frage > legend { margin-bottom: 10px; font-size: 17px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--text); }
.hinweis { margin: -4px 0 2px; font-size: 14px; color: var(--text-2); }
.wahl { display: grid; gap: 10px; }
.wahl-2 { grid-template-columns: 1fr 1fr; }
.option {
    position: relative;
    display: flex; align-items: center; gap: 12px;
    min-height: 60px; padding: 0 16px;
    background: var(--feld);
    border: 2px solid transparent;
    font-weight: 500; font-size: 17px;
    cursor: pointer;
    user-select: none; -webkit-user-select: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.option:active { transform: scale(0.98); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option-kompakt { justify-content: center; min-height: 56px; padding: 0 10px; text-align: center; font-size: 16px; line-height: 1.2; }
.option:has(input:checked) { background: var(--anthrazit); border-color: var(--anthrazit); color: #fff; }
.option:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--linie); }
.box {
    width: 24px; height: 24px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--weiss);
    border: 2px solid #8b939c;
}
input:checked + .box { background: var(--weiss); border-color: var(--weiss); }
input:checked + .box::after {
    content: "";
    width: 6px; height: 12px;
    border: solid var(--anthrazit); border-width: 0 3px 3px 0;
    transform: translateY(-2px) rotate(45deg);
}

/* Zustimmung Datenschutz */
.zustimmung {
    position: relative;
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px;
    background: var(--feld);
    border: 2px solid transparent;
    font-size: 15px; line-height: 1.45;
    cursor: pointer;
}
.zustimmung input { position: absolute; opacity: 0; }
.zustimmung input:checked + .box { background: var(--anthrazit); border-color: var(--anthrazit); }
.zustimmung input:checked + .box::after { border-color: #fff; }
.zustimmung:has(input:checked) { border-color: var(--anthrazit); background: var(--weiss); }

/* PLZ-Vorschläge */
.vorschlaege { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -10px; }
.chip {
    min-height: 44px; padding: 0 16px;
    border: 0; background: var(--anthrazit); color: #fff;
    font: 500 15px var(--schrift);
}

/* ---------- Übersicht ---------- */
.zusammenfassung { display: grid; gap: 0; border-top: 2px solid var(--anthrazit); }
.zf-gruppe { padding: 14px 0; border-bottom: 1px solid var(--linie-hell); }
.zf-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.zf-kopf span { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.zf-gruppe p { margin: 0; font-weight: 500; }
.zf-aendern {
    padding: 6px 10px; border: 0; background: var(--feld); color: var(--text);
    font: 700 12px var(--schrift); letter-spacing: 0.04em; cursor: pointer;
}

/* ---------- Fehler ---------- */
.fehlerbox {
    margin-bottom: 16px; padding: 14px 16px;
    background: var(--fehler-hell); color: var(--fehler);
    border-left: 4px solid var(--fehler);
    font-weight: 500;
}
.fehlertext { margin: 0; color: var(--fehler); font-size: 14px; font-weight: 500; }
.fehlertext::before { content: "! "; font-weight: 700; }
.hat-fehler input:not([type=radio]):not([type=checkbox]) { border-bottom-color: var(--fehler); background: var(--fehler-hell); }
.hat-fehler .option:not(:has(input:checked)) { border-color: var(--fehler); }
.zustimmung.hat-fehler { border-color: var(--fehler); background: var(--fehler-hell); }
/* Fehlermeldung (app.js hängt sie ans Feld an) als eigene Zeile unter dem Text, nicht als dritte Spalte daneben */
.zustimmung { flex-wrap: wrap; }
.zustimmung > span:last-of-type { flex: 1; min-width: 0; }
.zustimmung .fehlertext { flex-basis: 100%; margin: 0; padding-left: 38px; }   /* 24 px Kästchen + 14 px Abstand */
.wackeln { animation: wackeln 0.35s; }
@keyframes wackeln { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- Steuerung unten ---------- */
.steuerung {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 10;
    display: flex;
    gap: 10px;
    padding: 12px max(16px, calc((100% - 568px) / 2)) calc(12px + var(--unten));
    background: rgba(255,255,255,0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 -1px 0 var(--linie-hell), 0 -8px 24px rgba(20,24,28,0.06);
}
.zurueck, .weiter, .senden {
    min-height: 58px;
    border: 0; border-radius: 0;
    font: 700 17px var(--schrift);
    cursor: pointer;
    -webkit-appearance: none;
    transition: background 0.15s, transform 0.1s;
}
.zurueck:active, .weiter:active, .senden:active { transform: scale(0.98); }
.zurueck {
    width: 58px; flex-shrink: 0;
    background: var(--feld); color: var(--text); font-size: 22px;
}
.weiter, .senden {
    flex: 1;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 22px;
    background: var(--anthrazit); color: #fff;
}
.senden { justify-content: center; background: var(--schiefer); }
.weiter:active, .senden:active { background: #000; }
.senden:disabled { opacity: 0.7; }

/* ---------- Meldungen / Danke / Standortauswahl ---------- */
.block { display: grid; gap: 16px; }
.meldung { text-align: center; }
.meldung p { margin: 0; }
.danke .eyebrow { margin: 0 0 -10px; }
.haken {
    width: 72px; height: 72px; margin: 0 auto 4px;
    background: var(--anthrazit);
    display: flex; align-items: center; justify-content: center;
    animation: plopp 0.45s cubic-bezier(.2,1.4,.4,1);
}
.haken::after {
    content: ""; width: 14px; height: 28px;
    border: solid #fff; border-width: 0 5px 5px 0;
    transform: translateY(-4px) rotate(45deg);
}
@keyframes plopp { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.code-karte {
    display: grid; gap: 6px;
    margin: 6px 0;
    padding: 20px 16px 22px;
    background: var(--anthrazit); color: #fff;
}
.code-titel { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #aeb5bd; }
.code { font-size: 42px; font-weight: 700; letter-spacing: 0.22em; padding-left: 0.22em; }
.naechste { list-style: none; counter-reset: n; margin: 0; padding: 0; text-align: left; border-top: 1px solid var(--linie-hell); }
.naechste li { counter-increment: n; display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linie-hell); font-weight: 500; }
.naechste li::before {
    content: counter(n);
    width: 28px; height: 28px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--feld); font-weight: 700; font-size: 13px;
}
.knopf-zweit {
    display: inline-block; justify-self: center; margin-top: 8px; padding: 14px 22px;
    background: var(--feld); color: var(--text); text-decoration: none; font-weight: 700;
}
.standortliste { display: grid; gap: 0; border-top: 1px solid var(--linie-hell); }
.standortlink {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 54px; padding: 0 4px;
    border-bottom: 1px solid var(--linie-hell);
    color: var(--text); text-decoration: none; font-weight: 500;
}
.standortlink span { color: var(--text-3); }
.standortlink:active { background: var(--feld); }

/* ---------- Fuß ---------- */
.fuss {
    display: flex; justify-content: center; gap: 22px;
    padding: 0 16px 24px;
    font-size: 12px;
}
.fuss a { color: var(--text-2); }
body.seite-formular .fuss { padding-bottom: calc(100px + var(--unten)); }

/* Etwas größere Bildschirme */
@media (min-width: 600px) {
    main { padding-top: 36px; }
    .block, .schritt { padding: 40px 40px 44px; }
    h1 { font-size: 34px; }
    h2 { font-size: 28px; }
}
