/* Oberfläche Adventskalender, Richtung Papier. Werte nur aus /tokens.css; Aufbau nach design/papier.html und design/gemeinsam.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); /* Spalte: main wächst, der Fuß schließt auch auf kurzen Seiten am Bildrand ab */
  font: 400 var(--groesse-text)/var(--zeile-text) var(--schrift-text);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button, a, [role="button"] { touch-action: manipulation; }
button, [role="button"] { user-select: none; -webkit-user-select: none; }
a { color: inherit; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

.sprung {
  position: absolute; left: var(--rand-seite); top: var(--abstand-2); z-index: 30; padding: var(--abstand-3) var(--abstand-4);
  background: var(--knopf-bg); color: var(--knopf-text); border-radius: var(--radius); transform: translateY(-200%);
}
.sprung:focus { transform: none; }
.ansage { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.band {
  padding: var(--abstand-2) var(--rand-seite); text-align: center; font-size: var(--groesse-klein); font-weight: 500;
  background: var(--knopf-bg); color: var(--knopf-text);
}

main { flex: 1 0 auto; }
.seite { width: 100%; max-width: var(--breite-seite); margin: 0 auto; padding: 0 var(--rand-seite) var(--abstand-10); }
.kopf { display: flex; justify-content: space-between; align-items: center; gap: var(--abstand-3); padding-top: var(--abstand-3); padding-bottom: 0; }

.beispiel {
  display: inline-block; font-size: .75rem; line-height: 1; padding: 4px 7px; border-radius: 4px;
  border: 1px solid var(--linie-stark); color: var(--text-leise); vertical-align: middle;
}

/* Abschnitte */
.block { padding: var(--abstand-6) 0; border-top: 1px solid var(--linie); }
.block:first-child { border-top: 0; }
.ueber { font: 500 .875rem/1.3 var(--schrift-text); color: var(--akzent-text); margin-bottom: var(--abstand-2); display: flex; gap: var(--abstand-2); align-items: center; flex-wrap: wrap; }
.titel { font: 400 var(--groesse-titel)/1.15 var(--schrift-display); letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.titel-gross { font: 400 var(--groesse-titel-gross)/1.08 var(--schrift-display); letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.text { margin-top: 10px; color: var(--text-leise); max-width: 54ch; text-wrap: pretty; }
.text strong { color: var(--text); font-weight: 500; }
.kleingedruckt { font-size: var(--groesse-klein); color: var(--text-leise); margin-top: 14px; }
/* Link allein in der Zeile: Trefferfläche 44 px, die Zeile bleibt so hoch wie zuvor */
.link-zeile { display: inline-flex; align-items: center; min-height: var(--trefferflaeche); margin-block: -12px; }

/* Start und Vorschau */
.start-knopf { margin-top: var(--a-5); }
.zaehler { margin-top: var(--abstand-2); color: var(--text-leise); font-size: .9375rem; font-variant-numeric: tabular-nums; }

/* Türchen-Ansicht */
.blatt-tuer { padding-bottom: var(--abstand-2); }

/* Türchen */
.blatt-kopf { display: grid; grid-template-columns: auto 1fr; gap: var(--abstand-4); align-items: end; margin: var(--abstand-4) 0 18px; }
.blatt-kopf > div { min-width: 0; }
.ziffer-mittel { font: 400 5rem/.8 var(--schrift-display); letter-spacing: -.03em; }
.karte-offen { position: relative; padding: 10px; background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: 3px; box-shadow: var(--schatten-karte); }

.video {
  position: relative; aspect-ratio: 4 / 5; width: 100%; border-radius: var(--radius-bild);
  overflow: hidden; background: var(--video-bg); display: grid; place-items: center;
}
.video video, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; background: transparent; }
.video-start {
  position: relative; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--schleier-bild); color: #FFFDF9; display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255, 253, 249, .35); transition: transform var(--dauer-druck) var(--kurve-aus);
}
.video-start:active { transform: scale(.96); }
.video-start svg { width: 22px; height: 22px; margin-left: 3px; }
.video-info {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: var(--abstand-2);
  padding: var(--a-10) var(--a-3) var(--a-3); font-size: var(--groesse-klein); font-weight: 500; color: #FFFDF9;
  /* Schleier unter der Zeile: auf weißem Bild ab 60 % mindestens #6D6C6B, 5,22:1 gegen #FFFDF9 */
  background: linear-gradient(to bottom, rgba(20, 18, 16, 0), rgba(20, 18, 16, .62) 60%); pointer-events: none;
}
.video-ton {
  position: absolute; right: 12px; top: 12px; min-height: var(--trefferflaeche); padding: 0 14px; border: 0; border-radius: 22px; cursor: pointer;
  background: var(--schleier-bild); color: #FFFDF9; font-size: .875rem; font-weight: 500;
}
/* Fokus auf dem Standbild: heller Ring mit dunklem Hof, auf hellem wie dunklem Bild zu sehen (der Goldton allein versinkt im Foto) */
.video-start:focus-visible, .video-ton:focus-visible { outline: 2px solid #FFFDF9; outline-offset: 2px; box-shadow: 0 0 0 6px var(--schleier-bild); }
.video-platz { position: relative; padding: var(--abstand-5); display: grid; gap: var(--abstand-3); text-align: center; max-width: 30ch; }
.video-platz p { color: var(--video-text); font-size: .9375rem; }
.video-zusatz { display: grid; gap: var(--abstand-1); margin-top: var(--abstand-2); }
.ki-hinweis { font-size: var(--groesse-klein); color: var(--text-leise); }
.aufklapp summary {
  min-height: var(--trefferflaeche); display: flex; align-items: center; cursor: pointer; font-weight: 500; font-size: .9375rem;
  list-style: none; gap: var(--abstand-2);
}
.aufklapp summary::-webkit-details-marker { display: none; }
.aufklapp summary::before { content: ""; width: 7px; height: 7px; border: solid var(--text-leise); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform var(--dauer-wechsel) var(--kurve-aus); }
.aufklapp[open] summary::before { transform: rotate(45deg); }
.aufklapp div { color: var(--text-leise); padding-bottom: var(--abstand-3); white-space: pre-line; }

.gewinn { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; }
.gewinn > div { min-width: 0; }
.gewinn-zeichen {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--akzent-orn); color: var(--akzent-text); font: 500 1.25rem/1 var(--schrift-display);
}
.gewinn h3 { font: 500 1.125rem/1.3 var(--schrift-text); overflow-wrap: anywhere; }
.gewinn-bild { border-radius: var(--radius-bild); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; background: var(--feld-aktiv); }
.gewinn-bild-rahmen { margin-top: var(--abstand-4); }
.bild-rahmen { position: relative; min-width: 0; } /* trägt die Beispiel-Marke in der Vorschau-Umgebung */
.angaben { display: grid; grid-template-columns: auto 1fr; gap: var(--abstand-1) var(--abstand-3); margin-top: var(--abstand-3); font-size: .9375rem; }
.angaben dt { color: var(--text-leise); }
.angaben dd { overflow-wrap: anywhere; }

/* Frage und Formulare */
.frage { border: 0; padding: 0; margin: 0; min-width: 0; }
.frage legend { font: 400 1.375rem/1.25 var(--schrift-display); padding: 0; margin-bottom: 14px; text-wrap: balance; }
.wahl { display: grid; gap: 10px; }
.wahl label {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: var(--abstand-3) var(--abstand-4);
  border: 1px solid var(--rand-feld); border-radius: var(--radius); cursor: pointer; background: var(--feld-bg);
  transition: border-color var(--dauer-wechsel) var(--kurve-aus), background-color var(--dauer-wechsel) var(--kurve-aus);
}
.wahl label:has(input:checked) { border-color: var(--akzent-orn); background: var(--feld-aktiv); }
.wahl input {
  appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 50%;
  border: 1.5px solid var(--text-leise); display: grid; place-items: center; background: var(--feld-bg);
}
.wahl input::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--akzent-orn); opacity: 0; transform: scale(.5); transition: transform var(--dauer-wechsel) var(--kurve-aus), opacity var(--dauer-druck) var(--kurve-aus); }
.wahl input:checked { border-color: var(--akzent-orn); }
.wahl input:checked::before { opacity: 1; transform: scale(1); }
.wahl input:focus-visible { outline: 2px solid var(--fokus); outline-offset: 3px; }
.wahl span { overflow-wrap: anywhere; }

