/* Kontorkraft-Web — Farben und Schrift wie kontorkraft.de (site/src/styles/tokens.css) */

@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url("fonts/archivo-500-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: "Archivo"; font-weight: 500; font-display: swap; src: url("fonts/archivo-500-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url("fonts/archivo-600-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: "Archivo"; font-weight: 600; font-display: swap; src: url("fonts/archivo-600-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-weight: 700; font-display: swap; src: url("fonts/archivo-700-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; }

:root {
  --brand: hsl(212 62% 34%);
  --brand-ink: hsl(212 58% 26%);
  --brand-soft: hsl(212 46% 95%);
  --on-brand: #fff;
  --paper: hsl(40 33% 97.5%);
  --surface: #fff;
  --sunk: hsl(35 24% 95%);
  --ink: hsl(30 14% 12%);
  --muted: hsl(35 8% 38%);
  --rule: hsl(35 14% 84%);
  --good: hsl(158 72% 28%);
  --warn: hsl(33 80% 33%);
  --critical: hsl(14 74% 40%);
  --radius: 10px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: hsl(212 72% 62%);
    --brand-ink: hsl(212 66% 78%);
    --brand-soft: hsl(212 34% 16%);
    --on-brand: hsl(35 20% 10%);
    --paper: hsl(35 12% 8%);
    --surface: hsl(35 10% 12%);
    --sunk: hsl(35 10% 15%);
    --ink: hsl(35 20% 92%);
    --muted: hsl(35 8% 64%);
    --rule: hsl(35 8% 24%);
    --good: hsl(158 50% 55%);
    --warn: hsl(33 80% 62%);
    --critical: hsl(14 80% 64%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); }
button, input, textarea, select { font: inherit; color: inherit; }
/* Fokus sichtbar (KK-122 A5): ein Ring für alles, was per Tastatur erreicht wird. `outline: none` nur mit Ersatz, der
   genauso deutlich ist (z. B. .trenner: der Balken wird blau). Wo der Ring an einem Rand mit overflow abgeschnitten würde
   (Listen, Menüs), nach innen legen: `outline-offset: -2px`, nicht abschalten. */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* --- Rahmen ---------------------------------------------------------------- */
.rahmen { display: flex; flex-direction: column; min-height: 100dvh; }
.hinweis-entwicklung {
  background: var(--warn); color: #fff; text-align: center; font-size: 14px; padding: 4px 12px;
}
.inhalt { flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 860px; margin: 0 auto; }

/* --- Kopf (KK-122 B1/B2) ---------------------------------------------------------------------------------------
   Am PC: Marke · [Browser-Schalter] · Chat · Übersicht · Meldungen · Einstellungen · Mein Konto ▾ — alles Wörter, eine
   Zeile. Persönliches (Verbindungen, Anmeldung, Benachrichtigungen, Abmelden) steht im Menü „Mein Konto"; der Kopf hat
   damit vier Ziele statt sechs, und die Zahlenkunststücke der Abfragen von KK-065/07.10.2026 sind weg.
   Am Handy (≤ 700 px): oben Seitentitel · [Browser-Schalter] · Personensymbol; die Navigation wird zur **Leiste unten**
   mit Symbol und Wort (je ≥ 44 px, hier 56 px hoch). Das Zeichen der Marke (drei Balken) ist dort ausgeblendet — es sah
   aus wie ☰. Kein seitliches Scrollen bei 390 und 320 px: Die Leiste teilt sich die Breite zu gleichen Teilen
   (`flex: 1 1 0`, Wort mit Auslassungspunkten), der Titel oben gibt nach (`min-width: 0`). Höhen und Abstände kommen
   aus den Variablen, hell und dunkel gleich. */
.kopf {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  /* 10 statt 5: Das Menü „Mein Konto" klappt über den Chat, dessen Gesprächsliste z-index 9 trägt (KK-122) */
  position: sticky; top: 0; z-index: 10;
}
.marke { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--ink); }
.marke img { width: 28px; height: 28px; }
.seitentitel { display: none; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; white-space: nowrap;
}
.nav a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.nav a:hover { color: var(--ink); }
.nav .nav-zeichen { display: none; flex: none; }
/* Die Zahl an „Meldungen" (KK-065): `.zahl` (weiter unten) ist auf ein Flex-Kind zugeschnitten; hier steht sie im
   Link und braucht `inline-block`. `[hidden]` sticht das mit `display: none !important` (ganz oben). */
.nav .zahl { display: inline-block; margin-left: 7px; vertical-align: 1px; }

/* Mein Konto: Knopf mit Personensymbol und Vornamen, das Menü klappt darunter auf (static/konto.js) */
.konto { position: relative; flex: none; margin-left: 6px; padding-left: 6px; border-left: 1px solid var(--rule); }
.konto-knopf {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 8px 10px;
  border: 0; border-radius: 8px; background: none; color: var(--muted); font-weight: 600; cursor: pointer;
}
.konto-knopf:hover, .konto-knopf[aria-expanded="true"] { color: var(--ink); background: var(--sunk); }
.konto-knopf[data-aktiv] { color: var(--brand-ink); background: var(--brand-soft); }
.konto-name { max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.konto-pfeil { flex: none; }
.konto-menue {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 264px; max-width: calc(100vw - 16px);
  padding: 6px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.konto-wer { display: flex; flex-direction: column; padding: 8px 12px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; }
.konto-wer strong { overflow-wrap: anywhere; }
.konto-wer .dezent { font-size: 14px; }
.konto-menue a, .konto-menue button {
  display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 7px; background: none;
  color: var(--ink); font-size: 16px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; width: 100%;
}
.konto-menue a:hover, .konto-menue button:hover { background: var(--sunk); }
.konto-menue a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.konto-menue :focus-visible { outline-offset: -2px; }
.konto-menue hr { width: 100%; border: 0; border-top: 1px solid var(--rule); margin: 4px 0; }
.konto-menue form { margin: 0; }

/* Tablett hochkant (701–960 px): Marke und Browser-Schalter zeigen nur ihr Zeichen, der Kontoknopf nur das Symbol */
@media (max-width: 960px) {
  .marke span { display: none; }
  .nav a { padding: 8px 8px; }
  .konto-name { display: none; }
}

/* Handy (≤ 700 px): Seitentitel oben, Leiste unten */
@media (max-width: 700px) {
  .kopf { gap: 6px; padding-left: 12px; padding-right: 6px; min-height: 57px; }
  .marke { display: none; }
  .seitentitel {
    display: block; flex: 1 1 auto; min-width: 0; font-size: 18px; font-weight: 700; color: var(--ink);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .konto { margin-left: 0; padding-left: 0; border-left: 0; }
  .konto-pfeil { display: none; }
  .konto-knopf { justify-content: center; padding: 8px; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; gap: 0;
    background: var(--surface); border-top: 1px solid var(--rule);
    padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
  }
  .nav a {
    flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; min-height: 56px; padding: 6px 2px 5px;
    border-radius: 0; font-size: 12.5px; line-height: 1.2;
  }
  .nav a[aria-current="page"] { background: none; box-shadow: inset 0 3px 0 var(--brand); }
  .nav .nav-zeichen { display: block; }
  .nav .nav-wort { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  /* Die Zahl sitzt oben rechts am Symbol */
  .nav .zahl { position: absolute; top: 3px; left: calc(50% + 5px); margin: 0; font-size: 12px; line-height: 19px; min-width: 19px; padding: 0 5px; }
  /* Platz für die Leiste: der Inhalt endet über ihr (auch der feste Rahmen der Chat-Seite, box-sizing: border-box) */
  .rahmen.mit-leiste { padding-bottom: calc(57px + env(safe-area-inset-bottom)); }
  /* Tippt jemand im Chat, steht die Tastatur unten — dann braucht die Leiste den Platz nicht */
  body:has(.eingabe textarea:focus) .nav { display: none; }
  body:has(.eingabe textarea:focus) .rahmen.mit-leiste { padding-bottom: 0; }
}
/* Sehr schmal (≤ 360 px): „Einstellungen" passt mit 12,5 px nicht in ein Viertel von 320 px */
@media (max-width: 360px) { .nav a { font-size: 11.5px; padding-left: 1px; padding-right: 1px; } }

/* --- Formulare und Knöpfe ----------------------------------------------------- */
.karte {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 24px; margin: 24px 16px;
}
.karte h1 { margin: 0 0 8px; font-size: 26px; font-weight: 700; }
.karte p { color: var(--muted); margin: 0 0 20px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=email], select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper);
}
input:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: var(--on-brand); font-weight: 700; cursor: pointer; text-decoration: none;
}
.knopf:disabled { opacity: .55; cursor: default; }
.knopf.zweit { background: var(--surface); color: var(--ink); border-color: var(--rule); }
.knopf.gut { background: var(--good); color: #fff; }
/* Gefahr-Knöpfe (KK-122 A4): Löschen, Entfernen, Sperren, Trennen, Zurückziehen, Zurücksichern, eine Aufgabe abbrechen →
   `class="knopf … gefahr"` (statt `zweit`): rot umrandet, rote Schrift, **nicht gefüllt** — so ist er nie der Hauptknopf.
   Gefüllt (`gefahr voll`) nur der letzte, unumkehrbare Knopf, heute allein „Auf Werkszustand zurücksetzen".
   Dazu gehört am Formular `data-gefahr`, damit auch der Knopf im Rückfragefenster rot wird (static/frage.js).
   tests/test_vorlagen_regeln.py sichert die Regel für die Vorlagen ab. */
.knopf.gefahr { background: var(--surface); color: var(--critical); border-color: var(--critical); }
.knopf.gefahr:hover:not(:disabled) { background: color-mix(in srgb, var(--critical) 10%, var(--surface)); }
.knopf.gefahr.voll { background: var(--critical); color: var(--on-brand); }
.knopf.gefahr.voll:hover:not(:disabled) { background: color-mix(in srgb, var(--critical) 86%, var(--ink)); }
.knopf.breit { width: 100%; margin-top: 22px; }
.fehler { color: var(--critical); font-weight: 600; }

/* --- Chat ------------------------------------------------------------------- */
.verlauf { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.leer { color: var(--muted); text-align: center; margin: auto; max-width: 30em; }
.leer h2 { color: var(--ink); font-size: 22px; margin-bottom: 6px; }
/* Startzustand eines neuen Gesprächs (KK-122 B3): Beispielaufträge als Knöpfe — ein Klick füllt das Eingabefeld */
.leer .beispiele-titel { margin: 18px 0 8px; font-size: 15px; }
.beispiele { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.beispiel {
  min-height: 44px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); font-size: 15.5px; font-weight: 500; text-align: left; cursor: pointer; overflow-wrap: anywhere;
}
.beispiel:hover { border-color: var(--brand); background: var(--brand-soft); }
.leer .katalog-weg { margin-top: 16px; font-size: 15.5px; }
.leer .katalog-weg a { font-weight: 600; }
.nachricht { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.nachricht.nutzer { align-self: flex-end; background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 4px; }
.nachricht.nutzer a { color: inherit; }
.nachricht.kontorkraft { align-self: flex-start; background: var(--surface); border: 1px solid var(--rule); border-bottom-left-radius: 4px; }
.nachricht.hinweis { align-self: center; background: var(--sunk); color: var(--ink); max-width: 95%; text-align: center; border-radius: 10px; }
.nachricht.hinweis.fehler-hinweis { color: var(--critical); }
.nachricht .autor { display: block; font-size: 13px; opacity: .75; margin-bottom: 2px; }
.nachricht .aktion { margin-top: 10px; }
/* Markdown in Antworten der Kontorkraft (KK-001, markdown.js). Die Blase hat `pre-wrap` für schlichten Text —
   hier gelten Absätze. Breites (Tabelle, Code) scrollt in sich, nie die Seite. */
.nachricht .text.md { white-space: normal; min-width: 0; }
.nachricht.kontorkraft { min-width: 0; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md .md-tabelle { margin: 0 0 10px; }
.md h3 { font-size: 18px; font-weight: 700; margin: 16px 0 6px; line-height: 1.3; }
.md h4 { font-size: 17px; font-weight: 700; margin: 14px 0 4px; line-height: 1.3; }
.md ul, .md ol { padding-left: 1.35em; }
.md li { margin: 2px 0; }
.md li > ul, .md li > ol { margin: 2px 0 4px; }
.md li > p { margin: 0 0 4px; }
.md code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88em; background: var(--sunk); border-radius: 5px; padding: 1px 5px; }
.md pre { background: var(--sunk); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre; line-height: 1.45; }
.md pre code { background: none; padding: 0; font-size: 14.5px; }
.md blockquote { border-left: 3px solid var(--rule); padding: 2px 0 2px 12px; color: var(--muted); }
.md blockquote > :last-child { margin-bottom: 0; }
.md hr { border: 0; border-top: 1px solid var(--rule); margin: 14px 0; }
.md .md-tabelle { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.md table { border-collapse: collapse; font-size: 15.5px; }
.md th, .md td { padding: 6px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.md th { font-weight: 700; white-space: nowrap; border-bottom-width: 2px; }
.md td { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.md td.md-lang { white-space: normal; min-width: 16em; }
.md tr:last-child td { border-bottom: 0; }
.md .md-rechts { text-align: right; }
.md .md-mitte { text-align: center; }
.taetigkeit { align-self: flex-start; color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.punkte::after { content: "…"; animation: puls 1.2s infinite; }
@keyframes puls { 50% { opacity: .2; } }
.eingabe {
  display: flex; gap: 8px; padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--rule);
  position: sticky; bottom: 0;
}
.eingabe textarea {
  flex: 1; resize: none; min-height: 48px; max-height: 160px; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: 12px; background: var(--paper);
}
.eingabe textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Stoppen (KK-059): Solange die Kontorkraft arbeitet, ist der Senden-Knopf der Stopp-Knopf — kein zusätzlicher Knopf in
   der Leiste. Die Farbe macht unmissverständlich, dass er etwas anderes tut als „Senden“; alarmierend ist er nicht. */
#senden.stopp { background: var(--warn); color: #fff; border-color: transparent; }

/* --- Browser ------------------------------------------------------------------ */
/* Zwei Plätze (KK-055 Teil B): Reiter über der Leiste — nur für Administratoren in der Seite */
/* KK-122 B6: „Arbeit“ | „Für die Einrichtung“, daneben ein Untertitel, was der zweite ist (schmal ausgeblendet) */
.browser-plaetze { display: flex; align-items: flex-end; gap: 4px 12px; padding: 8px 12px 0; background: var(--surface); min-width: 0; }
.browser-reiter { display: flex; gap: 4px; flex: none; }
.browser-platz-text { font-size: 13.5px; padding-bottom: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 480px) { .browser-platz-text { display: none; } .browser-platz { padding: 6px 12px; } }
.browser-platz {
  padding: 6px 16px; border: 1px solid var(--rule); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: var(--paper); color: var(--muted); font-weight: 600; cursor: pointer; min-height: 36px;
}
.browser-platz:hover { color: var(--ink); }
.browser-platz[aria-selected="true"] { color: var(--brand-ink); background: var(--brand-soft); border-color: transparent; }
.browser-leiste {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px;
  background: var(--surface); border-bottom: 1px solid var(--rule);
}
.zustand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-right: auto; }
.zustand::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.zustand[data-z="mensch"]::before { background: var(--good); }
.zustand[data-z="agent"]::before { background: var(--brand); }
/* Der Rahmen hält, was über dem Bild schwebt — die Fläche selbst scrollt beim vergrößerten Zusehen (KK-017) */
.browser-rahmen { flex: 1; min-height: 0; min-width: 0; position: relative; display: flex; }
.browser-flaeche { flex: 1; position: relative; background: #333; min-height: 0; min-width: 0; overflow: hidden; }
.browser-flaeche iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Zusehen am Handy: Berührungen gehören der Fläche (wischen, zwei Finger, Doppeltipp), nicht noVNC — dort ist ohnehin
   nur Ansehen. Vergrößert hat der iframe feste Maße (browser.js) und die Fläche scrollt. */
.browser-flaeche.nur-bild { touch-action: pan-x pan-y; }
.browser-flaeche.nur-bild iframe { pointer-events: none; }
.browser-flaeche.vergroessert { overflow: auto; overscroll-behavior: contain; }
.browser-flaeche.vergroessert iframe { right: auto; bottom: auto; }
.lupe {
  position: absolute; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 2;
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 15px 8px 12px;
  border-radius: 999px; border: 1px solid rgb(255 255 255 / .28); background: rgb(24 24 24 / .82); color: #fff;
  font-weight: 600; font-size: 15px; cursor: pointer;
}
.lupe[aria-pressed="true"] .lupe-plus { display: none; }
/* Zwischenablage (KK-002): kleiner Hinweis über dem Bild — nur wenn der eigene Browser nicht von selbst mitspielt */
.zwischenablage {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 8px; width: max-content; max-width: calc(100% - 24px);
  padding: 7px 7px 7px 14px; border-radius: 12px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); box-shadow: 0 8px 28px rgb(0 0 0 / .35); font-size: 15px; line-height: 1.3;
}
.zwischenablage input { width: 12em; min-width: 0; flex: 1; padding: 8px 10px; font-size: 16px; }
.zwischenablage .symbol { flex: none; width: 34px; height: 34px; }
.browser-flaeche .aus {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; color: #eee; text-align: center; padding: 24px;
}
.browser-flaeche .aus p { max-width: 30em; margin: 0; }

/* --- Einstellungen ------------------------------------------------------------ */
/* Eine Seite je Bereich mit einer Navigation in Gruppen (KK-122 D1, einstellungen_navi.html); darunter eine Karte.
   Am PC (ab 900 px) Seitennavigation links und der Inhalt wie bisher höchstens 860 px breit; darunter ein zugeklapptes
   <details> oben, das nur den aktuellen Bereich zeigt. Ein Element für beide Formate — die Zusammenfassung ist am PC weg. */
.einst-inhalt { min-width: 0; }
.einst-inhalt > .karte, .einstellungen > .karte { margin: 18px 0 0; }
.einst-inhalt > .meldung { margin: 16px 0 0; }
.einst-navi { margin: 14px 0 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.einst-navi > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px;
  border-radius: var(--radius);
}
.einst-navi > summary::-webkit-details-marker { display: none; }
.einst-navi > summary::after { content: "▾"; margin-left: auto; color: var(--brand); font-size: 18px; line-height: 1; }
.einst-navi[open] > summary::after { content: "▴"; }
.einst-wo { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.einst-wo .dezent { font-size: 14px; font-weight: 600; }
.einst-navi nav { padding: 2px 8px 10px; border-top: 1px solid var(--rule); }
.einst-gruppe {
  margin: 12px 10px 2px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.einst-navi ul { list-style: none; margin: 0; padding: 0; }
.einst-navi a {
  display: flex; align-items: center; min-height: 44px; padding: 6px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; overflow-wrap: anywhere;
}
.einst-navi a:hover { background: var(--sunk); }
.einst-navi a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
.einst-untername { display: block; margin: 6px 10px 0; font-size: 14.5px; font-weight: 600; color: var(--muted); }
.einst-unter ul a { padding-left: 24px; }
@media (min-width: 900px) {
  .inhalt.breit.einstellungen.mit-navi {
    max-width: 1160px; display: grid; grid-template-columns: 212px minmax(0, 860px); gap: 0 36px; align-items: start;
    justify-content: center;
  }
  .einst-navi {
    position: sticky; top: 12px; margin-top: 18px; border: 0; background: none;
    max-height: calc(100dvh - 24px); overflow-y: auto;
  }
  .einst-navi > summary { display: none; }
  .einst-navi nav { border-top: 0; padding: 0; }
  .einst-gruppe { margin: 14px 10px 2px; }
  .einst-gruppe:first-child { margin-top: 2px; }
  .einst-navi a { min-height: 36px; padding: 5px 10px; font-size: 15.5px; }
}
/* „Was gilt genau?" unter dem einen Satz einer Seite (KK-122 D3): Abstand zur Handlung darunter */
.karte > details.mehr { margin: 0 0 14px; }
.karte > details.mehr > .fliess:first-of-type { margin-top: 8px; }
/* Alter der letzten Sicherung (KK-122 D4): oben auf der Seite, daneben „Jetzt sichern" */
.sicherung-stand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 14px; }
.sicherung-stand .alter { margin: 0; font-weight: 700; }
.sicherung-stand .alter.gut { color: var(--good); }
.sicherung-stand .alter.warnung { color: var(--warn); }
.sicherung-stand .alter.keine { color: var(--critical); }
.sicherung-stand details.neu { margin: 0; flex: 1 1 100%; }
.sicherung-stand details.neu:not([open]) { flex: 0 1 auto; }
.karte h2 { margin: 22px 0 8px; font-size: 19px; font-weight: 700; }
.karte > h2:first-child { margin-top: 0; }
.karte > h3 { margin: 18px 0 6px; font-size: 16.5px; font-weight: 700; }
.karte .fliess { color: var(--ink); margin: 0 0 10px; line-height: 1.55; }
.karte .fliess.dezent, .dezent { color: var(--muted); }
.karte small { display: block; font-weight: 400; margin-top: 6px; line-height: 1.45; }
/* Der überschriebene Wortlaut unter „Wie es steht" (KK-065): dezent, der Knopf daneben — am Handy darunter */
.stand-vorher { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 14px 0 4px; }
.stand-vorher .fliess { flex: 1 1 240px; margin: 0; font-size: 15px; }
.stand-vorher form { margin: 0; }
.formular { margin-top: 10px; }
.formular button { margin-top: 18px; }
.knopf.klein { min-height: 36px; padding: 6px 12px; font-size: 15px; }
/* Touch-Ziele am Handy mindestens 44 px hoch (KK-122 A6) — am PC bleibt der kleine Knopf klein */
@media (max-width: 700px) { .knopf.klein { min-height: 44px; } }
.meldung { padding: 10px 12px; border-radius: 8px; background: var(--sunk); margin: 0 0 16px; }
.meldung.fehler { color: var(--critical); }
.liste { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; }
.liste th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.liste td { padding: 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.liste td.rechts { text-align: right; }
.liste form { margin: 0; }
/* Als Liste (ul.liste) ohne Listenpunkte: die Einträge sind Karten (.person), Punkte davor sahen verloren aus (Abnahme KK-122) */
ul.liste { list-style: none; padding: 0; }
@media (max-width: 640px) {
  .liste thead { display: none; }
  .liste, .liste tbody, .liste tr, .liste td { display: block; width: 100%; }
  .liste tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  .liste td { border: 0; padding: 2px 0; }
  .liste td.rechts { text-align: left; margin-top: 8px; }
}
.marke-gut { color: var(--good); font-weight: 600; }

/* --- Chat: nur der Verlauf scrollt, Eingabe bleibt stehen (KK-006); Pfeil zu den neuesten (KK-007) ---- */
.rahmen.fest { height: 100dvh; min-height: 0; }
.rahmen.fest .inhalt { min-height: 0; }
.inhalt.chat { position: relative; }
.inhalt.chat .verlauf { min-height: 0; overscroll-behavior: contain; }
.nach-unten {
  position: absolute; right: 18px; bottom: 124px; z-index: 5;          /* über Eingabe und Statuszeile */
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule);
  background: var(--surface); color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.nach-unten.neu::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--brand); border: 2px solid var(--surface);
}

/* --- Arbeitsplatz: Chat und Browser in einer Ansicht (KK-005) ---------------------------------------
   data-ansicht = chat | beides | browser. Breit stehen beide nebeneinander, schmal zeigt „beides" nur den
   Browser — nebeneinander wäre am Handy nichts lesbar. */
.arbeitsplatz { flex: 1; min-height: 0; display: flex; }
.arbeitsplatz > .inhalt.chat { min-width: 0; }
.browser-bereich { display: none; flex: 1; min-width: 0; flex-direction: column; background: var(--surface); }
.trenner { display: none; flex: 0 0 9px; cursor: col-resize; position: relative; background: var(--paper); touch-action: none; }
.trenner::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: var(--rule); }
.trenner:hover::before, .trenner:focus-visible::before, .zieht .trenner::before { left: 3px; width: 3px; background: var(--brand); }
.trenner:focus-visible { outline: none; }
.zieht { user-select: none; cursor: col-resize; }
.zieht iframe { pointer-events: none; }
[data-ansicht="beides"] .browser-bereich, [data-ansicht="browser"] .browser-bereich { display: flex; }
[data-ansicht="browser"] > .inhalt.chat { display: none; }
@media (min-width: 1000px) {
  [data-ansicht="beides"] > .inhalt.chat {
    flex: 0 0 var(--chat-breite, clamp(360px, 34vw, 500px)); max-width: none; margin: 0;
  }
  [data-ansicht="beides"] > .trenner { display: block; }
}
@media (max-width: 999.98px) {
  [data-ansicht="beides"] > .inhalt.chat { display: none; }
}
.browser-bereich .browser-leiste { padding: 8px 12px; gap: 6px 8px; min-height: 53px; }
/* Der Zustand nimmt den Platz, der bleibt, und bricht notfalls um — die Knöpfe rutschen erst darunter, wenn es eng wird */
.browser-bereich .zustand { flex: 1 1 0; min-width: 11em; margin-right: 0; line-height: 1.25; }
.browser-bereich .zustand::before { flex: none; }
@media (max-width: 640px) { .browser-bereich .zustand { font-size: 15px; min-width: 0; flex-basis: calc(100% - 50px); } }

/* Schalter im Kopf: blendet den Browser ein und aus, der Punkt zeigt, ob gerade jemand darin arbeitet */
.browser-schalter {
  margin-left: auto; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface);
  color: var(--muted); font-weight: 600; cursor: pointer;
}
.browser-schalter:hover { color: var(--ink); }
.browser-schalter[aria-pressed="true"] { color: var(--brand-ink); background: var(--brand-soft); border-color: transparent; }
.browser-schalter::after {
  content: ""; position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--muted); display: none;
}
.browser-schalter[data-z="agent"]::after { display: block; background: var(--brand); animation: puls 1.6s infinite; }
.browser-schalter[data-z="mensch"]::after { display: block; background: var(--good); }
.browser-schalter + .nav { margin-left: 10px; }
/* Hier und nicht oben beim Kopf: Die Grundregel steht weiter oben in dieser Datei nicht, sondern hier — eine Abfrage
   davor verlöre gegen sie (gleiche Spezifität, spätere Zeile gewinnt). */
@media (max-width: 960px) { .browser-schalter .lang { display: none; } .browser-schalter + .nav { margin-left: 4px; } }
@media (max-width: 700px) {
  .browser-schalter { padding: 7px 10px; min-width: 44px; margin-left: 0; }
}

/* Kleine Knöpfe nur mit Symbol (Bereich groß, ausblenden, zurück zum Chat) */
.symbol {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
}
.symbol:hover { color: var(--ink); background: var(--sunk); }
.symbol[aria-pressed="true"] { color: var(--brand-ink); background: var(--brand-soft); }
.symbol.neu::after {
  content: ""; position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand); border: 2px solid var(--surface);
}
@media (min-width: 1000px) { .symbol.nur-schmal { display: none; } }
@media (max-width: 999.98px) { .symbol.nur-breit { display: none; } }

/* --- Übersicht: Meldungen, Aufgaben, Zeitpläne, Merkliste, Katalog ------------------------------------ */
.inhalt.breit { max-width: 860px; width: 100%; margin: 0 auto; padding: 0 16px 48px; display: block; }
/* Neun Reiter unter Einstellungen (seit KK-049) passen am PC nicht mehr in 860 px: Die Leiste scrollt waagerecht (nie die Seite),
   ein Pfeil mit Verlauf am Rand zeigt, dass es weitergeht (reiter.html); der aktuelle Reiter rückt in die Mitte */
.reiter-leiste { position: relative; }
.reiter-pfeil {
  position: absolute; top: 14px; bottom: 11px; width: 52px; display: flex; align-items: center; padding: 0 12px; border: 0;
  font: inherit; font-size: 24px; font-weight: 700; line-height: 1; color: var(--brand); cursor: pointer;
}
.reiter-pfeil.links { left: -16px; justify-content: flex-start; background: linear-gradient(to right, var(--paper) 55%, transparent); }
.reiter-pfeil.rechts { right: -16px; justify-content: flex-end; background: linear-gradient(to left, var(--paper) 55%, transparent); }
.reiter-pfeil:hover { color: var(--brand-ink); }
.reiter {
  display: flex; gap: 0; margin: 14px -16px 0; padding: 0 16px 10px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--rule);
}
.reiter::-webkit-scrollbar { display: none; }
.reiter a {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 999px;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 16px;
}
.reiter a:hover { color: var(--ink); }
.reiter a[aria-current="page"] { color: var(--brand-ink); background: var(--brand-soft); }
/* Seit KK-065 trägt nur noch der Menüpunkt „Meldungen" eine Zahl (`.nav .zahl` weiter oben) — die Reiterleiste hat
   keine mehr. Die Grundregel bleibt hier stehen, damit eine spätere Zahl am Reiter wieder gleich aussieht. */
.zahl {
  min-width: 21px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--on-brand);
  font-size: 13px; line-height: 21px; text-align: center; font-weight: 700;
}
.zahl.hilfe { background: var(--critical); color: #fff; }
.bereich-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 18px 0 14px; }
.bereich-kopf p { margin: 0; flex: 1 1 16em; }
.bereich-kopf .rechts { display: flex; gap: 8px; }
.bereich-kopf form { margin: 0; }
.inhalt.breit > .meldung { margin: 16px 0 0; }
.meldung.gut { color: var(--good); }

.eintrag {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 10px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  color: inherit; text-decoration: none;
}
a.eintrag:hover { border-color: var(--brand); }
.eintrag .haupt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.eintrag strong { font-weight: 700; overflow-wrap: anywhere; }
.eintrag .text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.eintrag .text.zusatz { margin-top: 1.5em; }     /* Zusatz nur für Vorgesetzte (Tagesbericht: Verbrauch) — abgesetzt wie ein Absatz im Text */
.eintrag .text.kurz { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); white-space: normal; }
.eintrag .dezent { font-size: 14.5px; }
.eintrag.gelesen { background: transparent; }
.eintrag.gelesen strong { font-weight: 600; }
.eintrag.meldung-hilfe { border-color: var(--critical); }
.eintrag.laufend { border-color: var(--brand); }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.aktionen form { margin: 0; }
.art { flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--muted); }
.art.erfolg { background: var(--good); }
.art.warnung { background: var(--warn); }
.art.hilfe { background: var(--critical); }
.art.info { background: var(--brand); }

