/* Das EINE Aussehen des Cockpits.
 *
 * GESETZ ist der Entwurf, den Mathis am 2026-09-02 abgenommen hat:
 * domains/betrieb/docs/entwuerfe/2026-09-01_mockup-server-cockpit.html
 * Von dort kommen die Farbwerte, die drei Hell-Dunkel-Zustaende, die Bausteine
 * (Karte, Kicker, Zustands-Punkt, Pille, Reiter, Messwert, Tabelle, Leerzustand),
 * der Aufbau von Leiste und Kopf und die Umbrueche fuer schmale Fenster.
 *
 * NICHT mitgekommen ist das Vorschau-Geruest des Entwurfs: der Mockup-Streifen,
 * die Leiste "Nur Vorschau" mit Mac/Handy-Umschalter und Hell/Dunkel-Waehler und
 * der Telefon-Rahmen. Hier entscheidet das Geraet: hell oder dunkel nach seiner
 * Einstellung, schmal oder breit nach der Fensterbreite. Darum stehen unten
 * normale @media-Abfragen und nicht die @container-Abfrage des Entwurfs.
 *
 * Die alten Namen (--fg, --ton, --flaeche, --mint, --surface …) bleiben als Alias
 * stehen, weil die 25 Raum-Module sie schreiben. Es gibt trotzdem nur EINE
 * Palette: die Aliasse zeigen auf die Werte oben, sie erfinden keine zweiten.
 */

:root {
  /* Ruhiger Grundton. Farbe gibt es nur fuer Stoerungen. */
  --grund:#f4f4f2; --grund-2:#fafaf9; --karte-bg:#ffffff;
  --ink:#1a1a19; --ink-2:#585855; --ink-3:#6c6c67;
  --stark:#2c2c2a; --stark-2:#454542;
  --wahl:#eaeae7; --wahl-linie:#d8d8d4;
  --ochre:#a07a35; --ochre-2:#7d5d20; --ochre-soft:#f2ecdd;
  --linie:#e3e3df; --linie-2:#d1d1cc;
  /* „laeuft" ist kein Ereignis — es bekommt keine Farbe, nur einen ruhigen Punkt. */
  --ok-bg:#eeeeeb;   --ok-fg:#5b5b58;   --ok-dot:#9c9c96;
  --warn-bg:#f6eddb; --warn-fg:#7d5a13; --warn-dot:#c08a2e;
  --stop-bg:#f7e4de; --stop-fg:#8e3b23; --stop-dot:#b0482e;
  --ruht-bg:#f0f0ee; --ruht-fg:#77776f; --ruht-dot:#c2c2bd;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", serif;
  --schatten: 0 1px 2px rgba(27,34,28,.04), 0 8px 24px rgba(27,34,28,.05);
  --leiste: 246px;
  --aussen:#eceee4;
  /* Schrift auf einer Flaeche in --stark. Hell: weiss. Dunkel: --stark ist dort
     die HELLE Farbe, also dunkle Schrift darauf (im Entwurf gemessen: weiss auf
     hellem Stark ergibt 1,9 zu 1). */
  --auf-stark:#ffffff;

  /* ── Alte Namen, damit die Raeume weiterlaufen ───────────────────────── */
  --bg: var(--grund);
  --surface: var(--karte-bg);
  --surface-hi: var(--wahl);
  --ink-strong: var(--stark);
  --ink-dim: var(--ink-2);
  --ink-subtle: var(--ink-3);
  --mint: var(--ochre-2);
  --mint-soft: var(--ochre-soft);
  --mint-dim: var(--ochre);
  --warn: var(--warn-fg);
  --danger: var(--stop-fg);
  --line: var(--linie);
  --line-hi: var(--linie-2);
  --font: var(--sans);
  --leiste-breit: var(--leiste);
  --fg: var(--ink);
  --leise: var(--ink-2);
  --flaeche: var(--karte-bg);
  --flaeche-2: var(--wahl);
  --ton: var(--mint);
  --ton-flaeche: var(--ochre-soft);
  --ton-text: var(--stark);
  --fehl: var(--stop-fg);
  --warn-flaeche: var(--warn-bg);
  --fehl-flaeche: var(--stop-bg);
  --akzent: var(--ochre);
  color-scheme: light;
}

/* ══ Dunkel ══════════════════════════════════════════════════════════════
   Dieselben Namen, andere Werte — kein zweiter Farbkasten. Drei Zustaende:
   ohne Stempel folgt es dem Geraet, mit Stempel gewinnt die Wahl.
   (Der Schalter in gemein/thema.js setzt data-theme immer ausdruecklich; die
   Geraete-Abfrage bleibt trotzdem stehen, damit die Datei allein richtig ist.) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund:#1a1a1b; --grund-2:#141415; --karte-bg:#232324;
    --ink:#ffffff; --ink-2:#c8c8ca; --ink-3:#95959a;
    --stark:#ffffff; --stark-2:#e4e4e6;
    --wahl:#2d2d2f; --wahl-linie:#3d3d40;
    --ochre:#c79c4e; --ochre-2:#dcb572; --ochre-soft:#302a1c;
    --linie:#303032; --linie-2:#404043;
    --ok-bg:#262628;   --ok-fg:#aeaeb2;   --ok-dot:#6f6f74;
    --warn-bg:#332b1a; --warn-fg:#e3ba6e; --warn-dot:#cf9733;
    --stop-bg:#33211c; --stop-fg:#e79b7c; --stop-dot:#c85c36;
    --ruht-bg:#242426; --ruht-fg:#8d8d92; --ruht-dot:#4c4c50;
    --schatten: 0 1px 2px rgba(0,0,0,.34), 0 8px 24px rgba(0,0,0,.32);
    --aussen:#0e0e0f;
    --auf-stark:#16161a;
    --mint: var(--ochre);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --grund:#1a1a1b; --grund-2:#141415; --karte-bg:#232324;
  --ink:#ffffff; --ink-2:#c8c8ca; --ink-3:#95959a;
  --stark:#ffffff; --stark-2:#e4e4e6;
  --wahl:#2d2d2f; --wahl-linie:#3d3d40;
  --ochre:#c79c4e; --ochre-2:#dcb572; --ochre-soft:#302a1c;
  --linie:#303032; --linie-2:#404043;
  --ok-bg:#262628;   --ok-fg:#aeaeb2;   --ok-dot:#6f6f74;
  --warn-bg:#332b1a; --warn-fg:#e3ba6e; --warn-dot:#cf9733;
  --stop-bg:#33211c; --stop-fg:#e79b7c; --stop-dot:#c85c36;
  --ruht-bg:#242426; --ruht-fg:#8d8d92; --ruht-dot:#4c4c50;
  --schatten: 0 1px 2px rgba(0,0,0,.34), 0 8px 24px rgba(0,0,0,.32);
  --aussen:#0e0e0f;
  --auf-stark:#16161a;
  --mint: var(--ochre);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--grund); color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--stark); outline-offset: 2px; }
h1 { font-size: 21px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); line-height: 1.2; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 2px; color: var(--stark); }
h3 { font-size: 12px; font-weight: 500; color: var(--ink-3); margin: 22px 0 8px; }
p { max-width: 68ch; }

#anmeldung h1 { font-size: 21px; font-weight: 500; letter-spacing: .01em; color: var(--ink); }

/* ══ Geruest ═════════════════════════════════════════════════════════════ */
.rahmen { display: grid; grid-template-columns: var(--leiste) 1fr; height: 100%; }
/* Verstecken muss staerker sein als das eigene Anzeige-Verhalten des Geruests —
   sonst schlaegt `display: grid` das `hidden` des Browsers (16.08. gesehen). */