.knopf {
  display: flex; width: 100%; min-height: 52px; align-items: center; justify-content: center; gap: 10px; text-align: center;
  border: 0; border-radius: var(--radius); background: var(--knopf-bg); color: var(--knopf-text);
  font: 500 1rem/1.2 var(--schrift-text); cursor: pointer; text-decoration: none; padding: var(--abstand-2) var(--abstand-5);
  transition: transform var(--dauer-druck) var(--kurve-aus), opacity var(--dauer-wechsel) var(--kurve-aus);
}
.knopf:active, .knopf-zweit:active { transform: scale(.98); }
.knopf[aria-busy="true"] { opacity: .6; cursor: progress; }
.knopf-zweit {
  display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; gap: var(--abstand-2); text-align: center;
  border: 1px solid var(--rand-feld); border-radius: var(--radius); background: transparent; color: var(--text);
  font: 500 1rem/1.2 var(--schrift-text); cursor: pointer; text-decoration: none; padding: var(--abstand-2) var(--abstand-4);
  transition: transform var(--dauer-druck) var(--kurve-aus);
}
/* .knopf-leise: Name aus der Verwaltung; die Einrichtung erscheint auch auf der Linkseite /l (ansichten.js) */
.knopf-text, .knopf-leise {
  display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 0 var(--abstand-1); min-height: var(--trefferflaeche); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; color: var(--text-leise); font-size: .9375rem;
}
.reihe-knoepfe { display: grid; gap: 10px; margin-top: var(--abstand-5); }
.reihe-knoepfe > .knopf-text { justify-self: start; margin-inline-start: calc(-1 * var(--abstand-1)); } /* Rücklink steht mit der Schrift auf der Textkante, auch unter einem Knopf */

.feld { display: grid; gap: 6px; align-content: start; margin-top: var(--abstand-4); min-width: 0; } /* start: neben einem Feld mit langer Fehlerzeile wüchse sonst das Nachbarfeld mit */
.feld label { font-weight: 500; font-size: .9375rem; }
.feld input {
  min-height: 52px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--rand-feld);
  background: var(--feld-bg); font-size: 1rem; width: 100%; min-width: 0;
}
.feld input:focus-visible { outline: 2px solid var(--fokus); outline-offset: 1px; }
.feld input[aria-invalid="true"] { border-color: var(--fehler); }
.fehlertext { color: var(--fehler); font-size: .875rem; }
.fehlertext:empty { display: none; }
#form-f { margin-top: var(--abstand-3); } /* Meldung des Servers über dem Knopf: klebte sonst an der Zeile darüber */
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: var(--abstand-3); }
@media (max-width: 359px) { .zwei { grid-template-columns: 1fr; gap: 0; } }
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.anmelde-teil { margin-top: var(--abstand-6); padding-top: var(--abstand-5); border-top: 1px solid var(--linie); }
.anmelde-teil h2 { font: 400 1.375rem/1.25 var(--schrift-display); text-wrap: balance; }

.haken { display: flex; gap: var(--abstand-3); align-items: flex-start; padding: 10px 0; min-height: var(--trefferflaeche); cursor: pointer; }
.haken input {
  appearance: none; flex: none; width: 24px; height: 24px; margin: 1px 0 0; border-radius: 6px;
  border: 1.5px solid var(--text-leise); background: var(--feld-bg); display: grid; place-items: center; cursor: pointer;
}
.haken input::before {
  content: ""; width: 12px; height: 7px; border: solid var(--knopf-text); border-width: 0 0 2px 2px;
  opacity: 0; transform: translateY(-2px) rotate(-45deg) scale(.6); transition: transform var(--dauer-druck) var(--kurve-aus), opacity var(--dauer-druck) var(--kurve-aus);
}
.haken input:checked { background: var(--knopf-bg); border-color: var(--knopf-bg); }
.haken input:checked::before { opacity: 1; transform: translateY(-2px) rotate(-45deg) scale(1); }
.haken input:disabled { opacity: .55; cursor: default; }
.haken input[aria-invalid="true"] { border-color: var(--fehler); }
.haken span { font-size: .9375rem; line-height: 1.45; min-width: 0; }
.haken small { display: block; color: var(--text-leise); font-size: var(--groesse-klein); margin-top: 2px; }
.gruppe { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--linie); }
.gruppe-titel { font-size: var(--groesse-klein); color: var(--text-leise); margin: 6px 0 2px; }

/* Angebot, Listen, Rechtstexte */
.angebot { display: grid; gap: var(--abstand-3); padding: 18px; border-radius: var(--radius-bild); background: var(--flaeche); border: 1px solid var(--linie); }
.angebot h3 { font: 400 1.375rem/1.2 var(--schrift-display); }
.angebot .text { margin-top: 0; }
.angebot img { border-radius: var(--radius-bild); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; background: var(--feld-aktiv); }