.abzeichen {
  flex: none; display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--sunk); color: var(--muted); white-space: nowrap; margin-top: 2px;
}
.abzeichen.erledigt { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.abzeichen.laeuft { background: var(--brand-soft); color: var(--brand-ink); }
.abzeichen.hilfe, .abzeichen.prio-1 { background: color-mix(in srgb, var(--critical) 14%, transparent); color: var(--critical); }
.abzeichen.fehler, .abzeichen.prio-2 { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.abzeichen.laeuft::after { content: " …"; animation: puls 1.2s infinite; }
/* Von der Kontorkraft vorgeschlagen (KK-016): Zeitplan-Vorschlag, Eintrag auf der Merkliste — dezent, keine Warnfarbe */
.abzeichen.vorschlag { background: var(--brand-soft); color: var(--brand-ink); }
.eintrag.vorschlag { border-style: dashed; border-color: var(--brand); }

/* Akten (KK-061): Der Baum wird eingerückt, nicht in Spalten gelegt — bei 390 px bleibt so eine Spalte und nichts
   scrollt waagerecht. Der Pfad bricht um, statt überzulaufen. */
.eintrag.akte-ebene-2 { margin-left: 16px; }
.eintrag.akte-ebene-3 { margin-left: 32px; }
.akte-pfad { overflow-wrap: anywhere; }
.akte-pfad a { color: inherit; }
.akte-kosten { margin: 18px 0 0; }
h2.akte-abschnitt, h2.abschnitt { font-size: 19px; font-weight: 700; margin: 26px 0 10px; }
/* Was die Kontorkraft weiß (KK-062): Abschnittsüberschrift mit Abzeichen „gepflegt" / „errechnet" rechts daneben */
h2.abschnitt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
h2.abschnitt .abzeichen { font-size: 13px; }
/* Der echte Vorspann, wortgleich: feste Schrittweite, damit Einrückungen und Leerzeilen stehen, wie sie stehen */
.karte .fliess.vorspann { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.5; }
details.notiz-aendern { margin: -4px 0 12px; }
details.notiz-aendern summary { font-size: 14.5px; }
details.notiz-aendern .gemerkt-neu { margin-top: 8px; }

details.neu { margin: 0 0 16px; }
details.neu > summary { list-style: none; cursor: pointer; }
details.neu > summary::-webkit-details-marker { display: none; }
details.neu[open] > summary { background: var(--surface); color: var(--ink); border-color: var(--rule); }
details.neu .formular {
  margin-top: 10px; padding: 4px 18px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
}
textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); resize: vertical; }
label textarea, label input, label select { margin-top: 6px; font-weight: 500; }
fieldset.tage { border: 0; padding: 0; margin: 14px 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
fieldset.tage legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.tag { margin: 0; cursor: pointer; }
.tag input { position: absolute; opacity: 0; pointer-events: none; }
.tag span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 40px; padding: 0 10px;
  border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--muted); font-weight: 600;
}
.tag input:checked + span { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.tag input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }

