/* Scroll-Geschichte «Die Reise eines Briefes» (04.12.2026) */
main > section.story { --h: 9; padding: 0; }
.story { position: relative; background: #121212; color: #f1f1ef; }
.story__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.story__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.story__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden; }
.story__film.is-on { visibility: visible; }
/* dunkler Verlauf links, damit der Text auf jedem Bild lesbar bleibt */
.story__stage::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(18 18 18 / .82) 0%, rgb(18 18 18 / .55) 34%, rgb(18 18 18 / 0) 62%),
              linear-gradient(0deg, rgb(18 18 18 / .6) 0%, rgb(18 18 18 / 0) 30%); }
.story__steps { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.story__steps .wrap { position: relative; height: 100%; }
.story__step { position: absolute; left: var(--gut, 24px); bottom: 14vh; max-width: min(560px, 46vw);
  opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.story__step.is-on { opacity: 1; transform: none; pointer-events: auto; }
.story__step h1, .story__step h2 { margin: 0 0 16px; }
.story__step p { color: #c9cac4; max-width: 44ch; }
.story__step .t-label { color: var(--p-accent, #8fa68e); margin-bottom: 12px; }
.story__hint { position: absolute; left: 50%; bottom: 24px; z-index: 3; translate: -50% 0; font-size: 13px; color: #9a9b96;
  transition: opacity .3s; }
.story.is-moving .story__hint { opacity: 0; }

@media (max-width: 767px) {
  main > section.story { --h: 8; }
  .story__stage::after { background: linear-gradient(0deg, rgb(18 18 18 / .9) 0%, rgb(18 18 18 / .6) 40%, rgb(18 18 18 / 0) 70%); }
  .story__step { left: 20px; right: 20px; bottom: 10vh; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  main > section.story { height: auto; }
  .story__stage { position: relative; height: auto; min-height: 100svh; }
  .story__step { position: relative; left: auto; bottom: auto; opacity: 1; transform: none; margin: 0 0 48px; }
  .story__steps { position: relative; padding: 40vh 0 10vh; }
}

/* Play-Knopf: fährt selbst durch die Geschichte */
.story-play { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 20px 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--p-accent, #8fa68e); color: #1c1c1c; font: 600 15px/1 var(--font-text);
  box-shadow: 0 12px 30px -10px rgb(0 0 0 / .6); transition: transform .2s ease, background-color .2s ease; }
.story-play:hover { transform: translateY(-2px); }
.story-play:active { transform: translateY(0) scale(.98); }
.story-play__icon { width: 26px; height: 26px; border-radius: 50%; background: #1c1c1c; color: var(--p-accent, #8fa68e); display: grid; place-items: center; }
.story-play__icon svg { width: 12px; height: 12px; fill: currentColor; }
.story-play .i-pause { display: none; }
.story-play[aria-pressed="true"] .i-play { display: none; }
.story-play[aria-pressed="true"] .i-pause { display: block; }
html.is-autoplay { scroll-behavior: auto; }
@media (max-width: 639px) { .story-play { right: 16px; bottom: 16px; height: 44px; font-size: 14px; } }

/* Die Geschichte läuft über die ganze Seite weiter (04.12.2026) */
.kapitel { margin: 0 0 14px; font: 500 13px/1.2 var(--font-mono); letter-spacing: .04em; color: var(--p-accent, #8fa68e); }
main > section:not(.story), footer.closing { background: #151615; }
main > section:not(.story):nth-of-type(even) { background: #121312; }
.get { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.get li { position: relative; padding-left: 22px; color: #c9cac4; font-size: 15px; }
.get li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 6px; border: solid var(--p-accent, #8fa68e);
  border-width: 0 0 2px 2px; transform: rotate(-45deg); }
#ablauf .panel--top, #fragen .frame { background: #121212; }

/* Faden: dünne Linie links, wächst mit dem Lesen mit; der Punkt ist der Brief */
.faden { position: fixed; left: 14px; top: 12vh; bottom: 12vh; width: 2px; z-index: 40; pointer-events: none;
  background: rgb(255 255 255 / .08); border-radius: 2px; }
.faden i { position: absolute; left: 0; top: 0; width: 2px; height: calc(var(--faden, 0) * 100%); background: var(--p-accent, #8fa68e); border-radius: 2px; }
.faden i::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; translate: -50% 0; border-radius: 50%;
  background: var(--p-accent, #8fa68e); box-shadow: 0 0 0 4px rgb(143 166 142 / .2), 0 0 18px rgb(143 166 142 / .6); }
@media (max-width: 1023px) { .faden { display: none; } }

/* Auswahlmenü am Schluss */
.wahl__tiles { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wahl__tile { position: relative; display: grid; gap: 6px; align-content: start; min-height: 132px; padding: 20px 20px 18px; cursor: pointer;
  border: 1px solid rgb(255 255 255 / .12); border-radius: 16px; background: #1d1f1c;
  transition: transform .2s ease, border-color .2s ease, background-color .2s ease; }
.wahl__tile:hover { transform: translateY(-2px); border-color: rgb(143 166 142 / .55); }
.wahl__tile input { position: absolute; opacity: 0; pointer-events: none; }
.wahl__tile b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: #f1f1ef; }
.wahl__tile span { color: #a9aaa4; font-size: 14px; line-height: 1.4; }
.wahl__tile .wahl__n { font: 500 12px/1 var(--font-mono); color: var(--p-accent, #8fa68e); }
.wahl__tile:has(input:checked) { border-color: var(--p-accent, #8fa68e); background: #232a22; box-shadow: inset 0 0 0 1px var(--p-accent, #8fa68e); }
.wahl__tile:has(input:checked)::after { content: ""; position: absolute; right: 18px; top: 18px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--p-accent, #8fa68e) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.4 2.6 2.6L12 5.6' fill='none' stroke='%231c1c1c' stroke-width='2'/%3E%3C/svg%3E") center/12px no-repeat; }
.wahl__tile:has(input:focus-visible) { outline: 2px solid var(--p-accent, #8fa68e); outline-offset: 3px; }
@media (max-width: 1023px) { .wahl__felder { margin-top: 24px; } }
@media (max-width: 639px) { .wahl__tiles { grid-template-columns: 1fr; } .wahl__tile { min-height: 0; } }
/* Auswahl: eigenes Raster, Kacheln 3 x 2 */
main > section#auswahl { height: auto; min-height: 100svh; }
.wahl > .grid { display: grid; width: 100%; max-width: none; margin: 0; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; }
.wahl > .grid > * { grid-column: auto; }
.wahl__tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wahl__felder input { width: 100%; }
@media (max-width: 1023px) { .wahl > .grid { grid-template-columns: 1fr; } .wahl__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .wahl__tiles { grid-template-columns: 1fr; } }
.form.wahl { display: block; max-width: none; }

/* Fusszeile in den Farben des Films (05.12.2026: dunkle Schrift auf dunklem Grund war unlesbar) */
footer.closing.footer--statement { color: #f1f1ef;
  --bg: #151615; --surface: #222521; --ink: #f1f1ef; --muted: #9a9b96; --accent: #8fa68e;
  --action: #8fa68e; --action-ink: #1c1c1c;
  --line: rgb(255 255 255 / .12); --line-strong: rgb(255 255 255 / .24); }
footer.closing .close__word { color: #2a2d29; }

/* Auswahlmenü geordnet (06.12.2026): Formular als Karte, gleich hoch wie die Kacheln, mit Abständen */
main .section-head > p.kapitel { font-family: var(--font-mono); font-size: 14px; line-height: 1.4; letter-spacing: .04em; color: var(--p-accent); margin: 0; }
.form.wahl > .grid { align-items: stretch; }
.form.wahl .wahl__tiles { height: 100%; grid-auto-rows: 1fr; }
.form.wahl .wahl__felder { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; align-content: space-between; margin: 0;
  padding: 24px; border: 1px solid rgb(255 255 255 / .1); border-radius: 14px; background: #1c1d1b; }
.form.wahl .wahl__felder > * { grid-column: 1 / -1; margin: 0; min-width: 0; }
.form.wahl .wahl__felder > .field:nth-child(-n+2) { grid-column: auto; }
.form.wahl .btn-row .btn { width: 100%; justify-content: center; }
.form.wahl .form__status:empty { display: none; }
@media (max-width: 479px) { .form.wahl .wahl__felder > .field:nth-child(-n+2) { grid-column: 1 / -1; } }
/* Kapitel 6: Satz in der Mitte des Bildschirms, Überzeile mit Abstand */
#satz > .wrap { min-height: calc(100svh - 280px); display: flex; flex-direction: column; justify-content: center; }
#satz .kapitel { margin: 0 0 12px; }
#satz #satz-h { margin-bottom: 24px; }
/* Text und Knöpfe in der Geschichte nicht aneinander (06.12.2026) */
.story__step .btn-row { margin-top: 24px; }
@media (max-width: 767px) {
  .story__stage::after { background: linear-gradient(0deg, rgb(18 18 18 / .95) 0%, rgb(18 18 18 / .84) 48%, rgb(18 18 18 / .5) 62%, rgb(18 18 18 / 0) 80%); }
  .story__hint { display: none; }
  .story__step { bottom: 96px; }
  .nav .nav__toggle { margin-left: auto !important; }
  /* nach dem Start nur noch das runde Zeichen, damit der Knopf keinen Text verdeckt */
  :root:has(.story.is-moving) .story-play { padding: 0; width: 48px; height: 48px; justify-content: center; }
  :root:has(.story.is-moving) .story-play [data-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