.liste { margin-top: var(--abstand-4); border-top: 1px solid var(--linie); }
.liste li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--abstand-3); padding: var(--abstand-3) 0; border-bottom: 1px solid var(--linie); }
.liste li > :first-child { font-family: var(--schrift-display); font-size: 1.125rem; flex: none; }
.liste li > :last-child { color: var(--text-leise); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.liste .wert { color: var(--text); }
.block > .liste:last-child li:last-child { border-bottom: 0; } /* sonst zwei Haarlinien über dem nächsten Block */
/* Gewinne: Türchen klein darüber, Name, Zustand darunter; eine Satzkante statt rechtsbündiger Flatterzeilen */
.liste-gestapelt li { display: grid; gap: 2px; justify-content: stretch; }
.liste-gestapelt li > :first-child { font: 500 var(--t-klein)/1.3 var(--schrift-text); color: var(--akzent-text); }
.liste-gestapelt li > :last-child { text-align: left; }
.liste-gestapelt .wert { font: 400 var(--t-gross)/1.3 var(--schrift-display); text-wrap: balance; }
.liste-gestapelt .liste-status { font-size: var(--t-klein); color: var(--text-leise); text-wrap: pretty; }
.zahl-gross { font: 400 3.5rem/1 var(--schrift-display); margin-top: var(--abstand-2); }

.recht { margin-top: var(--abstand-4); color: var(--text); overflow-wrap: anywhere; }
/* Rechtstexte in der weiten Spalte: Tabellen nehmen die ganze Breite, Absätze, Listen und Überschriften enden bei 80 Zeichen */
.seite-recht { max-width: var(--breite-weit); }
.recht :is(p, ul, ol, h2, h3) { max-width: 80ch; }
.recht h2 { font: 400 1.375rem/1.25 var(--schrift-display); margin: var(--abstand-6) 0 var(--abstand-2); }
.recht h3 { font: 500 1.0625rem/1.3 var(--schrift-text); margin: var(--abstand-5) 0 var(--abstand-2); }
.recht p, .recht ul, .recht ol { margin: 0 0 var(--abstand-3); }
.recht ul { list-style: disc; padding-left: var(--abstand-5); }
.recht li + li { margin-top: var(--a-1); }
.recht ol { list-style: decimal; padding-left: var(--abstand-5); }
/* Tabellen aus dem Rechtstext-Import (C1-02): eigener Wischbereich, die Seite wird nie breiter; Zellen brechen an Wortgrenzen */
.recht-entwurf { margin: var(--abstand-3) 0 0; padding: var(--abstand-3) var(--abstand-4); border-radius: var(--r-papier); background: var(--hinweis-bg); color: var(--hinweis-text); font-size: var(--t-klein); line-height: 1.45; max-width: 80ch; }
.recht-entwurf strong { font-weight: 600; }
.banner .kleingedruckt { display: flex; flex-wrap: wrap; column-gap: var(--abstand-4); }
.banner .kleingedruckt a { display: inline-flex; align-items: center; min-height: 44px; } /* Tippziel: bei offenem Banner sind das die einzigen Rechtslinks der Welt */
.recht-tabelle { --wisch-schatten: color-mix(in oklab, var(--text) 22%, transparent); max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; margin: 0 0 var(--abstand-4); border: 1px solid var(--linie); border-radius: var(--r-papier);
  /* Wischzeichen ohne Skript: die Deckflächen rollen mit, der Kantenschatten bleibt stehen und zeigt, wo noch Tabelle folgt */
  background: linear-gradient(to right, var(--flaeche) 40%, transparent) left / 40px 100% no-repeat local, linear-gradient(to left, var(--flaeche) 40%, transparent) right / 40px 100% no-repeat local,
    linear-gradient(to right, var(--wisch-schatten), transparent) left / 16px 100% no-repeat scroll, linear-gradient(to left, var(--wisch-schatten), transparent) right / 16px 100% no-repeat scroll, var(--flaeche); }
.recht-tabelle:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }
.recht table { border-collapse: collapse; width: 100%; font-size: var(--t-klein); line-height: 1.45; }
.recht th, .recht td { text-align: left; vertical-align: top; padding: var(--a-2) var(--a-3); border-bottom: 1px solid var(--linie); min-width: 9rem; overflow-wrap: break-word; }
.recht th { font-weight: 500; background: var(--feld-aktiv); }
.recht tr:last-child td { border-bottom: 0; }
/* Breit: Die Tabelle bleibt in der mittigen weiten Spalte (.seite-recht), beginnt an derselben Kante wie Titel und Text und wischt nur, wenn
   sie auch dort nicht passt (Lukas 07.11.: die breitere Tabelle wuchs nur nach rechts, der Inhalt klebte links). Schmal: jede Zeile ein Block, nichts bleibt hinter dem Wischen verborgen, die Seite wird nie breiter */
.recht-tabelle :is(th, td) { min-width: 7rem; }
/* Das Server-HTML ohne JavaScript (.recht-tabelle-roh) trägt keine Spaltennamen an den Zellen und wischt darum auch schmal */
@media (max-width: 43.99rem) {
  .recht-tabelle:not(.recht-tabelle-roh) { overflow-x: visible; background: var(--flaeche); }
  .recht-tabelle:not(.recht-tabelle-roh) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .recht-tabelle:not(.recht-tabelle-roh) :is(table, tbody, tr, td) { display: block; }
  .recht-tabelle:not(.recht-tabelle-roh) tr { padding: var(--a-2) var(--a-3); border-bottom: 1px solid var(--linie); }
  .recht-tabelle:not(.recht-tabelle-roh) tr:last-child { border-bottom: 0; }
  .recht-tabelle:not(.recht-tabelle-roh) td { min-width: 0; padding: var(--a-1) 0; border: 0; }
  .recht-tabelle:not(.recht-tabelle-roh) td[data-spalte]::before { content: attr(data-spalte); display: block; color: var(--text-leise); font-weight: 500; }
}
.recht code { font: .875em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1px 4px; border-radius: 3px; background: var(--feld-aktiv); overflow-wrap: anywhere; }
/* Offene Punkte eines Entwurfs lesen sich als Vermerk im Satz, nicht als Quelltext */
.recht code.recht-offen, .recht-vorschlag { font: inherit; font-size: .9375em; padding: 1px 6px; border-radius: 3px; background: color-mix(in oklab, var(--gold) 22%, transparent); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.recht :is(h2, h3) code.recht-offen { font-size: .8125rem; font-family: var(--schrift-text); font-weight: 400; }

.laden { padding: var(--abstand-10) 0; color: var(--text-leise); }
.laden::after { content: ""; display: block; height: 1px; margin-top: var(--abstand-4); background: var(--gold); transform-origin: 0 50%; animation: laden 1.2s var(--kurve-aus) infinite; }
@keyframes laden { from { transform: scaleX(0); } to { transform: scaleX(1); opacity: 0; } }

/* Fuß, Hinweisleiste, Banner, Dialog */
.fuss { padding: 28px var(--rand-seite) var(--abstand-10); display: flex; flex-wrap: wrap; gap: var(--abstand-1) var(--abstand-4); justify-content: center; font-size: var(--groesse-klein); color: var(--text-leise); max-width: var(--breite-seite); margin: 0 auto; }
.fuss a, .fuss button { min-height: var(--trefferflaeche); min-width: var(--trefferflaeche); display: inline-flex; align-items: center; justify-content: center; text-underline-offset: 3px; }
.fuss button { background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; color: inherit; text-decoration: underline; }
body.banner-offen .fuss { padding-bottom: calc(var(--banner-h, 360px) + var(--a-6)); }

.hinweis {
  position: fixed; left: var(--rand-seite); right: var(--rand-seite); top: max(16px, env(safe-area-inset-top)); z-index: 40; /* oben: Unten läge die Meldung auf den Knöpfen, die sie ausgelöst haben */
  max-width: 448px; margin: 0 auto; padding: 14px var(--abstand-4); border-radius: var(--radius);
  background: var(--hinweis-bg); color: var(--hinweis-text); font-size: .9375rem;
  transform: translateY(calc(-100% - 48px)); visibility: hidden;
  transition: transform var(--dauer-hinweis) var(--kurve-aus), visibility 0s linear var(--dauer-hinweis);
}
.hinweis.zieht { transition: none; }
.hinweis.zeigen { transform: none; visibility: visible; transition-delay: 0s; }

.banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--flaeche); color: var(--text); /* eigene Tinte: welt.css färbt body hell (Lukas 07.11.: Titel und Optionen fast unsichtbar) */
  border-top: 1px solid var(--linie-stark); box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .4);
  border-bottom: env(safe-area-inset-bottom, 0px) solid var(--flaeche); /* Rand statt Innenabstand: liegt außerhalb der Wischfläche, die Knopfreihe klebt darüber */
  max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain; scroll-padding-bottom: 9rem; /* Fokus nicht unter der Knopfreihe */
}
.banner-griff { display: none; }
@media (max-width: 899px), (pointer: coarse) {
  .banner-griff { display: grid; place-items: center; padding: 10px 0 2px; touch-action: none; user-select: none; -webkit-user-select: none; }
  .banner-griff::before { content: ""; width: 36px; height: 4px; border-radius: 2px; background: var(--linie-stark); }
  .banner-griff + .banner-innen { padding-top: var(--abstand-3); }
}
.banner-innen { max-width: var(--breite-seite); margin: 0 auto; padding: var(--abstand-5) var(--rand-seite) max(0px, calc(var(--abstand-5) - env(safe-area-inset-bottom, 0px))); }
.banner h2 { font: 400 1.375rem/1.2 var(--schrift-display); }
.banner .text { margin-top: var(--abstand-2); font-size: .9375rem; }
/* Klebt unten im Banner: Auf kurzen Schirmen, mit großer Schrift oder offener Auswahl wischt nur der Text, alle Knöpfe bleiben im Bild */
.banner .reihe-knoepfe { grid-template-columns: 1fr 1fr; margin: calc(var(--abstand-4) - var(--abstand-2)) 0 calc(-1 * var(--abstand-2)); padding: var(--abstand-2) 0; position: sticky; bottom: 0; z-index: 1; background: var(--flaeche); }
.banner .reihe-knoepfe .knopf-text { grid-column: 1 / -1; justify-self: start; margin-left: calc(-1 * var(--abstand-1)); } /* eine Satzkante mit Text und Datenschutz-Link */

