/* AssistUK Coaster — Aussehen. Layout-Standard der Familie: Raster 10 × 6, Fußleiste 32 px,
   vier Farbwelten, Knöpfe mit Verweil-Punkt, nichts kleiner als eine Rasterzelle.
   In AssistUK Arcade (Umzug 04.11.2026): alles gilt nur in #app (die Coaster-Bildschirme). Die Bildschirme des Rahmens
   (#oberflaeche: Einstellungen, Info, Einrichten) gestaltet kern/css/spiel.css. Weil der Kern dieselben Klassennamen
   nutzt (.knopf, .titel …), setzt der Block „Kern zurück“ unten zurück, was er in #app zusätzlich anrichten würde. */
#app {
  --fuss: 32px;
  --luecke: 8px;
  --radius: clamp(10px, 1.4vw, 18px);
  --schrift: "DM Sans", system-ui, "Segoe UI", Roboto, Arial, sans-serif;   /* Menü-Audit 14.11.2026: DM Sans wie alle Arcade-Spiele (kern/spiel.css lädt sie) */
}
#app, :root[data-theme="dunkel"] #app {
  --bg: #0d1b3e; --bg2: #13264f; --karte: linear-gradient(140deg, #1d3566, #26407a);
  --text: #fff; --text-leise: rgba(255,255,255,0.72); --akzent: #ffc23d; --rand: rgba(255,255,255,0.12);
  --vorschau: radial-gradient(ellipse at 50% 40%, #9bd17c 0%, #78b85a 70%, #66a64c 100%);
}
:root[data-theme="hell"] #app {
  --bg: #eef2f8; --bg2: #ffffff; --karte: linear-gradient(140deg, #ffffff, #e6ecf5);
  --text: #14213d; --text-leise: rgba(20,33,61,0.7); --akzent: #0b63c9; --rand: rgba(0,0,0,0.12);
}
:root[data-theme="kontrast"] #app {
  --bg: #000; --bg2: #000; --karte: #111; --text: #fff; --text-leise: #ddd; --akzent: #ff0; --rand: #fff;
  --radius: 6px; --vorschau: #1a1a1a;
}
:root[data-theme="bunt"] #app {
  --bg: #2a0f4a; --bg2: #3b1666; --karte: linear-gradient(140deg, #5b2a8c 0%, #b23a7a 60%, #e0743a 100%);
  --text: #fff; --text-leise: rgba(255,255,255,0.78); --akzent: #4dd0ff; --rand: rgba(255,255,255,0.18);
}

body { background: #0d1b3e; }   /* hinter den Rahmen-Bildschirmen (Coaster-Blau) */
/* Rahmen-Bildschirm aus (app.js setzt hidden): manche Kern-Klassen (.bildschirm.info …) setzen display und würden den
   versteckten Bildschirm sonst über den Coaster-Bildschirmen liegen lassen (fing die Klicks ab) */
#oberflaeche[hidden] { display: none !important; }
#app { position: fixed; inset: 0; margin: 0; padding: 0; overflow: hidden; }
#app { background: var(--bg); color: var(--text); font-family: var(--schrift); -webkit-text-size-adjust: 100%; }
#app button { font: inherit; color: inherit; }
/* Kern zurück (kern/css/spiel.css gilt auch hier): Rand, Farbe und Schatten des Titels, Schatten und Abstand der Knöpfe.
   Steht vorn, damit die Coaster-Regeln danach (z. B. .knopf.gewaehlt, .karte-tipp) ihre Schatten behalten. */
#app .titel { margin: 0; color: inherit; text-shadow: none; }
#app .knopf { box-shadow: none; }
#app .knopf small { margin-top: 0; }

/* --- Bildschirm-Raster ---------------------------------------------------- */
#app .schirm, #app .ueberlagerung {
  position: fixed; left: 0; right: 0; top: 0; bottom: var(--fuss);
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: var(--luecke); padding: var(--luecke); box-sizing: border-box;
  padding-bottom: max(var(--luecke), env(safe-area-inset-bottom));
}
#app .ueberlagerung { z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent); }

#app .titel {
  display: flex; align-items: center; justify-content: center; gap: 0.5em; text-align: center;
  font-weight: 800; font-size: clamp(18px, 3.4vh, 40px); line-height: 1.1;
}
#app .titel small { display: block; font-size: 0.5em; font-weight: 600; color: var(--text-leise); margin-left: 0.6em; }
#app .titel-symbol { height: 1.6em; width: auto; border-radius: 22%; }

