/* Aussehen der ganzen App an einer Stelle. Die Planer-Regeln selbst stehen in planer.css.
   Designsprache "Profi-Tool dunkel" nach dem Nova-Panel (docs/superpowers/specs/2026-11-30-nova-designsprache.md).
   Vorschau aller Bausteine: /planer/stil.html */

/* Schrift: Inter, selbst ausgeliefert (kein Google beim Seitenaufbau, geht auch in der Aula ohne Internet).
   Variable Schrift - eine Datei je Zeichensatz deckt alle Staerken ab. Lizenz: SIL OFL, fonts/Inter-OFL.txt. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/Inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/Inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* shortcut: Seiten und Canvas-Code, die noch "IBM Plex Sans"/"Bricolage Grotesque" fest nennen, bekommen unter dem alten
   Namen ebenfalls Inter. Entfernen, sobald alle Seiten nur noch var(--font) benutzen. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/Inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/Inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/Inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/Inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* ---- Werte, von denen alles andere lebt ----------------------------------
     Flaechen (Zinc): --bg ist die Seite (#09090b), --surface liegt darauf (wirkt wie #18181b, bleibt aber
     halbdurchsichtig, damit verschachtelte Felder wie bisher eine Stufe heller werden), --surface-2 ist
     deckend fuer Dialoge/Aufklapper, --surface-3 fuer Felder darin.
     Tiefe kommt aus duennen Linien (--line), nicht aus Schatten. */
  --bg: #09090b;
  --surface: rgba(255,255,255,.058);
  --surface-2: #18181b;
  --surface-3: #27272a;
  --line-soft: rgba(255,255,255,.05);
  --line: rgba(255,255,255,.10);
  --line-input: rgba(255,255,255,.16);
  --line-strong: rgba(255,255,255,.22);

  --text: #f4f4f5;
  --text-2: #a1a1aa;   /* Nebentext, 7.7:1 auf --bg */
  --text-3: #71717a;   /* nur Platzhalter/Deaktiviertes - fuer Lesetext zu schwach */

  /* Akzent: JoBa-Magenta. --accent ist die Flaeche (weisse Schrift darauf 5.1:1), --accent-hi die helle
     Fassung fuer Text, Raender und Fokus auf Dunkel (6.3:1 auf #18181b). */
  --accent: #d1157c;
  --accent-hover: #d91e86;
  --accent-hi: #ff5fae;
  --accent-rgb: 209, 21, 124;
  --accent-hi-rgb: 255, 95, 174;
  --on-accent: #fff;
  --accent-soft: color-mix(in oklab, var(--accent) 16%, transparent);

  /* Bereichsfarben: je Arbeitsbereich ein Ton, getoent als Kachel, Icon-Box, aktiver Eintrag */
  --area-licht: #facc15;
  --area-ton: #22d3ee;
  --area-buehne: #a78bfa;
  --area-beamer: #f472b6;
  --area-leitung: #e4e4e7;
  --area-planung: var(--accent-hi);
  --area-ablauf: var(--accent-hi);
  --on-area: #09090b;   /* alle Bereichsfarben sind hell: Schrift auf voller Flaeche ist dunkel */

  /* Status sind DATEN, keine Deko: nur fuer wartet / bestaetigt / kaputt / live benutzen. */
  --ok: #22c55e;
  --warn: #fbbf24;
  --danger: #ef4444;
  --danger-hi: #f87171;
  --danger-fill: #dc2626;
  --info: #38bdf8;
  --live: #22d3ee;

  --hover: rgba(255,255,255,.05);
  --press: rgba(255,255,255,.10);
  --focus: var(--accent-hi);
  --input-bg: rgba(255,255,255,.04);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 24px;
  --lh-tight: 1.2; --lh-base: 1.5;
  --fw-semi: 600; --fw-bold: 700;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 48px;

  --radius-sm: 8px;    /* Knoepfe, Eingaben, Sidebar-Eintraege */
  --radius-md: 12px;   /* Karten, Felder, Banner */
  --radius-lg: 16px;   /* Dialoge, Palette */
  --radius-full: 9999px;
  --radius: var(--radius-md);

  --shadow-pop: 0 20px 50px rgba(0,0,0,.45);   /* nur fuer Schwebendes: Dialog, Palette, Aufklapper */
  --shadow-toast: 0 12px 32px rgba(0,0,0,.45);
  --glass: rgba(24,24,27,.82);
  --glass-blur: blur(10px);
  --overlay: rgba(3,7,18,.7);
  --ring-bg: #18181b;  /* Ring um Warnpunkte = Untergrund */

  --dur: .15s;
  --ease: cubic-bezier(.2,.8,.2,1);

  /* Alte Namen, damit unterwegs nichts bricht. Fallen weg, wenn alle Seiten umgestellt sind. */
  --ink: var(--text);
  --ink-2: #d4d4d8;
  --muted: var(--text-2);
  --brand: var(--accent);
  --brand-2: var(--accent-hover);
  --brand-hi: var(--accent-hi);
  --brand-rgb: var(--accent-rgb);        /* fuer halbdurchsichtige Toene: rgba(var(--brand-rgb), .3) */
  --brand-hi-rgb: var(--accent-hi-rgb);
  --on-brand: var(--on-accent);
  --brand-accent: var(--accent);
  --font-ui: var(--font);
  --font-display: var(--font);
  --sp-1: var(--space-1); --sp-2: var(--space-2); --sp-3: var(--space-3); --sp-4: var(--space-4); --sp-5: var(--space-6); --sp-6: var(--space-7);
  --sh-1: 0 1px 2px rgba(0,0,0,.25);
  --sh-2: var(--shadow-pop);
  --glow: none;
  --bg-glow: none;

  color-scheme: dark;
}
/* Helle Fassung: dieselben Namen, andere Werte. Umgestellt wird ueber data-theme am <html>,
   gesetzt von planer/js/dialog.js aus dem Speicher des Geraets. */
