/* =========================================================================
   Online-Anamnesebogen — Quiz-Stil
   Baut auf den Tokens aus style.css auf. Eine Frage pro Bildschirm, große
   Antwortflächen (mind. 64 px hoch), Eingaben mit 16 px, damit iOS nicht zoomt.
   ========================================================================= */

/* Im Fragebogen etwas dunklere Text-Töne als auf der Website: kleine Schrift
   braucht 4.5:1 Kontrast (WCAG AA). apple-deep schafft auf Papier nur 3:1,
   ink-3 nur 4.4:1. */
.fb {
  --apple-text: #4a7318;   /* 5.1:1 auf Papier, 4.7:1 auf Mint */
  --ink-3: #5e6658;        /* 5.5:1 auf Papier */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.fb-fine a { padding-block: 0.6rem; }   /* größere Tippfläche, ohne die Zeile zu verschieben */

/* ---------- Kopfleiste mit Kapitel-Fortschritt ---------- */
.fb-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.7rem 1rem;
  padding: 0.85rem var(--gutter);
  padding-top: max(0.85rem, env(safe-area-inset-top));
  background: rgba(247, 245, 239, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.fb-brand { line-height: 0; flex: none; }
.fb-brand img { height: 1.35rem; width: auto; }
.fb-count {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Ein Segment je Kapitel; das aktuelle füllt sich, erledigte sind voll */
.fb-segments {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.fb-seg {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: var(--line-soft);
  overflow: hidden;
}
.fb-seg.is-current { background: var(--line); }
.fb-seg > span {
  display: block;
  height: 100%;
  background: var(--apple);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}

/* ---------- Bildschirm ---------- */
.fb-main {
  flex: 1;
  width: min(100% - var(--gutter) * 2, 40rem);
  margin-inline: auto;
  padding-block: clamp(1.75rem, 6vw, 3.5rem) 3rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}
.fb-screen { display: flex; flex-direction: column; }
.fb-screen.enter,
.fb-screen.enter-back {
  opacity: 0;
  transform: translateX(1.5rem);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
}
.fb-screen.enter-back { transform: translateX(-1.5rem); }
.fb-screen.is-active { opacity: 1; transform: none; }

.fb-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--apple-text);
  margin: 0 0 1rem;
}
.fb-prompt {
  margin: 0 0 0.5rem;
  color: var(--ink-3);
  font-size: 0.95rem;
}
.fb-q {
  font-size: clamp(1.75rem, 6.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem;
  text-wrap: balance;
  outline: none;
  font-variation-settings: 'SOFT' 40, 'WONK' 0;
}
.fb-q--long { font-size: clamp(1.45rem, 5vw, 2rem); line-height: 1.2; }
.fb-lead { color: var(--ink-2); font-size: 1.05rem; margin: -0.75rem 0 1.75rem; max-width: 34rem; }
.fb-fine { font-size: 0.82rem; color: var(--ink-3); margin: 1.25rem 0 0; }
.fb-fine a, .fb-lead a { color: var(--apple-text); }

/* ---------- Große Antwortflächen ---------- */
.fb-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.fb-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 5.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.fb-choice:hover { border-color: var(--apple); background: #fbfcf8; }
.fb-choice:active { transform: scale(0.98); }
.fb-choice:focus-visible { outline: 3px solid var(--apple); outline-offset: 2px; }
.fb-choice.is-selected { background: var(--forest); border-color: var(--forest); color: #fff; }
.fb-choice-key {
  display: none;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  opacity: 0.45;
}
.fb-choice-key:empty { display: none !important; }
@media (hover: hover) and (pointer: fine) {
  .fb-choice-key { display: inline-block; }
}
.fb-choice-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--apple);
  color: var(--forest);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.15s var(--ease), transform 0.15s var(--ease);
}
.fb-choice-badge .fb-ico { width: 0.8rem; height: 0.8rem; }
.fb-choice-badge svg { stroke-width: 3.2; }
.fb-choice.is-selected .fb-choice-badge { opacity: 1; transform: none; }
.fb-choice.is-picked .fb-choice-badge { animation: fb-pop 0.24s var(--spring) backwards; }
.fb-choice.is-picked .fb-choice-badge path { animation: fb-draw 0.2s 0.08s var(--ease) backwards; }
.fb-choice--icon { flex-direction: column; gap: 0.5rem; font-size: 1.15rem; line-height: 1.2; text-align: center; }
.fb-choice--wide { grid-column: 1 / -1; justify-content: flex-start; text-align: left; font-size: 1.1rem; min-height: 4.5rem; }

/* „Falls ja: nähere Angaben“ klappt erst bei Ja auf */
.fb-detail {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.35s var(--ease), opacity 0.3s var(--ease), margin 0.35s var(--ease);
  margin-top: 0;
}
.fb-detail > * { overflow: hidden; min-height: 0; }
.fb-detail.is-open { grid-template-rows: auto auto; opacity: 1; margin-top: 1.25rem; }
.fb-detail:not(.is-open) > * { display: none; }
.fb-detail label { font-size: 0.85rem; color: var(--ink-3); font-weight: 600; margin-bottom: 0.45rem; display: block; }

/* ---------- Eingaben ---------- */
.fb-form { display: grid; gap: 1.1rem; }
@media (min-width: 40rem) {
  .fb-form--grid { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
}
.fb-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.fb-field label { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.fb-req { color: var(--apple-text); }
.fb input,
.fb textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;            /* ≥ 16 px: kein Auto-Zoom auf dem iPhone */
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  min-height: 3.25rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.fb textarea { resize: vertical; line-height: 1.45; }
.fb input:focus,
.fb textarea:focus { outline: none; border-color: var(--apple-deep); box-shadow: 0 0 0 3px rgba(140, 198, 63, 0.25); }
.fb input[aria-invalid],
.fb input[aria-invalid]:focus { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.18); }
.fb-err { color: #b3261e; font-size: 0.82rem; margin: 0; min-height: 0; }
.fb-err:empty { display: none; }
.fb-err--block { margin-top: 1rem; font-size: 0.92rem; }

/* ---------- Navigation unten ---------- */
/* Klebt unten, sobald der Inhalt länger als der Bildschirm ist — „Weiter“ bleibt
   auf kleinen Handys immer erreichbar, ohne erst suchen zu müssen. */
.fb-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  position: sticky;
  bottom: 0;
  z-index: 0;   /* unter dem Papierkorn (body::before, z 1) — sonst wirkt die Leiste als glatter Kasten */
  padding: 1rem 0 max(1rem, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--paper) 72%, rgba(247, 245, 239, 0));
}
/* Auf der Unterschriftsseite nicht kleben — sonst liegt die Leiste über dem Feld */
.fb-screen--sign .fb-nav,
.fb-screen--done .fb-nav { position: static; background: none; }
/* Angetippte Eingabefelder nie hinter der klebenden Leiste verstecken */
html { scroll-padding-bottom: 7rem; }
.fb-nav--start { justify-content: flex-start; flex-wrap: wrap; }
.fb-back,
.fb-link {
  font: inherit;
  background: none;
  border: 0;
  padding: 0.75rem 0.25rem;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 0.95rem;
  text-decoration: none;
  min-height: 2.75rem;
}
.fb-back:hover, .fb-link:hover { color: var(--ink); }
.fb-back { display: inline-flex; align-items: center; gap: 0.35rem; }
.fb-ico--back { width: 1.05rem; height: 1.05rem; transition: transform 0.2s var(--ease); }
.fb-back:active .fb-ico--back { transform: translateX(-4px); }
.fb-link { text-decoration: underline; text-underline-offset: 3px; padding: 0.25rem; min-height: 0; }
.fb-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  min-height: 3.4rem;
  padding: 0.9rem 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), opacity 0.2s;
}
.fb-next:hover { background: var(--forest-2); }
.fb-next:active { transform: scale(0.98); }
.fb-next:disabled { opacity: 0.6; cursor: progress; }
.fb-next:focus-visible { outline: 3px solid var(--apple); outline-offset: 2px; }
.fb-next.is-hidden { visibility: hidden; }
.fb-next--big { min-height: 3.75rem; padding-inline: 2.25rem; font-size: 1.1rem; }
.fb-ico--arrow { width: 1.15rem; height: 1.15rem; margin: 0 -0.2rem 0 0.55rem; transition: transform 0.2s var(--ease); }
.fb-next:active .fb-ico--arrow { transform: translateX(5px); }
@media (hover: hover) and (pointer: fine) {
  .fb-next:hover .fb-ico--arrow { transform: translateX(3px); }
  .fb-back:hover .fb-ico--back { transform: translateX(-2px); }
}
/* Neuer Bildschirm: der Pfeil kommt von links herein — als wäre er durchgeflogen */
.fb-screen.enter.is-active .fb-ico--arrow { animation: fb-arrow-in 0.4s 0.12s var(--ease) backwards; }
.fb-ico--lock { width: 1.15rem; height: 1.15rem; margin-right: 0.55rem; }
/* Offenes Schloss; beim Absenden schnappt der Bügel zu */
.fb-next .fb-shackle { transform: translateY(-2.5px); transition: transform 0.3s var(--spring); }
.fb-next.is-busy .fb-shackle { transform: none; }

/* ---------- KI-Einwilligung ---------- */
.fb-consent {
  background: var(--mint);
  border-left: 4px solid var(--apple);
  border-radius: 4px 12px 12px 4px;
  padding: 1.1rem 1.25rem;
  margin: -0.5rem 0 1.5rem;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.55;
}
.fb-consent p { margin: 0; }

/* ---------- Übersicht ---------- */
.fb-rv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem;
  padding: 0.7rem 0 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.fb-rv-row.is-yes::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--apple-deep);
}
.fb-rv-row dt { font-size: 0.82rem; color: var(--ink-3); }
.fb-rv-row dd { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.fb-rv-row dd span { font-weight: 600; overflow-wrap: anywhere; }
.fb-edit {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--apple-text);
  background: none;
  border: 0;
  padding: 0.75rem 0.25rem 0.75rem 0.75rem;   /* Tippfläche ≥ 44 px */
  min-height: 2.75rem;
  cursor: pointer;
  flex: none;
}

