/* -----------------------------------------------------------------------------------
Libermenta Erstanfrage-Flow – Premium Single-Surface Fullscreen-Dialog

Tokens folgen der libermenta.com-Site (Greyd theme.json). Wo die Site ihre eigenen
CSS-Variablen liefert, gewinnen diese; die Hex-Werte sind nur Fallback, damit das
Plugin auch ohne Greyd korrekt aussieht.

  Gold      #bf9b4c   primary            Buttons und CTA (weisse Schrift, wie auf der Site)
  Oliv      #5b5c47 / #a6a782            Kopfzeile dunkel, Akzent hell – wie Petrol/Steel bei KSL
  Braun     #5a4020   ari-brown          Rahmen der Buttons, Headlines, Ghost-Button

Keine Versalien/Kapitälchen – nutzt libermenta.com nicht.
  Beige     #dccdb3 / #f4e6d5 / #fcf9f2  Felder, Hinweisflächen
  Gracht    #b15734   Standortakzent
  Schrift   Gill Sans Nova (Headlines) · Source Sans 3 (Fließtext + UI) – kein Montserrat

Radien wie auf der Site: 20px Karte/CTA, 14px Hinweisflächen, 8px Felder, Pill Buttons.
Feldfond leicht beige (rgba(252,249,242,.6)), Schatten aus den shadow-Tokens der Site.

Die Komponentenklassen stehen doppelt (.lf-btn.lf-btn). Das ist Absicht: das
Greyd-Theme stylt button[type="submit"], input:not(...) und input[type="checkbox"]
mit Element+Attribut-Selektoren, die eine einzelne Klasse überstimmen würden –
Schrift, Polsterung, Radius und Farben kämen dann vom Theme statt von hier.

Design-Regel: keine einseitigen Container-Borders. Trennlinien sind eigene
Divider-Elemente (.lf-divider, height:1px).
----------------------------------------------------------------------------------- */

