/* CrowdWork: Live-Bausteine. Diagramme (.d-*), Teilnahme (.tn-*), Leinwand
   (.leinwand, .lw-*), Steuerung (.st-*) und Konsole (.ko-*).
   Farben der Diagramme über --d-*: auf normalen Seiten die Rollen-Token,
   auf der Leinwand die Leinwand-Farben des Events (backend/app/marke.py). */

:root {
  --d-grund: var(--bg-1);
  --d-balken: var(--bg-accent);
  --d-auf-balken: var(--fg-on-accent);
  --d-schrift: var(--fg-1);
  --d-leise: var(--fg-2);
  --d-linie: var(--border-2);
  --d-flaeche: var(--bg-3);
  --d-akzent: var(--fg-accent);
  --d-gut: var(--fg-success);
}
.f1 { --f: var(--d-balken); }
.f2 { --f: color-mix(in srgb, var(--d-schrift) 72%, var(--d-grund)); }
.f3 { --f: color-mix(in srgb, var(--d-balken) 52%, var(--d-grund)); }
.f4 { --f: color-mix(in srgb, var(--d-schrift) 40%, var(--d-grund)); }
.f5 { --f: color-mix(in srgb, var(--d-balken) 28%, var(--d-grund)); }
.f6 { --f: color-mix(in srgb, var(--d-schrift) 20%, var(--d-grund)); }

/* ====================== Diagramme ====================== */
.diagramm { position: relative; color: var(--d-schrift); font-size: 1em; }
.diagramm svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.d-leer { color: var(--d-leise); text-align: center; padding: 1.5em 0; }

/* Balken */
.d-balken { display: flex; flex-direction: column; gap: .85em; }
.d-zeile { transition: opacity var(--duration-base) var(--ease-standard); }
.d-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; margin-bottom: .35em; }
.d-label { font-weight: 600; min-width: 0; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: .4em; }
.d-wert { white-space: nowrap; font-variant-numeric: tabular-nums; }
.d-wert b { font-weight: 700; }
.d-wert small { color: var(--d-leise); font-size: .8em; margin-left: .35em; }
.d-spur { height: .9em; background: var(--d-flaeche); border-radius: 2px; overflow: hidden; }
.d-fuellung { height: 100%; width: 0; background: var(--d-balken); border-radius: 2px; transition: width .6s var(--ease-standard); }
.d-haken { display: none; width: 1.1em; height: 1.1em; color: var(--d-gut); flex: none; }
.d-haken svg { width: 100%; height: 100%; stroke-width: 3; }
.d-zeile.d-richtig .d-haken { display: inline-block; }
.d-zeile.d-richtig .d-fuellung { background: var(--d-gut); }
.d-zeile.d-falsch { opacity: .42; }

/* Säulen */
.d-saeulen { display: flex; align-items: stretch; justify-content: center; gap: 1.2em; height: 100%; min-height: 12em; }
.d-saeule { flex: 1 1 0; max-width: 9em; display: flex; flex-direction: column; align-items: center; gap: .4em; min-width: 0; }
.d-saeule-spur { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--d-flaeche); border-radius: 2px; }
.d-saeule-fuellung { width: 100%; height: 0; background: var(--d-balken); border-radius: 2px; transition: height .6s var(--ease-standard); }
.d-saeule .d-label { text-align: center; font-size: .9em; }

/* Ring */
.d-ring { display: flex; align-items: center; justify-content: center; gap: 2em; flex-wrap: wrap; }
.d-ring-svg { width: min(16em, 60%); aspect-ratio: 1; }
.d-ring-grund { fill: none; stroke: var(--d-flaeche) !important; stroke-width: 6 !important; }
.d-ring-teil { fill: none; stroke: var(--f) !important; stroke-width: 6 !important; stroke-linecap: butt !important;
  transition: stroke-dasharray .6s var(--ease-standard), stroke-dashoffset .6s var(--ease-standard); }
.d-ring-zahl { fill: var(--d-schrift) !important; stroke: none !important; font-size: 7px; font-weight: 700; text-anchor: middle; font-family: var(--font-sans); }
.d-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5em; }
.d-legende li { display: grid; grid-template-columns: .9em minmax(0, 1fr) auto; gap: .6em; align-items: center; }
.d-legende i, .d-raster i { width: .9em; height: .9em; border-radius: 2px; background: var(--f); display: inline-block; }
.d-legende b { font-variant-numeric: tabular-nums; }

/* Ranking */
.d-ranking { display: flex; flex-direction: column; gap: .7em; }
.d-rang { display: grid; grid-template-columns: 2em minmax(0, 1fr) 7.5em; gap: .8em; align-items: center;
  transition: transform .5s var(--ease-standard); }
.d-platz { font-weight: 800; font-size: 1.3em; color: var(--d-akzent); text-align: center; font-variant-numeric: tabular-nums; }
.d-rang-text .d-label { display: block; margin-bottom: .3em; }
.d-rang .d-wert { color: var(--d-leise); font-size: .85em; text-align: right; }

/* Skalen */
.d-skala { display: flex; flex-direction: column; gap: 1.2em; }
.d-skala-spur { position: relative; height: 2.2em; border-bottom: 2px solid var(--d-linie); }
.d-verteilung { position: absolute; inset: 0 0 2px; display: flex; align-items: flex-end; gap: 4%; }
.d-verteilung span { flex: 1; background: color-mix(in srgb, var(--d-balken) 18%, var(--d-grund)); border-radius: 2px 2px 0 0; min-height: 2px; transition: height .6s var(--ease-standard); }
.d-marke { position: absolute; bottom: -.55em; width: 1.1em; height: 1.1em; margin-left: -.55em; border-radius: 50%;
  background: var(--d-balken); border: 3px solid var(--d-grund); transition: left .6s var(--ease-standard); }
