/* AssistUK Christmas – gemeinsamer Baustein „Stube“ (Review 19.11.2026, Design W1/W3/F1, B1–B4).
   Wird ZULETZT geladen. Werte stehen als Variablen in arcade-rahmen.css (--xm-*).
   1. EINE Schrift (DM Sans) für alles, auch Titel (kein Georgia mehr).
   2. EIN Knopfstil: Nachtblau, 2 px Gold, Vanille-Text; gewählt = hellerer Nachtton + 4 px Gold (kein Oliv).
   3. EIN Kopf: Titel als Schild (Nacht-Glas, feiner Goldrand) oben links.
   4. Silbentrennung statt Umbruch mitten im Wort (hyphens:auto, lang steht auf <html>).
   5. Sicherungen für die Prüfgrößen (test_alle_groessen.py): nichts außerhalb des Bildes, kein Scrollen.
   CVI-Regeln aus barrierefreiheit.css bleiben vorrangig (alles hier ist :not(.bf-cvi)). */

/* ------------------------------------------------------------------ 1. Schrift */
html, body, button, input, select, textarea, h1, h2, h3, .dorf-kopf h1, .dorf-menue-karte h2, .ort-kopf h1,
.dorf-auswahl-kopf h1, .weihnachtskopf h1, .advent-kopf h1, .kerze-kopf h1, .winter-kopf h1 {
  font-family: var(--schrift, "DM Sans", system-ui, sans-serif);
}

/* ------------------------------------------------------------------ 4. Silbentrennung */
h1, h2, h3, p, li, button, .knopf, .link-knopf, .start-text, .musik-name {
  overflow-wrap: break-word !important; word-break: normal !important; hyphens: auto; -webkit-hyphens: auto;
}
/* Chromium unter Windows trennt Deutsch nicht selbst; break-word bricht nur, wenn ein Wort sonst überliefe.
   Knöpfe mit langen Wörtern bekommen darum eine Schrift, in der die Wörter ganz passen (unten je Bereich). */

/* ------------------------------------------------------------------ 2. Knopf */
body:not(.bf-cvi) #app button.knopf:not(.start-kachel):not(.dorf-ort):not(.fest-3d-target),
body:not(.bf-cvi) #app .festspiel .fest-fuss .fest-knopf,
body:not(.bf-cvi) #app :is(.wald-steuerung, .flug-aktionen, .band-aktionen, .band-auswahl) button.knopf {
  background: var(--xm-knopf-grund); border: var(--xm-knopf-rand); color: var(--xm-knopf-text);
  box-shadow: var(--xm-knopf-schatten); backdrop-filter: none; -webkit-backdrop-filter: none;
}
body:not(.bf-cvi) #app button.knopf:not(.start-kachel):not(.dorf-ort):not(.fest-3d-target):is(:hover, :focus-visible) {
  border-color: #ffd98c; background: var(--xm-nacht-hell);
}
body:not(.bf-cvi) #app button.knopf:not(.start-kachel):not(.dorf-ort):not(.fest-3d-target)[aria-pressed="true"],
body:not(.bf-cvi) #app .festspiel .fest-fuss .fest-knopf[aria-pressed="true"] {
  background: var(--xm-gewaehlt-grund); border: var(--xm-gewaehlt-rand); box-shadow: 0 0 0 3px #e0a84a44, var(--xm-knopf-schatten);
}
body:not(.bf-cvi) #app button.knopf:disabled { opacity: .5; box-shadow: none; }

/* ------------------------------------------------------------------ 3. Kopf */
body:not(.bf-cvi) #app :is(.glockenspiel-3d .glockenspiel-kopf, .xylophon-3d .xylophon-kopf, .akt-paar-3d .akt-paar-kopf,
  .stopptanz-3d .stopptanz-kopf, .sternenhimmel-3d .sternenhimmel-kopf, .malen-3d .malen-kopf, .karten-3d .karten-kopf, .kerze-3d .kerze-kopf) {
  padding: 8px 14px; border-radius: 14px; background: var(--xm-kopf-grund); border: var(--xm-kopf-rand); text-shadow: none;
}

/* ------------------------------------------------------------------ 5a. Handy quer (Höhe ≤ 450): 3D-Bühnen im Bild (Design B1)
   weihnachtsseite.css macht alle Karten position:relative; ab 451 px gibt spielflaeche.css ihnen die volle Höhe,
   darunter fiel die Karte auf 30 px zusammen und alle Ziele lagen über dem oberen Rand. */
@media (max-height: 450px) {
  #app > :is(.glockenspiel-3d, .glockenspiel-laedt, .xylophon-3d, .xylophon-laedt, .akt-paar-3d, .akt-paar-laedt,
             .stopptanz-3d, .stopptanz-laedt, .karten-3d, .karten-laedt) {
    position: fixed !important; inset: 0 !important; width: auto !important; height: auto !important; max-width: none !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; overflow: hidden;
  }
}

/* ------------------------------------------------------------------ 5b. 3D-Ziele mindestens 120 breit (Technik W2)
   szene3d.js setzt --ziel = kleinster Abstand der Ziele − 6 (mind. 96) und quadratisch. Nebeneinanderliegende
   Ziele haben waagrecht meist mehr Platz: die Trefferfläche wird darum ein liegendes Oval, 120 breit, --ziel hoch.
   Ob sich dabei nichts überlappt, prüft test_alle_groessen.py. */
@media (min-height: 451px) {
  #app :is(.akt-paar-3d, .kerze-3d) .fest-3d-target { width: max(120px, var(--ziel, 120px)); height: max(96px, var(--ziel, 120px)); }
}
/* Glocken und Xylophon: Die Stäbe/Glocken stehen in der Szene enger als 120 px (Xylophon ca. 58 px, Glocken ca. 112 px).
   Gespielt wird darum über eine Zielreihe unter der Bühne (dieselben Knöpfe wie im Hochformat, je ≥ 120 × 96);
   die Ringe in der Szene bleiben als Anzeige sichtbar, sind aber kein eigenes Ziel. Übergabe: Kamera näher (G). */
@media (orientation: landscape) {
  #app > :is(.glockenspiel-3d, .xylophon-3d) { --reihe-h: 104px; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) .fest-3d-target { pointer-events: none; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) .fest-3d-target[data-verweilen] { visibility: hidden; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glocken-3d-scene, .xylophon-3d-scene) {
    bottom: calc(var(--zurueck-h, 112px) + var(--unten, 10px) + var(--luecke, 8px) * 2 + var(--reihe-h)) !important; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-instrument, .xylophon-instrument) {
    display: block !important; position: absolute; z-index: 4; left: 4px; right: 4px; width: auto !important; max-width: none !important;
    bottom: calc(var(--zurueck-h, 112px) + var(--unten, 10px) + var(--luecke, 8px)); height: var(--reihe-h); margin: 0; padding: 4px 0 0;
    background: none; border: 0; box-shadow: none; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) .glockenspiel-girlande { display: none; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-glocken, .xylophon-staebe) {
    display: grid !important; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 4px; height: 100%; min-height: 0; align-items: stretch; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-ton, .xylophon-stab) {
    min-width: 0; min-height: 96px; height: 96px; margin: 0; flex-direction: row; gap: 8px; align-self: end; align-items: center; justify-content: center; font-size: 1.3rem; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) .glockenspiel-grafik { width: 40px; }
  /* Status oben unter dem Titel, nicht in der Bildmitte (test_status_layout) */
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-status, .xylophon-status) {
    top: calc(var(--oben, 10px) + 58px) !important; bottom: auto !important; }
}
/* Ruhiger Grund hinter den Zielen (Design W10): Nacht statt Szene, kräftiger Goldrand. */
body:not(.bf-cvi) #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-ton, .xylophon-stab) { border: 3px solid var(--xm-gold); background: var(--xm-nacht); color: var(--xm-vanille); box-shadow: var(--xm-knopf-schatten); }
body:not(.bf-cvi) #app > .xylophon-3d .xylophon-stab { background: linear-gradient(90deg, var(--stabfarbe, #e0a84a) 0 30%, var(--xm-nacht) 30%); }

/* ------------------------------------------------------------------ 5c. Winterideen: Wahlfeld neben der Bühne, nichts unter „Zurück“ (Design B4, W2)
   Bildschirm fest (kein Scrollen). Querformat: links Kopf + Wahlfeld, rechts die Bühne, unten die Leiste.
   Bei wenig Höhe stehen die drei Wahlen nebeneinander (3 × 1). Hochformat: Bühne oben, Wahl darunter. */