/* ---------- Unterschrift ---------- */
.fb-sig-wrap { margin-top: 0.25rem; }
.fb-sig-box { position: relative; }
.fb-sig-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--ink-3);
  font-size: 0.95rem;
  pointer-events: none;
}
.fb-sig.is-signed + .fb-sig-hint { display: none; }
.fb-sig-demo {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.fb-sig-demo svg { width: min(70%, 17rem); height: auto; overflow: visible; }
.fb-sig-ink, .fb-sig-tip { opacity: 0; }       /* nur während der Vorführung sichtbar */
.fb-sig-ink { stroke: var(--ink); stroke-width: 2.2; }
.fb-sig-tip { stroke: var(--apple); stroke-width: 10; stroke-dasharray: 0.001 2; }
.fb-sig.is-signed ~ .fb-sig-demo { display: none; }
.fb-sig-box.is-demo .fb-sig-ink { animation: fb-sig-ink 2.1s 0.4s linear; }
.fb-sig-box.is-demo .fb-sig-tip { animation: fb-sig-tip 2.1s 0.4s linear; }
.fb-sig-box.is-demo .fb-sig-hint { animation: fb-sig-yield 2.1s 0.4s linear; }
.fb-sig {
  display: block;
  width: 100%;
  height: 13rem;
  background: var(--surface);
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  touch-action: none;       /* Wischen zeichnet statt zu scrollen */
  cursor: crosshair;
}
.fb-sig.is-signed { border-style: solid; border-color: var(--apple-deep); }
.fb-sig-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-3);
  margin: 0.6rem 0 0;
}

