/* Speedtrapez – Bühne füllt das ganze Fenster (Breite 960–1600 bzw. 540 hochkant, skaliert per transform). Oben die Tafel des Stallmeisters mit Werten,
 * Steuerhinweisen und Knöpfen; darunter die Kuppel (28 × 16 Felder) über die volle Breite und Höhe im bemalten Holzrahmen. Ansichten über data-ansicht.
 * Gesamtbild: #grund = Zirkuskuppel Dresden 1912 (je Ansicht quer/hoch), #rahmen[data-flaeche] = Kuppelausschnitt mit Laufstegen im Manegenrahmen
 * (rot-creme bemaltes Holz, Goldkante, Schatten), Werte als Holztäfelchen mit Messingrand, Steuerkreuz und Sprung-Knopf aus Messing. */
:root { --bg: #10141f; --bg2: #090c14; --text: #f3ead8; --leise: #cfc3aa; --gold: #e8c060; --gold2: #a8802a; --gut: #a8d88a; --warn: #f0a07a; --schatten: rgba(0, 0, 0, .5);
  --holz1: #5a3a22; --holz2: #3a2414; --holzK: #1e1208; --brett-text: #f6ecd6; --brett-leise: #d8c6a2; --glas-o: rgba(18, 20, 34, .84); --glas-u: rgba(10, 12, 22, .9);
  --messing1: #f6dc8a; --messing2: #a8802a; --grund: url(img/gala.webp); --grund-hoch: url(img/gala-hoch.webp); --abdunkeln: rgba(10, 4, 4, .2); }
:root[data-ansicht="probe"] { --bg: #ece2cf; --bg2: #ded2ba; --text: #2e2414; --leise: #5a4a30; --gold: #8a5a12; --gold2: #6a4410; --gut: #3e7d3a; --warn: #a8442a; --schatten: rgba(70, 50, 20, .26);
  --holz1: #e2c8a0; --holz2: #c8a474; --holzK: #8a6a40; --brett-text: #2e2212; --brett-leise: #5a4428; --glas-o: rgba(250, 244, 232, .9); --glas-u: rgba(240, 230, 212, .94);
  --grund: url(img/probe.webp); --grund-hoch: url(img/probe-hoch.webp); --abdunkeln: rgba(255, 250, 238, .06); }
:root[data-ansicht="silvester"] { --bg: #101a34; --bg2: #08101e; --text: #eef3ff; --leise: #b8c6e2; --gold: #e8d07a; --gold2: #8a9ac8;
  --holz1: #34406a; --holz2: #1e2848; --holzK: #0c1228; --brett-text: #eef3ff; --brett-leise: #c2cee8; --glas-o: rgba(14, 20, 44, .86); --glas-u: rgba(8, 12, 30, .92);
  --messing1: #e6ecff; --messing2: #8a9ac8; --grund: url(img/silvester.webp); --grund-hoch: url(img/silvester-hoch.webp); --abdunkeln: rgba(4, 8, 20, .18); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg2); color: var(--text); font: 16px/1.4 Georgia, 'Times New Roman', serif;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
* { scrollbar-width: thin; scrollbar-color: var(--gold2) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: var(--gold2); border-radius: 4px; } ::-webkit-scrollbar-track { background: transparent; }
[hidden] { display: none !important; }
button, select { font: inherit; color: inherit; cursor: pointer; }
.wert b, td:last-child, .endzahl b, .liste li b, .saal > b { font-family: 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', Arial, sans-serif; font-variant-numeric: lining-nums tabular-nums; }

#buehne { position: fixed; left: 0; top: 0; transform-origin: 0 0; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; grid-template-areas: "leiste" "feld";
  gap: 8px; padding: 0 10px 10px; overflow: hidden; background: var(--bg2); }
#grund { position: absolute; inset: 0; z-index: 0; background: var(--grund) center / cover no-repeat; }
#grund::after { content: ''; position: absolute; inset: 0; background: var(--abdunkeln); }
#buehne.hoch #grund { background-image: var(--grund-hoch); }
#buehne > header, #buehne > main, #buehne > .steuer { position: relative; z-index: 1; }
/* Leiste oben: höchstens 64 px (hochkant zweizeilig) */
#leiste { grid-area: leiste; display: flex; align-items: center; gap: 12px; height: 64px; margin: 0 -10px; padding: 0 14px;
  background: linear-gradient(180deg, var(--glas-o), var(--glas-u)); border-bottom: 2px solid var(--messing2); box-shadow: 0 4px 14px var(--schatten); }
#werte { display: flex; gap: 8px; flex: 1 1 auto; min-width: 0; }
#feldbox { grid-area: feld; position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; }
/* Spielfläche: der Kuppelausschnitt im rot-creme bemalten Manegenrahmen aus Holz, Goldkante und Schatten auf die Kuppel */
#rahmen { position: relative; padding: 9px; border-radius: 10px; touch-action: none;
  background: repeating-linear-gradient(90deg, #b8282c 0 26px, #f0e2c2 26px 52px), #b8282c;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .6), 0 3px 0 #4a1a0a, inset 0 0 0 2px #e8c060, inset 0 0 0 4px #6a2a10; }
#rahmen::before { content: ''; position: absolute; inset: 9px; box-shadow: inset 0 3px 10px rgba(0, 0, 0, .65); pointer-events: none; z-index: 1; border-radius: 3px; }
#cv { display: block; }

/* Täfelchen aus Nussbaum mit Messingrand */
.wert, #knoepfe button { position: relative; color: var(--brett-text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .14)), repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 11px), linear-gradient(90deg, var(--holz1), var(--holz2));
  border: 2px solid var(--messing2); box-shadow: 0 3px 8px var(--schatten), inset 0 1px 0 rgba(255, 240, 200, .35); }
#logo, .titel { font-weight: 700; letter-spacing: .04em; line-height: 1; white-space: nowrap; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
#logo { font-size: 24px; color: #fff6e2; flex: none; display: flex; flex-direction: column; justify-content: center; } #logo b, .titel b { color: var(--gold); }
:root[data-ansicht="probe"] #logo { color: #2e2212; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
#modus { font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--leise); text-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; max-width: 220px; }
.wert { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; padding: 2px 12px; border-radius: 8px; height: 50px; min-width: 0; flex: 0 1 auto; }
.wert-nr { flex: 0 1 250px; }
.wert span { font-size: 13px; line-height: 1.2; color: var(--brett-leise); white-space: nowrap; }
.wert b { font-size: 18px; line-height: 1.25; max-width: 100%; display: flex; align-items: center; gap: 6px; white-space: nowrap; min-width: 0; overflow: hidden; }
.wert b em { font-style: normal; font-size: 15px; overflow: hidden; text-overflow: ellipsis; font-family: Georgia, serif; }
.wert b em.gut { color: var(--gut); font-size: 14px; }
.wert.gross b { font-size: 22px; }
.wert.gross span small { font-size: 12px; color: var(--brett-leise); margin-left: 6px; }
.zuletzt { margin-top: 2px !important; margin-bottom: 4px !important; } .zuletzt b { font-variant-numeric: lining-nums tabular-nums; }
.kappen { display: inline-flex; gap: 1px; } .kappe { width: 22px; height: 16px; display: block; }
.zf { font-style: normal; font-variant-numeric: lining-nums tabular-nums; }
/* Requisiten-Fortschritt in der Leiste */
.wert-req { position: relative; }
.wert-req .balken { position: absolute; left: 10px; right: 10px; bottom: 4px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.wert-req .balken i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--messing2), var(--messing1)); transition: width .3s; }
/* Sterne je Nummer (SVG) */
.sterne { display: inline-flex; gap: 2px; vertical-align: -3px; }
.stern { width: 18px; height: 18px; fill: #ffd24a; stroke: #8a5a10; stroke-width: 1.2; }
.stern.leer { fill: rgba(0, 0, 0, .25); stroke: var(--gold2); }
#bann .sterne { margin-right: 6px; } .saal .sterne { margin-left: 4px; }
#steuer-r { flex-direction: column; gap: 8px; }
.einst { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; align-items: center; margin-top: 12px; font-size: 15px; }
.einst label { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding-left: 34px; cursor: pointer; }
.einst input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.einst label::before { content: ''; position: absolute; left: 0; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); border: 2px solid var(--gold);
  border-radius: 6px; background: var(--bg2); box-sizing: border-box; }