.lf-dialog,
.lf-trigger-float.lf-trigger-float,
.lf-dd__list {
    /* Flächenfarbe = Buttonfarbe der Site (Gold). Akzent/Text = das dunkle Braun. */
    --lf-surface: var(--wp--preset--color--primary, #bf9b4c);
    --lf-accent: var(--wp--preset--color--custom-ari-brown, #5a4020);
    /* Text auf der Goldfläche: das helle Weiss der Site reicht kontrastseitig nicht
       (2,6:1), deshalb sehr dunkles Braun -> 5,3:1 und damit WCAG AA. */
    --lf-on-surface: #33240f;
    --lf-green: var(--wp--preset--color--secondary, #a6a782);
    /* Tiefer Olivton derselben Familie – traegt weisse Schrift (6,7:1).
       Wie bei KSL: dunkle Kopfzeile, weisse Schrift, hellerer Ton als Akzent. */
    --lf-green-dark: #5b5c47;
    --lf-beige-700: var(--wp--preset--color--tertiary, #dccdb3);
    --lf-beige-500: var(--wp--preset--color--custom-libermenta-beige-500, #f4e6d5);
    --lf-beige-200: var(--wp--preset--color--custom-libermenta-beige-200, #fcf9f2);
    --lf-ink: var(--wp--preset--color--foreground, #1d1d1b);
    --lf-muted: var(--wp--preset--color--dark, #5a5959);
    --lf-muted-2: var(--wp--preset--color--mediumdark, #7d7a7a);
    --lf-line: var(--wp--preset--color--custom-libermenta-grey-200, #e7e7e6);
    --lf-white: var(--wp--preset--color--lightest, #fffdf9);
    --lf-danger: #b3261e;
    --lf-danger-bg: #fdeceb;

    /* Nur die beiden Schriften der Site: Gill Sans Nova für Headlines, Source Sans 3
       für Fließtext UND alle UI-Elemente (Labels, Buttons, Dropdowns). Bewusst kein
       Montserrat – auf Wunsch des Auftraggebers nicht Teil der Bildsprache. */
    --lf-font-head: var(--wp--preset--font-family--gill-sans-nova, "Gill Sans Nova", "Gill Sans", Optima, Candara, sans-serif);
    --lf-font-body: var(--wp--preset--font-family--source-sans-3-extralight, "Source Sans 3", "Source Sans Pro", system-ui, sans-serif);
    --lf-font-ui: var(--lf-font-body);

    /* Radien wie libermenta.com: 20px an Karten/Bildflächen, 8px an Feldern,
       Pill an Buttons. */
    --lf-radius: 8px;                 /* Felder, Hinweisflächen */
    --lf-radius-card: 20px;           /* Karte, CTA, Bildflächen */
    --lf-radius-pill: 9999px;         /* Buttons */
    /* Feldfond der Site: leicht beige statt reinweiss */
    --lf-field-bg: var(--wp--preset--color--custom-libermenta-gold-100, rgba(252, 249, 242, .6));
    /* Schatten-Tokens der Site */
    --lf-shadow-1: var(--wp--preset--shadow--shadow-1, 0 4px 20px 0 #b8a06a59);
    --lf-shadow-2: var(--wp--preset--shadow--shadow-2, 0 4px 32px 0 #5a462814);
    --lf-shadow-3: var(--wp--preset--shadow--shadow-3, 0 12px 48px 0 #5a462826);

    --lf-ease-out: cubic-bezier(.2, 0, 0, 1);
    --lf-ease-in: cubic-bezier(.4, 0, 1, 1);
    --lf-dur-micro: 120ms;
    --lf-dur: 300ms;
    --lf-dur-emph: 480ms;
}

/* =========================================================== Floating-Trigger */
/* Bahn vom Seitenanfang bis zur Footer-Oberkante. Die Höhe setzt das JS einmalig
   (und bei Resize) über --lf-anchor-height – nicht pro Scroll-Frame. */
.lf-anchor {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    /* endet 20px über der Footer-Oberkante – das ist die Ruheposition des Buttons */
    height: calc(var(--lf-anchor-height, 100%) - 20px);
    /* Unter der Sticky-Kopfzeile bleiben: die stellt Greyd auf z-index 10. Alles
       andere auf der Seite ist unpositioniert, 9 reicht also zum Überlagern. */
    z-index: 9;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;   /* Ruheposition ans Bahnende, sonst greift sticky nicht */
}
/* position:sticky hält den Button 20px über dem unteren Viewport-Rand und gibt ihn
   am Bahnende – also an der Footer-Oberkante – frei. Das rechnet der Browser im
   Compositor, deshalb frame-genau ohne Nachziehen beim Scrollen. */
.lf-anchor__inner {
    position: sticky;
    bottom: 20px;
    display: block;
    width: 0;
    height: 0;
    pointer-events: none;
}
.lf-trigger-float.lf-trigger-float {
    position: absolute;
    left: 20px;
    bottom: 0;
    pointer-events: auto;
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0;
    /* Typografie und Rahmen exakt wie die Buttons im Flow */
    border: 1px solid var(--lf-accent);
    border-radius: var(--lf-radius-card);
    overflow: hidden;
    font-family: var(--lf-font-ui);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    color: var(--lf-white);
    background-color: var(--lf-surface);
    cursor: pointer;
    box-shadow: var(--lf-shadow-1);
}
.lf-trigger-float__thumb {
    flex: 0 0 auto;
    width: 66px;
    align-self: stretch;
    background-color: var(--lf-beige-700);
    background-image: var(--lf-cta-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.lf-trigger-float__label {
    align-self: center;
    padding: 15px 24px;
}
.lf-trigger-float__arr {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    align-self: center;
    margin-right: 18px;
    color: var(--lf-beige-500);
    display: none; /* nur mobil sichtbar – ersetzt dort das Bild */
}
.lf-trigger-float.lf-trigger-float:hover,
.lf-trigger-float.lf-trigger-float:focus-visible {
    color: var(--lf-white);
    background-color: var(--lf-green);
    border-color: var(--lf-green);
    box-shadow: var(--lf-shadow-3);
}
.lf-trigger-float.lf-trigger-float:focus-visible {
    outline: 3px solid var(--lf-surface);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
    .lf-trigger-float.lf-trigger-float { transition: background-color .28s ease, box-shadow .28s ease; }
}
@media print { .lf-trigger-float.lf-trigger-float { display: none; } }
@media (max-width: 575px) {
    /* Mobil ein fixierter Vollbreite-Balken statt der Sticky-Bahn. Damit er das
       Seitenende (Footer-Links, Suchfeld) nicht dauerhaft verdeckt, wird unten
       Platz in seiner Höhe reserviert – die setzt das JS. */
    body { padding-bottom: var(--lf-bar-height, 56px); }
    .lf-anchor { position: static; height: auto; }
    .lf-anchor__inner { position: static; }
    .lf-trigger-float.lf-trigger-float {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        width: 100%;
        justify-content: center;
        border-radius: 0;
        box-shadow: 0 -8px 26px -8px rgba(90, 64, 32, .38);
    }
    .lf-trigger-float__thumb { display: none; }
    .lf-trigger-float__label { flex: 0 1 auto; padding: 16px 10px 16px 18px; font-size: 16px; }
    .lf-trigger-float__label br { display: none; }
    .lf-trigger-float__arr { display: block; width: 26px; height: 26px; margin-right: 0; }
}

/* Inline-Trigger aus dem Shortcode */
.lf-trigger.lf-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 24px;
    border: 1px solid var(--wp--preset--color--custom-ari-brown-200, #59402096);
    border-radius: var(--lf-radius-pill);
    font-family: var(--wp--preset--font-family--source-sans-3-extralight, "Source Sans 3", system-ui, sans-serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--wp--preset--color--lightest, #fffdf9);
    background-color: var(--wp--preset--color--primary, #bf9b4c);
    cursor: pointer;
    text-decoration: none;
}
.lf-trigger.lf-trigger:hover { background-color: var(--wp--preset--color--secondary, #a6a782); border-color: var(--wp--preset--color--secondary, #a6a782); color: var(--wp--preset--color--lightest, #fffdf9); }
.lf-trigger.lf-trigger:focus-visible { outline: 3px solid var(--wp--preset--color--custom-ari-brown, #5a4020); outline-offset: 2px; }

/* ================================================================ Dialog */
html.lf-scroll-lock { overflow: hidden; }

.lf-dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--lf-ink);
    font-family: var(--lf-font-body);
    overflow: hidden;
}
.lf-dialog::backdrop { background: rgba(29, 29, 27, .72); }
.lf-dialog:not([open]) { display: none; }

/* Bühne: Hintergrundbild als eigene Ebene, Karte zentriert darüber. */
.lf-stage {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 4vh 24px;
    background-color: var(--lf-surface);
}
/* Die Bildebene ist höher als der Viewport, daher bleibt der Bildschirm beim
   Slide IMMER vollständig bedeckt (kein Durchblitzen, keine Kante). */
.lf-stage::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: calc(100% + 90px);
    background-image: linear-gradient(rgba(45, 32, 16, .66), rgba(45, 32, 16, .8)), var(--lf-modal-image);
    background-size: cover;
    background-position: center;
    z-index: 0;
}
.lf-stage > * { position: relative; z-index: 1; }

.lf-card {
    width: 100%;
    max-width: 700px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--lf-radius-card);
    box-shadow: 0 40px 100px -30px rgba(45, 32, 16, .55);
    overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
    .lf-dialog[open] .lf-stage::before { animation: lfBgIn .6s var(--lf-ease-out) both; }
    .lf-dialog[open] .lf-card { animation: lfCardIn .55s .28s var(--lf-ease-out) backwards; }
    .lf-card { transition: height .5s cubic-bezier(.34, 1.2, .5, 1); }
}
@keyframes lfBgIn { from { transform: translateY(-90px); } to { transform: translateY(0); } }
@keyframes lfCardIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

.lf-container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* Screenreader-only */
.lf-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================================================== Kopf */
.lf-header {
    flex: 0 0 auto;
    padding: 22px 0 18px;
    background: var(--lf-green-dark);
}
.lf-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.lf-kicker {
    margin: 0;
    font-family: var(--lf-font-ui);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .72);
}
.lf-close.lf-close {
    width: 44px;
    height: 44px;
    margin: -10px -10px -10px 0;
    padding: 0;
    border: 0;
    border-radius: var(--lf-radius-pill);
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lf-close.lf-close svg { width: 24px; height: 24px; }
.lf-close.lf-close:hover { background: rgba(255, 255, 255, .16); }
.lf-close.lf-close:focus-visible { outline: 2px solid var(--lf-green); outline-offset: 2px; }

/* ================================================================== Stepper */
.lf-stepper { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.lf-step { flex: 1 1 0; min-width: 0; }
.lf-step__btn.lf-step__btn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 0 0 9px;
    border: 0;
    background: none;
    text-align: left;
    cursor: default;
}
.lf-step.is-done .lf-step__btn.lf-step__btn { cursor: pointer; }
.lf-step__btn.lf-step__btn:focus-visible { outline: 2px solid var(--lf-green); outline-offset: 3px; }
.lf-step__marker {
    flex: 0 0 auto;
    position: relative;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: var(--lf-radius-pill);
    background: transparent;
}
.lf-step__num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--lf-font-ui);
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
    line-height: 1;
}
.lf-step__check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    color: var(--lf-green-dark);
    opacity: 0;
}
.lf-step__check path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.lf-step__lbl {
    font-family: var(--lf-font-ui);
    font-size: 14px;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lf-step.is-current .lf-step__marker { background: var(--lf-green); border-color: var(--lf-green); }
.lf-step.is-current .lf-step__num { color: #fff; opacity: 1; }
.lf-step.is-current .lf-step__lbl { color: #fff; font-weight: 600; }
.lf-step.is-done .lf-step__marker { background: #fff; border-color: #fff; }
.lf-step.is-done .lf-step__num { opacity: 0; }
.lf-step.is-done .lf-step__check { opacity: 1; }
.lf-step.is-done .lf-step__check path { stroke-dashoffset: 0; }
.lf-step.is-done .lf-step__lbl { color: rgba(255, 255, 255, .9); }
.lf-step__bar { display: block; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .24); overflow: hidden; }
.lf-step__fill { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.lf-step.is-current .lf-step__fill,
.lf-step.is-done .lf-step__fill { transform: scaleX(1); }
.lf-step.is-done .lf-step__fill { background: #fff; }

/* ================================================================== Körper */
.lf-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 44px 0 48px;
    scrollbar-width: thin;
    scrollbar-color: var(--lf-beige-700) transparent;
}
.lf-body::-webkit-scrollbar { width: 11px; }
.lf-body::-webkit-scrollbar-track { background: transparent; }
.lf-body::-webkit-scrollbar-thumb { background: var(--lf-beige-700); background-clip: padding-box; border: 3px solid transparent; border-radius: 8px; }
.lf-body::-webkit-scrollbar-thumb:hover { background: var(--lf-accent); background-clip: padding-box; border: 3px solid transparent; }

/* Panels */
.lf-panel { display: none; }
.lf-panel.is-active,
.lf-panel.is-leaving { display: block; }
.lf-panel:focus { outline: none; }

/* Leitfrage + Hilfe */
.lf-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.lf-fieldset--sub { margin-top: 26px; }
#lf-standort-wrap { margin-top: 18px; }
.lf-lede {
    display: block;
    width: auto;
    float: none;
    padding: 0;
    margin: 0 0 6px;
    border: 0;
    font-family: var(--lf-font-head);
    font-weight: 300;
    letter-spacing: .02em;
    font-size: clamp(23px, 3.1vw, 30px);
    line-height: 1.3;
    color: var(--lf-surface);
}
.lf-lede-sub { margin: 0 0 28px; font-size: 16px; line-height: 26px; color: var(--lf-muted); }
.lf-sub-q {
    display: block;
    width: auto;
    float: none;
    padding: 0;
    margin: 0 0 4px;
    border: 0;
    font-family: var(--lf-font-head);
    font-weight: 300;
    letter-spacing: .02em;
    font-size: 18px;
    line-height: 28px;
    color: var(--lf-surface);
}
.lf-help { margin: 0 0 14px; font-size: 15px; line-height: 24px; color: var(--lf-muted); }
.lf-opt { color: var(--lf-muted-2); }

/* ============================================================ Choice-Cards */
.lf-choices { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 4px; }
.lf-choices--two { grid-template-columns: 1fr 1fr; }
.lf-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.lf-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.lf-choice__box.lf-choice__box {
    display: flex;
    align-items: center;
    min-height: 62px;
    padding: 16px 20px;
    border: 1px solid var(--lf-beige-700);
    border-radius: var(--lf-radius);
    background: var(--lf-field-bg);
    font-family: var(--lf-font-body);
    font-size: 16px;
    line-height: 22px;
    color: var(--lf-ink);
}
.lf-choice__ic { flex: 0 0 auto; width: 24px; margin-right: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--lf-surface); }
.lf-choice__ic svg { width: 20px; height: 20px; display: block; }
.lf-choice:hover .lf-choice__box.lf-choice__box { background: var(--lf-beige-200); border-color: var(--lf-accent); }
.lf-choice input:checked + .lf-choice__box.lf-choice__box {
    border-color: var(--lf-surface);
    box-shadow: inset 0 0 0 1px var(--lf-surface);
    background: var(--lf-beige-500);
}
.lf-choice input:focus-visible + .lf-choice__box.lf-choice__box { outline: 3px solid var(--lf-surface); outline-offset: 2px; }

/* ============================================================== Formfelder */
.lf-field { margin-bottom: 18px; }
.lf-float { position: relative; }

.lf-form .lf-input.lf-input {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 24px 16px 8px 18px;
    border: 1px solid var(--lf-beige-700);
    border-radius: var(--lf-radius);
    background-color: var(--lf-field-bg);
    font-family: var(--lf-font-body);
    font-size: 16px;
    line-height: 1.4;
    color: var(--lf-ink);
    box-shadow: none;
    appearance: none;
}
.lf-form textarea.lf-input.lf-input { min-height: 110px; padding-top: 28px; resize: vertical; }
.lf-form .lf-input.lf-input::placeholder { color: transparent; }
.lf-form .lf-input.lf-input:hover { border-color: var(--lf-accent); }
.lf-form .lf-input.lf-input:focus {
    border-color: var(--lf-surface);
    outline: 2px solid var(--lf-surface);
    outline-offset: -2px;
    box-shadow: none;
}

/* Floating Label – ersetzt Bootstraps .form-floating */
.lf-float > label {
    position: absolute;
    top: 50%;
    left: 19px;
    transform: translateY(-50%);
    max-width: calc(100% - 38px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--lf-font-ui);
    font-size: 16px;
    line-height: 1;
    color: var(--lf-muted);
    pointer-events: none;
}
.lf-float > textarea.lf-input.lf-input ~ label { top: 26px; transform: none; }
.lf-float > .lf-input.lf-input:focus ~ label,
.lf-float > .lf-input.lf-input:not(:placeholder-shown) ~ label {
    top: 10px;
    transform: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--lf-surface);
}
@media (prefers-reduced-motion: no-preference) {
    .lf-float > label { transition: top var(--lf-dur-micro) var(--lf-ease-out), font-size var(--lf-dur-micro) var(--lf-ease-out), transform var(--lf-dur-micro) var(--lf-ease-out); }
}

/* ruhiges positives Häkchen nach gültiger Eingabe (nur Textfelder) */
.lf-field.is-valid input.lf-input.lf-input {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a4020' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px 16px;
    padding-right: 42px;
}

/* ======================================================= Custom Dropdown */
.lf-native { display: none; }
.lf-dd { position: relative; }
.lf-dd__btn.lf-dd__btn {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 24px 16px 8px 18px;
    background: var(--lf-field-bg);
    border: 1px solid var(--lf-beige-700);
    border-radius: var(--lf-radius);
    text-align: left;
    cursor: pointer;
    color: var(--lf-ink);
}
.lf-dd__btn.lf-dd__btn:hover { border-color: var(--lf-accent); }
.lf-dd__btn.lf-dd__btn:focus-visible { outline: 3px solid var(--lf-surface); outline-offset: 2px; }
.lf-dd.is-open .lf-dd__btn.lf-dd__btn { border-color: var(--lf-surface); }
.lf-dd__main { min-width: 0; }
.lf-dd__label {
    position: absolute;
    top: 10px;
    left: 18px;
    font-family: var(--lf-font-ui);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: var(--lf-surface);
    pointer-events: none;
}
.lf-dd__value {
    display: flex;
    align-items: center;
    min-width: 0;
    font-family: var(--lf-font-body);
    font-size: 16px;
    line-height: 1.2;
    color: var(--lf-ink);
}
.lf-dd__valtext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-dd__value.is-placeholder { color: var(--lf-muted); }
.lf-dd__chev { flex: 0 0 auto; width: 15px; height: 15px; color: var(--lf-surface); }
.lf-dd__chev svg { width: 15px; height: 15px; display: block; }
.lf-dd.is-open .lf-dd__chev { transform: rotate(180deg); }
.lf-dd.is-disabled .lf-dd__btn.lf-dd__btn { border-color: var(--lf-line); background: #faf9f7; cursor: default; }
.lf-dd.is-disabled .lf-dd__value,
.lf-dd.is-disabled .lf-dd__label,
.lf-dd.is-disabled .lf-dd__chev { color: var(--lf-muted-2); }
.lf-dd__list {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    right: 0;
    z-index: 5;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    max-height: 248px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--lf-beige-700);
    border-radius: var(--lf-radius);
    box-shadow: var(--lf-shadow-3);
    scrollbar-width: thin;
    scrollbar-color: var(--lf-beige-700) transparent;
}
.lf-dd__list[hidden] { display: none; }
.lf-dd__list::-webkit-scrollbar { width: 9px; }
.lf-dd__list::-webkit-scrollbar-track { background: transparent; }
.lf-dd__list::-webkit-scrollbar-thumb { background: var(--lf-beige-700); background-clip: padding-box; border: 2px solid transparent; border-radius: 8px; }
.lf-dd__opt {
    display: flex;
    align-items: center;
    padding: 11px 18px;
    font-family: var(--lf-font-body);
    font-size: 16px;
    line-height: 1.3;
    color: var(--lf-ink);
    cursor: pointer;
}
.lf-dd__opttext { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-dd__icon { flex: 0 0 auto; width: 24px; margin-right: 10px; display: inline-flex; align-items: center; justify-content: center; }
.lf-dd__icon img { width: 22px; height: 15px; object-fit: cover; display: block; border-radius: 2px; }
.lf-dd__opt.is-active { background: var(--lf-beige-200); }
.lf-dd__opt[aria-selected="true"] { color: var(--lf-surface); font-weight: 600; background: var(--lf-beige-500); }
.lf-field.is-invalid .lf-dd__btn.lf-dd__btn { border-color: var(--lf-danger); }
@media (prefers-reduced-motion: no-preference) {
    .lf-dd__chev { transition: transform var(--lf-dur-micro) var(--lf-ease-out); }
}

.lf-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.lf-counter { margin: 6px 0 0; text-align: right; font-size: 13px; color: var(--lf-muted-2); }

/* ====================================================== Eingeblendete Bereiche */
/* Grid-Morph: animiert auf die echte Inhaltshöhe (kein max-height-Rätselraten) */
.lf-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; }
.lf-reveal__inner { min-height: 0; overflow: hidden; }
.lf-reveal.is-shown { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
#lf-kk-andere-wrap .lf-reveal__inner { padding-top: 12px; }
#lf-gkv .lf-reveal__inner { padding-top: 14px; }
#lf-anrufzeit-wrap .lf-reveal__inner { padding-top: 14px; }
#lf-patient-wrap { margin-bottom: 0; }
#lf-patient-wrap .lf-reveal__inner { padding-bottom: 20px; }

/* GKV-Hinweis */
.lf-cond { margin-top: 0; }
.lf-cond__text {
    margin: 0 0 16px;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--lf-beige-200);
    font-size: 15px;
    line-height: 23px;
    color: var(--lf-muted);
}

/* Trennlinie als eigenes Element – keine einseitige Container-Border. */
.lf-divider {
    display: block;
    height: 1px;
    margin: 26px 0 0;
    background: var(--lf-line);
}
.lf-optional { padding-top: 22px; }

/* Verschlüsselungs-Hinweis */
.lf-secure { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; font-size: 13px; line-height: 19px; color: var(--lf-muted); }
.lf-secure svg { flex: 0 0 auto; }

/* Honeypot */
.lf-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* =================================================== Einwilligung (Art. 9) */
.lf-consent-box { margin-top: 22px; padding: 18px 20px; border-radius: 14px; background: var(--lf-beige-200); }
.lf-consent { display: flex; align-items: flex-start; gap: 12px; }
.lf-consent__control { position: relative; flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; }
.lf-consent__input.lf-consent__input {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px; margin: 0;
    border: 1px solid var(--lf-surface);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}
.lf-consent__input.lf-consent__input:checked { background: var(--lf-accent); border-color: var(--lf-accent); }
.lf-consent__input.lf-consent__input:focus-visible { outline: 3px solid var(--lf-surface); outline-offset: 2px; }
.lf-consent__check {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 14px; height: 14px; color: #fff; pointer-events: none; opacity: 0;
}
.lf-consent__check path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.lf-consent__input.lf-consent__input:checked ~ .lf-consent__check { opacity: 1; }
.lf-consent__input.lf-consent__input:checked ~ .lf-consent__check path { stroke-dashoffset: 0; }
.lf-consent-box.is-invalid .lf-consent__input.lf-consent__input { border-color: var(--lf-danger); }
.lf-consent label { margin: 0; font-size: 14px; line-height: 22px; color: var(--lf-muted); }
.lf-consent a { color: var(--lf-surface); text-decoration: underline; }

/* ========================================================= Fehlermeldungen */
.lf-err { display: none; margin: 6px 0 0; font-size: 14px; line-height: 20px; color: var(--lf-danger); }
.lf-err.is-visible { display: block; }
.lf-err--block { margin-top: 8px; }
.lf-field.is-invalid .lf-input.lf-input { border-color: var(--lf-danger); }
.lf-formerror {
    display: none;
    margin: 16px 0 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--lf-danger-bg);
    color: var(--lf-danger);
    font-size: 15px;
    line-height: 22px;
}
.lf-formerror.is-visible { display: block; }

/* ==================================================== Navigation / Buttons */
.lf-nav { display: flex; align-items: center; gap: 12px; margin-top: 32px; }
.lf-nav .lf-next { margin-left: auto; }
.lf-btn.lf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 28px;
    border: 1px solid var(--lf-surface);
    border-radius: var(--lf-radius-pill);
    font-family: var(--lf-font-ui);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--lf-white);
    background: var(--lf-surface);
    cursor: pointer;
    text-decoration: none;
}
.lf-btn.lf-btn:hover { background: var(--lf-green); border-color: var(--lf-green); color: var(--lf-white); }
.lf-btn.lf-btn:focus-visible { outline: 3px solid var(--lf-surface); outline-offset: 3px; }
.lf-btn.lf-btn[hidden] { display: none; }
.lf-btn-ghost.lf-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 10px 24px;
    font-family: var(--lf-font-ui);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--lf-surface);
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--lf-surface);
    border-radius: var(--lf-radius-pill);
    cursor: pointer;
}
.lf-btn-ghost.lf-btn-ghost:hover { background: var(--lf-accent); color: var(--lf-white); }
.lf-btn-ghost.lf-btn-ghost:focus-visible { outline: 3px solid var(--lf-surface); outline-offset: 3px; }
.lf-spinner {
    display: none;
    width: 15px;
    height: 15px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
}
.lf-form.is-sending .lf-spinner { display: inline-block; }
.lf-form.is-sending #lf-submit { opacity: .85; pointer-events: none; }

/* =============================================================== Bestätigung */
.lf-confirm { display: none; max-width: 540px; margin: 0 auto; padding: 24px 0 8px; text-align: center; }
.lf-confirm.is-shown { display: block; }
.lf-confirm:focus { outline: none; }
.lf-confirm__ic {
    width: 64px; height: 64px;
    margin: 0 auto 22px;
    border-radius: var(--lf-radius-pill);
    background: var(--lf-surface);
    color: var(--lf-white);
    display: flex;
    align-items: center;
    justify-content: center;
}
.lf-confirm__ic svg { width: 32px; height: 32px; }
.lf-confirm__ic svg path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.lf-confirm.is-shown .lf-confirm__ic svg path { stroke-dashoffset: 0; }
.lf-confirm__title {
    margin: 0 0 10px;
    font-family: var(--lf-font-head);
    font-weight: 300;
    letter-spacing: .02em;
    font-size: 24px;
    line-height: 1.3;
    color: var(--lf-surface);
}
.lf-confirm__lead { margin: 0 auto 26px; max-width: 440px; font-size: 16px; line-height: 26px; color: var(--lf-muted); }

/* ============================================================ Krisenhinweis */
.lf-crisis { max-width: 560px; margin: 22px auto 0; font-size: 13px; line-height: 20px; color: var(--lf-muted); text-align: center; text-wrap: balance; }
.lf-crisis strong { color: var(--lf-surface); font-weight: 600; }

/* ==================================================================== Motion */
@keyframes lfInFwd { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes lfInBack { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
@keyframes lfOutFwd { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-16px); } }
@keyframes lfOutBack { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(16px); } }
@keyframes lfReveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes lfDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes lfPop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes lfSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: no-preference) {
    .lf-form[data-dir="fwd"] .lf-panel.is-active { animation: lfInFwd var(--lf-dur) var(--lf-ease-out) both; }
    .lf-form[data-dir="back"] .lf-panel.is-active { animation: lfInBack var(--lf-dur) var(--lf-ease-out) both; }
    .lf-form[data-dir="fwd"] .lf-panel.is-leaving { animation: lfOutFwd 180ms var(--lf-ease-in) both; }
    .lf-form[data-dir="back"] .lf-panel.is-leaving { animation: lfOutBack 180ms var(--lf-ease-in) both; }
    .lf-reveal { transition: grid-template-rows .5s var(--lf-ease-out), opacity .35s ease, visibility 0s linear .5s; }
    .lf-reveal.is-shown { transition: grid-template-rows .5s var(--lf-ease-out), opacity .35s ease, visibility 0s; }
    /* Schritt 1: Dropdowns + Textfeld morphen weich gestaffelt herein */
    #lf-step1-more .lf-row2 > .lf-field,
    #lf-step1-more > .lf-reveal__inner > .lf-float {
        opacity: 0;
        transform: translateY(12px);
        transition: opacity .5s var(--lf-ease-out), transform .6s var(--lf-ease-out);
    }
    #lf-step1-more.is-shown .lf-row2 > .lf-field,
    #lf-step1-more.is-shown > .lf-reveal__inner > .lf-float {
        opacity: 1;
        transform: none;
    }
    #lf-step1-more.is-shown .lf-row2 > .lf-field:nth-child(1) { transition-delay: .12s; }
    #lf-step1-more.is-shown .lf-row2 > .lf-field:nth-child(2) { transition-delay: .20s; }
    #lf-step1-more.is-shown > .lf-reveal__inner > .lf-float { transition-delay: .30s; }
    #lf-step1-more.is-shown #lf-standort-wrap { transition-delay: .12s; }
    .lf-step__num { transition: opacity .25s var(--lf-ease-out); }
    .lf-step.is-done .lf-step__check path { animation: lfDraw .55s var(--lf-ease-out) both; }
    .lf-consent__input.lf-consent__input:checked ~ .lf-consent__check path { animation: lfDraw .55s var(--lf-ease-out) both; }
    .lf-confirm.is-shown { animation: lfReveal var(--lf-dur-emph) var(--lf-ease-out) both; }
    .lf-confirm.is-shown .lf-confirm__ic { animation: lfPop var(--lf-dur-emph) var(--lf-ease-out) both; }
    .lf-confirm.is-shown .lf-confirm__ic svg path { animation: lfDraw .55s var(--lf-ease-out) .15s both; }
    .lf-step__fill { transition: transform var(--lf-dur-emph) var(--lf-ease-out), background-color var(--lf-dur) var(--lf-ease-out); }
    .lf-choice__box.lf-choice__box { transition: border-color var(--lf-dur-micro) var(--lf-ease-out), background-color var(--lf-dur-micro) var(--lf-ease-out), box-shadow var(--lf-dur-micro) var(--lf-ease-out); }
    .lf-form .lf-input.lf-input, .lf-dd__btn.lf-dd__btn { transition: border-color var(--lf-dur-micro) var(--lf-ease-out); }
    .lf-btn.lf-btn { transition: transform var(--lf-dur-micro) var(--lf-ease-out), background-color var(--lf-dur-micro) var(--lf-ease-out), border-color var(--lf-dur-micro) var(--lf-ease-out); }
    .lf-btn.lf-btn:hover { transform: translateY(-1px); }
    .lf-spinner { animation: lfSpin .8s linear infinite; }
}

/* =============================================================== Responsive */
@media (max-width: 767px) {
    .lf-step__lbl { display: none; }
    .lf-body { padding: 32px 0 40px; }
    .lf-stage { padding: 0; }
    .lf-card { max-width: 100%; max-height: 100%; height: 100%; border-radius: 0; box-shadow: none; }
}
@media (max-width: 575px) {
    .lf-container { padding: 0 18px; }
    .lf-choices--two { grid-template-columns: 1fr; }
    .lf-row2 { grid-template-columns: 1fr; }
    .lf-nav { flex-wrap: wrap; }
}