.rahmen[hidden], .versteckt { display: none; }

/* ── Ebene 1: die Leiste ───────────────────────────────────────────────── */
.leiste {
  background: var(--grund-2); border-right: 1px solid var(--linie);
  display: flex; flex-direction: column; overflow-y: auto;
}
.leiste .marke {
  display: flex; align-items: center; gap: 9px;
  padding: 18px 18px 14px; border: 0; background: none; border-radius: 0;
}
.leiste .marke .zeichen { height: 26px; width: 26px; border-radius: 7px; background: var(--stark); flex: none; }
.leiste .marke .wort { font-size: 16px; font-weight: 600; color: var(--ink); }
.leiste .marke .v { font-size: 11px; color: var(--ink-2); font-family: var(--serif); font-style: italic; }

.leiste .gruppe { margin-top: 6px; }
.leiste .gruppenkopf {
  width: 100%; display: flex; align-items: center; gap: 9px;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 8px 18px 6px; font: inherit;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .15em; color: var(--ink-3);
}
.leiste .gruppenkopf:hover { color: var(--ink); }
.leiste .gruppenkopf .strich { height: 1px; width: 16px; background: var(--linie-2); flex: none; transition: width .15s; }
.leiste .gruppenkopf[aria-expanded="false"] .strich { width: 7px; }
.leiste .gruppenkopf .anzahl { margin-left: auto; font-size: 10px; letter-spacing: 0; color: var(--ink-3); font-weight: 400; }
.leiste .gruppenkopf .pfeil { font-size: 8px; width: 8px; opacity: .7; }
.leiste .eintraege .gruppenkopf { padding-left: 22px; }

.leiste .eintraege { display: flex; flex-direction: column; padding: 0 10px 4px; }
.leiste .eintrag {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border: 0; border-radius: 8px; background: none;
  font: inherit; font-size: 13.5px; color: var(--ink-2); text-align: left; width: 100%;
  transition: background .12s, color .12s;
}
.leiste .eintrag:hover { background: var(--wahl); color: var(--stark); text-decoration: none; }
.leiste .eintrag[aria-current] { background: var(--wahl); color: var(--stark); font-weight: 600; }
.leiste .eintrag .titel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Nur eine Stoerung wird sichtbar — sie rueckt nach rechts, statt eine Zeile zu kosten. */
.leiste .eintrag .zeile2 { flex: none; font-size: 10.5px; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.leiste .eintrag .zeile2.fehl { color: var(--stop-fg); }
/* Eine Ebene tiefer (Unterpunkte eines Raums): nur eingerueckt, sonst gleich.
   Diese Regel MUSS nach .leiste .eintrag stehen — sonst setzt deren Kurzform
   "padding" die Einrueckung wieder auf 10px zurueck (gleiche Spezifitaet,
   spaetere Regel gewinnt). Genau so ging die Einrueckung am 2026-09-02 verloren. */
.leiste .e1 { padding-left: 22px; }
.leiste-fuss {
  margin-top: auto; border-top: 1px solid var(--linie); padding: 11px 18px;
  font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--ink-2);
}

/* Der Zustands-Punkt in der Leiste. FORM statt Farbe: voller Punkt = laeuft,
   hohler Ring = aus. Farbe bekommt nur, was Aufmerksamkeit braucht. */
.lampe { height: 7px; width: 7px; border-radius: 50%; flex: none; background: var(--linie-2); }
.lampe.ok { background: var(--ok-dot); }
.lampe.warnung { background: var(--warn-dot); }
.lampe.ausfall { background: var(--stop-dot); }
.lampe.unbekannt { background: transparent; box-shadow: inset 0 0 0 2px var(--ruht-dot); }
/* Kein eigener Dienst: kein Punkt, aber die Spalte bleibt — sonst beginnen die
   Titel auf zwei verschiedenen Linien. */
.lampe.keiner { background: transparent; }
.marke-neu {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ochre-2); background: var(--ochre-soft);
  border-radius: 999px; padding: 2px 6px; vertical-align: middle; flex: none;
}

