/* Interview-Seite. Gehört: Ablauf und Optik. Farben und Maße aus tokens.css.
   Leitidee: Papier, das sich faltet. Gerade Kanten, Faltflächen in zwei Blautönen, Orange nur für Schnabel,
   Aufnahme und den jüngsten Knick. Ein schweres Element je Bildschirm: der Aufnahmeknopf bzw. der Hauptknopf im Dock. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-color: var(--line) transparent; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.53;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--navy);
}
::selection { background: var(--accent-soft); color: var(--ink); }

.shell {
  max-width: 38rem;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(var(--dock-h, 0px) + 28px) max(20px, env(safe-area-inset-left));
}

/* ---------- Kopf ---------- */

.topbar { view-transition-name: topbar; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); }
.brand { display: inline-flex; align-items: baseline; gap: .32em; color: var(--navy); letter-spacing: -.02em; }
.brand-flow { font-size: 1.32rem; font-weight: 800; }
.brand-by { font-size: .78rem; font-weight: 650; color: var(--accent-ink); letter-spacing: 0; }
.topnav { display: flex; gap: 6px; transition: opacity .24s ease; }
.rec-cancel-slot { margin-left: auto; }
.rec-cancel-slot:empty { display: none; }
body.is-recording .topnav { display: none; }
.topnav[hidden] { display: none; }
.nav-btn {
  min-height: 48px; padding: 6px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: .94rem; font-weight: 550;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, border-color .2s ease;
}
@media (hover: hover) { .nav-btn:hover { background: var(--surface); border-color: #D6CCBD; } }
.nav-btn[aria-current="page"] { background: var(--surface); border-color: var(--navy); }
.nav-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Themenpfad: fünf gefaltete Felder */
.pfad { margin: 6px 0 2px; }
.pfad[hidden] { display: none; }
.pfad-band { display: flex; gap: 4px; height: 8px; }
.pfad-seg {
  position: relative; flex: 1 1 0; overflow: hidden;
  background: linear-gradient(100deg, var(--navy-tint) 0 56%, #DAE0EB 56% 100%); box-shadow: inset 0 -1px 0 #7D89A6;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  transform-origin: center top;
}
.pfad-seg:first-child { clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.pfad-seg:last-child { clip-path: polygon(4px 0, 100% 0, 100% 100%, 0 100%); }
.pfad-fill { position: absolute; inset: 0; background: linear-gradient(100deg, var(--navy) 0 56%, var(--fold-2) 56% 100%); transform-origin: left center; transform: scaleX(var(--fill, 0)); transition: transform .6s cubic-bezier(.22,1,.36,1); }
.pfad-seg.current { background: var(--navy-tint); box-shadow: inset 0 2px 0 var(--navy); }
.pfad-seg.just-done { animation: pfad-flip .64s .15s 1 both; }
.pfad-seg.just-done .pfad-fill { animation: pfad-ink .64s steps(1) .15s 1 both; }
@keyframes pfad-flip {
  0% { transform: perspective(240px) rotateX(0); animation-timing-function: cubic-bezier(.55,0,1,.45); }
  50% { transform: perspective(240px) rotateX(-90deg); animation-timing-function: cubic-bezier(0,.55,.45,1); }
  100% { transform: perspective(240px) rotateX(0); }
}
@keyframes pfad-ink { 0% { opacity: 0; } 50% { opacity: 1; } }
.pfad-seg.fold-in { animation: fold-in .7s cubic-bezier(.65,0,.35,1) both; }
@keyframes fold-in { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.12); opacity: 0; } }
.feier-label { margin: 8px 0 0; font-size: .875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pfad-label { margin: 8px 0 0; font-size: .875rem; line-height: 1.35; color: var(--ink-2); display: flex; gap: 12px; align-items: baseline; }
.pfad-thema { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pfad-frage { margin-left: auto; white-space: nowrap; }
.pfad-label b { color: var(--navy); font-weight: 700; }
.pfad-label { font-variant-numeric: tabular-nums; }

/* ---------- Bühne: Flowy + Inhalt ---------- */

.stage { display: block; }
.flowy-slot { margin: 18px 0 6px; min-height: 86px; view-transition-name: flowy; --flowy-size: 104px; }

.banner {
  margin: 10px 0; padding: 12px 14px; border-radius: var(--radius);
  background: #FFF4E0; border: 1px solid #F1D29A; color: #6B4A0F; font-size: .97rem;
}
.banner[hidden] { display: none; }

.notice {
  position: fixed; z-index: 30; left: 50%; top: calc(env(safe-area-inset-top) + 12px);
  width: min(36rem, calc(100% - 32px)); transform: translateX(-50%);
  padding: 12px 16px; border-radius: 14px; font-size: .97rem; line-height: 1.4;
  background: var(--navy); color: #fff;
  box-shadow: 0 2px 4px rgba(22,41,74,.12), 0 14px 32px -12px rgba(22,41,74,.45);
  animation: notice-in .24s cubic-bezier(.22,1,.36,1);
}
.notice[hidden] { display: none; }
.notice[data-kind="ok"] { background: var(--navy); }
.notice[data-kind="warn"] { background: #7A4E0C; }
.notice[data-kind="err"] { background: var(--err); }
.notice.leaving { animation: notice-out .16s ease-in forwards; }
@keyframes notice-out { to { opacity: 0; transform: translate(-50%, -6px); } }
@keyframes notice-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Bildschirm ---------- */

.screen { outline: none; }
.screen:focus, h1[tabindex="-1"]:focus, h1[tabindex="-1"]:focus-visible { outline: none; }

h1 {
  margin: 10px 0 14px;
  font-size: 1.75rem; line-height: 1.18; font-weight: 750; letter-spacing: -.022em;
  text-wrap: balance;
}
h2 { font-size: 1.06rem; line-height: 1.3; font-weight: 700; margin: 0 0 8px; letter-spacing: -.01em; }
p { margin: 0 0 14px; text-wrap: pretty; }
.lead { font-size: 1.12rem; line-height: 1.5; color: var(--ink); }
.ask { font-weight: 650; margin: 26px 0 10px; }
.muted, .hint { color: var(--ink-2); }
.hint { font-size: .94rem; line-height: 1.45; }
.question { font-size: 1.85rem; line-height: 1.16; letter-spacing: -.024em; margin: 6px 0 12px; font-weight: 750; }
.q-head { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.help { color: var(--ink-2); font-size: 1rem; line-height: 1.5; max-width: 34rem; }

/* Während der Aufnahme tritt alles außer der Frage zurück */
.rec-fade { transition: opacity .24s cubic-bezier(.22,1,.36,1); }
body.is-recording .rec-fade { opacity: 0; pointer-events: none; }

/* ---------- Hinweise ---------- */

.hinw { display: grid; gap: 24px; margin: 6px 0 10px; }
.hinw-group { display: grid; grid-template-columns: 28px 1fr; gap: 4px 14px; }
.hinw-icon { grid-row: span 2; width: 28px; height: 28px; color: var(--navy); margin-top: 1px; }
.hinw-group h2 { margin: 2px 0 2px; }
.hinw-group ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--ink-2); }
.hinw-ok { margin: 26px 0 0; display: grid; gap: 4px; }
.hinw-ok .actions { margin-top: 12px; }
.hinw-flex { margin: 22px 0 0; color: var(--ink-2); font-size: .97rem; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- Kästen ---------- */

.box { padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin: 12px 0; }
.box p:last-child { margin-bottom: 0; }
.box-ok { border: 0; background: none; padding: 4px 0; color: var(--ink); }
.box-warn { border-color: #EBD3A6; background: #FFF7E8; color: #5E420C; }
.answered { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.tick { position: relative; flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; background: var(--navy); color: #fff; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.tick::after { content: ""; position: absolute; top: 0; right: 0; width: 8px; height: 8px; background: var(--fold-1); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.tick svg { width: 16px; height: 16px; }
.status { font-weight: 650; color: var(--ink-2); }
.status.ok { color: var(--navy); }
.status.answered { display: flex; align-items: center; gap: 12px; }

/* ---------- Knöpfe ---------- */

.actions { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 8px; }
.links { display: flex; flex-wrap: wrap; gap: 2px 20px; margin: 4px 0; }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 54px; padding: 12px 22px;
  border: 1.5px solid var(--navy); border-radius: 16px;
  background: transparent; color: var(--navy);
  font: inherit; font-weight: 650; font-size: 1.05rem; letter-spacing: -.005em;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: background-color .18s ease, transform .16s cubic-bezier(.22,1,.36,1), box-shadow .2s ease, opacity .2s ease;
}
@media (hover: hover) { .btn:hover { background: var(--surface); } }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 2px 0 rgba(22,41,74,.22); }
@media (hover: hover) { .btn-primary:hover { background: var(--navy-2); } }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn .btn-arrow { width: 18px; height: 18px; transition: transform .2s cubic-bezier(.22,1,.36,1); }
@media (hover: hover) { .btn:hover .btn-arrow { transform: translateX(3px); } }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-choice { min-height: 68px; font-size: 1.15rem; border-radius: 6px; background: var(--surface); border-color: var(--line); box-shadow: 1px 1px 0 var(--line); }
@media (hover: hover) { .btn-choice:hover { border-color: var(--navy); background: var(--surface); } }

.link {
  min-height: var(--tap); padding: 8px 2px;
  border: 0; background: none; color: var(--navy);
  font: inherit; font-size: 1rem; font-weight: 550;
  text-decoration: underline; text-decoration-color: rgba(22,41,74,.35);
  text-underline-offset: 4px; text-decoration-thickness: 1px;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: text-decoration-color .2s ease;
}
@media (hover: hover) { .link:hover { text-decoration-color: currentColor; } }
.link-quiet { color: var(--ink-2); }
.link-nav { display: inline-flex; align-items: center; gap: 4px; }
.link-nav .link-ico { display: inline-flex; width: 16px; height: 16px; }
.link-nav .link-ico svg { width: 16px; height: 16px; }
.link-nav .lang { display: none; }
.write-links { margin-top: 10px; }
.write-links .links-split { margin-top: 2px; }
.ds-fuss { margin: 28px 0 0; }
.ds-link { font-size: .92rem; min-height: 44px; display: inline-flex; align-items: center; }
.links-split { justify-content: space-between !important; }
.links-split:has(> span:only-child) { display: none; }
.link-danger { color: var(--err); text-decoration-color: rgba(179,65,46,.4); }
.link:disabled { opacity: .4; cursor: not-allowed; }

/* Vorlesen: runder Knopf neben der Frage */
.speak-btn {
  width: 48px; height: 48px; margin-top: 4px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--navy);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: box-shadow .2s ease, border-color .2s ease, color .2s ease;
}
.speak-btn svg { width: 20px; height: 20px; }
.speak-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent-ink); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; margin: 18px 0 0; }
.switch input { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: var(--navy-tint); box-shadow: inset 0 0 0 1.5px #7D89A6; position: relative; cursor: pointer; transition: background-color .2s ease; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .24s cubic-bezier(.22,1,.36,1); }
.switch input:checked { background: var(--navy); box-shadow: none; }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Dock (Aktionen unten in Daumenreichweite) ---------- */

.dock {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  padding: 12px max(20px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: var(--bg);
  border-top: 1px solid transparent;
  transition: border-color .2s ease;
  view-transition-name: dock;
}
.dock.scrolled { border-top-color: var(--line); }
.dock[hidden] { display: none; }
.dock-inner { max-width: 38rem; margin: 0 auto; }
.dock .actions { margin: 0; }
.dock .links { justify-content: center; margin: 2px 0 -6px; }

/* Aufnahme-Steuerung */
.rec { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "c c c" "l u r"; align-items: center; gap: 4px 8px; }
.rec > .rec-center { grid-area: c; }
.rec > .rec-side { grid-area: l; }
.rec > .rec-side.right { grid-area: r; }
.rec > .rec-under { grid-area: u; margin: 0; }
.rec-side { display: flex; align-items: center; min-width: 0; }
.rec-side.right { justify-content: flex-end; }
.rec-side .link { font-size: .97rem; white-space: nowrap; }
.rec-under { display: flex; justify-content: center; }
.rec-under .link { font-size: .97rem; }
.rec-center { display: grid; justify-items: center; gap: 16px; }
.rec-btn {
  position: relative; width: 80px; height: 80px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 40px; background: var(--navy); color: #fff;
  font: inherit; font-size: 1.08rem; font-weight: 650;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 0 rgba(22,41,74,.22);
  transition: width .32s cubic-bezier(.22,1,.36,1), background-color .2s ease, transform .16s cubic-bezier(.22,1,.36,1);
}
.rec-btn:active { transform: scale(.96); }
.rec-btn:disabled { opacity: .5; cursor: progress; }
.rec-btn .rec-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--bg); flex: 0 0 auto; transition: border-radius .3s ease, width .3s ease, height .3s ease, background-color .3s ease; }
.rec-btn .rec-word { display: none; }
.rec-btn.is-live { width: 200px; }
.rec-btn.is-live .rec-dot { width: 14px; height: 14px; border-radius: 3px; background: #fff; }
.rec-btn.is-live .rec-word { display: inline; animation: word-in .2s ease .12s both; }
@keyframes word-in { from { opacity: 0; } to { opacity: 1; } }
.paper-ring { position: absolute; left: -9px; top: -9px; pointer-events: none; overflow: visible; opacity: 0; transition: opacity .3s ease; }
.rec-btn.is-live .paper-ring { opacity: 1; }
.paper-ring rect { fill: none; stroke-width: 3; stroke-linecap: butt; transition: stroke-dasharray .12s linear; }
.paper-ring .pr-a { stroke: var(--navy); }
.paper-ring .pr-b { stroke: var(--fold-1); }
.paper-ring .pr-o { stroke: var(--accent); stroke-width: 3.5; }
.rec-btn.is-live .rec-ring { display: none; }
.rec-ring { position: absolute; inset: -7px; border-radius: 47px; border: 2px solid var(--accent); opacity: 0; transform: scale(.94); transition: opacity .3s ease, transform .3s ease; pointer-events: none; }
.rec-btn.is-live .rec-ring { opacity: .9; transform: scale(calc(1 + var(--lvl, 0) * .07)); transition: transform .08s linear, opacity .3s ease; }
.rec-btn.is-prep .rec-ring { opacity: 1; transform: none; border-color: var(--accent) var(--accent) transparent transparent; animation: prep-spin .8s linear infinite; }
@keyframes prep-spin { to { transform: rotate(360deg); } }
.rec-btn.is-prep { cursor: progress; }
.rec-btn.nudge .rec-ring { animation: ring-nudge .28s cubic-bezier(.22,1,.36,1) 1; }
@keyframes ring-nudge { 50% { transform: scale(1.1); } }
body.is-recording .rec-key { visibility: hidden; }
.rec-label { font-size: .94rem; font-weight: 650; color: var(--navy); min-height: 1.4em; font-variant-numeric: tabular-nums; text-align: center; }
.rec-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }
@keyframes live { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
.rec-top { display: flex; justify-content: flex-start; margin: -10px 0 0; }
.rec-key { margin: 8px 0 0; text-align: center; font-size: .82rem; color: var(--ink-3); }
.rec-confirm { display: grid; gap: 10px; }
.rec-confirm p { margin: 0; text-align: center; font-weight: 600; }
.rec-confirm .row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }

/* Faltlinie: die Stimme faltet einen Papierstreifen */
.faltlinie { display: block; width: 100%; height: 64px; margin: 22px 0 6px; overflow: visible; opacity: 0; transition: opacity .3s ease; }
body.is-recording .faltlinie { opacity: 1; }
.faltlinie .falz { stroke: var(--fold-1); stroke-width: 1; vector-effect: non-scaling-stroke; }
.faltlinie .knick { stroke: var(--accent); stroke-width: 1.75; vector-effect: non-scaling-stroke; }
.faltlinie.spricht .falz { opacity: .8 !important; transition: opacity .2s ease; }
.faltlinie.closing { opacity: 1 !important; transition: none; }
.faltlinie.collapse { animation: falt-zu .28s cubic-bezier(.65,0,.35,1) forwards; transform-origin: center; transform-box: fill-box; }
@keyframes falt-zu { to { transform: scaleX(0); opacity: 0; } }
.rec-hinweis { text-align: center; color: var(--ink-2); font-size: .97rem; }

/* Pegel im Technik-Check: Striche */
.meter { display: flex; align-items: center; justify-content: center; gap: 4px; height: 48px; margin: 16px 0 10px; }
.meter i { width: 4px; height: 4px; border-radius: 2px; background: var(--navy); transition: height .09s linear; }
.meter i:last-child { background: var(--accent); }

/* ---------- Formulare ---------- */

.label { display: block; font-weight: 650; margin: 14px 0 6px; }
.text, .link-field {
  width: 100%; font: inherit; font-size: 1.0625rem; /* ≥ 16px: iOS zoomt sonst */
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.text { min-height: 7.5rem; max-height: 50dvh; resize: vertical; field-sizing: content; scroll-margin-bottom: calc(var(--dock-h, 0px) + 24px); scroll-margin-top: 90px; }
.text:focus, .link-field:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22,41,74,.14); }
.link-field { min-height: var(--tap); font-size: 1rem; color: var(--ink-2); }
.check {
  display: flex; align-items: flex-start; gap: 12px; min-height: var(--tap); padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--navy); }
.check.nudge { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: shake .3s cubic-bezier(.36,.07,.19,.97) 1; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.dock .check { margin-bottom: 10px; }

details.more { margin: 8px 0 16px; }
details.more summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; color: var(--navy); font-weight: 650; }
.steps { margin: 0 0 18px; padding-left: 1.3em; }
.steps li { margin: 0 0 10px; }

.q-foot { margin-top: 24px; }

/* ---------- Themenabschluss und Abschluss ---------- */

.feier { margin: 8px 0 22px; }
.feier-gross .pfad-band { height: 56px; gap: 8px; }
.feier-gross .pfad-seg { clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
.feier-gross .pfad-seg:first-child { clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); }
.feier-gross .pfad-seg:last-child { clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%); }
.feier-gross .pfad-seg.just-done { animation-duration: .52s; }
.feier-gross .pfad-seg.just-done::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: 0; animation: kante .9s ease .45s 1 both; }
@keyframes kante { 20% { opacity: 1; } 100% { opacity: 0; } }
.erledigt { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 10px; }
.erledigt li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; color: var(--ink-2); }
.erledigt .tick { width: 22px; height: 22px; margin-top: 2px; }
.erledigt .tick svg { width: 13px; height: 13px; }
.feier .pfad-band { height: 22px; gap: 6px; }
.feier .pfad-seg { clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.feier .pfad-seg:first-child { clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.feier .pfad-seg:last-child { clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%); }
.ausblick { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.begr-zusage { font-weight: 650; color: var(--navy); }
.begr-band { display: flex; gap: 6px; height: 14px; margin: 30px 0 8px; }
.begr-band .pfad-seg { animation: seg-in .36s cubic-bezier(.22,1,.36,1) both; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.begr-band .pfad-seg:first-child { clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.begr-band .pfad-seg:last-child { clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%); }
@keyframes seg-in { from { transform: perspective(200px) rotateX(-90deg); opacity: 0; } }
.ausblick-titel { font-size: 1.35rem; line-height: 1.25; font-weight: 750; letter-spacing: -.018em; margin: 0 0 6px; }
.stage:has(#app[data-screen="fertig"]) .flowy-slot { display: none; }
.werk { position: relative; display: grid; justify-items: center; gap: 18px; margin: 18px 0 8px; }
.werk-vogel { width: 168px; opacity: 0; transform: scale(.4); }
.werk-vogel svg { display: block; width: 100%; height: auto; overflow: visible; }
.werk.geboren .werk-vogel, .werk.fertig-statisch .werk-vogel { animation: werk-born .7s cubic-bezier(.16,1,.3,1) both; }
.werk.fertig-statisch .werk-vogel { animation-duration: .2s; }
.werk.fertig-statisch .pfad-band { display: none; }
@keyframes werk-born { from { opacity: 0; transform: scale(.4) rotate(-10deg); } to { opacity: 1; transform: none; } }
.werk .pfad-band { width: 100%; height: 22px; gap: 6px; transition: height .24s ease, opacity .24s ease, margin .24s ease; }
.werk .pfad-band.zu { height: 0; opacity: 0; margin-top: -18px; }
.werk-blase { justify-self: center; margin: 0 auto 6px; width: fit-content; }
.werk-blase::before { left: 50% !important; top: -7px !important; transform: translateX(-50%) rotate(135deg) !important; }
.werk-blase { clip-path: polygon(0 0, calc(50% - 10px) 0, 50% -12px, calc(50% + 10px) 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%) !important; }
#app[data-screen="fertig"] h1 { font-size: 2.3rem; letter-spacing: -.026em; }

/* ---------- Übersicht: Themen direkt auf dem Papier, getrennt durch Faltkanten ---------- */

.ov-stand { margin: 4px 0 10px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ov { display: grid; }
.ov-block { position: relative; padding: 2px 0; }
.ov-block + .ov-block::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); transform: rotate(-.6deg); transform-origin: left; }
.ov-block > summary { list-style: none; display: grid; grid-template-columns: 34px 1fr 24px; gap: 0 14px; align-items: center; padding: 16px 0; min-height: 64px; cursor: pointer; }
.ov-block > summary::-webkit-details-marker { display: none; }
.ov-seg { position: relative; width: 34px; height: 10px; overflow: hidden; background: var(--navy-tint); clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%); }
.ov-head { display: grid; gap: 2px; min-width: 0; }
.ov-titel { font-weight: 700; letter-spacing: -.01em; }
.ov-meta { font-size: .875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ov-chev { width: 20px; height: 20px; color: var(--ink-2); transition: transform .25s cubic-bezier(.22,1,.36,1); }
.ov-block[open] .ov-chev { transform: rotate(180deg); }
.ov-list { list-style: none; margin: -4px 0 10px 48px; padding: 0; }
.ov-item {
  display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start;
  width: 100%; min-height: 52px; padding: 11px 8px 11px 0; text-align: left;
  border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.4; cursor: pointer; border-radius: 10px;
}
@media (hover: hover) { .ov-item:hover .ov-text { text-decoration: underline; text-decoration-color: rgba(22,41,74,.35); text-underline-offset: 3px; } }
.ov-item.current .ov-text { font-weight: 650; }
.ov-mark { width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center; }
.ov-item:not(.done) .ov-mark::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.ov-item.current:not(.done) .ov-mark::before { width: 10px; height: 10px; border-radius: 0; background: var(--navy); clip-path: polygon(0 0, 100% 0, 0 100%); }
.ov-item.done .ov-mark { background: var(--navy); color: #fff; clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%); }
.ov-mark svg { width: 12px; height: 12px; }
.ov-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Übergänge zwischen Bildschirmen ---------- */

::view-transition-old(root) { animation: vt-out .14s ease-in both; }
::view-transition-new(root) { animation: vt-in .3s cubic-bezier(.22,1,.36,1) both; }
html.vt-back::view-transition-new(root) { animation-name: vt-in-back; }
::view-transition-group(flowy), ::view-transition-group(topbar), ::view-transition-group(dock) { animation-duration: .3s; animation-timing-function: cubic-bezier(.22,1,.36,1); }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes vt-in-back { from { opacity: 0; transform: translateX(-16px); } }

/* ---------- Zugänglichkeit ---------- */

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.btn-primary:focus-visible, .rec-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--navy); }
.text:focus-visible { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.noscript { max-width: 38rem; margin: 24px auto; padding: 0 16px; }

/* ---------- Größere Bildschirme ---------- */

@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .question { font-size: 2.1rem; }
}

@media (min-width: 960px) {
  body { font-size: 1.125rem; }
  .link-nav .lang { display: inline; }
  .link-nav .kurz { display: none; }
  .shell { max-width: calc(232px + 64px + 42rem + 80px); padding-left: 40px; padding-right: 40px; padding-bottom: 48px; }
  .stage { display: grid; grid-template-columns: 232px minmax(0, 42rem); gap: 0 64px; align-items: start; align-content: start; padding-top: clamp(24px, 8vh, 96px); }
  .flowy-slot { grid-row: 1 / span 2; position: sticky; top: 40px; margin-top: 8px; --flowy-size: 136px; }
  .flowy-slot.flowy { flex-direction: column; align-items: flex-start; gap: 18px; }
  .flowy-slot .flowy-bubble { max-width: 100%; }
  .flowy-slot .flowy-bubble::before { left: 44px; top: -7px; transform: rotate(135deg); }
  .flowy-slot .flowy-bubble { clip-path: polygon(0 0, 40px 0, 50px -12px, 60px 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); }
  .screen { padding-top: 0; grid-column: 2; }
  h1 { font-size: 2.3rem; }
  .question { font-size: 2.75rem; line-height: 1.1; }
  .stage > .dock { grid-column: 2; position: static; padding: 0; margin: 36px 0 0; background: none; border: 0; transform: none !important; }
  .stage > .dock .dock-inner { max-width: none; margin: 0; }
  .dock .actions, .actions { flex-direction: row; flex-wrap: wrap; }
  .dock .actions .btn, .actions .btn { width: auto; min-width: 13rem; }
  .dock .links { justify-content: flex-start; }
  .rec { grid-template-columns: auto auto 1fr; grid-template-areas: "c c c" "u l r"; gap: 12px 28px; }
  .rec-center { display: flex; align-items: center; gap: 22px; justify-self: start; }
  .rec-side.right { justify-content: flex-end; }
  .rec > .rec-under { justify-content: flex-start; }
  .rec-label { text-align: left; }
  .rec-btn { width: 96px; height: 96px; border-radius: 48px; }
  .rec-btn.is-live { width: 220px; }
  .rec-ring { border-radius: 55px; }
  .rec-under { justify-content: flex-start; }
  .rec-key { text-align: left; }
  .faltlinie { margin-top: 28px; }
  .rec-hinweis { text-align: left; }
  .pfad-band { height: 10px; }
  .meter { justify-content: flex-start; }
  .feier-gross .pfad-band { height: 72px; }
  .hinw-ok { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0 22px; border-top: 1px solid var(--line); margin-top: 24px; }
  .stage:has(#app[data-screen="begruessung"]), .stage:has(#app[data-screen="pause"]), .stage:has(#app[data-screen="unbekannt"]), .stage:has(#app[data-screen="fertig"]), .stage:has(#app[data-screen="rueckkehr"]) { min-height: calc(100dvh - 140px); align-content: center; padding-top: 0; }
  .werk-vogel { width: 220px; }
  .werk { justify-items: start; }
  .werk-blase { justify-self: start; margin-left: 40px; }
  #app[data-screen="fertig"] h1 { font-size: clamp(2.5rem, 1.6rem + 2.4vw, 3.25rem); letter-spacing: -.028em; }
}

@media (prefers-reduced-motion: reduce) {
  .rec-btn.is-live .rec-ring { transform: none !important; opacity: calc(.5 + var(--lvl, 0) * .5); }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* ---------- Version 2: Nachfragen und Stimme ---------- */
.nf-eyebrow { display: flex; align-items: center; gap: 8px; margin: 18px 0 2px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); }
.nf-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.nf-kontext { color: var(--ink-3); font-size: .95rem; }
.denkt { display: flex; align-items: center; gap: 12px; margin: 18px 0 0; color: var(--ink-2); }
.denkt-punkte { display: inline-flex; gap: 6px; }
.denkt-punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--fold-1); opacity: .25; animation: denkt 1.2s ease-in-out infinite; }
.denkt-punkte i:nth-child(2) { animation-delay: .2s; }
.denkt-punkte i:nth-child(3) { animation-delay: .4s; }
@keyframes denkt { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .denkt-punkte i { animation: none; opacity: .6; } }
.denkt-frage { color: var(--ink-2); }
.stimme-probe { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.stimme-probe .hint { margin: 0; }
.stimme-zeile { display: flex; }
#app[data-screen="uebersicht"] > .switch { margin: 4px 0 18px; }