/* ---------- Abschluss ---------- */
.fb-done-mark {
  width: 4.5rem;
  height: 4.5rem;
  position: relative;
  margin-bottom: 1.75rem;
}
.fb-done-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fb-done-ring { fill: var(--apple); stroke: var(--apple); stroke-width: 4; }
.fb-done-check { fill: none; stroke: var(--forest); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.fb-done-mark i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  margin: -0.225rem;
  border-radius: 50%;
  background: var(--apple);
  opacity: 0;
}
.fb-done-mark i:nth-of-type(even) { background: var(--forest); }
.fb-done-mark i:nth-of-type(1) { --a: 0deg; }
.fb-done-mark i:nth-of-type(2) { --a: 45deg; }
.fb-done-mark i:nth-of-type(3) { --a: 90deg; }
.fb-done-mark i:nth-of-type(4) { --a: 135deg; }
.fb-done-mark i:nth-of-type(5) { --a: 180deg; }
.fb-done-mark i:nth-of-type(6) { --a: 225deg; }
.fb-done-mark i:nth-of-type(7) { --a: 270deg; }
.fb-done-mark i:nth-of-type(8) { --a: 315deg; }
.fb-screen--done.is-active .fb-done-ring {
  animation: fb-draw 0.5s 0.2s var(--ease-io) backwards, fb-fill 0.3s 0.6s var(--ease) backwards;
}
.fb-screen--done.is-active .fb-done-check { animation: fb-draw 0.3s 0.75s var(--ease) backwards; }
.fb-screen--done.is-active .fb-done-mark i { animation: fb-burst 0.6s 0.95s var(--ease); }
.fb-ref { font-size: 1.05rem; margin: 0; }
.fb-ref strong { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.08em; }