/* ── Ebene 2: die Buehne ───────────────────────────────────────────────── */
.buehne { display: flex; flex-direction: column; overflow: hidden; min-width: 0; background: var(--grund); }
.buehne > .kopf {
  flex: none; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 26px; border-bottom: 1px solid var(--linie);
}
.buehne > .kopf .titelblock { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.buehne > .kopf .titel {
  font-size: 21px; font-weight: 500; letter-spacing: -.01em;
  color: var(--ink); line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.buehne > .kopf .fakt { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--ink-2); }
.buehne > .kopf .rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.wer { font-size: 12.5px; color: var(--ink-2); }
.inhalt { flex: 1; overflow-y: auto; padding: 26px 26px 60px; min-height: 0; }
.inhalt > * + * { margin-top: 14px; }
.stapel { display: flex; flex-direction: column; gap: 34px; max-width: 1080px; }
.spalte { max-width: 780px; }

/* Der Schleier hinter dem aufgeschobenen Menue. Er liegt still da, bis das
   Fenster schmal ist und das Menue offen — dann faengt er den Klick daneben. */
.schleier { display: none; position: fixed; inset: 0; background: rgba(27,34,28,.32); z-index: 39; }
/* Alles, was nur auf schmalen Fenstern erscheint. Die Gegenregel steht ganz
   unten in der @media-Abfrage — sie muss SPAETER kommen als diese hier, sonst
   gewinnt sie nie (genau das war der Fehler: der Menue-Knopf blieb unsichtbar). */
.nur-schmal { display: none !important; }

/* Eingebettete Anwendungen (Garten, Wetter, World Engine, Penpot …).
 * Die Höhe hing an --kopf-hoch, das es nie gab: das Frame fiel auf 150 px
 * (HTML-Vorgabe) und schnitt die Apps ab — gesehen 22.08.
 * Das Frame selbst ist in WebKit kein Flex-Kind (Mac-App, Safari): deshalb
 * ein normaler Kasten, der wächst, und das Frame absolut darin. */
.inhalt:has(.fuellend),
.inhalt.fuellend-aktiv {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.fuellend {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.fuellend .reihe { flex: none; }
.fuellend-rahmen {
  flex: 1;
  min-height: 0;
  position: relative;
}
.fuellend-rahmen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ══ Bauteile aus dem Entwurf ════════════════════════════════════════════ */

/* ── Karte ──────────────────────────────────────────────────────────────
   Die Karte bringt ihre eigene Innenluft mit, weil die Raeume sie so
   benutzen (48 Stellen in raum/*.js schreiben `class="karte"` und legen
   direkt Text hinein). Die Sonderformen unten setzen sie neu. */
.karte {
  background: var(--karte-bg); border: 1px solid var(--linie); border-radius: 14px;
  box-shadow: var(--schatten); padding: 18px 20px 16px;
}
.karte + .karte { margin-top: 12px; }
.karte .kopfzeile { display: flex; align-items: baseline; gap: 10px; }
.karte .name { font-weight: 600; color: var(--stark); }
.karte .klein, .klein { font-size: 12.5px; color: var(--ink-2); }

.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.raster > .karte { margin-top: 0; }

/* ── Kicker-Ueberschrift ────────────────────────────────────────────────── */
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 13px; }
.kicker > .k {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .15em; color: var(--ink-3);
}
.kicker > .k::before { content: ""; display: inline-block; height: 1px; width: 24px; flex: none; background: var(--linie-2); }
.kicker > .aside { font-size: 12px; color: var(--ink-3); }

/* ── Zustands-Punkt (gross, in Karten) ──────────────────────────────────── */
.punkt { height: 13px; width: 13px; flex: none; border-radius: 50%; background: var(--ruht-dot); }
.punkt.ok { background: var(--ok-dot); box-shadow: 0 0 0 3px var(--ok-bg); }
.punkt.warn { background: var(--warn-dot); box-shadow: 0 0 0 3px var(--warn-bg); }
.punkt.stop { background: var(--stop-dot); box-shadow: 0 0 0 3px var(--stop-bg); }
.punkt.ruht { background: transparent; box-shadow: inset 0 0 0 2px var(--ruht-dot); }

/* ── Pille ──────────────────────────────────────────────────────────────── */
.pille { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.pille.ok { background: var(--ok-bg); color: var(--ok-fg); }
.pille.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pille.stop { background: var(--stop-bg); color: var(--stop-fg); }
.pille.ruht { background: var(--ruht-bg); color: var(--ruht-fg); }

/* ── Reiter im Raum ─────────────────────────────────────────────────────── */
.reiter { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 1px solid var(--linie); padding-bottom: 0; }
.reiter button {
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font: inherit;
  font-size: 13.5px; color: var(--ink-3); padding: 7px 13px 9px; margin-bottom: -1px;
  transition: color .12s, border-color .12s;
}
.reiter button:hover { color: var(--stark); }
.reiter button[aria-selected="true"] { color: var(--stark); font-weight: 600; border-bottom-color: var(--stark); }

/* ── Messwert-Kachel ────────────────────────────────────────────────────── */
.messwerte { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.mess { border-radius: 12px; padding: 15px; background: var(--wahl); }
.mess.akzent { background: var(--karte-bg); border: 1px solid var(--linie-2); }
.mess .wert { font-size: 23px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--stark); line-height: 1.15; }
.mess .was { margin-top: 3px; font-size: 11.5px; color: var(--ink-2); font-weight: 400; }
.mess .balken { margin-top: 9px; height: 5px; border-radius: 3px; background: var(--linie-2); overflow: hidden; }
.mess .balken > i { display: block; height: 100%; border-radius: 3px; background: var(--stark); }

/* ── Tabelle im Entwurfs-Schnitt ────────────────────────────────────────────
   Bewusst NUR innerhalb von .tab-karte: die Raeume haben ihre eigene .tabelle,
   die von einer nackten table-Regel eine Mindestbreite geerbt haette. */
.tab-karte { overflow-x: auto; padding: 0; }
.tab-karte table { width: 100%; min-width: 520px; border-collapse: collapse; }
.tab-karte th {
  text-align: left; padding: 11px 15px; font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
  border-bottom: 1px solid var(--linie); white-space: nowrap;
}
.tab-karte td { padding: 11px 15px; border-bottom: 1px solid var(--linie); font-size: 13.5px; vertical-align: top; }
.tab-karte tr:last-child td { border-bottom: 0; }
.tab-karte td.zahl { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); }
td .titel { display: block; font-weight: 500; color: var(--stark); margin-bottom: 2px; }
td .folge { font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* ── Werkzeug-Kachel ────────────────────────────────────────────────────── */
.werkzeug { padding: 15px; display: flex; flex-direction: column; gap: 7px; }
.werkzeug-kopf { display: flex; align-items: flex-start; gap: 9px; }
.werkzeug-kopf .punkt { margin-top: 3px; }
.werkzeug h3 { margin: 0; font-size: 14px; font-weight: 500; color: var(--stark); }
.werkzeug .lage { font-size: 11.5px; }
.werkzeug p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 13px; line-height: 1.55; color: var(--ink-2); }

/* ── Stoerungs-Balken und Notiz ─────────────────────────────────────────── */
.stoerung { border-left: 4px solid var(--stop-dot); padding: 15px 18px; display: flex; flex-direction: column; gap: 6px; }
.stoerung .satz { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--stop-fg); margin: 0; }
.stoerung p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.notiz-karte { padding: 17px 20px; }
.notiz-karte .satz { margin: 0 0 9px; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--stark); line-height: 1.4; }
.notiz-karte p { margin: 0 0 9px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.notiz-karte p:last-child { margin-bottom: 0; }
.notiz-karte strong { color: var(--ink); font-weight: 600; }

/* ── Knoepfe ────────────────────────────────────────────────────────────── */
.knopf {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border: 1px solid var(--stark); border-radius: 9px;
  background: var(--stark); color: var(--auf-stark);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.knopf:hover:not(:disabled) { background: var(--stark-2); border-color: var(--stark-2); }
.knopf:disabled { opacity: .4; cursor: default; }
.knopf.leise { background: none; color: var(--ink-2); border-color: var(--linie); }
.knopf.leise:hover:not(:disabled) { background: none; border-color: var(--stark); color: var(--stark); }
.knopf.schmal { padding: 6px 12px; font-size: 12.5px; }
.knopf.an { border-color: var(--stark); background: var(--wahl); color: var(--stark); }

/* Der Schalter in den Kacheln — dieselbe Sprache wie der Knopf, nur rund. */
.schalter {
  margin-top: 2px; align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  background: var(--stark); color: var(--auf-stark); border: 0; border-radius: 999px;
  padding: 5px 13px; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
}
.schalter:hover { background: var(--stark-2); }
.schalter.aus { background: var(--grund-2); color: var(--ink-2); border: 1px solid var(--linie); }
.schalter.aus:hover { background: var(--wahl); color: var(--stark); }

.thema-knopf {
  width: 30px; min-width: 30px; height: 30px; padding: 0; justify-content: center;
  border-radius: 999px; background: var(--karte-bg); border: 1px solid var(--linie);
}
.thema-knopf:hover { border-color: var(--stark); background: var(--karte-bg); }
.thema-knopf .punkt {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--stark); box-shadow: inset -4px -1px 0 0 var(--karte-bg);
}
:root[data-theme="dark"] .thema-knopf .punkt { background: var(--ochre); box-shadow: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .thema-knopf .punkt { background: var(--ochre); box-shadow: none; }
}

.wahl {
  display: block; width: 100%; text-align: left; padding: 11px 14px;
  border: 1px solid var(--linie); border-radius: 9px; background: var(--karte-bg);
  color: inherit; font: inherit; cursor: pointer; margin-bottom: 8px;
}
.wahl:hover { border-color: var(--stark); }
.wahl[aria-pressed="true"] { border-color: var(--stark); background: var(--wahl); color: var(--stark); }
.wahl.richtig { border-color: var(--ok-dot); background: var(--ok-bg); color: var(--ok-fg); }
.wahl.falsch { border-color: var(--stop-dot); background: var(--stop-bg); color: var(--stop-fg); }

/* Die eine Liste der Übersicht: ein Eintrag je Zeile, untereinander, aufklappbar.
 * Feste Spalten (Text | Marken) — im Kachel-Raster davor schoben sich lange
 * Fragen und die Marke ineinander; live gesehen am 15.08. */
.liste { border-top: 1px solid var(--linie); }
.eintrag { border-bottom: 1px solid var(--linie); }
.eintrag > .zeile {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  width: 100%; padding: 10px 6px; text-align: left;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
}
.eintrag > .zeile:hover { background: var(--surface-hi); }
.eintrag > .zeile .text { overflow-wrap: anywhere; }
.eintrag > .zeile .marken { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.eintrag > .auf { padding: 4px 6px 16px; }
.eintrag > .auf[hidden] { display: none; }

/* Das eine Urteil — überall gleich, in der Liste wie im Testen. */
.urteil { margin-top: 10px; border-top: 1px solid var(--linie); padding-top: 10px; }
.urteil .feld { margin: 0 0 8px; }

.feld { display: block; margin: 12px 0; }
.feld > span { display: block; font-size: 12.5px; color: var(--leise); margin-bottom: 4px; }
input, textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-hi); border-radius: 4px;
  background: var(--bg); color: var(--ink); font: inherit;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--mint); }