/* --- Knöpfe (Maus, Touch, Verweilen) -------------------------------------- */
#app .knopf {
  position: relative; overflow: hidden; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35em;
  border: 2px solid var(--rand); border-radius: var(--radius); background: var(--karte); color: var(--text);
  padding: 6px; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(255,255,255,0.1);
  font-weight: 700; font-size: clamp(13px, 2.1vh, 24px); text-align: center; line-height: 1.15;
  transition: transform 0.1s, border-color 0.15s;
}
#app .knopf svg { width: auto; height: 46%; max-width: 70%; flex: 0 1 auto; }
#app .knopf:hover, #app .knopf:focus-visible { border-color: var(--akzent); outline: none; }
/* Tab-Fokus sofort deutlich (Arcade-Prüfung 04.11.2026: der Rand allein kam erst nach dem Übergang — wirkte unsichtbar):
   weißer Ring außen wie --fokus des Kerns, ohne Übergang */
#app .knopf:focus-visible { outline: 4px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 8px #000; }
#app .knopf:active { transform: scale(0.97); }
#app .knopf small { font-weight: 600; font-size: 0.72em; color: var(--text-leise); }
#app .knopf-haupt { background: linear-gradient(140deg, #2f9e5a, #3cb96b); }
:root[data-theme="kontrast"] #app .knopf-haupt { background: #111; border-color: var(--akzent); }
#app .knopf.gewaehlt { border-color: var(--akzent); box-shadow: inset 0 0 0 3px var(--akzent); }
#app .knopf[hidden] { display: none; }
#app .dwell-dot { position: absolute; z-index: 10; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none; width: 0; height: 0; }

#app .bahnliste.vorlagen .bahnkarte { justify-content: center; }
#app .vorlage-bild { width: min(88%, 38vh); height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: #fff;
  padding: 3px; margin-bottom: 0.3em; }
#app .abzeichen-bild { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 10px; background: #fff; filter: grayscale(1); }
#app .abzeichen.hat .abzeichen-bild { filter: none; box-shadow: 0 0 0 2px #ffc23d; }
#app .medaille-bild { height: 2.2em; width: auto; border-radius: 8px; background: #fff; }
:root[data-theme="hell"] #app .fuss-logo, :root[data-theme="hell"] #app .info-logo { filter: invert(1) hue-rotate(180deg); }

/* --- Bauen ---------------------------------------------------------------- */
#app .vorschau { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--vorschau, #78b85a);
  border: 2px solid var(--rand); }
#app .vorschau canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#app .vorschau canvas.vorschau-profil { inset: auto 8px 8px 8px; width: calc(100% - 16px); height: 64px; border-radius: 10px;
  background: rgba(13,27,62,0.6); pointer-events: none; }
#app .vorschau-hoehe { position: absolute; left: 10px; top: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(13,27,62,0.75); color: #fff; font-weight: 700; font-size: clamp(12px, 1.8vh, 20px); }
#app .vorschau-legende { position: absolute; right: 10px; top: 8px; display: flex; flex-direction: column; gap: 4px; padding: 6px 10px;
  border-radius: 12px; background: rgba(13,27,62,0.75); color: #fff; font-weight: 700; font-size: clamp(11px, 1.6vh, 17px); pointer-events: none; }
#app .vorschau-legende span { display: flex; align-items: center; gap: 8px; }
#app .leg-bahn { display: inline-block; width: 28px; height: 7px; border-radius: 4px; background: var(--bahnfarbe, #e2483d); box-shadow: 0 0 0 2px #fff; }
#app .leg-heim { display: inline-block; width: 28px; height: 0; border-top: 4px dotted rgba(255,255,255,0.9); }
#app .karten { display: grid; gap: var(--luecke); min-height: 0; }
/* Leiste unten (26.10.2026): die Karten nebeneinander in einer Zeile, je Seite höchstens 4 (Stufe A: 2) */
#app .karten-1 { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); }
#app .karten-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); }
#app .karten-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); }
#app .karten-4, #app .karten-5, #app .karten-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); }
#app .karte { font-size: clamp(14px, 2.4vh, 28px); border-color: var(--bahnfarbe, var(--rand)); }
#app .karte svg { height: 52%; color: var(--bahnfarbe, currentColor); }
#app .modulbild { display: block; width: auto; height: 68%; max-width: 96%; object-fit: contain; min-height: 0; }
#app .ware .modulbild { height: 58%; }
#app .karte-tipp { box-shadow: 0 0 0 3px var(--akzent); }
#app .karte-marke { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 0.62em; padding: 2px 8px;
  border-radius: 999px; background: var(--akzent); color: #14213d; }