:root[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #f4f4f5;
  --line-soft: rgba(9,9,11,.05);
  --line: rgba(9,9,11,.10);
  --line-input: rgba(9,9,11,.16);
  --line-strong: rgba(9,9,11,.24);
  --text: #09090b;
  --text-2: #52525b;
  --text-3: #a1a1aa;
  --ink-2: #3f3f46;
  --accent: #c2106f;            /* auf Weiss muss der Akzent dunkler sein, sonst liest es sich nicht */
  --accent-hover: #ad0d63;
  --accent-hi: #b5126c;
  --accent-rgb: 194, 16, 111;
  --accent-hi-rgb: 181, 18, 108;
  --area-licht: #a16207;        /* die dunklen Fassungen: die hellen Toene sind auf Weiss nicht lesbar */
  --area-ton: #0e7490;
  --area-buehne: #7c3aed;
  --area-beamer: #be185d;
  --area-leitung: #3f3f46;
  --on-area: #fff;
  --warn: #a16207;
  --ok: #15803d;
  --danger: #b91c1c;
  --danger-hi: #b91c1c;
  --info: #0369a1;
  --live: #0e7490;
  --hover: rgba(9,9,11,.04);
  --press: rgba(9,9,11,.08);
  --input-bg: #fff;
  --glass: rgba(255,255,255,.82);
  --overlay: rgba(9,9,11,.45);
  --ring-bg: #fff;
  --shadow-pop: 0 20px 50px rgba(0,0,0,.16);
  --sh-1: 0 1px 2px rgba(0,0,0,.05);
  color-scheme: light;
}
:root[data-theme="light"] .btn:not(.primary):not(.ghost):not(.quiet):not([aria-pressed="true"]) { background: #fff } /* sonst wird der Akzent-Knopf weiss auf weiss */
:root[data-theme="light"] .btn:not(.primary):not([aria-pressed="true"]):hover { background: var(--hover) }
:root[data-theme="light"] .panel { background: #fff }

* { box-sizing: border-box }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: var(--fs-base)/var(--lh-base) var(--font-ui) }
html { background: var(--bg) } body { min-height: 100vh; background: var(--bg-glow), var(--bg); background-attachment: fixed; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale }
[hidden] { display: none !important }
main { padding: 16px; max-width: 1536px; margin: 0 auto; min-width: 0 } /* min-width: Handy - breite Zeilen duerfen die Seite nicht aufziehen */
h1 { font: 700 var(--fs-2xl)/var(--lh-tight) var(--font-display); letter-spacing: -.022em; margin: 0; text-wrap: balance } h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; margin: 0 } p { margin: 0 }
.page-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 0 -16px 16px; padding: 4px 16px 14px; border-bottom: 1px solid var(--line) }

.page-heading p { color: var(--muted); font-size: 13px }
.page-actions, .planner-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
/* Flach: duenne Linie statt Schatten, kein Verlauf, kein Leuchten */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color var(--dur) var(--ease) }
.panel > :not(.planner-toolbar):not(.planner-canvas):not(.planner-hint) { margin: 12px 14px }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px }
.stack, .form-stack { display: grid; gap: 12px } .stack > .panel { padding-bottom: 2px }
.stack > * { min-width: 0 } /* Handy: ein breiter Inhalt verbreitert sonst die ganze Seite */
@media (max-width: 760px) { .stack > .panel:has(table) { overflow-x: auto } }

/* ---- Knoepfe ------------------------------------------------------------------
   .btn = sekundaer (Standard) · .primary · .ghost (ohne Rand) · .quiet (durchsichtig mit Rand) · .danger (rot getoent)
   · .primary.danger (rot voll, fuer "endgueltig loeschen") · .icon (quadratisch, nur Symbol) · .sm (klein) */
.btn { font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semi); line-height: 1.25; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line-input); background: rgba(255,255,255,.05); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform .12s var(--ease) }
.btn:hover { border-color: var(--line-strong); background: rgba(255,255,255,.1) } .btn:active:not(:disabled) { transform: scale(.97) }
.btn[aria-pressed="true"] { background: var(--brand); border-color: transparent; color: var(--on-brand) }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand) } .btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2) }
.btn.quiet { background: transparent } .btn.quiet:hover { background: var(--hover) }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2) } .btn.ghost:hover { background: var(--hover); color: var(--text) }
.btn.danger { color: var(--danger-hi) } .btn.danger:hover { background: color-mix(in oklab, var(--danger) 12%, transparent); border-color: color-mix(in oklab, var(--danger) 40%, transparent) }
.btn.primary.danger { background: var(--danger-fill); border-color: var(--danger-fill); color: #fff } .btn.primary.danger:hover { background: #e23a3a; border-color: #e23a3a }
.btn.icon { padding: 0; width: 34px; height: 34px; justify-content: center; flex: none }
.btn.sm { padding: 5px 9px; font-size: var(--fs-xs); gap: 5px } .btn.icon.sm { width: 28px; height: 28px; padding: 0 }
.btn svg.icon { width: 16px; height: 16px } .btn.icon svg.icon { width: 18px; height: 18px }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px } input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-color: var(--accent-hi); box-shadow: 0 0 0 3px rgba(var(--accent-hi-rgb),.22) }
::selection { background: var(--brand); color: var(--on-brand) }