input[type="range"] { padding: 0; border: none; accent-color: var(--mint); }

.marke {
  display: inline-block; padding: 1px 7px; border: 1px solid var(--line); border-radius: 4px;
  font-size: 11.5px; color: var(--ink-dim); background: var(--surface-hi);
}
.marke.ton { background: var(--mint-soft); color: var(--ink-strong); border-color: transparent; }
.marke.warn { background: var(--warn-flaeche); color: var(--warn); border-color: transparent; }
.marke.fehl { background: var(--fehl-flaeche); color: var(--danger); border-color: transparent; }

.tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tabelle th { font-size: 12px; font-weight: 500; color: var(--ink-subtle); }
.tabelle th, .tabelle td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--linie); text-align: right; }
.tabelle th:first-child, .tabelle td:first-child { text-align: left; }
.tabelle .grau { color: var(--leise); }
.tabelle th.klick { cursor: pointer; user-select: none; }
.tabelle th.klick:hover { color: inherit; }
.tabelle th.klick .sort { font-weight: 400; opacity: .4; }
.tabelle th.klick.an .sort { opacity: 1; }
.tabelle tbody tr[data-slug],
.tabelle tbody tr[data-datei],
.tabelle tbody tr[data-splat-detail],
.tabelle tbody tr[data-kontakt] { cursor: pointer; }
.tabelle tbody tr[data-slug]:hover,
.tabelle tbody tr[data-datei]:hover,
.tabelle tbody tr[data-splat-detail]:hover,
.tabelle tbody tr[data-kontakt]:hover { background: var(--surface-hi); }
.tabelle tbody tr.splat-gruppe td {
  padding-top: 14px; padding-bottom: 6px;
  border-bottom-color: var(--line-hi);
  color: var(--ink-strong);
  background: var(--surface);
}
.tabelle tbody tr.splat-gruppe:first-child td { padding-top: 7px; }
.tabelle th.links, .tabelle td.links { text-align: left; }
.tabelle img.mini { width: 44px; height: 44px; object-fit: cover; display: block; background: var(--flaeche); }
input.suche, select.wahl { width: auto; min-width: 200px; max-width: 420px; }
.raster > .karte { margin-top: 0; }
.bildkachel { padding: 0; overflow: hidden; cursor: pointer; position: relative; }
.bildkachel img { display: block; width: 100%; height: 180px; object-fit: cover; background: var(--flaeche); }
.bildkachel.briefmarke { box-shadow: inset 0 0 0 1px var(--warn); }
.bildstempel { position: absolute; left: 6px; bottom: 6px; }
.zahlkopf { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.zahlkopf .karte { padding: 12px 14px; }
.zahlkopf .zahl { font-size: 22px; font-weight: 650; }
.zustandzeile { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 6px; font-size: 13px; }
.zustandzeile b { font-variant-numeric: tabular-nums; }
.bildgross { max-width: min(100%, 720px); max-height: 70vh; object-fit: contain; display: block; background: var(--flaeche); }
.vorschau { display: flex; align-items: center; gap: 3px; min-height: 44px; }
.vorschau img { width: 44px; height: 44px; object-fit: cover; display: block; background: var(--flaeche); flex: none; }
.vorschau .steg { width: 1px; align-self: stretch; background: var(--linie); margin: 0 3px; }
.vorschau-leer { font-size: 11.5px; color: var(--leise); }
.einrichtungskopf {
  font-size: 12.5px; font-weight: 650; color: var(--leise);
  margin: 12px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--linie);
}
.knopf.an { border-color: var(--mint); background: var(--mint-soft); color: var(--ink-strong); }


/* Leerzustand: Ursache und naechster Schritt, nie ein Balken auf null.
   Form aus dem Entwurf — mittig, ruhig, ohne Farbe. */
/* Der Leerzustand steckt an rund dreissig Stellen — auch INNERHALB von Karten
   (ueberblick.js) und in einer Tabellenzelle (werkstatt.js). Er darf darum
   selbst keine Karte sein: kein Schatten, kein grosser Radius, wenig Luft.
   Sonst steht ueberall eine Karte in der Karte (Befund 2026-09-02). */
.leer {
  background: none; border: 1px dashed var(--linie-2); border-radius: 10px;
  padding: 20px 18px; text-align: center;
}
.karte.leer { padding: 34px 24px; }
.leer .was { font-size: 15px; font-weight: 500; color: var(--stark); }
.leer .warum { margin-top: 5px; font-family: var(--serif); font-style: italic; font-size: 13.5px; color: var(--ink-2); }
.leer .schritt { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }

.balken { height: 3px; background: var(--flaeche-2); border-radius: 0; overflow: hidden; }
.balken > i { display: block; height: 100%; background: var(--ton); }