#app .karte-passt-nicht { opacity: 0.8; }
#app .karte-warn { position: absolute; top: 6px; left: 8px; width: 1.4em; height: 1.4em; border-radius: 50%;
  background: #f08a24; color: #fff; font-style: normal; display: grid; place-items: center; }
#app .karten-voll { display: grid; place-items: center; text-align: center; padding: 1em; font-size: clamp(16px, 2.6vh, 28px);
  font-weight: 700; border: 2px dashed var(--rand); border-radius: var(--radius); }
/* Bauen aus der Fahrt: die Bühne liegt hinter dem ganzen Bildschirm, Knöpfe und Karten darüber */
#app .bau-buehne { position: absolute; inset: 0; z-index: 0; background: #9fd0f0; overflow: hidden; }
#app .bau-buehne > * { position: absolute; inset: 0; }
#app .schirm-bauen > :not(.bau-buehne) { position: relative; z-index: 1; }
#app .schirm-bauen .karten { padding: 8px; border-radius: var(--radius); background: rgba(13,27,62,0.55); }
#app .schirm-bauen .karten-voll { color: #fff; background: rgba(13,27,62,0.6); border-color: rgba(255,255,255,0.6); }
#app .schirm-bauen .karte { background: rgba(20,33,61,0.86); color: #fff; }
#app .schirm-bauen .titel-knopf { background: rgba(13,27,62,0.72); color: #fff; }
#app .schirm-bauen .titel-knopf small { color: rgba(255,255,255,0.8); }
/* Hinweis-Satz: schmale Einblendung über der Kartenleiste, nur so breit wie der Text */
#app .schirm-bauen .hinweis { color: #fff; background: rgba(13,27,62,0.72); border-radius: 999px; align-self: end; justify-self: center;
  max-width: 100%; padding: 0.3em 1em; box-sizing: border-box; }
#app .schirm-bauen .hinweis:empty { background: none; padding: 0; }
#app .bau-dran { display: inline-flex; align-items: center; gap: 0.4em; }
#app .bau-dran[hidden] { display: none; }
#app .dran-punkt { display: inline-block; width: 0.9em; height: 0.9em; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
#app .bau-info { align-self: start; justify-self: start; display: flex; gap: 0.6em; padding: 6px 14px; border-radius: 999px;
  background: rgba(13,27,62,0.75); color: #fff; font-weight: 700; font-size: clamp(13px, 2vh, 22px); pointer-events: none; }
#app .hinweis { display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 0.6em;
  font-size: clamp(13px, 2.1vh, 24px); font-weight: 600; color: var(--text-leise); pointer-events: none; }

/* --- Meine Bahnen --------------------------------------------------------- */
#app .bahnliste.vorlagen { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); }
#app .vorlage-leer { justify-content: center; }
#app .bahnliste { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--luecke); min-height: 0; }
#app .bahnkarte { border-color: var(--bahnfarbe); justify-content: flex-end; }
#app .bahnkarte canvas { background: var(--vorschau, #78b85a); border-radius: calc(var(--radius) - 4px); }
#app .bahnkarte canvas { position: absolute; inset: 6px 6px 3.4em 6px; width: calc(100% - 12px); height: calc(100% - 3.4em - 6px); }
#app .leer { grid-column: 1 / -1; align-self: center; text-align: center; font-size: clamp(16px, 2.8vh, 30px); color: var(--text-leise); }

/* --- Info, Einstellungen, Fragen ------------------------------------------ */
#app .info-text { overflow-y: auto; padding: 0.4em 1.2em; background: var(--bg2); border-radius: var(--radius);
  border: 2px solid var(--rand); font-size: clamp(15px, 2.2vh, 22px); line-height: 1.45; }