.einst label:has(input:checked)::before { background: radial-gradient(circle, var(--gold) 45%, var(--bg2) 50%); }
.einst label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

#knoepfe { display: flex; gap: 6px; justify-content: flex-end; flex: none; margin-left: auto; }
#knoepfe button { width: 46px; height: 46px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0; }
#knoepfe button svg, .reihe button svg, .modus svg { width: 22px; height: 22px; }
#tasten { flex: none; font-size: 14px; line-height: 1.45; color: var(--text); white-space: nowrap; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
#tasten p { margin: 0; } #tasten kbd { font-size: 13px; min-width: 20px; padding: 0 4px; margin-right: 1px; background: rgba(255, 240, 200, .14); border-color: var(--messing2); }
#buehne.schmal #tasten { display: none; }
kbd { display: inline-block; min-width: 22px; padding: 1px 5px; margin-right: 3px; border-radius: 5px; background: rgba(0, 0, 0, .3); border: 1px solid rgba(0, 0, 0, .4); font: 14px/1.3 Georgia, serif; text-align: center; }
:root[data-ansicht="probe"] kbd { background: rgba(255, 255, 255, .45); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
td { padding: 3px 0; } td:last-child { text-align: right; white-space: nowrap; }
tr.sum td { border-top: 1px solid currentColor; font-weight: 700; padding-top: 5px; }
.klein { font-size: 14px; opacity: .9; }

/* Steuerkreuz und Sprung-Knopf aus Messing (Finger) */
.steuer { display: none; touch-action: none; }
/* Finger quer: Steuerkreuz links, Sprung-Knopf rechts neben der Kuppel */
#buehne.finger { grid-template-columns: auto 1fr auto; grid-template-areas: "leiste leiste leiste" "l feld r"; }
#steuer-l { grid-area: l; } #steuer-r { grid-area: r; }
#buehne.finger .steuer { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; }
#buehne.finger #tasten { display: none; }
.kreuz { position: relative; width: 190px; height: 190px; flex: none; }
.kreuz button, .sprungk button { position: absolute; border-radius: 14px; border: 2px solid #5a3a08; color: #2a1a04; padding: 0; touch-action: none;
  background: radial-gradient(circle at 35% 30%, #fff3c0, var(--messing1) 30%, var(--messing2)); box-shadow: 0 4px 0 #5a3a08, 0 6px 12px var(--schatten); }
.kreuz button { width: 66px; height: 66px; }
.kreuz .t-hoch { left: 62px; top: 0; } .kreuz .t-runter { left: 62px; bottom: 0; } .kreuz .t-links { left: 0; top: 62px; } .kreuz .t-rechts { right: 0; top: 62px; }
.kreuz button i { pointer-events: none; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border: 13px solid transparent; transform: translate(-50%, -50%); }
.kreuz .t-hoch i { border-bottom: 18px solid #3a2406; margin-top: -8px; } .kreuz .t-runter i { border-top: 18px solid #3a2406; margin-top: 8px; }
.kreuz .t-links i { border-right: 18px solid #3a2406; margin-left: -8px; } .kreuz .t-rechts i { border-left: 18px solid #3a2406; margin-left: 8px; }
.sprungk { position: relative; display: flex; }
.sprungk button { position: static; width: 132px; height: 132px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.sprungk button b { font-size: 20px; pointer-events: none; }
.steuer button.an { transform: translateY(3px); box-shadow: 0 1px 0 #5a3a08, 0 2px 6px var(--schatten); filter: brightness(1.12); }

/* Ansage als Messingschild */
#bann { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: min(460px, calc(100% - 24px)); opacity: .96; padding: 10px 14px; text-align: center; border-radius: 10px; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, #fbf3dc, #eadcb4); color: #2e2410; font-size: 16px; line-height: 1.35;
  box-shadow: 0 6px 18px var(--schatten), inset 0 0 0 3px #fbf3dc, inset 0 0 0 5px #a8802a; border: 1px solid #6a4a10; }
#bann b { display: block; font-size: 19px; color: #6a1e1a; margin-bottom: 3px; }
#bann em { font-style: normal; font-weight: 700; color: #8a5a12; }
#bann.neu { animation: bannEin .45s ease-out; }
@keyframes bannEin { 0% { transform: translate(-50%, -6px); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateX(-50%); } }
.wert.blink { animation: blinkRot .9s ease-out; }
@keyframes blinkRot { 0%, 40% { background: #8a2a1e; border-color: #e2603a; color: #fff6e8; } 100% { } }
.wert.blink span, .wert.blink em { color: inherit; }
#hinweis { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px;
  background: rgba(20, 16, 10, .84); color: #fbf1da; z-index: 4; white-space: nowrap; }
#hinweis button { min-height: 44px; padding: 6px 12px; border-radius: 9px; border: 1px solid rgba(226, 180, 79, .5); background: #3a2e18; color: #fbf1da; }
#toast { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 16px; border-radius: 10px; background: var(--glas-u); border: 1px solid var(--gold2); z-index: 9; }

#ov { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(6, 6, 12, .42); }
:root[data-ansicht="probe"] #ov { background: rgba(60, 50, 30, .25); }
.kasten { position: relative; width: min(660px, 100%); max-height: 100%; overflow: auto; padding: 22px 26px; border-radius: 14px; color: var(--text);
  background: linear-gradient(180deg, var(--glas-o), var(--glas-u)); border: 2px solid var(--gold2); box-shadow: 0 16px 40px var(--schatten); }
.kasten.mitte { width: min(520px, 100%); text-align: center; }
.kasten h2 { margin: 0 0 10px; font-size: 26px; color: var(--gold); } .kasten h3 { margin: 14px 0 6px; font-size: 18px; color: var(--gold); }
.kasten p { margin: 0 0 10px; }
.reihe { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.reihe button, #ov .ansichten button, .saal, .bau-werke button, .bau-aus button, .bau-zeile button, .filter button, .trikots button, .pk-nr { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 16px; border-radius: 10px; color: var(--brett-text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .14)), linear-gradient(90deg, var(--holz1), var(--holz2)); border: 2px solid var(--messing2); box-shadow: 0 2px 6px var(--schatten); }
.reihe button.haupt { background: radial-gradient(circle at 35% 30%, #fff3c0, var(--messing1) 30%, var(--messing2)); color: #2a1a04; border-color: #5a3a08; font-weight: 700; }
.menue .titel { font-size: 50px; text-align: center; margin-bottom: 6px; color: var(--text); }
.menue .unter { text-align: center; color: var(--leise); }
.modi { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; }
.modus { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 16px; min-height: 64px; border-radius: 12px; color: var(--brett-text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .14)), repeating-linear-gradient(90deg, rgba(0, 0, 0, .06) 0 2px, transparent 2px 11px), linear-gradient(90deg, var(--holz1), var(--holz2));
  border: 2px solid var(--messing2); box-shadow: 0 3px 8px var(--schatten); }
.modus .mi { width: 42px; height: 42px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #2a1a04;
  background: radial-gradient(circle at 35% 30%, #fff3c0, var(--messing1) 30%, var(--messing2)); }
.modus b { display: block; font-size: 19px; } .modus small { display: block; font-size: 14px; color: var(--brett-leise); }
.saalliste { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.saal { text-align: left; } .saal > b { font-size: 22px; color: var(--messing1); width: 28px; flex: none; text-align: center; }
.saal span { display: block; font-size: 17px; } .saal small { display: block; font-size: 14px; color: var(--brett-leise); }
.ansichten { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.ansichten > span { font-size: 15px; color: var(--leise); width: 100%; text-align: center; }
#ov .ansichten button { flex-direction: column; gap: 4px; padding: 6px 8px; font-size: 14px; min-width: 120px; }
#ov .ansichten button canvas { width: 96px; height: 48px; border-radius: 6px; display: block; }
#ov .ansichten button.an { box-shadow: 0 0 0 3px var(--messing1); }
.regeln p { font-size: 15px; }
.eintraege { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.eintrag { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .2); border: 1px solid var(--gold2); }
:root[data-ansicht="probe"] .eintrag { background: rgba(255, 255, 255, .45); }
.eintrag canvas { flex: none; width: 64px; height: 64px; border-radius: 8px; background: rgba(120, 100, 80, .3); }
.eintrag b { font-size: 16px; } .eintrag p { margin: 2px 0; font-size: 14px; } .eintrag small { font-size: 14px; color: var(--gold); }
.ende .grund { text-align: center; margin-bottom: 4px; }
.endzahl { text-align: center; margin: 4px 0 8px; } .endzahl b { display: block; font-size: 46px; line-height: 1.1; } .endzahl span { opacity: .8; }
.ende .gut { color: var(--gut); text-align: center; } .warn { color: var(--warn); text-align: center; } .ende > .klein { text-align: center; }
.spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wellen td { font-size: 14px; }
.liste ol { margin: 0; padding-left: 26px; } .liste li { padding: 2px 0; } .liste li span { display: inline-block; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.liste li b { float: right; }

/* schmale Bühne (unter 1420 Punkten): Leiste enger */
#buehne.schmal #leiste { gap: 8px; padding: 0 10px; }
#buehne.schmal #logo { font-size: 20px; } #buehne.schmal #modus { max-width: 160px; }
#buehne.schmal #werte { gap: 6px; }
#buehne.schmal .wert { padding: 2px 9px; flex: 0 0 auto; } #buehne.schmal .wert-nr { flex: 0 1 170px; }
#buehne.schmal .wert-tempo { display: none; }
#buehne.schmal #knoepfe { gap: 5px; } #buehne.schmal #knoepfe button { width: 40px; }
#buehne.schmal .wert.gross span small { display: none; }
#buehne.klein #bann { width: min(440px, calc(100% - 20px)); font-size: 14px; padding: 7px 12px; top: 8px; } #buehne.klein #bann b { font-size: 16px; }
/* Handy quer: kleinere Steuerteile */
#buehne.klein .kreuz { width: 156px; height: 156px; } #buehne.klein .kreuz button { width: 54px; height: 54px; }
#buehne.klein .kreuz .t-hoch, #buehne.klein .kreuz .t-runter { left: 51px; } #buehne.klein .kreuz .t-links, #buehne.klein .kreuz .t-rechts { top: 51px; }
#buehne.klein .sprungk button { width: 108px; height: 108px; }

/* Hochkant: Leiste zweizeilig, Kuppel über die volle Breite, darunter Steuerkreuz und Sprung-Knopf */
#buehne.hoch { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "leiste leiste" "feld feld" "l r"; padding: 0 8px 10px; }
#buehne.hoch #leiste { height: auto; flex-wrap: wrap; gap: 6px 8px; padding: 6px 10px 8px; }
#buehne.hoch #werte { order: 3; flex-basis: 100%; gap: 6px; }
#buehne.hoch .wert { flex: 1 1 0; padding: 2px 8px; height: 46px; } #buehne.hoch .wert-nr { flex: 2 1 0; }
#buehne.hoch .wert-tempo, #buehne.hoch .wert-zeit { display: none; }
#buehne.hoch .wert.gross span small { display: none; }
#buehne.hoch .steuer { align-items: center; padding: 0 4px; } #buehne.hoch #steuer-l { justify-content: flex-start; } #buehne.hoch #steuer-r { justify-content: flex-end; }
#buehne.hoch .kreuz { width: 210px; height: 210px; } #buehne.hoch .kreuz button { width: 72px; height: 72px; }
#buehne.hoch .kreuz .t-hoch, #buehne.hoch .kreuz .t-runter { left: 69px; } #buehne.hoch .kreuz .t-links, #buehne.hoch .kreuz .t-rechts { top: 69px; }
#buehne.hoch .sprungk button { width: 150px; height: 150px; } #buehne.hoch .sprungk button b { font-size: 22px; }
#buehne.hoch #knoepfe button { width: 52px; height: 48px; }
#buehne.hoch .kasten { width: 100%; } #buehne.hoch .eintraege, #buehne.hoch .spalten, #buehne.hoch .saalliste { grid-template-columns: 1fr; }
#buehne.hoch .reihe button { min-height: 64px; font-size: 17px; }
#buehne.hoch .modus, #buehne.hoch .saal { min-height: 72px; } #buehne.hoch .menue .titel { font-size: 44px; }
#buehne.hoch #hinweis button { min-height: 62px; }
#buehne.hoch .einst label { min-height: 62px; }
@media (pointer: coarse) { #tasten { display: none; } }

/* Schließen-× oben rechts in jedem Fenster (bleibt beim Scrollen stehen) */
.kasten > .ov-zu { position: sticky; top: -10px; float: right; z-index: 3; width: 44px; height: 44px; margin: -10px -14px 0 10px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid var(--messing2); background: linear-gradient(180deg, var(--holz1), var(--holz2)); color: var(--brett-text); box-shadow: 0 2px 8px var(--schatten); cursor: pointer; padding: 0; }
.kasten > .ov-zu svg { width: 20px; height: 20px; }
#buehne.hoch .kasten > .ov-zu { width: 66px; height: 66px; } #buehne.hoch .kasten > .ov-zu svg { width: 26px; height: 26px; }

/* Endtafel als Programmzettel */
.kasten.zettel { background: linear-gradient(180deg, #f4ecd8, #e6d8b6); color: #2e2614; border: 1px solid #b89a5a; box-shadow: 0 16px 40px var(--schatten), inset 0 0 40px rgba(150, 110, 40, .18); }
.zettel h2, .zettel h3 { color: #8a1a20; }
.zettel .grund, .zettel .endzahl span, .zettel .klein { color: #6b5636; }
.zettel .endzahl b { color: #6a1e1a; }
.zettel .gut { color: #2c6528; } .zettel .warn { color: #a8442a; }
.zettel tr.sum td { color: #22386a; border-top-color: #b89a5a; }
.zettel .reihe button:not(.haupt) { background: #efe2c2; color: #2e2614; border-color: #b89a5a; }
.zettel .ov-zu { background: #efe2c2; color: #2e2614; border-color: #b89a5a; }
.zettel-kopf { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #7a6040; border-bottom: 1px dashed #b89a5a; padding-bottom: 6px; margin-bottom: 8px; }
.stempel { position: absolute; right: 30px; top: 58px; padding: 4px 10px; border: 3px double #8a1a20; border-radius: 8px; color: #8a1a20; font-weight: 700; font-size: 15px;
  letter-spacing: .08em; text-transform: uppercase; transform: rotate(-10deg); opacity: .8; pointer-events: none; }
#buehne.hoch .stempel { right: 20px; top: 66px; font-size: 13px; }
@media (hover: hover) { .reihe button:hover, .modus:hover, .saal:hover, #knoepfe button:hover { filter: brightness(1.1); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } #bann.neu { animation: none; } }
/* Tempo-Wahl im Menü */
.tempi { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 4px 0 12px; }
.tempi > span { width: 100%; text-align: center; font-size: 15px; color: var(--leise); }
.tempi button { display: flex; flex-direction: column; align-items: center; min-width: 120px; min-height: 52px; padding: 6px 10px; border-radius: 10px; color: var(--brett-text);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(0, 0, 0, .14)), linear-gradient(90deg, var(--holz1), var(--holz2)); border: 2px solid var(--messing2); box-shadow: 0 2px 6px var(--schatten); }
.tempi button b { font-size: 15px; } .tempi button small { font-size: 13px; color: var(--brett-leise); }
.tempi button.an { box-shadow: 0 0 0 3px var(--messing1); }
.wert-tempo b em { font-size: 13px; color: var(--brett-leise); }
/* Info beim Überfahren / Langdruck */
#info { position: absolute; z-index: 7; width: 290px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.4; pointer-events: none;
  background: linear-gradient(180deg, #fbf3dc, #eadcb4); color: #2e2410; border: 1px solid #6a4a10; box-shadow: 0 6px 18px var(--schatten); }
#info b { display: block; color: #8a1a20; font-size: 16px; margin-bottom: 2px; }
#buehne.hoch .tempi button { min-width: 46%; min-height: 62px; }
/* Hochkant: Tippziele und Schrift nach der Skalierung (Faktor ~0,69) groß genug */
#buehne.hoch #knoepfe button { width: 62px; height: 60px; }
#buehne.hoch .wert { height: 52px; } #buehne.hoch .wert span { font-size: 15px; }
#buehne.hoch .tempi button small { font-size: 15px; } #buehne.hoch .tempi button b { font-size: 17px; }
/* Der Ort lebt: ein Scheinwerfer schwenkt langsam über die Kuppel (bei reduzierter Bewegung aus) */
#grund::before { content: ''; position: absolute; inset: -10% -30%; z-index: 1; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(ellipse 18% 70% at 50% 0%, rgba(255, 236, 180, .22), rgba(255, 236, 180, 0) 70%);
  animation: schwenk 16s ease-in-out infinite alternate; }
:root[data-ansicht="probe"] #grund::before { background: radial-gradient(ellipse 18% 70% at 50% 0%, rgba(255, 255, 240, .16), rgba(255, 255, 240, 0) 70%); }
:root[data-ansicht="silvester"] #grund::before { background: radial-gradient(ellipse 18% 70% at 50% 0%, rgba(190, 215, 255, .2), rgba(190, 215, 255, 0) 70%); }
@keyframes schwenk { from { transform: translateX(-28%) rotate(8deg); } to { transform: translateX(28%) rotate(-8deg); } }
@media (prefers-reduced-motion: reduce) { #grund::before { animation: none; } }
.tagnr { text-align: center; margin: 2px 0 4px !important; }
.zuletzt { text-align: center; }
/* Einstieg ab Programm II/III: zwei kleine Knöpfe nebeneinander, gesperrt sichtbar gestrichelt mit Grund */
.modi.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: -4px; }
.modus.klein { min-height: 56px; padding: 8px 12px; } .modus.klein b { font-size: 16px; } .modus.klein .mi { width: 34px; height: 34px; }
.modus.gesperrt { opacity: .5; border-style: dashed; cursor: not-allowed; }
#buehne.hoch .modi.zwei { grid-template-columns: 1fr; }
/* Pause im Foyer */
.foyer table { margin: 6px auto 4px; max-width: 380px; text-align: left; }
/* Kappe fliegt aus der Lebensanzeige */
.kappe-fliegt { position: absolute; z-index: 9; width: 26px; height: 20px; pointer-events: none; animation: kappeWeg 1.2s ease-in forwards; }
.kappe-fliegt svg { width: 100%; height: 100%; display: block; }
@keyframes kappeWeg { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 35% { transform: translate(40px, -30px) rotate(160deg); } 100% { transform: translate(90px, 260px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .kappe-fliegt { display: none; } }
/* schmale Bühne: das Namensfeld der Nummer nimmt den freien Platz der Leiste */
#buehne.schmal .wert-nr { flex: 1 1 auto; min-width: 0; } #buehne.schmal .wert-nr b em { font-size: 14px; }
.saalliste .progkopf { grid-column: 1 / -1; margin: 10px 0 0; font-size: 17px; }
/* Publikum in den Rängen: Silhouetten unten im Bild, jubeln (Arme hoch) oder erschrecken (Hände über dem Kopf) */
#publikum { position: absolute; left: 0; right: 0; bottom: 0; height: 9%; z-index: 0; pointer-events: none; opacity: .78; }
#publikum svg { width: 100%; height: 100%; display: block; }
#publikum .pk { transform-box: fill-box; transform-origin: 50% 100%; }
#publikum .arm { opacity: 0; transition: opacity .2s; }
#publikum.jubel .arm, #publikum.oje .arm { opacity: 1; }
#publikum.jubel .pk { animation: pubJubel .45s ease-in-out var(--d) 3 alternate; }
#publikum.oje .pk { animation: pubOje .6s ease-out var(--d) 1; }
@keyframes pubJubel { to { transform: translateY(-14%); } }
@keyframes pubOje { 30% { transform: translateY(-6%) scaleX(.94); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { #publikum .pk { animation: none !important; } }
/* Bonusziele */
.ziele { display: inline-flex; gap: 4px; margin: 0 4px; vertical-align: middle; }
.ziel { font-style: normal; font-size: 12px; padding: 1px 6px; border-radius: 8px; background: rgba(232, 192, 96, .22); border: 1px solid var(--gold2); color: var(--messing1); }
.ziel-flink { background: rgba(120, 180, 255, .2); } .ziel-schatz { background: rgba(255, 210, 74, .28); } .ziel-leicht { background: rgba(140, 210, 140, .22); }
/* Probe-Liste: Vorschau und Filter */
.saal canvas.mini { width: 84px; height: 54px; flex: none; border-radius: 4px; border: 1px solid var(--gold2); margin-right: 6px; }
.filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.filter button { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.filter button.an { outline: 2px solid var(--gold); }
/* Fortsetzen-Karte */
#fortsetzen .modus { width: 100%; margin-bottom: 8px; border-color: var(--gold); }
/* Zirkusplakat */
.kasten.plakat { width: min(920px, 100%); }
.plakat-kopf { text-align: center; padding: 10px; margin-bottom: 6px; border: 3px double var(--gold2); border-radius: 8px;
  background: repeating-linear-gradient(90deg, rgba(184, 50, 44, .25) 0 26px, rgba(239, 220, 180, .1) 26px 52px); }
.plakat-kopf span { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--leise); }
.plakat-kopf h2 { margin: 4px 0; font-size: 30px; color: var(--gold); } .plakat-kopf p { margin: 0; font-size: 14px; }
.pk-reihe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pk-nr { display: flex; flex-direction: column; align-items: center; min-height: 92px; padding: 6px 4px; text-align: center; opacity: .72; }
.pk-nr.da { opacity: 1; } .pk-nr > b { font-size: 20px; color: var(--messing1); }
.pk-nr small { font-size: 12px; line-height: 1.2; } .pk-nr em { font-style: normal; font-size: 12px; } .pk-nr em .ziel { padding: 0 4px; margin: 0 1px; }
.pk-nr .offen { color: var(--brett-leise); }
.trikots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.trikots button { display: flex; flex-direction: column; align-items: center; min-height: 44px; padding: 6px; }
.trikots button.an { outline: 2px solid var(--gold); } .trikots button[disabled] { opacity: .5; }
.trikots small { font-size: 12px; color: var(--brett-leise); }
#buehne.hoch .pk-reihe { grid-template-columns: repeat(3, 1fr); } #buehne.hoch .trikots { grid-template-columns: 1fr 1fr; }
/* Sprung-Knopf: Ring zeigt, ob es ein Hüpfer (kurz getippt) oder der weite Sprung (gehalten) wird */
.k-sprung { --halt: 0; }
.k-sprung::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .15s;
  background: conic-gradient(var(--gold) calc(var(--halt) * 360deg), rgba(0, 0, 0, .25) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px)); }
.k-sprung[data-sprung="halt"]::after, .k-sprung[data-sprung="weit"]::after, .k-sprung[data-sprung="kurz"]::after { opacity: 1; }
.k-sprung[data-sprung="kurz"]::after { background: conic-gradient(var(--gut) 360deg, transparent 0); }
.k-sprung[data-sprung="kurz"] b::after { content: ' kurz'; font-size: 13px; display: block; }
.k-sprung[data-sprung="weit"] b::after { content: ' weit'; font-size: 13px; display: block; }
/* Manegen-Baukasten */
.kasten.baukasten { width: min(860px, 100%); }
.bau-werke { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0; }
.bau-werke button { min-height: 44px; padding: 6px 10px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.bau-werke button i { width: 16px; height: 16px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .5); }
.bau-werke button.an { outline: 2px solid var(--gold); }
#bau-feld { display: block; width: 100%; height: auto; border: 2px solid var(--messing2); border-radius: 6px; cursor: crosshair; touch-action: none; }
.bau-zeile { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 10px; font-size: 15px; }
.bau-zeile label { display: inline-flex; align-items: center; gap: 8px; }
.bau-zeile input, .bau-zeile select { min-height: 40px; font: inherit; font-size: 15px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--gold2); background: rgba(255, 255, 255, .9); color: #2a1a04; max-width: 260px; }
.bau-zeile button { min-height: 44px; }
#bau-status { text-align: center; min-height: 22px; }
.gut { color: var(--gut); } .warn { color: var(--warn); }
/* Kleinere Kulissen am Handy (halbe Auflösung) */
:root.kleinbild:not([data-ansicht="probe"]):not([data-ansicht="silvester"]) { --grund: url(img/gala-klein.webp); --grund-hoch: url(img/gala-hoch-klein.webp); }
:root.kleinbild[data-ansicht="probe"] { --grund: url(img/probe-klein.webp); --grund-hoch: url(img/probe-hoch-klein.webp); }
:root.kleinbild[data-ansicht="silvester"] { --grund: url(img/silvester-klein.webp); --grund-hoch: url(img/silvester-hoch-klein.webp); }
.bau-aus { display: flex; gap: 6px; justify-content: center; margin: 4px 0 8px; }
.bau-aus button { min-height: 44px; padding: 6px 10px; font-size: 14px; } .bau-aus button.an { outline: 2px solid var(--gold); }
