/* stil.css · renyu.info · Entwurf C, Runde 2 (28.10.2026)
 *
 * Renyus App-Sprache im Web: warmer Grund, weiße Karten mit 20er Ecken und
 * Haarlinie, Amber als einzige Aktionsfarbe, Reiterfarben als Kennfarbe je
 * Bereich, Navigation als schwebende Kapsel wie die Reiterleiste.
 * Quellen der Werte: Assets.xcassets/V3/*.colorset, V3Metrics.swift, V3TextToken.swift.
 * Jede Bewegung hat einen Weg für „Bewegung reduzieren“. Ohne JS ist alles sichtbar.
 * CSP: style-src 'self' — kein Inline-Stil, Farben je Element über Klassen.
 */

/* ── Schrift: Onest (SIL OFL 1.1, siehe schrift/OFL.txt), Teilmenge Latein ── */
@font-face { font-family: "Onest"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/schrift/onest-regular.47556c7a.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/schrift/onest-medium.d07357d1.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/schrift/onest-semibold.ef0095d0.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/schrift/onest-bold.154cabc1.woff2") format("woff2"); }
@font-face { font-family: "Onest"; font-weight: 800; font-style: normal; font-display: swap; src: url("/assets/schrift/onest-extrabold.a5ad2682.woff2") format("woff2"); }

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    color-scheme: light dark;

    /* Farben V3, hell */
    --grund: #FBF8F3;
    --grund-oben: #FFFFFF;
    --grund-unten: #F6F1E9;
    --flaeche: #FFFFFF;
    --tinte: #2A2620;
    --tinte-2: #6E6558;
    --haarlinie: rgb(52 42 30 / 0.07);
    --leiste: #FFFDF8;
    --amber: #E09A34;
    --auf-amber: #2E2419;
    --gruen: #4EA47C;
    --tinte-hauch: rgb(52 42 30 / 0.05);           /* Segment-Grund in V3 */
    --schatten-karte: 0 1px 2px rgb(45 35 22 / 0.04), 0 8px 24px rgb(45 35 22 / 0.04);
    --schatten-leiste: 0 10px 34px rgb(45 35 22 / 0.13), 0 1px 2px rgb(45 35 22 / 0.05);
    --schatten-geraet: 0 18px 44px rgb(45 35 22 / 0.16), 0 2px 6px rgb(45 35 22 / 0.06);
    --kachel-anteil: 14%;
    --kachel-rand: inset 0 0 0 1px rgb(255 255 255 / 0.55);

    /* Formen V3Metrics */
    --r-karte: 20px;
    --r-kachel: 12px;
    --r-steuer: 12px;
    --r-kapsel: 999px;
    --kachel: 40px;
    --symbol: 24px;
    --rand: 24px;
    --stapel: 12px;
    --pille-x: 16px;
    --pille-y: 6px;
    --leiste-hoehe: 62px;                           /* Reiterleiste 62, Ecke 31 */
    --kachel-klein: 32px;

    /* Store-Abzeichen: Apple verlangt mind. 40 px Höhe, Freiraum mind. 1/4 der Höhe */
    --abz-h: 40px;

    /* Telefonrahmen im lebenden iPhone (Titan dunkel, in beiden Modi gleich) */
    --rahmen: #1F1D1A;
    --insel: #000000;

    /* Web-Maße (nicht in V3: Abschnittsabstand, Zeilenlänge) */
    --breite: 1200px;
    --teil-abstand: 112px;
    --lesebreite: 68ch;

    /* Bewegung: leichtes Federn wie in der App */
    --feder: cubic-bezier(0.34, 1.56, 0.64, 1);
    --sanft: cubic-bezier(0.22, 1, 0.36, 1);

    /* Tageszeit des Besuchers tönt Aufmacher und Grund (renyu.js setzt data-zeit) */
    --zeit-a: var(--amber);
    --zeit-b: var(--gruen);
    --zeit-ton: transparent;
}
html[data-zeit="morgen"] { --zeit-a: #E09A34; --zeit-b: #D8629A; --zeit-ton: #E09A34; }
html[data-zeit="abend"] { --zeit-a: #E0763C; --zeit-b: #7C6BD6; --zeit-ton: #E0763C; }
html[data-zeit="nacht"] { --zeit-a: #5A5FA6; --zeit-b: #4E77C0; --zeit-ton: #5A5FA6; }

@media (prefers-color-scheme: dark) {
    :root {
        --grund: #161513;
        --grund-oben: #1C1B19;
        --grund-unten: #141311;
        --flaeche: #23221F;
        --tinte: #F1EFEB;
        --tinte-2: #AAA499;
        --haarlinie: rgb(246 244 240 / 0.11);
        --leiste: #292825;
        --amber: #DA8F2E;
        --gruen: #71B696;
        --tinte-hauch: rgb(246 244 240 / 0.06);
        --schatten-karte: 0 1px 2px rgb(0 0 0 / 0.25);
        --schatten-leiste: 0 10px 34px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.3);
        --schatten-geraet: 0 18px 44px rgb(0 0 0 / 0.5);
        --kachel-anteil: 22%;
        --kachel-rand: inset 0 0 0 1px rgb(255 255 255 / 0.06);
    }
}

/* Reiterfarben (Kennfarbe je Bereich) und Domänen */
.farbe-home { --farbe: #E0763C; }
.farbe-gewohnheiten { --farbe: #E09A34; }
.farbe-ziele { --farbe: #3E8FCF; }
.farbe-ernaehrung { --farbe: #6DAE43; }
.farbe-fitness { --farbe: #E24152; }
.farbe-journal { --farbe: #7C6BD6; }
.farbe-social { --farbe: #5A55C7; }
.farbe-checkin { --farbe: #37B884; }
.farbe-tag { --farbe: #2FADCF; }
.farbe-vision { --farbe: #D8629A; }
.farbe-schlaf { --farbe: #5A5FA6; }
.farbe-wasser { --farbe: #3C9CB5; }
.farbe-fokus { --farbe: #4E77C0; }

/* ── Grundlagen ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 104px; }
@supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } }
body {
    margin: 0;
    font-family: "Onest", -apple-system, system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    font-weight: 400;
    color: var(--tinte);
    background-color: var(--grund);
    background-image: radial-gradient(120% 900px at 50% -200px, color-mix(in srgb, var(--zeit-ton) 9%, var(--grund-oben)) 0%, var(--grund) 55%, var(--grund-unten) 100%);
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, picture, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--amber) 32%, transparent); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.symbole { position: absolute; width: 0; height: 0; overflow: hidden; }
.sym { width: var(--symbol); height: var(--symbol); flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.voll { fill: currentColor; stroke: none; }

.nur-vorlesen { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprung { position: absolute; left: var(--rand); top: -80px; z-index: 100; padding: 10px 18px; border-radius: var(--r-kapsel); background: var(--amber); color: var(--auf-amber); font-weight: 600; text-decoration: none; }
.sprung:focus { top: 16px; }

.huelle { width: 100%; max-width: calc(var(--breite) + 2 * var(--rand)); margin-inline: auto; padding-inline: var(--rand); }

/* ── Bausteine: Karte, Kachel, Pille, Knopf ─────────────────────────────── */
.karte {
    background: var(--flaeche);
    border: 1px solid var(--haarlinie);
    border-radius: var(--r-karte);
    box-shadow: var(--schatten-karte);
}

.kachel {
    width: var(--kachel); height: var(--kachel); flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--r-kachel);
    color: var(--farbe);
    background: color-mix(in srgb, var(--farbe) var(--kachel-anteil), var(--flaeche));
    box-shadow: var(--kachel-rand);
}

.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px;
    border-radius: var(--r-kapsel);
    font: 600 16px/1.2 "Onest", system-ui, sans-serif;
    letter-spacing: 0.01em;
    text-decoration: none; white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.45s var(--feder), box-shadow 0.3s ease, background-color 0.2s ease;
}
.knopf .sym { width: 20px; height: 20px; }
.knopf-amber { background: var(--amber); color: var(--auf-amber); box-shadow: 0 6px 18px color-mix(in srgb, var(--amber) 32%, transparent); }
.knopf-flaeche { background: var(--flaeche); color: var(--tinte); border-color: var(--haarlinie); box-shadow: var(--schatten-karte); }
.knopf-bald { background: var(--tinte-hauch); color: var(--tinte-2); cursor: default; }
.knopf-gross { min-height: 56px; padding: 0 28px; font-size: 17px; font-weight: 700; }
.knopf-klein { min-height: 44px; padding: 0 18px; font-size: 15px; }
a.knopf:hover { transform: translateY(-2px); }
a.knopf:active { transform: scale(0.96); transition-duration: 0.12s; }

/* Etikett und Abschnitts-Figur: Pille 16×6 */
.etikett, .kicker {
    display: inline-flex; align-items: center; gap: 8px;
    padding: var(--pille-y) var(--pille-x);
    border-radius: var(--r-kapsel);
    background: var(--flaeche);
    border: 1px solid var(--haarlinie);
    color: var(--tinte-2);
    font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
    white-space: nowrap;
}
.etikett .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); box-shadow: 0 0 0 0 color-mix(in srgb, var(--gruen) 50%, transparent); }
.kicker { padding-left: 4px; }
.kicker-figur img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* ── Store-Abzeichen: offiziell, unverändert, gleich hoch, nie umbrechen ── */
.abzeichen-zeile { display: flex; flex-wrap: nowrap; align-items: center; gap: max(12px, calc(var(--abz-h) * 0.3)); }
.abzeichen { position: relative; flex: none; display: block; border-radius: 8px; line-height: 0; }
.abzeichen img { height: var(--abz-h); width: auto; max-width: none; }
/* Google-Grafik 646×250 hat 29 px transparenten Rand oben und unten: sichtbare Höhe = --abz-h */
.abzeichen-play img { height: calc(var(--abz-h) * 250 / 192); margin-block: calc(var(--abz-h) * -29 / 192); }
.abzeichen-play small {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--tinte-2); white-space: nowrap;
}
a.abzeichen { transition: transform 0.45s var(--feder); }
a.abzeichen:hover { transform: translateY(-2px); }
a.abzeichen:active { transform: scale(0.96); transition-duration: 0.12s; }
.abzeichen-gross { --abz-h: 52px; margin-top: 34px; padding-bottom: 22px; }
.abzeichen-fuss { --abz-h: 40px; margin-top: 18px; padding-bottom: 22px; }
.abzeichen-kapsel { --abz-h: 40px; gap: 10px; margin-left: 4px; }
.abzeichen-kapsel small, .abzeichen-leiste small { display: none; }

/* ── Kopf: schwebende Kapsel ────────────────────────────────────────────── */
.kopf { position: fixed; inset: 14px 0 auto 0; z-index: 50; display: flex; justify-content: center; padding-inline: 12px; pointer-events: none; }
.kapsel {
    pointer-events: auto;
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 6px;
    height: var(--leiste-hoehe); padding: 0 11px 0 9px;
    border-radius: calc(var(--leiste-hoehe) / 2);
    background: color-mix(in srgb, var(--leiste) 86%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--haarlinie);
    box-shadow: var(--schatten-leiste);
    view-transition-name: kapsel;
}
.marke-feld { display: inline-flex; align-items: center; gap: 10px; padding-right: 10px; text-decoration: none; border-radius: var(--r-kapsel); }
.logo { width: 44px; height: 44px; border-radius: var(--r-kachel); box-shadow: var(--kachel-rand), 0 1px 3px rgb(45 35 22 / 0.12); }
.marke { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.navigation { display: flex; gap: 2px; margin-right: 6px; }
.navigation a {
    display: block; padding: 9px 14px; border-radius: var(--r-kapsel);
    font-size: 15px; font-weight: 600; color: var(--tinte-2); text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.navigation a:hover { background: var(--tinte-hauch); color: var(--tinte); }
.navigation a.aktiv { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--tinte); }
.lesefortschritt { position: absolute; left: 31px; right: 31px; bottom: 0; height: 2px; border-radius: 2px; background: var(--amber); transform-origin: 0 50%; transform: scaleX(0); opacity: 0; }
.ladeleiste { display: none; }

/* ── Aufmacher ──────────────────────────────────────────────────────────── */
.held { padding: 150px 0 88px; overflow-x: clip; }
.held-raster { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.held h1 { margin: 22px 0 20px; font-size: clamp(2.6rem, 5.2vw, 4.5rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.025em; text-wrap: balance; }
.vorspann { font-size: clamp(1.06rem, 1.4vw, 1.25rem); line-height: 1.55; font-weight: 500; color: var(--tinte-2); max-width: 34em; text-wrap: pretty; }

.held-buehne { position: relative; padding: 24px 0; perspective: 1200px; }
.held-schein {
    position: absolute; inset: -6% -10%; z-index: -1; filter: blur(48px); opacity: 0.55;
    background: radial-gradient(40% 36% at 30% 30%, color-mix(in srgb, var(--zeit-a) 45%, transparent), transparent 70%),
                radial-gradient(38% 34% at 72% 74%, color-mix(in srgb, var(--zeit-b) 40%, transparent), transparent 70%);
}
.kipp-ebene {
    position: relative; transform-style: preserve-3d;
    transform: rotateX(var(--kx, 0deg)) rotateY(var(--ky, 0deg));
    transition: transform 0.7s var(--sanft);
}
.kipp-ebene.folgt { transition-duration: 0.12s; transition-timing-function: linear; }
.held-fenster { width: min(400px, 100%); aspect-ratio: 9 / 13; margin-inline: auto; --bildlage: 50% 64%; box-shadow: var(--schatten-geraet); view-transition-name: held-avatar; }
.held-fenster[role="button"] { cursor: pointer; }
.schwebe { position: absolute; z-index: 2; transform: translateZ(60px); }
.schwebe-ziel { top: 7%; left: -1%; width: 168px; }
.schwebe-zeit { bottom: 9%; right: 0; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; max-width: 300px; transform: translateZ(90px); }
.held-zeile { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.nur-mit-js { display: none; }
.js .nur-mit-js { display: block; }
.zeile { display: flex; align-items: center; gap: 12px; }
.name { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.meta { font-size: 12px; font-weight: 500; color: var(--tinte-2); }
.prozent { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--tinte-2); font-variant-numeric: tabular-nums; }
.balken { height: 8px; margin: 12px 0 6px; border-radius: 4px; background: var(--tinte-hauch); overflow: hidden; }
.balken span { display: block; width: 50%; height: 100%; border-radius: 4px; background: var(--gruen); transform-origin: 0 50%; }
.zwischen { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }

/* ── Fenster (Avatar- und Raumbilder) ───────────────────────────────────── */
.fenster { position: relative; overflow: hidden; border-radius: var(--r-karte); background: var(--grund-unten); border: 1px solid var(--haarlinie); --bildlage: 50% 60%; }
.fenster picture, .fenster img { width: 100%; height: 100%; }
.fenster img, .avatar-schleife { object-fit: cover; object-position: var(--bildlage); }
.avatar-schleife { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s ease; pointer-events: none; }
.avatar-schleife.laeuft { opacity: 1; }

/* ── Abschnitte ─────────────────────────────────────────────────────────── */
.teil { padding-block: var(--teil-abstand) 0; }
.teil-kopf { max-width: 660px; }
.teil-kopf h2 { margin: 18px 0 14px; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.022em; text-wrap: balance; }
.teil-kopf-mitte { margin: 0 auto 48px; text-align: center; }
.teil-kopf-mitte .vorspann { margin-inline: auto; }

/* ── A · Ein Tag: Scrollen treibt die Uhr ───────────────────────────────── */
.tageslauf { position: relative; --fortschritt: 0.29; --w-morgen: 0; --w-abend: 0; --w-nacht: 0; }
.tl-feld { position: relative; padding-block: var(--teil-abstand) 0; }
.tl-himmel { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); }
.tl-himmel .h { position: absolute; inset: 0; transition: opacity 0.4s linear; }
.h-morgen { opacity: var(--w-morgen); background: radial-gradient(70% 60% at 20% 30%, color-mix(in srgb, #E09A34 16%, transparent), transparent 72%); }
.h-abend { opacity: var(--w-abend); background: radial-gradient(70% 60% at 80% 60%, color-mix(in srgb, #E0763C 16%, transparent), transparent 72%), radial-gradient(50% 50% at 20% 80%, color-mix(in srgb, #D8629A 10%, transparent), transparent 70%); }
.h-nacht { opacity: var(--w-nacht); background: linear-gradient(180deg, color-mix(in srgb, #5A5FA6 14%, transparent), color-mix(in srgb, #5A5FA6 6%, transparent)); }

.tl-raster { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 64px; align-items: center; }
.tl-buehne { width: 100%; aspect-ratio: 9 / 13; --bildlage: 50% 62%; box-shadow: var(--schatten-geraet); }
.stufe { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease; }
.tageslauf[data-station="1"] .stufe-1, .tageslauf[data-station="2"] .stufe-2, .tageslauf[data-station="3"] .stufe-3,
.tageslauf[data-station="4"] .stufe-4, .tageslauf[data-station="5"] .stufe-5, .tageslauf[data-station="6"] .stufe-6,
.tageslauf[data-station="7"] .stufe-7, .tageslauf[data-station="8"] .stufe-8 { opacity: 1; }
.tl-licht { position: absolute; inset: 0; pointer-events: none; opacity: calc(var(--w-abend) * 0.5 + var(--w-nacht) * 0.3);
    background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, #E0763C 30%, transparent)); }
.tl-uhr { position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: var(--r-kapsel); }
.uhr { width: 40px; height: 40px; }
.uhr circle:not(.voll) { fill: color-mix(in srgb, var(--amber) var(--kachel-anteil), var(--flaeche)); stroke: var(--amber); stroke-width: 2; }
.uhr .voll { fill: var(--tinte); }
.zeiger { stroke: var(--tinte); stroke-width: 2.6; stroke-linecap: round; transform-box: view-box; transform-origin: 20px 20px; }
.zeiger-h { transform: rotate(calc(var(--zeiger-h, 255) * 1deg)); }
.zeiger-m { stroke-width: 1.8; transform: rotate(calc(var(--zeiger-m, 180) * 1deg)); }
.uhr-text { font-size: 19px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; min-width: 3.1em; }

.tl-vorspann { margin-bottom: 26px; }
.tl-stationen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.station {
    position: relative; display: grid; grid-template-columns: var(--kachel) minmax(0, 1fr); gap: 12px; align-items: start;
    padding: 10px 12px 10px 10px; border-radius: var(--r-steuer); opacity: 0.55;
    transition: opacity 0.35s ease;
}
.station::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: color-mix(in srgb, var(--farbe) 13%, var(--flaeche)); border: 1px solid var(--haarlinie); opacity: 0; transform: scale(0.97); transition: opacity 0.35s ease, transform 0.5s var(--feder); }
.tageslauf[data-station="1"] .station-1, .tageslauf[data-station="2"] .station-2, .tageslauf[data-station="3"] .station-3,
.tageslauf[data-station="4"] .station-4, .tageslauf[data-station="5"] .station-5, .tageslauf[data-station="6"] .station-6,
.tageslauf[data-station="7"] .station-7, .tageslauf[data-station="8"] .station-8 { opacity: 1; }
.tageslauf[data-station="1"] .station-1::before, .tageslauf[data-station="2"] .station-2::before, .tageslauf[data-station="3"] .station-3::before,
.tageslauf[data-station="4"] .station-4::before, .tageslauf[data-station="5"] .station-5::before, .tageslauf[data-station="6"] .station-6::before,
.tageslauf[data-station="7"] .station-7::before, .tageslauf[data-station="8"] .station-8::before { opacity: 1; transform: none; }
.station[role="button"] { cursor: pointer; }
.station[role="button"]:hover { opacity: 1; }
.station-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.station-kopf b { font-size: 15.5px; font-weight: 700; }
.station-kopf span { font-size: 13.5px; font-weight: 600; color: var(--tinte-2); font-variant-numeric: tabular-nums; }
.station-satz { margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--tinte-2); }
.tl-fortschritt { display: none; height: 4px; margin-top: 14px; border-radius: 2px; background: var(--tinte-hauch); overflow: hidden; }
.tl-fortschritt span { display: block; height: 100%; background: var(--amber); transform-origin: 0 50%; transform: scaleX(var(--fortschritt)); }

/* Mit JS und Bewegung: lange Spur, die Bühne haftet (renyu.js setzt .tl-an) */
.tl-an .tl-spur { height: calc(100vh + 8 * 50vh); }
.tl-an .tl-feld { position: sticky; top: 0; height: 100vh; min-height: 640px; padding: 96px 0 24px; display: flex; align-items: center; }
.tl-an .tl-buehne { width: auto; height: min(calc(100vh - 150px), 600px); max-width: 100%; justify-self: center; }
.tl-an .tl-fortschritt { display: block; }

/* ── B · Das lebende iPhone ─────────────────────────────────────────────── */
.app-teil { overflow-x: clip; }
.app-raster { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 72px; align-items: center; }
.schritte { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin-top: 30px; }
.schritte li { display: flex; gap: 14px; align-items: flex-start; }
.nummer {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: var(--kachel); height: var(--kachel); border-radius: var(--r-kachel);
    background: color-mix(in srgb, var(--amber) var(--kachel-anteil), var(--flaeche)); box-shadow: var(--kachel-rand);
    font-size: 17px; font-weight: 800; color: var(--tinte);
}
.schritte h3 { font-size: 16.5px; font-weight: 700; line-height: 1.3; margin-top: 2px; }
.schritte p { font-size: 15px; color: var(--tinte-2); line-height: 1.45; }
.app-hinweis { display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; padding: var(--pille-y) var(--pille-x) var(--pille-y) 8px; border-radius: var(--r-kapsel); background: color-mix(in srgb, var(--gruen) 12%, var(--flaeche)); border: 1px solid var(--haarlinie); font-size: 14.5px; font-weight: 600; }
.app-hinweis .sym { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--gruen); color: #FFFFFF; stroke-width: 2.6; }

.telefon-buehne { position: relative; display: flex; justify-content: center; }
.telefon-schein { position: absolute; inset: 8% -18%; z-index: -1; filter: blur(52px); opacity: 0.5;
    background: radial-gradient(45% 40% at 30% 40%, color-mix(in srgb, var(--gruen) 40%, transparent), transparent 70%),
                radial-gradient(40% 40% at 70% 70%, color-mix(in srgb, var(--amber) 40%, transparent), transparent 70%); }
.telefon-foto { display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* Umschalter iPhone / Android: Segment wie in der App */
.plattform-wahl { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-kapsel); background: var(--tinte-hauch); border: 1px solid var(--haarlinie); white-space: nowrap; }
.plattform-wahl label {
    display: inline-flex; align-items: center; justify-content: center; min-width: 104px; min-height: 44px; padding: 0 var(--pille-x);
    border-radius: var(--r-kapsel); font-size: 14.5px; font-weight: 600; color: var(--tinte-2); cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.plattform-wahl input:checked + label { background: var(--flaeche); color: var(--tinte); box-shadow: var(--schatten-karte); }
.plattform-wahl input:focus-visible + label { outline: 3px solid var(--amber); outline-offset: 2px; }

/* Gehäuse in CSS, das Foto darin unbeschnitten */
.telefon {
    width: 320px; padding: 10px; border-radius: 46px;
    background: var(--rahmen); box-shadow: var(--schatten-geraet), inset 0 0 0 1.5px rgb(255 255 255 / 0.10);
    transition: border-radius 0.4s var(--sanft), padding 0.4s var(--sanft);
}
.telefon-schirm { position: relative; overflow: hidden; border-radius: 36px; background: var(--grund); transition: border-radius 0.4s var(--sanft); view-transition-name: foto-schirm; }
.telefon-foto:has(#p-android:checked) .telefon { border-radius: 34px; padding: 8px; }
.telefon-foto:has(#p-android:checked) .telefon-schirm { border-radius: 26px; }

.foto-band { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.foto-band::-webkit-scrollbar { display: none; }
.foto-band:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.foto { flex: 0 0 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.foto-bild, .foto-bild img { display: block; width: 100%; height: auto; }
.band-android, .punkte-android { display: none; }
.telefon-foto:has(#p-android:checked) .band-ios, .telefon-foto:has(#p-android:checked) .punkte-ios { display: none; }
.telefon-foto:has(#p-android:checked) .band-android, .telefon-foto:has(#p-android:checked) .punkte-android { display: flex; }

/* Steuerung unter dem Telefon (nur mit JS; ohne JS wischt man) */
.nur-mit-js-flex { display: none; }
.js .nur-mit-js-flex { display: flex; }
.foto-steuer { align-items: center; gap: 14px; }
.foto-schritt {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--haarlinie); border-radius: 50%; background: var(--flaeche); color: var(--tinte);
    box-shadow: var(--schatten-karte); cursor: pointer;
}
.foto-schritt .sym { width: 20px; height: 20px; }
.foto-schritt[data-schritt="-1"] .sym { transform: rotate(180deg); }
.foto-schritt:focus-visible, .punkt-knopf:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.foto-mitte { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 168px; }
.foto-name { font-size: 15px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.punkte-ios { display: flex; }
.punkt-knopf { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 24px; padding: 0; border: 0; border-radius: var(--r-kapsel); background: none; cursor: pointer; }
.punkt-knopf span { width: 7px; height: 7px; border-radius: 50%; background: var(--tinte-2); opacity: 0.35; transition: transform 0.35s var(--feder), opacity 0.25s ease, background-color 0.25s ease; }
.punkt-knopf[aria-current="true"] span { opacity: 1; background: var(--amber); transform: scale(1.35); }
.entwurf-hinweis { max-width: 320px; font-size: 12.5px; line-height: 1.45; color: var(--tinte-2); text-align: center; }

/* Kleines Telefon im Aufmacher */
.mini-telefon { padding: 6px; border-radius: 26px; background: var(--rahmen); box-shadow: var(--schatten-geraet), inset 0 0 0 1px rgb(255 255 255 / 0.10); }
.mini-telefon .foto-bild { overflow: hidden; border-radius: 20px; }

/* ── D · Räume: kippende Karten, Klick öffnet den Raum ──────────────────── */
.raum-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.raum-kachel {
    position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 8px; margin: 0;
    font: inherit; color: inherit; text-align: left; cursor: pointer;
    background: var(--flaeche); border: 1px solid var(--haarlinie); border-radius: var(--r-karte); box-shadow: var(--schatten-karte);
    transform-style: preserve-3d;
    transform: perspective(900px) rotateX(var(--kx, 0deg)) rotateY(var(--ky, 0deg));
    transition: transform 0.6s var(--feder), box-shadow 0.3s ease;
}
.raum-kachel.folgt { transition: transform 0.1s linear, box-shadow 0.3s ease; }
.raum-kachel:hover { box-shadow: var(--schatten-karte), 0 22px 44px color-mix(in srgb, var(--farbe) 18%, transparent); }
.raum-kachel:focus-visible { outline-offset: 4px; border-radius: var(--r-karte); }
.raum-bild { position: absolute; inset: 8px; border-radius: 14px; --bildlage: 50% 70%; transform: translateZ(10px); }
.raum-schild {
    position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 10px;
    padding: 8px 12px 8px 8px; border-radius: 16px;
    background: color-mix(in srgb, var(--flaeche) 90%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid var(--haarlinie); box-shadow: var(--schatten-karte);
    transform: translateZ(44px);
}
.raum-schild b { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.25; }
.raum-schild small { display: block; font-size: 12.5px; font-weight: 500; color: var(--tinte-2); line-height: 1.3; }
.raum-glanz { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 0.4s ease; transform: translateZ(60px); }
.raum-glanz::before { content: ""; position: absolute; left: -50%; top: -50%; width: 100%; height: 100%; background: radial-gradient(closest-side, rgb(255 255 255 / 0.28), transparent); transform: translate(var(--gx, 50%), var(--gy, 50%)); }
.raum-kachel.folgt .raum-glanz { opacity: 1; }

.raum-pop { color: var(--tinte); }
.raum-pop:popover-open {
    position: fixed; inset: 0; margin: auto; width: min(900px, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 48px); overflow: auto;
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px; padding: 16px 28px 16px 16px;
    overscroll-behavior: contain;
}
.raum-pop::backdrop { background: rgb(22 21 19 / 0.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pop-bild { aspect-ratio: 4 / 5; --bildlage: 50% 66%; border-radius: 14px; }
.pop-bilder { position: relative; }
.pop-bilder .geraet { position: absolute; right: -10px; bottom: 16px; width: 40%; }
.pop-text { display: flex; flex-direction: column; gap: 16px; padding: 26px 0 10px; }
.raum-kopf { display: flex; align-items: center; gap: 13px; padding-right: 44px; }
.raum-kopf h3 { font-size: 24px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.raum-kurz { font-size: 14px; font-weight: 500; color: var(--tinte-2); }
.pop-text > p { font-size: 16px; line-height: 1.6; }
.punkte { display: grid; gap: 8px; }
.punkte li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 500; line-height: 1.4; }
.punkte .sym { width: 18px; height: 18px; margin-top: 1px; stroke-width: 2.4; color: var(--farbe); }
.mehr { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px 10px 0; font-size: 15px; font-weight: 600; text-decoration: none; }
.mehr .sym { width: 18px; height: 18px; color: var(--farbe); transition: transform 0.4s var(--feder); }
.mehr:hover .sym { transform: translateX(4px); }
.mehr:hover span { text-decoration: underline; text-decoration-color: var(--farbe); text-underline-offset: 4px; }
.pop-zu { display: none; }
.raum-pop:popover-open .pop-zu {
    position: absolute; top: 14px; right: 14px; display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; border: 1px solid var(--haarlinie); border-radius: 50%;
    background: var(--flaeche); color: var(--tinte); cursor: pointer; box-shadow: var(--schatten-leiste); z-index: 2;
}
.pop-zu .sym { transform: rotate(45deg); }
.geraet { margin: 0; overflow: hidden; border-radius: 14% / 7.87%; border: 1px solid var(--haarlinie); box-shadow: var(--schatten-geraet); background: var(--flaeche); }
.geraet img { width: 100%; height: auto; }

/* ── Daten ──────────────────────────────────────────────────────────────── */
.zusagen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--stapel); }
.zusagen li { padding: 24px; }
.zusagen h3 { margin: 16px 0 6px; font-size: 17.5px; font-weight: 700; line-height: 1.3; }
.zusagen p { font-size: 15px; line-height: 1.55; color: var(--tinte-2); }
.daten-fuss { max-width: 640px; margin: 32px auto 0; text-align: center; font-size: 15px; color: var(--tinte-2); }
.daten-fuss a, .antwort a, .vorspann a { color: var(--tinte); font-weight: 600; text-decoration-color: var(--amber); text-underline-offset: 4px; }

/* ── Fragen ─────────────────────────────────────────────────────────────── */
.fragen-raster { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 72px; align-items: start; }
.fragen { display: grid; gap: var(--stapel); }
.fragen details { overflow: hidden; }
.fragen summary {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 20px 22px 20px 24px; cursor: pointer; list-style: none;
    font-size: 17px; font-weight: 600; line-height: 1.35;
    transition: background-color 0.2s ease;
}
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary:hover { background: var(--tinte-hauch); }
.fragen .auf { width: 22px; height: 22px; color: var(--tinte-2); transition: transform 0.45s var(--feder); }
.fragen details[open] .auf { transform: rotate(45deg); color: var(--amber); }
.antwort { padding: 0 24px 22px; color: var(--tinte-2); font-size: 16px; }
.antwort p + p { margin-top: 10px; }
@supports selector(::details-content) {
    .fragen details::details-content { block-size: 0; overflow: clip; transition: block-size 0.4s var(--sanft), content-visibility 0.4s allow-discrete; }
    .fragen details[open]::details-content { block-size: auto; }
}

/* ── Fuß ────────────────────────────────────────────────────────────────── */
.fuss { padding: var(--teil-abstand) 0 40px; }
.fuss-karte { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; padding: 36px 40px; background: var(--flaeche); border: 1px solid var(--haarlinie); border-radius: var(--r-karte); box-shadow: var(--schatten-karte); }
.fuss-gruss-feld { display: flex; align-items: center; gap: 22px; }
.fuss-fenster { flex: none; width: 118px; aspect-ratio: 4 / 5; --bildlage: 50% 62%; }
.fuss-marke { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.fuss-marke .logo { width: 32px; height: 32px; border-radius: 9px; }
.fuss-gruss { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; line-height: 1.2; }
.fuss-text { font-size: 15px; color: var(--tinte-2); }
.fuss-text a { color: var(--tinte); font-weight: 600; text-decoration-color: var(--amber); text-underline-offset: 3px; }
.fuss-spalten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.fuss-titel { font-size: 13.5px; font-weight: 600; color: var(--tinte-2); margin: 0 0 12px; }
.fuss-links { display: grid; gap: 9px; }
.fuss-links a, .fuss-links .bald { font-size: 15px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.fuss-links a:hover { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 4px; }
.fuss-links .bald { color: var(--tinte-2); }
.bald small { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-kapsel); background: var(--tinte-hauch); white-space: nowrap; }
.fuss-unten { margin-top: 20px; text-align: center; font-size: 13.5px; color: var(--tinte-2); }
.fuss-marken { margin-top: 6px; font-size: 12px; }

/* ── Rechtsseiten ───────────────────────────────────────────────────────── */
.seite-held { padding: 148px 0 36px; }
.seite-held h1 { margin: 20px 0 16px; font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; hyphens: manual; }
.seite-held .vorspann { max-width: 40em; }
.stand { margin-top: 10px; font-size: 14px; font-weight: 500; color: var(--tinte-2); }
.seite-held .stand:first-of-type { margin-top: 18px; display: inline-block; padding: var(--pille-y) var(--pille-x); border-radius: var(--r-kapsel); background: var(--flaeche); border: 1px solid var(--haarlinie); color: var(--tinte); font-weight: 600; }
.teil-text { padding-top: 12px; }
.recht { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; align-items: start; }
.recht-seite { position: sticky; top: 100px; }
.inhalt-liste { padding: 14px 10px; max-height: calc(100vh - 124px); overflow: auto; background: var(--flaeche); border: 1px solid var(--haarlinie); border-radius: var(--r-karte); box-shadow: var(--schatten-karte); }
.inhalt-liste h2 { margin: 2px 12px 8px; font-size: 13.5px; font-weight: 600; color: var(--tinte-2); }
.inhalt-liste ol { display: grid; gap: 1px; }
.inhalt-liste a { display: block; padding: 7px 12px; border-radius: var(--r-steuer); font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--tinte-2); text-decoration: none; transition: background-color 0.2s ease, color 0.2s ease; }
.inhalt-liste a:hover { background: var(--tinte-hauch); color: var(--tinte); }
.inhalt-liste a.aktiv { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--tinte); font-weight: 600; }
.lesetext { max-width: calc(var(--lesebreite) + 112px); padding: 44px 56px; background: var(--flaeche); border: 1px solid var(--haarlinie); border-radius: var(--r-karte); box-shadow: var(--schatten-karte); overflow-wrap: break-word; }
.abschnitt + .abschnitt { margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--haarlinie); }
.lesetext h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 14px; scroll-margin-top: 104px; }
.lesetext h3 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.lesetext p, .lesetext li { font-size: 17px; line-height: 1.65; }
.lesetext p + p, .lesetext p + ul, .lesetext ul + p { margin-top: 12px; }
.lesetext ul { display: grid; gap: 8px; margin-top: 12px; }
.lesetext ul li { position: relative; padding-left: 22px; }
.lesetext ul li::before { content: ""; position: absolute; left: 4px; top: 0.66em; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.lesetext strong { font-weight: 600; }
.lesetext a { text-decoration-color: var(--amber); text-underline-offset: 3px; font-weight: 500; }
.lesetext .hinweis, .lesetext .wichtig { padding: 14px 18px; border-radius: var(--r-steuer); background: color-mix(in srgb, var(--amber) 11%, var(--flaeche)); border: 1px solid var(--haarlinie); }
.weiter-recht { display: flex; flex-wrap: nowrap; justify-content: center; gap: 10px; padding: 32px 0 0; overflow-x: auto; scrollbar-width: none; }

/* ── Schmalere Schirme ──────────────────────────────────────────────────── */
@media (max-width: 1180px) {
    .navigation a { padding: 9px 10px; font-size: 14.5px; }
    .raum-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .fuss-karte { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1040px) {
    .abzeichen-kapsel .abzeichen-play { display: none; }
}

@media (max-width: 860px) {
    :root { --teil-abstand: 80px; }
    .navigation { display: none; }
    .kapsel { width: 100%; max-width: 560px; justify-content: space-between; }
    .logo { width: 40px; height: 40px; }
    .ladeleiste {
        display: flex; justify-content: center; position: fixed; z-index: 50; left: 50%; bottom: 14px;
        width: min(420px, calc(100% - 24px)); padding: 10px 14px;
        transform: translateX(-50%);
        border-radius: calc(var(--leiste-hoehe) / 2);
        background: color-mix(in srgb, var(--leiste) 88%, transparent);
        -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
        border: 1px solid var(--haarlinie); box-shadow: var(--schatten-leiste);
        transition: transform 0.5s var(--feder), opacity 0.3s ease, visibility 0.3s;
        view-transition-name: ladeleiste;
    }
    .abzeichen-leiste { --abz-h: 42px; }
    .leiste-weg .ladeleiste { transform: translate(-50%, 140%); opacity: 0; visibility: hidden; }
    body { padding-bottom: 96px; }

    .held { padding-top: 112px; padding-bottom: 56px; }
    .held-raster, .app-raster, .fragen-raster { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .held-buehne { max-width: 440px; margin-inline: auto; width: 100%; }
    .abzeichen-gross { --abz-h: 46px; gap: 12px; }

    /* Tageslauf am Handy: Kopf, Bühne, nur die aktive Station, Fortschritt */
    .tl-raster { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .tl-text { display: contents; }
    .tl-text .teil-kopf { order: -1; }
    .tl-buehne { max-width: 440px; margin-inline: auto; aspect-ratio: 1 / 1; }
    .tl-stationen { grid-template-columns: minmax(0, 1fr); }
    .tl-an .tl-feld { padding: 84px 0 104px; align-items: flex-start; }
    .tl-an .tl-raster { gap: 14px; }
    .tl-an .tl-vorspann { display: none; }
    .tl-an .teil-kopf h2 { margin: 12px 0 0; font-size: 1.75rem; }
    .tl-an .tl-buehne { height: auto; width: 100%; max-height: calc(100vh - 380px); min-height: 240px; aspect-ratio: 1 / 1; }
    .tl-an .tl-stationen { display: grid; grid-template-areas: "s"; }
    .tl-an .station { grid-area: s; opacity: 0; }
    .tl-an .station::before { opacity: 1; transform: none; }
    .tl-an .tl-fortschritt { margin-top: 0; }
    .app-raster .teil-kopf { max-width: none; }
    .schritte { grid-template-columns: minmax(0, 1fr); gap: 14px; }

    .zusagen { grid-template-columns: minmax(0, 1fr); }
    .raum-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .raum-schild { left: 10px; right: 10px; bottom: 10px; padding: 7px 8px; }
    .raum-schild .kachel { display: none; }
    .raum-schild b { font-size: 14.5px; }
    .raum-schild small { font-size: 12px; }
    .raum-pop:popover-open { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 12px 12px 8px; }
    .pop-bild { aspect-ratio: 16 / 11; }
    .pop-bilder .geraet { width: 30%; right: 10px; bottom: -18px; }
    .pop-text { padding: 18px 8px 8px; }
    .recht { grid-template-columns: minmax(0, 1fr); }
    .recht-seite { position: static; }
    .inhalt-liste { max-height: none; }
    .weiter-recht { justify-content: flex-start; }
    .weiter-recht .knopf { min-height: 44px; padding: 0 16px; font-size: 14.5px; }
}

@media (max-width: 600px) {
    :root { --teil-abstand: 72px; }
    body { font-size: 16.5px; }
    .abzeichen-kapsel { --abz-h: 40px; }
    .marke { font-size: 18px; }
    .held h1 { font-size: 2.6rem; }
    .etikett-mehr { display: none; }
    .abzeichen-gross { --abz-h: 44px; }
    .schwebe-ziel { width: 128px; top: 3%; left: -6px; }
    .schwebe-zeit { right: -6px; bottom: 4%; max-width: 250px; }
    .telefon { width: 290px; }
    .fuss-karte { padding: 24px 20px; gap: 28px; }
    .fuss-gruss-feld { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 16px; align-items: start; }
    .fuss-gruss-feld > div:not(.fenster) { display: contents; }
    .fuss-gruss-feld .fenster { grid-row: 1 / 4; }
    .fuss-gruss { margin: 0; font-size: 19px; }
    .fuss-marke { margin-bottom: 4px; }
    .fuss-text { grid-column: 1 / -1; margin-top: 12px; }
    .abzeichen-fuss { grid-column: 1 / -1; --abz-h: 40px; }
    .fuss-fenster { width: 92px; }
    .fuss-spalten { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
    .fuss-links a, .fuss-links .bald { font-size: 14px; }
    .lesetext { padding: 26px 20px; }
    .lesetext h2 { font-size: 21px; }
    .lesetext p, .lesetext li { font-size: 16.5px; }
}

/* Aktive Station am Handy (nach den Medienregeln, damit sie gewinnt) */
@media (max-width: 860px) {
    .tl-an .tageslauf[data-station="1"] .station-1, .tl-an .tageslauf[data-station="2"] .station-2,
    .tl-an .tageslauf[data-station="3"] .station-3, .tl-an .tageslauf[data-station="4"] .station-4,
    .tl-an .tageslauf[data-station="5"] .station-5, .tl-an .tageslauf[data-station="6"] .station-6,
    .tl-an .tageslauf[data-station="7"] .station-7, .tl-an .tageslauf[data-station="8"] .station-8 { opacity: 1; }
}

/* ── Ganze Website (Runde 4): Unterseiten, Rechtstexte, Funktionen, 404 ── */

/* Nur eine Plattform (Fotos aus einer Quelle): Android-Gehäuse, ohne Umschalter */
.plattform-android .telefon { border-radius: 34px; padding: 8px; }
.plattform-android .telefon-schirm { border-radius: 26px; }
.plattform-android .band-android, .plattform-android .punkte-android { display: flex; }
.plattform-android .band-ios, .plattform-android .punkte-ios { display: none; }

/* Aktuelle Seite in der Kapsel */
.navigation a[aria-current="page"] { background: var(--flaeche); color: var(--tinte); box-shadow: var(--schatten-karte); }

/* Brotkrume als Pille über dem Titel */
.krume {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    padding: var(--pille-y) var(--pille-x); border-radius: var(--r-kapsel);
    background: var(--flaeche); border: 1px solid var(--haarlinie);
    color: var(--tinte-2); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.krume a { color: var(--tinte); text-decoration: none; }
.krume a:hover { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }

/* Rechtstexte: Inhaltsverzeichnis klebt neben dem Text */
.recht > .inhalt-liste { position: sticky; top: 100px; }
.seite-held .stand { color: var(--tinte-2); font-size: 15px; }
.seite-held .stand + .stand { margin-top: 8px; display: block; max-width: 40em; }

/* Lizenzen und Lebensmitteldaten: schmale Spalte mit Aufmacher */
.huelle.schmal { max-width: calc(var(--lesebreite) + 112px + 2 * var(--rand)); }
.aufmacher { padding: 148px 0 28px; }
.aufmacher h1 { margin: 20px 0 16px; font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; }
.aufmacher h1:first-child { margin-top: 0; }
.marker {
    display: inline-flex; padding: var(--pille-y) var(--pille-x); border-radius: var(--r-kapsel);
    background: var(--flaeche); border: 1px solid var(--haarlinie); color: var(--tinte-2); font-size: 14px; font-weight: 600; white-space: nowrap;
}
.schmal > .abschnitt { padding: 32px 36px; background: var(--flaeche); border: 1px solid var(--haarlinie); border-radius: var(--r-karte); box-shadow: var(--schatten-karte); overflow-wrap: break-word; }
.schmal > .abschnitt + .abschnitt { margin-top: var(--stapel); border-top: 1px solid var(--haarlinie); }
.schmal > .abschnitt h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 12px; }
.schmal > .abschnitt h3 { font-size: 17px; font-weight: 600; margin: 20px 0 6px; }
.schmal > .abschnitt p, .schmal > .abschnitt li { font-size: 16.5px; line-height: 1.6; }
.schmal > .abschnitt p + p, .schmal > .abschnitt p + ul, .schmal > .abschnitt ul + p { margin-top: 10px; }
.schmal > .abschnitt a { text-decoration-color: var(--amber); text-underline-offset: 3px; font-weight: 500; }
.schmal .hinweis { margin-top: 14px; padding: 14px 18px; border-radius: var(--r-steuer); background: color-mix(in srgb, var(--amber) 11%, var(--flaeche)); border: 1px solid var(--haarlinie); }
.schmal ul { display: grid; gap: 6px; margin-top: 10px; }
.schmal ul li { position: relative; padding-left: 22px; }
.schmal ul li::before { content: ""; position: absolute; left: 4px; top: 0.66em; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* Angaben (Impressum, Datenschutz) und Tabellen */
dl.angaben { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin-top: 12px; font-size: 17px; line-height: 1.55; }
dl.angaben dt { font-weight: 600; }
dl.angaben dd { margin: 0; overflow-wrap: anywhere; }
.tabellenrahmen { margin-top: 14px; overflow-x: auto; border-radius: var(--r-steuer); border: 1px solid var(--haarlinie); }
.tabellenrahmen table { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabellenrahmen th, .tabellenrahmen td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--haarlinie); overflow-wrap: anywhere; }
.tabellenrahmen th { font-weight: 600; color: var(--tinte-2); background: var(--tinte-hauch); }
.tabellenrahmen tr:last-child td { border-bottom: 0; }
.lesetext pre, .schmal pre { margin-top: 12px; padding: 14px 16px; overflow-x: auto; border-radius: var(--r-steuer); background: var(--tinte-hauch); border: 1px solid var(--haarlinie); font-size: 13.5px; line-height: 1.5; }
.lesetext code, .schmal code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }

/* Knopfzeilen brechen nie um; am Handy scrollen sie seitlich */
.weiter-recht { padding: 32px 4px 16px; }
.fuss-links .bald { white-space: nowrap; flex-wrap: wrap; row-gap: 2px; }
.knoepfe { display: flex; flex-wrap: nowrap; gap: 10px; margin-top: 26px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; }
.knoepfe::-webkit-scrollbar, .weiter-recht::-webkit-scrollbar { display: none; }
.aktionen.knoepfe a:not(.knopf) {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: var(--r-kapsel);
    background: var(--flaeche); border: 1px solid var(--haarlinie); box-shadow: var(--schatten-karte);
    color: var(--tinte); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.aktionen.knoepfe .knopf:first-child { background: var(--amber); color: var(--auf-amber); }
.lesetext .aktionen { margin-top: 12px; }

/* Fragen in der Hilfe: wie auf der Startseite, Plus am Rand */
.lesetext .fragen { margin-top: 14px; }
.lesetext .fragen details { border: 1px solid var(--haarlinie); border-radius: var(--r-steuer); background: var(--flaeche); }
.lesetext .fragen summary { padding: 14px 52px 14px 18px; position: relative; font-size: 16.5px; }
.lesetext .fragen summary::after {
    content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%;
    font-size: 24px; font-weight: 500; line-height: 1; color: var(--tinte-2); transition: rotate 0.45s var(--feder), color 0.2s ease;
}
.lesetext .fragen details[open] summary::after { rotate: 45deg; color: var(--amber); }
.lesetext .fragen details > :not(summary) { padding: 0 18px; }
.lesetext .fragen details > :last-child { padding-bottom: 16px; }

/* Funktionen: Übersicht */
.teil-dicht { padding-top: 24px; }
.funktion-karten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.funktion-karte { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 16px; }
.funktion-karte-breit { grid-column: 1 / -1; grid-template-columns: 220px minmax(0, 1fr); }
.funktion-karte-bild { aspect-ratio: 3 / 4; --bildlage: 50% 58%; }
.funktion-karte-text { display: flex; flex-direction: column; gap: 12px; padding: 6px 4px 0 0; }
.funktion-karte-text .raum-kopf { padding-right: 0; }
.funktion-karte h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.funktion-karte p { color: var(--tinte-2); font-size: 15.5px; line-height: 1.5; }
.kreis-zurueck { display: flex; align-items: center; gap: 10px; margin-top: 24px; color: var(--tinte-2); font-weight: 500; }
.kreis-zurueck .sym { width: 22px; height: 22px; flex: none; color: var(--amber); }

/* Funktionen: eine Seite */
.funktion-raster { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.funktion-held .abzeichen-zeile { margin-top: 28px; }
.funktion-fenster { aspect-ratio: 4 / 5; max-width: 400px; width: 100%; justify-self: end; box-shadow: var(--schatten-geraet); }
.funktion-teil { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; align-items: start; }
.funktion-teil .geraet { position: sticky; top: 100px; }
.merkmale { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--stapel); }
.merkmale li { display: flex; gap: 12px; align-items: flex-start; padding: 20px; }
.merkmale .sym { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--farbe); }
.merkmale h3 { font-size: 17px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.merkmale p { font-size: 15.5px; color: var(--tinte-2); line-height: 1.5; }
.zusammenhang { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; align-items: center; padding: 20px 32px 20px 20px; }
.zusammenhang.ohne-bild { grid-template-columns: minmax(0, 1fr); padding: 32px; }
.zusammenhang-bild { aspect-ratio: 1 / 1; --bildlage: 50% 56%; }
.zusammenhang h2 { margin: 16px 0 10px; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.zusammenhang p { color: var(--tinte-2); font-size: 17px; line-height: 1.6; max-width: 40em; }
.weiter { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 10px; margin-top: 24px; }
.weiter .knopf { min-width: 0; }
.weiter .knopf span { overflow: hidden; text-overflow: ellipsis; }
.sym.zurueck { transform: rotate(180deg); }

/* 404 */
.verlaufen { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.verlaufen-fenster { aspect-ratio: 4 / 5; max-width: 400px; width: 100%; justify-self: end; box-shadow: var(--schatten-geraet); }

@media (max-width: 1040px) {
    .funktion-teil { grid-template-columns: minmax(0, 1fr) 240px; gap: 36px; }
    .merkmale { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
    .recht { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .recht > .inhalt-liste { position: static; max-height: none; }
    .aufmacher { padding-top: 112px; }
    .seite-held { padding-top: 112px; }
    .funktion-karten { grid-template-columns: minmax(0, 1fr); }
    .funktion-raster, .verlaufen, .funktion-teil { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .funktion-fenster, .verlaufen-fenster { justify-self: center; max-width: 360px; }
    .funktion-teil .geraet { position: static; max-width: 260px; margin-inline: auto; }
    .zusammenhang { grid-template-columns: minmax(0, 1fr); padding: 16px 16px 24px; }
    .zusammenhang-bild { aspect-ratio: 16 / 10; }
    .schmal > .abschnitt { padding: 24px 20px; }
    .weiter-recht, .knoepfe { margin-inline: calc(-1 * var(--rand)); padding-inline: var(--rand); scroll-padding-inline: var(--rand); }
}
@media (max-width: 600px) {
    .funktion-karte, .funktion-karte-breit { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px; }
    .funktion-karte h2 { font-size: 19px; }
    dl.angaben { grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 16px; }
    dl.angaben dd + dt { margin-top: 8px; }
    .knoepfe .knopf, .aktionen.knoepfe a:not(.knopf) { min-height: 46px; padding: 0 16px; font-size: 15px; }
}

/* ── Bewegung ───────────────────────────────────────────────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }

@keyframes einblenden { from { opacity: 0; transform: translateY(36px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes winken { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(4deg); } }
@keyframes schweben { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes puls { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gruen) 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes wachsen { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes kapsel-dichter { to { box-shadow: var(--schatten-leiste), 0 0 0 1px var(--haarlinie); background: color-mix(in srgb, var(--leiste) 94%, transparent); } }
@keyframes federn { 0% { transform: scale(0.6); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: no-preference) {
    .etikett .punkt { animation: puls 2.4s ease-out infinite; }
    .schwebe-ziel { animation: schweben 7s ease-in-out infinite; }
    .schwebe-zeit { animation: schweben 7s ease-in-out -3.5s infinite; }
    .marke-feld:hover .logo { animation: federn 0.6s var(--feder); }

    /* Plattformwechsel blendet das Foto über (renyu.js startet die View Transition) */
    ::view-transition-group(foto-schirm) { animation-duration: 0.35s; animation-timing-function: var(--sanft); }

    ::view-transition-group(held-avatar), ::view-transition-group(raum-offen) { animation-duration: 0.45s; animation-timing-function: var(--sanft); }

    /* Raum öffnet sich aus der Mitte (ohne View Transition) */
    .raum-pop { transition: opacity 0.25s ease, transform 0.45s var(--feder), overlay 0.3s allow-discrete, display 0.3s allow-discrete; }
    .raum-pop:popover-open { opacity: 1; transform: none; }
    @starting-style { .raum-pop:popover-open { opacity: 0; transform: scale(0.94) translateY(16px); } }
    .raum-pop:not(:popover-open) { opacity: 0; transform: scale(0.97); }
    .vt-aktiv .raum-pop { transition: none; }

    @supports (animation-timeline: view()) {
        .einblenden { animation: einblenden linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
        .kicker-figur { animation: winken linear both; animation-timeline: view(); animation-range: entry 40% cover 45%; }
        .balken span { animation: wachsen linear both; animation-timeline: view(); animation-range: entry 60% cover 45%; }
        .lesefortschritt { opacity: 1; animation: wachsen linear both; animation-timeline: scroll(root); }
        .kapsel { animation: kapsel-dichter linear both; animation-timeline: scroll(root); animation-range: 0 240px; }
    }
    .ohne-scrollzeit .einblenden { opacity: 0; transform: translateY(36px); transition: opacity 0.7s var(--sanft), transform 0.9s var(--sanft); }
    .ohne-scrollzeit .einblenden.ist-sichtbar { opacity: 1; transform: none; }
}

/* Ruhige Fassung: nichts haftet, nichts kippt, Wechsel sofort */
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
    .kipp-ebene, .raum-kachel { transform: none; }
}