#app > .winteridee.winteridee-3d {
  position: fixed; inset: 0; min-height: 0; height: 100dvh; overflow: hidden; align-items: stretch;
  grid-template-columns: clamp(300px, 40vw, 460px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
}
#app > .winteridee-3d .winter-kopf { grid-area: 1 / 1; align-self: start; }
#app > .winteridee-3d .winter-inhalt { grid-area: 2 / 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
#app > .winteridee-3d .winter-panel { overflow: hidden; justify-content: flex-start; }
#app > .winteridee-3d .winter-3d-scene { grid-area: 1 / 2 / 3 / 3; min-height: 0; }
#app > .winteridee-3d .winter-fuss { grid-area: 3 / 1 / 4 / 3; flex-wrap: nowrap; }
#app .winteridee .winter-auswahl .winter-knopf { min-width: 120px; }
@media (max-height: 820px) and (orientation: landscape) {
  #app > .winteridee-3d .winter-auswahl { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
  #app > .winteridee-3d .winter-kopf .dorf-logo, #app > .winteridee-3d .winter-kopf > span, #app > .winteridee-3d .winter-kopf p { display: none; }
  #app > .winteridee-3d .winter-kopf h1 { margin: 0; font-size: clamp(1.3rem, 2.4vw, 2rem); }
}
@media (max-height: 450px) {
  #app > .winteridee.winteridee-3d { grid-template-columns: minmax(400px, 60%) minmax(0, 1fr); gap: 6px; padding: 6px 10px; }
  #app > .winteridee-3d .winter-panel { padding: 8px 10px; }
  #app > .winteridee-3d .winter-zaehler, #app > .winteridee-3d .winter-status:empty { display: none; }
  #app > .winteridee-3d .winter-frage { font-size: 1.15rem; }
  #app > .winteridee-3d .winter-status { margin: 2px 0 4px; }
  #app .winteridee .winter-auswahl .winter-knopf { min-height: 80px; padding: 4px; }
  #app .winteridee-3d .winter-fuss .winter-knopf { min-height: 80px; }
  #app > .winteridee-3d .winter-auswahl .winter-icon { width: 1.6rem; height: 1.6rem; }
}
@media (orientation: portrait) {
  #app > .winteridee.winteridee-3d { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(160px, 1fr) auto auto; gap: 8px; }
  #app > .winteridee-3d .winter-3d-scene { grid-area: 2 / 1; height: auto; }
  #app > .winteridee-3d .winter-inhalt { grid-area: 3 / 1; }
  #app > .winteridee-3d .winter-fuss { grid-area: 4 / 1; }
  #app > .winteridee-3d .winter-auswahl { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

/* ------------------------------------------------------------------ 5d. Plätzchen und Advent: Ziele ≥ 120 breit (Technik W2) */
#app .plaetzchen .plaetzchen-auswahl { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
#app .plaetzchen .plaetzchen-auswahl .plaetzchen-knopf { min-width: 120px; }
@media (min-width: 901px) {
  .advent-tueren { width: min(100%, max(calc(6 * 126px + 5 * 10px), calc((100dvh - 160px) * 1.15))) !important; }
}
/* Advent: kein Scrollen; was nicht in Zielgröße passt, kommt auf Blätterseiten (blaettern.js rasterBlaettern). */
#app .advent { overflow: hidden; }
#app .advent .advent-tueren { flex: 1 1 auto; min-height: 0; gap: 8px; }
#app .advent .advent-tueren > [hidden] { display: none !important; }
#app .advent .advent-navigation { flex-wrap: nowrap; }
#app .advent .advent-navigation .advent-blatt { flex: 1 1 0; max-width: 300px; min-width: 120px; min-height: 96px; }
#app .advent .advent-navigation .advent-seite { flex: none; }
#app .advent .advent-kopf h1, .advent-zahl, .advent-tuer-text .advent-zahl { font-family: var(--schrift, "DM Sans", system-ui, sans-serif); }
@media (max-height: 650px) {
  #app .advent { padding: 8px 10px; gap: 6px; }
  #app .advent .advent-kopf :is(.dorf-logo, span, p) { display: none; }
  #app .advent .advent-kopf h1 { font-size: 1.5rem; margin: 0; }
}
@media (max-height: 450px) {
  #app .advent .advent-navigation .knopf { min-height: 72px !important; }
}
@media (max-width: 560px) {
  #app .advent .advent-navigation { display: grid; grid-template-columns: 1fr 1fr; }
  #app .advent .advent-navigation [data-advent="zurueck"] { grid-column: 1 / -1; order: 2; min-width: 0 !important; }
  #app .advent .advent-navigation .advent-seite { display: none; }
}

/* ------------------------------------------------------------------ 5e. Aktivitätsliste: nichts über den Rand (Design B3, Technik W6)
   Kacheln teilen die Breite (minmax(0,1fr) statt fester Mindestbreite), Hochformat 2 × 2. Werkzeuge als Raster,
   jedes ≥ 120 breit; was nicht in eine Reihe passt, bricht um. Titel bleibt ganz sichtbar (Logo + eine Zeile). */
#app:has(.weihnachtskopf) { width: 100%; overflow: hidden; }
#app:has(.weihnachtskopf) .start-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
@media (orientation: portrait) { #app:has(.weihnachtskopf) .start-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
#app:has(.weihnachtskopf) .start-werkzeuge { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
#app:has(.weihnachtskopf) .start-werkzeuge .knopf { min-width: 0 !important; width: auto; padding: 6px 6px; font-size: clamp(.85rem, .55rem + .55vw, 1.1rem); line-height: 1.15; }
#app:has(.weihnachtskopf) .start-blaettern { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#app:has(.weihnachtskopf) .start-blaettern > span { margin-inline-end: auto; font-size: 1.15rem; font-weight: 800; }
#app:has(.weihnachtskopf) .start-blaettern .knopf { flex: 0 1 300px; min-width: 120px; }
#app:has(.weihnachtskopf) .weihnachtskopf { overflow: hidden; }
#app:has(.weihnachtskopf) .weihnachtskopf h1 { line-height: 1.05; margin: 0; }
@media (max-height: 700px) {
  #app:has(.weihnachtskopf) .weihnachtskopf :is(.kopf-marke, p) { display: none; }
  #app:has(.weihnachtskopf) .weihnachtskopf h1 { font-size: clamp(1.6rem, 4.5vh, 2.6rem) !important; }
  #app:has(.weihnachtskopf) .weihnachtskopf .kopf-logo { margin: 0; }
  #app:has(.weihnachtskopf) .kopf-text { display: flex; align-items: center; gap: 16px; max-width: none; }
}
/* Handy quer: Blättern und Werkzeuge teilen sich ein Raster (display:contents), Ziele 96 × 72 (dokumentierte Ausnahme). */
@media (max-height: 450px) {
  #app:has(.weihnachtskopf) { box-sizing: border-box; height: 100dvh; display: grid !important; gap: 6px; padding: 6px 10px !important;
    grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); grid-template-rows: auto minmax(0, 1fr) auto auto; }
  #app:has(.weihnachtskopf) > :is(.weihnachtskopf, .start-kacheln) { grid-column: 1 / -1; }
  #app:has(.weihnachtskopf) .weihnachtskopf { min-height: 0 !important; padding: 4px 14px !important; border-radius: 14px; }
  #app:has(.weihnachtskopf) .weihnachtskopf h1 { font-size: 1.4rem !important; }
  #app:has(.weihnachtskopf) .kopf-logo { height: 24px; }
  #app:has(.weihnachtskopf) .start-kacheln { margin: 0 !important; min-height: 0; grid-auto-rows: minmax(0, 1fr); gap: 6px !important; }
  #app:has(.weihnachtskopf) button.start-kachel { min-height: 0 !important; }
  #app:has(.weihnachtskopf) .start-zeichen { height: auto !important; flex: 1 1 0; min-height: 0; }
  #app:has(.weihnachtskopf) .start-text { min-height: 0 !important; padding: 4px !important; font-size: .95rem !important; }
  #app:has(.weihnachtskopf) :is(.start-blaettern, .start-werkzeuge) { display: contents !important; }
  #app:has(.weihnachtskopf) .start-blaettern > span { display: none; }
  #app:has(.weihnachtskopf) :is(.start-blaettern, .start-werkzeuge) .knopf { min-width: 0 !important; min-height: 72px !important; max-width: none; padding: 4px 4px !important; font-size: .85rem !important; margin: 0; }
}

/* ------------------------------------------------------------------ 5f. Weihnachtsmusik ohne Scrollen (Design B2, Technik W5)
   Das Blättern der Lieder wandert in die feste Leiste unten (rechts neben Zurück/Pause/Stopp); Status und
   KI-Hinweis stehen als ruhige Zeilen über der Leiste, nichts liegt mehr darunter. */
#app > .musik { overflow: hidden; }
@media (min-height: 451px) and (min-width: 701px) {
  #app:has(> .musik) { padding-bottom: calc(var(--zurueck-h, 112px) + var(--unten, 10px) * 2 + 8px) !important; }
  #app > .musik { position: fixed !important; inset: 0 !important; margin: 0 !important; width: auto !important; max-width: none !important;
    border-radius: 0 !important; justify-content: flex-start !important; gap: 8px !important;
    padding: 14px 18px calc(var(--zurueck-h, 112px) + var(--unten, 10px) + 14px) !important; }
  #app > .musik > .fuss:has([data-musik-seite]) {
    position: fixed; z-index: 7; right: calc(var(--rechts, 10px) + 18px); bottom: calc(var(--unten, 10px) + 8px); left: auto;
    width: auto !important; max-width: calc(100vw - 560px) !important; margin: 0 !important; padding: 0 !important;
    display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; background: none; border: 0;
  }
  #app > .musik > .fuss:has([data-musik-seite]) .knopf { min-width: 120px; min-height: var(--zurueck-h, 112px); flex: 0 1 220px; }
  #app > .musik > .fuss:has([data-musik-seite]) [data-musik-seite] { position: static !important; flex: none; font-weight: 800; text-align: center; max-width: 7em; }
  #app > .musik > :is(h1, p) { margin: 0 !important; }
  #app > .musik .musik-filter { margin: 0 !important; }
  #app > .musik .musik-filter .knopf { min-height: 96px; }
  #app > .musik > .kacheln { margin: 0 !important; flex: 0 1 auto; min-height: 0; }
}
@media (min-height: 451px) and (min-width: 701px) and (max-width: 1100px) {
  #app > .musik > .fuss:has([data-musik-seite]) [data-musik-seite] { display: none; }
}
#app > .musik .musik-name { font-size: clamp(.95rem, .6rem + .8vw, 1.3rem); }
/* Handy quer und Handy hoch: Raster; beide Knopfreihen fließen per display:contents in eine gemeinsame Leiste. */
@media (max-height: 450px), (max-width: 700px) {
  #app:has(> .musik) { padding: 0 !important; }
  #app > .musik { position: fixed !important; inset: 0 !important; margin: 0 !important; width: auto !important; max-width: none !important;
    border-radius: 0 !important; display: grid !important; gap: 6px !important; align-content: start;
    grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 18px 10px 8px !important; }
  #app > .musik > *:not(.fuss):not(.musik-3d-scene) { grid-column: 1 / -1; margin: 0 !important; }
  #app > .musik > .fuss { display: contents !important; }
  #app > .musik > .fuss [data-musik-seite] { display: none !important; }
  #app > .musik > .fuss .knopf { order: 10; min-width: 0 !important; width: auto !important; margin: 0 !important; padding: 4px !important; font-size: .95rem; }
  #app > .musik > .fuss [data-musik-zurueck] { order: 9; }
  #app > .musik > h1 { font-size: 1.4rem; }
  #app > .musik > p { font-size: .95rem !important; line-height: 1.3 !important; }
  #app > .musik .musik-filter { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #app > .musik .musik-filter .knopf { min-width: 0 !important; }
  #app > .musik > .kacheln { gap: 6px !important; padding: 0 !important; background: none !important; }
}
@media (max-height: 450px) {
  #app > .musik > h1 + p { display: none; }
  #app > .musik .knopf { min-height: 72px !important; }
  #app > .musik > .kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  #app > .musik > .kacheln .knopf { min-height: 80px !important; }
  #app > .musik .musik-bild { width: 40px !important; }
}
@media (max-width: 700px) and (min-height: 451px) {
  #app > .musik { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #app > .musik > .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #app > .musik .knopf { min-height: 96px !important; }
}
@media (max-width: 430px) and (min-height: 451px) {
  #app > .musik { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 8px !important; }
  #app > .musik .musik-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #app > .musik .musik-filter .knopf:last-child { grid-column: 1 / -1; }
  #app > .musik > .fuss [data-musik-zurueck] { grid-column: 1 / -1; order: 11; }
  #app > .musik > h1 + p { display: none; }
}
@media (max-height: 450px), (max-width: 430px) {
  #app > .musik .musik-name { font-size: .88rem; line-height: 1.15; }
  #app > .musik .kacheln .knopf::after { display: none; }
  #app > .musik .kacheln .knopf { gap: 6px !important; padding: 4px 6px !important; }
}

/* ------------------------------------------------------------------ 5g. Werkstätten mit Bühne (Malen, Geschenkpapier): kein Scrollen (Design W15, Technik W6)
   Querformat: links Titel + Wahlfeld + Status, rechts die Bühne, unten die Leiste. Blättern als eine Zeile. */