.leer-bereich { text-align: center; color: var(--muted); padding: 48px 12px; max-width: 32em; margin: 0 auto; }
.leer-bereich h2 { color: var(--ink); font-size: 21px; margin: 0 0 6px; }
.leer-bereich p { margin: 0; }
.zurueck { text-decoration: none; font-weight: 600; }
.karte.flach { margin: 0; }
.kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.kopfzeile h1 { margin: 0; flex: 1 1 12em; font-size: 23px; overflow-wrap: anywhere; }
.karte .ergebnis { white-space: pre-wrap; overflow-wrap: anywhere; }
.karte .meldung { margin: 14px 0 0; }
.schritte { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--rule); }
.schritte li { position: relative; padding: 3px 0 3px 16px; color: var(--muted); font-size: 15.5px; overflow-wrap: anywhere; }
.schritte li.text { color: var(--ink); white-space: pre-wrap; padding-top: 8px; padding-bottom: 8px; }
.schritte li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--rule); }
.schritte li.text::before { background: var(--brand); top: 17px; }
/* Vermerk (KK-065): was die Kontorkraft dabei dauerhaft festgehalten hat — an der Stelle des Ablaufs, an der es geschah.
   Eine Spur, keine Warnung: dieselbe Größe wie die Tätigkeiten, nur kursiv und mit offenem statt gefülltem Punkt. */