/* ---------- Icons ---------- */
.fb-ico { display: inline-flex; width: 1.15rem; height: 1.15rem; flex: none; }
.fb-ico svg { width: 100%; height: 100%; }
.fb-ico--choice { width: 1.6rem; height: 1.6rem; }
.fb-sub { color: var(--ink-3); margin: -1.1rem 0 1.5rem; font-size: 0.98rem; }
.fb-opt { color: var(--ink-3); font-weight: 400; }

/* ---------- Start: Info-Pillen und Fahrplan ---------- */
.fb-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 2rem; padding: 0; }
.fb-pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}
.fb-pills .fb-ico { color: var(--apple-text); }

.fb-road { list-style: none; margin: 0; padding: 0; }
.fb-road-ico {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.6rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--ink-3);
  position: relative;
  z-index: 1;
}
.fb-road-item.is-now .fb-road-ico { background: var(--forest); border-color: var(--forest); color: #fff; }
.fb-road-item.is-done .fb-road-ico { background: var(--apple); border-color: var(--apple); color: var(--forest); }
.fb-road-label { font-weight: 600; color: var(--ink-2); }
.fb-road-item.is-next .fb-road-label { color: var(--ink-3); font-weight: 500; }

/* senkrecht (Start) */
.fb-road--list { display: grid; gap: 0.55rem; margin-bottom: 2rem; }
.fb-road--list .fb-road-item { display: flex; align-items: center; gap: 0.9rem; position: relative; }
.fb-road--list .fb-road-item + .fb-road-item::before {
  content: '';
  position: absolute;
  left: calc(1.25rem - 0.75px);
  top: -0.6rem;
  height: 0.65rem;
  border-left: 1.5px dashed var(--line);
}
.fb-road--list .fb-road-label { color: var(--ink); font-weight: 500; }

/* waagerecht (Kapitelkarte) */
.fb-road--row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0.5rem 0 0.5rem;
  position: relative;
}
.fb-road--row::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 1.25rem;
  border-top: 1.5px dashed var(--line);
}
.fb-road--row .fb-road-item { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; }
.fb-road--row .fb-road-label { font-size: 0.72rem; line-height: 1.2; overflow-wrap: anywhere; }