@media (orientation: landscape) {
  #app:has(> :is(.malen-3d, .papier-3d)) { padding: 0 !important; }
  #app > :is(.malen.malen-3d, .papier-werkstatt.papier-3d) {
    position: fixed !important; inset: 0 !important; height: 100dvh !important; min-height: 0 !important; overflow: hidden !important;
    display: grid !important; gap: 8px !important; padding: 10px !important; margin: 0 !important; width: auto !important; max-width: none !important;
    grid-template-columns: clamp(400px, 41vw, 540px) minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) auto auto !important; align-content: stretch !important;
  }
  #app > :is(.malen-3d, .papier-3d) > :is(.fest-3d-scene, .malen-3d-scene, .papier-3d-scene) { grid-area: 1 / 2 / 4 / 3 !important; position: relative !important; inset: auto !important; min-height: 0 !important; height: auto !important; }
  #app > .malen-3d > .malen-kopf, #app > .papier-3d > h1 { grid-area: 1 / 1 !important; margin: 0 !important; }
  #app > :is(.malen-3d, .papier-3d) h1 { font-size: clamp(1.3rem, 1rem + 1vw, 2rem) !important; line-height: 1.15; }
  #app > .papier-3d > h1 + p { display: none !important; }
  #app > .malen-3d > .malen-layout, #app > .papier-3d .papier-auswahl { grid-area: 2 / 1 !important; min-height: 0 !important; overflow: hidden; align-self: start; margin: 0 !important; }
  #app > .papier-3d .papier-vorschau { display: none !important; }
  #app > .malen-3d > .malen-status { grid-area: 3 / 1 !important; margin: 0 !important; }
  #app > :is(.malen-3d, .papier-3d) > :is(.malen-fuss, .papier-aktionen) { grid-area: 4 / 1 / 5 / 3 !important; position: static !important; margin: 0 !important; }
  #app > :is(.malen-3d, .papier-3d) :is(.malen-farben, .papier-gruppe) { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; gap: 6px !important; }
  #app > :is(.malen-3d, .papier-3d) :is(.malen-seiten, .papier-seiten) { display: flex !important; flex-wrap: nowrap !important; align-items: center; gap: 6px !important; margin-top: 6px !important; }
  #app > :is(.malen-3d, .papier-3d) :is(.malen-seiten, .papier-seiten) > button { flex: 1 1 0 !important; min-width: 120px !important; width: auto !important; }
  #app > :is(.malen-3d, .papier-3d) :is(.malen-seiten, .papier-seiten) > :not(button) { flex: none; font-weight: 800; }
  #app > .papier-3d fieldset { margin: 0; padding: 0; border: 0; }
}
@media (orientation: landscape) and (max-height: 700px) {
  #app > :is(.malen-3d, .papier-3d) :is(.malen-seiten, .papier-seiten) > :not(button) { display: none; }
}
@media (orientation: landscape) and (max-height: 450px) {
  #app > :is(.malen.malen-3d, .papier-werkstatt.papier-3d) { padding: 6px !important; gap: 4px !important; }
  #app > :is(.malen-3d, .papier-3d) .knopf { min-height: 72px !important; padding: 4px !important; font-size: .95rem; }
  #app > :is(.malen-3d, .papier-3d) :is(.malen-seiten, .papier-seiten) { margin-top: 4px !important; }
  #app > :is(.malen-3d, .papier-3d) :is(.malen-fuss, .papier-aktionen) { display: flex !important; gap: 6px !important; }
  #app > :is(.malen-3d, .papier-3d) :is(.malen-fuss, .papier-aktionen) > .knopf { flex: 1 1 0 !important; min-width: 0 !important; max-width: 240px; }
  #app > .papier-3d legend, #app > .malen-3d > .malen-status { font-size: .9rem; }
  #app > .malen-3d .malen-kopf > :not(div), #app > .malen-3d .malen-kopf p { display: none !important; }
  /* Papierstern quer: Wahlfeld links, Bühne rechts */
  #app > section.akt-stern-3d { position: fixed !important; inset: 0 !important; display: grid !important; gap: 4px; padding: 6px !important;
    grid-template-columns: clamp(380px, 58vw, 480px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; }
  #app > .akt-stern-3d > * { position: static !important; inset: auto !important; margin: 0 !important; width: auto !important; transform: none !important; }
  #app > .akt-stern-3d > .akt-stern-3d-scene { grid-area: 1 / 2 / 5 / 3; min-height: 0; height: auto !important; }
  #app > .akt-stern-3d > h1 { grid-area: 1 / 1; font-size: 1.3rem !important; }
  #app > .akt-stern-3d > :is(.akt-stern-zaehler, .akt-stern-fortschritt) { display: none !important; }
  #app > .akt-stern-3d > .akt-schritt { grid-area: 2 / 1; min-height: 0; overflow: hidden; padding: 4px !important; }
  #app > .akt-stern-3d > .akt-schritt p { display: none; }
  #app > .akt-stern-3d > .akt-schritt h2 { font-size: 1.05rem; margin: 0 0 4px !important; }
  #app > .akt-stern-3d .akt-stern-wahlen { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 4px !important; }
  #app > .akt-stern-3d .knopf { min-height: 72px !important; min-width: 0 !important; padding: 4px !important; }
  #app > .akt-stern-3d > .akt-aktionen { grid-area: 3 / 1; display: grid !important; grid-template-columns: 1fr 1fr; gap: 4px; }
  #app > .akt-stern-3d > .fuss { grid-area: 4 / 1; display: flex !important; gap: 4px; }
}
/* Papierstern: Farbwahl ≥ 120 breit, Aktionen nicht unter der Leiste (Design W4) */
@media (min-width: 701px) and (orientation: landscape) {
  #app .akt-stern-3d .akt-schritt-3d-panel { width: max-content !important; min-width: min(440px, 94vw); }
  #app .akt-stern-3d .akt-stern-wahlen { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important; }
  #app .akt-stern-3d .akt-stern-wahl { min-width: 120px !important; }
}
@media (min-height: 451px) {
  #app .akt-stern-3d .akt-aktionen { top: auto !important; bottom: calc(var(--zurueck-h, 112px) + var(--unten, 10px) + var(--luecke, 8px) + 6px) !important; width: min(440px, 94vw) !important; }
}

/* ------------------------------------------------------------------ 5h. Handy hoch (≤ 430 px breit): drei Knöpfe je Reihe brauchen 3 × 120 + Lücken.
   Darum außen kaum Rand; die Karte selbst bleibt sichtbar. */
@media (max-width: 430px) and (min-height: 451px) {
  #app:not(:has(> .blatt-seite)):not(:has(> .dorf)):not(:has(> .weihnachtskopf)) { padding: 0 !important; }
  #app :is(.glockenspiel-instrument, .xylophon-instrument) { margin-inline: 0 !important; width: 100% !important; max-width: none !important; }
  #app > section:not(.blatt-seite):not(.dorf):not(.wald):not(.flug):not(.band) { padding-inline: var(--seitlicher-spielrand,6px) !important; border-radius: 12px; }
  #app :is(.fuss, .backen-aktionen, .schnee-fuss, .glockenspiel-fuss, .xylophon-fuss, .malen-fuss, .stopptanz-fuss, .papier-aktionen, .karten-aktionen, .akt-aktionen) { gap: 4px !important; }
  #app :is(.fuss, .backen-aktionen, .schnee-fuss, .glockenspiel-fuss, .xylophon-fuss, .malen-fuss, .stopptanz-fuss, .papier-aktionen, .karten-aktionen) > button { padding: 4px !important; font-size: .95rem; }
  #app :is(.glockenspiel-glocken, .xylophon-staebe) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 4px !important; }
  #app > :is(.glockenspiel, .xylophon):is(.glockenspiel, .xylophon) { padding: 8px 6px !important; }
  #app :is(.glockenspiel-instrument, .xylophon-instrument) { padding: 4px 0 !important; border: 0 !important; }
  #app :is(.glockenspiel-kopf, .xylophon-kopf) > p { display: none !important; }
  #app :is(.glockenspiel-status, .xylophon-status) { padding: 4px 8px !important; margin: 0 !important; }
}

/* ------------------------------------------------------------------ 5i. Handy hoch: Werkstätten (Papierstern, Malen, Geschenkpapier, Karte) ohne Scrollen (Design W6)
   Bühne kleiner, Einleitung weg, Blättern als EINE Zeile mit zwei Knöpfen je 50 %, Text waagrecht. */
@media (orientation: portrait) and (max-width: 1000px) {
  #app > :is(.akt-stern-3d, .malen-3d, .papier-3d, .karten-3d) :is(.fest-3d-scene, .akt-stern-3d-scene, .malen-3d-scene, .papier-3d-scene, .karten-3d-scene) {
    height: clamp(160px, 25dvh, 300px) !important; min-height: 0 !important; flex: none !important; }
  #app > :is(.papier-3d, .karten-3d, .malen-3d) > h1 + p { display: none !important; }
  #app :is(.papier-seiten, .malen-seiten, .karten-seiten) { display: grid !important; grid-template-columns: 1fr 1fr !important; grid-auto-flow: row; gap: 4px !important; width: 100% !important; }
  #app :is(.papier-seiten, .malen-seiten, .karten-seiten) > :not(button) { display: none !important; }
  #app :is(.papier-seiten, .malen-seiten, .karten-seiten) > button { grid-row: 1 !important; grid-column: auto !important; min-width: 0 !important; width: auto !important; max-width: none !important;
    writing-mode: horizontal-tb !important; min-height: 96px !important; padding: 4px !important; }
  #app .akt-stern-3d .akt-schritt-3d-panel { padding: 2px !important; }
  #app .akt-stern-3d .akt-schritt-3d-panel > div { padding: 0 !important; }
  #app .akt-stern-3d .akt-stern-wahlen { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 4px !important; }
  #app .akt-stern-3d .akt-stern-wahl { min-width: 0 !important; }
  #app .akt-stern-3d :is(h2, p) { margin-block: 2px 4px !important; }
  #app :is(.papier-3d, .karten-3d) :is(.papier-auswahl, .karten-auswahl) { padding: 4px !important; }
  #app .papier-3d .papier-gruppe, #app .karten-3d .karten-gruppe { gap: 4px !important; }
}

/* Karte im Hochformat: alles im Fluss – Kopf, Bühne, Wahlfeld über die volle Breite, Leiste. */
@media (orientation: portrait) and (max-width: 700px) {
  #app > .karten-werkstatt.karten-3d { position: fixed !important; inset: 0 !important; display: flex !important; flex-direction: column !important; gap: 6px !important;
    padding: 8px 6px !important; overflow: hidden !important; height: 100dvh !important; }
  #app > .karten-3d > :is(.karten-kopf, .karten-3d-scene, .karten-layout, .karten-aktionen) { position: static !important; inset: auto !important; width: 100% !important; max-width: none !important; margin: 0 !important; }
  #app > .karten-3d > .karten-kopf { order: 1; } #app > .karten-3d > .karten-kopf p { display: none; }
  #app > .karten-3d > .karten-3d-scene { order: 2; }
  #app > .karten-3d > .karten-layout { order: 3; display: block !important; flex: 1 1 auto; min-height: 0; overflow: hidden; }
  #app > .karten-3d .karten-vorschau { display: none !important; }
  #app > .karten-3d .karten-auswahl { width: 100% !important; }
  #app > .karten-3d .karten-auswahl fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
  #app > .karten-3d .karten-gruppe { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; }
  #app > .karten-3d > .karten-aktionen { order: 4; margin-top: auto !important; }
}

/* iPad hoch: Xylophon-Stäbe 4 × 2, Bühne flacher, damit alles ohne Scrollen passt. */
@media (orientation: portrait) and (min-width: 431px) and (max-width: 1000px) {
  #app .xylophon-staebe { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  #app :is(.glocken-3d-scene, .xylophon-3d-scene) { aspect-ratio: 3.4 !important; }
  #app :is(.glockenspiel-kopf, .xylophon-kopf) > p { display: none !important; }
}
@media (orientation: portrait) and (max-width: 1000px) {
  #app:has(> :is(.akt-stern-3d, .malen-3d, .papier-3d)) { padding: 0 !important; min-height: 0 !important; }
  #app > :is(.akt-stern-3d, .malen-3d, .papier-3d) { box-sizing: border-box !important; min-height: 0 !important; height: 100dvh !important; overflow: hidden !important; margin: 0 !important; }
}

