/* Freie Abfahrt · 3D-Fassung (30.11.2026), Vorlage: 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: #0d2236; 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.fa-menue .w3d-ui:not(.w3d-blende) { display: none !important; }
.fa-start, .fa-seite, .fa-ergebnis-schirm { font-family: "DM Sans", system-ui, sans-serif; }

/* Startseite über der stehenden Welt: oben und unten abgedunkelt (Kontrast), die Mitte zeigt die Piste */
.fa-start { background: linear-gradient(180deg, #06182af0, #06182a99 30%, transparent 46%, transparent 56%, #06182aee 78%); }
.fa-start .start-oben { align-items: start; }
.fa-start .start-kopf img { width: clamp(70px, 10vmin, 120px); height: auto; }
.fa-start .start-kopf h1 { text-wrap: balance; color: var(--akzent); }
.fa-start .start-kopf p { color: #fff; }
.fa-start .start-unten { text-align: center; padding-bottom: var(--unten); }
.fa-start .start-haupt { justify-content: center; }
.fa-start .start-haupt .knopf { min-width: 120px; min-height: 96px; }
.fa-start .start-haupt .knopf svg { width: 44px; height: 44px; flex: none; }
.fa-start .start-haupt .knopf small { display: block; font-size: var(--s-klein); font-weight: 600; }
.fa-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: #0d2236f0; color: #fff; font-weight: 700; }
.fa-preis { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; }
.fa-preis svg { width: 100%; height: 100%; }
.fa-preis.leer { opacity: .45; }

/* Regal: Zeilen, die seitenweise() verteilt */
.fa-seite { display: flex; flex-direction: column; background: #0d2236; }
.fa-liste { flex: 1; display: flex; flex-direction: column; gap: var(--luecke); padding: 0 var(--rechts) 0 var(--links); min-height: 0; }
.fa-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-radius: var(--r-mittel);
  background: #12304cf0; color: #fff; }
.fa-zeile > span:first-child { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.fa-zeile svg { width: 36px; height: 36px; flex: none; }
.fa-zeile .ort { color: #bfefff; display: inline-flex; }
.fa-zeile small { color: #d5f7ff; font-size: var(--s-klein); }
.fa-zeile .pokale { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.fa-zeile .pokal { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* Ergebnis: Karte unten, das Podest in der Welt bleibt sichtbar */
.bildschirm.fa-ergebnis-schirm { display: flex; align-items: flex-end; justify-content: center; padding: 0 var(--rechts) var(--unten) var(--links); background: none; }
.fa-ergebnis { display: grid; gap: 10px; padding: 14px 18px; border-radius: 22px; background: #0d2236f2; border: 3px solid #ffffff55; color: #fff;
  max-width: min(980px, 100%); box-sizing: border-box; }
.fa-ergebnis .kopf { display: flex; align-items: center; gap: 14px; }
.fa-ergebnis .kopf .fa-preis { width: clamp(56px, 10vmin, 92px); height: clamp(56px, 10vmin, 92px); }
.fa-ergebnis h1.titel { margin: 0; font-size: clamp(22px, 4vmin, 40px); text-align: left; }
.fa-ergebnis p { margin: 2px 0 0; color: #d5f7ff; font-size: var(--s-text); }
.fa-ergebnis .saison-satz { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #fff; }
.fa-ergebnis .saison-satz svg { width: 32px; height: 32px; }
.fa-ergebnis .dialog-knoepfe { display: flex; flex-wrap: wrap; gap: var(--luecke); justify-content: center; }
.fa-ergebnis .dialog-knoepfe .knopf { min-width: 120px; min-height: 96px; }
/* flache Fenster (Handy quer): Knöpfe bleiben ≥ 120 × 96 (Hausregel); die Ergebnisliste weicht, das Podest zeigt die Plätze (Browserlauf ansichten 30.11.) */
@media (max-height: 419px) { .fa-ergebnis { padding: 6px 12px; gap: 4px; } .fa-ergebnis .dialog-knoepfe { gap: 8px; } .fa-ergebnis .dialog-knoepfe .knopf { min-width: 120px; min-height: 96px; }
  .fa-ergebnis .fa-tabelle { display: none; } .fa-ergebnis .kopf .fa-preis { width: 48px; height: 48px; } }

/* Training (zählt nicht für den Cup): Stoppuhr oben mittig unter der Torleiste */
.fa-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; }
.fa-marke svg { width: 24px; height: 24px; }
.fa-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 .fa-start, body.bf-cvi .fa-start { background: linear-gradient(180deg, #000, #000c 34%, transparent 48%, transparent 56%, #000 78%); }
body.w3d-cvi .fa-sammlung, body.w3d-cvi .fa-zeile, body.w3d-cvi .fa-ergebnis, body.w3d-cvi .fa-seite,
body.bf-cvi .fa-sammlung, body.bf-cvi .fa-zeile, body.bf-cvi .fa-ergebnis, body.bf-cvi .fa-seite { background: #000; border-color: #ffd84d; }
body.w3d-cvi .fa-zeile small, body.w3d-cvi .fa-ergebnis p, body.bf-cvi .fa-zeile small, body.bf-cvi .fa-ergebnis p { color: #fff; }
body.w3d-cvi .fa-marke, body.bf-cvi .fa-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). */

/* --- Lange Strecke und Endlos abwärts (29.11.2026, fluss-modi.js, wie Rodeln) -------------------------------------------------------
   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. */
.fa-start .start-haupt:has(.zweit) { align-items: stretch; }
.fa-start .start-haupt:has(.zweit) > .knopf.haupt { flex: 1 1 210px; max-width: 360px; }
/* „Spielen“ bleibt der größte Knopf (Prüfwerk „aufbau“: Fläche ≥ 1,2 × Kopfzeilen-Knopf; mit vier gleichen Knöpfen 307 × 96 zu klein) */
.fa-start .start-haupt:has(.zweit) > .knopf.haupt:not(.zweit) { flex-grow: 1.7; max-width: 460px; }
@media (max-height: 500px) {
  .fa-start .start-haupt:has(.zweit) { flex-wrap: nowrap; gap: 8px; }
  .fa-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; }
  .fa-start .start-haupt .knopf small { font-size: 11px; }
  .fa-start .start-haupt .knopf svg { width: 34px; height: 34px; }
}
@media (max-width: 900px) and (orientation: portrait) {
  .fa-start .start-haupt:has(.zweit) > .knopf.haupt { flex: 1 1 calc(50% - 10px); min-width: 120px; max-width: none; }
}
/* Flach (quer, Höhe ≤ 500 px): alle vier gleich breit; schmal quer (iPhone SE 568 × 320, Browserlauf t-menue-k 29.11.: drei Knöpfe 116 px, Text über dem
   Rand) mit kleinerer Schrift und Bildzeichen, Wörter dürfen umbrechen. Ziele ≥ 120 × 96 (568 px: 4 × 130 px) */
@media (max-height: 500px) {
  .fa-start .start-haupt:has(.zweit) > .knopf.haupt:not(.zweit) { flex-grow: 1; }
}
@media (max-height: 500px) and (max-width: 700px) {
  .fa-start .start-haupt:has(.zweit) > .knopf.haupt { font-size: 15px; gap: 4px; padding: 4px 6px; overflow-wrap: anywhere; hyphens: auto; }
  .fa-start .start-haupt:has(.zweit) > .knopf.haupt svg { width: 24px; height: 24px; }
  .fa-start .start-haupt:has(.zweit) > .knopf.haupt small { font-size: 10px; }
}
/* Sehr schmal (iPhone SE 320 px, Prüfwerk „responsiv“ 29.11.: „Pokalregal“ lief über den Knopfrand): kleinere Schrift und Bildzeichen,
   Wörter dürfen umbrechen; Ziele bleiben ≥ 120 × 96 */
@media (max-width: 420px) {
  .fa-start .start-haupt:has(.zweit) { gap: 8px; }
  .fa-start .start-haupt:has(.zweit) > .knopf.haupt { font-size: 16px; gap: 6px; padding: 6px 8px; overflow-wrap: anywhere; hyphens: auto; }
  .fa-start .start-haupt:has(.zweit) > .knopf.haupt svg { width: 26px; height: 26px; }
  .fa-start .start-haupt:has(.zweit) > .knopf.haupt small { font-size: 11px; }
}
/* Ortswahl der langen Strecke: vier Kacheln (quer eine Reihe, hoch 2 × 2) */
.fa-langwahl h1.titel { display: flex; align-items: center; justify-content: center; gap: 10px; }
.fa-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 .fa-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 .fa-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.fa-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; }
.fa-ergebnis.fluss-ehrung .fluss-stand { justify-content: flex-start; margin: 4px 0 0; }
.fa-ergebnis.fluss-ehrung .kopf .fa-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; }
/* Ergebnis der langen Strecke und Ehrung (Endlos): Knöpfe auch in flachen Fenstern ≥ 120 × 96 (Browserlauf t-ansichten 29.11.: 667 × 375
   gab die Regel für den kurzen Slalom 96 × 72); dafür kleinere Medaille und engere Abstände */
@media (max-height: 419px) {
  .fluss-karte .fa-ergebnis { padding: 6px 12px; gap: 4px; }
  .fluss-karte .fa-ergebnis .dialog-knoepfe .knopf { min-width: 120px; min-height: 96px; }
  .fluss-karte .fa-ergebnis .kopf .fa-preis { width: 48px; height: 48px; }
  .fluss-karte .fa-ergebnis .fluss-stand { margin: 0; font-size: 17px; }
  .fluss-karte .fa-ergebnis .saison-satz { margin: 0; }
  .fluss-karte .fa-ergebnis h1.titel { font-size: 22px; }
}

/* --- Freie Abfahrt: Anzeige oben (Stilpunkte und je Moment ein Zeichen), Ergebnisliste ------------------------------------ */
#buehne .w3d-tore { align-items: center; transition: opacity .2s; }
/* Im Flug weichen Leiste und „Training“-Marke dem Haltungsziel, wo sie es berühren (spiel.js flugFrei; B1 Nachprüfung 30.11., Handy quer) */
#buehne .w3d-tore.fa-weicht, .fa-marke.fa-weicht { opacity: 0 !important; transition: none; }
#buehne .w3d-tore .fa-stil { display: inline-flex; align-items: center; gap: 6px; color: #ffe2a6; font: 800 28px/1 "DM Sans", system-ui, sans-serif; padding: 0 8px 0 2px; white-space: nowrap; }
#buehne .w3d-tore .fa-stil small { font-size: .62em; color: #fff; opacity: .85; }
#buehne .w3d-tore .fa-stil svg, #buehne .w3d-tore .fa-moment svg { width: 30px; height: 30px; flex: none; }
#buehne .w3d-tore .fa-moment { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: rgba(255,255,255,.5); border: 2px solid rgba(255,255,255,.25); }
#buehne .w3d-tore .fa-moment.jetzt { color: #fff; border-color: #ffd27a; box-shadow: 0 0 12px rgba(255,196,92,.7); }
#buehne .w3d-tore .fa-moment.perfekt { color: #2a1a04; background: #ffcf5a; border-color: #fff2b0; }
#buehne .w3d-tore .fa-moment.gut { color: #10263f; background: #fff; border-color: #fff; }
#buehne .w3d-tore .fa-moment.verpasst { opacity: .45; }
@media (max-width: 520px) { #buehne .w3d-tore .fa-moment { width: 32px; height: 32px; } #buehne .w3d-tore .fa-moment svg, #buehne .w3d-tore .fa-stil svg { width: 24px; height: 24px; } #buehne .w3d-tore .fa-stil { font-size: 22px; } }
body.w3d-cvi #buehne .w3d-tore .fa-stil, body.bf-cvi #buehne .w3d-tore .fa-stil { color: #ffd84d; }
body.w3d-cvi #buehne .w3d-tore .fa-moment.perfekt, body.bf-cvi #buehne .w3d-tore .fa-moment.perfekt { background: #ffd84d; color: #000; }
.fa-tabelle { list-style: none; margin: 2px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: platz; }
.fa-tabelle li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 4px 10px; border-radius: 12px;
  background: #ffffff14; color: #fff; font-weight: 700; font-size: var(--s-klein, 15px); counter-increment: platz; min-width: 0; }
.fa-tabelle li::before { content: counter(platz) "."; grid-row: 1 / span 2; font-weight: 800; font-size: 1.4em; color: #ffe2a6; }
.fa-tabelle li b { grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fa-tabelle li span { display: inline-flex; align-items: center; gap: 4px; grid-column: 2; font-weight: 600; white-space: nowrap; }
.fa-tabelle li span + span { display: none; }
.fa-tabelle li.ich { background: #f39a3b33; outline: 2px solid #ffd27a; }
.fa-tabelle svg { width: 20px; height: 20px; flex: none; }
@media (orientation: portrait) { .fa-tabelle { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
body.w3d-cvi .fa-tabelle li, body.bf-cvi .fa-tabelle li { background: #000; border: 2px solid #ffd84d; color: #ffd84d; }