/* ---- Eingaben ----------------------------------------------------------------- */
label { display: grid; gap: 4px; font-size: 12px; color: var(--muted) }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--input-bg); border: 1px solid var(--line-input); border-radius: var(--radius-sm); padding: 8px 11px; min-width: 0; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease) }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong) }
input::placeholder, textarea::placeholder { color: var(--text-3) }
select option { background: var(--surface-2); color: var(--text) }
input[type=range], input[type=checkbox], input[type=radio] { accent-color: var(--accent) }
/* Feld mit Beschriftung und Hilfetext: <label class="field"><span>Name</span><input><small>Hilfe</small></label> */
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text) } .field > span { font-weight: 600 } .field > small { color: var(--text-2); font-size: 12px }
.field input, .field select, .field textarea { width: 100% }
/* Auswahl mit eigenem Pfeil (nur wo .select dransteht - fremde Polster wuerden den Pfeil sonst ueberdecken) */
select.select { appearance: none; padding-right: 32px; background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E") no-repeat right 9px center / 16px }
/* Eigenes Kaestchen: <input type="checkbox" class="check"> */
input.check { appearance: none; width: 18px; height: 18px; padding: 0; margin: 0; flex: none; display: inline-grid; place-items: center; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--input-bg); cursor: pointer; vertical-align: -4px }
input.check:checked { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5l10 -10'/%3E%3C/svg%3E") no-repeat center / 13px; border-color: var(--accent) }
input.check:disabled { opacity: .45; cursor: default }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer }

/* Schmale, dezente Scrollleisten statt der grauen Standardbalken */
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent }
:root[data-theme="light"] * { scrollbar-color: rgba(0,0,0,.22) transparent }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important } }
input[type=checkbox] { width: auto }
.muted { color: var(--muted) } .mono { font-family: var(--mono) } .warn { color: var(--warn) }
.text-link { color: var(--accent-hi); font-size: 13px; text-decoration: none } .text-link:hover { text-decoration: underline }
details summary { cursor: pointer; color: var(--muted); font-size: 13px }
kbd { display: inline-block; min-width: 1.5em; padding: 1px 5px; font: 600 11px/1.4 var(--font); text-align: center; color: var(--text-2); border: 1px solid rgba(127,127,127,.3); border-bottom-width: 2px; border-radius: 5px }
.overline { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2) }
.tabular { font-variant-numeric: tabular-nums }
/* Auf dem Handy: nur ansehen */
body.readonly [data-edit-tools], body.readonly [data-inspector], body.readonly [data-save], body.readonly [data-undo], body.readonly [data-redo], body.readonly [data-edit-only] { display: none !important }
/* Funktionen des EventTech-Managers, die WDL Tour nicht hat (Lager, PDF, Fotos, Kamera-Scan) */
[data-etm-only] { display: none !important }

