/* Vertrag widerrufen als Ablauf wie in der App: ein Bildschirm je Frage, Fortschritt oben, Knopf als feste Leiste unten.
   Am Telefon füllt der Ablauf den sichtbaren Bereich (auch über der Tastatur, Höhe aus visualViewport in widerruf.js),
   am Rechner steht er als Karte in Telefonbreite unter der Wortmarke. */
html, body.ablauf-seite { height: 100%; }
body.ablauf-seite { display: block; min-height: 0; overflow: hidden; overscroll-behavior: none; }
.ablauf { position: fixed; left: 0; top: 0; width: 100%; height: var(--hoehe, 100svh); display: flex; flex-direction: column; transform: translateY(var(--oben, 0px)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nb { white-space: nowrap; }
.ablauf a, .ablauf button, .ablauf label { -webkit-tap-highlight-color: transparent; }

.ab-kopf { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 0; min-height: 56px; }
.ab-titel { font: 500 15px/1.2 var(--claim); text-align: center; color: rgba(244, 242, 236, .8); letter-spacing: 0; margin: 0; }
.ab-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; color: var(--licht); }
.ab-icon svg { width: 24px; height: 24px; }
.ab-icon:hover { background: rgba(244, 242, 236, .08); }
.ab-icon:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.ab-icon.weg { visibility: hidden; }
.ab-fortschritt { display: flex; gap: 4px; padding: 6px 24px 0; }
.ab-fortschritt span { flex: 1; height: 3px; border-radius: 2px; background: rgba(244, 242, 236, .16); transition: background-color .25s ease-out; }
.ab-fortschritt span.an { background: var(--licht); }

/* Schritte liegen übereinander und blenden ineinander über */
.ab-form { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.ab-schritt { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; padding: 28px 24px 16px; overflow-y: auto; }
.ab-schritt[hidden] { display: none; }
/* läuft ein Schritt über, endet er unten weich statt hart */
.ab-schritt.mehr { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 40px), transparent); }
.ab-schritt h2 { font: 700 clamp(26px, 7.4vw, 32px)/1.15 var(--claim); letter-spacing: -.01em; text-wrap: balance; outline: none; margin: 0; }
.ab-text { color: rgba(244, 242, 236, .78); font-size: 16px; line-height: 1.5; text-wrap: pretty; margin: 0; }
.ab-label { display: block; font: 500 15px/1.3 var(--claim); color: var(--licht); margin: 8px 0 -4px; }

/* feste Leiste unten: Hinweis über dem Knopf, der Knopf steht in jedem Schritt an derselben Stelle */
.ab-leiste { display: flex; flex-direction: column; gap: 12px; padding: 12px 24px calc(env(safe-area-inset-bottom, 0px) + 20px); }
.ab-hinweis { font-size: 14px; line-height: 1.45; color: rgba(244, 242, 236, .6); text-align: center; margin: 0; text-wrap: pretty; }
.ab-hinweis[hidden] { display: none; }
.ab-hinweis a, .ab-text a { color: rgba(244, 242, 236, .85); }
.ab-text[data-feld="weiter"] { white-space: pre-line; }
.ab-wege { display: flex; flex-direction: column; align-items: flex-start; margin-top: -6px; }
.ab-wege a { display: inline-flex; align-items: center; min-height: 44px; color: var(--licht); font-size: 16px; font-weight: 500; text-underline-offset: 3px; text-decoration-color: rgba(244, 242, 236, .45); }
.ab-leiste .knopf { width: 100%; justify-content: center; min-height: 56px; border: 0; font: 600 17px/1 var(--claim); cursor: pointer; }
.ab-leiste .knopf:disabled { opacity: .55; cursor: progress; }
.knopf:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