/* ------------------------------------------------------------------ 5j. Handy quer: Karte, Festspiele, Plätzchen, Schneemann, Band (Design B1/W14) */
@media (orientation: landscape) and (max-height: 450px) {
  #app > .karten-werkstatt.karten-3d { position: fixed !important; inset: 0 !important; display: grid !important; gap: 4px; padding: 6px !important; overflow: hidden !important;
    grid-template-columns: clamp(380px, 60vw, 460px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  #app > .karten-3d > :is(.karten-kopf, .karten-3d-scene, .karten-layout, .karten-aktionen) { position: static !important; inset: auto !important; width: auto !important; max-width: none !important; margin: 0 !important; transform: none !important; }
  #app > .karten-3d > .karten-kopf { grid-area: 1 / 1; } #app > .karten-3d > .karten-kopf p { display: none; }
  #app > .karten-3d > .karten-3d-scene { grid-area: 1 / 2 / 3 / 3; height: auto !important; min-height: 0; }
  #app > .karten-3d > .karten-layout { grid-area: 2 / 1; display: block !important; min-height: 0; overflow: hidden; }
  #app > .karten-3d .karten-vorschau { display: none !important; }
  #app > .karten-3d .karten-auswahl fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
  #app > .karten-3d .karten-gruppe { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important; gap: 4px !important; }
  #app > .karten-3d .karten-seiten { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 4px !important; margin-top: 4px; }
  #app > .karten-3d .karten-seiten > :not(button) { display: none !important; }
  #app > .karten-3d .karten-seiten > button { grid-row: 1; }
  #app > .karten-3d .knopf { min-height: 72px !important; padding: 4px !important; min-width: 0 !important; }
  #app > .karten-3d > .karten-aktionen { grid-area: 3 / 1 / 4 / 3; display: flex !important; gap: 6px; }
  #app > .karten-3d > .karten-aktionen > .knopf { flex: 1 1 0; max-width: 240px; }
  /* Baum und Päckchen: vier Knöpfe in der Leiste passen nur schmaler (Ausnahme 96 × 72) */
  #app .festspiel .fest-fuss .fest-knopf { min-width: 96px !important; min-height: 72px !important; }
  #app .festspiel .fest-fuss.hat-seiten { grid-template-columns: 150px minmax(96px, 1fr) minmax(96px, 1.4fr) minmax(96px, 1fr) !important; height: auto !important; }
  #app .festspiel .fest-fuss [data-fest="zurueck"] { min-width: 150px !important; width: auto !important; }
  #app .festspiel .fest-aktionsfenster, #app .festspiel .fest-aktionen { min-width: 0 !important; width: auto !important; }
}

@media (orientation: landscape) and (max-height: 450px) {
  #app > :is(.glockenspiel-3d, .xylophon-3d) { --reihe-h: 80px; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-ton, .xylophon-stab) { min-height: 72px !important; height: 72px !important; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-glocken, .xylophon-staebe) { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)) !important; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-kopf, .xylophon-kopf) > p { display: none !important; }
  /* Backen und Schneemann quer: feste Bildschirmhöhe, Text knapper, Leiste im Bild */
  #app:has(> :is(.backen-3d, .schnee-spiel-3d)) { padding: 0 !important; }
  #app > :is(.backen.backen-3d, .schnee-spiel.schnee-spiel-3d) { position: fixed !important; inset: 0 !important; height: 100dvh !important; min-height: 0 !important; overflow: hidden !important;
    margin: 0 !important; padding: 6px 10px !important; gap: 6px !important; grid-template-rows: auto minmax(0, 1fr) auto !important; border-radius: 0 !important; }
  #app > .backen-3d > h1 + p, #app > .backen-3d .backen-fortschritt, #app > .backen-3d .backen-zaehler, #app > .schnee-spiel-3d .schnee-zaehler { display: none !important; }
  #app > .backen-3d > .backen-inhalt, #app > .schnee-spiel-3d .schnee-layout { min-height: 0; overflow: hidden; }
  #app > :is(.backen-3d, .schnee-spiel-3d) .knopf { min-height: 72px !important; padding: 4px 8px !important; }
  #app > :is(.backen-3d, .schnee-spiel-3d) :is(.fest-3d-scene, .backen-3d-scene, .schnee-3d-scene) { min-height: 0 !important; }
  /* Band: Statuszeile nicht über der Liedwahl */
  .band .band-statuszeile { top: auto !important; left: auto !important; right: var(--sf-rand, 10px) !important; transform: none !important; bottom: calc(96px + 16px) !important; max-width: 50vw; white-space: normal !important; }
}
@media (orientation: landscape) {
  #app > .xylophon-3d .xylophon-staebe { grid-template-columns: repeat(8, minmax(0, 1fr)) !important; grid-auto-rows: 100%; }
  #app > .glockenspiel-3d .glockenspiel-glocken { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; grid-auto-rows: 100%; }
}
@media (orientation: landscape) and (max-height: 450px) {
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-fuss, .xylophon-fuss) { display: flex !important; flex-wrap: nowrap !important; gap: 6px !important; }
  #app > :is(.glockenspiel-3d, .xylophon-3d) :is(.glockenspiel-fuss, .xylophon-fuss) .knopf { flex: 1 1 0 !important; min-width: 96px !important; width: auto !important; min-height: 72px !important; max-height: 96px; padding: 4px !important; }
}

/* ------------------------------------------------------------------ 6. KI-Etikett und Kicker (Übergabe F1)
   Etikett: Symbol (Schmuck) + Wort, gut lesbar, nicht kleiner als der Text drumherum. Kicker in normaler
   Schreibung im Quelltext, groß gesetzt per CSS (Vorlesen liest dann Wörter statt Buchstaben). */
.ki-etikett { display: inline-flex; align-items: center; gap: .35em; padding: .1em .55em; border-radius: 999px; border: 1px solid currentColor; font-weight: 700; white-space: normal; }
.ki-etikett svg { flex: none; width: 1.1em; height: 1.1em; color: var(--xm-gold); }
.blatt-seite .ki-etikett svg { color: #8b3a32; }
body.bf-cvi .ki-etikett svg { color: var(--bf-cvi-farbe, #ffd400); }
:is(.kopf-marke, .info-marke, .schnee-kicker, .akt-paar-kicker, .fest-kicker, .winter-kopf > span, .advent-kopf > span, .kerze-kopf > span, .plaetzchen-kopf > span, .ort-kopf > span) { text-transform: uppercase; }
/* Baum und Päckchen: Bühne immer bildschirmfest (im Hochformat rutschte sie um den Rand von #app nach unten). */
#app > .festspiel.festspiel-3d { position: fixed !important; inset: 0 !important; margin: 0 !important; width: auto !important; height: auto !important; min-height: 0 !important; }
@media (orientation: landscape) and (max-height: 450px) {
  #app .band .band-auswahl .knopf { min-height: 72px !important; }
  #app .flug-aktionen { flex-wrap: nowrap !important; }
  #app .flug-aktionen > * { flex: 1 1 0 !important; min-width: 96px !important; min-height: 72px !important; padding: 4px !important; }
  #app .flug-aktionen > [data-flug="zurueck"] { flex: 0 0 150px !important; }
  .flug-ziele { inset-block-end: calc(72px + 24px) !important; }
}

/* Acht Noten im Blick: auf den mittleren und kurzen Bühnen stehen zwei Reihen unter dem Instrument. */
@media (max-width:1080px), (max-height:450px) {
  #app:has(> section.xylophon){padding:0!important;}
  #app > section.xylophon.xylophon {
    box-sizing:border-box;position:fixed!important;inset:0!important;height:100dvh!important;min-height:0!important;max-width:none;
    display:grid!important;grid-template:auto minmax(80px,1fr) auto auto auto / minmax(0,1fr);gap:6px!important;padding:8px!important;overflow:auto!important;
  }
  #app > section.xylophon > :is(.xylophon-kopf,.xylophon-3d-scene,.xylophon-instrument,.xylophon-status,.xylophon-fuss) {
    position:relative!important;inset:auto!important;max-width:100%!important;width:100%!important;margin:0!important;box-sizing:border-box;min-height:0!important;
  }
  #app > section.xylophon .xylophon-kopf {grid-row:1;pointer-events:none;padding:0!important;}
  #app > section.xylophon .xylophon-kopf h1 {margin:0;line-height:1.06;}
  #app > section.xylophon .xylophon-kopf p {display:none;}
  #app > section.xylophon .xylophon-3d-scene {grid-row:2;height:100%!important;aspect-ratio:auto!important;overflow:hidden;border-radius:14px;}
  #app > section.xylophon .xylophon-3d-scene canvas {position:absolute;inset:0;}
  #app > section.xylophon .fest-3d-targets {display:none!important;}
  #app > section.xylophon .xylophon-instrument {display:block!important;grid-row:3;padding:0!important;border:0!important;background:transparent;box-shadow:none;}
  #app > section.xylophon .xylophon-staebe {display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;align-items:stretch;min-height:0;height:auto;gap:5px!important;}
  #app > section.xylophon .xylophon-staebe > button.xylophon-stab {height:96px!important;min-height:96px!important;max-height:none;width:100%!important;min-width:0;align-items:center;padding:4px;box-sizing:border-box;}
  #app > section.xylophon .xylophon-status {grid-row:4;line-height:1.15;padding:2px 6px!important;}
  #app > section.xylophon .xylophon-fuss {grid-row:5;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important;}
  #app > section.xylophon .xylophon-fuss > .knopf {width:100%!important;min-width:0!important;height:96px!important;min-height:96px!important;max-width:none!important;max-height:none;grid-area:auto!important;}
  #app > section.xylophon:not(.xylophon-3d) .xylophon-instrument {grid-row:2/4;align-self:center;}
}
@media (max-width:520px) and (orientation:portrait) {
  #app > section.xylophon .xylophon-staebe {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  #app > section.xylophon .xylophon-fuss {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media (orientation:landscape) and (max-height:450px) {
  #app > section.xylophon.xylophon {grid-template:auto minmax(72px,1fr) auto auto auto / minmax(0,1fr);gap:3px!important;padding:4px!important;}
  #app > section.xylophon .xylophon-kopf {display:none;}
  #app > section.xylophon .xylophon-staebe > button.xylophon-stab,#app > section.xylophon .xylophon-fuss > .knopf {height:72px!important;min-height:72px!important;}
  #app > section.xylophon .xylophon-fuss > .knopf {flex-direction:row!important;gap:5px;line-height:1.1;}
}
@media (orientation:landscape) and (min-height:451px) and (max-width:1100px){
  #app > .winteridee.winteridee-3d {grid-template-columns:minmax(412px,46%) minmax(0,1fr);}
  #app > .winteridee.winteridee-3d .winter-auswahl {grid-template-columns:repeat(3,minmax(120px,1fr));}
  #app > .winteridee.winteridee-3d.winter-geschafft .winter-auswahl {grid-template-columns:repeat(2,minmax(120px,1fr));}
}
@media (max-width:389px) and (orientation:portrait){
  #app :is(.flug-ziele,.flug-aktionen,.wald-steuerung) {gap:2px!important;margin-inline:0!important;}
  #app .flug-ziele > button,#app .wald-steuerung > button,#app .flug-aktionen > button {min-width:0!important;width:100%!important;}
  #app .flug-ziele {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));margin:auto!important;width:100%!important;max-width:100%!important;}
}

@media (max-width:1080px), (max-height:450px) {
  #app > section.xylophon .xylophon-instrument {height:auto!important;}
  #app > section.xylophon .xylophon-staebe {grid-template-rows:repeat(2,96px)!important;grid-auto-rows:96px!important;height:auto!important;}
}
@media (orientation:portrait) and (min-width:375px) and (max-width:520px){
  #app > section.xylophon .xylophon-staebe {grid-template-rows:repeat(3,96px)!important;}
}
@media (orientation:portrait) and (max-width:374px){
  #app > section.xylophon .xylophon-staebe {grid-template:repeat(4,96px)/repeat(2,minmax(0,1fr))!important;}
}
@media (orientation:landscape) and (max-height:450px){
  #app > section.xylophon .xylophon-staebe {grid-template-rows:repeat(2,72px)!important;grid-auto-rows:72px!important;}
}

/* Die sieben Backschritte behalten auch ohne WebGL ein eigenes Bildfeld. */
#app:has(> .backen:not(.backen-3d)) {padding:0!important;}
#app > section.backen:not(.backen-3d) {
  box-sizing:border-box;position:fixed;inset:0;height:100dvh;min-height:0;max-width:none;
  display:grid;grid-template:auto auto minmax(0,1fr) auto / minmax(365px,45%) minmax(0,1fr);gap:6px 12px;padding:10px!important;overflow:auto;
}
#app > section.backen:not(.backen-3d) > h1 {grid-area:1/1;margin:0;}
#app > section.backen:not(.backen-3d) > p {grid-area:2/1;margin:0;line-height:1.2;}
#app .backen:not(.backen-3d) .backen-inhalt {display:contents;}
#app .backen:not(.backen-3d) .backen-symbol {grid-area:1/2/4/3;position:relative;min-height:0;height:100%;width:100%;box-sizing:border-box;}
#app .backen:not(.backen-3d) .backen-schritt {grid-area:3/1;align-self:center;min-width:0;padding:8px;}
#app .backen:not(.backen-3d) .backen-wahlen {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:4px 0 0;}
#app .backen:not(.backen-3d) .backen-wahlen button {width:100%;min-width:0;min-height:96px;padding:4px;line-height:1.12;}
#app .backen:not(.backen-3d) .backen-aktionen {grid-area:4/1/5/3;position:static!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:5px!important;max-width:none!important;margin:0!important;}
#app .backen:not(.backen-3d) .backen-aktionen button {width:100%!important;min-width:0!important;max-width:none!important;min-height:96px;}
@media (orientation:portrait){
  #app > section.backen:not(.backen-3d){grid-template:auto auto minmax(110px,1fr) auto auto / minmax(0,1fr);gap:5px;padding:6px!important;}
  #app > section.backen:not(.backen-3d) > h1 {grid-area:1/1;}
  #app > section.backen:not(.backen-3d) > p {grid-area:2/1;}
  #app .backen:not(.backen-3d) .backen-symbol {grid-area:3/1;}
  #app .backen:not(.backen-3d) .backen-schritt {grid-area:4/1;}
  #app .backen:not(.backen-3d) .backen-aktionen {grid-area:5/1;}
  #app .backen:not(.backen-3d) .backen-schritt p {margin:2px 0;line-height:1.15;}
  #app .backen:not(.backen-3d) .backen-schritt h2 {margin:0;line-height:1.08;}
}
@media (orientation:portrait) and (max-width:520px){
 #app .backen:not(.backen-3d) .backen-aktionen:has(:nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr));}
 #app .backen:not(.backen-3d) .backen-fortschritt {margin:3px 0;}
}
@media (orientation:portrait) and (max-width:389px){
 #app .backen:not(.backen-3d) .backen-wahlen {grid-template-columns:repeat(2,minmax(0,1fr));}
 #app .backen:not(.backen-3d) .backen-wahl {display:flex;flex-direction:row;align-items:center;justify-content:center;gap:5px;}
 #app .backen:not(.backen-3d) .backen-wahl svg {width:27px;height:27px;}
}
@media (orientation:landscape) and (max-height:450px) {
 #app > section.backen:not(.backen-3d) {grid-template:auto minmax(0,1fr) auto / minmax(355px,55%) minmax(0,1fr);padding:5px!important;gap:4px;}
 #app > section.backen:not(.backen-3d) > p {display:none;}
 #app .backen:not(.backen-3d) .backen-schritt {grid-area:2/1;padding:4px;}
 #app .backen:not(.backen-3d) .backen-schritt :is(p,h2){line-height:1.1;margin:2px;}
 #app .backen:not(.backen-3d) .backen-symbol {grid-area:1/2/3/3;}
 #app .backen:not(.backen-3d) .backen-aktionen {grid-area:3/1/4/3;}
 #app .backen:not(.backen-3d) :is(.backen-wahlen,.backen-aktionen) button{min-height:72px!important;height:72px!important;line-height:1.1;}
}