.d-skala-enden { display: flex; justify-content: space-between; color: var(--d-leise); font-size: .85em; }

/* Bewertung */
.d-bewertung { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2.5em; align-items: center; }
.d-schnitt { display: flex; flex-direction: column; align-items: center; gap: .3em; }
.d-schnitt-zahl { font-size: 4em; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.d-sterne { position: relative; display: inline-flex; }
.d-sterne span { display: inline-flex; gap: .15em; }
.d-sterne svg { width: 1.6em; height: 1.6em; }
.d-sterne-leer svg { color: var(--d-linie); }
.d-sterne-voll { position: absolute; inset: 0; transition: clip-path .6s var(--ease-standard); }
.d-sterne-voll svg { color: var(--d-balken); fill: var(--d-balken); }
.d-verteilung-liste { display: flex; flex-direction: column; gap: .4em; }
.d-vz { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) 2.6em; gap: .6em; align-items: center; }
.d-vz .kennung { font-size: .9em; }
.d-vz .kennung:last-child { text-align: right; color: var(--d-leise); }
@media (max-width: 520px) { .d-bewertung { grid-template-columns: 1fr; gap: 1.2em; } }

/* Wortwolke */
.d-wolke { position: relative; width: 100%; height: 100%; min-height: 14em; overflow: hidden; }
.d-wort { position: absolute; left: 0; top: 0; font-weight: 700; line-height: 1.1; white-space: nowrap; color: var(--d-schrift);
  transition: transform .6s var(--ease-standard), font-size .6s var(--ease-standard), opacity .4s var(--ease-standard); }
.d-wort.stark { color: var(--d-akzent); }
.d-wort.leise { color: var(--d-leise); }
.d-wort.neu { opacity: 0; }

/* Offene Antworten */
.d-offen-blasen { display: flex; flex-wrap: wrap; gap: .7em; align-content: flex-start; }
.d-offen-wand { columns: 3 14em; column-gap: .8em; }
.d-offen-wand .d-karte { break-inside: avoid; margin-bottom: .8em; }
.d-karte { background: var(--d-flaeche); color: var(--d-schrift); padding: .7em .9em; border-radius: 4px; max-width: 26em;
  border-left: 3px solid var(--d-balken); overflow-wrap: anywhere;
  transition: opacity .4s var(--ease-standard), transform .4s var(--ease-standard); }
.d-karte.neu { opacity: 0; transform: translateY(6px) scale(.98); }
.d-offen-einzeln { display: flex; align-items: center; justify-content: center; min-height: 10em; }
.d-einzeln { margin: 0; font-size: 2em; font-weight: 700; text-align: center; max-width: 28em; animation: d-ein .5s var(--ease-standard); }
@keyframes d-ein { from { opacity: 0; transform: translateY(8px); } }

/* 2x2-Raster */
.d-raster { display: flex; justify-content: center; }
.d-raster-feld { position: relative; width: min(100%, 30em); aspect-ratio: 1; margin: 0 0 2em 2em;
  border-left: 2px solid var(--d-linie); border-bottom: 2px solid var(--d-linie);
  background: linear-gradient(var(--d-linie), var(--d-linie)) center / 1px 100% no-repeat,
              linear-gradient(var(--d-linie), var(--d-linie)) center / 100% 1px no-repeat; }
.d-achse { position: absolute; color: var(--d-leise); font-size: .85em; display: inline-flex; align-items: center; gap: .3em; white-space: nowrap; }
.d-achse svg { width: 1em; height: 1em; }
.d-achse-x { right: 0; bottom: -1.9em; }
.d-achse-y { left: -1.9em; top: 0; transform-origin: left top; transform: rotate(-90deg) translateX(-100%); }
.d-punkt { position: absolute; width: 1em; height: 1em; transform: translate(-50%, 50%);
  transition: left .6s var(--ease-standard), bottom .6s var(--ease-standard); }
.d-punkt i { display: block; width: 1em; height: 1em; border-radius: 50%; border: 2px solid var(--d-grund); }
.d-punkt span { position: absolute; left: 1.4em; top: 50%; transform: translateY(-50%); font-size: .85em; font-weight: 600; white-space: nowrap; }

/* Zahl schätzen */
.d-histo { position: relative; height: 10em; display: flex; align-items: flex-end; gap: 2px; border-bottom: 2px solid var(--d-linie); }
.d-histo span { flex: 1; background: var(--d-balken); opacity: .8; min-height: 1px; border-radius: 2px 2px 0 0; transition: height .6s var(--ease-standard); }
.d-linie { position: absolute; top: -.4em; bottom: 0; width: 2px; background: var(--d-schrift); }
.d-linie-richtig { background: var(--d-gut); width: 3px; }
.d-histo-achse { display: flex; justify-content: space-between; color: var(--d-leise); margin-top: .3em; }
.d-zahl-werte { display: flex; gap: 2em; flex-wrap: wrap; margin-top: .8em; }
.d-zahl-werte b { font-size: 1.4em; margin-left: .3em; }
.d-richtig-wert b { color: var(--d-gut); }

/* Pin auf Bild */
.d-pin { display: flex; justify-content: center; }
.d-pin-bild { position: relative; display: inline-block; max-width: 100%; }
.d-pin-bild img { display: block; max-width: 100%; max-height: 60vh; border-radius: 4px; }
.d-pin-punkte { position: absolute; inset: 0; }
.d-pin-punkte i { position: absolute; width: .9em; height: .9em; margin: -.45em 0 0 -.45em; border-radius: 50%;
  background: color-mix(in srgb, var(--d-balken) 55%, transparent); border: 1px solid var(--d-grund); }

