/* Jarvis-Oberfläche. Vorlage: freigegebener Entwurf docs/entwurf/oberflaeche.html (22.10.2026,
 * PAJO-Palette). Kein Inline-CSS: die CSP erlaubt nur style-src 'self'. */

@font-face {
  font-family: "Onest";
  src: url("/schriften/onest.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/schriften/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/schriften/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* PAJO-Palette: Ink-Bühne, Acid = Primäraktion, Violett = Patrick, Hell-Violett = KI */
  --grund: #0A0A0C;
  --grund-tief: #070709;
  --flaeche: rgba(20, 20, 25, 0.6);
  --flaeche-fest: #141419;
  --flaeche-hoch: #1D1D24;
  --linie: rgba(255, 255, 255, 0.08);
  --linie-stark: rgba(255, 255, 255, 0.16);
  --text: #F4F4F6;
  --text-2: #B9B9C2;
  --text-3: #A1A1AA;
  --acid: #D4FF3F;
  --acid-hell: #E0FF70;
  --acid-text: #0A0A0C;
  --violett: #8B5CF6;
  --ki: #A78BFA;
  --ok: oklch(0.76 0.09 170);
  --warten: #D4FF3F;
  --laeuft: #A78BFA;
  --fehler: oklch(0.70 0.17 25);
  --fehler-flaeche: oklch(0.70 0.17 25 / 0.12);
  --aus: #71717A;
  --radius: 14px;
  --radius-klein: 9px;
  --schatten: 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --schrift: "Onest", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --kopf-hoehe: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 400 14px/1.5 var(--schrift); -webkit-font-smoothing: antialiased;
  caret-color: var(--violett);
}
::selection { background: rgba(139, 92, 246, 0.5); color: var(--text); }
:focus-visible { outline: 2px solid var(--violett); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) transparent; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
svg.icon { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.zahl { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.leise { color: var(--text-3); }
.nur-vorleser {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprungmarke {
  position: absolute; left: 12px; top: -48px; z-index: 60; padding: 8px 12px; border-radius: 8px;
  background: var(--acid); color: var(--acid-text); font-weight: 500; text-decoration: none;
}
.sprungmarke:focus { top: 12px; }
[hidden] { display: none !important; }

/* Rahmen */
.rahmen { display: grid; grid-template-columns: 240px minmax(0, 1fr) 360px; height: 100vh; height: 100dvh; }

/* Leiste */
.leiste { background: var(--grund-tief); border-right: 1px solid var(--linie); display: flex; flex-direction: column; padding: 18px 12px 14px; gap: 2px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.marke { display: flex; align-items: baseline; gap: 8px; padding: 2px 10px 18px; }
.marke b { font-weight: 600; letter-spacing: 0.08em; font-size: 15px; }
.marke span { color: var(--text-3); font-size: 12px; }
.nav {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-klein);
  color: var(--text-2); text-align: left; width: 100%; text-decoration: none; min-height: 36px;
  transition: background 160ms ease-out, color 160ms ease-out;
}
.nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav:hover { background: var(--flaeche-hoch); color: var(--text); }
.nav[aria-current="page"] { background: rgba(139, 92, 246, 0.16); color: var(--text); }
.nav[aria-current="page"] svg { color: var(--violett); }
.nav .zaehler { margin-left: auto; font: 500 11px var(--mono); background: var(--acid); color: var(--acid-text); border-radius: 999px; padding: 1px 7px; }
.nav .spaeter { margin-left: auto; font: 500 10.5px var(--mono); color: var(--text-3); border: 1px solid var(--linie-stark); border-radius: 6px; padding: 0 5px; }
.gruppe { margin: 16px 10px 6px; color: var(--text-3); font-size: 12px; font-weight: 500; }
.bereiche { display: grid; gap: 2px; }
.nav .punkt { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; background: var(--warten); flex: none; }
.nav.neu { color: var(--text-3); }
.nav.neu:hover { color: var(--text); }
.unten { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; }
.kugel-feld { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius); color: var(--text-2); }
.kugel-feld small { display: block; color: var(--text-3); font-size: 12px; }
/* Leuchten der Kugel: Vorgabe Patrick (Brand Commitments), bewusst behalten. */
.kugel {
  display: block; width: 44px; height: 44px; border-radius: 50%; flex: none;
  background:
    radial-gradient(circle at 34% 30%, oklch(0.93 0.06 330) 0 8%, transparent 30%),
    radial-gradient(circle at 60% 65%, oklch(0.62 0.2 262) 0, transparent 60%),
    radial-gradient(circle at 40% 40%, oklch(0.72 0.19 312), oklch(0.45 0.2 285) 70%);
  box-shadow: 0 8px 24px -6px rgba(139, 92, 246, 0.7);
}
.kosten { border-top: 1px solid var(--linie); padding: 12px 10px 2px; display: flex; justify-content: space-between; gap: 8px; color: var(--text-3); font-size: 12px; }
.kosten b { color: var(--text-2); font-weight: 500; }
.nav.abmelden { color: var(--text-3); font-size: 13px; min-height: 32px; }

/* Mitte */
.mitte { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--grund); outline: none; }
.laden { padding: 28px; color: var(--text-3); }
.kopf { display: flex; align-items: center; gap: 16px; padding: 18px 28px 0; }
.kopf h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.kopf p { margin: 0; color: var(--text-3); font-size: 13px; }
.reiter { display: flex; gap: 4px; padding: 16px 28px 0; border-bottom: 1px solid var(--linie); overflow-x: auto; }
.reiter button { padding: 9px 12px 11px; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color 160ms ease-out; }
.reiter button:hover { color: var(--text); }
.reiter button[aria-selected="true"] { color: var(--text); border-color: var(--violett); }
.reiter-inhalt { position: relative; flex: 1; min-height: 0; overflow: auto; outline: none; }
.seite { flex: 1; min-height: 0; overflow: auto; padding: 22px 28px 40px; display: grid; gap: 28px; align-content: start; }
.reiter-inhalt > .seite { overflow: visible; }
.lesen { max-width: 76ch; }

/* Canvas: das Punktraster ist die Zeichenfläche, auf der die Kästen liegen. */
.canvas {
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 22px 22px; background-position: 11px 11px;
}
.reiter-inhalt.canvas { display: flex; flex-direction: column; }
.canvas-innen { position: relative; margin: 40px 28px 32px; flex: none; }
.canvas svg.kanten { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.kanten path { fill: none; stroke: rgba(255, 255, 255, 0.22); stroke-width: 1.5; }
.kanten path.aktiv { stroke: var(--acid); stroke-dasharray: 5 5; }
.knoten {
  position: absolute; width: 236px; min-height: 112px; padding: 12px 14px; align-content: start;
  background: var(--flaeche); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten);
  display: grid; gap: 6px; text-align: left; transition: border-color 160ms ease-out, transform 160ms ease-out;
}
.knoten:hover { border-color: var(--linie-stark); transform: translateY(-1px); }
.knoten .titel { display: flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.knoten .titel .name { overflow-wrap: anywhere; }
.knoten .titel svg { color: var(--text-3); }
.knoten .meta { color: var(--text-3); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; overflow-wrap: anywhere; }
.stufe { font: 500 11px var(--mono); color: var(--text-2); border: 1px solid var(--linie); border-radius: 6px; padding: 0 6px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--aus); flex: none; }
.status.ok i { background: var(--ok); }
.status.warten i { background: var(--warten); }
.status.laeuft i { background: var(--laeuft); outline: 2px solid rgba(167, 139, 250, 0.35); outline-offset: 1px; }
.status.fehler i { background: var(--fehler); }
.status.bereit i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ki); }
.status.aus { color: var(--text-3); }
.legende { position: sticky; left: 28px; bottom: 0; margin: auto 28px 0; padding: 12px 0 18px; display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-3); font-size: 12px; }
.legende .status { color: var(--text-3); }