#app .info-text h2 { font-size: 1.15em; margin: 0.9em 0 0.3em; }
#app .info-text a { color: var(--akzent); }
#app .info-logo { float: right; height: 64px; margin: 0.6em 0 0.6em 1em; }
#app .einst-liste { display: grid; grid-auto-rows: minmax(0, 1fr); gap: 6px; min-height: 0; }
#app .einst-zeile { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: var(--luecke); min-height: 0; }
#app .einst-wort { display: flex; align-items: center; font-weight: 700; font-size: clamp(13px, 2vh, 22px); }
#app .einst-werte { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; min-height: 0; }
#app .farbpunkt { display: inline-block; width: 1.8em; height: 1.8em; border-radius: 50%; border: 2px solid rgba(255,255,255,0.7); }
#app .einst-wert { font-size: clamp(11px, 1.7vh, 19px); }
#app .frage-text { display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: clamp(20px, 4vh, 44px); font-weight: 800; padding: 0 1em; }
#app .fortschritt { align-self: center; height: 22px; border-radius: 11px; background: var(--bg2); border: 2px solid var(--rand); overflow: hidden; }
#app .fortschritt i { display: block; height: 100%; width: 0; background: var(--akzent); transition: width 0.2s; }
#app .farbkarte .farbfleck { width: 60%; height: 42%; border-radius: 12px; background: var(--farbe); border: 3px solid rgba(255,255,255,0.8); }


/* --- Belohnung, Sammlung, Name --------------------------------------------- */
#app .titel-knopf { flex-direction: row; gap: 0.5em; font-size: clamp(18px, 3.2vh, 36px); font-weight: 800; background: transparent; border-style: dashed; }
#app .titel-knopf svg { height: 1.1em; max-width: none; opacity: 0.8; }
#app .titel-knopf small { font-size: 0.48em; color: var(--text-leise); }
#app .karten-sterne { color: #ffc23d; font-weight: 800; white-space: nowrap; }
#app .karten-sterne svg { height: 1em; width: auto; vertical-align: -0.12em; }
#app .rundenkarte { background: rgba(13,27,62,0.95); z-index: 40; position: absolute; bottom: 0; color: #fff; }
#app .rundenkarte .knopf:not(.knopf-haupt) { background: #22325a; color: #fff; }
:root[data-theme="kontrast"] #app .rundenkarte { background: rgba(0,0,0,0.92); }
#app .runde-muenzen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2em; color: #fff; }
#app .runde-muenzen svg { color: #ffc23d; height: 45%; width: auto; }
#app .runde-muenzen strong { font-size: clamp(22px, 4.4vh, 48px); }
#app .runde-muenzen small { font-size: clamp(14px, 2.2vh, 24px); color: rgba(255,255,255,0.75); }
#app .runde-sterne { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); align-items: center; color: #fff; }
#app .sterne-zeile { display: flex; align-items: center; justify-content: space-between; gap: 1em; font-size: clamp(16px, 2.8vh, 32px); font-weight: 700; padding: 0 1em; }
#app .sterne { display: flex; gap: 0.3em; }
#app .stern { color: rgba(255,255,255,0.28); display: inline-flex; }
#app .stern svg { height: clamp(28px, 5.5vh, 56px); width: auto; }
#app .stern.an { color: #ffc23d; }
#app .stern.an svg { fill: #ffc23d; }
#app .runde-rekord { display: flex; align-items: center; justify-content: center; gap: 0.5em; color: #fff; font-weight: 800;
  font-size: clamp(15px, 2.6vh, 28px); }
#app .runde-rekord svg { color: #ffc23d; height: 1.2em; width: auto; }
#app .runde-rekord .trenner { display: inline-block; width: 1.4em; }
#app .wildmeter { display: inline-flex; gap: 4px; margin: 0 0.4em; }
#app .wildmeter i { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,0.25); border: 2px solid rgba(255,255,255,0.6); }
#app .wildmeter i.an { background: #ffc23d; }
#app .wildmeter i.an.heiss { background: #9cd63a; }
#app .runde-neu span { display: inline-flex; align-items: center; gap: 0.35em; }
#app .rundenkarte .runde-neu { overflow: hidden; align-content: start; }
/* Info: der Link als großes Ziel für die Augen (QA: war nur 23 px hoch) */
#app .info-text a { display: inline-block; padding: 16px 10px; margin: -16px -10px; }
/* iPad hochkant (QA 09.10.2026): nichts abschneiden */
#app .karte span, #app .knopf span, #app .ware span { overflow-wrap: anywhere; hyphens: auto; text-align: center; }
@media (orientation: portrait) {
  #app .karte { font-size: clamp(12px, 1.7vh, 22px); }
  #app .titel-knopf small { display: none; }
  #app .knopf { font-size: clamp(12px, 1.6vh, 20px); }
  #app .ware span { font-size: 0.85em; }
}
#app .runde-neu .medaille { color: #ffd23f; font-size: 1.15em; }
#app .karte-wunder { background: linear-gradient(140deg, #8d5bd8, #dd4f98) !important; }
#app .karte-wunder svg { color: #fff; height: 48%; }
#app .runde-neu { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4em 1.2em; color: #7fe0a0;
  font-weight: 700; font-size: clamp(14px, 2.3vh, 26px); text-align: center; }
