/* Anfrage-Funnel. Nutzt die Farb-Tokens der jeweiligen Seite (--ink, --paper, --line …). */
.fn-dialog {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100%; height: 100%;
  background: transparent; color: var(--ink); overflow: hidden;
}
.fn-dialog::backdrop { background: rgba(0,0,0,0); transition: background-color .3s; }
.fn-dialog.da::backdrop { background: rgba(0,0,0,.45); }
.fn-dialog[open] { display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 760px) { .fn-dialog[open] { align-items: center; padding: 2rem; } }

.fn-sheet {
  position: relative; width: 100%; max-width: 640px; height: calc(100% - max(16px, env(safe-area-inset-top, 0px)) - 12px);
  background: var(--paper); border-radius: var(--r-sheet) var(--r-sheet) 0 0; display: flex; flex-direction: column;
  box-shadow: 0 -10px 60px -20px rgba(0,0,0,.35); will-change: transform; touch-action: pan-y;
}
@media (min-width: 760px) { .fn-sheet { height: min(820px, 100%); border-radius: var(--r-sheet); box-shadow: 0 40px 120px -30px rgba(0,0,0,.5); } }

.fn-griff { position: absolute; top: 0; left: 0; right: 0; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.fn-griff::before { content: ''; width: 38px; height: 5px; border-radius: 3px; background: var(--line-strong); }
@media (min-width: 760px) { .fn-griff { display: none; } }

.fn-kopf { display: flex; align-items: center; gap: .5rem; padding: 1.1rem 1rem .5rem; touch-action: none; }
.fn-kopf .fn-titel { flex: 1; text-align: center; font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.fn-rund { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: var(--paper-2); border-radius: 50%; cursor: pointer; transition: transform .12s var(--ease), background-color .2s; }
.fn-rund:hover { background: var(--paper-3); }
.fn-rund:active { transform: scale(.92); }
.fn-rund svg { width: 20px; height: 20px; }
.fn-rund[disabled] { visibility: hidden; }

.fn-fortschritt { height: 3px; background: var(--paper-3); margin: .25rem 1.25rem 0; border-radius: 2px; overflow: hidden; }
.fn-fortschritt span { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 2px; transition: width .5s var(--ease); }

.fn-buehne { position: relative; flex: 1; overflow: hidden; }
.fn-schritt { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem 1.25rem 2rem; -webkit-overflow-scrolling: touch; }
@media (min-width: 760px) { .fn-schritt { padding: 1.75rem 2.25rem 2rem; } }
.fn-schritt h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.12; margin-bottom: .5rem; }
.fn-schritt .fn-unter { color: var(--ink-3); margin: 0 0 1.5rem; font-size: 1rem; }
.fn-block + .fn-block { margin-top: 1.75rem; }
.fn-label { display: block; font-size: .8rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .7rem; }
.fn-label small { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-3); font-size: .85rem; }

/* Auswahl-Kacheln (groß) */
.fn-kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
@media (min-width: 520px) { .fn-kacheln.drei { grid-template-columns: repeat(3, 1fr); } }
.fn-kachel {
  display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; min-height: 112px; padding: 1rem;
  border: 1.5px solid var(--line); border-radius: var(--r-l); background: var(--paper); cursor: pointer; text-align: left;
  font-weight: 600; font-size: 1rem; line-height: 1.25; transition: border-color .15s, background-color .15s, transform .12s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.fn-kachel svg { width: 26px; height: 26px; }
.fn-kachel small { display: block; font-weight: 400; color: var(--ink-3); font-size: .85rem; margin-top: .2rem; }
.fn-kachel:hover { border-color: var(--line-strong); }
.fn-kachel:active { transform: scale(.97); }
.fn-kachel[aria-pressed="true"] { border-color: var(--ink); background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--ink); }

/* Chips (klein, Mehrfachauswahl) */
.fn-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.fn-chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem 1rem;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); cursor: pointer;
  font-size: .95rem; font-weight: 500; transition: border-color .15s, background-color .15s, color .15s, transform .12s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.fn-chip svg { width: 18px; height: 18px; }