/* Bild, Materialwahl und Fußleiste der ruhigen Kreativtische liegen in getrennten Rasterzeilen. */
@media screen {
 #app:has(> :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d),.akt-stern-ruhig,.stopptanz:not(.stopptanz-3d))) {padding:0!important;}
 #app > :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d),.akt-stern-ruhig,.stopptanz:not(.stopptanz-3d)) {
   position:fixed!important;inset:0;display:grid!important;box-sizing:border-box;width:100%!important;max-width:none;height:100dvh!important;min-height:0!important;overflow:auto;margin:0!important;padding:8px!important;gap:6px;background:#14243a;
 }
 #app > :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) {grid-template:auto minmax(0,1fr) auto auto / minmax(0,1fr) minmax(390px,.85fr);}
 #app .malen:not(.malen-3d) .malen-layout,#app .papier-werkstatt:not(.papier-3d) .papier-layout {display:contents!important;}
 #app .malen:not(.malen-3d) .malen-kopf,#app .papier-werkstatt:not(.papier-3d) > h1 {grid-area:1/1/2/3;margin:0;}
 #app .papier-werkstatt:not(.papier-3d) > p {display:none;}
 #app .malen:not(.malen-3d) .malen-bild,#app .papier-werkstatt:not(.papier-3d) .papier-vorschau {grid-area:2/1/4/2;position:relative;inset:auto;min-height:0;min-width:0;max-width:none;width:100%;height:100%;box-sizing:border-box;margin:0;display:grid;place-items:center;overflow:hidden;background:#172a3e;border-radius:12px;}
 #app .malen:not(.malen-3d) .malen-bild > svg,#app .papier-werkstatt:not(.papier-3d) .papier-vorschau canvas {display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:contain;}
 #app .malen:not(.malen-3d) .malen-werkzeug,#app .papier-werkstatt:not(.papier-3d) .papier-auswahl {grid-area:2/2;align-self:center;padding:6px;margin:0;min-width:0;}
 #app .malen:not(.malen-3d) .malen-seiten,#app .papier-werkstatt:not(.papier-3d) .papier-seiten {display:grid;grid-template-columns:1fr 1fr;gap:5px;align-items:stretch;margin:4px 0 0;}
 #app .malen:not(.malen-3d) .malen-seiten [data-malen-seite],#app .papier-werkstatt:not(.papier-3d) [data-papier-stand] {grid-area:1/1/2/3;min-height:0;text-align:center;}
 #app .malen:not(.malen-3d) .malen-status {grid-area:3/2;line-height:1.14;min-height:0;margin:0;}
 #app .papier-werkstatt:not(.papier-3d) .papier-vorschau [data-papier-status]:not(:empty) {position:absolute;bottom:4px;padding:3px 7px;margin:0;background:#122137;color:#fff;}
 #app .malen:not(.malen-3d) :is(.malen-farben,.malen-flaechen):not([hidden]),#app .papier-werkstatt:not(.papier-3d) .papier-gruppe {display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:5px;margin:0;}
 #app .papier-werkstatt:not(.papier-3d) fieldset {min-width:0;margin:0;padding:0;border:0;}
 #app :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) :is(.malen-fuss,.papier-aktionen) {
   grid-area:4/1/5/3;position:static!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px!important;margin:0!important;max-width:none!important;width:auto!important;
 }
 #app :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) button {width:100%!important;min-width:0!important;max-width:none!important;min-height:96px;margin:0;line-height:1.12;}
 body.bf-cvi #app :is(.malen-bild,.papier-vorschau) {background:#000!important;color:var(--bf-cvi-farbe,#ffd400);}
 body.bf-cvi #app .malen-bild > svg > :is(path,rect):not([data-malzone]) {fill:#000;stroke:currentColor;stroke-width:3px;}
 body.bf-cvi #app .malen-bild > svg > rect:first-of-type {stroke:none;}
 .papier-kontur {display:none;}
 body.bf-cvi #app .papier-werkstatt:not(.papier-3d) .papier-vorschau canvas {display:none!important;}
 body.bf-cvi .papier-kontur {display:block;width:100%;height:100%;min-height:0;}
 .papier-kontur svg {width:100%;height:100%;display:block;}
}
@media screen and (orientation:portrait) and (max-width:800px) {
 #app > :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) {grid-template:auto minmax(110px,1fr) auto auto auto / minmax(0,1fr);gap:4px;padding:5px!important;}
 #app .malen:not(.malen-3d) .malen-kopf,#app .papier-werkstatt:not(.papier-3d) > h1 {grid-area:1/1;}
 #app .malen:not(.malen-3d) .malen-bild,#app .papier-werkstatt:not(.papier-3d) .papier-vorschau {grid-area:2/1;}
 #app .malen:not(.malen-3d) .malen-werkzeug,#app .papier-werkstatt:not(.papier-3d) .papier-auswahl {grid-area:3/1;padding:3px;align-self:stretch;}
 #app .malen:not(.malen-3d) .malen-status {grid-area:4/1;}
 #app :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) :is(.malen-fuss,.papier-aktionen) {grid-area:5/1;}
 #app .malen:not(.malen-3d) .malen-kopf h1 {margin:0;}
 #app .malen:not(.malen-3d) .malen-kopf p {margin:2px 0;}
}
@media screen and (max-width:374px) and (orientation:portrait) {
 #app :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) :is(.malen-fuss,.papier-aktionen) {grid-template-columns:120px 1fr;}
 #app :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) :is(.malen-fuss,.papier-aktionen) > button:first-child {grid-row:1/3;}
 #app .malen:not(.malen-3d) .malen-kopf p {display:none;}
}
@media screen and (max-height:450px) and (orientation:landscape){
 #app > :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) {grid-template:auto minmax(0,1fr) auto auto / minmax(0,1fr) minmax(320px,54%);gap:3px;padding:4px!important;}
 #app .malen:not(.malen-3d) .malen-kopf p {display:none;}
 #app .malen:not(.malen-3d) .malen-kopf h1 {margin:0;font-size:1.28rem;}
 #app :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d)) button {min-height:72px!important;height:72px!important;padding:3px!important;flex-direction:row;gap:4px;}
 #app .malen:not(.malen-3d) :is(.malen-farben,.malen-flaechen):not([hidden]),#app .papier-werkstatt:not(.papier-3d) .papier-gruppe {grid-template-columns:repeat(3,minmax(0,1fr));}
}