/* Live-Vorschau vom Lichtpult: nichts speichern, Saal abdunkeln */
body.live [data-save] { display: none !important } body.live .planner-canvas { background: #000 } [data-live][aria-pressed="true"] { background: #ef4444; border-color: #ef4444; color: #fff }

/* Profi-Planer (js/pro.js) */
.pro-bar { border-top: 0; padding-top: 0 } .pro-bar select, .pro-goto { font-size: 13px; padding: 6px 8px }
.pro-goto { width: 170px }
.pro-pop { position: relative } .pro-pop > summary { list-style: none } .pro-pop > summary::-webkit-details-marker { display: none }
.pro-pop[open] > summary { background: var(--accent-soft); border-color: var(--accent-hi) }
.pro-pop-body { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 270px; display: grid; gap: 7px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-pop) }
.pro-pop-body b { font-size: 12px; color: var(--muted); margin-top: 4px } .pro-keys { font-size: 12px; color: var(--muted); line-height: 1.6 }
.pro-mini { position: absolute; right: 10px; bottom: 10px; border-radius: 8px; border: 1px solid var(--line); cursor: crosshair; touch-action: none; z-index: 4 }
.pro-legend { position: absolute; left: 10px; bottom: 10px; max-width: min(420px, 60%); display: grid; gap: 4px; padding: 9px 11px; font-size: 12px; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); border-radius: 10px; z-index: 4 }
.pro-grad { height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgb(20,20,60), rgb(40,80,200), rgb(30,190,110), rgb(250,220,60), rgb(255,255,245)) }
.pro-pad { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(3, 56px); gap: 6px; z-index: 4 }
.pro-pad .btn { justify-content: center; padding: 10px 0; touch-action: none; background: rgba(9,9,11,.8) }
.pro-ghost { position: fixed; z-index: 50; pointer-events: none; padding: 5px 10px; font-size: 12px; border-radius: 8px; background: var(--brand-accent); color: #fff }
.pro-colors { display: flex; flex-wrap: wrap; gap: 6px } .pro-colors .btn { width: 26px; height: 26px; padding: 0; border-radius: 50% }
.pro-side .planner-actions .btn { font-size: 12px; padding: 6px 9px } .pro-side small { display: block; margin-top: 6px }
.pro-scene { display: inline-flex; gap: 2px }
.pro-out:empty { display: none } .pro-version { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px }

/* Druckmappe: auf dem Bildschirm unsichtbar, beim Drucken nur sie */
#print-pack { display: none }
@media print {
  @page { size: A4; margin: 12mm }
  body > :not(#print-pack):not(#labels) { display: none !important }
  html, body { background: #fff !important; color: #111 !important; font: 10.5pt/1.4 system-ui, sans-serif }
  #print-pack { display: block }
  #print-pack h1 { font-size: 20pt; margin: 0 0 4px } #print-pack h2 { font-size: 13pt; margin: 14px 0 6px; border-bottom: 1px solid #999; break-after: avoid } #print-pack h3 { font-size: 10.5pt; margin: 6px 0 2px }
  #print-pack header p { color: #444; margin: 0 }
  #print-pack .pics { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin-top: 6mm }
  #print-pack figure { margin: 0; break-inside: avoid } #print-pack img { width: 100%; border: 1px solid #ccc } #print-pack figcaption { font-size: 9pt; color: #555 }
  #print-pack .cols { columns: 2; column-gap: 8mm } #print-pack .cols > div { break-inside: avoid }
  #print-pack ul { margin: 0; padding-left: 16px } #print-pack ul.cols { list-style: none; padding: 0 }
  #print-pack table { width: 100%; border-collapse: collapse; font-size: 9pt } #print-pack th, #print-pack td { border: 1px solid #bbb; padding: 3px 5px; text-align: left } #print-pack th { background: #eee }
  #print-pack section { break-inside: auto } #print-pack tr { break-inside: avoid }
}
@media (max-width: 700px) { .pro-mini { width: 96px !important; height: auto !important } .pro-legend { max-width: calc(100% - 120px) } }

/* Toasts sind immer dunkel (auch im hellen Aussehen): eigene Werte fuer alles darin */
.autosave, .toast { color-scheme: dark; --ink: #f4f4f5; --text: #f4f4f5; --ink-2: #d4d4d8; --muted: #a1a1aa; --text-2: #a1a1aa; --hover: rgba(255,255,255,.06); --ok: #22c55e; --warn: #f6bd2c; --danger: #e5484d; --info: #4c8dff; --brand-hi: #ff5fae; --accent-hi: #ff5fae; --brand-hi-rgb: 255, 95, 174 }
/* Automatisch speichern (js/autosave.js): Hinweis unten rechts, der Balken laeuft durch, dann wird gespeichert */
.autosave { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 2600; width: min(380px, calc(100vw - 32px)); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 12px 12px 12px 14px; border-radius: 10px; background: #121214; color: #f4f4f5; border: 1px solid #2a2a2e; box-shadow: var(--shadow-toast); animation: as-rein .18s ease-out }
.autosave[hidden] { display: none }
@keyframes as-rein { from { transform: translateY(8px); opacity: 0 } }
.as-ic { width: 20px; height: 20px; margin-top: 1px; color: var(--warn) } .as-ic svg { width: 100%; height: 100% }
.as-txt b { display: block; font: 700 15px/1.25 var(--font-display) } .as-txt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px }
.as-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; border: 1px solid rgba(var(--brand-hi-rgb), .45); background: rgba(var(--brand-hi-rgb), .12); color: var(--brand-hi); cursor: pointer; transition: background var(--dur) }
.as-btn:hover { background: rgba(var(--brand-hi-rgb), .24) } .as-btn svg { width: 17px; height: 17px } .as-btn[hidden] { display: none }
.as-bar { grid-column: 1 / -1; height: 5px; margin-top: 8px; border-radius: 3px; background: var(--hover); overflow: hidden }
.as-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--ok) }
.autosave[data-art="speichert"] .as-bar i { background: var(--brand-hi); animation: as-puls 1s ease-in-out infinite alternate }
@keyframes as-puls { to { opacity: .45 } }
.autosave[data-art="ok"] { border-color: color-mix(in srgb, var(--ok) 55%, transparent) } .autosave[data-art="ok"] .as-ic { color: var(--ok) } .autosave[data-art="ok"] .as-bar { display: none }
.autosave[data-art="fehler"] { border-color: var(--danger) } .autosave[data-art="fehler"] .as-ic { color: var(--danger) }
@media print { .autosave { display: none } }
/* Ein Satz unter dem Titel: wozu die Seite da ist (stand frueher in licht.css; der Pult-Look gilt seit 29.11. nur noch im Licht-Pult) */
.wozu { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; max-width: 70ch }
.wozu b { color: var(--brand-hi) }

/* =====================================================================================
   Bausteine der Designsprache. Jeder ist in /planer/stil.html vorgefuehrt.
   Zustaende heissen .is-… (is-ok, is-warn, is-danger, is-info, is-accent, is-active, is-on, is-locked),
   damit sie nicht mit alten Seitenklassen wie .ok/.err zusammenstossen.
   Farbe je Baustein ueber --c (Status) bzw. --area (Bereich); Toene immer per color-mix getoent, nie vollflaechig.
   ===================================================================================== */

/* Symbol aus dem Sprite: <svg class="icon" aria-hidden="true"><use href="/planer/icons.svg#i-home"/></svg> */
svg.icon { width: 1.125em; height: 1.125em; flex: none; vertical-align: -.2em; stroke-width: 2 }
svg.icon.sm { width: 1em; height: 1em } svg.icon.lg { width: 1.3rem; height: 1.3rem }

/* Karte: Kopf mit Titel und Link, Liste mit Trennern oder freier Inhalt */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md) }
.card-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft) }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.card-head p { font-size: 12px; color: var(--text-2) } .card-head > :last-child:not(:first-child) { margin-left: auto }
.card-head > svg.icon { color: var(--c, var(--text-2)) }
.card-body { padding: 16px }
.card-list { list-style: none; margin: 0; padding: 0 }
.card-list > li { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 14px; border-top: 1px solid var(--line-soft) }
.card-list > li:first-child { border-top: 0 } .card-list > li:hover { background: var(--hover) }
.card-list small { display: block; color: var(--text-2); font-size: 12px }