.schritte li.vermerk { color: var(--ink); font-style: italic; }
.schritte li.vermerk::before { background: var(--surface); box-shadow: inset 0 0 0 2px var(--brand); }   /* die Liste steht in .karte */
.schritte li.jetzt { color: var(--brand-ink); }
details.mehr summary { cursor: pointer; color: var(--brand); font-weight: 600; width: fit-content; }
details.mehr .text { margin-top: 8px; }
details.mehr.klein summary { font-size: 14px; }
/* Am Handy ist jede aufklappbare Zeile ein Touch-Ziel von mindestens 44 px Höhe (KK-122 A6, gemessen 26 px auf /verbindungen) */
@media (max-width: 700px) { details.mehr > summary { min-height: 44px; box-sizing: border-box; padding-block: 10px; } }
details.mehr > p:first-of-type { margin-top: 8px; }
.beispiele { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.beispiele li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; background: var(--sunk); border-radius: 8px; }
.beispiele li span { flex: 1 1 18em; font-style: italic; }
@media (max-width: 640px) {
  .reiter { gap: 0; }
  .reiter a { padding: 8px 11px; font-size: 16px; }
  .eintrag { flex-wrap: wrap; gap: 6px 12px; padding: 12px 14px; }
  .eintrag > .abzeichen { margin-top: 0; }
  .eintrag > .haupt { flex-basis: 100%; }
  .eintrag > .art + .haupt { flex-basis: 0; }
  .inhalt.breit { padding-bottom: 32px; }
}