/* Papier falten: Abbildung rechts, die Anweisung und ihre Auswahl links. */
#app > .akt-stern-ruhig {grid-template:auto auto auto minmax(0,1fr) auto auto / minmax(355px,43%) minmax(0,1fr);}
#app > .akt-stern-ruhig > :is(h1,.akt-stern-zaehler,.akt-stern-fortschritt) {grid-column:1;margin:0!important;}
#app > .akt-stern-ruhig .akt-schritt {display:contents;}
#app > .akt-stern-ruhig .akt-bastelgrafik {grid-area:1/2/6/3;max-width:none;max-height:none;width:100%;height:100%;min-height:0;object-fit:contain;align-self:stretch;border-radius:12px;background:#172b3e;}
#app > .akt-stern-ruhig .akt-schritt > div:not(.akt-feier){grid-area:4/1;align-self:center;padding:8px;}
#app > .akt-stern-ruhig .akt-schritt :is(p,h2) {margin:4px 0;line-height:1.17;}
#app > .akt-stern-ruhig .akt-stern-wahlen {display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:5px;}
#app > .akt-stern-ruhig .akt-aktionen {grid-area:5/1;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));margin:0!important;gap:5px;}
#app > .akt-stern-ruhig .fuss {grid-area:6/1/7/3;position:static!important;margin:0!important;min-height:0;}
#app > .akt-stern-ruhig button {min-width:0!important;width:100%!important;min-height:96px!important;max-width:none!important;padding:4px;line-height:1.12;}
#app > .akt-stern-ruhig .fuss button {width:min(220px,100%)!important;}
body.bf-cvi #app .akt-stern-ruhig .akt-papier-kontur {background:var(--bf-cvi-farbe,#ffd400)!important;mask:var(--motiv) center/contain no-repeat;}
@media (orientation:portrait) and (max-width:800px){
 #app > .akt-stern-ruhig {grid-template:auto auto minmax(100px,1fr) auto auto auto / minmax(0,1fr);gap:5px;padding:5px!important;}
 #app > .akt-stern-ruhig .akt-stern-fortschritt {display:none;}
 #app > .akt-stern-ruhig .akt-bastelgrafik {grid-area:3/1;}
 #app > .akt-stern-ruhig .akt-schritt > div:not(.akt-feier) {grid-area:4/1;padding:4px;}
 #app > .akt-stern-ruhig .akt-aktionen {grid-area:5/1;}
 #app > .akt-stern-ruhig .fuss {grid-area:6/1;}
}
@media (orientation:landscape) and (max-height:450px){
 #app > .akt-stern-ruhig {gap:3px;padding:4px!important;}
 #app > .akt-stern-ruhig .akt-stern-fortschritt {display:none;}
 #app > .akt-stern-ruhig .akt-stern-wahlen,#app > .akt-stern-ruhig .akt-aktionen {grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:3px;}
 #app > .akt-stern-ruhig button {min-height:72px!important;height:72px!important;line-height:1.08!important;}
}
#app > .stopptanz:not(.stopptanz-3d) {grid-template:auto auto auto minmax(80px,1fr) auto auto auto auto / minmax(0,1fr);}
#app > .stopptanz:not(.stopptanz-3d) > * {position:static!important;inset:auto;width:100%!important;max-width:none!important;margin:0!important;min-height:0;}
#app .stopptanz:not(.stopptanz-3d) .stopptanz-bild {height:100%;min-height:0;border-radius:12px;display:grid;place-items:center;background:#112337;overflow:hidden;}
#app .stopptanz:not(.stopptanz-3d) .stopptanz-bild svg {width:100%;height:100%;max-height:none;}
#app .stopptanz:not(.stopptanz-3d) .stopptanz-runde {color:inherit;}
#app .stopptanz:not(.stopptanz-3d) .stopptanz-wahl,#app .stopptanz:not(.stopptanz-3d) .stopptanz-fuss {position:static!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px!important;margin:0!important;}
#app .stopptanz:not(.stopptanz-3d) .stopptanz-fuss {grid-template-columns:repeat(2,minmax(0,1fr));}
#app .stopptanz:not(.stopptanz-3d) button {width:100%!important;min-width:0!important;max-width:none!important;min-height:96px!important;line-height:1.12;}
.stopptanz .pose-tanz,.stopptanz-laeuft .pose-halt,.stopptanz .tanz-haltzeichen {display:none;}
.stopptanz-laeuft .pose-tanz,.stopptanz-pause .tanz-haltzeichen {display:block;}
body.bf-cvi #app .stopptanz:not(.stopptanz-3d) .stopptanz-bild {background:#000;color:var(--bf-cvi-farbe,#ffd400);}
@media (orientation:landscape) and (max-height:600px){
 #app > .stopptanz:not(.stopptanz-3d) {grid-template:auto auto minmax(10px,1fr) auto auto auto / minmax(310px,43%) minmax(0,1fr);gap:4px;}
 #app .stopptanz:not(.stopptanz-3d) > h1 {grid-area:1/1;}
 #app .stopptanz:not(.stopptanz-3d) > h1+p {grid-area:2/1;line-height:1.12;}
 #app .stopptanz:not(.stopptanz-3d) .stopptanz-runde {grid-area:3/1;}
 #app .stopptanz:not(.stopptanz-3d) .stopptanz-status {grid-area:4/1;}
 #app .stopptanz:not(.stopptanz-3d) .stopptanz-bild {grid-area:1/2/6/3;}
 #app .stopptanz:not(.stopptanz-3d) .stopptanz-wahl {grid-area:5/1;}
 #app .stopptanz:not(.stopptanz-3d) .stopptanz-fuss {grid-area:6/1;}
 #app .stopptanz:not(.stopptanz-3d) .stopptanz-lied {grid-area:6/2;align-self:center;}
}
@media (orientation:landscape) and (max-height:450px){
 #app .stopptanz:not(.stopptanz-3d) button {min-height:72px!important;height:72px!important;padding:4px!important;}
}
@media (orientation:portrait) and (max-width:374px){
 #app .stopptanz:not(.stopptanz-3d) .stopptanz-wahl {grid-template-columns:repeat(2,minmax(0,1fr));}
 #app .stopptanz:not(.stopptanz-3d) .stopptanz-wahl button:last-child {grid-column:1/-1;}
}
/* Der Bildrahmen der stillen Feststube gehört nur dem Baum oder dem Päckchen. */
#app > .festspiel:not(.festspiel-3d):not(.festspiel-laedt) {height:100dvh;box-sizing:border-box;display:grid;grid-template:auto minmax(0,1fr) auto auto / minmax(0,1fr);gap:5px;padding:7px;}
#app .festspiel:not(.festspiel-3d) .fest-layout {display:contents;}
#app .festspiel:not(.festspiel-3d) :is(.fest-kopf,.fest-panel,.fest-bild,.fest-fuss){position:relative!important;inset:auto!important;min-height:0;max-width:100%!important;width:auto!important;margin:0;}
#app .festspiel:not(.festspiel-3d) .fest-kopf {grid-area:1/1;}
#app .festspiel:not(.festspiel-3d) .fest-bild {grid-area:2/1;display:grid;padding:0;place-items:center;overflow:hidden;border-radius:12px;background:#16283b;}
#app .festspiel:not(.festspiel-3d) .fest-bild svg {position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;}
#app .festspiel:not(.festspiel-3d) .fest-panel {grid-area:3/1;padding:3px 6px;}
#app .festspiel:not(.festspiel-3d) .fest-fuss {grid-area:4/1;}
@media (orientation:landscape) and (max-height:450px){
 #app > .festspiel:not(.festspiel-3d):not(.festspiel-laedt){grid-template:auto minmax(0,1fr) auto / minmax(180px,30%) minmax(0,1fr);padding:5px;}
 #app .festspiel:not(.festspiel-3d) .fest-bild {grid-area:1/2/3/3;}
 #app .festspiel:not(.festspiel-3d) .fest-panel {grid-area:2/1;align-self:center;}
 #app .festspiel:not(.festspiel-3d) .fest-fuss {grid-area:3/1/4/3;}
}

/* Die Fußzeile ist Teil des Rasters. Der ältere Platzhalter für schwebende Leisten entfällt. */
#app > :is(.malen:not(.malen-3d),.papier-werkstatt:not(.papier-3d),.backen:not(.backen-3d),.stopptanz:not(.stopptanz-3d),.akt-stern-ruhig,.xylophon) {--fussabstand:6px;}
@media screen {
 #app .papier-werkstatt:not(.papier-3d) .papier-vorschau canvas,#app .papier-werkstatt:not(.papier-3d) .papier-kontur {position:absolute;inset:0;}
}
@media (orientation:portrait) and (max-width:374px){
 #app section.papier-werkstatt:not(.papier-3d) .papier-auswahl .papier-gruppe {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
 #app > .akt-stern-ruhig .fuss button {min-width:120px!important;}
}
@media (orientation:landscape) and (max-height:450px){
 #app section.winteridee.winter-geschafft .winter-zaehler {display:none;}
 #app section.winteridee.winter-geschafft .winter-panel {justify-content:center;min-height:0;}
 #app section.winteridee .winter-kopf h1 {font-size:clamp(1.15rem,3.25vw,1.5rem);line-height:1.1;}
 #app section.winteridee .winter-auswahl button.winter-knopf,#app section.winteridee .winter-fuss button.winter-knopf {height:72px!important;min-height:72px!important;padding:3px 5px!important;line-height:1.1;}
 #app section.winteridee .winter-auswahl button.winter-knopf {flex-direction:row!important;gap:4px;}
 #app section.winteridee .winter-auswahl button.winter-knopf::before {display:none!important;}
}
body.bf-cvi #app .winter-knopf .winter-icon [fill]:not([fill="none"]) {fill:currentColor;}
body.bf-cvi #app .winter-knopf .winter-icon [stroke]:not([stroke="none"]) {stroke:currentColor;}
body.bf-cvi #app .winter-geschafft .winter-status {background:#000;color:var(--bf-cvi-farbe,#ffd400);}
@media (orientation:portrait) and (max-width:374px){
 #app .flug .flug-bild .flug-ziele {inset-inline:0!important;gap:0!important;}
}

@media (min-width:360px) and (max-width:399px) and (orientation:portrait) {
  /* Drei benachbarte Großtasten füllen bei 360 px die gesamte Zeile. */
  #app .listenseite .listennavigation, #app .advent .advent-navigation,
  #app .musik .musik-filter, #app .musik .musik-steuerung,
  #app .karten-werkstatt .karten-gruppe, #app .karten-werkstatt .karten-aktionen,
  #app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-glocken,
  #app .malen:not(.malen-3d) .malen-flaechen:not([hidden]), #app .malen:not(.malen-3d) .malen-fuss,
  #app .papier-werkstatt:not(.papier-3d) .papier-gruppe,
  #app .backen .backen-wahlen {
    display:grid!important;grid-template-columns:repeat(3,minmax(120px,1fr))!important;
    width:100vw!important;max-width:none!important;box-sizing:border-box;
    gap:0!important;padding-inline:0!important;margin-inline:calc(50% - 50vw)!important;
  }
  #app .malen:not(.malen-3d) .malen-fuss > button,
  #app .karten-werkstatt .karten-aktionen > button,
  #app .musik .musik-filter > button {grid-area:auto!important;}
  #app .glockenspiel .glockenspiel-fuss button, #app .schnee-spiel .schnee-fuss button,
  #app .akt-stern-ruhig .fuss button {min-width:120px!important;width:auto!important;}
  #app .kerze:not(.kerze-3d) {padding-inline:0;}
  #app .kerze:not(.kerze-3d) .kerze-ziele {margin-inline:0;gap:0;}
}
@media (min-width:360px) and (max-width:374px) and (orientation:portrait) {
  #app .wald .wald-steuerung,#app .flug .flug-aktionen,#app .band .band-auswahl {
    inset-inline:0!important;width:100vw!important;max-width:none!important;
    padding-inline:0!important;gap:0!important;margin-inline:0!important;
    grid-template-columns:repeat(3,minmax(120px,1fr))!important;
  }
}