/* Bereichs-Kachel (Signatur): getoent in Bereichsfarbe, aktiv als Verlauf mit farbigem Schein, roter Warnpunkt */
.tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px }
.tile { --area: var(--accent-hi); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 58px; padding: 9px 4px 7px; border: 0; border-radius: 14px; font: 700 11px/1.1 var(--font); letter-spacing: .01em; text-decoration: none; cursor: pointer; color: var(--area); background: color-mix(in oklab, var(--area) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--area) 18%, transparent); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease) }
.tile:hover { transform: translateY(-2px); background: color-mix(in oklab, var(--area) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--area) 40%, transparent) }
.tile svg.icon { width: 1.3rem; height: 1.3rem }
.tile.is-active { color: var(--on-area); background: linear-gradient(145deg, var(--area), color-mix(in oklab, var(--area) 72%, transparent)); box-shadow: 0 6px 18px -6px color-mix(in oklab, var(--area) 75%, transparent), inset 0 0 0 1px rgba(255,255,255,.18) }
.tile.is-locked { opacity: .5; cursor: not-allowed } .tile.is-locked:hover { transform: none }
.tile-dot { position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 2px var(--ring-bg), 0 0 6px 1px rgba(239,68,68,.75); animation: ds-glow 1.8s ease-in-out infinite }
.tile-lock { position: absolute; top: 5px; right: 5px; width: 12px; height: 12px }
@keyframes ds-glow { 50% { box-shadow: 0 0 0 2px var(--ring-bg), 0 0 10px 3px rgba(239,68,68,.45) } }

/* Status-Pille (getoent) · Zaehler · neutrales Schild · Statuspunkt */
.pill { --c: var(--text-2); display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; color: var(--c); background: color-mix(in oklab, var(--c) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 30%, transparent) }
.pill.round { border-radius: var(--radius-full) } .pill b { font-weight: 800 } .pill svg.icon { width: 13px; height: 13px }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-full); font: 700 11px/1 var(--font); font-variant-numeric: tabular-nums; color: #fff; background: var(--danger-fill) } .count[class*="is-"] { background: var(--c); color: var(--on-area) }
.tag { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 500; color: var(--text-2); background: rgba(127,127,127,.15) }
.status-dot { --c: #a1a1aa; display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c) }
.status-dot.is-live { --c: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); animation: ds-pulse 2.4s infinite }
@keyframes ds-pulse { 50% { box-shadow: 0 0 0 5px rgba(34,197,94,.08) } }

/* Getoente Icon-Box: Lead-Element fuer KPI, Listenzeilen, Hinweise */
.ibox { --c: var(--area, var(--accent-hi)); display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--radius-sm); color: var(--c); background: color-mix(in oklab, var(--c) 12%, transparent) }
.ibox svg.icon { width: 20px; height: 20px } .ibox.sm { width: 32px; height: 32px } .ibox.sm svg.icon { width: 17px; height: 17px }
.ibox.round { border-radius: 50% }

/* Kennzahl-Kachel: Icon-Box links, grosse Zahl, kleines Etikett; Hover faerbt nur die Linie */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px }
.kpi { display: flex; align-items: center; gap: 12px; padding: 16px; min-width: 0; color: inherit; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); transition: border-color var(--dur) var(--ease) }
a.kpi:hover, button.kpi:hover { border-color: color-mix(in oklab, var(--accent-hi) 50%, transparent) }
.kpi-num { display: block; font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.kpi-label { display: block; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.kpi > div { min-width: 0 }

/* Tabelle in einer Karte: <div class="card table-wrap"><table class="table">… */
.table-wrap { overflow-x: auto }
.table { width: 100%; border-collapse: collapse; font-size: 14px }
.table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--text-2); background: rgba(127,127,127,.06); white-space: nowrap }
.table td { padding: 10px 12px; border-top: 1px solid var(--line-soft); vertical-align: middle }
.table tbody tr:hover td { background: var(--hover) }
.table .num { text-align: right; font-variant-numeric: tabular-nums }
.table-wrap > .table th:first-child { border-top-left-radius: var(--radius-md) } .table-wrap > .table th:last-child { border-top-right-radius: var(--radius-md) }