.ab-eingabe { width: 100%; height: 58px; border-radius: 16px; border: 1px solid rgba(244, 242, 236, .35); background: rgba(244, 242, 236, .06); color: var(--licht); font: 400 18px/1 var(--claim); padding: 0 18px; color-scheme: dark; -webkit-appearance: none; appearance: none; margin-top: 4px; }
.ab-eingabe::placeholder { color: rgba(244, 242, 236, .42); }
.ab-eingabe:focus { outline: none; border-color: var(--licht); box-shadow: 0 0 0 1px var(--licht); }
.ab-eingabe[type="date"]::-webkit-date-and-time-value { text-align: left; }
.ab-eingabe[aria-invalid="true"] { border-color: #F2A08F; }
.ab-fehler { color: #F5B3A5; font-size: 15px; margin: 0; }
.ab-fehler[hidden] { display: none; }
.ab-leiste .ab-fehler { text-align: center; }

/* große Wahl (Store) und kleine Wahl (Chips) */
.ab-wahl { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.ab-wahl label, .ab-chips-wahl label { position: relative; }
.ab-wahl input, .ab-chips-wahl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ab-wahl span { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 76px; padding: 0 20px; border-radius: 18px; border: 1px solid rgba(244, 242, 236, .35); background: rgba(244, 242, 236, .05); transition: background-color .2s ease-out, border-color .2s ease-out; }
.ab-wahl b { font-weight: 700; font-size: 18px; }
.ab-wahl small { font-size: 14px; color: rgba(244, 242, 236, .62); }
.ab-wahl input:checked + span, .ab-chips-wahl input:checked + span { border-color: var(--licht); background: rgba(244, 242, 236, .14); }
.ab-wahl input:focus-visible + span, .ab-chips-wahl input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.ab-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.ab-chips button, .ab-chips-wahl span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(244, 242, 236, .35); background: rgba(244, 242, 236, .05); color: var(--licht); font: 500 15px/1 var(--claim); cursor: pointer; }
.ab-chips button.an { border-color: var(--licht); background: rgba(244, 242, 236, .14); }
.ab-chips button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Zusammenfassung: Bezeichnung über dem Wert, „Ändern“ rechts mittig */
.ab-liste { display: flex; flex-direction: column; margin: 0; border-top: 1px solid rgba(244, 242, 236, .12); }
.ab-liste > div { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 9px 76px 9px 0; border-bottom: 1px solid rgba(244, 242, 236, .12); }
.ab-liste dt { color: rgba(244, 242, 236, .6); font-size: 13px; line-height: 1.3; }
.ab-liste dd { margin: 0; color: var(--licht); font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.ab-liste.ab-fest > div { padding-right: 0; }
.ab-aendern { position: absolute; right: 0; top: 50%; transform: translateY(-50%); min-height: 44px; padding: 0 2px 0 12px; background: none; border: 0; color: rgba(244, 242, 236, .75); font: 500 14px/1 var(--claim); text-decoration: underline; text-decoration-color: rgba(244, 242, 236, .35); text-underline-offset: 3px; cursor: pointer; }
.ab-aendern:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.ab-erklaerung { margin: 4px 0 0; color: var(--licht); font-weight: 500; font-size: 15px; line-height: 1.45; }
.ab-haken { width: 56px; height: 56px; color: var(--licht); flex: none; }
.ab-haken svg { width: 100%; height: 100%; }
/* Auf niedrigen Fenstern zählen Nummer, nächste Schritte und Links mehr als der Haken */
@media (max-height: 800px) { .ab-haken { display: none; } }
.ab-noscript { padding: 24px; color: var(--licht); }

/* Wechsel: alter Schritt blendet aus, neuer ein, gleichzeitig und ohne Federn */
.ab-schritt.rein-vor { animation: ab-rein-vor .26s cubic-bezier(.2, .7, .2, 1) .06s both; }
.ab-schritt.rein-zurueck { animation: ab-rein-zurueck .26s cubic-bezier(.2, .7, .2, 1) .06s both; }
.ab-schritt.raus-vor { animation: ab-raus-vor .12s ease-in both; pointer-events: none; }
.ab-schritt.raus-zurueck { animation: ab-raus-zurueck .12s ease-in both; pointer-events: none; }
@keyframes ab-rein-vor { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes ab-rein-zurueck { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes ab-raus-vor { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-28px); } }
@keyframes ab-raus-zurueck { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(28px); } }
@media (prefers-reduced-motion: reduce) {
  .ab-schritt.rein-vor, .ab-schritt.rein-zurueck, .ab-schritt.raus-vor, .ab-schritt.raus-zurueck { animation: none; }
  .ab-fortschritt span { transition: none; }
}

/* Rechner und Tablet: Karte in Telefonbreite in der Mitte, darüber die Wortmarke */
@media (min-width: 700px) and (min-height: 600px) {
  .ablauf { left: 50%; top: calc(50% + 22px); width: 480px; height: min(860px, calc(100vh - 100px)); transform: translate(-50%, -50%); border: 1px solid rgba(244, 242, 236, .14); border-radius: 28px; background: linear-gradient(180deg, #161c28 0%, #0d1018 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
  .ablauf::before { content: ''; position: absolute; left: 50%; top: -46px; width: 132px; height: 32px; transform: translateX(-50%); background: url(medien/wortmarke-milch.svg) center / contain no-repeat; }
  .ab-form { border-radius: 0; }
  .ab-kopf { padding-top: 10px; }
  .ab-leiste { padding-bottom: 24px; }
}
@media (max-height: 600px) {
  .ab-schritt { padding-top: 18px; gap: 10px; }
  .ab-schritt h2 { font-size: 24px; }
  .ab-wahl span { min-height: 64px; }
  .ab-leiste { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); }
}