/* Bei drei Großtasten darf der Seitenrand die nutzbare Breite nicht verkleinern. */
@media screen and (min-width:360px) and (max-width:399px) and (orientation:portrait) {
  #app #karten-atelier .karten-aktionen, #app .band .band-auswahl {justify-self:center;}
  #app #karten-atelier .karten-aktionen {width:100vw!important;max-width:none!important;gap:0!important;}
  #app .musik .musik-auswahl {width:100vw!important;max-width:none!important;justify-self:center;grid-template-columns:minmax(0,1fr);}
  #app .musik .musik-steuerung {justify-self:center;}
  #app section.kerze:not(.kerze-3d) {padding-inline:0!important;}
  #app section.kerze:not(.kerze-3d) .kerze-buehne {border-inline:0;}
  #app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-fuss {display:grid!important;grid-template-columns:120px minmax(120px,1fr)!important;}
  #app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-fuss button {width:100%!important;max-width:100%!important;}
  #app section.papier-werkstatt:not(.papier-3d) .papier-auswahl .papier-gruppe {grid-template-columns:repeat(3,minmax(120px,1fr))!important;}
  #app section.papier-werkstatt:not(.papier-3d) .papier-gruppe button {transform:none!important;}
  #app section.papier-werkstatt:not(.papier-3d) .papier-aktionen {
    width:100vw!important;justify-self:center;grid-template-columns:repeat(3,minmax(120px,1fr))!important;gap:0!important;
  }
  #app section.papier-werkstatt:not(.papier-3d) .papier-aktionen > button {grid-area:auto!important;}
}
@media screen and (min-width:701px) and (min-height:451px) and (orientation:landscape) {
  #app #karten-atelier {grid-template-columns:minmax(0,1fr) clamp(400px,36vw,510px)!important;}
}
#app .schnee-bild :is(.schnee-kontur,.schnee-standbild) {display:block;width:100%;height:100%;min-height:0;object-fit:contain;}
#app .schnee-bild .schnee-kontur {background:var(--bf-cvi-farbe,#ffd400);mask:var(--motiv) center/contain no-repeat;}
@media screen and (orientation:landscape) and (max-height:450px) {
  #app > .akt-stern-ruhig {grid-template:auto minmax(0,1fr) 72px 72px / minmax(320px,55%) minmax(0,1fr)!important;gap:4px!important;}
  #app > .akt-stern-ruhig.akt-stern-fertig {grid-template-rows:auto minmax(0,1fr) 148px 72px!important;}
  #app > section.akt-stern-ruhig > h1 {position:static!important;grid-area:1/2!important;align-self:start;justify-self:start;margin:0!important;width:auto!important;max-width:100%!important;font-size:1.1rem;}
  #app > .akt-stern-ruhig > .akt-stern-zaehler {grid-area:2/2;align-self:start;font-size:.87rem;}
  #app > .akt-stern-ruhig .akt-bastelgrafik {grid-area:2/2/5/3;}
  #app > .akt-stern-ruhig .akt-schritt > div:not(.akt-feier) {grid-area:1/1/3/2;align-self:center;padding:3px;}
  #app > .akt-stern-ruhig .akt-schritt h2 {font-size:1.12rem;}
  #app > .akt-stern-ruhig .akt-schritt p {font-size:.94rem;line-height:1.17;margin:2px 0 5px;}
  #app > .akt-stern-ruhig .akt-aktionen {grid-area:3/1;}
  #app > .akt-stern-ruhig .fuss {grid-area:4/1;}
  #app section.papier-werkstatt:not(.papier-3d) .papier-seiten {position:relative!important;padding-top:0!important;grid-template-columns:1fr 1fr!important;margin-top:2px;}
  #app section.papier-werkstatt:not(.papier-3d) .papier-seiten [data-papier-stand] {position:absolute;right:0;bottom:100%;transform:translateY(-155px);font-size:.8rem;}
  #app section.papier-werkstatt:not(.papier-3d) .papier-seiten button {grid-row:1!important;}
  #app > section.schnee-spiel {
    display:grid!important;grid-template:auto minmax(0,1fr) 72px / minmax(320px,55%) minmax(0,1fr);
    height:100dvh!important;width:100%!important;max-width:none!important;min-height:0!important;gap:4px!important;padding:5px!important;
  }
  #app section.schnee-spiel .schnee-layout {display:contents!important;}
  #app section.schnee-spiel :is(.schnee-kopf,.schnee-panel,.schnee-bild,.schnee-fuss) {position:relative!important;inset:auto!important;min-height:0!important;max-height:none!important;max-width:100%!important;margin:0!important;}
  #app section.schnee-spiel .schnee-kopf {grid-area:1/1;padding:0;text-align:left;}
  #app section.schnee-spiel .schnee-kopf p {display:none;}
  #app section.schnee-spiel .schnee-bild {grid-area:1/2/4/3;align-self:stretch;width:100%;height:100%!important;overflow:hidden;}
  #app section.schnee-spiel .schnee-panel {grid-area:2/1;padding:3px;align-self:center;}
  #app section.schnee-spiel .schnee-panel :is(h2,p) {margin:3px 0;line-height:1.12;}
  #app section.schnee-spiel .schnee-aktionen {display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:3px;}
  #app section.schnee-spiel .schnee-fuss {grid-area:3/1;}
  #app section.schnee-spiel button {height:72px!important;min-height:72px!important;padding:3px!important;}
  #app > .glockenspiel:not(.glockenspiel-3d) {display:grid!important;grid-template:auto minmax(0,1fr) auto 72px / minmax(0,1fr);
    height:100dvh!important;width:100%!important;max-width:none!important;min-height:0!important;gap:3px!important;padding:5px!important;}
  #app .glockenspiel:not(.glockenspiel-3d) :is(.glockenspiel-kopf,.glockenspiel-instrument,.glockenspiel-fuss,.glockenspiel-status) {position:relative!important;inset:auto!important;max-width:100%!important;width:auto!important;min-height:0!important;margin:0!important;}
  #app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-kopf p,#app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-girlande {display:none;}
  #app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-glocken {display:grid;grid-template-columns:repeat(5,minmax(96px,1fr));height:100%;gap:4px;align-items:stretch;}
  #app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-ton {min-height:72px!important;height:auto!important;padding:3px;}
  #app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-fuss button {height:72px!important;min-height:72px!important;}
}
body.bf-cvi #app .glockenspiel-instrument {background:#000!important;}
body.bf-cvi #app .glockenspiel-grafik svg path,body.bf-cvi #app .glockenspiel-grafik svg ellipse,body.bf-cvi #app .glockenspiel-grafik svg circle {fill:#000;stroke:var(--bf-cvi-farbe,#ffd400);stroke-width:3px;}



.instrument-standbild {display:none;}
#app .glockenspiel {--foto-breit:url('bilder/musikbuehne/glocken-breit.webp');--foto-hoch:url('bilder/musikbuehne/glocken-hoch.webp');--maske-breit:url('bilder/musikbuehne/glocken-breit-kontur.webp');--maske-hoch:url('bilder/musikbuehne/glocken-hoch-kontur.webp');}
#app .xylophon {--foto-breit:url('bilder/musikbuehne/xylophon-breit.webp');--foto-hoch:url('bilder/musikbuehne/xylophon-hoch.webp');--maske-breit:url('bilder/musikbuehne/xylophon-breit-kontur.webp');--maske-hoch:url('bilder/musikbuehne/xylophon-hoch-kontur.webp');}
#app > :is(.glockenspiel:not(.glockenspiel-3d),.xylophon:not(.xylophon-3d)) {
 display:grid!important;grid-template:auto minmax(48px,1fr) auto auto auto / minmax(0,1fr)!important;
 height:100dvh!important;min-height:0!important;max-width:none!important;box-sizing:border-box;align-items:stretch;align-content:stretch;
 padding:6px!important;gap:4px!important;--fussabstand:6px;
}
#app > :is(.glockenspiel:not(.glockenspiel-3d),.xylophon:not(.xylophon-3d)) > * {
 position:relative!important;inset:auto!important;max-width:none!important;width:auto!important;margin-block:0!important;
}
#app section:is(.glockenspiel:not(.glockenspiel-3d),.xylophon:not(.xylophon-3d)) .instrument-standbild {
 display:block;grid-row:2;min-height:0;border-radius:12px;
 --foto:var(--foto-breit);--maske:var(--maske-breit);background:var(--foto) center/contain no-repeat,#102237;
}
@media (orientation:portrait) {
 #app section:is(.glockenspiel:not(.glockenspiel-3d),.xylophon:not(.xylophon-3d)) .instrument-standbild {--foto:var(--foto-hoch);--maske:var(--maske-hoch);}
}
body.bf-cvi #app section:is(.glockenspiel:not(.glockenspiel-3d),.xylophon:not(.xylophon-3d)) .instrument-standbild {
 background:var(--bf-cvi-farbe,#ffd400)!important;mask:var(--maske) center/contain no-repeat;border-radius:0;
}
#app > section.xylophon:not(.xylophon-3d) .xylophon-instrument,#app > section.glockenspiel:not(.glockenspiel-3d) .glockenspiel-instrument {
 grid-row:3!important;align-self:stretch;padding:0!important;min-height:0;height:auto;border:0;background:transparent!important;
}
#app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-girlande,#app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-kopf p {display:none;}
#app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-glocken {display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));min-height:0;height:auto;gap:4px;}
#app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-ton {display:flex;flex-direction:row;align-items:center;justify-content:center;gap:3px;min-width:0;width:100%;height:96px!important;min-height:96px!important;padding:4px;}
#app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-grafik {width:44px;height:54px;flex:0 1 44px;}
#app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-status {grid-row:4;}
#app .glockenspiel:not(.glockenspiel-3d) .glockenspiel-fuss {grid-row:5;min-height:0;}
@media (max-height:450px) and (orientation:landscape) {
 #app section.glockenspiel:not(.glockenspiel-3d) .glockenspiel-ton {height:72px!important;min-height:72px!important;}
}



@media (orientation:landscape) and (max-height:450px) {
 #app > section.schnee-spiel .schnee-3d-scene {position:relative!important;inset:auto!important;grid-area:1/2/4/3;height:auto!important;min-height:0!important;aspect-ratio:auto!important;width:auto!important;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-bild {display:none!important;}
 #app > section.schnee-spiel .schnee-kopf {max-width:100%!important;width:100%!important;}
 #app section.schnee-spiel :is(.schnee-aktionen,.schnee-fuss) {display:grid!important;gap:3px!important;width:100%!important;}
 #app section.schnee-spiel .schnee-fuss {grid-template-columns:repeat(auto-fit,minmax(96px,1fr))!important;}
 #app section.schnee-spiel :is(.schnee-aktionen,.schnee-fuss) button {min-width:0!important;max-width:100%!important;width:100%!important;min-height:72px!important;height:72px!important;flex:none!important;}
}
@media (orientation:portrait) and (max-width:699px) {
 #app > section.schnee-spiel:not(.schnee-spiel-3d) {display:grid!important;grid-template:auto minmax(75px,1fr) auto auto / minmax(0,1fr);height:100dvh!important;min-height:0!important;padding:6px!important;margin:0!important;gap:4px;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) .schnee-kopf {grid-area:1/1;position:static!important;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) .schnee-kopf p {display:none;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) .schnee-layout {display:contents!important;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) .schnee-bild {grid-area:2/1;position:relative;min-height:0;width:100%;height:100%;overflow:hidden;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) .schnee-panel {grid-area:3/1;padding:4px;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) .schnee-panel :is(h2,p) {margin:2px 0;line-height:1.15;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) .schnee-aktionen {display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:3px;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) .schnee-fuss {grid-area:4/1;position:static!important;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));margin:0!important;}
 #app section.schnee-spiel:not(.schnee-spiel-3d) :is(.schnee-aktionen,.schnee-fuss) button {min-width:0!important;width:100%!important;min-height:96px!important;height:96px!important;padding:4px!important;}
}
@media (min-width:360px) and (max-width:389px) and (orientation:portrait) {
 #app #aktivitaetsliste .listennavigation {display:grid!important;grid-template-columns:repeat(3,minmax(120px,1fr))!important;gap:0!important;padding-inline:0!important;width:100vw!important;max-width:none!important;justify-self:center;margin-inline:auto!important;}
 #app #aktivitaetsliste .listennavigation button {min-width:120px!important;width:100%!important;}
}


@media (min-width:360px) and (max-width:389px) and (orientation:portrait) {
 #app > :is(.kerze,#aktivitaetsliste) {--seitlicher-spielrand:0px;}
 #app > section#musikzimmer {padding-inline:0!important;--seitlicher-spielrand:0px;border-inline-width:0!important;}
 #app #musikzimmer :is(.musik-auswahl,.musik-filter,.musik-steuerung) {width:100%!important;max-width:100%!important;box-sizing:border-box;gap:0!important;padding-inline:0!important;margin-inline:0!important;}
 #app #musikzimmer :is(.musik-filter,.musik-steuerung) {grid-template-columns:repeat(3,minmax(120px,1fr))!important;}
 #app #musikzimmer :is(.musik-filter,.musik-steuerung) > button {grid-area:auto!important;max-width:100%!important;min-width:0!important;}
}