/* Reiter: Segment-Leiste. <div class="tabset" role="tablist"><button role="tab" aria-selected="true">… */
.tabset { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md) }
.tabset > button, .tabset > a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: var(--radius-sm); font: 500 13px/1.3 var(--font); color: var(--text-2); background: none; cursor: pointer; text-decoration: none; transition: background var(--dur), color var(--dur) }
.tabset > :hover { color: var(--text); background: var(--hover) }
.tabset > [aria-selected="true"], .tabset > [aria-pressed="true"], .tabset > .is-active { color: var(--accent-hi); background: rgba(127,127,127,.12) }
.tabset.sm { padding: 3px; gap: 2px; border-radius: 10px } .tabset.sm > button, .tabset.sm > a { padding: 4px 10px; font-size: 12px; border-radius: 7px }

/* Hinweis-Banner (getoent, Icon links, fettes Leitwort) */
.callout { --c: var(--info); display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; font-size: 14px; color: var(--text); border: 1px solid color-mix(in oklab, var(--c) 30%, transparent); background: color-mix(in oklab, var(--c) 10%, transparent); border-radius: var(--radius-md) }
.callout > svg.icon { width: 20px; height: 20px; color: var(--c); margin-top: 1px } .callout b { color: var(--c) }

/* Leerzustand: freundlich und konkret ("Gerade ist nichts dringend.") */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 32px 16px; text-align: center; color: var(--text-2); font-size: 14px }
.empty-state .ibox { margin-bottom: 6px; --c: var(--text-2); background: rgba(127,127,127,.15); border-radius: 50% }
.empty-state b { color: var(--text); font-weight: 600 }

/* Ladeplatzhalter */
.skeleton { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgba(127,127,127,.12) 25%, rgba(127,127,127,.22) 50%, rgba(127,127,127,.12) 75%) 0 0 / 300% 100%; animation: ds-shimmer 1.4s linear infinite }
.skeleton.lg { height: 20px } .skeleton.block { height: 72px; border-radius: var(--radius-md) } .skeleton.circle { width: 36px; height: 36px; border-radius: 50% }
@keyframes ds-shimmer { from { background-position: 100% 0 } to { background-position: 0 0 } }

/* Live-Leiste (Signatur): klebt oben, Glas, Chips mit Punkt oder Symbol und fetter Zahl */
.livebar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 6px 7px 6px 10px; border-radius: 14px; background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: 0 0 0 1px var(--line) }
.livebar .chip { display: inline-flex; align-items: center; gap: 6px; height: 29px; padding: 0 10px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink-2); background: rgba(127,127,127,.12) }
.livebar .chip b { font-weight: 800; color: var(--text) } .livebar .chip svg.icon { width: 15px; height: 15px; opacity: .75 }
.livebar .chip[class*="is-"] { color: var(--c); background: color-mix(in oklab, var(--c) 14%, transparent) } .livebar .chip[class*="is-"] b { color: inherit }
.livebar .spacer { flex: 1 }
@media (max-width: 640px) { .livebar .chip.detail { display: none } }

/* Toast unten rechts (Signatur): dunkel, Symbol in Statusfarbe, Ablaufbalken, der bei Hover anhaelt */
.toast-stack { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 2700; display: grid; gap: 10px; justify-items: end }
.toast { --c: var(--info); --dauer: 6s; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 10px; width: min(380px, calc(100vw - 32px)); padding: 12px 12px 20px 14px; color: #f4f4f5; background: #121214; border: 1px solid #2a2a2e; border-radius: 10px; box-shadow: var(--shadow-toast); animation: ds-toast-in .18s ease-out }
.toast > svg.icon { width: 22px; height: 22px; color: var(--c) }
.toast-txt { flex: 1; min-width: 0 } .toast-title { display: block; font-size: 15px; font-weight: 700; color: #fff } .toast-body { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: #d4d4d8 }
.toast-close { width: 30px; height: 30px; flex: none; display: grid; place-items: center; padding: 0; border: 2px solid #e5484d; border-radius: 6px; color: #e5484d; background: transparent; cursor: pointer }
.toast-close:hover { background: rgba(229,72,77,.12) } .toast-close svg.icon { width: 16px; height: 16px }
.toast-bar { position: absolute; left: 12px; right: 12px; bottom: 7px; height: 5px; border-radius: 3px; background: var(--c); transform-origin: left; animation: ds-zeit var(--dauer) linear forwards }
.toast:hover .toast-bar { animation-play-state: paused }
@keyframes ds-toast-in { from { opacity: 0; transform: translateY(8px) } }
@keyframes ds-zeit { from { transform: scaleX(1) } to { transform: scaleX(0) } }

/* Dialog (Glas): als <dialog class="modal"> oder .modal in .modal-backdrop */
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: var(--overlay); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: ds-fade .15s ease-out }
.modal { width: min(440px, 100%); max-height: 86vh; overflow: auto; padding: 24px; color: var(--text); background: color-mix(in oklab, var(--surface-2) 88%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop) }
dialog.modal { margin: auto } dialog.modal::backdrop { background: var(--overlay); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px) }
.modal-title { margin: 0; font-size: 16px; font-weight: 600 } .modal-text { margin-top: 8px; font-size: 14px; color: var(--text-2) }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 24px }
@keyframes ds-fade { from { opacity: 0 } }

