@font-face{font-family:'SGZ Ziffern';src:local('Georgia'),local('Georgia Regular'),local('Times New Roman'),local('TimesNewRomanPSMT'),local('Liberation Serif'),local('LiberationSerif'),local('Tinos'),local('Noto Serif'),local('NotoSerif-Regular');font-weight:100 600;unicode-range:U+0030-0039}
@font-face{font-family:'SGZ Ziffern';src:local('Georgia Bold'),local('Georgia-Bold'),local('Times New Roman Bold'),local('TimesNewRomanPS-BoldMT'),local('Liberation Serif Bold'),local('LiberationSerif-Bold'),local('Tinos Bold'),local('Noto Serif Bold'),local('NotoSerif-Bold');font-weight:700 900;unicode-range:U+0030-0039}
/* Speedstrom – Umspannwerk am Landwehrkanal, Berlin 1926: Design-Variablen je Ansicht (html[data-ansicht]), Kulisse (#kulisse, gemalte Halle),
 * Schalttafel als eigener Gegenstand (#tafel, data-flaeche: gemalter Marmor, Messingrahmen, Schatten), Leiste als lackierter Schaltschrank mit
 * Nieten, Schaltbuch aus Papier, Steuerkreuz aus Bakelit mit Drehknopf, Übungswahl. Alles Übrige im gemeinsamen assets/css/sgz-runde.css. */