#app > section:is(.glockenspiel:not(.glockenspiel-3d),.xylophon:not(.xylophon-3d)) .instrument-standbild {
  justify-self:stretch!important;align-self:stretch!important;width:100%!important;height:100%!important;grid-column:1!important;
}
#app > section.glockenspiel:not(.glockenspiel-3d) .glockenspiel-instrument {
  justify-self:stretch!important;align-self:stretch!important;min-width:0!important;width:100%!important;box-sizing:border-box;
}
#app > section.glockenspiel:not(.glockenspiel-3d) .glockenspiel-glocken {
  justify-self:stretch!important;min-width:0!important;width:100%!important;max-width:none!important;
}
@media (min-width:620px) {
  #app > section.glockenspiel:not(.glockenspiel-3d) .glockenspiel-glocken {grid-template-columns:repeat(5,minmax(0,1fr))!important;}
}
@media (orientation:landscape) and (max-height:450px) {
 body.bf-cvi #app section.schnee-spiel .schnee-aktionen button {font-size:1.03rem!important;line-height:1.06;}
}


#app > section.glockenspiel.glockenspiel-3d .glockenspiel-kopf p {display:none!important;}
#app > section.glockenspiel:not(.glockenspiel-3d),#app > section.xylophon:not(.xylophon-3d) {position:fixed!important;inset:0!important;margin:0!important;width:100vw!important;box-sizing:border-box;}
#app > section.backen:not(.backen-3d)::after,#app > section.glockenspiel:not(.glockenspiel-3d)::after,#app > section.xylophon:not(.xylophon-3d)::after {display:none!important;}
@media (min-width:360px) and (max-width:399px) and (orientation:portrait) and (min-height:730px) {
  #app > section.papier-werkstatt:not(.papier-3d) {
    --seitlicher-spielrand:0px;border-inline:0!important;padding-inline:0!important;overflow:clip!important;
  }
}
@media (max-height:450px) and (orientation:landscape) {
 #app > section.schnee-spiel {position:fixed!important;inset:0!important;margin:0!important;width:100vw!important;box-sizing:border-box;}
}
@media (max-width:699px) and (orientation:portrait) {
 #app > section.schnee-spiel.schnee-spiel-3d {position:fixed!important;inset:0!important;display:grid!important;
 grid-template:auto minmax(80px,1fr) auto 96px / minmax(0,1fr)!important;
 height:100dvh!important;min-height:0!important;width:100vw!important;gap:4px!important;padding:5px!important;margin:0!important;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-layout {display:contents!important;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-bild {display:none!important;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-3d-scene {position:relative!important;inset:auto!important;grid-area:2/1!important;min-height:0!important;height:auto!important;width:auto!important;aspect-ratio:auto!important;}
 #app section.schnee-spiel.schnee-spiel-3d :is(.schnee-kopf,.schnee-panel,.schnee-fuss){position:relative!important;inset:auto!important;width:auto!important;min-height:0!important;max-width:none!important;margin:0!important;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-kopf {grid-area:1/1!important;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-kopf p {display:none!important;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-panel {grid-area:3/1!important;padding:4px;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-panel :is(h2,p) {margin:2px 0;line-height:1.12;}
 #app section.schnee-spiel.schnee-spiel-3d .schnee-fuss {grid-area:4/1!important;}
 #app section.schnee-spiel.schnee-spiel-3d :is(.schnee-aktionen,.schnee-fuss){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:4px!important;}
 #app section.schnee-spiel.schnee-spiel-3d :is(.schnee-aktionen,.schnee-fuss) button{min-width:0!important;max-width:100%!important;width:100%!important;min-height:96px!important;height:96px!important;padding:4px!important;}
}


/* Ruhige Fassung (ohne 3D) von Glocken, Xylophon, Stopptanz: „Zurück“ unten links, 220 breit (test_zurueck_layout). */
#app > :is(.glockenspiel:not(.glockenspiel-3d), .xylophon:not(.xylophon-3d), .stopptanz:not(.stopptanz-3d)) :is(.glockenspiel-fuss, .xylophon-fuss, .stopptanz-fuss) {
  justify-self: stretch !important; justify-content: start !important; align-self: end !important; width: auto !important; max-width: none !important; margin: 0 !important; }
@media (min-height: 451px) and (min-width: 701px) {
  #app > :is(.glockenspiel:not(.glockenspiel-3d), .xylophon:not(.xylophon-3d), .stopptanz:not(.stopptanz-3d)) :is(.glockenspiel-fuss, .xylophon-fuss, .stopptanz-fuss) {
    display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; }
  #app > :is(.glockenspiel, .xylophon, .stopptanz) :is(.glockenspiel-fuss, .xylophon-fuss, .stopptanz-fuss) > :is([data-glockenspiel="zurueck"], [data-xylophon="zurueck"], [data-stopptanz="zurueck"]) {
    order: -1; flex: 0 0 220px !important; width: 220px !important; min-height: 112px !important; }
  #app > :is(.glockenspiel:not(.glockenspiel-3d), .xylophon:not(.xylophon-3d), .stopptanz:not(.stopptanz-3d)) :is(.glockenspiel-fuss, .xylophon-fuss, .stopptanz-fuss) > button:not([data-glockenspiel="zurueck"], [data-xylophon="zurueck"], [data-stopptanz="zurueck"]) {
    flex: 0 1 260px !important; width: auto !important; min-width: 120px !important; }
}
#app > .stopptanz:not(.stopptanz-3d) > .stopptanz-fuss { order: 99; grid-row: auto !important; }

/* Trefferflächen bleiben an ihren Paketen. Der Kameraabstand berücksichtigt kurze Fenster. */
#app .wald-bild[aria-busy="true"]::after {
  content:"";position:absolute;inset:0;pointer-events:none;
  background:#0c1d38 url('bilder/wald/lichtung-breit.webp') center/cover no-repeat;
}
@media (orientation:portrait) {
  #app .wald-bild[aria-busy="true"]::after {background-image:url('bilder/wald/lichtung-hoch.webp');}
}
@media (min-width:1100px) and (min-height:651px) {
  #app > section.xylophon:not(.xylophon-3d) .xylophon-instrument {width:100%!important;justify-self:stretch;}
  #app > section.xylophon:not(.xylophon-3d) .xylophon-staebe {
    display:grid;grid-template-columns:repeat(8,minmax(120px,1fr));width:100%;max-width:none;
    gap:6px;align-items:stretch;min-height:96px;
  }
  #app > section.xylophon:not(.xylophon-3d) .xylophon-stab {min-width:120px;width:100%;min-height:96px;}
}
#app .akt-paar-3d .fest-3d-target {width:120px!important;height:96px!important;}
#app .winteridee-rentier .winter-standbild {object-fit:cover;}
@media (orientation:landscape) and (max-height:450px) {
  body.bf-cvi #app .malen:not(.malen-3d) .malen-kopf {grid-area:1/1;}
  body.bf-cvi #app .malen:not(.malen-3d) .malen-bild {grid-area:2/1;}
  body.bf-cvi #app .malen:not(.malen-3d) .malen-status {grid-area:3/1;}
  body.bf-cvi #app .malen:not(.malen-3d) .malen-werkzeug {grid-area:1/2/4/3;}
  body.bf-cvi #app .stopptanz:not(.stopptanz-3d) :is(.stopptanz-wahl,.stopptanz-fuss) button {
    display:flex!important;flex-direction:row;align-items:center;justify-content:center;
    gap:2px!important;padding:3px!important;line-height:1.07!important;font-size:1rem!important;
  }
  body.bf-cvi #app .stopptanz :is(.stopptanz-wahl,.stopptanz-fuss) button::before {display:none!important;}
  body.bf-cvi #app .winteridee .winter-auswahl button {
    flex-direction:column!important;gap:2px!important;padding:2px!important;
    font-size:1rem!important;line-height:1.04!important;overflow-wrap:anywhere;
  }
  body.bf-cvi #app .winteridee .winter-auswahl .winter-symbol {width:16px!important;height:16px!important;flex:0 0 16px;}
  body.bf-cvi #app .winteridee .winter-auswahl .winter-icon {display:block;width:100%!important;height:100%!important;}
  body.bf-cvi #app > .winteridee:not(.winteridee-3d) {grid-template-columns:minmax(370px,67%) minmax(0,1fr);}
  body.bf-cvi #app .winteridee .winter-auswahl .winter-knopf > span:not(.winter-symbol,.dwell-dot) {
    max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.08;
  }
}

@media (orientation:portrait) and (min-width:380px) {
  #app .backen:not(.backen-3d) .backen-aktionen:has(:nth-child(5)) {grid-template-columns:repeat(3,minmax(0,1fr));}
}

@media (orientation: portrait) and (min-width: 701px) {
  #app > section.glockenspiel.glockenspiel-3d .glockenspiel-fuss {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: 220px minmax(220px, 300px) !important;
    justify-content: start !important;
    gap: 8px !important;
  }
  #app > section.glockenspiel.glockenspiel-3d .glockenspiel-fuss > button {
    width: 100% !important;
    min-width: 0 !important;
  }
}
@media (orientation: landscape) and (max-height: 450px) {
  #app > section.akt-stern-3d .fuss [data-akt="zurueck"] {min-width: 120px !important;}
  body.bf-cvi #app .winteridee-wunschzettel:not(.winteridee-3d) .winter-auswahl {
    grid-template-columns: 1fr .8fr 1.2fr !important;
  }
}

/* Im Ladezustand steht dasselbe Instrument bereits an seinem Platz. */
#app .glockenspiel-laedt {--startbild:url('bilder/musikbuehne/glocken-breit.webp');}
#app .xylophon-laedt {--startbild:url('bilder/musikbuehne/xylophon-breit.webp');}
@media (orientation:portrait) {
  #app .glockenspiel-laedt {--startbild:url('bilder/musikbuehne/glocken-hoch.webp');}
  #app .xylophon-laedt {--startbild:url('bilder/musikbuehne/xylophon-hoch.webp');}
}
body:not(.bf-cvi) #app :is(.glockenspiel-laedt,.xylophon-laedt) .fest-3d-scene::after {
  content:"";position:absolute;inset:0;pointer-events:none;
  background:#10223a var(--startbild) center/cover no-repeat;
}
body:not(.bf-cvi) #app .wald-bild:has(canvas) {
  background:#111d35 url('bilder/wald/lichtung-breit.webp') center/cover no-repeat;
}
@media (orientation:portrait) {
  body:not(.bf-cvi) #app .wald-bild:has(canvas) {background-image:url('bilder/wald/lichtung-hoch.webp');}
}

@media (orientation:landscape) and (min-width:600px) and (max-height:450px) {
  #app > .flug:not(:has(.flug-still)) .flug-aktionen {
    display:grid!important;
    grid-auto-flow:column;
    grid-auto-columns:minmax(0,1fr);
    gap:5px!important;
  }
  #app > .flug:not(:has(.flug-still)) .flug-aktionen > button {
    width:100%!important;min-width:0!important;max-width:none!important;
  }
  #app > .flug .flug-aktionen > button[hidden] {display:none!important;}
}

/* Überschrift und Spielhinweis auf den großen Instrumentenbühnen untereinander setzen. */
@media (min-width: 1081px) and (min-height: 451px) {
  #app > section:is(.xylophon-3d, .glockenspiel-3d) {
    display: grid !important;
    grid-template: max-content max-content / minmax(0, 1fr);
    align-content: start !important;
    justify-content: start !important;
    gap: 0 !important;
    justify-items: start;
  }
  #app > section:is(.xylophon-3d, .glockenspiel-3d) > :is(.xylophon-kopf, .glockenspiel-kopf, .xylophon-status, .glockenspiel-status) {
    position: relative !important;
    inset: auto !important;
    grid-column: 1;
    margin: 0 0 0 var(--links, 10px) !important;
    max-width: min(38rem, 80vw);
  }
  #app > section.xylophon-3d > .xylophon-kopf p { display: none; }
  #app > section:is(.xylophon-3d, .glockenspiel-3d) > header {
    grid-row: 1;
    margin-top: var(--oben, 10px) !important;
  }
  #app > section:is(.xylophon-3d, .glockenspiel-3d) > [role="status"] {
    grid-row: 2;
    margin-top: 4px !important;
  }
}