/* Suchpalette Strg+K */
.palette-overlay { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px) }
.palette { width: min(640px, 100%); max-height: 75vh; display: flex; flex-direction: column; overflow: hidden; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop) }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(127,127,127,.2); color: var(--text-2) }
.palette-input input { flex: 1; border: 0; background: none; padding: 2px 0; font-size: 15px; box-shadow: none !important }
.palette-list { overflow: auto; padding: 4px 8px 8px }
.palette-group { padding: 9px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2) }
.palette-hit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 9px; text-align: left; color: inherit; background: none; font: inherit; cursor: pointer; text-decoration: none }
.palette-hit:hover { background: var(--hover) }
.palette-hit.is-on { color: var(--accent-hi); background: var(--accent-soft) }
.palette-hit .t { display: block; font-size: 14px; font-weight: 500 } .palette-hit .s { display: block; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.palette-hit > div { min-width: 0 } .palette-hit kbd { margin-left: auto }
.palette-foot { display: flex; flex-wrap: wrap; gap: 16px; padding: 8px 16px; font-size: 12px; color: var(--text-2); border-top: 1px solid rgba(127,127,127,.2) }

/* Seitenleiste: Logo, Bereichs-Kacheln, Such-Knopf, Gruppen mit eingerueckten Unterpunkten, Konto-Karte */
.sidebar { display: flex; flex-direction: column; gap: 12px; width: 264px; padding: 12px; background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 4px 6px; font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none } .sidebar-logo img { width: 32px; height: 32px; border-radius: 50% }
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; font: 500 13px var(--font); color: var(--text-2); background: none; border: 1px solid rgba(127,127,127,.25); border-radius: 10px; cursor: pointer }
.search-btn:hover { background: var(--hover); color: var(--text) } .search-btn kbd { margin-left: auto }
.nav-group { display: grid; gap: 2px }
.nav-group-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2) }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--text-2); text-decoration: none; transition: background var(--dur), color var(--dur) }
.nav-item:hover { background: var(--hover); color: var(--text) }
.nav-item svg.icon { width: 18px; height: 18px; color: var(--text-3) }
.nav-item.is-active, .nav-item[aria-current="page"] { color: var(--area, var(--accent-hi)); background: color-mix(in oklab, var(--area, var(--accent)) 14%, transparent) }
.nav-item.is-active svg.icon, .nav-item[aria-current="page"] svg.icon { color: inherit }
.nav-item .count { margin-left: auto }
.nav-sub { display: grid; gap: 2px; margin-inline-start: 17px; padding-inline-start: 8px; border-inline-start: 1px solid var(--line) }
.account { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 8px 10px; border-radius: 14px; color: var(--text); background: rgba(127,127,127,.07); box-shadow: inset 0 0 0 1px rgba(127,127,127,.2); text-decoration: none }
.account:hover { background: rgba(127,127,127,.14) }
.account-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--on-accent); background: var(--accent) }
.account b { display: block; font-size: 14px; font-weight: 700 } .account small { display: block; font-size: 12px; font-weight: 500; color: var(--text-2) }

/* =====================================================================================
   Arbeitsseiten des Planers (<main class="seite">, alles ausser Licht-Pult und Show-Fenster).
   Kopf:  <div class="page-heading"><div class="seite-titel"><span class="ibox"><svg class="icon">…</svg></span>
            <div><p class="overline">Bereich</p><h1>Titel</h1><p data-sub>Untertitel</p><p class="wozu">Wozu</p></div></div>
          <div class="page-actions">Knoepfe</div></div>
   Die Bereichsfarbe (--area) setzt js/seitenleiste.js als .area-… an <main>: Icon-Box, Overline und Fokus folgen ihr.
   Panels mit .panel-heading oder <h2> als erstem Kind bekommen einen Karten-Kopf mit Trennlinie.
   ===================================================================================== */