/* Leere Zustände, Hinweise */
.leer { margin: 0; color: var(--text-3); line-height: 1.55; max-width: 60ch; }
.leer-titel { color: var(--text-2); font-weight: 500; margin: 0 0 4px; }
.leer-canvas { padding: 40px 28px; }
.leer-canvas p { margin: 0 0 6px; }
.platzhalter { display: grid; gap: 4px; justify-items: start; padding: 8px 0; }
.platzhalter svg { width: 28px; height: 28px; color: var(--ki); margin-bottom: 8px; }
.hinweis { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--text-3); font-size: 12.5px; max-width: 70ch; }
.hinweis svg { color: var(--ok); width: 16px; height: 16px; margin-top: 2px; }
.fehler-text { color: var(--fehler); }
.warnung { margin: 0; padding: 8px 12px; border-radius: var(--radius-klein); background: var(--fehler-flaeche); color: var(--text); font-size: 13px; }
.quelle { color: var(--text-3); font-size: 12px; margin: 0; }
.textlink { color: var(--text); text-decoration: underline; text-decoration-color: var(--violett); text-underline-offset: 3px; }
.textlink:hover { text-decoration-color: var(--acid); }

/* Heute und Listen */
.abschnitt { display: grid; gap: 10px; }
.abschnitt h2 { margin: 0; font-size: 15px; font-weight: 600; }
.erklaerung { margin: 0; color: var(--text-3); max-width: 70ch; }
.zeilen { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--linie); }
.zeile-eintrag { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.eintrag-text { display: grid; gap: 2px; min-width: 0; }
.eintrag-text b { font-weight: 500; overflow-wrap: anywhere; }
.kennzahl-zeile { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; color: var(--text-2); }
.gross-zahl { font-size: 28px; font-weight: 500; color: var(--text); margin-right: 4px; }

/* Agenten, Aufträge */
.agenten-liste { list-style: none; margin: 0; padding: 0; display: grid; }
.agent { padding: 18px 0 22px; border-bottom: 1px solid var(--linie); display: grid; gap: 10px; outline: none; scroll-margin-top: 12px; }
.agent:first-child { padding-top: 4px; }
.agent.gewaehlt h2 { color: var(--acid); }
.agent-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.agent h2 { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.agent h3 { margin: 4px 0 0; font-size: 13px; font-weight: 500; color: var(--text-3); }
.daten { margin: 0; display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: 6px 16px; }
.daten dt { color: var(--text-3); }
.daten dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; min-width: 0; }
.daten .daten { padding-left: 10px; border-left: 1px solid var(--linie); }
.daten-liste { margin: 0; padding-left: 18px; }
.daten-text { white-space: pre-wrap; }
.daten-roh { margin: 0; font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }
.tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabelle th, .tabelle td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle thead th { color: var(--text-3); font-weight: 500; font-size: 12px; }
.tabelle tbody th { font-weight: 500; }
.markdown { color: var(--text-2); }
.markdown p, .blase p { margin: 0 0 0.6em; }
.markdown p:last-child, .blase p:last-child { margin-bottom: 0; }
.markdown ul, .markdown ol, .blase ul, .blase ol { margin: 0 0 0.6em; padding-left: 20px; }
.markdown strong, .blase strong { color: var(--text); font-weight: 600; }

/* Rechts */
.rechts { border-left: 1px solid var(--linie); background: var(--grund-tief); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.freigaben-spalte { border-bottom: 1px solid var(--linie); max-height: 45%; display: flex; flex-direction: column; min-height: 0; }
.abschnitt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 18px 10px; }
.abschnitt-kopf h2 { margin: 0; font-size: 15px; font-weight: 600; }
.abschnitt-kopf span { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.freigaben { padding: 0 10px 10px; overflow-y: auto; min-height: 0; }
.freigaben > .leer { padding: 2px 8px 8px; font-size: 13px; }
.freigabe-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.freigabe { padding: 10px 8px 12px; border-radius: var(--radius-klein); display: grid; gap: 4px; transition: background 160ms ease-out; }
.freigabe:hover { background: var(--flaeche-fest); }
.freigabe .zeile { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.freigabe b { font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.freigabe .nr { color: var(--text-3); font-size: 12px; flex: none; }
.freigabe p { margin: 0; color: var(--text-3); font-size: 12.5px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.freigaben.breit { padding: 0; max-width: 760px; }
.freigaben.breit .freigabe { border-bottom: 1px solid var(--linie); border-radius: 0; padding: 14px 4px; }
.aktionen { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.knopf { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 500; transition: background 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out, opacity 160ms ease-out; }
.knopf.gross { height: 38px; padding: 0 16px; font-size: 14px; }
.knopf.haupt { background: var(--acid); color: var(--acid-text); }
.knopf.haupt:hover:not(:disabled) { background: var(--acid-hell); }
.knopf.neben { border: 1px solid var(--linie-stark); color: var(--text-2); }
.knopf.neben:hover:not(:disabled) { border-color: var(--text-3); color: var(--text); }
.knopf.warnend { background: var(--fehler); color: var(--acid-text); }
.knopf:disabled { opacity: 0.45; }

/* Gespräch */
.gespraech { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.verbindung { margin: 0 18px 8px; padding: 6px 10px; border-radius: 8px; background: var(--fehler-flaeche); color: var(--text-2); font-size: 12.5px; }
.verlauf { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px 18px 12px; display: flex; flex-direction: column; gap: 14px; }
.leer-gespraech { font-size: 13px; padding: 4px 0; }
.nachricht { max-width: 92%; display: grid; gap: 4px; min-width: 0; }
.nachricht .wer { font-size: 11.5px; color: var(--text-3); }
.nachricht .blase { padding: 10px 12px; border-radius: 12px; background: var(--flaeche-fest); color: var(--text-2); line-height: 1.5; overflow-wrap: anywhere; }
.nachricht.patrick { align-self: flex-end; }
.nachricht.patrick .blase { background: rgba(139, 92, 246, 0.22); color: var(--text); white-space: pre-wrap; }
.nachricht.system { max-width: 100%; }
.nachricht.system .blase { background: none; border: 1px dashed var(--linie-stark); color: var(--text-3); font-size: 12.5px; white-space: pre-wrap; }
/* Schreibanzeige: echte Live-Anzeige während eines Laufs, bewusst behalten. */
.tippt { display: inline-flex; gap: 4px; vertical-align: middle; }
.tippt i { width: 5px; height: 5px; border-radius: 50%; background: var(--ki); opacity: 0.4; animation: puls 1.2s infinite ease-in-out; }
.tippt i:nth-child(2) { animation-delay: 0.15s; }
.tippt i:nth-child(3) { animation-delay: 0.3s; }
.tippt-text { margin-left: 8px; color: var(--text-3); font-size: 12px; }
@keyframes puls { 50% { opacity: 1; } }
.eingabe { margin: 0 14px 14px; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 14px; border: 1px solid var(--linie-stark); border-radius: var(--radius); background: var(--flaeche-fest); transition: border-color 160ms ease-out; }
.eingabe textarea { flex: 1; min-width: 0; resize: none; background: none; border: 0; color: var(--text); font: inherit; min-height: 22px; max-height: 160px; padding: 6px 0; }
.eingabe textarea::placeholder { color: var(--text-3); }
.eingabe textarea:focus { outline: none; }
.eingabe:focus-within { border-color: var(--violett); }
.runde { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); flex: none; transition: background 160ms ease-out, color 160ms ease-out; }
.runde:hover { background: var(--flaeche-hoch); color: var(--text); }
.runde.senden { background: var(--acid); color: var(--acid-text); }
.runde.senden:hover:not(:disabled) { background: var(--acid-hell); }
.runde.senden:disabled { opacity: 0.45; }

/* Freigabe-Ansicht: Glas über der Seite, die darunter sichtbar bleibt. */
.freigabe-dialog {
  width: min(640px, calc(100vw - 32px)); max-height: min(86dvh, 860px); padding: 0;
  border: 1px solid var(--linie-stark); border-radius: 18px; color: var(--text);
  background: rgba(20, 20, 25, 0.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85);
}
.freigabe-dialog[open] { display: flex; flex-direction: column; animation: auftauchen 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.freigabe-dialog::backdrop { background: rgba(4, 4, 6, 0.6); backdrop-filter: blur(3px); }
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px) scale(0.985); } }
.dialog-innen { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dialog-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 12px; border-bottom: 1px solid var(--linie); }
.dialog-kopf h2 { margin: 2px 0 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.dialog-meta { margin: 0; color: var(--text-3); font-size: 12px; }
.dialog-inhalt { padding: 16px 20px; overflow: auto; display: grid; gap: 10px; align-content: start; min-height: 0; flex: 1; }
.dialog-inhalt h3 { margin: 8px 0 0; font-size: 12px; font-weight: 500; color: var(--text-3); }
.dialog-inhalt h3:first-child { margin-top: 0; }
.inhalt-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); line-height: 1.55; padding: 12px 14px; border-radius: var(--radius-klein); background: var(--grund-tief); border: 1px solid var(--linie); }
.dialog-fuss { padding: 12px 20px 18px; border-top: 1px solid var(--linie); display: grid; gap: 8px; }
.dialog-fuss .aktionen { margin-top: 0; }
.dialog-status { margin: 0; color: var(--text-3); font-size: 13px; }
.dialog-status:empty { display: none; }
.dialog-status[data-art="fehler"] { color: var(--fehler); }
.ablehnen { display: grid; gap: 8px; }
.ablehnen label { font-size: 13px; color: var(--text-2); }
.ablehnen textarea { width: 100%; resize: vertical; min-height: 72px; padding: 10px 12px; border-radius: var(--radius-klein); border: 1px solid var(--linie-stark); background: var(--grund-tief); color: var(--text); font: inherit; }
.ablehnen textarea:focus { outline: none; border-color: var(--violett); }
.ablehnen textarea::placeholder { color: var(--text-3); }

/* Rückmeldung */
.meldung {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70;
  display: flex; align-items: center; gap: 10px; max-width: min(560px, calc(100vw - 32px));
  padding: 10px 8px 10px 14px; border-radius: 12px; border: 1px solid var(--linie-stark);
  background: rgba(29, 29, 36, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--schatten); font-size: 13.5px;
}
.meldung[data-art="fehler"] { border-color: oklch(0.70 0.17 25 / 0.6); }
.meldung-zu { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); flex: none; }
.meldung-zu:hover { color: var(--text); background: var(--flaeche-hoch); }

/* Handy */
.handy-kopf, .schleier { display: none; }
.kugel-klein { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.kugel-klein .kugel { width: 32px; height: 32px; }
@media (max-width: 860px) {
  body { overflow-x: hidden; }
  .rahmen { grid-template-columns: minmax(0, 1fr); height: auto; min-height: calc(100dvh - var(--kopf-hoehe)); }
  .leiste {
    position: fixed; inset: 0 auto 0 0; width: min(300px, 82vw); z-index: 40; transform: translateX(-102%); visibility: hidden;
    transition: transform 220ms cubic-bezier(.2, .8, .2, 1), visibility 0s linear 220ms;
  }
  body.menue-offen .leiste { transform: none; visibility: visible; transition: transform 220ms cubic-bezier(.2, .8, .2, 1); box-shadow: 24px 0 48px -12px rgba(0, 0, 0, 0.8); }
  .schleier { position: fixed; inset: 0; z-index: 35; background: rgba(4, 4, 6, 0.55); }
  body.menue-offen .schleier { display: block; }
  .nav { min-height: 44px; }
  /* Im Bereich zählen Freigaben und Gespräch, das Canvas entfällt (Spec 5). */
  body[data-ansicht="bereich"] .mitte { display: none; }
  body:not([data-ansicht="bereich"]) .rechts { display: none; }
  .mitte { min-height: calc(100dvh - var(--kopf-hoehe)); }
  .mitte .kopf { display: none; }
  .seite { padding: 18px 16px 32px; }
  .rechts { border-left: 0; height: calc(100dvh - var(--kopf-hoehe)); }
  .freigaben-spalte { max-height: 42%; }
  .abschnitt-kopf { padding: 14px 16px 8px; }
  .verlauf { padding: 4px 16px 12px; }
  .eingabe { margin: 0 12px 12px; }
  .eingabe textarea { font-size: 16px; }
  .runde, .knopf { min-height: 40px; }
  .runde { width: 40px; height: 40px; }
  .knopf { height: 40px; }
  .handy-kopf { display: flex; align-items: center; gap: 10px; height: var(--kopf-hoehe); padding: 0 12px; border-bottom: 1px solid var(--linie); background: var(--grund-tief); position: sticky; top: 0; z-index: 20; }
  .handy-kopf h1 { font-size: 18px; margin: 0; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .freigabe-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; }
  .daten { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .daten dd { margin-bottom: 8px; }
  /* Oben unter dem Kopf: unten läge die Meldung über dem Eingabefeld des Gesprächs. */
  .meldung { top: calc(var(--kopf-hoehe) + 8px); bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .tippt i { animation: none; opacity: 0.8; }
  .freigabe-dialog[open] { animation: none; }
  .leiste, body.menue-offen .leiste { transition: none; }
  .knoten:hover { transform: none; }
}

/* Anmeldeseite */
.anmeldung-seite { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.anmeldung-karte { width: min(420px, 100%); display: grid; justify-items: start; gap: 12px; padding: 32px 28px; border: 1px solid var(--linie); border-radius: 18px; background: var(--flaeche-fest); }
.anmeldung-karte .kugel { width: 56px; height: 56px; margin-bottom: 8px; }
.anmeldung-karte h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.anmeldung-text { margin: 0; color: var(--text-2); }
.anmeldung-status { margin: 4px 0 0; color: var(--text-3); font-size: 13.5px; min-height: 1.5em; overflow-wrap: anywhere; }
.anmeldung-status[data-art="fehler"] { color: var(--fehler); }
.anmeldung-status[data-art="ok"] { color: var(--ok); }