.fn-chip:hover { border-color: var(--line-strong); }
.fn-chip:active { transform: scale(.96); }
.fn-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Eingaben */
.fn-feld { display: block; }
.fn-feld + .fn-feld { margin-top: 1rem; }
.fn-feld span { display: block; font-size: .9rem; font-weight: 550; margin-bottom: .4rem; }
.fn-feld span small { font-weight: 400; color: var(--ink-3); }
.fn-feld input, .fn-feld textarea, .fn-feld select {
  width: 100%; min-height: 52px; padding: .8rem 1rem; border: 1.5px solid var(--line-strong); border-radius: var(--r);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
.fn-feld textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.fn-feld input:focus, .fn-feld textarea:focus, .fn-feld select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10,102,255,.18); }
.fn-feld [aria-invalid="true"] { border-color: var(--err); }
.fn-fehler { display: flex; gap: .35rem; align-items: center; color: var(--err); font-size: .88rem; margin-top: .4rem; }
.fn-fehler svg { width: 16px; height: 16px; flex: none; }
.fn-zwei { display: grid; gap: 1rem; }
@media (min-width: 520px) { .fn-zwei { grid-template-columns: 1fr 1fr; } .fn-zwei .fn-feld + .fn-feld { margin-top: 0; } }
.fn-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Gäste-Zähler */
.fn-zaehler { display: flex; align-items: center; gap: 1rem; padding: .75rem; border: 1.5px solid var(--line); border-radius: var(--r-l); }
.fn-zaehler output { flex: 1; text-align: center; font-size: 2.6rem; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.fn-zaehler output small { display: block; font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: .35rem; }
.fn-zaehler .fn-rund { width: 56px; height: 56px; }
.fn-regler { width: 100%; margin: 1rem 0 .25rem; accent-color: var(--ink); height: 32px; }
.fn-skala { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ink-3); }

/* Raum-Empfehlung */
.fn-empfehlung { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; padding: .75rem; border-radius: var(--r-l); background: var(--paper-2); border: 1px solid var(--line); }
.fn-empfehlung img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r); background: var(--paper-3); }
.fn-empfehlung b { display: block; font-size: 1.1rem; }
.fn-empfehlung p { margin: .2rem 0 0; color: var(--ink-3); font-size: .9rem; }
.fn-empfehlung .fn-marke { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .25rem; }
.fn-hinweis { display: flex; gap: .6rem; padding: .9rem 1rem; border-radius: var(--r); background: var(--paper-2); font-size: .92rem; color: var(--ink-2); }
.fn-hinweis svg { width: 20px; height: 20px; flex: none; margin-top: .1rem; }

/* Zusammenfassung */
.fn-uebersicht { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.fn-uebersicht li { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.fn-uebersicht dt, .fn-uebersicht .k { font-size: .78rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.fn-uebersicht .v { grid-column: 1; font-weight: 500; }
.fn-uebersicht button { grid-row: 1 / span 2; grid-column: 2; display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .85rem; border: 1px solid var(--line-strong); border-radius: 999px; background: none; cursor: pointer; font-size: .85rem; }
.fn-uebersicht button svg { width: 15px; height: 15px; }
.fn-recht { font-size: .85rem; color: var(--ink-3); margin-top: 1.25rem; }
.fn-recht a { color: inherit; }

/* Fuß mit Weiter-Knopf */
.fn-fuss { padding: .9rem 1.25rem calc(.9rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; gap: .75rem; align-items: center; background: var(--paper); border-radius: 0 0 var(--r-sheet) var(--r-sheet); }
@media (min-width: 760px) { .fn-fuss { padding: 1rem 2.25rem 1.25rem; } }
.fn-fuss .fn-zaehl { font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fn-fuss .btn { margin-left: auto; min-width: 9.5rem; }
.fn-fuss .btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.fn-fuss .btn .ic-laden { animation: fn-dreh .8s linear infinite; }
@keyframes fn-dreh { to { transform: rotate(360deg); } }

/* Danke */
.fn-danke { text-align: left; }
.fn-danke .fn-ok { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); margin-bottom: 1.5rem; }
.fn-danke .fn-ok svg { width: 30px; height: 30px; stroke-width: 2.25; }
.fn-nummer { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .9rem; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .04em; margin: .25rem 0 1.5rem; }
.fn-nummer svg { width: 18px; height: 18px; flex: none; }
.fn-zeitlinie { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.fn-zeitlinie li { display: grid; grid-template-columns: 28px 1fr; gap: .9rem; }
.fn-zeitlinie i svg { width: 16px; height: 16px; stroke-width: 2.5; }
.fn-zeitlinie i { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-style: normal; font-size: .8rem; font-weight: 700; }
.fn-zeitlinie li.fertig i { background: var(--ink); color: var(--paper); }
.fn-zeitlinie b { display: block; }
.fn-zeitlinie span { color: var(--ink-3); font-size: .95rem; }
.fn-fehlerbox { display: flex; gap: .6rem; padding: .9rem 1rem; border-radius: var(--r); background: #fdecea; color: #7a1a12; font-size: .95rem; margin-top: 1rem; }
.fn-fehlerbox svg { width: 20px; height: 20px; flex: none; }

/* Inline-Variante auf /anfrage/ */
.fn-inline .fn-sheet { position: static; height: auto; min-height: 640px; max-width: 720px; margin-inline: auto; border: 1px solid var(--line); border-radius: var(--r-sheet); box-shadow: none; }
.fn-inline .fn-buehne { min-height: 520px; }
.fn-inline .fn-griff, .fn-inline .fn-schliessen { display: none; }

@media (prefers-reduced-motion: reduce) {
  .fn-fortschritt span { transition: none; }
}