.seite { padding: var(--space-6) var(--space-6) var(--space-8) }
.seite .page-heading { align-items: flex-start; gap: var(--space-4) var(--space-6); margin: 0 0 var(--space-6); padding: 0 0 var(--space-5); border-bottom: 1px solid var(--line-soft) }
.seite-titel { display: flex; align-items: flex-start; gap: var(--space-4); flex: 1 1 380px; min-width: 0 }
.seite-titel > div { min-width: 0 }
.seite-titel .ibox { width: 44px; height: 44px; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 24%, transparent) }
.seite-titel .ibox svg.icon { width: 22px; height: 22px }
.seite-titel .overline { margin: 1px 0 3px; font-size: 11px; color: var(--area, var(--accent-hi)) }
.seite-titel h1 .muted { font-weight: 500; color: var(--text-2) }
.seite-titel p:empty { display: none }
.seite-titel p[data-sub] { margin-top: 3px; font-size: 13px; color: var(--text-2) }
.seite .wozu { margin-top: 8px; font-size: 13.5px; color: var(--text-2); max-width: 72ch } .seite .wozu b { color: var(--text); font-weight: 600 }
.seite .page-actions { justify-content: flex-end; padding-top: 4px }
.seite .page-actions [role="status"] { font-size: 12px; color: var(--text-2) } .seite .page-actions [role="status"]:empty { display: none }
/* Unterzeile unter dem Kopf: Seiten zum selben Plan, Druck usw. */
.seite-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: calc(-1 * var(--space-3)) 0 var(--space-5) }
/* Karten-Kopf fuer alte .panel-Abschnitte (auch die, die JS zeichnet) */
.seite .panel.panel > .panel-heading:first-child, .seite .panel.panel > h2:first-child { margin: 0; padding: 12px 14px; min-height: 48px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap }
.seite .panel > h2:first-child, .seite .panel-heading > h2, .seite .panel-heading > b:first-child { font-size: 14px; font-weight: 600; color: var(--text) }
.seite .panel.panel > h2:first-child { display: flex; align-items: center }
.seite .panel-heading > .muted, .seite .panel-heading > span:not([class]) { font-size: 12px; color: var(--text-2) }
.seite .panel-heading > h2 + .muted, .seite .panel-heading > b + .muted { margin-right: auto }
/* Abstand zwischen Abschnitten direkt in <main> */
.seite > * + .panel, .seite > * + .card, .seite > * + .callout { margin-top: var(--space-4) }
.seite .callout { max-width: 86ch }
/* Leerzustand der alten Seiten (.leer/.empty): wie .empty-state, nur kompakter */
.seite .leer:not(.zelle), .seite .empty { /* .zelle.leer: leere Rasterzellen im Protokoll bleiben leer */ padding: 22px 16px; text-align: center; font-size: 13.5px; color: var(--text-2); border: 1px dashed var(--line); border-radius: var(--radius-md); background: rgba(127,127,127,.04) }
@media (max-width: 760px) {
  .seite { padding: var(--space-4) var(--space-4) var(--space-7) }
  .seite .page-heading { margin-bottom: var(--space-5); padding-bottom: var(--space-4) }
  .seite .page-actions { justify-content: flex-start; padding-top: 0 }
  .seite-titel { gap: var(--space-3) } .seite-titel .ibox { width: 36px; height: 36px } .seite-titel .ibox svg.icon { width: 18px; height: 18px }
  .seite-titel h1 { font-size: 20px }
}
@media (min-width: 1800px) { .seite { padding-inline: var(--space-7) } }
@media print { .seite { padding: 0 } .seite-titel .ibox, .seite-leiste { display: none } }

/* Rechte-Sperre der Planer-Seiten (js/zugang.js). Solange unklar ist, wer da ist: Inhalt verdecken statt ihn kurz zu zeigen */
html.joba-pruefe body > *:not(.joba-sperre) { visibility: hidden }
.joba-sperre { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; padding: 24px; background: var(--bg); text-align: center }
.joba-sperre h1 { margin: 0 0 10px; font: 700 24px var(--font); letter-spacing: -.02em }
.joba-sperre p { margin: 0 auto 20px; max-width: 38ch; color: var(--text-2) }
/* Eigene Farben statt .btn: die Planer-Seiten biegen .btn teils um, der Weg zurueck muss sichtbar bleiben */
.joba-sperre a.weg { display: inline-block; padding: 9px 16px; border-radius: var(--radius-sm); background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 14px; text-decoration: none }
.joba-sperre a.weg:hover { background: var(--accent-hover) }
/* Raus-Knopf der Pult-Seiten (raus.js): fest oben links. Cue-Liste nur im Show-Modus, Ablauf nur in #show
   (der Knopf sitzt dort), am Licht-Pult (body.lp) immer - mit dessen eigenen Pult-Farben. */
.raus-knopf { position: fixed; top: var(--space-2); left: var(--space-2); z-index: 40; display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2); font: var(--fw-semi) var(--fs-sm) var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; touch-action: manipulation }
.raus-knopf:hover { background: var(--hover) } .raus-knopf:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px }
body:not(.showmode, .lp) > .raus-knopf { display: none }
.raus-hinweis { position: fixed; top: calc(var(--space-2) + 38px); left: var(--space-2); z-index: 2600; padding: var(--space-1) var(--space-3); font: var(--fw-semi) var(--fs-sm) var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm) }
.lp .raus-knopf, .lp .raus-hinweis { font-family: var(--ui); color: var(--x); background: var(--win2); border-color: var(--line2); border-radius: 0 }
.lp .raus-knopf:hover { background: var(--title) } .lp .raus-knopf:focus-visible { outline-color: var(--sel) }
@media print { .raus-knopf, .raus-hinweis { display: none } }

/* Zustaende und Bereiche zuletzt: sie muessen die Grundwerte der Bausteine (gleiche Spezifitaet) ueberschreiben */
.is-ok { --c: var(--ok) } .is-warn { --c: var(--warn) } .is-danger { --c: var(--danger) } .is-info { --c: var(--info) } .is-accent { --c: var(--accent-hi) }
.area-licht { --area: var(--area-licht) } .area-ton { --area: var(--area-ton) } .area-buehne { --area: var(--area-buehne) } .area-beamer { --area: var(--area-beamer) }
.area-leitung { --area: var(--area-leitung) } .area-planung { --area: var(--area-planung) } .area-ablauf { --area: var(--area-ablauf) }

/* Pult-Plakette (js/pultstatus.js): grau, Farbe nur für verbunden/nicht erreichbar */
.pult-plakette { align-self: center }