#app .farbkarte.gesperrt { opacity: 0.75; }
#app .farbkarte.gesperrt .farbfleck { display: grid; place-items: center; filter: saturate(0.6); }
#app .namenskarte svg { color: var(--farbe); height: 50%; }
#app .sammlung-teil { min-height: 0; overflow-y: auto; background: var(--bg2); border: 2px solid var(--rand); border-radius: var(--radius); padding: 0.4em 0.7em; }
#app .sammlung-teil h3 { margin: 0.1em 0 0.4em; font-size: clamp(15px, 2.3vh, 24px); }
#app .waren { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(96px, 13vh, 140px); gap: 8px; }
#app .ware .farbfleck { width: 50%; height: 34%; border-radius: 10px; background: var(--farbe); border: 3px solid rgba(255,255,255,0.8); }
#app .ware svg { height: 40%; }
#app .ware small svg { height: 1em; width: auto; vertical-align: -0.12em; color: #ffc23d; }
#app .ware.frei { border-color: #43a84a; }
#app .enten-liste { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; margin-bottom: 0.4em; }
#app .ente { display: grid; place-items: center; color: rgba(255,255,255,0.18); }
#app .ente.hat { color: var(--farbe); }
#app .ente svg { width: 100%; height: auto; max-height: 36px; }
#app .abzeichen-liste { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
#app .abzeichen { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; font-size: clamp(9px, 1.3vh, 13px);
  color: var(--text-leise); opacity: 0.35; }
#app .abzeichen svg { height: clamp(22px, 4vh, 40px); width: auto; }
#app .abzeichen.hat { opacity: 1; color: #ffc23d; }
#app .auftrag-liste { display: grid; gap: 4px; }
#app .auftrag { display: flex; align-items: center; gap: 0.6em; font-size: clamp(12px, 1.8vh, 18px); }
#app .auftrag svg { flex: 0 0 auto; height: 1.4em; width: auto; }
#app .auftrag span { flex: 1; }
#app .auftrag small { color: #ffc23d; font-weight: 700; }
#app .auftrag.erledigt { color: #7fe0a0; }
#app .park-stufe { text-align: center; color: var(--text-leise); font-weight: 700; font-size: clamp(12px, 1.8vh, 18px); padding-bottom: 0.3em; pointer-events: none; }
#app .konto { display: flex; align-items: center; justify-content: center; gap: 0.4em; font-size: clamp(20px, 3.6vh, 40px); }
#app .konto svg { color: #ffc23d; height: 1.3em; width: auto; }

#app .foto-toast { position: absolute; z-index: 35; right: var(--luecke); top: var(--luecke); width: min(28vw, 320px); padding: 6px;
  border-radius: 12px; background: rgba(255,255,255,0.95); color: #14213d; font-weight: 800; text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35); transition: opacity 0.8s, transform 0.8s; }