/* ---------- Kapitelkarte ---------- */
.fb-done-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  margin: 0 0 2rem;
  padding: 0.4rem 0.85rem 0.4rem 0.45rem;
  border-radius: 999px;
  background: var(--mint);
  color: #3c5a14;
  font-weight: 600;
  font-size: 0.92rem;
}
.fb-done-line .fb-ico { width: 1.5rem; height: 1.5rem; padding: 0.3rem; border-radius: 50%; background: var(--apple); color: var(--forest); }
.fb-kap-ico {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 22px;
  background: var(--forest);
  color: var(--apple);
  display: grid;
  place-items: center;
  margin-bottom: 1.5rem;
}
.fb-kap-ico .fb-ico { width: 2.1rem; height: 2.1rem; }
.fb-kap-ico { position: relative; }
.fb-kap-ico::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--apple);
  opacity: 0;
  pointer-events: none;
}
.fb-screen--kapitel.enter.is-active .fb-done-line .fb-ico { animation: fb-pop 0.3s 0.25s var(--spring) backwards; }
.fb-screen--kapitel.enter.is-active .fb-done-line path { animation: fb-draw 0.25s 0.45s var(--ease) backwards; }
.fb-screen--kapitel.enter.is-active .fb-kap-ico path { animation: fb-draw 0.75s 0.35s var(--ease-io) backwards; }
.fb-screen--kapitel.enter.is-active .fb-kap-ico { animation: fb-beat 0.45s 1.1s ease-in-out; }
.fb-screen--kapitel.enter.is-active .fb-kap-ico::after { animation: fb-ripple 0.7s 1.1s var(--ease); }
.fb-screen--kapitel .fb-q { font-size: clamp(2rem, 7.5vw, 2.8rem); }

