/* Rodeln im Winterwald · 3D-Fassung (28.11.2026, Muster: spiele/slalom/css/slalom.css). Kern-Tokens aus kern/spiel.css, Anzeigen der Fahrt aus winter3d-hud.js.
   Kein Scrollen, Ziele ≥ 120 × 96, große Pause (body.arcade-raetsel-pause). */
html, body { overflow: hidden; }
#buehne, #welt, #spiel { position: fixed; inset: 0; width: 100%; height: 100%; }
#buehne { background: #10292d; touch-action: none; }
#welt canvas { display: block; width: 100%; height: 100%; }
#spiel { z-index: 8; pointer-events: none; outline: none; }
#spiel .pause-knopf { pointer-events: auto; }
#spiel .pause-knopf:not(.pause-begleitung) { min-width: 120px; min-height: 96px; }
[hidden] { display: none !important; }
/* Anzeigen der Fahrt ruhen unter Menüs, Pause und Ergebnis */
body.rodel-menue .w3d-ui:not(.w3d-blende) { display: none !important; }
.rodel-start, .rodel-seite, .rodel-ergebnis-schirm { font-family: "DM Sans", system-ui, sans-serif; }

/* Startseite über der stehenden Welt: oben und unten abgedunkelt (Kontrast), die Mitte zeigt die Rodelbahn */
.rodel-start { background: linear-gradient(180deg, #081c1ff0, #081c1f99 30%, transparent 46%, transparent 56%, #081c1fee 78%); }
.rodel-start .start-oben { align-items: start; }
.rodel-start .start-kopf img { width: clamp(70px, 10vmin, 120px); height: auto; }
.rodel-start .start-kopf h1 { text-wrap: balance; color: var(--akzent); }
.rodel-start .start-kopf p { color: #fff; }
.rodel-start .start-unten { text-align: center; padding-bottom: var(--unten); }
.rodel-start .start-haupt { justify-content: center; }
.rodel-start .start-haupt .knopf { min-width: 120px; min-height: 96px; }
.rodel-start .start-haupt .knopf svg { width: 44px; height: 44px; flex: none; }
.rodel-start .start-haupt .knopf small { display: block; font-size: var(--s-klein); font-weight: 600; }
.rodel-sammlung { display: flex; width: fit-content; gap: 8px; align-items: center; margin: 0 auto var(--luecke); padding: 6px 14px;
  border-radius: var(--r-mittel); background: #10292df0; color: #fff; font-weight: 700; }
.rodel-preis { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; }
.rodel-preis svg { width: 100%; height: 100%; }
.rodel-preis.leer { opacity: .45; }

/* Regal: Zeilen, die seitenweise() verteilt */
.rodel-seite { display: flex; flex-direction: column; background: #10292d; }
.rodel-liste { flex: 1; display: flex; flex-direction: column; gap: var(--luecke); padding: 0 var(--rechts) 0 var(--links); min-height: 0; }
.rodel-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-radius: var(--r-mittel);
  background: #163a3ff0; color: #fff; }
.rodel-zeile > span:first-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.rodel-zeile svg { width: 36px; height: 36px; flex: none; }
.rodel-zeile .ort { color: #bfefff; display: inline-flex; }
.rodel-zeile small { color: #d5f7ff; font-size: var(--s-klein); }
.rodel-zeile .pokale { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.rodel-zeile .pokal { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* Ergebnis: Karte unten, das Podest in der Welt bleibt sichtbar */
.bildschirm.rodel-ergebnis-schirm { display: flex; align-items: flex-end; justify-content: center; padding: 0 var(--rechts) var(--unten) var(--links); background: none; }
.rodel-ergebnis { display: grid; gap: 10px; padding: 14px 18px; border-radius: 22px; background: #10292df2; border: 3px solid #ffffff55; color: #fff;
  max-width: min(980px, 100%); box-sizing: border-box; }
.rodel-ergebnis .kopf { display: flex; align-items: center; gap: 14px; }
.rodel-ergebnis .kopf .rodel-preis { width: clamp(56px, 10vmin, 92px); height: clamp(56px, 10vmin, 92px); }
.rodel-ergebnis h1.titel { margin: 0; font-size: clamp(22px, 4vmin, 40px); text-align: left; }
.rodel-ergebnis p { margin: 2px 0 0; color: #d5f7ff; font-size: var(--s-text); }
.rodel-ergebnis .saison-satz { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; }
.rodel-ergebnis .saison-satz svg { width: 32px; height: 32px; }
.rodel-ergebnis .dialog-knoepfe { display: flex; flex-wrap: wrap; gap: var(--luecke); justify-content: center; }
.rodel-ergebnis .dialog-knoepfe .knopf { min-width: 120px; min-height: 96px; }
@media (max-height: 419px) { .rodel-ergebnis { padding: 8px 12px; gap: 6px; } .rodel-ergebnis .dialog-knoepfe .knopf { min-width: 96px; min-height: 72px; } }

/* Training (zählt nicht für den Cup): Stoppuhr oben mittig unter der Torleiste */
.rodel-marke { position: fixed; left: 50%; top: calc(max(14px, env(safe-area-inset-top)) + 76px); transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 14px; background: rgba(14,30,52,.6); color: #ffd9b5; font: 700 15px/1.2 "DM Sans", system-ui, sans-serif; }
.rodel-marke svg { width: 24px; height: 24px; }
.rodel-laden p { color: #fff; font-size: var(--s-h3); text-align: center; }
.bildschirm.laden-schirm { display: grid; place-items: center; }
/* Einstellungen: die Zeilen mit vier Knöpfen (Steuerung, Lenkhilfe) immer zweizeilig, Titel oben, Knöpfe darunter
   (wie der Kern unter 560 px; nebeneinander ragten sie im Hochformat aus dem Fenster, Prüfwerk 28.11.) */
.einst-zeile.erklaert:has([data-key="steuerung"]), .einst-zeile.erklaert:has([data-key="lenkhilfe"]) { flex-wrap: wrap; }
.einst-zeile.erklaert:has([data-key="steuerung"]) h3, .einst-zeile.erklaert:has([data-key="lenkhilfe"]) h3 { flex: 1 1 100%; }
.einst-zeile.erklaert:has([data-key="steuerung"]) .wahl, .einst-zeile.erklaert:has([data-key="lenkhilfe"]) .wahl { flex: 1 1 100%; flex-wrap: wrap; }
.einst-zeile.erklaert:has([data-key="steuerung"]) .wahl > .knopf, .einst-zeile.erklaert:has([data-key="lenkhilfe"]) .wahl > .knopf { flex: 1 1 120px; }
/* Einstellungen: Bildzeichen in der Wahl (Steuerung, Lenkhilfe, Taster) */
.mit-bild { display: block; }
.mit-bild svg { width: 30px; height: 30px; display: block; margin: 0 auto 2px; }

/* CVI: ruhig, gelb auf Schwarz */
body.w3d-cvi .rodel-start, body.bf-cvi .rodel-start { background: linear-gradient(180deg, #000, #000c 34%, transparent 48%, transparent 56%, #000 78%); }
body.w3d-cvi .rodel-sammlung, body.w3d-cvi .rodel-zeile, body.w3d-cvi .rodel-ergebnis, body.w3d-cvi .rodel-seite,
body.bf-cvi .rodel-sammlung, body.bf-cvi .rodel-zeile, body.bf-cvi .rodel-ergebnis, body.bf-cvi .rodel-seite { background: #000; border-color: #ffd84d; }
body.w3d-cvi .rodel-zeile small, body.w3d-cvi .rodel-ergebnis p, body.bf-cvi .rodel-zeile small, body.bf-cvi .rodel-ergebnis p { color: #fff; }
body.w3d-cvi .rodel-marke, body.bf-cvi .rodel-marke { background: #000; color: #ffd84d; border: 2px solid #ffd84d; }

/* Ansagen: Plakette, Umbruch und Lage stehen seit der Pflege 28.11. zentral im Baustein (winter3d-hud.js, .w3d-ansage). */

/* Momente der Bahn in der Torleiste des Bausteins (eigene Bildzeichen statt Torflaggen) */
#buehne .w3d-tore svg.moment { width: 40px; height: 36px; }
@media (max-width: 420px) { #buehne .w3d-tore { gap: 4px; padding: 8px 10px; } #buehne .w3d-tore svg.moment { width: 30px; height: 28px; } }
body.w3d-cvi .w3d-tore svg.moment.offen g { stroke: #8a7a3a; }

/* --- Lange Strecke und Endlos abwärts (29.11.2026, fluss-modi.js) -------------------------------------------------------
   Startseite: vier große Knöpfe (Spielen, Regal, Lange Strecke, Endlos). Breit: eine Reihe; schmal: zwei Reihen; flach: eine Reihe
   mit kleinerer Unterzeile. Ziele ≥ 120 × 96, kein Scrollen. */
.rodel-start .start-haupt:has(.zweit) > .knopf.haupt { flex: 1 1 210px; max-width: 360px; }
/* „Spielen“ bleibt der größte Knopf (Prüfwerk: ≥ 1,2 × Kopfzeilen-Knopf; 29.11. mit vier gleichen Knöpfen knapp darunter) */
.rodel-start .start-haupt:has(.zweit) > .knopf.haupt[data-tasten-start] { flex-grow: 1.6; max-width: 400px; }
@media (max-height: 500px) {
  .rodel-start .start-haupt:has(.zweit) { flex-wrap: nowrap; gap: 8px; }
  .rodel-start .start-haupt:has(.zweit) > .knopf.haupt { flex: 1 1 0; min-width: 120px; min-height: 96px; font-size: 17px; gap: 6px; padding: 6px 8px; }
  .rodel-start .start-haupt .knopf small { font-size: 11px; }
  .rodel-start .start-haupt .knopf svg { width: 34px; height: 34px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .rodel-start .start-haupt:has(.zweit) > .knopf.haupt { flex: 1 1 calc(50% - 10px); min-width: 120px; max-width: none; }
}
/* Sehr schmal (iPhone SE, Prüfung 29.11.: Text abgeschnitten): hoch Bild über Text, quer kleineres Bild und Schrift; Wörter trennen statt abschneiden */
@media (max-width: 400px) and (orientation: portrait) {
  .rodel-start .start-haupt:has(.zweit) > .knopf.haupt { flex-direction: column; justify-content: center; gap: 4px; padding: 6px; font-size: 17px; line-height: 1.15; text-align: center; hyphens: auto; }
  .rodel-start .start-haupt:has(.zweit) > .knopf.haupt svg { width: 30px; height: 30px; }
  .rodel-start .start-haupt:has(.zweit) > .knopf.haupt small { font-size: 11px; white-space: normal; }
  /* 30.11.: die Unterzeile passte rechnerisch (12 px Luft), lief im Bild aber in die runde Kante (iPhone 13 hoch) → seitlicher Abstand, dann bricht sie um */
  .rodel-start .start-haupt:has(.zweit) > .knopf.haupt small { padding-inline: 12px; text-wrap: balance; }
}
/* quer und schmal (568 × 320): der Kern setzt hier 20 px mit `.bildschirm.start …` — darum mit #oberflaeche; „Spielen“ wächst hier nicht */
@media (max-width: 700px) and (max-height: 500px) {
  #oberflaeche.rodel-start .start-haupt:has(.zweit) > .knopf.haupt { flex-grow: 1; gap: 4px; padding: 4px 6px; font-size: 14px; line-height: 1.15; hyphens: auto; }
  #oberflaeche.rodel-start .start-haupt:has(.zweit) > .knopf.haupt svg { width: 24px; height: 24px; }
  #oberflaeche.rodel-start .start-haupt:has(.zweit) > .knopf.haupt small { font-size: 10px; white-space: normal; }
}
/* Ortswahl der langen Strecke: vier Kacheln (quer eine Reihe, hoch 2 × 2) */
.rodel-langwahl h1.titel { display: flex; align-items: center; justify-content: center; gap: 10px; }
.rodel-langwahl h1.titel svg { width: 40px; height: 40px; flex: none; }
.lang-kacheln { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: var(--luecke); padding: 0 var(--rechts) var(--luecke) var(--links); min-height: 0; align-content: center; }
.lang-kacheln .knopf.lang-kachel { flex-direction: column; justify-content: center; min-width: 120px; min-height: 120px; height: clamp(120px, 46vh, 360px); gap: 10px; text-align: center;
  font-size: clamp(18px, 3.4vmin, 32px); }
.lang-kachel .lang-bild { display: inline-flex; align-items: center; gap: 8px; color: #bfefff; }
.lang-kachel .lang-bild svg { width: clamp(44px, 11vmin, 104px); height: clamp(44px, 11vmin, 104px); }
.lang-kachel .lang-bild .rodel-preis { width: clamp(36px, 8vmin, 76px); height: clamp(36px, 8vmin, 76px); }
.lang-kachel small { display: block; font-size: .62em; font-weight: 600; opacity: .9; }
@media (orientation: portrait) { .lang-kacheln { grid-template-columns: repeat(2, minmax(120px, 1fr)); align-content: stretch; } .lang-kacheln .knopf.lang-kachel { height: auto; font-size: clamp(18px, 5vw, 32px); }
  .lang-kachel .lang-bild svg { width: clamp(48px, 15vw, 104px); height: clamp(48px, 15vw, 104px); } .lang-kachel .lang-bild .rodel-preis { width: clamp(38px, 11vw, 76px); height: clamp(38px, 11vw, 76px); } }
@media (max-height: 420px) { .lang-kacheln .knopf.lang-kachel { min-height: 96px; gap: 4px; } }
/* Anzeige oben: Etappe (Wegweiser, Zahl) bzw. Meter und Lichter in der Leiste des Bausteins */
#buehne .w3d-tore .fluss-zahl { display: inline-flex; align-items: center; gap: 6px; color: #fff; font: 800 26px/1 "DM Sans", system-ui, sans-serif; padding: 0 6px; white-space: nowrap; }
#buehne .w3d-tore .fluss-zahl svg { width: 30px; height: 30px; flex: none; }
#buehne .w3d-tore .fluss-zahl.etappe { color: #ffe2a6; margin-right: 4px; }
@media (max-width: 420px) { #buehne .w3d-tore .fluss-zahl { font-size: 20px; } #buehne .w3d-tore .fluss-zahl svg { width: 24px; height: 24px; } }
body.rodel-endlos .w3d-platz { display: none !important; }
/* Pause und Ehrung (Endlos): Meter und Lichter mit Bildzeichen */
.fluss-stand { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; align-items: center; margin: 4px 0 10px; color: #fff; font-weight: 800; font-size: var(--s-h3); }
.fluss-stand span { display: inline-flex; align-items: center; gap: 8px; }
.fluss-stand svg { width: 34px; height: 34px; flex: none; color: #ffe2a6; }
.rodel-ergebnis.fluss-ehrung .fluss-stand { justify-content: flex-start; margin: 4px 0 0; }
.rodel-ergebnis.fluss-ehrung .kopf .rodel-preis { color: #ffd27a; }
body.w3d-cvi .fluss-stand svg, body.bf-cvi .fluss-stand svg, body.w3d-cvi .w3d-tore .fluss-zahl, body.bf-cvi .w3d-tore .fluss-zahl { color: #ffd84d; }
body.w3d-cvi .lang-kachel .lang-bild, body.bf-cvi .lang-kachel .lang-bild { color: #ffd84d; }
/* Ergebniskarten der langen Strecke und Ehrung (Browserlauf 29.11.): auch in flachen Fenstern Knöpfe ≥ 120 × 96 (die Karte der kurzen
   Rennen bleibt wie sie ist); in CVI unten, damit die Figur sichtbar bleibt */
@media (max-height: 419px) {
  .rodel-ergebnis.fluss-karte { gap: 4px; padding: 6px 12px; }
  .rodel-ergebnis.fluss-karte .dialog-knoepfe .knopf { min-width: 120px; min-height: 96px; }
  .rodel-ergebnis.fluss-karte .kopf .rodel-preis { width: 48px; height: 48px; }
  .rodel-ergebnis.fluss-karte .saison-satz, .rodel-ergebnis.fluss-karte .fluss-stand { margin: 0; font-size: 15px; }
}
body.w3d-cvi .bildschirm.rodel-ergebnis-schirm, body.bf-cvi .bildschirm.rodel-ergebnis-schirm { display: flex; align-items: flex-end; justify-content: center; background: none; }