/* Inhalt */
.d-inhalt p, .d-inhalt ul { margin: 0 0 .6em; line-height: var(--lh-normal); }
.d-inhalt ul { padding-left: 1.2em; }
.d-inhalt-titel { text-align: center; }
.d-inhalt-titel h2 { font-size: 2.6em; font-weight: 800; letter-spacing: var(--tracking-tight); margin-bottom: .4em; }
.d-inhalt-titel p { color: var(--d-leise); font-size: 1.2em; }
.d-inhalt-zitat blockquote { margin: 0; font-size: 2.2em; font-weight: 700; line-height: var(--lh-snug); }
.d-inhalt-zitat blockquote::before { content: "\201E"; color: var(--d-akzent); margin-right: .1em; }
.d-inhalt-zitat blockquote::after { content: "\201C"; color: var(--d-akzent); }
.d-inhalt-zitat cite { display: block; margin-top: 1em; font-style: normal; color: var(--d-leise); }

/* Fragen auf der Leinwand */
.d-fragen { display: flex; flex-direction: column; gap: .7em; }
.d-frage { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 1em; align-items: start;
  padding: .8em 1em; background: var(--d-flaeche); border-radius: 4px; border-left: 3px solid transparent; }
.d-frage.hervor { border-left-color: var(--d-balken); }
.d-frage p { font-weight: 600; overflow-wrap: anywhere; }
.d-frage-name { color: var(--d-leise); font-size: .8em; }
.d-frage-stimmen { display: inline-flex; align-items: center; gap: .3em; color: var(--d-akzent); font-variant-numeric: tabular-nums; }
.d-frage-stimmen svg { width: 1.1em; height: 1.1em; }

/* Rangliste */
.d-rangliste ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5em; }
.d-rangliste li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 1em; align-items: center;
  padding: .55em .9em; background: var(--d-flaeche); border-radius: 4px; animation: d-ein .5s var(--ease-standard) backwards; }
.d-rangliste li:nth-child(2) { animation-delay: .06s; } .d-rangliste li:nth-child(3) { animation-delay: .12s; }
.d-rangliste li.p1 { background: var(--d-balken); color: var(--d-auf-balken); font-size: 1.15em; }
.d-rangliste li.p1 .d-platz { color: inherit; }
.d-rangliste .d-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-rangliste .d-pkt { font-size: 1em; }