/* ---------- Ankreuzliste ---------- */
.fb-tiles { display: grid; gap: 0.6rem; }
.fb-tile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  min-height: 3.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.fb-tile:hover { border-color: var(--apple); }
.fb-tile:active { transform: scale(0.985); }
.fb-tile:focus-visible { outline: 3px solid var(--apple); outline-offset: 2px; }
.fb-tile-box {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  border: 2px solid var(--ink-3);
  display: grid;
  place-items: center;
  color: transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.fb-tile-box .fb-ico { width: 1.05rem; height: 1.05rem; }
.fb-tile.is-on { border-color: var(--forest); background: #f1f6e8; }
.fb-tile.is-on .fb-tile-box { background: var(--forest); border-color: var(--forest); color: #fff; }
.fb-tile.is-pop .fb-tile-box { animation: fb-bump 0.3s var(--spring); }
.fb-tile.is-pop .fb-tile-box path { animation: fb-draw 0.26s 0.08s var(--ease) backwards; }
.fb-tile-wrap .fb-detail.is-open { margin: 0.6rem 0 0.4rem 2.9rem; }
@media (max-width: 26rem) {
  .fb-tile-wrap .fb-detail.is-open { margin-left: 0.25rem; }
}

/* ---------- Navigation: rechts ggf. „Überspringen“ + Hauptknopf ---------- */
.fb-nav-right { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; }
.fb-skip {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 3.4rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}
.fb-skip:hover { border-color: var(--apple); color: var(--ink); }
.fb-skip:focus-visible { outline: 3px solid var(--apple); outline-offset: 2px; }

/* ---------- KI-Einwilligung: Kernpunkte ---------- */
.fb-points { list-style: none; margin: -0.5rem 0 1.25rem; padding: 0; display: grid; gap: 0.7rem; }
.fb-points li { display: flex; align-items: center; gap: 0.8rem; color: var(--ink-2); line-height: 1.4; }
.fb-points .fb-ico {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.5rem;
  border-radius: 50%;
  background: var(--mint);
  color: #3c5a14;
}
.fb-consent-head { font-weight: 600; margin-bottom: 0.4rem !important; }
.fb-screen--ki .fb-consent { font-size: 0.92rem; }

/* ---------- Übersicht: aufklappbare Kapitel ---------- */
.fb-acc {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.fb-acc summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  min-height: 4rem;
  cursor: pointer;
  list-style: none;
}
.fb-acc summary::-webkit-details-marker { display: none; }
.fb-acc summary:focus-visible { outline: 3px solid var(--apple); outline-offset: -3px; }
.fb-acc-ico { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--mint); color: #3c5a14; }
.fb-acc-ico .fb-ico { width: 1.25rem; height: 1.25rem; }
.fb-acc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.fb-acc-text strong { font-size: 1rem; }
.fb-acc-text span { font-size: 0.88rem; color: var(--ink-3); overflow-wrap: anywhere; }
.fb-acc-chev { color: var(--ink-3); transition: transform 0.2s var(--ease); }
.fb-acc[open] .fb-acc-chev { transform: rotate(180deg); }
.fb-acc dl { margin: 0; padding: 0 1rem 0.5rem; border-top: 1px solid var(--line-soft); }
.fb-acc .fb-rv-row:last-child { border-bottom: 0; }

/* ---------- Hinweis „fehlt noch“ ---------- */
.fb-notice {
  margin: -0.25rem 0 1rem;
  padding: 0.7rem 0.95rem;
  border-radius: 4px 10px 10px 4px;
  border-left: 4px solid #c98a12;
  background: #fff6e2;
  color: #6b4500;
  font-weight: 600;
  font-size: 0.95rem;
}
.fb-acc--offen { border-color: #e2b25a; }
.fb-acc--offen .fb-acc-text span { color: #6b4500; }

/* ---------- Hilfsklassen ---------- */
.fb-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.fb-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;
}

/* ---------- Bewegung ----------
   Einmalige Keyframes, nie in Schleife. Gezeichnet wird über pathLength="1":
   Die Strichlücke steht nur in den Keyframes (backwards) — läuft keine
   Animation, ist der Strich einfach vollständig da. */
.fb {
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);   /* dezentes Überschwingen */
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}
@keyframes fb-draw {
  /* Lücke länger als der Pfad und Start knapp davor: sonst zeigt die runde Kappe
     vorab einen Punkt am Strichanfang */
  from { stroke-dasharray: 1 2; stroke-dashoffset: 1.01; }
  to   { stroke-dasharray: 1 2; stroke-dashoffset: 0; }
}
@keyframes fb-pop { from { opacity: 0; transform: scale(0); } }
@keyframes fb-bump { 50% { transform: scale(1.14); } }
@keyframes fb-beat { 35% { transform: scale(1.08); } 70% { transform: scale(0.98); } }
@keyframes fb-ripple { from { opacity: 0.7; transform: scale(1); } to { opacity: 0; transform: scale(1.45); } }
@keyframes fb-arrow-in { from { opacity: 0; transform: translateX(-14px); } }
@keyframes fb-fill { from { fill-opacity: 0; } }
@keyframes fb-burst {
  from { opacity: 1; transform: rotate(var(--a)) translateY(-2.7rem) scale(1); }
  to   { opacity: 0; transform: rotate(var(--a)) translateY(-3.9rem) scale(0.4); }
}
/* Unterschrift: Tinte und Fingerkuppe teilen sich Zeitachse und Kurve */
@keyframes fb-sig-ink {
  0%   { opacity: 1; stroke-dasharray: 1 2; stroke-dashoffset: 1.01; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  70%  { opacity: 1; stroke-dasharray: 1 2; stroke-dashoffset: 0; }
  85%  { opacity: 1; stroke-dasharray: 1 2; stroke-dashoffset: 0; }
  100% { opacity: 0; stroke-dasharray: 1 2; stroke-dashoffset: 0; }
}
@keyframes fb-sig-tip {
  0%   { opacity: 0; stroke-dashoffset: 0; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  4%   { opacity: 0.55; }
  70%  { opacity: 0.55; stroke-dashoffset: -1; }
  78%  { opacity: 0; stroke-dashoffset: -1; }
  100% { opacity: 0; stroke-dashoffset: -1; }
}
@keyframes fb-sig-yield { 0%, 100% { opacity: 1; } 8%, 85% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .fb-screen.enter, .fb-screen.enter-back, .fb-detail, .fb-seg > span,
  .fb-tile, .fb-tile-box, .fb-acc-chev, .fb-choice-badge, .fb-ico--arrow, .fb-ico--back,
  .fb-next .fb-shackle { transition: none; }
  .fb *, .fb *::before, .fb *::after { animation: none !important; }
}