dialog.fenster {
  width: min(100% - 2 * var(--rand-seite), 448px); max-width: none; padding: var(--abstand-6) var(--abstand-5); border: 1px solid var(--linie-stark);
  border-radius: var(--radius); background: var(--flaeche); color: var(--text); overscroll-behavior: contain;
}
dialog.fenster::backdrop { background: rgba(29, 29, 27, .45); }

/* Funken aus dem heutigen Türchen (effekte.js): eine Ebene in der Tür, Lage je Funke in Tür-Koordinaten, Bewegung per WAAPI */
.funken { position: absolute; inset: 0; z-index: 3; pointer-events: none; filter: drop-shadow(0 0 4px rgba(255, 214, 150, .85)); }
/* Vierzackiger Stern: Lichtkern hell, Spitzen golden; der Schein kommt aus dem Filter der Ebene (ein Filter, nicht 28) */
.funke {
  position: absolute; translate: -50% -50%; opacity: 0;
  background: radial-gradient(circle, #FFFBF2 0 22%, var(--siegel-hell) 52%, var(--gold) 80%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

@media (prefers-reduced-motion: reduce) {
  .wahl label, .wahl input::before, .haken input::before, .knopf, .knopf-zweit, .video-start, .hinweis { transition: none; }
  .angekommen .karte-offen, .laden::after { animation: none; }
  .knopf:active, .knopf-zweit:active, .video-start:active { transform: none; }
}

/* ===================== Umbau 02.11.: Papierbogen, Tag und Nacht, Szene (design/PLAN-UMBAU-0211.md) ===================== */

body { background: linear-gradient(var(--grund-oben), var(--grund) 520px) no-repeat, var(--grund); }
.kopf, main, .fuss, .band, .umgebung-vorschau { position: relative; z-index: 1; }
.ohne-abstand { margin-top: 0; }
.seite-weit { max-width: var(--breite-weit); }

/* Kopf: echtes Logo, Tag/Nacht, Sprache */
.kopf { max-width: var(--breite-weit); padding-top: max(var(--a-5), env(safe-area-inset-top)); padding-bottom: var(--a-2); align-items: center;
  min-height: calc(max(var(--a-5), env(safe-area-inset-top)) + 52px + var(--a-2)); } /* Platz fürs Logo, bevor der Kopf per JS entsteht */
/* Erstladung (CLS): Bis die erste Ansicht steht, ist #inhalt leer und Szene und Fuß stünden oben im Bild; danach rutschten sie um eine
   ganze Seite nach unten. Unsichtbar zählt ihre Lage nicht als Verschiebung, ihr Erscheinen auch nicht. Klasse einmalig (main.js). */
html:not(.geladen) .szene, html:not(.geladen) .fuss { visibility: hidden; }
.marke { display: inline-flex; align-items: center; min-height: var(--treffer); border-radius: var(--r-bedienung); }
.logo { display: block; height: 52px; width: auto; }
.logo-nacht { display: none; }
:root[data-theme="dunkel"] .logo-tag { display: none; }
:root[data-theme="dunkel"] .logo-nacht { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="hell"]) .logo-tag { display: none; }
  :root:not([data-theme="hell"]) .logo-nacht { display: block; }
}
/* Logo des Hotels (Gestaltung, rahmen.js): ein Bild für beide Themen, Höhe wie das Hauslogo, Breite begrenzt */
.logo-hotel { max-width: 160px; object-fit: contain; }

/* Akzent des Hotels (rahmen.js): nur im hellen Thema, geprüft gegen Papier, Karte und Feld (gestaltung-pruefung.mjs).
   Im Nachtthema bleibt der Hausakzent, weil die Prüfung keine dunklen Flächen abdeckt. */
:root[data-akzent][data-theme="hell"] { --akzent-text: var(--akzent-hotel); --akzent-orn: var(--akzent-hotel); }
@media (prefers-color-scheme: light) { :root[data-akzent]:not([data-theme="dunkel"]) { --akzent-text: var(--akzent-hotel); --akzent-orn: var(--akzent-hotel); } }

/* Hintergrundmotiv (rahmen.js): färbt nur die Scherenschnitt-Szene um, nie eine Textfläche; Papier ist das Hausmotiv.
   --szene-1 (Fuß-Untergrund) bleibt, damit der Fußtext seinen Kontrast behält. */