/* --- Post und Auftraggeber ---------------------------------------------------------------------------- */
.abzeichen.kanal { min-width: 62px; text-align: center; }
.eintrag .folge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 2px; font-size: 14.5px; }
.eintrag .folge .abzeichen { margin-top: 0; }
.kennung { display: flex; align-items: center; gap: 4px; margin: 0; }
.kennung .symbol { width: 30px; height: 30px; font-size: 14px; }
.zuordnen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin: 0 0 8px; background: var(--sunk); border-radius: 8px; }
.zuordnen > span { flex: 1 1 16em; }
.zuordnen select { width: auto; min-width: 11em; padding: 8px 10px; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.schalter-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 8px; }
.schalter-zeile p { flex: 1 1 18em; margin: 0; }
/* Tagesbericht (KK-018): Uhrzeit, darunter „per E-Mail", darunter Speichern — drei ruhige Zeilen, am PC wie am Handy */
.tagesbericht { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 0 0 4px; }
.tagesbericht label { display: flex; align-items: center; gap: 8px; margin: 0; }
.tagesbericht label.per-mail { flex: 1 1 100%; font-weight: 400; overflow-wrap: anywhere; }
.tagesbericht label input { margin: 0; }
.tagesbericht input[type=time] { padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font: inherit; }
.tagesbericht input[type=checkbox] { flex: none; width: 20px; height: 20px; accent-color: var(--brand); }

/* --- Personen (KK-020): eine Zeile je Person, Seltenes hinter „Ändern" ---------------------------------- */
.person { padding: 12px 14px; margin: 0 0 8px; background: var(--sunk); border-radius: 8px; }
.person .kopfzeile { gap: 6px 10px; }
.person .abzeichen { margin: 0 0 0 auto; background: var(--surface); }
.person .abzeichen.erledigt { background: color-mix(in srgb, var(--good) 14%, var(--surface)); }
.person .abzeichen.fehler { background: color-mix(in srgb, var(--warn) 16%, var(--surface)); }
.person > .dezent { display: block; font-size: 15px; overflow-wrap: anywhere; }
.person .kennung { font-size: 15px; }
.person details.mehr { margin-top: 6px; }
.person details.mehr small { margin-top: 10px; }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
/* Persönliche Verbindungen (KK-051): je Anbieter eine Karte wie bei Personen; Rechte als kurze Liste, Portal-Schritte aufklappbar */
.verbindungen .karte > h2:first-child { margin-top: 0; }
.person .darf, .person .schritte { margin: 4px 0 6px; padding-left: 1.3em; line-height: 1.5; }
.person .schritte li { margin: 0 0 6px; }
.person .fliess { margin: 8px 0 4px; }
details.anleitung-portal { margin-top: 12px; }
.zeile input, .zeile select { flex: 1 1 13em; width: auto; min-width: 0; padding: 8px 10px; }
.weitergeben { padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--good); border-radius: 8px; }
/* Die Adresse, die die Seite herausgeben *soll* (KK-111, Befund 4 der Abnahme vom 14.10.2026): Bei 390 px ist das Feld
   `#mcp-adresse-oben` 276 px breit, der Inhalt braucht 331 px — sichtbar war nur „https://j8ke35pr.box.kontorkraft.",
   die letzten sechs Zeichen „de/mcp" fehlten. Kleinere Schrift im Feld löst das nicht: Nötig wären etwa 12,5 px (17 px
   Schrift, abzüglich 28 px Innenabstand bleiben 246 px für 331 px Text), und unter 16 px zoomt iOS beim Fokus — den
   löst der Kopierknopf selbst aus (`feld.select()`). Deshalb steht die Adresse am Telefon zusätzlich als Text
   darunter: umbruchfähig, vollständig, mit dem Finger markierbar. Wo das Feld sie ganz zeigt, bleibt sie weg. */
.adresse-umbruch { display: none; }
@media (max-width: 640px) {
  .adresse-umbruch { display: block; margin: 6px 0 0; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
}

/* --- Zugangsdaten (KK-041): Zeilen wie bei den Personen, im Formular eine Wahl per Knopf ------------------------------ */
.zugang .kopfzeile > span:not(.abzeichen) { color: var(--muted); overflow-wrap: anywhere; }
.zugang code { font-size: 15px; }
fieldset.wahl { border: 0; padding: 0; margin: 14px 0 0; }
fieldset.wahl legend { font-weight: 600; padding: 0; margin: 0 0 2px; }
label.waehlen { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 8px 0 0; cursor: pointer; }
label.waehlen input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
label input[type=file] { display: block; margin: 6px 0 8px; font-size: 15px; max-width: 100%; }
/* Fähigkeiten-Werkstatt (KK-046): Zugang wartet auf Bestätigung, nur lesen; je System ein Block mit Steckbrief und Fähigkeiten;
   die Seite einer Fähigkeit mit Anleitung (Markdown), Prüfläufen und Freigabe */
.person .abzeichen + .abzeichen { margin-left: 0; }
.zugang .bestaetigen { margin: 10px 0 2px; padding: 10px 12px; border: 1px solid var(--critical); border-radius: 8px; background: var(--surface); }
.zugang .bestaetigen .fliess { margin: 0; }
.zugang .bestaetigen form { margin: 8px 0 0; }
.adressen { margin: 6px 0 0; padding-left: 1.2em; overflow-wrap: anywhere; }
.schalter-zeile.nur-lesen { margin: 8px 0 0; }
.schalter-zeile.nur-lesen small { flex: 1 1 18em; margin: 0; }
.system { margin: 22px 0 0; }
.system > .kopfzeile h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.system details.steckbrief { margin: 0 0 10px; }
a.person.faehigkeit { display: block; color: var(--ink); text-decoration: none; border: 1px solid transparent; }
a.person.faehigkeit:hover { border-color: var(--brand); }
a.person.faehigkeit strong { color: var(--brand-ink); overflow-wrap: anywhere; }
.anleitung { margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper);
  overflow-wrap: anywhere; min-width: 0; line-height: 1.5; }