#app .foto-toast img { display: block; width: 100%; border-radius: 8px; }
#app .foto-toast.weg { opacity: 0; transform: translateY(-12px); }
/* Foto-Knopf (12.10.2026): Sucherrahmen — vier weiße Ecken, weich ein und aus (kein Blitz) */
#app .foto-sucher { position: absolute; z-index: 25; inset: 12% 16%; pointer-events: none; opacity: 0; transition: opacity 0.3s, inset 0.5s ease-out; }
#app .foto-sucher.an { opacity: 1; inset: 17% 22%; }
#app .foto-sucher i { position: absolute; width: clamp(40px, 7vmin, 72px); height: clamp(40px, 7vmin, 72px); border: 6px solid #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.55)); }
#app .foto-sucher i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
#app .foto-sucher i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 10px; }
#app .foto-sucher i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 10px; }
#app .foto-sucher i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
@media (prefers-reduced-motion: reduce) { #app .foto-sucher, #app .foto-sucher.an { transition: opacity 0.4s; inset: 17% 22%; } }
#app .fotoliste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: var(--luecke); min-height: 0; }
#app .fotoliste img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); border: 3px solid #fff; }

/* --- Fahren: Bühne über allem, nur „Aussteigen" und die Fußleiste ---------- */
#app .schirm-fahren { position: fixed; left: 0; right: 0; top: 0; bottom: var(--fuss); background: #7fb6ec; }
#app .schirm-fahren .buehne { position: absolute; inset: 0; }
#app .fahren-laden { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0.7em 1.2em;
  border-radius: 14px; background: rgba(13,27,62,0.8); color: #fff; font-weight: 700; font-size: clamp(16px, 2.6vh, 28px); }
#app .fahren-laden[hidden] { display: none; }
#app .tacho { position: absolute; z-index: 25; right: var(--luecke); top: var(--luecke); display: flex; gap: 6px; pointer-events: none; }
#app .tacho[hidden] { display: none; }
#app .tacho > div { min-width: 92px; padding: 6px 10px; border-radius: 14px; background: rgba(13,27,62,0.78); color: #fff; text-align: center; }
#app .tacho b { display: block; font-size: clamp(24px, 4.6vh, 46px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
#app .tacho small { display: block; font-size: clamp(11px, 1.6vh, 15px); font-weight: 700; opacity: 0.8; }
#app .knopf-aussteigen { color: #fff; background: rgba(20,33,61,0.86); }
/* Mitmachen beim Fahren: drei große Knöpfe links (Augensteuerung: je ≥ 96 px) */
/* „Sag was!" nach der Fahrt */
#app .knopf-sagwas { flex-direction: row; gap: 0.6em; }
#app .knopf-sagwas img { height: 70%; max-height: 72px; aspect-ratio: 1; border-radius: 10px; background: #fff; }
#app .sagwas { z-index: 60; background: rgba(13,27,62,0.97); color: #fff; }
#app .sag-karten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: var(--luecke); min-height: 0; }
#app .sag-karte { font-size: clamp(15px, 2.4vh, 28px); color: #fff; background: #22325a; }
#app .sag-karte img { height: 62%; max-width: 90%; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: #fff; }
#app .sag-karte.gewaehlt { box-shadow: inset 0 0 0 4px #ffc23d; }
@media (orientation: portrait) { #app .sag-karten { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); } }
/* „Los!" bei Signal, Schranke, Start-Ampel: groß unten in der Mitte */
#app .knopf-los { position: absolute; z-index: 31; left: 50%; bottom: var(--luecke); transform: translateX(-50%);
  width: clamp(180px, 26vw, 320px); height: clamp(96px, 14vh, 140px); font-size: clamp(18px, 3vh, 30px); }
#app .knopf-los[hidden] { display: none; }
#app .mitmach { position: absolute; z-index: 30; left: var(--luecke); top: 150px; display: flex; flex-direction: column; gap: 10px; }
#app .mitmach .knopf { width: clamp(120px, 13vh, 150px); height: clamp(96px, 11vh, 130px);   /* Hausregel ≥ 120 × 96 (Arcade-Prüfung 04.11.) */
  color: #fff; background: rgba(20,33,61,0.8);
  font-size: clamp(12px, 1.6vh, 17px); }
#app .mitmach .knopf svg { height: 46%; width: auto; }
/* niedrige Fenster (Grid-3 1024×600): Mitmachen kompakter, Platz für Aussteigen ≥ 120×96 */
@media (max-height: 640px) {
  #app .mitmach { top: 96px; gap: 6px; }
  #app .mitmach .knopf { width: 120px; height: 96px; }
}
/* Aussteigen: nie unter 120 × 96 (17.11.2026 UX: bei 1024×600 fiel die Grid-Höhe auf ~72–86 px) */
#app .knopf-aussteigen { position: absolute; z-index: 30; left: var(--luecke); bottom: var(--luecke); color: #fff;
  min-width: 120px; min-height: 96px;
  width: max(120px, calc((100vw - 11 * var(--luecke)) / 10 * 2 + var(--luecke)));
  height: max(96px, calc((100dvh - var(--fuss) - 7 * var(--luecke)) / 6));
  background: rgba(13,27,62,0.82); }

/* --- Fußleiste mit AssistUK ------------------------------------------------ */
#app .fuss { position: fixed; left: 0; right: 0; bottom: 0; height: var(--fuss); z-index: 100;
  display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 10px;
  background: rgba(0,0,0,0.8); color: rgba(255,255,255,0.75); font-size: 12px; white-space: nowrap; overflow: hidden; }