:root[data-motiv="winternacht"][data-theme="hell"] { --szene-2: #BCC6D2; --szene-3: #D6DDE5; }
:root[data-motiv="kerzenschein"][data-theme="hell"] { --szene-2: #D9C2A4; --szene-3: #EADBC6; --szene-fenster: #EFA24A; }
@media (prefers-color-scheme: light) {
  :root[data-motiv="winternacht"]:not([data-theme="dunkel"]) { --szene-2: #BCC6D2; --szene-3: #D6DDE5; }
  :root[data-motiv="kerzenschein"]:not([data-theme="dunkel"]) { --szene-2: #D9C2A4; --szene-3: #EADBC6; --szene-fenster: #EFA24A; }
}
:root[data-motiv="kerzenschein"][data-theme="dunkel"] { --szene-fenster: #F6B865; }
@media (prefers-color-scheme: dark) { :root[data-motiv="kerzenschein"]:not([data-theme="hell"]) { --szene-fenster: #F6B865; } }

.werkzeuge { display: flex; align-items: center; gap: var(--a-3); }
@media (max-width: 359px) { .werkzeuge { gap: var(--a-1); } } /* sonst schrumpft die Marke unter ihre Trefferfläche */
/* „Mein Bereich“ im Kopf ab 600 px; schmaler steht der Link nur im Fuß, damit der Kopf nicht überläuft (FEEDBACK-1 Punkt 9) */
.kopf-ich { display: none; align-items: center; min-height: var(--treffer); padding: 0 var(--a-1); color: var(--text); font: 500 var(--t-klein)/1 var(--schrift-text);
  text-decoration: underline; text-decoration-color: var(--linie-stark); text-underline-offset: 4px; }
@media (hover: hover) and (pointer: fine) { .kopf-ich:hover { text-decoration-color: currentColor; } }
@media (min-width: 600px) { .kopf-ich { display: inline-flex; } }

.thema-schalter { position: relative; width: 60px; height: var(--treffer); padding: 0; border: 0; background: none; cursor: pointer; }
.thema-knopf { position: absolute; left: 0; right: 0; top: 6px; height: 32px; border-radius: var(--r-voll); background: var(--feld-aktiv); box-shadow: inset 0 0 0 1px var(--linie-stark); }
.thema-knopf::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--flaeche); box-shadow: 0 1px 3px rgba(0, 0, 0, .22); transition: transform var(--d-wechsel) var(--kurve-aus);
}
.thema-knopf svg { position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; transition: transform var(--d-wechsel) var(--kurve-aus); }
.thema-knopf .sonne { fill: none; stroke: var(--akzent-text); stroke-width: 1.8; stroke-linecap: round; }
.thema-knopf .sonne circle { fill: var(--akzent-text); stroke: none; }
.thema-knopf .mond { fill: var(--akzent-text); display: none; }
.thema-schalter[aria-checked="true"] .thema-knopf::before, .thema-schalter[aria-checked="true"] svg { transform: translateX(28px); }
.thema-schalter[aria-checked="true"] .sonne { display: none; }
.thema-schalter[aria-checked="true"] .mond { display: inline; }
.thema-schalter:focus-visible { outline: none; }
.thema-schalter:focus-visible .thema-knopf { outline: 2px solid var(--fokus); outline-offset: 3px; }

/* Ton-Schalter (FB1-TON): gleiche Pille wie der Nachtmodus; gedrückt = Ton an (Wellen), sonst durchgestrichen */
.ton-schalter { position: relative; width: var(--treffer); height: var(--treffer); padding: 0; border: 0; background: none; cursor: pointer; color: var(--akzent-text); }
.ton-knopf { position: absolute; left: 4px; right: 4px; top: 6px; height: 32px; border-radius: var(--r-voll); background: var(--feld-aktiv); box-shadow: inset 0 0 0 1px var(--linie-stark); display: grid; place-items: center; transition: background-color var(--d-wechsel) var(--kurve-aus); }
.ton-knopf svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ton-koerper { fill: currentColor; }
.ton-wellen, .ton-strich { transition: opacity var(--d-wechsel) var(--kurve-aus), transform var(--d-wechsel) var(--kurve-aus); transform-origin: 12px 12px; }
.ton-schalter[aria-pressed="false"] .ton-wellen { opacity: 0; transform: scale(.6); }
.ton-schalter[aria-pressed="true"] .ton-strich { opacity: 0; transform: scale(.6); }
.ton-schalter:active .ton-knopf { transform: scale(.97); }
.ton-schalter:focus-visible { outline: none; }
.ton-schalter:focus-visible .ton-knopf { outline: 2px solid var(--fokus); outline-offset: 3px; }
/* Musik lädt nach dem Tipp (Datei kommt erst dann): Pille pulsiert leise, ohne Bewegung steht sie gedimmt */
.ton-schalter[aria-busy="true"] .ton-knopf { animation: ton-laedt .8s var(--kurve-aus) infinite alternate; }
@keyframes ton-laedt { to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .ton-knopf, .ton-wellen, .ton-strich { transition: none; } .ton-schalter[aria-busy="true"] .ton-knopf { animation: none; opacity: .6; } }

.segment {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 0; border-radius: var(--r-voll);
  background: var(--feld-aktiv); box-shadow: inset 0 0 0 1px var(--linie-stark);
}
.segment::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--r-voll);
  background: var(--flaeche); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: transform var(--d-wechsel) var(--kurve-aus);
}
.segment[data-wahl="en"]::before { transform: translateX(100%); }
.segment button {
  position: relative; z-index: 1; min-width: 48px; height: var(--treffer); padding: 0 var(--a-3); border: 0; background: none; border-radius: var(--r-voll);
  font: 500 var(--t-klein)/1 var(--schrift-text); letter-spacing: .04em; color: var(--text-leise); cursor: pointer; transition: color var(--d-wechsel) var(--kurve-aus);
}
.segment button[aria-pressed="true"] { color: var(--text); }

/* Start */
.start { padding-top: var(--a-4); }
.start-kopf { margin-bottom: var(--a-5); }
.start-tag { font: 400 italic var(--t-gross)/1.3 var(--schrift-display); color: var(--text-leise); }
.start-datum { font: 400 clamp(2.5rem, 11vw, 3.25rem)/1 var(--schrift-display); letter-spacing: -.02em; margin-top: var(--a-1); }
.start-seite { margin-top: var(--a-5); }
.start-hinweis { font-size: var(--t-gross); line-height: 1.45; text-wrap: balance; }
.start-hinweis a { color: var(--akzent-text); white-space: nowrap; }
.zaehler { font-size: var(--t-klein); }

/* Türchen-Liste (ersetzt den Papierbogen): 24 Zeilen, in der Welt unsichtbar, ohne WebGL der Start */
.tuer-liste { padding: var(--a-2) var(--a-4); border-radius: var(--r-papier); background: var(--flaeche); box-shadow: var(--schatten-bogen); }
.tuer-liste ol { list-style: none; margin: 0; padding: 0; }
.tuer-liste li + li { border-top: 1px solid var(--linie); }
.tuer-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: var(--a-3); min-height: var(--treffer); padding: var(--a-3) 0; color: inherit; text-decoration: none; }
a.tuer-zeile:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: var(--r-bedienung); }
.tuer-zeile-nr { flex: none; font: 400 1.125rem/1.3 var(--schrift-display); color: var(--text-leise); } /* 18 px ist kein großer Text: --ziffer (3,88:1) nur ab 24 px, --text-leise 6,17:1 auf --flaeche */
.tuer-zeile-status { min-width: 0; text-align: right; font-size: var(--t-klein); color: var(--text-leise); overflow-wrap: anywhere; }
.tuer-liste [data-s~="heute-tag"] .tuer-zeile-status { color: var(--akzent-text); font-weight: 500; }
.tuer-liste [data-s="verpasst"] .tuer-zeile-nr { text-decoration: line-through 1.5px; }
.bewegung-aus .funken { display: none; } /* wird während der Funken pausiert, verschwinden sie sofort */
.bewegung-aus .gewonnen .ergebnis-siegel, .bewegung-aus .postfach-zeichen path { animation: none; } /* Antwort-Ergebnis steht sofort */

/* Seitenwechsel über die Tür: Folie wächst zum Tagesbild (gemeinsames Element), die alte Seite tritt zurück, die neue blendet ein */
.vt-ziel { view-transition-name: tagesbild; }
::view-transition-group(tagesbild) { animation-duration: var(--d-uebergang); animation-timing-function: var(--kurve-uebergang); }
:root[data-vt="tuer"]::view-transition-old(root) { animation: vt-zurueck var(--d-uebergang) var(--kurve-aus) both; }
:root[data-vt="tuer"]::view-transition-new(root) { animation: vt-ein var(--d-uebergang) var(--kurve-aus) both; }
@keyframes vt-zurueck { to { opacity: 0; transform: scale(.985); } }
@keyframes vt-ein { from { opacity: 0; transform: scale(1.01); } }
/* Thema und Sprache: eine kurze, ruhige Überblendung der ganzen Seite */
:root[data-vt="ueberblend"]::view-transition-old(root),
:root[data-vt="ueberblend"]::view-transition-new(root) { animation-duration: var(--d-ueberblend); animation-timing-function: var(--kurve-aus); }

/* Hauptgewinn, knapp */
.haupt { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--a-4); align-items: center; margin-top: var(--a-8); padding-top: var(--a-6); border-top: 1px solid var(--linie); }
.haupt-bild { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-papier); }
.haupt-bild-rahmen .beispiel-marke { display: none; } /* am 72-px-Bild kein Platz; der Name trägt „Beispiel:“, ab 900 px steht die Marke */
.haupt-hinweis { display: inline-flex; align-items: center; min-height: var(--treffer); margin-top: var(--a-2); color: var(--akzent-text); font: 500 var(--t-klein)/1.3 var(--schrift-text); text-wrap: balance; }
.haupt-zeichen { display: grid; place-items: center; border-radius: 50%; container-type: inline-size; color: var(--siegel-text); background: radial-gradient(circle at 38% 32%, var(--siegel-hell), var(--gold) 58%, var(--siegel-dunkel)); }
.haupt-zeichen span { display: block; font: 400 60cqi/1 var(--schrift-display); translate: 0 .08em; } /* wie das Heute-Siegel */
@supports (text-box: trim-both cap alphabetic) { .haupt-zeichen span { text-box: trim-both cap alphabetic; translate: none; } }
.haupt-text { min-width: 0; }
.haupt-ueber { font: 500 var(--t-klein)/1.3 var(--schrift-text); color: var(--akzent-text); }
.haupt-name { font: 400 var(--t-titel)/1.2 var(--schrift-display); margin-top: 2px; text-wrap: balance; overflow-wrap: anywhere; }
.haupt-klein { font-size: var(--t-klein); color: var(--text-leise); margin-top: var(--a-1); text-wrap: pretty; }