.anleitung.roh { white-space: pre-wrap; }
.karte .anleitung p, .anleitung li { color: var(--ink); }
.karte .anleitung p { margin: 0 0 10px; }
.faehigkeit-seite > details.steckbrief { margin-top: 18px; }
.zurueck-zeile { margin: 16px 0 0; }
.faehigkeit-seite .kopf-angaben { margin: 6px 0 12px; font-size: 15px; overflow-wrap: anywhere; }
.faehigkeit-seite .meldung a { font-weight: 600; }
.pruefungen { margin: 12px 0 0; }
.pruefung .kopfzeile > .dezent { font-size: 14.5px; }
.karte .pruefung p { margin: 6px 0; }
.karte .pruefung .ergebnis { margin: 8px 0 6px; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.karte .pruefung .ergebnis.md { white-space: normal; }          /* gerendert von markdown.js (KK-046 Teil 3) */
.karte .pruefung .ergebnis.md p { margin: 0 0 6px; }
.pruefung > .dezent { display: block; font-size: 14.5px; }
/* Prüfläufe zu früheren Fassungen der Anleitung (0.16.3): getrennt, aufklappbar, gedämpft — Abzeichen ohne Farbe */
.pruefung.alt { opacity: .75; background: transparent; border: 1px dashed var(--rule); }
details.fruehere { margin: 14px 0 0; }
details.fruehere > .fliess { margin: 8px 0 10px; }
.pruefung details.gefragt { margin: 6px 0 0; }
.pruefung details.gefragt summary { font-size: 14.5px; }
.pruefung ol.fragen { margin: 6px 0 2px; padding-left: 1.4em; overflow-wrap: anywhere; }
.pruefung ol.fragen li { margin: 2px 0; }
.katalog-abschnitt { margin: 22px 0 10px; font-size: 19px; font-weight: 700; }
.bereich-kopf + .katalog-abschnitt { margin-top: 4px; }
.eintrag.eingerichtet { border-color: var(--brand); }

/* Sicherung (KK-042) und Werkszustand (KK-043) */
.sicherung .kopfzeile > span.dezent { overflow-wrap: anywhere; }
#sicherung-hoch .formular button { margin-top: 8px; }
.weitergeben .fliess { margin: 6px 0 0; }
.weitergeben input { font-size: 15px; }

/* Durchsicht eines Stapel-Imports (KK-089): je Domäne eine Gruppe, die als Ganzes angekreuzt werden kann. Der Rahmen hat
   keinen eigenen Rand — die Karte darum trägt ihn schon; es zählt nur, dass die Gruppen auseinanderfallen. */
.durchsicht { border-color: var(--rule); }
.durchsicht fieldset.domaene { border: 0; border-top: 1px solid var(--rule); margin: 14px 0 0; padding: 10px 0 0; min-width: 0; }
.durchsicht fieldset.domaene > legend { padding: 0; width: 100%; }
.durchsicht fieldset.domaene label.waehlen { margin-left: 26px; font-weight: 400; }
.durchsicht fieldset.domaene > legend label.waehlen { margin: 0; font-weight: 600; }
.durchsicht fieldset.domaene .dezent { font-weight: 400; overflow-wrap: anywhere; }

/* --- Arbeitsweise (KK-013): drei Stufen zur Wahl, eine gesperrte bleibt sichtbar und grau ---------------------- */
fieldset.stufen { border: 0; padding: 0; margin: 0 0 12px; }
fieldset.stufen + .knopf { margin-bottom: 16px; }
.stufe { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin: 0 0 8px; background: var(--sunk); border-radius: 8px; cursor: pointer; }
.stufe input { margin: 4px 0 0; flex: none; width: 18px; height: 18px; accent-color: var(--brand); }
.stufe > span { flex: 1 1 auto; min-width: 0; }
.stufe small { color: var(--muted); }
.stufe:has(input:checked) { background: var(--brand-soft); }
.stufe.gesperrt { cursor: default; }
.stufe.gesperrt strong, .stufe.gesperrt small { color: var(--muted); opacity: .75; }
.stufe.gesperrt small.hinweis-gesperrt { opacity: 1; font-weight: 600; }

/* --- Chat: Kopieren an der Antwort (KK-012) ------------------------------------------------------------------
   Ruhig: am PC erst bei Berührung mit der Maus oder Tastatur sichtbar, am Handy (kein Hover) dezent immer. */
.nachricht.kontorkraft { position: relative; }
.kopieren {
  border: 0; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: opacity .12s;
  /* Mit Maus: liegt über der unteren rechten Ecke und braucht keinen Platz — unsichtbar belegte er unter jeder
     Antwort einen leeren Streifen (Bildschirmfoto 18.09.2026) */
  position: absolute; right: 6px; bottom: 5px; padding: 2px 8px; border-radius: 6px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--rule); opacity: 0;
}
.kopieren:hover { color: var(--ink); }
.kopieren.erledigt { color: var(--good); opacity: 1; }
.nachricht.kontorkraft:hover .kopieren, .kopieren:focus-visible { opacity: 1; }
@media (hover: none), (max-width: 640px) {
  /* Ohne Maus (Handy): dezent immer sichtbar, als eigene Zeile unter dem Text — dort verdeckt er nichts. Zusätzlich
     nach Breite: Ob ein Gerät „hover: none" meldet, ließ sich in der Emulation nicht prüfen — unsichtbar wäre der
     Knopf am Handy nicht zu finden. */
  .kopieren { position: static; display: block; margin: 6px 0 -2px auto; padding: 2px 0; background: none; box-shadow: none; opacity: .75; }
}

/* --- Chat: Statuszeile mit dem einen Menü (KK-008, KK-009) -----------------------------------------------------
   Feste Höhe, eine Zeile — trifft der Stand ein, springt nichts. Die Eingabe gibt ihren unteren Rand an sie ab. */
