/* ELFIS24 Szenario — Web. Dunkles Thema wie die iPad-App, ohne Frameworks. */

:root {
  --bg: #000;
  --bg-bib: #141414;
  --leiste: #1c1c1c;
  --leiste-dunkel: #171717;
  --karte: #262626;
  --gruppe: #1c1c1e;
  --gruppe-hell: #2c2c2e;
  --trenner: rgba(255, 255, 255, 0.12);
  --text: #fff;
  --text-leise: #98989d;
  --akzent: #0a84ff;
  --rot: #ff3b30;
  --rot-dunkel: #d62d24;
  --gelb: #ffd60a;
  --gruen: #30d158;
  --radius: 12px;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --emoji: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.35 var(--schrift); -webkit-font-smoothing: antialiased; }
#wurzel { height: 100%; }
h1, h2, h3, h4 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
a { color: var(--akzent); text-decoration: none; }
.platz { flex: 1 1 auto; }
.leise { color: var(--text-leise); }
.klein { font-size: 12px; }
.fett { font-weight: 700; }
.mitte { text-align: center; }
.fehler { color: #ff6961; margin: 4px 0; min-height: 1.35em; }
.sym { display: inline-flex; vertical-align: middle; flex: none; }
.sym svg { display: block; }
.sym-emoji { font-family: var(--emoji); font-style: normal; line-height: 1; flex: none; }
.sym-emoji.gross { font-size: 30px; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }

/* ---------- Knöpfe ---------- */
.ik { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--akzent); }
.ik:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
.ik.gefahr { color: var(--rot); }
.ik.leise { color: var(--text-leise); }
.text-knopf { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--akzent); white-space: nowrap; }
.text-knopf:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); }
.text-knopf.fett { font-weight: 600; }
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border: 0; border-radius: 10px; background: #3a3a3c; color: var(--akzent); font-weight: 500; white-space: nowrap; text-decoration: none; }
.knopf:hover:not(:disabled) { filter: brightness(1.15); }
.knopf.rot { background: var(--rot); color: #fff; font-weight: 600; }
.knopf.gefahr { background: var(--rot); color: #fff; }
.knopf.gelb { background: var(--gelb); color: #000; font-weight: 600; }
.knopf.klein { padding: 4px 10px; font-size: 13px; border-radius: 999px; }
.knopf.gross { padding: 9px 20px; font-size: 16px; font-weight: 600; }
.konto { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 999px; background: #2c2c2e; color: var(--text); }
.konto:hover { background: #3a3a3c; }
.konto-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

.feld { width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: #2c2c2e; color: var(--text); resize: vertical; }
.feld:focus { border-color: var(--akzent); outline: none; }
select { padding: 6px 8px; border: 0; border-radius: 8px; background: #3a3a3c; color: var(--text); max-width: 60%; }
input[type="range"] { width: 100%; accent-color: var(--akzent); margin: 4px 0; }
input[type="color"] { width: 44px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; }
input[type="search"] { -webkit-appearance: none; }

/* ---------- Kopfzeile ---------- */
.kopfzeile { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--leiste); min-height: 54px; flex: none; }
.szenario-name { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 40px; max-width: 28vw; }
.status { border: 0; background: transparent; font-size: 12px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.status.ok { color: var(--gruen); }
.status.warte { color: var(--gelb); }
.status.fehler { color: #fff; background: var(--rot-dunkel); }
.status.leise { color: var(--text-leise); }

/* ---------- Editor ---------- */
.editor { display: flex; flex-direction: column; height: 100%; background: #000; }
.mitte { display: flex; flex: 1 1 auto; min-height: 0; }
.palette { width: 240px; flex: none; overflow-y: auto; background: var(--leiste); padding: 10px 12px; }
.editor.ohne-palette .palette { display: none; }
.kategorie { border-bottom: 1px solid var(--trenner); padding: 4px 0; }
.kategorie-kopf { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 4px; border: 0; background: transparent; font-weight: 600; text-align: left; }
.kategorie-titel { flex: 1; }
.kategorie-kopf .sym { color: var(--text-leise); }
.kategorie-liste { display: flex; flex-direction: column; gap: 2px; padding: 0 0 6px; }
.werkzeug { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.werkzeug .sym-emoji { width: 24px; text-align: center; font-size: 18px; }
.werkzeug-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.werkzeug:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); }
.werkzeug.aktiv { background: rgba(10, 132, 255, 0.35); }

.buehnenspalte { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.reiter { display: flex; gap: 6px; padding: 6px 10px; background: #171717; overflow-x: auto; flex: none; }
.reiter-tab { padding: 6px 14px; border: 0; border-radius: 8px; background: #292929; color: var(--text-leise); white-space: nowrap; }
.reiter-tab.aktiv { background: #4d4d4d; color: #fff; font-weight: 700; }
.reiter-neu { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 0; background: transparent; color: var(--akzent); white-space: nowrap; }
.buehne-flaeche { position: relative; flex: 1 1 auto; min-height: 0; background: #000; overflow: hidden; }
.buehne-flaeche.gross { flex: 1 1 auto; border-radius: 12px; }
.buehne-flaeche.vorschau { flex: none; width: 100%; border-radius: 12px; }
.buehne-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.buehne-canvas.zielen { cursor: crosshair; }
.hinweis-lage { position: absolute; top: 10px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; z-index: 2; }
.kapsel { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: rgba(44, 44, 46, 0.82); backdrop-filter: blur(14px); font-weight: 600; font-size: 14px; pointer-events: auto; }
.kapsel.ruhig { font-weight: 400; pointer-events: none; }
.kapsel.klein { padding: 3px 10px; font-size: 12px; font-weight: 700; position: absolute; left: 8px; bottom: 8px; pointer-events: none; }

.inspektor { position: absolute; top: 10px; right: 10px; bottom: 10px; width: 340px; z-index: 3; overflow-y: auto; background: #000; border-radius: 16px; box-shadow: 0 6px 28px rgba(0, 0, 0, 0.7); padding: 12px 10px 16px; border: 1px solid var(--trenner); }
fieldset.nurlesen { border: 0; padding: 0; margin: 0; min-width: 0; }
.abschnitt { margin: 0 0 14px; }
.abschnitt-kopf { margin: 4px 6px 6px; font-size: 15px; font-weight: 600; color: var(--text-leise); }
.gruppe { background: var(--gruppe); border-radius: 14px; overflow: hidden; }
.gruppe > * + * { border-top: 1px solid var(--trenner); }
.fuss { margin: 6px 8px 0; font-size: 12px; color: var(--text-leise); }
.zeile { display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 44px; }
.zeile.text { align-items: flex-start; }
.zeile-feld { padding: 8px 10px; }
.zeile-text { margin: 0; padding: 6px 14px 8px; color: var(--text-leise); }
.zeile.aktion { width: 100%; border: 0; background: transparent; color: var(--akzent); text-align: left; }
.zeile.aktion:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); }
.zeile.aktion.gefahr { color: var(--rot); }
.zeile.aktion.zwei { flex-direction: column; align-items: flex-start; gap: 2px; }
.zwei-titel { display: inline-flex; align-items: center; gap: 10px; }
.zeile.auswahl, .zeile.schalter, .zeile.stepper { justify-content: space-between; }
.zeile.auswahl select { flex: 0 1 62%; }
.inspektor-titel { font-size: 17px; }
.inspektor-titel .sym-emoji { font-size: 22px; }
.inspektor-knoepfe { display: flex; align-items: center; width: 100%; gap: 6px; }
.regler { padding: 10px 14px 6px; }
.regler-kopf { display: flex; justify-content: space-between; }
.regler-wert { color: var(--text-leise); font-variant-numeric: tabular-nums; }
.regler-enden { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-leise); }
.callout { font-size: 14px; }
.hinweis { padding: 8px 14px; }
.angaben { margin: 0; padding: 10px 14px; font: 12px/1.45 ui-monospace, Consolas, monospace; color: var(--text-leise); white-space: pre-wrap; word-break: break-word; }
.stepper-knoepfe { display: inline-flex; background: #3a3a3c; border-radius: 8px; overflow: hidden; }
.st { width: 44px; height: 30px; border: 0; background: transparent; font-size: 18px; }
.st + .st { border-left: 1px solid var(--trenner); }
.st:hover { background: rgba(255, 255, 255, 0.1); }
.sw { position: relative; width: 50px; height: 30px; flex: none; }
.sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.sw-knopf { position: absolute; inset: 0; border-radius: 999px; background: #3a3a3c; transition: background 0.15s; }
.sw-knopf::after { content: ""; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.sw input:checked + .sw-knopf { background: var(--gruen); }
.sw input:checked + .sw-knopf::after { transform: translateX(20px); }
.mime { gap: 8px; }
.mime-name { color: var(--text-leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.punkt { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 1px solid rgba(255, 255, 255, 0.3); }

.phasenleiste { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--leiste); flex: none; }
.phasen-symbol { color: var(--text-leise); display: inline-flex; }
.phasen-chips { display: flex; gap: 8px; overflow-x: auto; flex: 1 1 auto; padding: 2px 0; }
.phase-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 12px; border: 0; border-radius: 9px; background: #383838; color: #fff; text-align: left; flex: none; }
.phase-chip.aktiv { background: rgba(255, 59, 48, 0.88); }
.chip-zeit { font-size: 12px; font-weight: 700; }
.chip-name { font-size: 12px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Menüs, Popover, Blätter ---------- */
.menue, .popover { position: fixed; z-index: 1000; background: rgba(44, 44, 46, 0.97); backdrop-filter: blur(20px); border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); border: 1px solid var(--trenner); }
.menue { min-width: 240px; padding: 6px; }
.menue-punkt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.menue-punkt:hover:not(:disabled) { background: rgba(10, 132, 255, 0.5); }
.menue-punkt.gefahr { color: #ff6961; }
.menue-titel { flex: 1; }
.menue-leer { width: 18px; }
.menue-emoji { font-family: var(--emoji); width: 18px; text-align: center; }
.menue-trenner { height: 1px; background: var(--trenner); margin: 4px 6px; }
.menue-kopf { padding: 6px 10px; font-size: 12px; color: var(--text-leise); }
.popover { padding: 0; max-width: calc(100vw - 16px); }
.umgebung { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; }
.umgebung h3 { font-size: 17px; }
.umg-zeile { display: flex; align-items: center; gap: 10px; }
.umg-block p { margin: 2px 0 0; color: var(--text-leise); }
.segmente { display: flex; background: #3a3a3c; border-radius: 9px; padding: 2px; gap: 2px; }
.segment { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 4px; border: 0; border-radius: 7px; background: transparent; font-size: 12px; }
.segment.aktiv { background: #636366; }
.ebenen { width: 100%; max-height: 520px; display: flex; flex-direction: column; }
.ebenen-kopf { padding: 14px 18px 8px; font-weight: 600; text-align: center; border-bottom: 1px solid var(--trenner); }
.ebenen-liste { overflow-y: auto; padding: 4px 0; }
.ebene { display: flex; align-items: center; gap: 10px; padding: 6px 12px; cursor: pointer; }
.ebene:hover { background: rgba(255, 255, 255, 0.05); }
.ebene.aktiv { background: rgba(10, 132, 255, 0.3); }
.ebene .sym-emoji { width: 26px; text-align: center; font-size: 18px; }
.ebene-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ebene-text > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.blatt-huelle { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.55); padding: 20px; }
.blatt { max-width: 100%; max-height: 100%; display: flex; flex-direction: column; background: var(--bg-bib); border-radius: 16px; box-shadow: 0 16px 60px rgba(0, 0, 0, 0.7); border: 1px solid var(--trenner); overflow: hidden; }
.blatt-kopf { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 10px; background: var(--leiste); flex: none; }
.blatt-kopf > :first-child { justify-self: start; }
.blatt-kopf > :last-child { justify-self: end; }
.blatt-titel { font-weight: 600; text-align: center; }
.blatt-innen { overflow-y: auto; flex: 1 1 auto; }
.form { padding: 16px; }
.dialog-text { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.dialog-text p { margin: 0; }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.dialog-spalte { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.dialog-spalte .knopf { justify-content: center; }
.beschriftung { font-size: 13px; color: var(--text-leise); }
.vorlage { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 12px 14px; border: 0; background: transparent; text-align: left; }
.vorlage:hover { background: rgba(255, 255, 255, 0.05); }
.vorlage-text { display: flex; flex-direction: column; gap: 3px; }
.sym-emoji.brand { width: 36px; text-align: center; }

.arbeitet { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; }
.arbeitet-karte { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 28px; background: rgba(44, 44, 46, 0.95); border-radius: 14px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.2); border-top-color: #fff; animation: dreh 0.8s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 80px; transform: translate(-50%, 20px); z-index: 1200; padding: 10px 18px; border-radius: 999px; background: #3a3a3c; opacity: 0; pointer-events: none; transition: all 0.2s; max-width: 80vw; }
.toast.sichtbar { opacity: 1; transform: translate(-50%, 0); }
.toast.fehler { background: var(--rot-dunkel); }
.laedt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 60vh; color: var(--text-leise); }
.leer-seite { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 18vh; text-align: center; }

/* ---------- Bibliothek ---------- */
.bibliothek { display: flex; flex-direction: column; height: 100%; background: var(--bg-bib); }
.bib-kopf { background: var(--bg-bib); }
.bib-titel { font-size: 28px; font-weight: 700; margin-right: 12px; }
.suchbox { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; background: #2c2c2e; color: var(--text-leise); width: 260px; max-width: 30vw; }
.suche { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; outline: none; color: var(--text); }
.bib-inhalt { flex: 1 1 auto; overflow-y: auto; padding: 20px; }
.bib-inhalt.schmal { max-width: 860px; width: 100%; margin: 0 auto; }
.bib-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 420px)); gap: 20px; justify-content: start; }
.karte { background: var(--karte); border-radius: 14px; overflow: hidden; cursor: pointer; outline-offset: 2px; }
.karte:hover { background: #2d2d2d; }
.karte-bild { position: relative; height: 190px; background: #333; }
.karte-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vorschau-leer { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 56px; font-family: var(--emoji); background: linear-gradient(#3a4a5e, #2a2d33); }
.karte-mehr { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.15s; }
.karte:hover .karte-mehr, .karte:focus-within .karte-mehr, .karte:focus .karte-mehr { opacity: 1; }
.karte-text { padding: 12px; }
.karte-name { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.karte-stichwort { color: var(--text-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.karte-fuss { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.karte-datum { font-size: 12px; color: var(--text-leise); }
.bib-leer { display: flex; flex-direction: column; align-items: center; gap: 18px; padding-top: 80px; text-align: center; max-width: 580px; margin: 0 auto; }
.bib-leer h2 { font-size: 24px; }
.bib-flamme { font-size: 72px; font-family: var(--emoji); }
.bib-leer-knoepfe { display: flex; gap: 14px; }
.benutzer-liste { padding: 0; }
.benutzer-zeile { display: grid; grid-template-columns: 1.1fr 1.4fr 60px 1.9fr 1.2fr 44px; gap: 10px; align-items: center; padding: 8px 14px; }
.benutzer-zeile.kopf { color: var(--text-leise); font-size: 12px; }
.benutzer-zeile select { max-width: 100%; }
.benutzer-zeile .warnung { color: #ff6b5a; font-weight: 600; }
.neu-benutzer { display: grid; grid-template-columns: 1fr 1.2fr 1fr auto; gap: 10px; padding: 12px; }

/* ---------- Anmeldung ---------- */
.login-huelle { position: fixed; inset: 0; z-index: 950; background: var(--bg-bib); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-kopf { position: absolute; top: 8px; left: 12px; }
.login-karte { width: 380px; max-width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.login-logo { font-size: 64px; font-family: var(--emoji); }
.login-karte h1 { font-size: 24px; }
.login-karte p { margin: 0; }
.login-karte .feld { padding: 11px 12px; font-size: 16px; }

/* ---------- Assistent ---------- */
.assistent { display: flex; flex-direction: column; height: 100%; background: var(--bg-bib); }
.assistent-kopf { gap: 16px; }
.schritt { display: flex; align-items: center; gap: 6px; color: var(--text-leise); }
.schritt.aktuell { color: var(--text); }
.schritt-nr { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #4d4d4d; font-size: 12px; font-weight: 700; }
.schritt-nr.erreicht { background: var(--rot); }
.assistent-inhalt { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.schritt-foto { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 30px; flex: 1; text-align: center; }
.schritt-foto h1 { font-size: 34px; }
.schritt-foto p { margin: 0; max-width: 520px; }
.gross-knoepfe { display: flex; gap: 18px; }
.gross-knopf { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 230px; height: 180px; border: 0; border-radius: 18px; background: rgba(255, 59, 48, 0.8); color: #fff; font-size: 17px; font-weight: 600; }
.gross-knopf:hover { background: rgba(255, 59, 48, 0.95); }
.schritt-lage { padding: 24px; }
.schritt-lage h2 { font-size: 22px; margin: 16px 0 12px; }
.bausatz-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.bausatz { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 96px; padding: 14px; border: 0; border-radius: 14px; background: #2b2b2b; text-align: left; }
.bausatz:hover { background: #343434; }
.schritt-ort { display: flex; flex-direction: column; gap: 12px; padding: 16px; flex: 1; min-height: 0; }
.schritt-ort .buehne-flaeche { flex: 1 1 0; min-height: 280px; }
.ort-leiste { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.ort-regler { display: flex; align-items: center; gap: 8px; width: 360px; max-width: 100%; }
.ort-regler .regler { flex: 1; padding: 0; }
.ort-regler .regler-kopf { display: none; }
.ort-leiste .segmente { width: 320px; max-width: 100%; }
.ort-leiste .segment { flex-direction: row; justify-content: center; font-size: 14px; padding: 6px 4px; }
.schritt-alarm { display: grid; grid-template-columns: minmax(320px, 520px) 1fr; flex: 1; min-height: 0; }
.assistent-form { overflow-y: auto; }
.assistent-rechts { display: flex; flex-direction: column; gap: 16px; padding: 20px; min-width: 0; align-items: stretch; }
.assistent-aktionen { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.melder { background: linear-gradient(#9e0000, #610000); color: #fff; border-radius: 14px; padding: 16px 18px; max-width: 760px; width: 100%; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.melder-kopf { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.melder-zeit { font-variant-numeric: tabular-nums; font-weight: 700; }
.melder-stichwort { font-size: 22px; font-weight: 700; margin-top: 6px; }
.melder-text { font-size: 18px; margin-top: 4px; white-space: pre-wrap; }

/* ---------- Briefing ---------- */
.briefing { display: flex; flex-direction: column; height: 100%; background: #000; }
.briefing-melder { padding: 10px 14px 0; flex: none; }
.briefing-mitte { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.briefing-flaeche { flex: 1 1 auto; }
.briefing-leiste-halter { position: absolute; top: 8px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; z-index: 5; padding: 0 14px; }
.briefing-leiste { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(44, 44, 46, 0.8); backdrop-filter: blur(16px); pointer-events: auto; width: 100%; max-width: 1100px; }
.chip { padding: 5px 12px; border: 0; border-radius: 999px; background: #404040; font-size: 12px; font-weight: 700; color: #fff; }
.chip.aktiv { background: var(--rot); }
.trenner-v { width: 1px; height: 20px; background: var(--trenner); }
.briefing-lage { flex: none; background: #1c1c1c; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; max-height: 26vh; overflow-y: auto; }
.briefing-lagetext { font-size: 19px; }

/* ---------- schmale Fenster ---------- */
@media (max-width: 900px) {
  .palette { width: 190px; }
  .inspektor { width: 300px; }
  .schritt-alarm { grid-template-columns: 1fr; }
  .szenario-name { max-width: 18vw; }
  .konto-name { display: none; }
  .suchbox { max-width: 22vw; }
}
@media (max-width: 640px) {
  .kopfzeile { gap: 6px; padding: 6px 8px; flex-wrap: wrap; }
  .palette { width: 150px; }
  .inspektor { left: 10px; width: auto; }
  .schritt span:last-child { display: none; }
}