/* Türchen-Ansicht */
.blatt-datum { font: 500 var(--t-klein)/1.3 var(--schrift-text); color: var(--akzent-text); margin-bottom: 6px; }
.karte-offen { padding: 8px; border: 0; background: var(--flaeche); }
.tagesbild { position: relative; margin: 0; }
.tagesbild img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-tuer); }
.beispiel-marke { position: absolute; left: var(--a-3); top: var(--a-3); padding: 5px 10px; border-radius: var(--r-voll); background: var(--schleier-bild); color: #FFFDF9; font: 500 var(--t-klein)/1 var(--schrift-text); }
@media (min-width: 1000px) {
  #inhalt:has(> .blatt-tuer) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--a-12); max-width: var(--breite-weit); margin: 0 auto; padding: 0 var(--rand-seite); align-items: start; }
  #inhalt:has(> .blatt-tuer) > .seite { max-width: none; padding-left: 0; padding-right: 0; }
  #inhalt:has(> .blatt-tuer) > .blatt-tuer { position: sticky; top: var(--a-6); }
  #inhalt:has(> .blatt-tuer) { padding-top: var(--a-8); } /* Titelblock mit Luft unter dem Logo */
}

.anmelde-teil[data-wartet] { display: none; }
.anmelde-teil { transition: opacity var(--d-seite) var(--kurve-aus), transform var(--d-seite) var(--kurve-aus); }
@starting-style { .anmelde-teil { opacity: 0; transform: translateY(8px); } }

/* Seitenwechsel: leiser Eintritt der neuen Ansicht */
/* Blöcke der Ansicht kommen leicht gestaffelt (40 ms, höchstens fünf Stufen); bedienbar sind sie sofort. */
#inhalt.eintritt > * > * { animation: eintritt var(--d-seite) var(--kurve-aus) both; }
#inhalt.eintritt > * > :nth-child(2) { animation-delay: 40ms; }
#inhalt.eintritt > * > :nth-child(3) { animation-delay: 80ms; }
#inhalt.eintritt > * > :nth-child(4) { animation-delay: 120ms; }
#inhalt.eintritt > * > :nth-child(n+5) { animation-delay: 160ms; }
@keyframes eintritt { from { opacity: 0; transform: translateY(8px); } }

/* Cookie-Fenster fährt von unten ein und aus */
.banner { transition: transform var(--d-fenster-ein) var(--kurve-schublade), opacity var(--d-fenster-ein) var(--kurve-aus); }
@starting-style { .banner { transform: translateY(100%); } }
.banner.zieht { transition: none; will-change: transform; box-shadow: 0 -10px 30px -18px rgba(0, 0, 0, .4), 0 40px 0 var(--flaeche); } /* folgt dem Finger (wischen.js); die Fläche reicht beim Gummiband unter den Rand */
.banner.geht { transform: translateY(100%); transition-duration: var(--d-fenster-aus); transition-timing-function: var(--kurve-aus); pointer-events: none; }

/* Szene am Seitenende, Fuß als Erde darunter */
.szene { position: relative; z-index: 1; height: clamp(150px, 20.84vw, 440px); margin-top: var(--a-4); overflow: hidden; } /* 20,84vw ist das Seitenverhältnis der Zeichnung: Auf breiten Schirmen bleibt der Mond ganz */
@media (min-width: 900px) { .szene { margin-top: var(--a-12); } }
.szene-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ebene-3 { fill: var(--szene-3); }
.ebene-2 { fill: var(--szene-2); }
.ebene-1 { fill: var(--szene-1); color: var(--szene-1); }
.szene .fenster { fill: var(--szene-fenster); }
.szene .licht { fill: url(#szene-schein); }
.szene .schein-mitte { stop-color: var(--szene-fenster); stop-opacity: .5; }
.szene .schein-rand { stop-color: var(--szene-fenster); stop-opacity: 0; }
.szene .sprosse { stroke: var(--szene-1); }
.szene .kranz { stroke: var(--gold); }
.szene .gold { fill: var(--gold); }
.szene .ausschnitt { fill: var(--szene-ausschnitt); }
.szene .sterne, .szene .mond { fill: var(--mond); }
.szene .mond-schatten { fill: var(--grund); }
.fuss { max-width: none; margin: 0; background: var(--szene-1); color: var(--fuss-text); padding: var(--a-4) var(--rand-seite) max(var(--a-10), env(safe-area-inset-bottom)); }
.fuss { box-shadow: 0 -1px 0 var(--szene-1); } /* liegt die Naht zur Szene auf einem halben Pixel, scheint sonst der helle Grund durch */
.fuss a, .fuss button { color: inherit; }
.fuss :focus-visible { outline-color: var(--fuss-text); }
.fuss [data-bewegung][aria-pressed="true"] { text-decoration-style: double; }

.rentier-weg { animation: rentier-weg 56s linear infinite; }
@keyframes rentier-weg { from { transform: translateX(-160px); } to { transform: translateX(1600px); } }
.rentier { animation: nicken 1.8s ease-in-out infinite; }
@keyframes nicken { 50% { transform: translateY(-1.5px); } }
.bein { transform-box: fill-box; transform-origin: 50% 0; animation: schritt .9s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.bein-b { animation-delay: -.9s; }
@keyframes schritt { from { transform: rotate(16deg); } to { transform: rotate(-16deg); } }
.schal-ende { transform-box: fill-box; transform-origin: 50% 0; animation: schal 3.4s ease-in-out infinite alternate; }
@keyframes schal { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }
.szene .fenster { animation: kerze 5s ease-in-out infinite alternate; }
@keyframes kerze { from { opacity: .82; } to { opacity: 1; } }

/* Schnee hinter dem Inhalt */
.schnee { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.schnee i { position: absolute; top: -12px; left: var(--x); width: var(--g); height: var(--g); border-radius: 50%; background: var(--schnee); opacity: var(--o); animation: fallen var(--d) linear var(--v) infinite; }
@keyframes fallen { to { transform: translate3d(var(--w), 105vh, 0); } }

/* Pause: Schalter oder verborgener Tab */
.bewegung-aus .szene *, .bewegung-aus .schnee i, .tab-verborgen .szene *, .tab-verborgen .schnee i { animation-play-state: paused; }

/* Ergebnis, Postfach, Teilen: ein Blatt mit Siegel, eine Satzkante links */
.ergebnis-blatt {
  margin-top: var(--a-6); padding: var(--a-8) clamp(var(--a-5), 6vw, var(--a-8));
  background: var(--flaeche); border-radius: var(--r-papier); box-shadow: var(--schatten-bogen);
}
.ergebnis-siegel {
  display: grid; place-items: center; width: 72px; aspect-ratio: 1; margin-bottom: var(--a-5); border-radius: 50%;
  background: var(--grund); box-shadow: inset 0 1px 2px var(--praegung-schatten), inset 0 -1px 0 var(--praegung-licht), 0 0 0 1px var(--linie);
}
.ergebnis-siegel span { display: block; font: 400 2rem/1 var(--schrift-display); color: var(--ziffer); translate: 0 .08em; }
@supports (text-box: trim-both cap alphabetic) { .ergebnis-siegel span { text-box: trim-both cap alphabetic; translate: none; } }
.gewonnen .ergebnis-siegel {
  background: radial-gradient(circle at 38% 32%, var(--siegel-hell), var(--gold) 58%, var(--siegel-dunkel));
  box-shadow: 0 2px 4px rgba(60, 40, 20, .25), 0 10px 22px -10px rgba(60, 40, 20, .5), inset 0 0 0 4px rgba(255, 253, 249, .22), inset 0 -3px 6px rgba(60, 30, 10, .25);
}
.gewonnen .ergebnis-siegel span { color: var(--siegel-text); text-shadow: 0 1px 0 rgba(255, 240, 220, .45); }
.ergebnis-blatt .text { max-width: 46ch; }
.postfach-zeichen {
  display: block; width: 56px; height: auto; margin: var(--a-4) 0 var(--a-5);
  fill: none; stroke: var(--akzent-text); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round;
}
.teilen-knoepfe { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr)); }
.teilen > .reihe-knoepfe:first-child { margin-top: 0; }
.teilen .reihe-knoepfe + .reihe-knoepfe { margin-top: var(--a-3); }
/* Einmalige Momente: Siegel wird gestempelt, die Briefklappe zeichnet sich. Ohne Bewegungswunsch stehen beide sofort. */
@media (prefers-reduced-motion: no-preference) {
  .gewonnen .ergebnis-siegel { animation: stempel 520ms var(--kurve-aus) 120ms both; }
  .postfach-zeichen path { stroke-dasharray: 54; animation: zeichnen 700ms var(--kurve-aus) 160ms both; }
}
@keyframes stempel { from { opacity: 0; transform: scale(1.25) rotate(-8deg); } }
@keyframes zeichnen { from { stroke-dashoffset: 54; } }

/* Zeiger, Felder, Zustände (FEEDBACK-1 Punkt 6): Farbwechsel weich mit --d-hover, Druck und Anheben über transform.
   Hover nur bei echtem Zeiger (sonst klebt der Zustand nach dem Tippen). Der Fokusring erscheint sofort: Tastatur wird nie verzögert. */
a, .knopf-text, .fuss button { transition: color var(--d-hover) var(--kurve-hover), text-decoration-color var(--d-hover) var(--kurve-hover); }
.knopf { transition: transform var(--dauer-druck) var(--kurve-aus), opacity var(--dauer-wechsel) var(--kurve-aus), box-shadow var(--d-hover) var(--kurve-hover); }
.knopf-zweit { transition: transform var(--dauer-druck) var(--kurve-aus), border-color var(--d-hover) var(--kurve-hover), background-color var(--d-hover) var(--kurve-hover); }
.feld input { transition: border-color var(--d-hover) var(--kurve-hover), background-color var(--d-hover) var(--kurve-hover); }
.feld input:focus-visible { border-color: var(--akzent-orn); }
.thema-knopf, .segment { transition: box-shadow var(--d-hover) var(--kurve-hover); }
@media (hover: hover) and (pointer: fine) {
  a:hover, .knopf-text:hover, .fuss button:hover { text-decoration-color: var(--akzent-orn); }
  .knopf:hover { transform: translateY(-1px); box-shadow: var(--schatten-karte); }
  .knopf:hover:active { transform: scale(.98); }
  .knopf-zweit:hover { border-color: var(--text-leise); background-color: var(--feld-aktiv); }
  .wahl label:hover { border-color: var(--text-leise); }
  .wahl label:has(input:checked):hover { border-color: var(--akzent-orn); }
  .feld input:hover:not(:focus) { border-color: var(--text-leise); }
  .thema-schalter:hover .thema-knopf, .segment:hover { box-shadow: inset 0 0 0 1px var(--text-leise); }
  .segment button:hover { color: var(--text); }
}
/* Pause-Schalter: kein Anheben unter dem Zeiger, der Schatten als ruhige Rückmeldung bleibt (wie reduzierte Bewegung) */
.bewegung-aus .knopf:hover, .bewegung-aus .knopf:hover:active { transform: none; }
.bewegung-aus .banner, .bewegung-aus .banner.geht { transform: none; transition: opacity var(--d-fenster-ein) var(--kurve-aus); }
.bewegung-aus .banner.geht { opacity: 0; }
@starting-style { .bewegung-aus .banner { transform: none; opacity: 0; } }
.bewegung-aus .hinweis { transition: none; }
/* Thema- und Sprachschalter gleiten live weiter, während die Seite überblendet (kein Doppelbild des Schiebers) */
:root[data-vt="ueberblend"] .thema-knopf { view-transition-name: thema-knopf; }
:root[data-vt="ueberblend"] .segment { view-transition-name: sprach-segment; }
::view-transition-old(thema-knopf), ::view-transition-old(sprach-segment) { display: none; }
::view-transition-new(thema-knopf), ::view-transition-new(sprach-segment) { animation: none; }

/* Desktop */
@media (min-width: 900px) {
  .logo { height: 60px; }
  .kopf { min-height: calc(max(var(--a-5), env(safe-area-inset-top)) + 60px + var(--a-2)); }
  .start { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "liste kopf" "liste seite"; grid-template-rows: auto 1fr; column-gap: var(--a-16); padding-top: var(--a-8); }
  .start-kopf { grid-area: kopf; margin: 0; padding-top: var(--a-6); }
  .start-datum { font-size: clamp(3rem, 5.6vw, 4.5rem); } /* „12. Dezember“ ≈ 5,2 em; Spalte 5/12 ab 900 px ≥ 332 px */
  .start > .tuer-liste { grid-area: liste; align-self: start; } /* start: sonst dehnt die rechte Spalte die Karte, und unter dem Raster bleibt sie leer */
  .start-seite { grid-area: seite; margin-top: var(--a-6); }
  /* Hauptgewinn groß in der rechten Spalte, der Kopf-Hinweis entfällt hier */
  .haupt-hinweis { display: none; }
  .haupt { grid-template-columns: minmax(0, 1fr); gap: var(--a-4); }
  .haupt-bild { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .haupt-bild-rahmen .beispiel-marke { display: block; }
  .haupt-zeichen { width: 96px; height: 96px; aspect-ratio: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .thema-knopf::before, .thema-knopf svg, .segment::before { transition: none; }
  .knopf:hover, .knopf:hover:active { transform: none; }
  #inhalt.eintritt > * > * { animation-name: eintritt-still; animation-delay: 0ms; }
  @keyframes eintritt-still { from { opacity: 0; } }
  .banner, .banner.geht { transform: none; transition: opacity var(--d-fenster-ein) var(--kurve-aus); }
  .banner.geht { opacity: 0; }
  @starting-style { .banner { transform: none; opacity: 0; } }
  .szene *, .schnee i { animation: none; }
  .schnee { display: none; }
  .rentier-weg { transform: translateX(960px); }
}

/* Welt-Modus (welt-andock.js, Schritt 9; Besitz T): Host außerhalb #inhalt, fest über der Seite, unter Banner und Hinweis (z 30/40) */
.welt-host { position: fixed; inset: 0; z-index: 20; }
.welt-host[hidden] { display: none; }
/* Lukas 07.11. (Fotos 7 und 8): beim schnellen Schwenken erschien der alte Bogen mit schwebenden Hauszahlen. Im Welt-Modus steht der Bogen darum nie sichtbar: unsichtbar statt nur inert
   (Lage und DOM bleiben für Rückfall und Rückkehr), und der Host deckt mit der Seitenfarbe, falls ein Bild der Leinwand einmal ausfällt. Ohne WebGL gibt es den Welt-Modus nicht, dort bleibt der Bogen. */
html.welt-modus #inhalt { visibility: hidden; }
.welt-host:not(.buehne) { background: var(--grund, #0d1420); }
/* Welt-Modus: App-Kopf (Logo, Thema, Sprache) bleibt über der Welt bedienbar; Welt-Titel rückt darunter, Nacht-Knopf entfällt (Thema steuert) */
/* Bühne nach der Türfahrt (welt-naht.js): Der Host bildet keinen Stapelkontext, damit die Leinwand unter und der Schleier über der Seite liegt.
   Welt-CSS ist aus, die Seite scrollt; der body-Grund muss weg, er läge sonst über der Leinwand. */
.welt-host.buehne { position: static; z-index: auto; pointer-events: none; } /* z-index: auto ist Pflicht: body ist flex, dort wirkt z-index auch ohne position */
.welt-host.buehne > :not(#welt, #welt-schleier) { display: none; }
.welt-host.buehne #welt { display: block; position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; }
html.welt-buehne body { background: none; }
html.welt-buehne .schnee { display: none; } /* die Stube ist ein Zimmer: die Flocken der Seite lagen über der Bühne und fielen durch den Raum */
html.stube-rueck #inhalt { visibility: hidden; } /* Rückweg aus der Stube: die Startansicht entsteht darunter, sichtbar wird erst die Welt */
/* Logo steht linksbündig über dem Welt-Titel (Lukas 20:52): gleicher linker Rand wie .welt-kopf in welt.css, auf breiten Schirmen nicht auf 1200 px zentriert */
html:is(.welt-modus, .welt-erwartet) .kopf { position: fixed; top: 0; left: 0; right: 0; z-index: 30; max-width: none; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
html:is(.welt-modus, .welt-erwartet) .kopf::before, html.welt-buehne .kopf::before { content: ''; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw) -24px; pointer-events: none;
  background: linear-gradient(var(--grund-oben), color-mix(in srgb, var(--grund-oben) 0%, transparent)); opacity: .85; }
html.welt-modus #inhalt { margin-top: var(--kopf-hoehe, 0); } /* Kopf liegt fest, der Bogen darunter bleibt, wo er war */
.welt-wort { display: inline-block; }
html.welt-modus .welt-kopf { top: calc(max(var(--a-5), env(safe-area-inset-top)) + 52px + var(--a-2) + 8px); }
.welt-host #zeit { display: none; }
/* Unterer Rand (Lukas 08.11.: „nie überlagert, immer genügend Abstand“): Leiste und Rechtslinks stehen in einem gemeinsamen Stapel. Brechen die Links
   um (schmal, Englisch, große Systemschrift), wächst der Stapel nach oben, statt dass die zweite Zeile unter die Leiste rutscht. Safe-Area unten und
   seitlich als Innenabstand. Seine Höhe: --welt-unten-h (welt-andock.js). Bei offenem Cookie-Banner weicht der Stapel ganz aus: Der Banner nimmt auf kurzen
   Schirmen bis 85dvh ein, darüber passt kein Stapel. Impressum und Datenschutz stehen dann im Banner selbst (banner.js). */
.welt-host .welt-unten { position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; gap: var(--a-3); box-sizing: border-box; padding: 0 max(var(--a-4), env(safe-area-inset-right)) max(var(--a-2), env(safe-area-inset-bottom)) max(var(--a-4), env(safe-area-inset-left)); pointer-events: none; }
body.banner-offen .welt-host .welt-unten { visibility: hidden; }
.welt-host .welt-leiste { position: static; left: auto; bottom: auto; transform: none; max-width: 100%; pointer-events: auto; }
.welt-host .welt-recht { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--a-1); max-width: 100%; }
.welt-recht a, .welt-recht button { pointer-events: auto; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; box-sizing: border-box; border: 0; border-radius: 10px; cursor: pointer; font: 400 14px/1.2 var(--schrift-text, system-ui, sans-serif); color: #F8F4EE; text-decoration: underline; text-underline-offset: 3px; background: rgba(16, 20, 28, .74); } /* dunkle Fläche wie die Leiste: 7:1 auch auf weißem Schnee */
.welt-recht a:focus-visible, .welt-recht button:focus-visible { outline: 2px solid var(--folie-1, #EDCD9E); outline-offset: -2px; border-radius: 6px; }
.welt-host #welt-haeuser.liste { inset-block-end: calc(var(--welt-unten-h, 128px) + var(--a-4)); max-height: max(160px, calc(100dvh - 188px - var(--welt-unten-h, 128px))); }
.welt-host .welt-maus { bottom: calc(var(--welt-unten-h, 128px) + var(--a-4)); }
@media (orientation: landscape) and (max-height: 480px) {
  html.welt-modus .kopf { padding-block: 2px; }
  html.welt-modus .welt-kopf { top: calc(max(0px, env(safe-area-inset-top)) + 54px); }
  .welt-host .welt-unten { gap: var(--a-2); padding-bottom: max(2px, env(safe-area-inset-bottom)); }
  .welt-host .welt-leiste { padding-block: 2px; }
  .welt-host .welt-recht { gap: 2px; }
}
/* Warten auf die Welt (Lukas 07.11. 18:2x: beim Neuladen blitzte die Türchenliste auf). thema.js setzt html.welt-erwartet auf „/“ vor dem ersten Bild,
   welt-andock.js nimmt sie ab, sobald die Welt steht oder die Liste gilt. Die Seite darunter bleibt unsichtbar, der Kopf liegt schon wie in der Welt. */
html.welt-erwartet :is(#inhalt, .szene, .fuss, .schnee) { visibility: hidden; }
html.welt-erwartet { overflow: hidden; scrollbar-gutter: auto; } /* wie welt.css, das während des Ladens dazukommt: sonst springt der feste Kopf um die Rollbalkenbreite */
/* Ladebild (Lukas 07.11. 21:3x: „sieht überhaupt nicht gut aus“): ruhige Vollfläche im Grund der Tageszeit (Nacht: Winterblau aus tokens.css), Logo ganz
   und mittig, darunter der Fortschritt aus echten Ladeereignissen (welt:fortschritt → --anteil). Es liegt über dem Kopf; der steht darunter schon an seinem
   Platz und kommt mit der Welt zugleich ins Bild. welt-andock blendet es über, wenn das erste Weltbild steht (.welt-ueberblendet, .weg). */
.welt-ladebild { display: none; }
html:is(.welt-erwartet, .welt-ueberblendet) .welt-ladebild { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(180deg, var(--grund-oben), var(--grund)); transition: opacity var(--d-fenster-ein) var(--kurve-aus); }
.welt-ladebild-mitte { display: grid; justify-items: center; gap: 28px; }
.welt-ladebild .logo { height: 104px; width: auto; }
.welt-ladebild-spur { width: 160px; height: 3px; border-radius: 2px; background: var(--linie); overflow: hidden; }
.welt-ladebild-balken { height: 100%; background: linear-gradient(90deg, var(--siegel-dunkel), var(--siegel-hell)); transform: scaleX(var(--anteil, 0)); transform-origin: left; transition: transform 300ms var(--kurve-aus); }
.welt-ladebild.weg { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .welt-ladebild-balken { transition: none; }
  html:is(.welt-erwartet, .welt-ueberblendet) .welt-ladebild { transition-duration: 160ms; } /* nur Deckkraft, kurz */
}
.welt-host .welt-laden { background: transparent; color: transparent; } /* Text bleibt für Screenreader (role=status); sichtbar ist das Ladebild */
.welt-zurueck-ort { padding-top: var(--a-4, 16px); padding-bottom: 0; }