.inhalt.chat .eingabe { padding-bottom: 6px; border-bottom: 0; }
.stand-zeile {
  position: relative; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 16px;
  box-sizing: content-box; padding-bottom: max(4px, env(safe-area-inset-bottom));
  background: var(--surface); color: var(--muted); font-size: 13.5px;
}
.stand-text {
  flex: 1; min-width: 0; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; color: inherit;
  font-size: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stand-text:hover { color: var(--ink); }
.stand-zeile.warnung #stand-fuell { color: var(--warn); font-weight: 700; }
/* Das ⋯ ist 44 × 44 px groß (KK-122 A6). Die unsichtbare ::before-Fläche um eine 32 × 28-Box reichte nicht: Gemessen
   wird die Box (Abnahme KK-122). Negative Ränder oben und unten halten die Statuszeile trotzdem bei ihrer festen Höhe. */
.stand-zeile .symbol { width: 44px; height: 44px; margin: -6px -6px -6px 0; flex: none; }
.chat-menue, .stand-einzelheiten {
  position: absolute; bottom: calc(100% + 4px); z-index: 8; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.chat-menue { right: 8px; min-width: 232px; padding: 6px; display: flex; flex-direction: column; }
.chat-menue button {
  padding: 11px 12px; border: 0; border-radius: 7px; background: none; text-align: left; cursor: pointer;
  font-size: 16px; font-weight: 600; color: var(--ink);
}
.chat-menue button:hover, .chat-menue button:focus-visible { background: var(--sunk); }
.chat-menue button:focus-visible { outline-offset: -2px; }
.chat-menue button:disabled { color: var(--muted); opacity: .6; cursor: default; background: none; }
.chat-menue hr { width: 100%; border: 0; border-top: 1px solid var(--rule); margin: 4px 0; }
.stand-einzelheiten { left: 12px; right: 12px; padding: 12px 14px; color: var(--ink); font-size: 14.5px; }
.stand-einzelheiten p { margin: 0 0 6px; }
.stand-einzelheiten p:last-child { margin-bottom: 0; }
.stand-einzelheiten .einzel-titel { font-weight: 600; }

/* --- Chat: mehrere Gespräche (KK-010) — eine ruhige Zeile über dem Verlauf, die Liste klappt darüber auf ----------- */
.gespraeche-leiste {
  position: relative; display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 10px;
  background: var(--surface); border-bottom: 1px solid var(--rule);
}
.gespraech-wahl {
  flex: 1; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; text-align: left;
}
.gespraech-wahl:hover, .gespraech-wahl[aria-expanded="true"] { background: var(--sunk); }
/* „Neues Gespräch" mit Wort (KK-122 B3); am sehr schmalen Handy bleibt das Wort, nur die Abstände gehen */
.neu-gespraech {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink);
  font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.neu-gespraech:hover { background: var(--sunk); }
.neu-gespraech:disabled { opacity: .55; cursor: default; }
@media (max-width: 380px) { .neu-gespraech { padding: 6px 9px; gap: 4px; font-size: 14px; } }
/* Gesprächsliste (KK-122 B4): Suchfeld oben, Gruppen „Heute · Diese Woche · Älter" */
.gespraeche-suche { padding: 4px 4px 6px; }
.gespraeche-suche input { width: 100%; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); }
.gespraeche-eintraege { display: flex; flex-direction: column; gap: 2px; }
.gespraeche-gruppe { padding: 10px 12px 2px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: none; }
.gespraeche-keine { padding: 10px 12px; color: var(--muted); font-size: 15px; }
.gespraech-wahl .titel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gespraech-wahl svg { flex: none; color: var(--muted); }
.gespraech-wahl .punkt { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.gespraeche-liste {
  position: absolute; top: calc(100% + 4px); left: 8px; right: 8px; z-index: 9; max-height: min(60dvh, 520px); overflow-y: auto;
  padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); overscroll-behavior: contain;
}
@media (min-width: 641px) { .gespraeche-liste { right: auto; width: min(460px, calc(100% - 16px)); } }
.gespraech-eintrag {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 0; border-radius: 7px; background: none;
  color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.gespraech-eintrag:hover, .gespraech-eintrag:focus-visible { background: var(--sunk); }
.gespraech-eintrag:focus-visible { outline-offset: -2px; }
.gespraech-eintrag .titel { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gespraech-eintrag .dezent { font-size: 14px; }
/* Akte (KK-061): in der Gesprächsliste der Name, über der Auswahl „In welcher Akte?" eine ruhige Zeile */
.gespraech-eintrag .akte-name { font-weight: 600; }
.gespraeche-liste .listen-kopf { padding: 8px 12px 4px; font-size: 14px; }
.gespraech-eintrag .dezent .abzeichen { margin: 0 2px 0 0; vertical-align: middle; font-size: 12.5px; padding: 1px 8px; }
.gespraech-wahl .abzeichen { margin-left: 8px; vertical-align: middle; }
/* Akte des Gesprächs (KK-061): ein ruhiger Zusatz neben dem Titel — bei 390 px gekürzt, nie umbrechend */
.gespraech-wahl .akte-marke {
  flex: 0 1 auto; min-width: 0; max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-weight: 600; font-size: 14.5px;
}
.gespraech-wahl .akte-marke::before { content: "· "; }
/* Einrichtungsgespräch (KK-053): sichtbar gekennzeichnet — in der Liste und in der Zeile über dem Verlauf */
.abzeichen.einrichtung { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-ink); font-weight: 700; }
/* Auftrag aus einem eigenen Chat-Client (KK-105): ruhig, aber lesbar — ein langer Client-Name wird gekürzt, nie umgebrochen */
.abzeichen.chat-client { max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
.gespraech-wahl .abzeichen.einrichtung { flex: none; }
.aktionen .einrichten, td .einrichten { display: inline-block; }
.gespraech-eintrag.aktuell { background: var(--brand-soft); }
.gespraech-eintrag.aktuell .titel { color: var(--brand-ink); }
.gespraech-eintrag.ungelesen .titel { font-weight: 800; }
.gespraech-eintrag.ungelesen .titel::after {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--brand); vertical-align: middle;
}
.gespraech-eintrag .arbeitet { color: var(--brand-ink); }

/* --- Fenster: umbenennen, entfernen, Hinweis vor dem Kopieren -------------------------------------------------------- */
.fenster {
  width: min(720px, calc(100vw - 24px)); max-height: min(86dvh, 900px); padding: 0; border: 1px solid var(--rule);
  border-radius: 14px; background: var(--paper); color: var(--ink); overflow: hidden;
}
.fenster[open] { display: flex; flex-direction: column; }
.fenster::backdrop { background: rgba(0, 0, 0, .45); }
.fenster-kopf { display: flex; align-items: center; gap: 6px; padding: 10px 10px 10px 16px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.fenster-kopf h2 { flex: 1; min-width: 0; margin: 0; font-size: 18px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fenster-inhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.fenster-inhalt > p { margin: 0 0 14px; }
.fenster-inhalt textarea { margin-top: 10px; font-size: 14px; }
.fenster-fuss { padding: 8px 16px; font-size: 14px; color: var(--muted); background: var(--surface); border-top: 1px solid var(--rule); text-align: center; }
/* Notizen und errechnete Einträge als schlichte Liste (KK-016, seit KK-062 auf der Seite „Was die Kontorkraft
   weiß"): je Zeile ein Satz, daneben „Vergessen", darunter das Formular zum Ändern bzw. Anlegen */
.gemerkt-titel { font-size: 16px; font-weight: 700; margin: 18px 0 8px; }
.eintrag.gemerkt { align-items: center; padding: 10px 12px; margin-bottom: 8px; }
.eintrag.gemerkt .haupt { overflow-wrap: anywhere; }
.gemerkt-neu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 20px 0 8px; }
.gemerkt-neu input[type="text"], .gemerkt-neu select { flex: 1 1 16em; width: auto; min-width: 0; }
.gemerkt-neu .gemerkt-alle { flex: 1 1 100%; font-size: 15px; font-weight: 400; margin: 0; }
.gemerkt-neu .gemerkt-alle input { margin: 0 6px 0 0; vertical-align: middle; }
.nachricht .aktion.dezent { font-size: 14.5px; }
/* Mitteilungen aufs Handy (KK-015): eine ruhige Zeile über den Meldungen, der Rest im selben Fenster wie das Gemerkte */
.mitteilungen-zeile { margin: -6px 0 14px; font-size: 14.5px; line-height: 1.5; }
.mitteilungen-zeile strong { font-weight: 600; }
.text-knopf { padding: 0; border: 0; background: none; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.text-knopf:hover { color: var(--brand-ink); }
.fenster.schmal { width: min(520px, calc(100vw - 24px)); }
.fenster.schmal .aktionen { margin: 0 0 14px; }
.fenster.schmal .meldung { margin: 0 0 4px; }
/* Rückfragefenster (KK-122 A3, static/frage.js): Frage, darunter „Abbrechen" (hat den Fokus) und der Aktionsknopf —
   `knopf` bzw. `knopf gefahr` bei data-gefahr. Zeilenumbrüche in der Frage bleiben stehen (pre-line). */
.frage-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.frage-fuss {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 12px 16px;
  background: var(--surface); border-top: 1px solid var(--rule);
}
@media (max-width: 420px) { .frage-fuss .knopf { flex: 1 1 auto; } }
.eintrag.frueher { width: 100%; text-align: left; cursor: pointer; font: inherit; }
.eintrag.frueher:hover { border-color: var(--brand); }
.verlauf.nur-lesen { padding: 0; overflow: visible; }

/* --- Dateien im Chat (KK-018): Büroklammer, Vorgemerktes über dem Feld, Abzeichen an der Nachricht ------------------
   Ruhig: ein Symbol links vom Feld; die Leiste mit vorgemerkten Dateien gibt es nur, solange etwas vorgemerkt ist. */
.eingabe { flex-wrap: wrap; }
.eingabe .klammer { width: 44px; height: 48px; flex: none; align-self: flex-end; margin: 0 -4px 0 -8px; }
.anhaenge { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.datei-marken { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nachricht .text[hidden] + .datei-marken { margin-top: 0; }
.datei-marke {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 10px; border-radius: 999px;
  background: var(--sunk); color: var(--ink); font-size: 14.5px; line-height: 1.5; white-space: nowrap;
}
.datei-marke svg { flex: none; opacity: .7; }
.datei-marke .name { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.datei-marke .groesse { color: var(--muted); flex: none; }
.datei-marke.laedt { opacity: .7; }
.datei-marke.fehler .groesse { color: var(--critical); font-weight: 600; }
.datei-marke .weg { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 0 0 2px; }
.datei-marke .weg:hover { color: var(--ink); }
.nachricht.nutzer .datei-marke { background: color-mix(in srgb, var(--on-brand) 18%, transparent); color: inherit; }
.nachricht.nutzer .datei-marke .groesse { color: inherit; opacity: .8; }
.inhalt.chat.datei-ziel::after {
  content: "Datei hier ablegen"; position: absolute; inset: 8px; z-index: 9; display: flex; align-items: center; justify-content: center;
  border: 2px dashed var(--brand); border-radius: 14px; background: color-mix(in srgb, var(--brand-soft) 88%, transparent);
  color: var(--brand-ink); font-weight: 700; pointer-events: none;
}
/* Karte zu einer Datei (KK-004): in die Ablage gelegt oder von der Kontorkraft zurückgegeben */
.nachricht.datei-karte .aktion { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
/* Wegweiser (KK-129): Vormachen und Einrichtungsgespräch nebeneinander, auf dem Handy untereinander */
.nachricht .aktion.wegweiser { display: flex; flex-wrap: wrap; gap: 8px; }
.nachricht .aktion.wegweiser form { margin: 0; }
.nachricht.datei-karte .datei-marke { background: var(--surface); }

/* --- Ablage (KK-004): Suche, Liste, Vorschau ------------------------------------------------------------------------- */
.ablage-suche { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.ablage-suche input[type=search] { flex: 1 1 14em; min-width: 0; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); }
.ablage-suche select { width: auto; flex: 0 1 12em; padding: 8px 10px; background: var(--surface); }
.ablage-titel { color: inherit; text-decoration: none; }
.ablage-titel:hover { color: var(--brand); }
.belegt { font-size: 14.5px; white-space: nowrap; }
.ablage-vorschau { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 18px; min-width: 0; }
.ablage-vorschau iframe { width: 100%; height: min(78dvh, 900px); border: 1px solid var(--rule); border-radius: 8px; background: var(--sunk); }
.ablage-vorschau img, .ablage-vorschau video { display: block; max-width: 100%; max-height: 78dvh; margin: 0 auto; border-radius: 8px; }
.ablage-vorschau audio { width: 100%; }
.ablage-vorschau pre {
  margin: 0; padding: 12px 14px; background: var(--sunk); border-radius: 8px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14.5px; line-height: 1.5;
}
.ablage-vorschau .md { overflow-wrap: anywhere; }
.nur-schmal-vorschau { display: none; }
@media (max-width: 640px) {
  .nur-breit-vorschau { display: none; }
  .nur-schmal-vorschau { display: block; }
  .ablage-suche select { flex: 1 1 8em; }
}

/* --- Drucker (KK-049): Zeilen wie bei den Personen; „Im Netz gefunden“ mit Namensfeld und Aufnehmen -------------------------- */
.drucker-eintrag .drucker-hinweis { display: block; color: var(--warn); font-size: 15px; }
ul.gefunden { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
ul.gefunden li { padding: 12px 14px; background: var(--sunk); border-radius: 8px; }
ul.gefunden li > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; overflow-wrap: anywhere; }
ul.gefunden li .dezent { font-size: 15px; }
ul.gefunden .zeile { margin-top: 8px; }
.drucker-erneut { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 8px; }
.drucker-erneut small { flex: 1 1 16em; }
#drucker-neu-suchen { margin: 10px 0 16px; }
.drucker-suche { margin: 0; }

/* --- Mitschnitt beim Vormachen (KK-075/KK-076) ---------------------------------------------- */
/* Der Balken steht fest über Chat und Browser, nicht nur im Browserbereich: Solange der Debug-Port für die Aufnahme
   offen ist, muss das in **jeder** Ansicht zu sehen sein — auch wenn am Handy gerade nur der Chat sichtbar ist
   (Entwurf §8.2: „sichtbar, befristet und vom Menschen selbst ausgelöst"). Seine Lage misst mitschnitt.js am Kopf. */
.mitschnitt-balken {
  position: fixed; left: 0; right: 0; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 9px 16px; background: #7f1d1d; color: #fff; font-size: 15px; line-height: 1.3;
  box-shadow: 0 6px 18px rgb(0 0 0 / .3);
}
.mitschnitt-balken .sage { flex: 1 1 14em; min-width: 0; font-weight: 600; }
.mitschnitt-balken .punkt {
  flex: none; width: 11px; height: 11px; border-radius: 999px; background: #fecaca;
  animation: kk-pocht 1.6s ease-in-out infinite;
}
.mitschnitt-balken.aussetzt { background: #44403c; }
.mitschnitt-balken.aussetzt .punkt { animation: none; background: #a8a29e; }
.mitschnitt-balken .knopf { min-height: 36px; padding: 6px 12px; font-size: 15px; }
.mitschnitt-balken .knopf.zweit { background: transparent; color: #fff; border-color: rgb(255 255 255 / .55); }
@keyframes kk-pocht { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .mitschnitt-balken .punkt { animation: none; } }
/* Ton im Balken (KK-130): immer sichtbar, solange aufgenommen wird — grün mit Pegel, gelb „ohne"/„still", rot „fehlt".
   Die Farbe trägt nicht allein: Der Satz daneben sagt dasselbe (und role="status" liest ihn vor). */
.mitschnitt-balken .ton-anzeige {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px;
  background: #14532d; color: #fff; font-weight: 700;
}
.mitschnitt-balken .ton-anzeige[hidden] { display: none; }
.mitschnitt-balken .ton-anzeige .pegel {
  position: relative; width: 46px; height: 8px; border-radius: 999px; background: rgb(255 255 255 / .25); overflow: hidden;
}
.mitschnitt-balken .ton-anzeige .pegel i { position: absolute; inset: 0 auto 0 0; width: 0; background: #86efac; transition: width .2s; }
.mitschnitt-balken .ton-anzeige[data-art="ohne"], .mitschnitt-balken .ton-anzeige[data-art="still"] { background: #fbbf24; color: #1c1917; }
.mitschnitt-balken .ton-anzeige[data-art="fehlt"] { background: #fff; color: #991b1b; animation: kk-pocht 1.6s ease-in-out infinite; }
.mitschnitt-balken .ton-anzeige[data-art="fehlt"] .pegel, .mitschnitt-balken .ton-anzeige[data-art="ohne"] .pegel { display: none; }
.mitschnitt-balken .ton-anzeige[data-art="pause"] { background: #57534e; }
@media (prefers-reduced-motion: reduce) { .mitschnitt-balken .ton-anzeige[data-art="fehlt"] { animation: none; } }
.ton-wahl { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; font-weight: 700; font-size: 17px; }
.ton-wahl input { width: 22px; height: 22px; margin: 0; }

/* Die Seite, auf der die Mitschrift gelesen wird */
.mitschrift {
  margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.mitschnitt-bilder { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.mitschnitt-bilder a { display: block; width: 220px; text-decoration: none; }
.mitschnitt-bilder img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; }
.mitschnitt-bilder span { display: block; margin-top: 4px; font-size: 13px; }
/* Titel und System vor dem Vormachen — zwei schmale Felder, am Handy untereinander */
.vormachen-formular { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; }
.vormachen-formular label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 14em; font-size: 15px; }
.vormachen-formular input { padding: 8px 10px; font-size: 16px; }
.vormachen-formular button { margin-top: 0; }
.mitschnitt-hinweis p:last-child { margin-bottom: 0; }

/* „Heute" (KK-122 C1/C2): drei Blöcke untereinander, eine Spalte — bei 320 px scrollt nichts waagerecht.
   Die Checkliste ist eine `details`-Karte: eingeklappt bleibt nur die Zeile „Einrichtung · x von 7". */
.karte.checkliste { margin: 18px 0 6px; padding: 14px 18px; }
.checkliste > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.checkliste > summary::after { content: "Ausblenden"; margin-left: auto; font-size: 14.5px; font-weight: 600; color: var(--brand-ink); }
.checkliste:not([open]) > summary::after { content: "Einblenden"; }
.checkliste-punkte { list-style: none; margin: 10px 0 0; padding: 0; }
.checkliste-punkte li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--rule); }
.checkliste-punkte .haken {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border: 1.5px solid var(--rule); border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--muted);
}
.checkliste-punkte li.erledigt .haken { background: color-mix(in srgb, var(--good) 14%, transparent); border-color: var(--good); color: var(--good); }
.checkliste-punkte li.erledigt .punkt-text { color: var(--muted); }
.checkliste-punkte .punkt-text { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.checkliste-punkte .dezent { font-size: 14.5px; }
.heute-block h2.abschnitt { margin-top: 22px; }
.leer-zeile { margin: 0 0 10px; }
.heute-liste { margin: 0 0 8px; padding-left: 1.2em; }
.heute-liste li { padding: 3px 0; overflow-wrap: anywhere; }
details.bericht, details.hinweise { margin: 8px 0 12px; }
details.bericht > summary, details.hinweise > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
details.bericht .text { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
details.bericht .text.zusatz { margin-top: 1em; color: var(--muted); }
details.hinweise[open] > summary { margin-bottom: 8px; }
/* „3×" an einer zusammengefassten Meldung (C3) — schlicht, ohne Warnfarbe */
.abzeichen.mal { margin: 0 0 0 6px; vertical-align: 1px; font-size: 12.5px; padding: 1px 8px; }
.angeheftet { margin-bottom: 8px; }
.angeheftet .eintrag.meldung-hilfe { background: color-mix(in srgb, var(--critical) 6%, var(--surface)); }
/* Filter „Alle · Wartet auf Sie" (C5) und Hinweis im Katalog (C7) */
.filter a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.bereich-kopf .rechts.filter { flex-wrap: wrap; }
.katalog-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 14px; }
.leer-bereich p + p { margin-top: 14px; }

/* Lange Adressen ohne Leerzeichen (box.kontorkraft.de) brechen um, statt bei 320 px seitlich überzulaufen — KK-122 */
.umbruch { overflow-wrap: anywhere; }

/* --- Geführte Einrichtung (KK-123 E4) -------------------------------------------------------------------------
   Schmale Spalte wie Anmeldung und Einladung; Auswahlkarten für die Anrede groß genug für den Daumen (≥ 44 px),
   die gewählte Karte farbig, der Fokus sichtbar über die globale :focus-visible-Regel am Radio. */
.marke-betrieb { font-weight: 500; color: var(--muted); padding-left: 10px; border-left: 1px solid var(--rule);
  max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inhalt.einrichtung { max-width: 520px; }
.einrichtung-fortschritt { margin: 24px 16px 0; color: var(--muted); font-weight: 600; }
.einrichtung .karte { margin-top: 8px; }
.einrichtung .karte small.dezent { display: block; margin-top: 6px; }
.einrichtung-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 0 16px 24px; }
.einrichtung-abmelden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 0 auto; }
.einrichtung-nebenweg { margin-top: 18px; }
.einrichtung-weiter { margin: 0; }
/* Kopf in der Einrichtung: dort gibt es weder Leiste noch Seitentitel — also bleibt am Tablett und Handy die Marke mit
   Wort und Firmenname stehen, sonst wäre der Kopf leer. */
@media (max-width: 960px) {
  .rahmen.einrichtung-rahmen .marke span { display: block; }
}
@media (max-width: 700px) {
  .rahmen.einrichtung-rahmen .marke { display: flex; min-width: 0; }
  .rahmen.einrichtung-rahmen .marke-betrieb { min-width: 0; max-width: 18ch; }
}
fieldset.anrede-wahl { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.auswahl-karte { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; margin: 0; padding: 16px;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); cursor: pointer; font-weight: 500; }
.auswahl-karte input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); }
.auswahl-karte strong { display: block; font-size: 17px; }
.auswahl-karte small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.auswahl-karte:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.leer-betrieb { color: var(--muted); margin-top: -4px; }
@media (min-width: 701px) { fieldset.anrede-wahl { grid-template-columns: 1fr 1fr; } }
/* Weiteres Gerät koppeln (KK-126). Der QR-Code bleibt schwarz auf weiß, auch im dunklen Modus — Kameras lesen helle
   Codes auf dunklem Grund schlecht; die Ruhezone steckt im SVG selbst. */
.koppel-qr-rahmen { width: min(260px, 100%); margin: 14px auto; background: #fff; border-radius: 8px; line-height: 0; }
.koppel-qr-rahmen svg { display: block; width: 100%; height: auto; }
.koppel-code { text-align: center; margin: 8px 0 12px; }
.koppel-code strong { display: block; font-size: 28px; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.koppel-zahl { font-size: 28px; font-variant-numeric: tabular-nums; }
.koppel-zahl.gross { display: block; text-align: center; font-size: 64px; font-weight: 700; margin: 12px 0; letter-spacing: .08em; }