/* ====================== Teilnahme (Handy) ====================== */
body.tn { min-height: 100dvh; display: flex; flex-direction: column; }
body.tn main { width: 100%; flex: 1; padding-bottom: 120px; }
.tn-code { max-width: 380px; margin: 12vh auto 0; text-align: center; }
.tn-code h1 { font-size: 26px; margin-bottom: 18px; }
.tn-code input { width: 100%; font-family: var(--font-mono); font-size: 28px !important; text-align: center; letter-spacing: .12em; min-height: 60px; }
.tn-code .btn { width: 100%; margin-top: 12px; min-height: 52px; font-size: 16px; }
.tn-reiter { display: flex; gap: 4px; margin: 0 0 16px; border-bottom: 1px solid var(--border-2); }
.tn-reiter button { flex: 1; min-height: 48px; background: none; border: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--fg-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tn-reiter button[aria-selected="true"] { color: var(--fg-1); border-bottom-color: var(--border-accent); }
.tn-reiter .zahl-chip { font-size: 12px; background: var(--bg-3); color: var(--fg-2); border-radius: 9px; padding: 1px 7px; }
.tn-raum { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--fg-2); font-size: 14px; }
.tn-raum select { min-height: 36px; font-size: 14px !important; }
.tn-frage-titel { font-size: 22px; font-weight: 700; line-height: var(--lh-snug); margin-bottom: 6px; overflow-wrap: anywhere; }
.tn-hilfe { color: var(--fg-2); font-size: 14px; margin-bottom: 16px; }
.tn-optionen { display: flex; flex-direction: column; gap: 10px; }
.tn-option {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 14px; width: 100%; text-align: left;
  background: var(--bg-1); color: var(--fg-1); border: 1px solid var(--border-1); border-radius: var(--radius-2);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  transition: border-color var(--duration-base) var(--ease-standard), background var(--duration-base) var(--ease-standard);
}
.tn-option:hover { border-color: var(--border-strong); }
.tn-option[aria-pressed="true"] { border-color: var(--border-accent); background: var(--bg-accent-wash); box-shadow: inset 0 0 0 1px var(--border-accent); }
.tn-option .marker { width: 22px; height: 22px; flex: none; border: 2px solid var(--border-1); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.tn-option.mehrfach .marker { border-radius: 3px; }
.tn-option[aria-pressed="true"] .marker { border-color: var(--bg-accent); background: var(--bg-accent); }
.tn-option .marker svg { width: 14px; height: 14px; stroke: var(--fg-on-accent); stroke-width: 3; fill: none; opacity: 0; }
.tn-option[aria-pressed="true"] .marker svg { opacity: 1; }
.tn-option.richtig { border-color: var(--fg-success); background: var(--bg-success-wash); }
.tn-option.falsch { border-color: var(--border-danger); background: var(--bg-danger-wash); }
.tn-quiz .tn-option { min-height: 64px; font-size: 17px; }
.tn-senden { width: 100%; min-height: 52px !important; font-size: 16px !important; margin-top: 16px; }
.tn-danke { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-success-wash); border-radius: var(--radius-2); border-left: 4px solid var(--fg-success); margin-bottom: 16px; }
.tn-danke { flex-wrap: wrap; }
.tn-danke > span { flex: 1; min-width: 12em; }
.tn-danke svg { width: 22px; height: 22px; fill: none; stroke: var(--fg-success); stroke-width: 2.5; flex: none; }
.tn-danke .btn { margin-left: auto; }
.tn-warten { text-align: center; padding: 48px 16px; color: var(--fg-2); }
.tn-warten .punkte { display: inline-flex; gap: 6px; margin-bottom: 14px; }
.tn-warten .punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); animation: tn-puls 1.2s infinite ease-in-out; }
.tn-warten .punkte i:nth-child(2) { animation-delay: .15s; } .tn-warten .punkte i:nth-child(3) { animation-delay: .3s; }
@keyframes tn-puls { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: none; } }
.tn-ergebnis { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-2); font-size: 15px; }
.tn-ergebnis .d-wolke { min-height: 220px; height: 240px; }
.tn-countdown { height: 6px; background: var(--bg-4); border-radius: 3px; overflow: hidden; margin-bottom: 14px; }
.tn-countdown div { height: 100%; background: var(--bg-accent); transform-origin: left; }
.tn-quiz-stand { text-align: center; padding: 20px 12px; border-radius: var(--radius-2); background: var(--bg-3); margin-bottom: 16px; }
.tn-quiz-stand .gross { font-size: 30px; font-weight: 800; }
.tn-quiz-stand.richtig { background: var(--bg-success-wash); }
.tn-quiz-stand.falsch { background: var(--bg-danger-wash); }
.tn-sterne { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.tn-sterne button { width: 52px; height: 52px; background: none; border: 0; cursor: pointer; padding: 4px; color: var(--border-1); }
.tn-sterne button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tn-sterne button.an { color: var(--bg-accent); }
.tn-sterne button.an svg { fill: currentColor; }
.tn-regler { display: flex; flex-direction: column; gap: 18px; }
.tn-regler label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.tn-regler .wert-zeile { display: flex; justify-content: space-between; color: var(--fg-2); font-size: 13px; font-weight: 400; }
.tn-regler output { font-family: var(--font-mono); font-weight: 700; color: var(--fg-1); min-width: 2.5em; text-align: right; }
input[type=range] { width: 100%; accent-color: var(--bg-accent); min-height: 32px; }
.tn-rang { display: flex; flex-direction: column; gap: 8px; }
.tn-rang li { list-style: none; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
  padding: 8px 10px; background: var(--bg-1); border: 1px solid var(--border-1); border-radius: var(--radius-2); font-weight: 600; }
.tn-rang ol { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tn-rang .nr { font-family: var(--font-mono); color: var(--fg-accent); text-align: center; }
.tn-rang button { width: 40px; height: 40px; }
.tn-rang button svg { width: 18px; height: 18px; }
.tn-punkte-rest { position: sticky; top: calc(var(--shell-h) + 8px); z-index: 2; background: var(--bg-1); border: 1px solid var(--border-2);
  padding: 10px 14px; border-radius: var(--radius-2); font-weight: 700; display: flex; justify-content: space-between; margin-bottom: 12px; }
.tn-punkte-rest.leer { color: var(--fg-success); }
.tn-punkte-rest.zuviel { color: var(--fg-danger); }
.tn-pin { position: relative; display: inline-block; max-width: 100%; touch-action: manipulation; cursor: crosshair; }
.tn-pin img { display: block; max-width: 100%; border-radius: var(--radius-2); user-select: none; -webkit-user-drag: none; }
.tn-pin i { position: absolute; width: 26px; height: 26px; margin: -26px 0 0 -13px; color: var(--bg-accent); }
.tn-pin i svg { width: 100%; height: 100%; fill: var(--bg-accent); stroke: #fff; stroke-width: 1.5; }
.tn-zahl input { font-family: var(--font-mono); font-size: 26px !important; text-align: center; min-height: 58px; width: 100%; }
.tn-woerter { display: flex; flex-direction: column; gap: 10px; }
.tn-woerter input, .tn-offen textarea { width: 100%; }
.tn-zaehler { text-align: right; font-size: 12px; color: var(--fg-2); margin-top: 4px; }
.tn-fortschritt { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; color: var(--fg-2); }
.tn-fortschritt .spur { flex: 1; height: 4px; background: var(--bg-4); border-radius: 2px; overflow: hidden; }
.tn-fortschritt .spur div { height: 100%; background: var(--bg-accent); transition: width var(--duration-base) var(--ease-standard); }
.tn-navi { display: flex; gap: 10px; margin-top: 16px; }
.tn-navi .btn { flex: 1; }

/* Fragen auf dem Handy */
.tn-fragen-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.tn-fragen-form textarea { min-height: 88px; }
.tn-fragen-form .zeile { justify-content: space-between; }
.tn-sortierung { display: flex; gap: 4px; margin-bottom: 10px; }
.tn-sortierung button { min-height: 34px; padding: 0 12px; border: 1px solid var(--border-2); background: var(--bg-1); color: var(--fg-2); border-radius: var(--radius-pill); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tn-sortierung button[aria-pressed="true"] { background: var(--bg-strong); color: var(--fg-on-strong); border-color: var(--bg-strong); }
.tn-fragen { display: flex; flex-direction: column; gap: 10px; }
.tn-frage { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px; background: var(--bg-1); border: 1px solid var(--border-2); border-radius: var(--radius-2); }
.tn-frage.hervor { border-color: var(--border-accent); box-shadow: inset 3px 0 0 var(--border-accent); }
.tn-frage.eigen-pruefung { border-style: dashed; }
.tn-frage p { overflow-wrap: anywhere; }
.tn-frage .meta { margin: 6px 0 0; font-size: 12px; }
.tn-frage .antwort { grid-column: 1 / -1; padding: 10px 12px; background: var(--bg-3); border-radius: var(--radius-2); font-size: 14px; }
.tn-frage .antwort b { display: block; font-size: 12px; color: var(--fg-2); margin-bottom: 2px; }
.tn-stimme { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 52px; min-height: 52px; padding: 4px 8px;
  border: 1px solid var(--border-1); border-radius: var(--radius-2); background: var(--bg-1); color: var(--fg-2); font: inherit; font-weight: 700; cursor: pointer; }
.tn-stimme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.tn-stimme[aria-pressed="true"] { color: var(--fg-accent); border-color: var(--border-accent); background: var(--bg-accent-wash); }
.tn-stimme[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .18; }

/* Reaktionen */
.tn-reaktionen { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; justify-content: center; gap: 6px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--bg-1); border-top: 1px solid var(--border-2); }
.tn-reaktionen button { width: 52px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent;
  border-radius: var(--radius-2); color: var(--fg-2); cursor: pointer; transition: transform var(--duration-base) var(--ease-standard), color var(--duration-base); }
.tn-reaktionen button:active { transform: scale(.88); color: var(--fg-accent); }
.tn-reaktionen svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tn-flug { position: fixed; z-index: 41; pointer-events: none; color: var(--fg-accent); animation: tn-flug 1.1s var(--ease-standard) forwards; }
.tn-flug svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; }
@keyframes tn-flug { to { transform: translateY(-160px) scale(1.3); opacity: 0; } }
body.tn .fuss { padding-bottom: 88px; flex-wrap: wrap; }
body.tn .fuss .darstellung select { min-height: 34px; font-size: 12px; }
.tn-verbindung { position: fixed; top: calc(var(--shell-h) + 8px); left: 50%; transform: translateX(-50%); z-index: 70;
  background: var(--bg-inverse); color: var(--fg-on-dark); padding: 8px 14px; border-radius: var(--radius-pill); font-size: 13px; box-shadow: var(--shadow-2); }

/* ====================== Leinwand ====================== */
.leinwand {
  --leinwand-grund: #FAFAFA; --leinwand-schrift: #1F1F1F; --leinwand-leise: #6B6B6B; --leinwand-linie: #E0E0E0;
  --leinwand-flaeche: #F0F0F0; --leinwand-balken: #801624; --leinwand-auf-balken: #FFFFFF;
  --d-grund: var(--leinwand-grund); --d-balken: var(--leinwand-balken); --d-auf-balken: var(--leinwand-auf-balken);
  --d-schrift: var(--leinwand-schrift); --d-leise: var(--leinwand-leise); --d-linie: var(--leinwand-linie);
  --d-flaeche: var(--leinwand-flaeche); --d-akzent: var(--leinwand-balken); --d-gut: #2E7D4F;
  color-scheme: light;
}
html:has(body.leinwand) { scrollbar-gutter: auto; }
body.leinwand { margin: 0; height: 100vh; overflow: hidden; background: var(--leinwand-grund); color: var(--leinwand-schrift);
  font-family: var(--font-sans); font-size: clamp(13px, .95vw + .5vh, 44px); line-height: var(--lh-normal); cursor: none; }
body.leinwand.maus { cursor: default; }
.lw-bild { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.lw-rahmen { position: relative; z-index: 1; height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lw-kopf { display: flex; align-items: center; gap: 1.2em; padding: 1em 2em; min-height: 4.2em; }
.lw-kopf .lw-logo img { height: 2.2em; width: auto; display: block; max-width: 14em; object-fit: contain; }
.lw-mitmachen { margin-left: auto; display: flex; align-items: center; gap: .9em; padding: .45em .5em .45em 1em; border-radius: 4px;
  background: var(--leinwand-flaeche); transition: opacity .3s var(--ease-standard); }
.lw-mitmachen .adresse { font-size: .95em; color: var(--leinwand-leise); }
.lw-mitmachen .adresse b { color: var(--leinwand-schrift); }
.lw-mitmachen .code { font-family: var(--font-mono); font-weight: 700; font-size: 1.35em; letter-spacing: .06em; white-space: nowrap; }
.lw-mitmachen .lw-qr { width: 3.4em; height: 3.4em; background: #fff; padding: .2em; border-radius: 2px; }
.lw-mitmachen .lw-qr img, .lw-start .lw-qr img { width: 100%; height: 100%; display: block; }
.lw-online { display: inline-flex; align-items: center; gap: .35em; color: var(--leinwand-leise); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lw-online svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; }
.lw-inhalt { max-width: none; margin: 0; padding: 1em 4em 1.5em; display: flex; flex-direction: column; min-height: 0; }
.lw-titel { font-size: 2.3em; font-weight: 800; letter-spacing: var(--tracking-tight); line-height: var(--lh-snug); margin: 0 0 .9em; max-width: 34em; text-wrap: balance; }
.lw-diagramm { flex: 1; min-height: 0; font-size: 1.15em; display: flex; flex-direction: column; justify-content: center; }
.lw-diagramm > .diagramm { width: 100%; max-height: 100%; }
.lw-diagramm .d-balken { gap: 1.1em; }
.lw-diagramm .d-spur { height: 1.5em; }
.lw-diagramm .d-wolke { min-height: 0; height: 100%; }
.lw-diagramm .d-saeulen { min-height: 0; height: 100%; }
.lw-verborgen { text-align: center; color: var(--leinwand-leise); font-size: 1.3em; }
.lw-verborgen b { display: block; font-size: 3.6em; color: var(--leinwand-schrift); font-variant-numeric: tabular-nums; line-height: 1.1; }
.lw-fuss { display: flex; align-items: center; gap: 1.6em; padding: .8em 2em 1.1em; color: var(--leinwand-leise); font-size: .85em; }
.lw-fuss .lw-tse { margin-left: auto; display: inline-flex; align-items: center; gap: .5em; }
.lw-fuss .lw-tse img { height: 1.1em; }
.lw-timer { display: inline-flex; align-items: center; gap: .5em; font-family: var(--font-mono); font-weight: 700; font-size: 1.6em; color: var(--leinwand-schrift); }
.lw-timer svg { width: 1.2em; height: 1.2em; transform: rotate(-90deg); }
.lw-timer circle { fill: none; stroke-width: 4; }
.lw-timer .grund { stroke: var(--leinwand-linie); }
.lw-timer .lauf { stroke: var(--leinwand-balken); transition: stroke-dashoffset 1s linear; }
.lw-timer.knapp { color: #B3261E; }
.lw-zu { display: inline-flex; align-items: center; gap: .4em; }
.lw-zu svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; }

/* Start- und Pausenbild: Code groß */
.lw-start { height: 100%; display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 4em; align-items: center; padding: 0 6em; }
.lw-start h1 { font-size: 3.4em; font-weight: 800; letter-spacing: var(--tracking-tight); line-height: var(--lh-tight); margin-bottom: .5em; text-wrap: balance; }
.lw-start .schritte { font-size: 1.5em; color: var(--leinwand-leise); display: flex; flex-direction: column; gap: .3em; }
.lw-start .schritte b { color: var(--leinwand-schrift); }
.lw-start .code-gross { font-family: var(--font-mono); font-size: 2.2em; font-weight: 800; letter-spacing: .08em; color: var(--leinwand-schrift); }
.lw-start .lw-qr { width: 16em; height: 16em; background: #fff; padding: .6em; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.lw-start .logo-gross img { height: 4em; max-width: 22em; object-fit: contain; display: block; margin-bottom: 1.4em; }

/* Hervorgehobene Frage als Bauchbinde */
.lw-bauchbinde { position: fixed; left: 2em; right: 2em; bottom: 4.2em; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.2em; align-items: center; padding: 1.1em 1.4em; background: var(--leinwand-schrift); color: var(--leinwand-grund);
  border-left: .4em solid var(--leinwand-balken); border-radius: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.22);
  transform: translateY(150%); opacity: 0; transition: transform .45s var(--ease-standard), opacity .45s var(--ease-standard); }
.lw-bauchbinde.da { transform: none; opacity: 1; }
.lw-bauchbinde .text { font-size: 1.55em; font-weight: 700; line-height: var(--lh-snug); overflow-wrap: anywhere; }
.lw-bauchbinde .wer { font-size: .9em; opacity: .7; margin-top: .2em; }
.lw-bauchbinde .stimmen { display: inline-flex; align-items: center; gap: .3em; font-weight: 700; font-size: 1.2em; }
.lw-bauchbinde svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 2; }
.lw-bauchbinde .chip-frage { width: 2.6em; height: 2.6em; border-radius: 4px; background: var(--leinwand-balken); color: var(--leinwand-auf-balken);
  display: inline-flex; align-items: center; justify-content: center; }

/* Reaktionen steigen auf */
.lw-reaktionen { position: fixed; right: 2.5em; bottom: 5em; width: 8em; height: 70vh; pointer-events: none; z-index: 6; }
.lw-reaktion { position: absolute; bottom: 0; color: var(--leinwand-balken); animation: lw-steigen 3s cubic-bezier(.2,.7,.4,1) forwards; }
.lw-reaktion svg { width: 2.4em; height: 2.4em; fill: color-mix(in srgb, var(--leinwand-balken) 18%, transparent); stroke: currentColor; stroke-width: 1.8; }
@keyframes lw-steigen { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translate(0, -6vh) scale(1); }
  100% { transform: translate(var(--dx, 0), -64vh) scale(1.1); opacity: 0; } }

.lw-knoepfe { position: fixed; right: 1em; top: 1em; z-index: 8; display: flex; gap: .4em; opacity: 0; transition: opacity .3s; }
body.maus .lw-knoepfe { opacity: 1; }
.lw-knoepfe button { width: 40px; height: 40px; border: 0; border-radius: 4px; background: rgba(17,17,17,.7); color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lw-knoepfe svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.lw-hinweis { position: fixed; left: 50%; top: 1em; transform: translateX(-50%); z-index: 9; background: #111; color: #fff; padding: .4em 1em; border-radius: 4px; font-size: 14px; }

/* Overlay für Streaming (OBS, vMix): transparent, nur Bauchbinde und kleine Ergebniskarte */
body.leinwand.overlay { background: transparent !important; cursor: none; }
body.leinwand.overlay .lw-rahmen, body.leinwand.overlay .lw-bild, body.leinwand.overlay .lw-knoepfe { display: none; }
.lw-overlay-karte { position: fixed; right: 2em; top: 2em; width: 30em; z-index: 4; padding: 1.2em 1.4em; background: var(--leinwand-grund);
  color: var(--leinwand-schrift); border-radius: 4px; border-top: .3em solid var(--leinwand-balken); box-shadow: 0 12px 32px rgba(0,0,0,.25);
  transition: opacity .4s var(--ease-standard), transform .4s var(--ease-standard); }
.lw-overlay-karte.weg { opacity: 0; transform: translateY(-10px); }
.lw-overlay-karte h2 { font-size: 1.2em; margin-bottom: .8em; }
.lw-overlay-karte .diagramm { font-size: .9em; }

/* ====================== Steuerung ====================== */
body.st { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
html:has(body.st) { scrollbar-gutter: auto; }
.st-raster { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr) 380px; }
.st-spalte { min-height: 0; overflow-y: auto; border-right: 1px solid var(--border-2); background: var(--bg-1); }
.st-spalte:last-child { border-right: 0; }
.st-mitte { background: var(--bg-2); padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.st-spalte-kopf { position: sticky; top: 0; z-index: 2; background: var(--bg-1); padding: 12px 14px; border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; gap: 8px; min-height: 56px; }
.st-spalte-kopf h2 { font-size: 13px; flex: 1; }
.st-folien { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.st-folie { display: grid; grid-template-columns: 26px 30px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 8px 10px; min-height: 52px;
  border: 1px solid transparent; border-radius: var(--radius-2); background: transparent; color: var(--fg-1); font: inherit; text-align: left; cursor: pointer; }
.st-folie:hover { background: var(--bg-3); }
.st-folie[aria-current="true"] { background: var(--bg-accent-wash); border-color: var(--border-accent); }
.st-folie .nr { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); text-align: right; }
.st-folie .ic { width: 30px; height: 30px; border-radius: var(--radius-2); background: var(--bg-3); display: inline-flex; align-items: center; justify-content: center; }
.st-folie[aria-current="true"] .ic { background: var(--bg-1); }
.st-folie .ic svg { width: 17px; height: 17px; fill: none; stroke: var(--fg-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-folie[aria-current="true"] .ic svg { stroke: var(--fg-accent); }
.st-folie .t { display: flex; flex-direction: column; min-width: 0; }
.st-folie .t b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-folie .t span { font-size: 12px; color: var(--fg-2); }
.st-folie .n { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); white-space: nowrap; }
.st-vorschau { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-2); overflow: hidden; box-shadow: var(--shadow-2); flex: none; }
.st-vorschau iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.st-leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-leiste .gross { min-width: 120px; min-height: 52px; font-size: 14px; }
.st-leiste .btn svg { width: 18px; height: 18px; }
.st-gruppe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; background: var(--bg-1); border: 1px solid var(--border-2); border-radius: var(--radius-2); }
.st-gruppe h3 { width: 100%; font-size: 11px; font-weight: 700; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--fg-2); }
.btn[aria-pressed="true"] { background: var(--bg-strong); border-color: var(--bg-strong); color: var(--fg-on-strong); }
.segment { display: inline-flex; border: 1px solid var(--border-1); border-radius: var(--radius-2); overflow: hidden; }
.segment button { min-height: 40px; padding: 0 12px; border: 0; border-right: 1px solid var(--border-1); background: var(--bg-1); color: var(--fg-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.segment button:last-child { border-right: 0; }
.segment button[aria-pressed="true"], .segment button[aria-checked="true"] { background: var(--bg-strong); color: var(--fg-on-strong); }
.st-zahlen { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--fg-2); }
.st-zahlen b { color: var(--fg-1); font-size: 18px; margin-right: 4px; font-variant-numeric: tabular-nums; }
.st-tasten { font-size: 12px; color: var(--fg-2); }
.st-tasten kbd { font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border: 1px solid var(--border-1); border-bottom-width: 2px; border-radius: 3px; background: var(--bg-1); }
.st-fragen-reiter { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--border-2); position: sticky; top: 56px; background: var(--bg-1); z-index: 2; }
.st-fragen-reiter button { flex: 1; min-height: 40px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--fg-2); cursor: pointer; border-bottom: 2px solid transparent; }
.st-fragen-reiter button[aria-selected="true"] { color: var(--fg-1); border-bottom-color: var(--border-accent); }
.st-fragen { list-style: none; margin: 0; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.st-frage { padding: 12px; border: 1px solid var(--border-2); border-radius: var(--radius-2); background: var(--bg-1); }
.st-frage.hervor { border-color: var(--border-accent); box-shadow: inset 3px 0 0 var(--border-accent); }
.st-frage p { font-size: 14px; overflow-wrap: anywhere; }
.st-frage .meta { margin: 6px 0 8px; font-size: 12px; }
.st-frage .antwort { font-size: 13px; padding: 8px 10px; background: var(--bg-3); border-radius: var(--radius-2); margin-bottom: 8px; }
.st-frage .aktionen-zeile { display: flex; flex-wrap: wrap; gap: 4px; }
.st-frage .btn { min-height: 34px; padding: 0 8px; font-size: 12px; }
.st-frage .btn svg { width: 15px; height: 15px; }
.st-antworten { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.st-antworten li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 10px; background: var(--bg-2); border-radius: var(--radius-2); font-size: 13px; }
.st-antworten li.aus { color: var(--fg-3); text-decoration: line-through; }
.st-mobil-reiter { display: none; }
@media (max-width: 1100px) {
  .st-raster { grid-template-columns: 260px minmax(0, 1fr); }
  .st-raster > .st-spalte:last-child { grid-column: 1 / -1; border-top: 1px solid var(--border-2); max-height: 40vh; }
  body.st { overflow: auto; height: auto; }
  .st-raster { min-height: calc(100vh - 56px); }
}
@media (max-width: 760px) {
  .st-mobil-reiter { display: flex; position: sticky; top: var(--shell-h); z-index: 20; background: var(--bg-1); border-bottom: 1px solid var(--border-2); }
  .st-mobil-reiter button { flex: 1; min-height: 44px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--fg-2); border-bottom: 2px solid transparent; }
  .st-mobil-reiter button[aria-selected="true"] { color: var(--fg-1); border-bottom-color: var(--border-accent); }
  .st-raster { display: block; }
  .st-raster > * { display: none; max-height: none !important; }
  .st-raster > .zeigen { display: block; }
}

/* ====================== Konsole ====================== */
.ko-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.ko-event { display: flex; flex-direction: column; gap: 8px; cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: border-color var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard); }
.ko-event:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.ko-event h2 { font-size: 16px; }
.ko-event .zeile { justify-content: space-between; }
.ko-code { font-family: var(--font-mono); font-weight: 700; letter-spacing: .04em; }
.ko-editor { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ko-editor { grid-template-columns: 1fr; } }
.ko-folien { position: sticky; top: calc(var(--shell-h) + var(--shell-wz-h) + 16px); max-height: calc(100vh - 160px); overflow-y: auto; padding: 8px; }
.ko-folien .st-folie { grid-template-columns: 18px 26px 30px minmax(0, 1fr); }
.ko-folien .griff { cursor: grab; color: var(--fg-3); display: inline-flex; }
.ko-folien .griff svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.ko-folien .st-folie.zieht { opacity: .4; }
.ko-folien .st-folie.ziel-drueber { box-shadow: inset 0 2px 0 var(--border-accent); }
.ko-neu { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 8px; border-top: 1px solid var(--border-2); margin-top: 8px; }
.ko-neu button { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 8px; border: 1px solid var(--border-2); border-radius: var(--radius-2);
  background: var(--bg-1); color: var(--fg-1); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.ko-neu button:hover { border-color: var(--border-strong); }
.ko-neu svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--fg-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ko-optionen { display: flex; flex-direction: column; gap: 6px; }
.ko-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; }
.ko-option input[type=text] { width: 100%; }
.ko-option .richtig { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--fg-2); min-height: 42px; padding: 0 8px; border: 1px solid var(--border-1); border-radius: var(--radius-2); cursor: pointer; }
.ko-option .richtig:has(input:checked) { color: var(--fg-success); border-color: var(--fg-success); background: var(--bg-success-wash); }
.ko-option .btn { width: 42px; padding: 0; }
.ko-gespeichert { font-size: 12px; color: var(--fg-2); }
.ko-vorschau-paar { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ko-vorschau-paar { grid-template-columns: 1fr; } }
.ko-handy { width: 300px; height: 600px; border: 10px solid #111; border-radius: 28px; overflow: hidden; background: #111; box-shadow: var(--shadow-3); }
.ko-handy iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 18px; }
.ko-leinwand { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-2); background: #000; box-shadow: var(--shadow-2); }
.ko-leinwand iframe { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; pointer-events: none; }
.ko-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ko-link input { width: 100%; font-family: var(--font-mono); font-size: 12.5px; }
.ko-qr { width: 180px; height: 180px; background: #fff; padding: 8px; border: 1px solid var(--border-2); border-radius: var(--radius-2); }
.ko-qr img { width: 100%; height: 100%; display: block; }
.ko-kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ko-kennzahlen .karte b { display: block; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ko-kennzahlen .karte span { color: var(--fg-2); font-size: 13px; }
.ko-auswertung-folie { break-inside: avoid; }
.ko-auswertung-folie .diagramm { margin-top: 14px; font-size: 14px; }
.ko-auswertung-folie .d-wolke { height: 260px; }
.ko-gefahr { border-color: var(--border-danger); }
.ko-schalter { display: flex; flex-direction: column; gap: 2px; }
.ko-schalter .haken { min-height: 38px; }
.ko-hinweis-leise { font-size: 12.5px; color: var(--fg-2); font-weight: 400; }
.feld .ko-hinweis-leise { margin-top: -2px; }

@media print {
  .kopf, .werkzeug, .ko-nicht-drucken, .toasts { display: none !important; }
  body { background: #fff; }
  .karte { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lw-reaktion, .tn-flug, .d-rangliste li, .d-einzeln { animation: none !important; }
}

/* Leinwand: Logo nach Helligkeit des Grundes, nicht nach der Darstellung des Geräts */
body.leinwand.leinwand .logo-hell { display: block !important; }
body.leinwand.leinwand .logo-dunkel { display: none !important; }
body.leinwand.leinwand.lw-dunkel .logo-hell { display: none !important; }
body.leinwand.leinwand.lw-dunkel .logo-dunkel { display: block !important; }
body.leinwand.lw-dunkel img.auf-platte { background: #fff; padding: .2em .4em; border-radius: 4px; box-sizing: content-box; }
.lw-logo { display: flex; align-items: center; gap: .8em; }
.lw-logo img { height: 2.2em; width: auto; }
.lw-logo .trenn { display: none; }
.lw-fuss .fuss { padding: 0; font-size: 1em; color: inherit; }
.lw-fuss .fuss img { height: 1.1em; }
.lw-optionen { display: grid; grid-template-columns: repeat(auto-fit, minmax(16em, 1fr)); gap: .8em; }
.lw-optionen .d-karte { font-size: 1.15em; padding: .9em 1.1em; }
.lw-inhalt.ist-start { padding: 0; }
.lw-inhalt.ist-start .lw-diagramm, .lw-inhalt.ist-start .diagramm { height: 100%; }

/* Konsole: Navigation als Links in Kopf- und Werkzeugzeile */
#haupt-reiter { display: flex; gap: 2px; }
#haupt-reiter a[aria-current="true"], .werkzeug .reiter a[aria-selected="true"] { color: var(--fg-1); box-shadow: inset 0 -2px 0 var(--border-accent); border-radius: var(--radius-2) var(--radius-2) 0 0; }
.werkzeug .trenn { height: 24px; }
@media (max-width: 860px) {
  .kopf-innen:has(#haupt-reiter) { flex-wrap: wrap; padding-bottom: 4px; }
  .kopf-innen:has(#haupt-reiter) .aktionen { width: 100%; overflow-x: auto; }
  #haupt-reiter { flex: 1; }
}

/* Leinwand: nichts läuft unten aus dem Bild */
.lw-diagramm { overflow: hidden; }
.lw-diagramm .d-offen-blasen, .lw-diagramm .d-offen-wand { max-height: 100%; overflow: hidden; align-self: stretch; }
.lw-diagramm:has(.d-offen-blasen), .lw-diagramm:has(.d-offen-wand), .lw-diagramm:has(.d-rangliste), .lw-diagramm:has(.d-fragen) { justify-content: flex-start; }
.lw-diagramm .d-rangliste ol { display: grid; grid-auto-flow: column; grid-template-rows: repeat(5, auto); grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); column-gap: 1.2em; }
.lw-diagramm .d-rangliste li { padding: .45em .9em; }
.d-punkt:nth-child(even of .d-punkt) span { left: auto; right: 1.4em; }