:root {
  --akzent: #f2c46a; --akzent2: #b8862a; --akzent3: #3a2a08; --tief: #121a18; --panel: rgba(28, 40, 38, .5); --panel2: rgba(30, 42, 40, .97);
  --text: #f4ecd8; --mute: #d8d0ba; --rand: rgba(242, 196, 106, .5); --knopf1: #3e5450; --knopf2: #22302e; --knopfText: #f4ecd8;
  --lack1: #34484a; --lack2: #26363a; --niete: #c8a24a; --papier1: #f6efda; --papier2: #e6d8b2; --tinte: #2a2418; --tinte2: #8a4a10;
  --grund-q: url(img/kulisse-nacht-q.webp?v=1); --grund-h: url(img/kulisse-nacht-h.webp?v=1); --boden: url(img/marmor-nacht.webp?v=1);
  --kopf: 'SGZ Ziffern', Georgia, 'Times New Roman', serif;
}
html[data-ansicht="frueh"] {
  --akzent: #ffd29a; --akzent2: #c47a3a; --panel: rgba(54, 40, 36, .5); --panel2: rgba(56, 42, 38, .97); --mute: #ecd8c8;
  --lack1: #5a4038; --lack2: #46302a;
  --grund-q: url(img/kulisse-frueh-q.webp?v=1); --grund-h: url(img/kulisse-frueh-h.webp?v=1); --boden: url(img/marmor-frueh.webp?v=1);
}
html[data-ansicht="halle"] {
  --akzent: #6a3a08; --akzent2: #a8742a; --akzent3: #f2e6c8; --tief: #e4dccb; --panel: rgba(244, 238, 222, .6); --panel2: rgba(244, 238, 224, .97);
  --text: #26201a; --mute: #43382a; --rand: rgba(120, 80, 20, .45); --knopf1: #e8dcc0; --knopf2: #cbb68a; --knopfText: #26201a;
  --lack1: #d8d2c2; --lack2: #c4bca8; --niete: #8a6a2a;
  --grund-q: url(img/kulisse-halle-q.webp?v=1); --grund-h: url(img/kulisse-halle-h.webp?v=1); --boden: url(img/marmor-halle.webp?v=1);
}
body { background: #1a2422; }
html[data-ansicht="halle"] body { background: #cfc6b2; }
/* Kulisse: Schalthalle des Umspannwerks mit hohen Fenstern, Transformatoren, ein wenig Dampf vom Kanal (R40: Ort, Fläche, Material) */
#kulisse { transition: filter .8s ease; position: fixed; inset: 0; z-index: 0; background: var(--grund-q) center / cover no-repeat, linear-gradient(180deg, #2a3a38, #121a18); overflow: hidden; }
body.hoch #kulisse { background-image: var(--grund-h), linear-gradient(180deg, #2a3a38, #121a18); }
/* Schauplätze je Abschnitt: Trafohalle, Maschinensaal, Kabelkeller, Freiluftanlage – je Ansicht eine eigene gemalte Fassung (Nacht, Frühschicht, helle Werkhalle) */
html[data-ort="trafo"] { --grund-q: url(img/ort-trafo-q.webp?v=1); --grund-h: url(img/ort-trafo-h.webp?v=1); }
html[data-ansicht="frueh"][data-ort="trafo"] { --grund-q: url(img/ort-trafo-frueh-q.webp?v=1); --grund-h: url(img/ort-trafo-frueh-h.webp?v=1); }
html[data-ansicht="halle"][data-ort="trafo"] { --grund-q: url(img/ort-trafo-hell-q.webp?v=1); --grund-h: url(img/ort-trafo-hell-h.webp?v=1); }
html[data-ort="maschine"] { --grund-q: url(img/ort-maschine-q.webp?v=1); --grund-h: url(img/ort-maschine-h.webp?v=1); }
html[data-ansicht="frueh"][data-ort="maschine"] { --grund-q: url(img/ort-maschine-frueh-q.webp?v=1); --grund-h: url(img/ort-maschine-frueh-h.webp?v=1); }
html[data-ansicht="halle"][data-ort="maschine"] { --grund-q: url(img/ort-maschine-hell-q.webp?v=1); --grund-h: url(img/ort-maschine-hell-h.webp?v=1); }
html[data-ort="kabel"] { --grund-q: url(img/ort-kabel-q.webp?v=1); --grund-h: url(img/ort-kabel-h.webp?v=1); }
html[data-ansicht="frueh"][data-ort="kabel"] { --grund-q: url(img/ort-kabel-frueh-q.webp?v=1); --grund-h: url(img/ort-kabel-frueh-h.webp?v=1); }
html[data-ansicht="halle"][data-ort="kabel"] { --grund-q: url(img/ort-kabel-hell-q.webp?v=1); --grund-h: url(img/ort-kabel-hell-h.webp?v=1); }
html[data-ort="freiluft"] { --grund-q: url(img/ort-freiluft-q.webp?v=1); --grund-h: url(img/ort-freiluft-h.webp?v=1); }
html[data-ansicht="frueh"][data-ort="freiluft"] { --grund-q: url(img/ort-freiluft-frueh-q.webp?v=1); --grund-h: url(img/ort-freiluft-frueh-h.webp?v=1); }
html[data-ansicht="halle"][data-ort="freiluft"] { --grund-q: url(img/ort-freiluft-hell-q.webp?v=1); --grund-h: url(img/ort-freiluft-hell-h.webp?v=1); }
/* Ortswechsel: das alte Bild blendet aus, das neue fährt leicht heran */
#kulisse .ortalt { position: absolute; inset: 0; z-index: 1; background-position: center; background-size: cover; background-repeat: no-repeat; opacity: 1; transition: opacity 1.6s ease; }
#kulisse .ortalt.weg { opacity: 0; }
#kulisse.ortneu { animation: ortZoom 2.4s ease-out; }
@keyframes ortZoom { 0% { transform: scale(1.07); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { #kulisse.ortneu { animation: none; } }
/* Belebung je Schauplatz: nur am Rand (die Mitte gehört der Tafel), sehr dezent */
#kulisse .amb { position: absolute; display: none; pointer-events: none; }
html[data-ort="kabel"] #kulisse .amb { display: block; top: 6%; width: 3px; height: 9px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: rgba(190, 220, 245, .7); animation: ortTropf 4.2s linear infinite; }
html[data-ort="kabel"] #kulisse .b1 { left: 7%; } html[data-ort="kabel"] #kulisse .b2 { left: 14%; animation-delay: -1.4s; animation-duration: 5.1s; } html[data-ort="kabel"] #kulisse .b3 { left: 21%; animation-delay: -2.9s; }
html[data-ort="kabel"] #kulisse .b4 { left: 81%; animation-delay: -.7s; animation-duration: 4.8s; } html[data-ort="kabel"] #kulisse .b5 { left: 88%; animation-delay: -3.3s; } html[data-ort="kabel"] #kulisse .b6 { left: 94%; animation-delay: -2.1s; animation-duration: 5.6s; }
@keyframes ortTropf { 0% { transform: translateY(0); opacity: 0; } 8% { opacity: 1; } 85% { opacity: .9; } 100% { transform: translateY(78vh); opacity: 0; } }
html[data-ort="freiluft"]:not([data-ansicht="frueh"]):not([data-ansicht="halle"]) #kulisse .amb { display: block; width: 3px; height: 3px; border-radius: 50%; background: #fff6d8; box-shadow: 0 0 6px 2px rgba(255, 240, 200, .6); animation: ortFunkeln 3.6s ease-in-out infinite; }
html[data-ort="freiluft"] #kulisse .b1 { left: 6%; top: 7%; } html[data-ort="freiluft"] #kulisse .b2 { left: 15%; top: 15%; animation-delay: -1.2s; } html[data-ort="freiluft"] #kulisse .b3 { left: 24%; top: 5%; animation-delay: -2.4s; }
html[data-ort="freiluft"] #kulisse .b4 { left: 77%; top: 10%; animation-delay: -.6s; } html[data-ort="freiluft"] #kulisse .b5 { left: 86%; top: 4%; animation-delay: -1.8s; } html[data-ort="freiluft"] #kulisse .b6 { left: 93%; top: 16%; animation-delay: -3s; }
@keyframes ortFunkeln { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }
html[data-ort="trafo"]:not([data-ansicht="frueh"]):not([data-ansicht="halle"]) #kulisse .amb { display: block; width: 26vmin; height: 26vmin; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 140, .22), rgba(255, 200, 120, 0) 70%); animation: ortFlacker 7s steps(1) infinite; }
html[data-ort="trafo"] #kulisse .b1 { left: 2%; top: 2%; } html[data-ort="trafo"] #kulisse .b2 { right: 2%; top: 4%; animation-delay: -3.1s; } html[data-ort="trafo"] #kulisse .b3, html[data-ort="trafo"] #kulisse .b4, html[data-ort="trafo"] #kulisse .b5, html[data-ort="trafo"] #kulisse .b6 { display: none; }
@keyframes ortFlacker { 0%, 100% { opacity: 1; } 61% { opacity: .35; } 62% { opacity: 1; } 64% { opacity: .5; } 65% { opacity: 1; } }
html[data-ort="maschine"] #kulisse .amb { display: block; bottom: 12%; width: 200px; height: 80px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(240, 240, 235, .2), rgba(240, 240, 235, 0) 70%); animation: ortDampf 6s ease-out infinite; }
html[data-ort="maschine"] #kulisse .b1 { left: 4%; } html[data-ort="maschine"] #kulisse .b2 { right: 4%; animation-delay: -2s; } html[data-ort="maschine"] #kulisse .b3 { left: 10%; animation-delay: -4s; } html[data-ort="maschine"] #kulisse .b4, html[data-ort="maschine"] #kulisse .b5, html[data-ort="maschine"] #kulisse .b6 { display: none; }
@keyframes ortDampf { 0% { transform: translateY(0) scale(.6); opacity: 0; } 25% { opacity: 1; } 100% { transform: translateY(-40vh) scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #kulisse .amb { animation: none !important; display: none !important; } }
/* Runde 11: Wetterleuchten über der Freiluftanlage; Strom-Balken glüht beim Wachsen */
#kulisse .wetter { position: absolute; inset: 0 0 45% 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse at 30% 10%, rgba(220, 225, 255, .55), rgba(200, 205, 255, 0) 65%); animation: wetter 1.1s ease-out both; }
@keyframes wetter { 0% { opacity: 0; } 8% { opacity: 1; } 16% { opacity: .2; } 24% { opacity: .85; } 100% { opacity: 0; } }
#schaltbuch .balken.glimmt i { animation: balkenGlimmt .9s ease-out; }
@keyframes balkenGlimmt { 0% { box-shadow: 0 0 10px 3px rgba(255, 214, 110, .95); filter: brightness(1.4); } 100% { box-shadow: 0 0 0 0 rgba(255, 214, 110, 0); filter: none; } }
#kulisse .dampf { position: absolute; bottom: 8%; width: 260px; height: 90px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(240, 240, 235, .22), rgba(240, 240, 235, 0) 70%); animation: dampf 70s linear infinite; }
#kulisse .d2 { bottom: 18%; width: 340px; animation-duration: 110s; animation-delay: -40s; }
@keyframes dampf { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }
@media (prefers-reduced-motion: reduce) { #kulisse .dampf { animation: none; display: none; } }
#buehne { z-index: 1; }
html[data-ansicht="halle"] #logo span, html[data-ansicht="halle"] #logo b { text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
html[data-ansicht="halle"] .wert b { color: #26201a; }
.wert b, #schaltbuch .zf { font-family: var(--kopf); font-variant-numeric: lining-nums tabular-nums; font-kerning: none; }

/* Leiste als lackierter Schaltschrank mit Messingnieten */
#hud { background: linear-gradient(180deg, var(--lack1), var(--lack2)); border: 3px solid #141c1a;
  box-shadow: 0 12px 28px rgba(5, 10, 8, .55), inset 0 2px 0 rgba(255, 255, 255, .12); backdrop-filter: none; position: relative; }
#hud::before, #hud::after { content: ''; position: absolute; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff0b8, var(--niete) 60%, #5a4010); box-shadow: 0 1px 1px rgba(0, 0, 0, .5); }
#hud::before { left: 7px; } #hud::after { right: 7px; }
.wert { background: rgba(10, 16, 14, .5); }
html[data-ansicht="halle"] .wert { background: rgba(255, 250, 238, .7); }
.wert.knapp b { color: #ffb24a; }
/* Runde 7: Zähler blitzt auf, wenn ein abgeklemmter Funke ankommt */
.wert.blitzt { animation: wertBlitz .6s ease-out; }
@keyframes wertBlitz { 0% { box-shadow: 0 0 0 0 rgba(150, 210, 255, .9); transform: scale(1.08); } 100% { box-shadow: 0 0 0 12px rgba(150, 210, 255, 0); transform: scale(1); } }
/* Runde 8: Meilenstein – der Punktezähler blitzt golden auf */
.wert.meile { animation: wertMeile .9s ease-out; }
@keyframes wertMeile { 0% { box-shadow: 0 0 0 0 rgba(255, 214, 110, .95); transform: scale(1.12); } 100% { box-shadow: 0 0 0 16px rgba(255, 214, 110, 0); transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .wert.blitzt, .wert.meile { animation: none; } }
html[data-ansicht="halle"] .wert.knapp b { color: #a2401e; }
#knoepfe { grid-template-columns: repeat(3, 1fr); }
@media (max-height: 860px) and (min-aspect-ratio: 1/1) {
  #hud { gap: 6px; padding: 10px 12px; } #logo { font-size: 26px; padding: 2px 0 0; } .wert { padding: 3px 8px 4px; } .wert b { font-size: 24px; } .wert.klein b { font-size: 19px; }
  #knoepfe button { height: 40px; }
}
#eigen { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* Schaltbuch: Papier mit Messingklammer */
#schaltbuch { flex: none; position: relative; padding: 12px 12px 8px; border-radius: 4px; color: var(--tinte);
  background: linear-gradient(180deg, var(--papier1), var(--papier2)); box-shadow: 0 6px 12px rgba(5, 10, 8, .45); font: 14px/1.3 Georgia, serif; min-height: 112px; }
#schaltbuch::before { content: ''; position: absolute; left: 50%; top: -4px; width: 36px; height: 10px; margin-left: -18px; border-radius: 3px; background: linear-gradient(180deg, #f2d88a, #9a7428); box-shadow: 0 2px 2px rgba(0, 0, 0, .4); }
#schaltbuch > b { display: block; text-align: center; font: 800 15px/1.2 Georgia, serif; color: var(--tinte2); margin: 2px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#schaltbuch .zl { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; min-height: 24px; white-space: normal; overflow: visible; }
#schaltbuch .zl b { margin-left: auto; color: var(--tinte); }
#schaltbuch .zl.klein { font-size: 12.5px; color: #4a3e28; height: auto; min-height: 18px; white-space: normal; line-height: 1.3; overflow: visible; }
#schaltbuch .balken { flex: 1; height: 10px; border-radius: 5px; background: rgba(60, 40, 20, .18); overflow: hidden; border: 1px solid rgba(60, 40, 20, .3); }
#schaltbuch .balken i { display: block; height: 100%; background: linear-gradient(90deg, #c8642a, #f2b24a); transition: width .3s; }

/* Meldungen in der Leiste (nie über der Tafel) */
#meldung { min-height: 40px; padding: 5px 10px; border-radius: 8px; font: 700 13px/1.3 'Segoe UI', system-ui, sans-serif; color: #f4ecd8;
  background: rgba(14, 20, 18, .9); border: 1.5px solid rgba(242, 196, 106, .45); display: flex; align-items: center; justify-content: center; text-align: center;
  opacity: 0; transition: opacity .18s; }
#meldung.an { opacity: 1; }
#meldung.warn { border-color: #e04a30; box-shadow: 0 0 0 2px rgba(224, 74, 48, .35); }
@media (max-height: 860px) and (min-aspect-ratio: 1/1) { #meldung { min-height: 34px; font-size: 12px; padding: 3px 8px; } }

/* Schalttafel: Marmor im Messingrahmen mit Schatten */
#brettbox { overflow: visible; }
#tafel { position: absolute; border-radius: 6px; background: var(--boden) center / cover no-repeat, linear-gradient(135deg, #e8e4da, #c9c3b4);
  box-shadow: 0 0 0 4px #c8a24a, 0 0 0 7px #6a4a1a, 0 0 0 8px #2a1c0a, 0 18px 36px rgba(5, 10, 8, .6); touch-action: none; }
#tafel canvas { position: absolute; left: 0; top: 0; }

/* Steuerkreuz aus Bakelit mit Drehknopf: nur auf Touch-Geräten */
#kreuz { position: absolute; right: 8px; bottom: 8px; width: 168px; height: 168px; display: none; z-index: 2; touch-action: none; transform-origin: 100% 100%; }
@media (pointer: coarse) { #kreuz { display: block; } }
#kreuz.unten { right: auto; left: 50%; margin-left: -84px; bottom: 4px; transform-origin: 50% 100%; }
#kreuz .kr { position: absolute; width: 56px; height: 56px; border-radius: 12px; border: 2px solid #0e0a06; padding: 0; color: #f2d88a; touch-action: none;
  background: linear-gradient(180deg, #4a3020, #2a1a10); box-shadow: 0 4px 8px rgba(5, 10, 8, .5), inset 0 1px 0 rgba(255, 230, 190, .25);
  display: flex; align-items: center; justify-content: center; }
#kreuz .kr.an { background: #b8862a; }
#kreuz .kr svg { width: 26px; height: 26px; fill: currentColor; pointer-events: none; }
#kreuz .kr0 { left: 56px; top: 0; } #kreuz .kr1 { left: 112px; top: 56px; } #kreuz .kr2 { left: 56px; top: 112px; } #kreuz .kr3 { left: 0; top: 56px; }
#kreuz .kr1 svg { transform: rotate(90deg); } #kreuz .kr2 svg { transform: rotate(180deg); } #kreuz .kr3 svg { transform: rotate(270deg); }
#kreuz .kmitte { position: absolute; left: 58px; top: 58px; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 2px solid #0e0a06; touch-action: none; color: #2a1a08;
  background: radial-gradient(circle at 40% 35%, #fff0b8, #c8a24a 60%, #6a4a1a); box-shadow: 0 3px 6px rgba(5, 10, 8, .45); display: flex; align-items: center; justify-content: center; }
#kreuz .kmitte svg { width: 26px; height: 26px; fill: currentColor; pointer-events: none; }
/* kleiner Drehknopf gegen den Uhrzeigersinn in der Ecke oben links */
#kreuz .kgegen { position: absolute; left: 2px; top: 2px; width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 2px solid #0e0a06; touch-action: none; color: #2a1a08;
  background: radial-gradient(circle at 40% 35%, #f6e2b0, #b8923e 60%, #5a3e16); box-shadow: 0 3px 6px rgba(5, 10, 8, .45); display: flex; align-items: center; justify-content: center; }
#kreuz .kgegen svg { width: 22px; height: 22px; fill: currentColor; pointer-events: none; transform: scaleX(-1); }

/* Übungswahl */
#wahl { position: absolute; inset: 0; z-index: 3; overflow: auto; padding: 16px; border-radius: 12px; background: var(--panel2); scrollbar-width: thin; scrollbar-color: var(--akzent2) rgba(0, 0, 0, .3); }
#wahl::-webkit-scrollbar { width: 8px; } #wahl::-webkit-scrollbar-thumb { background: var(--akzent2); border-radius: 4px; } #wahl::-webkit-scrollbar-track { background: rgba(0, 0, 0, .3); }
#wahl h2 { margin: 0 0 6px; text-align: center; font: 800 24px/1.2 Georgia, serif; color: var(--akzent); }
#wahl p { text-align: center; margin: 0 0 12px; color: var(--mute); }
.wahlgitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.wahlgitter button { min-height: 60px; text-align: left; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--rand); background: rgba(0, 0, 0, .2);
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 8px; color: var(--text); }
.wahlgitter button:hover { border-color: var(--akzent); }
.wahlgitter button.an { background: rgba(242, 196, 106, .3); }
.wahlgitter b { grid-row: span 2; font: 800 24px/1 var(--kopf); color: var(--akzent); align-self: center; text-align: center; }
.wahlgitter span { font-weight: 700; font-size: 14px; }
.wahlgitter em { font-style: normal; font-size: 12px; color: var(--mute); }

/* Bilder in den Regeln */
.kach { display: block; width: 48px; height: 48px; border-radius: 10px; background: center / cover no-repeat; flex: none; border: 1px solid var(--rand); }
.k-quelle { background-image: var(--k-quelle); } .k-schiene { background-image: var(--k-schiene); } .k-kalt { background-image: var(--k-kalt); } .k-lampe { background-image: var(--k-lampe); }
.k-funke0 { background-image: var(--k-funke0); } .k-funke1 { background-image: var(--k-funke1); } .k-funke2 { background-image: var(--k-funke2); }
.k-hand { background-image: var(--k-hand); } .k-ede { background-image: var(--k-ede); } .k-uhr { background-image: var(--k-uhr); }
.regeln .kurz { background: rgba(242, 196, 106, .14); border: 1px solid var(--rand); border-radius: 10px; padding: 8px 12px; }

/* Hochkant: Leiste oben, Schaltbuch als schmale Zeile, Tafel groß, Steuerkreuz darunter */
body.hoch #hud { grid-template-areas: 'logo logo modus modus' 'zeit punkte e1 e2' 'zt zt zt zt' 'kn kn kn kn'; }
body.hoch #schaltbuch { grid-area: zt; min-height: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding: 6px 10px; font-size: 12px; }
body.hoch #schaltbuch > b { margin: 0; font-size: 12.5px; } body.hoch #schaltbuch .zl { height: 20px; } body.hoch #schaltbuch .zl.klein { display: none; }
body.hoch #schaltbuch .balken { width: 70px; flex: none; }
body.hoch #meldung { grid-area: zt; min-height: 0; z-index: 2; pointer-events: none; }
/* hochkant liegt die Meldung auf dem Schaltbuch: solange sie zu sehen ist, tritt das Schaltbuch zurück (keine Schrift unter der Schrift) */
body.hoch #schaltbuch:has(+ #meldung.an) { visibility: hidden; }
body.hoch #knoepfe button { width: 46px; }

/* Flaches Querformat (Handy quer): schmale Leiste, Knöpfe oben, Schaltbuch kurz – die Tafel bekommt den Platz */
@media (max-height: 480px) and (min-aspect-ratio: 1/1) {
  #buehne { grid-template-columns: 176px 1fr; gap: 8px; padding: 8px max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left)); }
  #hud { padding: 6px 8px; gap: 4px; border-radius: 12px; }
  #logo { order: -2; font-size: 17px; letter-spacing: 1px; padding: 0; }
  #modus, #info { display: none; }
  #knoepfe { order: -1; margin: 0 0 2px; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  #knoepfe button { height: 34px; border-radius: 9px; }
  .wert { padding: 1px 6px 2px; }
  .wert span { font-size: 11px; letter-spacing: .5px; }
  .wert b, .wert.klein b { font-size: 16px; }
  #eigen { gap: 4px; }
  #schaltbuch { min-height: 0; padding: 6px 6px 3px; font-size: 11px; }
  #schaltbuch > b, #schaltbuch .zl.klein { display: none; }
  #schaltbuch .zl { height: auto; min-height: 17px; line-height: 1.25; }   /* lange Zeilen umbrechen statt überlappen (844 × 390) */
  #meldung { min-height: 30px; font-size: 11px; }
  /* Startmenü ohne Scrollen (R53, 844 × 390): Untertitel weg, Schild und Abstände knapper */
  .dlg.menue { padding: 10px 14px; }
  .menue > .unter { display: none; }
  .menue .schildkopf { font-size: 30px; margin: 0 0 6px; }
  .menue h3 { margin: 8px 0 4px; }
}
@media (max-height: 860px) and (min-aspect-ratio: 1/1) { #info { display: none; } }
/* Momente-Tafel (assets/css/sgz-momente.css: Endtafel, Pause, Startkarte) in den Farben des Spiels – in jeder Ansicht dunkel */
body { --mo-bg1: #2c3c3a; --mo-bg2: #18221f; --mo-bg3: #0c1210; --mo-rand: #e0b96b; --mo-rand-weich: rgba(242, 196, 106, .32); --mo-akzent: #f2c46a; --mo-akzent2: #b8862a; --mo-hell: #fff2d7; --mo-text: #f4ecd8; --mo-leise: #d8d0ba; --mo-leiser: #a8a28e; --mo-band1: #ffe2a9; --mo-band2: #bf9e5c; --mo-band-t: #180f08; }
/* Runde 2: Punkte fliegen von der Tafel in die Leiste, der Punktezähler blitzt bei Ankunft */
.punktflug { position: fixed; z-index: 60; pointer-events: none; margin: -14px 0 0 -30px; width: 60px; text-align: center; font: 800 20px/28px Georgia, serif; color: #ffe39a;
  text-shadow: 0 2px 3px rgba(10, 6, 2, .8), 0 0 10px rgba(255, 200, 90, .55); transition: transform .6s cubic-bezier(.55, 0, .75, .4), opacity .6s ease-in; }
#wPunkte.blitz b { animation: sstr-blitz .45s ease-out; }
@keyframes sstr-blitz { 0% { color: #fff; text-shadow: 0 0 14px rgba(255, 220, 120, .95); transform: scale(1.18); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .punktflug { transition-duration: .2s; } #wPunkte.blitz b { animation: none; } }
#schaltbuch .zl.auftrag { color: #8a5a08; font-weight: 700; } #schaltbuch .zl.auftrag b { color: #8a5a08; }
#schaltbuch .zl.serie { color: #a8400a; font-weight: 700; } #schaltbuch .zl.serie b { color: #a8400a; }
/* Leiste kompakt (Wunsch Denis 2026-11-30): quer nur so hoch wie ihr Inhalt, mittig neben der Tafel, kein Loch zwischen Schaltbuch und Knöpfen */
body:not(.hoch) #hud { align-self: center; max-height: 100%; }
body:not(.hoch) #knoepfe { margin-top: 4px; }
#logo { font-size: 28px; letter-spacing: 1px; }
@media (max-height: 860px) and (min-aspect-ratio: 1/1) { #logo { font-size: 24px; } }
@media (max-height: 660px) and (min-aspect-ratio: 1/1) {
  body:not(.hoch) #hud { gap: 4px; padding: 8px 10px; } body:not(.hoch) #logo { font-size: 21px; } body:not(.hoch) .wert { padding: 2px 8px 3px; }
  body:not(.hoch) .wert b { font-size: 20px; } body:not(.hoch) .wert.klein b { font-size: 17px; } body:not(.hoch) #knoepfe button { height: 34px; }
  body:not(.hoch) #schaltbuch { padding: 8px 10px 5px; } body:not(.hoch) #schaltbuch .zl { min-height: 20px; }
}
/* Runde 5: Messingplaketten der geschafften Abschnitte im Schaltbuch */
#schaltbuch .zl.plaketten { gap: 4px; font-size: 12.5px; color: #5a3a10; font-weight: 700; flex-wrap: wrap; height: auto; min-height: 22px; white-space: normal; overflow: visible; }
#schaltbuch .plaketten i { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 3px; box-sizing: border-box; border-radius: 9px; font: 800 11px/1 Georgia, serif; font-style: normal; color: #4a2a08;
  background: radial-gradient(circle at 35% 30%, #fff0b8, #d8a84a 55%, #7a5220); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
/* Schwierigkeit des Schichtdiensts unter den Menükacheln (Denis 2026-12-03) */
.stufenwahl { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; grid-column: 1 / -1; order: 9; margin: -2px 0 0; }
/* hochkant: Wahl direkt unter der Schichtdienst-Kachel; Kacheln flach (Symbol links, Wert rechts), damit das Menü ohne Scrollen passt (R53) */
@media (max-width: 700px) {
  .stufenwahl { order: 0; margin: -4px 0 2px; }
  .stufenwahl span { display: none; }   /* steht direkt unter der Schichtdienst-Kachel */
  .menue .modi .modus { display: grid; grid-template-columns: 28px 1fr auto; column-gap: 10px; align-items: center; text-align: left; padding: 9px 12px; }
  .menue .modi .modus svg { grid-row: 1 / 3; width: 26px; height: 26px; margin: 0; }
  .menue .modi .modus b { font-size: 19px; }
  .menue .modi .modus span { grid-column: 2; font-size: 12px; margin-top: 1px; }
  .menue .modi .modus em { grid-column: 3; grid-row: 1 / 3; margin: 0; font-size: 15px; text-align: right; }
}
@media (max-height: 500px) and (min-width: 701px) {
  .menue .modi { margin: 8px 0 4px; gap: 8px; }
  .menue .modi .modus { padding: 8px 10px; }
  .menue .modi .modus svg { width: 22px; height: 22px; margin-bottom: 2px; }
  .menue .modi .modus b { font-size: 19px; }
  .menue .modi .modus em { font-size: 16px; margin-top: 3px; }
}
.stufenwahl span { font: 700 14px/1 var(--kopf); color: var(--text); margin-right: 4px; }
.stufenwahl button { min-width: 84px; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 2px solid rgba(0, 0, 0, .5); background: rgba(20, 16, 12, .88); color: #f3e6c8; font: 800 15px/1 var(--kopf); cursor: pointer; }
.stufenwahl button.an { background: linear-gradient(#ffe48a, #f2b83a 50%, #c47d14); color: #3a1c02; box-shadow: 0 0 0 2px rgba(255, 214, 110, .45); }
.stufenwahl button:hover { filter: brightness(1.12); }
.stufenwahl button:focus-visible { outline: 3px solid #9fd2ff; outline-offset: 2px; }
@media (max-width: 700px), (max-height: 500px) { .stufenwahl button { min-height: 34px; min-width: 76px; font-size: 14px; } }
/* kleine Handys hochkant (360 × 640): Untertitel und Kachel-Beschreibungen weg */
@media (max-width: 700px) and (max-height: 700px) { .menue > .unter, .menue .modi .modus span { display: none; } .menue .schildkopf { font-size: 30px; margin: 0 0 4px; } }
/* Handy quer, niedrige Leiste: Knöpfe vier je Zeile (≥ 40 px), sonst ragte die Leiste mit Zettel/Schaltbuch bis 41 px über (Leisten-Messung 2026-12-03) */
@media (max-height: 460px) and (orientation: landscape) { body:not(.hoch) #hud { padding-left: 8px; padding-right: 8px; } body:not(.hoch) #hud #knoepfe { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; } }