.reihe { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rechts { margin-left: auto; }
.trenner { height: 1px; background: var(--linie); border: 0; margin: 18px 0; }
.zahl { font-variant-numeric: tabular-nums; }
.fliess { white-space: pre-wrap; }

/* Buddy-Widgets im Cockpit. Die Daten kommen strukturiert vom Dienst; die
 * Oberfläche zeigt die Information, nicht die interne JSON-Hülle. */
.buddy-widget { overflow-wrap: anywhere; }
.buddy-widget h3 { margin: 16px 0 8px; }
.buddy-zahl { margin: 10px 0 12px; color: var(--ink-strong); font-size: 22px; font-weight: 650; }
.buddy-werte { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 5px 14px; margin-top: 10px; font-size: 13.5px; }
.buddy-werte dt { color: var(--ink-dim); }
.buddy-werte dd { margin: 0; color: var(--ink-strong); }
.buddy-marken, .buddy-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.buddy-liste { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.buddy-liste li { display: flex; align-items: baseline; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.buddy-liste li > span:first-child { min-width: 0; flex: 1; }
.buddy-liste li.offen { color: var(--danger); }
.buddy-status { flex: none; color: var(--mint); font-weight: 700; }
.buddy-status.offen { color: var(--danger); }
.buddy-fuss, .buddy-weg, .buddy-nachfrage { margin-top: 12px; font-size: 12.5px; color: var(--ink-dim); }
.buddy-nachfrage { padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); }
.buddy-faehigkeiten { background: transparent; padding: 0; border: 0; box-shadow: none; }
.buddy-faehigkeiten > .kopfzeile { display: none; }
.buddy-gruss { margin: 0 0 12px; color: var(--ink-strong); }
.buddy-bereiche { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.buddy-bereich { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.buddy-bereich h3 { margin: 0 0 5px; color: var(--ink-strong); }
.buddy-zweck { font-size: 13px; color: var(--ink-dim); }
.buddy-chip { padding: 6px 9px; border: 1px solid var(--line-hi); border-radius: 4px; background: var(--surface-hi); color: var(--ink); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; }
.buddy-chip:hover { border-color: var(--mint-dim); color: var(--ink-strong); }
.buddy-standardzeile { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin: 10px 0 -2px; padding-top: 10px; border-top: 1px solid var(--line); }
.buddy-frage { border-left: 3px solid var(--warn); }
.buddy-panne { border-left: 3px solid var(--danger); }

/* Quiz Studio — Liste in der Übersicht, Karte nur im Film.
   Ein Akzent (--ton), keine Button-Farmen, keine Vollflächen auf Zeilen. */
.studio { max-width: 1100px; }
.studio-nav {
  display: flex; align-items: center; gap: 2px;
  border-bottom: 1px solid var(--linie); margin: 0 0 16px;
}
.studio-tab {
  background: none; border: 0; border-bottom: 2px solid transparent;
  padding: 8px 12px 10px; margin-bottom: -1px;
  font: inherit; font-size: 13.5px; color: var(--leise); cursor: pointer;
}
.studio-tab:hover { color: var(--fg); }
.studio-tab[aria-current="page"],
.studio-tab[aria-pressed="true"] {
  color: var(--ink-strong); border-bottom-color: var(--mint); font-weight: 650;
}
.studio-tab-film { margin-left: auto; }
.studio-review {
  display: flex; align-items: baseline; gap: 1.4em; flex-wrap: wrap;
  font-size: 13px; color: var(--leise); margin-bottom: 10px;
}
.studio-review strong { color: var(--fg); font-weight: 650; }
.studio-filter {
  display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 13px;
}
.studio-zaehl {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--leise); cursor: pointer;
}
.studio-zaehl[aria-current="true"] { color: var(--ton); font-weight: 650; }
.studio-wahl, .studio-suche, .studio-eingabe {
  width: auto !important; min-width: 10em; max-width: 18em;
  padding: 5px 8px; font-size: 13px;
}
.studio-suche { min-width: 14em; }
.studio-textbtn {
  background: none; border: 0; padding: 0; font: inherit;
  font-size: 13px; color: var(--ton); cursor: pointer;
}
.studio-textbtn:hover { text-decoration: underline; text-underline-offset: 2px; }
.studio-kopfzeile {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px;
}
.studio-kopfzeile h2 { margin: 0; }
.studio-gruppe-kopf {
  position: sticky; top: 0; z-index: 3;
  background: var(--bg); padding: 10px 4px 6px; margin: 12px 0 0;
  border-bottom: 1px solid var(--linie);
  font-size: 12.5px; font-weight: 650; color: var(--leise);
}
.studio-gruppe:first-child .studio-gruppe-kopf { margin-top: 0; }
.studio-eintrag { border-bottom: 1px solid var(--linie); position: relative; }
.studio-eintrag[data-markiert] { box-shadow: inset 2px 0 0 var(--linie); }
.studio-eintrag[data-auf] { box-shadow: inset 3px 0 0 var(--ton); background: transparent; }
.studio-zeile {
  display: grid;
  grid-template-columns: 1.25em minmax(0, 1fr) auto;
  column-gap: 10px; row-gap: 1px; align-items: start;
  padding: 8px 4px 8px 8px;
}
.studio-check { grid-column: 1; grid-row: 1; width: auto; margin: 3px 0 0; accent-color: var(--ton); }
.studio-kurz {
  grid-column: 2; grid-row: 1;
  background: none; border: 0; padding: 0; color: inherit;
  font: inherit; font-weight: 650; font-size: 13.5px;
  text-align: left; cursor: pointer;
}
button.studio-frage {
  grid-column: 2; grid-row: 2; min-width: 0; width: 100%;
  background: none; border: 0; padding: 0; color: var(--fg); font: inherit;
  font-size: 13px; text-align: left; cursor: pointer; font-weight: 400;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.studio-meta { grid-column: 2; grid-row: 3; font-size: 12px; color: var(--leise); }
.studio-seite {
  grid-column: 3; grid-row: 1 / 4;
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  align-self: center; position: relative; min-width: 7.5em;
}
.studio-status { font-size: 12px; color: var(--leise); white-space: nowrap; }
.studio-status.haelt { color: var(--ton); }
.studio-status.ueberarbeiten { color: var(--fehl); }
.studio-hover {
  display: flex; gap: 8px; align-items: center;
  position: absolute; right: 5.2em; top: 50%; transform: translateY(-50%);
  background: var(--bg); padding: 2px 8px 2px 12px;
  opacity: 0; pointer-events: none; white-space: nowrap;
}
.studio-eintrag:hover .studio-hover,
.studio-eintrag:focus-within .studio-hover,
.studio-eintrag[data-auf] .studio-hover { opacity: 1; pointer-events: auto; }
@media (hover: none) {
  .studio-hover { opacity: 1; pointer-events: auto; position: static; transform: none; padding: 0; }
}
.studio-hover .studio-textbtn { font-size: 12.5px; }
.studio-mehr {
  background: none; border: 0; padding: 0 4px; font: inherit;
  color: var(--leise); cursor: pointer; line-height: 1;
}
.studio-menu {
  position: absolute; right: 4px; top: 100%; z-index: 5;
  background: var(--bg); border: 1px solid var(--linie); min-width: 11em;
  padding: 4px 0;
}
.studio-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 6px 12px; font: inherit; font-size: 13px; color: inherit; cursor: pointer;
}
.studio-menu button:hover { background: var(--flaeche); }
.studio-aufklapp { padding: 4px 8px 14px 2.2em; }
.studio-aufklapp[hidden] { display: none; }
.studio-antworten { list-style: none; padding: 0; margin: 6px 0 10px; }
.studio-antworten li { padding: 2px 0; font-size: 13.5px; }
.studio-antworten .ist-richtig { color: var(--ton); }
.studio-kommentar { margin-top: 8px; padding: 6px 8px; font-size: 13px; }
.studio-kom-block { margin-top: 4px; }
.studio-ok { color: var(--ton); }
.studio-auswahl {
  position: sticky; bottom: 0; z-index: 4;
  background: var(--bg); border-top: 1px solid var(--linie);
  padding: 10px 4px; margin-top: 10px;
}
.studio-film { max-width: 68ch; }
.studio-tasten { font-size: 12px; color: var(--leise); margin-top: 14px; }
.studio-hinweis { color: var(--fehl); }
.studio-leer { color: var(--leise); font-size: 13.5px; padding: 8px 0 16px; }
.studio-leer p { margin: 0 0 6px; }
.studio-kennzahlen {
  display: flex; gap: 1.8em; flex-wrap: wrap;
  font-size: 13.5px; margin-bottom: 16px;
}
.studio-kennzahlen strong { font-variant-numeric: tabular-nums; }
.studio-fortschritt { width: 7em; }
.studio-fortschritt .balken { height: 6px; margin-top: 4px; }
.studio-form { margin: 8px 0 14px; }
.studio-zuordnen { margin: 16px 0 8px; }
.studio tr[aria-current] { box-shadow: inset 3px 0 0 var(--ton); }

/* ── Verbindungs-Anzeige im Kopf ─────────────────────────────────────────
   Fester Platz im Kopf, jede Seite. Vier Zustaende wie in der Leiste. */
.verbindung {
  display: inline-flex; align-items: center; gap: 9px; max-width: 42ch;
  background: var(--karte-bg); border: 1px solid var(--linie); border-radius: 10px;
  padding: 7px 12px; box-shadow: var(--schatten);
  font: inherit; font-size: 12.5px; color: var(--ink-2); cursor: pointer; text-align: left;
}
.verbindung:hover { border-color: var(--stark); }
.verbindung .stand { height: 8px; width: 8px; border-radius: 50%; flex: none; background: var(--ruht-dot); box-shadow: 0 0 0 3px var(--ruht-bg); }
.verbindung .stand.ok { background: var(--ok-dot); box-shadow: 0 0 0 3px var(--ok-bg); }
.verbindung .stand.warnung { background: var(--warn-dot); box-shadow: 0 0 0 3px var(--warn-bg); }
.verbindung .stand.ausfall { background: var(--stop-dot); box-shadow: 0 0 0 3px var(--stop-bg); }
.verbindung .stand.unbekannt { background: transparent; box-shadow: inset 0 0 0 2px var(--ruht-dot); }
.verbindung-wer { font-weight: 600; color: var(--stark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.verbindung-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.verbindung-karte {
  position: fixed; z-index: 30; width: 330px; max-width: calc(100vw - 24px);
  background: var(--karte-bg); border: 1px solid var(--linie); border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.22); padding: 16px;
}
.verbindung-karte[hidden] { display: none; }
.verbindung-karte p { margin: 6px 0 0; }
.verbindung-karte details { margin-top: 8px; }
/* Der Inhalt der Karte, Bausteine aus dem Entwurf (v-kopf, v-werte, v-weg, v-fuss). */
.verbindung-karte { display: flex; flex-direction: column; gap: 12px; }
.verbindung-karte[hidden] { display: none; }
.v-kopf { display: flex; align-items: center; gap: 9px; }
.v-kopf .name { font-size: 14px; font-weight: 600; color: var(--stark); }
.v-kopf .pille { margin-left: auto; }
.verbindung-karte .stand { height: 9px; width: 9px; border-radius: 50%; flex: none; background: var(--ruht-dot); box-shadow: 0 0 0 3px var(--ruht-bg); }
.verbindung-karte .stand.ok { background: var(--ok-dot); box-shadow: 0 0 0 3px var(--ok-bg); }
.verbindung-karte .stand.warnung { background: var(--warn-dot); box-shadow: 0 0 0 3px var(--warn-bg); }
.verbindung-karte .stand.ausfall { background: var(--stop-dot); box-shadow: 0 0 0 3px var(--stop-bg); }
.verbindung-karte .stand.unbekannt { background: transparent; box-shadow: inset 0 0 0 2px var(--ruht-dot); }
.v-werte { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.v-werte div { display: flex; justify-content: space-between; gap: 12px; }
.v-werte b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.v-weg { display: flex; flex-direction: column; gap: 5px; }
.v-weg-titel { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }
.v-wahl {
  display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--linie); background: none; color: inherit; text-decoration: none;
  font: inherit; text-align: left; width: 100%; box-sizing: border-box;
  transition: border-color .12s, background .12s;
}
a.v-wahl:hover { border-color: var(--stark); }
.v-wahl[aria-checked="true"] { border-color: var(--stark); background: var(--wahl); }
.v-wahl.aus { opacity: .55; cursor: not-allowed; }
.v-wahl .haken { height: 15px; width: 15px; border-radius: 50%; border: 2px solid var(--linie-2); flex: none; margin-top: 2px; box-sizing: border-box; }
.v-wahl[aria-checked="true"] .haken { border-color: var(--stark); background: var(--stark); box-shadow: inset 0 0 0 3px var(--karte-bg); }
.v-wahl .text { min-width: 0; }
.v-wahl .was { display: block; font-size: 13px; font-weight: 500; color: var(--ink); }
.v-wahl .warum { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 1px; line-height: 1.45; }
.v-fuss { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--linie); padding-top: 11px; }
.v-knopf {
  flex: 1; min-width: 120px; border: 0; border-radius: 9px; padding: 8px 12px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 500; background: var(--stark); color: var(--auf-stark);
}
.v-knopf.leise { background: none; border: 1px solid var(--linie); color: var(--ink-2); }
.v-knopf.leise:hover { border-color: var(--stark); color: var(--stark); }

/* Der allgemeine Zustands-Punkt, falls ihn ein Raum ausserhalb von Leiste,
   Kopf und Team-Chat benutzt. */
.stand { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ruht-dot); }
.stand.ok { background: var(--ok-dot); }
.stand.warnung { background: var(--warn-dot); }
.stand.ausfall { background: var(--stop-dot); }
.stand.unbekannt { background: transparent; box-shadow: inset 0 0 0 2px var(--ruht-dot); }
.stand.keiner { background: transparent; }

.veraltet { opacity: .55; }
.kurve { width: 100%; height: 72px; display: block; }
.kurve polyline { fill: none; stroke: var(--ton); stroke-width: 1.5; }
.pfeil { font-size: 10px; opacity: .7; }
.tabelle .befehl { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Transkriptions-Raum: Sprecheranteil + gegliederte Auswertung ───────── */
.sprecher-balken {
  display: flex; width: 100%; height: 10px; border-radius: 5px; overflow: hidden;
  background: var(--surface-hi);
}
.sprecher-balken > i { display: block; height: 100%; }
.sprecher-legende { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.sprecher-zeile { display: flex; align-items: center; gap: 10px; }
.sprecher-punkt { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.sprecher-name { font-weight: 600; color: var(--ink-strong); font-size: 13.5px; }
.sprecher-zahlen {
  margin-left: auto; display: flex; gap: 14px; align-items: baseline;
  font-variant-numeric: tabular-nums; flex: none;
}
.sprecher-anteil { font-weight: 650; color: var(--ink-strong); font-size: 14px; min-width: 3em; text-align: right; }
.sprecher-dauer { color: var(--ink-dim); font-size: 12.5px; min-width: 4.5em; text-align: right; }

.aw-abschnitt { border-radius: 6px; padding: 18px 20px 20px; background: var(--surface); }
.aw-abschnitt + .aw-abschnitt { margin-top: 12px; }
.aw-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.aw-kopf svg { flex: none; color: var(--mint); }
.aw-kopf h2 { font-size: 15.5px; font-weight: 650; color: var(--ink-strong); margin: 0; }
.aw-text { color: var(--ink); font-size: 14px; line-height: 1.55; margin-top: 8px; }

.kapitel { margin-top: 14px; }
.kapitel-kopf { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.kapitel-zeit {
  font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 650;
  color: var(--mint); background: var(--mint-soft); padding: 2px 8px; border-radius: 4px; flex: none;
}
.kapitel-titel { font-weight: 600; color: var(--ink-strong); font-size: 14px; }
.punkt-liste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; }
.punkt-liste li { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.punkt-liste li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-subtle);
  flex: none; margin-top: 7px;
}

.kontakt-liste { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; }
.kontakt-liste li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linie); }
.kontakt-liste li:first-child { border-top: 0; padding-top: 6px; }
.kontakt-liste svg { flex: none; margin-top: 2px; color: var(--ink-dim); }
.kontakt-was { font-weight: 600; color: var(--ink-strong); font-size: 13.5px; }
.kontakt-warum { color: var(--ink-dim); font-size: 13px; margin-top: 2px; }

details.volltext { margin-top: 14px; }
details.volltext summary { cursor: pointer; font-size: 13px; color: var(--ink-dim); font-weight: 500; padding: 2px 0; }
details.volltext summary:hover { color: var(--ink); }
details.volltext pre {
  white-space: pre-wrap; font: inherit; font-size: 13px; color: var(--ink-dim);
  line-height: 1.6; max-height: 480px; overflow-y: auto; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--linie);
}

/* ── QR-Werkstatt: schmale Wochen-Pfeile am Raster, Monats-Aufklapp-Kalender ──
 * Vorher: eine Knopfzeile ueber dem Raster, kein Kalender zum Springen
 * (Mathis 2026-09-01). Zellen-Zustandsfarben stehen weiter in qr-werkstatt.js
 * (FARBE-Tabelle), hier nur die neuen Zeichen und das Popover. */
.qw-zeile-mit-pfeilen { display: flex; align-items: stretch; gap: 6px; }
.qw-pfeil {
  flex: none; width: 24px; border-radius: 6px; border: 1px solid var(--line-hi);
  background: transparent; color: var(--ink-dim); display: flex;
  align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.qw-pfeil:hover { background: var(--surface-hi); color: var(--ink); }

.qw-ic { position: relative; display: inline-block; }
.qw-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.qw-sq { width: 7px; height: 7px; border-radius: 2px; background: var(--warn); }
.qw-plus, .qw-cross { width: 10px; height: 10px; }
.qw-plus i, .qw-cross i { position: absolute; display: block; border-radius: 1px; }
.qw-plus i:first-child { left: 0; top: 4px; width: 10px; height: 2px; background: var(--mint); }
.qw-plus i:last-child { left: 4px; top: 0; width: 2px; height: 10px; background: var(--mint); }
.qw-cross i { left: 0; top: 4px; width: 10px; height: 2px; background: var(--danger); }
.qw-cross i:first-child { transform: rotate(45deg); }
.qw-cross i:last-child { transform: rotate(-45deg); }

.qw-monat-knopf {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 10px;
  border-radius: 4px; border: 1px solid var(--mint-dim); background: var(--mint-soft);
  color: var(--ink-strong); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.qw-monat-knopf:hover { background: var(--mint-dim); }
.qw-monatskalender {
  position: absolute; top: 32px; left: 0; z-index: 20; width: 230px;
  background: var(--surface-hi); border: 1px solid var(--line-hi); border-radius: 8px;
  padding: 12px; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); box-sizing: border-box;
}
.qw-monatskalender[hidden] { display: none; }
.qw-mkopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.qw-mkopf button {
  width: 22px; height: 22px; border-radius: 5px; border: 1px solid var(--line-hi);
  background: transparent; color: var(--ink-dim); display: flex;
  align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.qw-mkopf button:hover { background: var(--surface); color: var(--ink); }
.qw-mtagkopf { width: 28px; flex: none; text-align: center; font-size: 10px; color: var(--ink-subtle); }
.qw-mwoche { display: flex; gap: 2px; margin-top: 2px; border-radius: 14px; }
.qw-mwoche.jetzt { background: var(--mint-soft); }
.qw-mtag {
  width: 28px; height: 28px; flex: none; border-radius: 50%; border: 0; background: none;
  color: var(--ink); font: inherit; font-size: 12px; display: flex;
  align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.qw-mtag:hover { background: var(--surface); }
.qw-mtag.dim { color: var(--ink-subtle); }
.qw-mtag.heute { background: var(--stark); color: var(--auf-stark); font-weight: 700; }

/* Team-Chat — Kanäle links, Sprechblasen rechts. Aussehen wie Apple Nachrichten:
 * eigene Nachricht rechts in --mint, fremde links in --surface-hi.
 * Plan: domains/betrieb/docs/2026-09-01_P0_plan-team-chat.md */
.team-chat { display: flex; height: calc(100vh - 140px); min-height: 420px; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tc-kanaele { width: 200px; flex: none; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.tc-kanaele-kopf { padding: 12px 14px 6px; font-size: 12px; font-weight: 650; color: var(--ink-dim); text-transform: uppercase; letter-spacing: .03em; }
.tc-kanal-liste { flex: 1; overflow-y: auto; padding: 0 6px; }
.tc-kanal { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 7px 8px; margin: 1px 0; border: 0; border-radius: 6px; background: none; color: var(--ink-dim); font: inherit; font-size: 13.5px; cursor: pointer; }
.tc-kanal-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Die Zahl ungelesener Nachrichten. min-width haelt einstellige und
   zweistellige Zahlen gleich breit, damit die Liste beim Zaehlen nicht zuckt. */
.tc-kanal-zahl { flex: none; min-width: 18px; padding: 1px 5px; border-radius: 9px; background: var(--stark); color: var(--auf-stark); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.tc-kanal-zahl[hidden] { display: none; }
.tc-kanal.aktiv .tc-kanal-zahl { background: var(--ink-subtle); }
.tc-kanal:hover { background: var(--surface-hi); color: var(--ink); }
.tc-kanal.aktiv { background: var(--mint-soft); color: var(--ink-strong); font-weight: 600; }
.tc-kanal-leer { padding: 10px 14px; font-size: 12.5px; color: var(--ink-subtle); }
/* Die Trennlinie "Neu" im Verlauf — sie steht vor der ersten Nachricht, die
   beim letzten Besuch noch nicht da war. */
.tc-neu-linie { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; color: var(--stark); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tc-neu-linie::before, .tc-neu-linie::after { content: ""; flex: 1; height: 1px; background: var(--stark); opacity: .45; }
.tc-neu-linie span { flex: none; }

/* Benachrichtigungen — Knopf und der Bereich, den er aufklappt. Gespeichert
   wird bei jedem Klick sofort, deshalb gibt es keinen Speichern-Knopf. */
.tc-melden-knopf { margin: 6px 10px 0; padding: 6px 8px; border: 1px solid var(--line-hi); border-radius: 6px; background: none; color: var(--ink-dim); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.tc-melden-knopf:hover { background: var(--surface-hi); color: var(--ink); }

/* Der Kasten liegt ueber dem Raum, nicht in der Seitenleiste — dort ist zu
   wenig Platz fuer ein Formular. Gleiche Bauart wie der Schluessel-Kasten. */
.tc-e-deckel { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.tc-e-inhalt { width: min(420px, calc(100vw - 40px)); max-height: calc(100vh - 80px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-hi); border-radius: 12px; padding: 18px 20px; color: var(--ink); }
.tc-e-kopf { display: flex; font-size: 14px; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--ink-strong); margin-bottom: 8px; }
.tc-e-zu { border: 0; background: none; color: var(--ink-subtle); font: inherit; font-size: 13px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tc-e-zu:hover { color: var(--ink); }
.tc-e-gruppe { margin-bottom: 10px; }
.tc-e-gruppe:last-child { margin-bottom: 0; }
.tc-e-titel { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-subtle); margin-bottom: 4px; }
.tc-e-zeile { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 12.5px; color: var(--ink-dim); cursor: pointer; }
.tc-e-zeile:hover { color: var(--ink); }
/* width: auto ist noetig, nicht schmueckend: der Cockpit-Stil gibt jedem
   Eingabefeld volle Breite, und ein Auswahlknopf von 378 Pixeln schiebt seine
   eigene Beschriftung aus dem Kasten (am 2026-09-02 im Browser gemessen). */
.tc-e-zeile input { flex: none; width: auto; min-width: 0; margin: 0; }
.tc-e-zeile span { flex: 1; min-width: 0; }
/* Der erklaerende Halbsatz unter einer Gruppe — nie der Ersatz fuer die
   Beschriftung, immer die Begruendung dazu. */
.tc-e-fuss { margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--ink-subtle); }
.tc-e-hinweis { font-size: 11.5px; line-height: 1.4; color: var(--ink-subtle); }
.tc-e-hinweis.ok { color: var(--ink-dim); }
.tc-e-erlauben { width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: var(--stark); color: var(--auf-stark); font: inherit; font-size: 12px; cursor: pointer; }

.tc-kanal-neu { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.tc-kanal-neu input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-hi); border-radius: 6px; padding: 6px 8px; color: var(--ink); font: inherit; font-size: 13px; }
.tc-kanal-neu button { border: 0; border-radius: 6px; padding: 6px 10px; background: var(--stark); color: var(--auf-stark); font: inherit; cursor: pointer; }

.tc-thread { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.tc-thread-kopf { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 650; color: var(--ink-strong); }
.tc-thread-leer { margin: auto; padding: 20px; color: var(--ink-subtle); font-size: 13px; text-align: center; }
.tc-nachrichten { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }

.tc-nachricht { display: flex; }
.tc-nachricht.eigen { justify-content: flex-end; }
.tc-nachricht.fremd { justify-content: flex-start; }
.tc-blase { max-width: 72%; border-radius: 16px; padding: 8px 12px; }
.tc-nachricht.fremd .tc-blase { background: var(--surface-hi); color: var(--ink); border-bottom-left-radius: 4px; }
.tc-nachricht.eigen .tc-blase { background: var(--stark); color: var(--auf-stark); border-bottom-right-radius: 4px; }
.tc-autor { font-size: 11px; font-weight: 650; color: var(--ink-dim); margin-bottom: 2px; }
.tc-text { font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.tc-zeit { font-size: 10px; opacity: .65; margin-top: 3px; text-align: right; }
.tc-link-karte { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.15); text-decoration: none; color: inherit; }
.tc-nachricht.fremd .tc-link-karte { background: var(--bg); }
.tc-link-titel { font-size: 13px; font-weight: 650; }
.tc-link-beschr { font-size: 12px; opacity: .85; margin-top: 2px; }
.tc-link-url { font-size: 11px; opacity: .65; margin-top: 2px; }

.tc-eingabe { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.tc-eingabe input { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line-hi); border-radius: 20px; padding: 9px 14px; color: var(--ink); font: inherit; font-size: 14px; }
.tc-eingabe button { border: 0; border-radius: 20px; padding: 9px 18px; background: var(--stark); color: var(--auf-stark); font: inherit; font-weight: 600; cursor: pointer; }
.tc-eingabe button:hover { filter: brightness(1.08); }

/* Team-Chat Teil 2 — Agenten im Chat (Plan 2026-09-01, Zug 8 und 9).
   Rein additiv, alles mit Vorsilbe tc-: die Leiste selbst wird hier nicht
   angefasst, damit der laufende Umbau "Cockpit aufräumen" nichts nachziehen muss.
   Der Punkt neben dem Agenten benutzt die vorhandenen Zustands-Klassen
   (.stand.ok / .unbekannt), damit erreichbar überall dasselbe Grün ist. */
.tc-agenten { border-top: 1px solid var(--line); padding-bottom: 8px; }
.tc-agenten-liste { padding: 0 6px; max-height: 180px; overflow-y: auto; }
.tc-agenten-leer { padding: 4px 8px 8px; font-size: 12.5px; color: var(--ink-subtle); }
.tc-agent { display: flex; align-items: center; gap: 7px; padding: 5px 8px; border-radius: 6px; }
.tc-agent:hover { background: var(--surface-hi); }
.tc-agent .stand { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ink-subtle); opacity: .5; }
.tc-agent .stand.ok { background: var(--mint); opacity: 1; }
.tc-agent .stand.unbekannt { background: var(--ink-subtle); opacity: .5; }
.tc-agent-name { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-agent-wem { font-size: 11px; color: var(--ink-subtle); }
.tc-agent-weg { border: 0; background: none; color: var(--ink-subtle); font: inherit; font-size: 15px; line-height: 1; padding: 0 2px; cursor: pointer; opacity: 0; }
.tc-agent:hover .tc-agent-weg { opacity: 1; }
.tc-agent-weg:hover { color: var(--danger); }
.tc-agent-neu { display: block; width: calc(100% - 20px); margin: 8px 10px 0; border: 1px solid var(--line-hi); border-radius: 6px; padding: 6px 8px; background: none; color: var(--ink-dim); font: inherit; font-size: 12.5px; cursor: pointer; }
.tc-agent-neu:hover { background: var(--surface-hi); color: var(--ink); }

/* Antwort eines Agenten — dieselbe Sprechblase, nur mit Kante, damit man auf
   einen Blick sieht, dass hier kein Mensch geschrieben hat. */
.tc-nachricht.fremd .tc-blase.agent { border-left: 2px solid var(--mint); }

/* Hinweis über dem Eingabefeld, wenn der angesprochene Agent schläft.
   Kein Fehler-Rot: die Nachricht geht trotzdem raus. */
.tc-abwesend { padding: 8px 16px 0; font-size: 12.5px; color: var(--warn); line-height: 1.4; }

/* Der Schlüssel wird genau einmal gezeigt — deshalb ein Kasten, der stehen
   bleibt, bis er weggeklickt wird, und ein Feld, das man markieren kann. */
.tc-schluessel-deckel { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.tc-schluessel { max-width: 460px; background: var(--surface); border: 1px solid var(--line-hi); border-radius: 12px; padding: 20px 22px; color: var(--ink); }
.tc-schluessel-kopf { font-size: 15px; font-weight: 650; color: var(--ink-strong); margin-bottom: 8px; }
.tc-schluessel p { font-size: 13px; line-height: 1.5; color: var(--ink-dim); margin: 0 0 10px; }
.tc-schluessel-feld { width: 100%; box-sizing: border-box; background: var(--bg); border: 1px solid var(--line-hi); border-radius: 6px; padding: 9px 10px; color: var(--ink-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.tc-schluessel-fuss { font-size: 11.5px; margin-top: 10px; }
.tc-schluessel-zu { margin-top: 6px; border: 0; border-radius: 6px; padding: 8px 16px; background: var(--stark); color: var(--auf-stark); font: inherit; font-weight: 600; cursor: pointer; }

/* ══ Schmale Fenster ═════════════════════════════════════════════════════
   Im Entwurf fragt die Umbruch-Regel die Breite der Vorschau-Huelle ab
   (@container). Hier gibt es keine Huelle — hier zaehlt das Fenster.
   Diese Abfrage steht ABSICHTLICH als letzte im Blatt: sie muss die Regel
   `.nur-schmal { display: none !important }` von oben ueberschreiben. Bis
   heute stand sie davor, darum war der Menue-Knopf nie zu sehen. */
@media (max-width: 860px) {
  .rahmen { grid-template-columns: 1fr; }
  .leiste {
    position: fixed; inset: 0 auto 0 0; width: var(--leiste); z-index: 40;
    transform: translateX(-100%); transition: transform .18s ease;
  }
  .leiste.auf { transform: none; box-shadow: 0 0 40px rgba(27,34,28,.18); }
  .schleier.auf { display: block; }
  .nur-schmal { display: inline-flex !important; }
  .buehne > .kopf { padding: 13px 16px; gap: 10px; }
  .buehne > .kopf .rechts { order: 9; width: 100%; margin-left: 0; flex-wrap: wrap; }
  .verbindung { flex: 1; max-width: none; }
  /* Auf dem Handy brauchte der Kopf drei Zeilen und damit ein Fuenftel des
     Bildschirms (gemessen 2026-09-02 bei 375 Pixeln). Der Kontowechsel ist
     unterwegs der seltenste Griff — er weicht, Name und Abmelden bleiben. */
  #konto-wechseln { display: none; }
  .buehne > .kopf .wer { font-size: 12px; }
  .inhalt { padding: 18px 16px 40px; }
  .inhalt:has(.fuellend),
  .inhalt.fuellend-aktiv { padding: 0; }
  .stapel { gap: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
