/* Agenten-Büro (Etappe 2+3). Dunkles Schema für Beamer und Stand-Terminals;
   seit 2026-10-08 zusätzlich ein helles für die Bedienoberfläche (Kopf,
   Liste, Laufband, Gespräch) — die Bühne selbst bleibt dunkel. Welches gilt,
   setzt buero.js (`data-theme`, dieselbe Wahl wie die Hauptoberfläche,
   sonst das System). Die Kontraste der Text-Tokens beider Schemata rechnet
   WebBarrierefreiheitTests nach. */
:root {
  color-scheme: dark;
  --bg: #12162A;
  --surface: #1A2040;
  --surface-2: #222A4E;
  --line: #3A4474;
  --text: #ECE8DE;
  --muted: #B4B9D2;
  --faint: #9CA2C4;
  --accent: #F2B544;
  --alert: #FF8A80;
  --ok: #5FD08A;
  --info: #8CC2FF;
  --violet: #C2A8F4;
  --gefahr: #C62828;
  --auf-gefahr: #FFFFFF;
  --auf-accent: #1C1A12;
  --leiste-bg: #161C38;
  --feld-bg: #10152C;
  --feld-rand: #6B75A8;
  --tief: #151B36;
  --band-bg: #11162D;
  --freigabe-text: #FFD591;
  --blase-eigen: #2A3A66;
  --messe-bg: #1A2142;
  --glas: rgba(12,15,30,.88);
  --schatten: rgba(0,0,0,.35);
  --body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
/* Helles Schema (2026-10-08): nur Flächen und Schrift der Bedienung. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F1EC;
  --surface: #FFFFFF;
  --surface-2: #ECEFF7;
  --line: #C3C9DD;
  --text: #1B1F33;
  --muted: #434A66;
  --faint: #545B7A;
  --accent: #8A5800;
  --alert: #B0261C;
  --ok: #1D6E3F;
  --info: #1C5AA6;
  --violet: #6340AA;
  --gefahr: #C62828;
  --auf-gefahr: #FFFFFF;
  --auf-accent: #FFFFFF;
  --leiste-bg: #E7EAF4;
  --feld-bg: #FFFFFF;
  --feld-rand: #6E7699;
  --tief: #F0F2F9;
  --band-bg: #ECEEF5;
  --freigabe-text: #7A4A00;
  --blase-eigen: #D9E4FA;
  --messe-bg: #EEF1FA;
  --glas: rgba(255,255,255,.94);
  --schatten: rgba(20,24,40,.2);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 16px/1.5 var(--body);
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-height: 100vh; height: 100dvh;
}
/* Feste Zeilen: ein ausgeblendetes Demo-Band ist kein Raster-Element — ohne
   diese Zuordnung rutschte die Bühne in die Zeile des Kopfs (Höhe auto) und das
   Laufband bekam den ganzen Rest (gemessen bei 1920×1080: Bühne 604 px). */
.demo-band { grid-row: 1; }
.leiste { grid-row: 2; }
.buero { grid-row: 3; }
.laufband { grid-row: 4; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprunglink { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--auf-accent); padding: 6px 10px; border-radius: 6px; z-index: 10; }
.sprunglink:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Demo-Band: dauerhaft sichtbar, solange der Demo-Modus an ist. */
.demo-band { background: repeating-linear-gradient(135deg, #5A3A00 0 14px, #3F2800 14px 28px); color: #FFE7B0; font-weight: 700; text-align: center; padding: 6px 16px; border-bottom: 2px solid var(--accent); }
.demo-band[hidden] { display: none; }

/* Leiste */
.leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 16px; background: var(--leiste-bg); border-bottom: 1px solid var(--line); }
.titel { font-size: 1.15rem; margin: 0; letter-spacing: .01em; }
.verbindung { font: 600 .8rem var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.verbindung[data-zustand="ok"] { color: var(--ok); }
.verbindung[data-zustand="fehler"], .verbindung[data-zustand="abgemeldet"], .verbindung[data-zustand="nichtverfuegbar"] { color: var(--alert); }
.verbindung[data-zustand="demo"] { color: var(--accent); }
/* Rückstand des Bildes (Befund R1): nur über der Grenze sichtbar, dezent. */
.rueckstand { font: 600 .8rem var(--mono); color: var(--accent); }
.rueckstand[hidden] { display: none; }
.anmelden { color: var(--info); font-weight: 700; }
.zurueck { color: var(--info); font-weight: 700; text-decoration: none; }
.zurueck:hover, .zurueck:focus-visible { text-decoration: underline; }
.bereich-knoepfe { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; flex: 1 1 260px; }
/* Touchbildschirm: große Trefferflächen, keine Abhängigkeit vom Überfahren. */
.bereich-knopf { flex: none; min-height: 44px; font: 600 .86rem var(--body); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; touch-action: manipulation; }
.bereich-knopf:hover { color: var(--text); }
.bereich-knopf[aria-pressed="true"] { color: var(--auf-accent); background: var(--accent); border-color: var(--accent); }
.steuerung { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.schalter { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); }
.schalter input { accent-color: var(--accent); width: 18px; height: 18px; }
select, input, textarea { font: inherit; font-size: .92rem; color: var(--text); background: var(--feld-bg); border: 1px solid var(--feld-rand); border-radius: 8px; padding: 6px 8px; }
body[data-ansicht]:not([data-ansicht="beamer"]) .nur-beamer { display: none; }

/* Bühne und Seitenleiste */
.buero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
.buehne { position: relative; min-width: 0; min-height: 320px; background: #0E1224; }
.buehne canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: manipulation; }
.buehne canvas.zeigt { cursor: pointer; }
.panel { border-left: 1px solid var(--line); background: var(--surface); padding: 14px 16px; overflow-y: auto; min-height: 0; }
.panel-titel { font: 700 .74rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.einleitung { color: var(--muted); margin: 0 0 14px; }
.abschnitt { margin: 0 0 18px; }
.abschnitt h2 { font-size: .98rem; margin: 0 0 8px; }
.werte { display: grid; gap: 4px; margin: 0; }
.werte div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: .9rem; }
.werte dt { color: var(--faint); }
.werte dd { margin: 0; font-variant-numeric: tabular-nums; }
.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.liste li { background: var(--surface-2); border-radius: 8px; padding: 8px 10px; font-size: .9rem; }
.liste li p { margin: 0 0 4px; }
.klein { font-size: .8rem; color: var(--muted); }
.leise { color: var(--faint); font-size: .9rem; margin: 0; }
.hinweis { color: var(--faint); font-size: .8rem; margin: 6px 0 0; }
.technisch { font: .8rem var(--mono); color: var(--muted); word-break: break-word; }
.notiz { margin: 6px 0 0; padding: 6px 8px; border-left: 3px solid var(--violet); background: var(--tief); border-radius: 4px; font-size: .88rem; }
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.roster-knopf { width: 100%; display: grid; grid-template-columns: 14px 1fr auto; grid-template-areas: "f n s" "f r s"; column-gap: 10px; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; color: var(--text); cursor: pointer; font: inherit; min-height: 44px; }
.roster-knopf:hover, .roster-knopf[aria-pressed="true"] { background: var(--surface-2); border-color: var(--line); }
.roster-knopf .farbfeld { grid-area: f; align-self: center; }
.rn { grid-area: n; font-weight: 700; font-size: .9rem; }
.rr { grid-area: r; font-size: .78rem; color: var(--faint); }
.rs { grid-area: s; align-self: center; font-size: .78rem; color: var(--muted); max-width: 150px; text-align: right; }
.farbfeld { display: inline-block; width: 14px; height: 14px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.farbfeld.gross { width: 30px; height: 30px; border-radius: 6px; }
/* Etappe 6: Kartenfarben des Kanban-Boards (dieselben wie an der Wand). */
.karte-feature { background: #FFE27A; }
.karte-bug { background: #FFB3C1; }
.karte-chore { background: #9CCBFF; }
/* Schritt ohne Aufgabe (Team-Läufe): grau mit Eselsohr, wie an der Wand. */
.karte-schritt { background: linear-gradient(225deg, #6B7280 0 4px, #DADDE3 4px); }
.board-spalte h3 { font-size: .86rem; margin: 10px 0 4px; color: var(--muted); }
.farbe-0 { background: #E8765C; } .farbe-1 { background: #5B7FE0; } .farbe-2 { background: #9E7BD8; } .farbe-3 { background: #2FB3A2; }
.farbe-4 { background: #4F8FE0; } .farbe-5 { background: #F08A3C; } .farbe-6 { background: #3D4452; } .farbe-7 { background: #D8506F; }
.farbe-8 { background: #6FAF4C; } .farbe-9 { background: #C9A227; } .farbe-10 { background: #8A6BBE; } .farbe-11 { background: #2E8B8B; }
.karte-kopf { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.karte-titel { font-size: 1.2rem; margin: 0; }
.karte-unter { margin: 0; font-size: .85rem; color: var(--muted); }
.schliessen { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 44px; height: 44px; font-size: 1.3rem; cursor: pointer; }
.werkzeuge { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.werkzeuge li { display: grid; grid-template-columns: 1.6em 1fr auto; gap: 6px; font-size: .84rem; background: var(--tief); border-radius: 6px; padding: 5px 7px; }
.werkzeuge time { color: var(--faint); font-size: .75rem; }
.auszug { display: block; font: .76rem var(--mono); color: var(--muted); word-break: break-all; margin-top: 2px; }
.legende { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: .84rem; color: var(--muted); }
/* Berufsbilder: „Wer ist wer“ — eine Zeile je Beruf (der Satz ist länger). */
.legende.berufe { grid-template-columns: 1fr; gap: 6px; }
.legende.berufe strong { color: var(--text); font-weight: 600; }
.leerzustand { border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.leerzustand h2 { margin: 0 0 6px; font-size: 1rem; }
.leerzustand p { margin: 0; color: var(--muted); }

/* Knöpfe und Formulare: Touch-Ziele mindestens 44 px */
.knopfzeile { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.knopf { font: 700 .9rem var(--body); border-radius: 8px; padding: 9px 14px; min-height: 44px; cursor: pointer; border: 1px solid var(--feld-rand); background: transparent; color: var(--text); }
.knopf:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopf-klein { min-height: 36px; padding: 5px 10px; font-size: .82rem; }
.knopf-primaer { background: var(--accent); color: var(--auf-accent); border-color: var(--accent); }
.knopf-primaer:hover:not(:disabled) { color: var(--auf-accent); filter: brightness(1.08); }
.knopf-gefahr { background: var(--gefahr); color: var(--auf-gefahr); border-color: var(--gefahr); }
.knopf-gefahr:hover:not(:disabled) { color: var(--auf-gefahr); filter: brightness(1.12); }
.formular { display: grid; gap: 6px; }
.formular label { font-size: .85rem; color: var(--muted); }
.formular textarea { resize: vertical; }
.vorlagen { display: grid; gap: 6px; }
.vorlage { text-align: left; }
.ausgabe:empty { display: none; }
.ausgabe { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; font-size: .88rem; }
.ausgabe-satz { margin: 0 0 6px; }
.ton-ok { color: var(--ok); } .ton-bad { color: var(--alert); } .ton-warn { color: var(--accent); } .ton-info { color: var(--info); }
.ausgabe pre { white-space: pre-wrap; word-break: break-word; font: .76rem var(--mono); color: var(--muted); background: var(--feld-bg); padding: 8px; border-radius: 6px; max-height: 220px; overflow: auto; }

/* Laufband */
/* Büro-Echtlauf B4: scrollbar statt abgeschnitten (die Seite hält die
   letzten 60 Ereignisse); per Tastatur erreichbar (tabindex im HTML). */
.laufband { list-style: none; margin: 0; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--band-bg); display: grid; align-content: start; gap: 3px; max-height: 190px; overflow-y: auto; overscroll-behavior: contain; }
.laufband li { display: grid; grid-template-columns: 78px 1fr; gap: 10px; font-size: .86rem; color: var(--muted); }
.laufband time { color: var(--faint); font-variant-numeric: tabular-nums; }
.unterzeile { display: block; font-size: .8rem; color: var(--faint); }
.laufband .art-uebergabe { color: var(--accent); } .laufband .art-freigabe { color: var(--freigabe-text); } .laufband .art-ok { color: var(--ok); }
.laufband .art-halt { color: var(--alert); } .laufband .art-org { color: var(--violet); } .laufband .art-auftrag { color: var(--info); }

/* Dialoge */
.dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; max-width: min(520px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(5, 7, 16, .7); }
.dialog h2 { margin: 0 0 8px; font-size: 1.1rem; }
.dialog p { white-space: pre-line; }
.feld { display: grid; grid-template-columns: 1fr 180px; gap: 10px; align-items: center; margin: 6px 0; }

/* Beamer: große Schrift im Laufband, Seitenleiste schmaler Überblick. */
body[data-ansicht="beamer"] .laufband li { font-size: 1rem; }
body[data-ansicht="beamer"] .laufband { max-height: 32vh; }
body[data-ansicht="beamer"] .ausgabe { display: none; }

@media (max-width: 980px) {
  .buero { grid-template-columns: 1fr; grid-template-rows: minmax(320px, 58vh) auto; }
  .panel { border-left: 0; border-top: 1px solid var(--line); }
  body { height: auto; }
}
@media (max-width: 600px) {
  .laufband li { grid-template-columns: 1fr; gap: 0; }
  .legende { grid-template-columns: 1fr; }
  .werte div { grid-template-columns: 100px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}

/* Bediener-Kamera: Ziehen verschiebt das Büro (2026-09-28). */
#buero-canvas { touch-action: none; }
#buero-canvas.zieht { cursor: grabbing; }

/* Vorschau (2026-09-29): der Bildschirm „Ergebnis“ im Panel. */
.ergebnis-eintrag { margin-bottom: 14px; }
.ergebnis-eintrag h3 { margin: 0 0 4px; font-size: 15px; }
.ergebnis-rahmen { border: 1px solid rgba(0,0,0,.15); border-radius: 8px; overflow: hidden; margin: 8px 0; background: #fff; }
.ergebnis-rahmen iframe { display: block; width: 100%; height: 320px; border: 0; background: #fff; }
.punkt { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #8A93A6; }
.punkt-ok { background: #30A46C; }


/* Büro-Terminal (2026-09-30): die Tafel „Wünsche & Anforderungen“ am
   Empfang. Rechts, rund 40 % breit — die Bühne bleibt daneben sichtbar.
   Große Schrift und Trefferflächen für den Touchbildschirm am Stand, keine
   Abhängigkeit vom Überfahren. */
.tafel { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(760px, max(440px, 40vw)); max-width: 100vw; height: 100dvh; max-height: none;
  overflow-y: auto; overscroll-behavior: contain; background: var(--surface); color: var(--text); border: 0; border-left: 3px solid var(--accent);
  padding: 18px 22px 24px; z-index: 5; box-shadow: -14px 0 36px rgba(0, 0, 0, .5); font-size: 1.1rem; }
.tafel[open] { display: flex; flex-direction: column; gap: 12px; }
.tafel-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tafel-kopf h2 { margin: 0; font-size: 1.5rem; }
.tafel-kopf .schliessen { width: 56px; height: 56px; font-size: 1.6rem; }
.tafel-inhalt { display: flex; flex-direction: column; gap: 10px; }
.tafel-gruss { font-size: 1.45rem; line-height: 1.35; margin: 4px 0; }
.tafel-label { font-size: 1rem; color: var(--muted); }
.tafel-feld { font-size: 24px; line-height: 1.4; width: 100%; min-height: 150px; resize: vertical; }
.tafel select { font-size: 1.1rem; min-height: 52px; }
.tafel .knopf { min-height: 56px; font-size: 1.05rem; padding: 12px 18px; touch-action: manipulation; }
.tafel .knopf-klein { min-height: 44px; font-size: .95rem; padding: 8px 12px; }
.knopf-gross { min-height: 72px; font-size: 1.2rem; }
.tafel-wahl { display: flex; flex-wrap: wrap; gap: 8px; }
.tafel-inline { margin-left: 10px; }
.tafel-abschnitt { font-size: 1.1rem; margin: 14px 0 4px; }
.verlauf { display: flex; flex-direction: column; gap: 10px; }
.blase { max-width: 88%; border-radius: 16px; padding: 10px 14px; }
.blase p { margin: 0 0 6px; white-space: pre-line; }
.blase p:last-child { margin-bottom: 0; }
.blase-besucher { align-self: flex-end; background: var(--blase-eigen); border-bottom-right-radius: 4px; }
.blase-po { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.blase-wer { font-weight: 700; color: var(--accent); }
.aussagen { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 1rem; }
.aussage-art { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--line); color: var(--muted); }
.aussage-art.art-belegt { color: var(--ok); border-color: var(--ok); }
.aussage-art.art-unbekannt { color: var(--accent); border-color: var(--accent); }
.anforderung-karte { border: 2px solid var(--accent); border-radius: 12px; padding: 12px 16px; background: var(--tief); }
.anforderung-karte h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--accent); }
.anforderung-titel { font-weight: 700; font-size: 1.2rem; margin: 0 0 6px; }
.anforderung-karte ul { margin: 4px 0 0; padding-left: 1.2em; }
/* Bildschirmtastatur: eigene Tasten, mindestens 64 px, kein Überfahren. */
.tastatur { display: grid; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); }
.tastatur[hidden] { display: none; }
.tastatur-reihe { display: flex; gap: 6px; }
.taste { flex: 1 1 0; min-width: 44px; min-height: 64px; font: 700 1.3rem var(--body); color: var(--text); background: var(--surface-2); border: 1px solid var(--feld-rand);
  border-radius: 10px; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.taste:active { background: var(--accent); color: var(--auf-accent); }
.taste-name { flex-grow: 1.6; font-size: 1rem; }
.taste-leer { flex-grow: 5; }
.taste[aria-pressed="true"] { background: var(--accent); color: var(--auf-accent); }
/* 11 Tasten je Reihe: ab 1600 px Breite bleibt jede Taste mindestens 64 px breit. */
.tafel.mit-tastatur { width: min(920px, max(560px, 48vw)); }
@media (max-width: 980px) { .tafel, .tafel.mit-tastatur { width: 100vw; border-left: 0; } }

/* Büro, Schritt 6 — Touch und Präsentation. Beamer: Seitenleiste (380 px)
   und Laufband liegen als ein- und ausklappbare Überlagerungen über der
   Bühne; die Bühne bekommt die ganze Fläche. Knöpfe mindestens 44 px. */
.umschalter { min-height: 44px; min-width: 44px; font: 600 .9rem var(--body); color: var(--text); background: var(--glas); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; touch-action: manipulation; }
.umschalter[aria-expanded="false"] { color: var(--accent); }
.ueberlagerung-knoepfe { position: absolute; top: 10px; right: 12px; z-index: 4; display: flex; gap: 8px; }
@media (min-width: 981px) {
  body[data-ansicht="beamer"] .buero { grid-template-columns: minmax(0, 1fr); position: relative; }
  body[data-ansicht="beamer"] .panel { position: absolute; top: 0; right: 0; bottom: 0; width: 380px; z-index: 3; border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(0,0,0,.35); }
  body[data-ansicht="beamer"][data-leiste="zu"] .panel { display: none; }
  body[data-ansicht="beamer"][data-leiste="offen"] .ueberlagerung-knoepfe { right: 392px; }
  body[data-ansicht="beamer"] .laufband { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
  body[data-ansicht="beamer"][data-leiste="offen"] .laufband { right: 380px; }
  body[data-ansicht="beamer"][data-laufband="zu"] .laufband { display: none; }
}
/* Messe-Terminal: was der Besucher nicht bedient, ist ausgeblendet (der
   Server ließe es ohnehin nicht zu). */
body[data-messe] .nur-bediener { display: none; }
.messe-kasten { background: var(--messe-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.messe-kasten h2 { margin: 0 0 6px; font-size: 1.15rem; }

/* Schmale Bildschirme (ab 360 px) ohne waagerechtes Scrollen: die Spalte
   des Seitenrasters wächst nicht mit dem Inhalt der Kopfleiste (vorher
   860 px breit bei 390 px Bildschirm — die Bereichs-Knöpfe scrollen jetzt
   in sich, die Auswahlfelder werden schmaler). */
body { grid-template-columns: minmax(0, 1fr); }
.leiste { min-width: 0; }
.steuerung { min-width: 0; max-width: 100%; }
.steuerung > .schalter { min-width: 0; max-width: 100%; }
.schalter select { min-width: 0; max-width: min(60vw, 460px); text-overflow: ellipsis; }

/* Bedienung (Wunsch des Bedieners, 2026-10-08). Alles gilt in jeder
   Ansicht und jeder Breite; der Zustand der Leisten gilt je Browser
   (localStorage, in buero.js). */
/* Seitenleiste (Liste) und Laufband einzeln aus — nicht nur im Beamer. */
body[data-leiste="zu"] .panel { display: none; }
body[data-leiste="zu"] .buero { grid-template-columns: minmax(0, 1fr); }
body[data-laufband="zu"] .laufband { display: none; }
/* Büro im Vollbild: nur die Bühne (das Demo-Band bleibt — es sagt, dass
   nichts echt ist). Die Knöpfe auf der Bühne führen zurück, ebenso Esc. */
body[data-vollbild="an"] { height: 100dvh; }
body[data-vollbild="an"] .leiste, body[data-vollbild="an"] .panel, body[data-vollbild="an"] .laufband { display: none; }
body[data-vollbild="an"] .buero { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
body[data-vollbild="an"] #leiste-umschalter, body[data-vollbild="an"] #laufband-umschalter { display: none; }
body[data-vollbild="an"][data-ansicht="beamer"][data-leiste="offen"] .ueberlagerung-knoepfe { right: 12px; }
.umschalter { display: inline-flex; align-items: center; gap: 8px; }
.umschalter[aria-pressed="true"] { color: var(--auf-accent); background: var(--accent); border-color: var(--accent); }
.umschalter-icon { font-size: 1.05em; line-height: 1; }
.umschalter-rund { padding: 8px; justify-content: center; font-weight: 700; }
@media (max-width: 980px) {
  .ueberlagerung-knoepfe { left: 12px; justify-content: flex-end; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  /* Schmal: nur das Zeichen sichtbar, der Name bleibt für Screenreader. */
  .ueberlagerung-knoepfe .umschalter-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ueberlagerung-knoepfe .umschalter { padding: 8px; justify-content: center; }
}

/* Freigabe „klopft an“: oben rechts, mit Zeichen, Zahl und Text (nicht nur
   Farbe), klickbar — führt zum Pult. Bleibt, bis nichts mehr wartet. */
.freigabe-hinweis { position: fixed; top: 10px; right: 12px; z-index: 7; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; max-width: calc(100vw - 24px);
  padding: 8px 16px 8px 12px; font: 700 1rem var(--body); color: var(--auf-accent); background: var(--accent); border: 2px solid var(--text); border-radius: 999px;
  box-shadow: 0 6px 22px var(--schatten); cursor: pointer; touch-action: manipulation; }
.freigabe-hinweis[hidden] { display: none; }
.freigabe-hinweis:hover { filter: brightness(1.08); }
.fh-icon { font-size: 1.2rem; line-height: 1; }
.fh-zahl { min-width: 1.7em; padding: 0 6px; border-radius: 999px; background: var(--auf-accent); color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; }
.fh-weiter { margin-left: auto; font-weight: 600; }
.freigabe-hinweis.klopft { animation: anklopfen .9s ease-in-out 2; }
@keyframes anklopfen {
  0%, 100% { transform: none; }
  10%, 30%, 50% { transform: translateX(-4px) rotate(-3deg); }
  20%, 40% { transform: translateX(4px) rotate(3deg); }
  70% { transform: scale(1.06); }
}
body[data-freigaben="an"] .leiste { padding-right: 280px; }
/* Das Gespräch liegt rechts über allem: dort steht der Hinweis im Pult. */
body[data-tafel="offen"] #freigabe-hinweis { display: none; }
.tafel-freigabe { position: static; width: 100%; max-width: none; border-radius: 12px; box-shadow: none; text-align: left; }
@media (max-width: 600px) {
  body[data-freigaben="an"] .leiste { padding-right: 16px; padding-top: 66px; }
  .freigabe-hinweis { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .freigabe-hinweis.klopft { animation: none; }
}

/* Gespräch im Vollbild: die Tafel deckt das Büro ganz, der Text bleibt
   lesbar schmal (höchstens 920 px) in der Mitte. */
.tafel-knoepfe { display: flex; align-items: center; gap: 8px; flex: none; }
.tafel-kopf .umschalter { min-height: 56px; }
.tafel.vollbild, .tafel.mit-tastatur.vollbild { width: 100vw; border-left: 0; padding-left: max(22px, calc((100vw - 920px) / 2)); padding-right: max(22px, calc((100vw - 920px) / 2)); }
@media (max-width: 600px) {
  .tafel { padding: 14px 14px 20px; }
  .tafel-kopf h2 { font-size: 1.2rem; }
  .tafel-kopf .umschalter-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tafel-kopf .umschalter { min-width: 56px; justify-content: center; }
}

/* Tastenkürzel-Hilfe */
.tasten { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 10px 0 0; align-items: baseline; }
.tasten dt, .tasten dd { margin: 0; }
.tasten dd { color: var(--muted); font-size: .92rem; }
kbd { display: inline-block; min-width: 2.2em; text-align: center; font: 700 .88rem var(--mono); padding: 3px 8px; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; }

/* Arbeitsbereich-Umschalter (2026-10-08): ein Lauf-Bereich wird nur gelesen. */
.nurlesen { font: 700 .8rem var(--mono); color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; }
.nurlesen[hidden] { display: none; }

/* Schnellentscheid am Freigabe-Hinweis: klappt unter dem Hinweis auf. */
.freigabe-schnell { position: fixed; top: 66px; right: 12px; z-index: 7; width: min(440px, calc(100vw - 24px)); max-height: min(70vh, calc(100dvh - 80px)); overflow-y: auto;
  background: var(--surface); color: var(--text); border: 2px solid var(--accent); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px var(--schatten); }
.freigabe-schnell[hidden] { display: none; }
.fs-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fs-kopf h2 { margin: 0; font-size: 1.05rem; }
.fs-eintrag { border-top: 1px solid var(--line); padding: 8px 0; }
.fs-eintrag p { margin: 0 0 4px; }
.fs-ergebnis:empty { display: none; }
.fs-ergebnis { margin: 8px 0 0; font-weight: 700; }

/* Fortschritt je Projekt: Leiste (SVG), Satz, Welle, PRs, Schätzung, Kette. */
.fortschritt { margin: 0 0 14px; }
.fortschritt h3 { font-size: .92rem; margin: 0 0 6px; }
.fortschritt-leiste { display: block; width: 100%; height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.seg-geliefert { fill: var(--ok); }
.seg-pruefung { fill: var(--info); }
.seg-blockiert { fill: var(--alert); }
.seg-offen { fill: var(--faint); }
.fortschritt-satz { margin: 6px 0; font-size: .9rem; }
.schaetzung { font-size: .84rem; color: var(--muted); border-left: 3px solid var(--info); padding-left: 8px; margin: 6px 0; }
.kette summary { cursor: pointer; font-size: .88rem; min-height: 32px; }
.kette-liste { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.kette-liste li { background: var(--surface-2); border-radius: 8px; padding: 6px 8px; font-size: .86rem; }
.kette-liste li p { margin: 0 0 3px; }
.ketten-schritt { display: inline-block; font-size: .76rem; font-weight: 700; border-radius: 999px; padding: 0 8px; border: 1px solid var(--line); color: var(--muted); }
.kette-geliefert .ketten-schritt { color: var(--ok); border-color: var(--ok); }
.kette-pruefung .ketten-schritt { color: var(--info); border-color: var(--info); }
.kette-blockiert .ketten-schritt { color: var(--alert); border-color: var(--alert); }