#app .fuss a { color: inherit; text-decoration: none; }
#app .fuss a:hover { color: #fff; }
#app .fuss-logo { height: 18px; width: auto; }
#app .fuss-privat { color: #7fe0a0; }
#app .fuss-version { color: rgba(255,255,255,0.75); }   /* Kontrast ≥ 4,5 : 1 (vorher halb durchsichtig) */
@media (max-width: 700px) { #app .fuss-privat { display: none; } }

@media (prefers-reduced-motion: reduce) {
  #app *, #app *::before, #app *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- AssistUK Arcade: Coaster-Teile auf den Rahmen-Bildschirmen und darüber (04.11.2026) ----------------------------- */
/* Einstellungen → Seite „Spiel“ (spielZeilen in app.js): Farbpunkte für Haut und Haare */
.coaster-farbpunkt { display: block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #ffffffc0; box-shadow: 0 0 0 2px #0008; }
.einstellungen .wahl .knopf.klein:has(.coaster-farbpunkt) { padding: 6px 12px; gap: 4px; font-size: 18px; }
/* Spielhilfe „Blickpunkt zeigen“ über der 3D-Bühne (app.js) */
.coaster-blickpunkt { position: fixed; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; z-index: 45; pointer-events: none;
  border: 4px solid #fff; box-shadow: 0 0 0 3px #000a, inset 0 0 0 3px #000a; will-change: transform; }
.coaster-blickpunkt[hidden] { display: none; }

/* Fußleiste auf kleinen Bildschirmen aus: sehr flach (iPhone SE quer) und Handy hoch — jede Zeile zählt */
@media (max-height: 360px) {
  #app { --fuss: 0px; }
  #app .fuss { display: none; }
}
@media (max-width: 600px) and (orientation: portrait) {
  #app { --fuss: 0px; }
  #app .fuss { display: none; }
}

/* --- Startseite im Arcade-Standard (Lars 14.11.2026; app.js startseite()) --------------------------------------------------
   Ein Rahmen-Bildschirm in #oberflaeche: Kopf, „Spielen“ und Kopfknöpfe aus kern/css/spiel.css (kern/LAYOUT.md). Eigen sind
   nur der Grund, die zwei Bildkacheln (Neue Bahn bauen, Meine Bahnen) und die Auftragszeile. Kacheln ≥ 120 × 96 in jeder
   Größe; kompakt (Höhe ≤ 500) stehen „Spielen“ und die Kacheln in EINER Reihe, Bild links neben dem Namen. */
.bildschirm.coaster-start { background: radial-gradient(ellipse at 50% -10%, #2c4f93 0%, #13264f 45%, #0d1b3e 80%); }
body.bf-cvi .bildschirm.coaster-start { background: #000; }
.coaster-start .start-unten.mit-modi { flex: 1 1 auto; justify-content: flex-end; }
@media (min-width: 2400px) and (min-height: 1300px) { .coaster-start .start-unten.mit-modi { max-width: 1800px; } }   /* 4K: Kacheln wachsen mit */
.coaster-start .modus-reihe { display: flex; gap: var(--luecke); flex: 0 1 clamp(300px, 46vh, 640px); min-height: var(--knopf-min-h); }
.coaster-start .knopf.modus-kachel { flex: 1 1 0; min-width: var(--knopf-b); min-height: var(--knopf-min-h); padding: var(--innen); gap: var(--luecke);
  font-size: var(--s-h3); font-weight: 800; color: #fff; text-shadow: 0 2px 6px #0009; border: 3px solid #ffffffa0; overflow: hidden;
  container-type: size; }   /* Bild quadratisch nach dem Platz der Kachel (cqw/cqh) */
.coaster-start .knopf.modus-kachel small { color: #fff; opacity: 0.9; font-size: 0.68em; font-weight: 600; }
.coaster-start .modus-neu { background: linear-gradient(140deg, #e2483d, #c85f12); }
.coaster-start .modus-meine { background: linear-gradient(140deg, #127e8f, #2f7f34); }
.coaster-start .modus-bild { flex: none; width: min(80cqw, calc(100cqh - 4.4em), 360px); height: auto; aspect-ratio: 1; object-fit: contain;
  border-radius: var(--r-mittel); background: #fff; padding: 4px; box-shadow: 0 4px 14px #0004; }
.coaster-start .modus-kachel > svg { width: min(120px, 40cqh); height: min(120px, 40cqh); flex: none; }
body.bf-cvi .coaster-start .knopf.modus-kachel { background: #000; text-shadow: none; }
.coaster-auftrag { display: flex; align-items: center; justify-content: center; gap: 0.6em; margin: 0; padding: 6px var(--innen);
  font-size: var(--s-text); font-weight: 700; color: #fff; text-align: center; text-shadow: var(--schrift-schatten); }
.coaster-auftrag svg { flex: none; color: var(--akzent); }
.coaster-lohn { display: inline-flex; align-items: center; gap: 4px; color: var(--akzent); white-space: nowrap; }
.coaster-sammlung svg { color: var(--akzent); }
/* kompakt (Handy quer): Spielen + Kacheln in einer Reihe, Bild links neben dem Namen, ohne Satz und Auftrag */
@media (max-height: 500px) {
  .coaster-start .start-unten.mit-modi { flex: 1 1 auto; max-height: 240px; flex-direction: row; align-items: stretch; }
  .coaster-start .start-unten.mit-modi > .knopf.haupt { flex: 1 1 0; width: auto; min-width: var(--knopf-b); }
  .coaster-start .modus-reihe { flex: 2 1 0; }
  .coaster-start .knopf.modus-kachel { flex-direction: row; font-size: 18px; padding: 6px 8px; }
  .coaster-start .knopf.modus-kachel small, .coaster-auftrag { display: none; }
  .coaster-start .modus-bild { width: min(42cqw, calc(100cqh - 16px), 150px); }
  .coaster-start .modus-kachel > svg { width: 40px; height: 40px; }
}
@media (max-height: 420px) and (max-width: 640px) {
  /* vier Kopf-Knöpfe und der Name passen mit 120 breit nicht in 568 px — Ausnahme 4 (≥ 96 × 72) wie kern/spiel.css „.mit-welten“ */
  .coaster-start .start-ecke .knopf.glas { min-width: 96px; max-width: 104px; padding: 4px; }
  .coaster-start .start-ecke .knopf.glas span:not(.dwell-dot) { font-size: 12px; }
  .coaster-start .start-unten.mit-modi { flex-wrap: wrap; }
  .coaster-start .start-unten.mit-modi > .knopf.haupt { flex: 1 1 100%; min-height: 72px; }
  .coaster-start .knopf.modus-kachel { min-height: 72px; }
  .coaster-start .knopf.modus-kachel { flex-direction: column; gap: 2px; font-size: 15px; }
  .coaster-start .modus-bild { width: min(60cqw, calc(100cqh - 2.4em)); }
}
/* Handy hoch: Kacheln nebeneinander, Bild über dem Namen, ohne Satz */
@media (max-width: 560px) {
  .coaster-start .knopf.modus-kachel { font-size: 18px; }
  .coaster-start .modus-bild { width: min(84cqw, calc(100cqh - 2.6em), 200px); }
  .coaster-start .knopf.modus-kachel small { display: none; }
  .coaster-auftrag { font-size: 15px; }
}

/* --- CVI-Modus (Baustein „Barrierefreiheit“, body.bf-cvi): ruhiger schwarzer Grund in den Coaster-Bildschirmen; die
   Knöpfe bekommen ihren kräftigen Umriss vom Baustein (allgemeine Regel für button), Bilder bleiben (sie tragen die Bedeutung) */
body.bf-cvi #app { --bg: #000; --bg2: #000; --karte: #000; --text: #fff; --text-leise: #fff; --rand: var(--bf-cvi-text, #fff);
  --akzent: var(--bf-cvi-farbe, #ffd400); background: #000; }
body.bf-cvi #app .ueberlagerung { background: #000; }
body.bf-cvi #app :is(.sammlung-teil, .info-text, .fuss) { background: #000; border-color: #fff; }
body.bf-cvi #app .titel { color: var(--bf-cvi-farbe, #ffd400); }
body.bf-cvi .coaster-blickpunkt { border-color: var(--bf-cvi-farbe, #ffd400); border-width: 6px; }   /* Blickpunkt über der Bühne in der Umrissfarbe */

/* Seite „Spiel“ auf Handy quer (Höhe ≤ 500): Zeilen mit bis zu drei Wahlknöpfen wie im Kern die Spielhilfen — Text links,
   Knöpfe rechts in einer Reihe (sonst wird eine Zeile mit Erklärung höher als der Platz über der Leiste — Arcade-Prüfung
   04.11.2026, Rahmen-Wunsch: gleiche Regel im Kern für die Seite „Spiel“) */
@media (max-height: 500px) and (min-width: 561px) {
  #oberflaeche.einstellungen .einst-zeile:not(:has(.wahl > .knopf:nth-child(4))) { flex-wrap: nowrap; }
  #oberflaeche.einstellungen .einst-zeile:not(:has(.wahl > .knopf:nth-child(4))) h3 { flex: 1 1 auto; min-width: 0; }
  #oberflaeche.einstellungen .einst-zeile:not(:has(.wahl > .knopf:nth-child(4))) .wahl { flex: none; flex-wrap: nowrap; }
}
