/* FS 8 Jour fixe – Gestaltung nach dem FS8 Corporate Design, helle Fassung:
   weißes Papier auf warmem Grau, Schrift und volle Flächen in Olivschwarz, Arial, keine Akzentfarben.
   Der Kopf bleibt olivschwarz. Einziger Signalton (Ocker) für Fristen, Überfälliges und Fehler. */

:root {
  --grund: #f3f2ed;        /* Seite */
  --grund-tief: #e9e7df;   /* zurückgesetzt, z. B. erledigte Zeilen */
  --papier: #ffffff;       /* Tabellenzellen, Karten, Dialoge, Eingabefelder */
  --flaeche: #e2e0d6;      /* Tabellenkopf, Hover */
  --linie: #a09e91;
  --linie-zart: #d0cec0;   /* FS8-Grau */
  --tinte: #28281e;        /* FS8-Olivschwarz */
  --tinte-2: #4a4a3f;
  --gedaempft: #6c6b60;
  --voll: #28281e;         /* volle Flächen: Hauptknopf, aktive Auswahl */
  --voll-hover: #3a3a2e;
  --auf-voll: #ffffff;
  --signal: #955700;
  --schatten: 0 10px 28px rgb(40 40 30 / 0.16);
  --schrift: Arial, Helvetica, "Liberation Sans", sans-serif;
  --radius: 3px;
  --kopfhoehe: 56px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--kopfhoehe) + 16px); }

body {
  margin: 0;
  background: var(--grund);
  color: var(--tinte-2);
  font: 15px/1.45 var(--schrift);
  min-height: 100vh;
  min-height: 100dvh;
}

h1, h2, h3, p, ol, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: var(--tinte); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong, b { color: var(--tinte); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.abstand { flex: 1; }
.leer { color: var(--gedaempft); }

/* ------------------------------------------------------------------ Kopf */

.kopf {
  --grund: #28281e; --flaeche: #3a3a2e; --linie: #5e5e52; --linie-zart: #45453a;
  --tinte: #ffffff; --tinte-2: #d0cec0; --gedaempft: #a5a396;
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  height: var(--kopfhoehe); padding: 0 24px;
  background: var(--grund); color: var(--tinte-2);
}
.kopf :focus-visible { outline-color: var(--tinte-2); }
.marke { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: bold; font-size: 17px; color: var(--tinte); }
.marke img { display: block; }
.hauptnav { display: flex; gap: 4px; flex: 1; }
.hauptnav a {
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px; height: var(--kopfhoehe);
  color: var(--tinte-2); text-decoration: none;
  border-bottom: 2px solid transparent; border-top: 2px solid transparent;
}
.hauptnav a:hover { color: var(--tinte); }
.hauptnav a[aria-current] { color: var(--tinte); font-weight: bold; border-bottom-color: var(--tinte-2); }
.hauptnav .icon { display: none; }

.konto { position: relative; margin-left: auto; }
.konto summary { list-style: none; cursor: pointer; border-radius: 50%; }
.konto summary::-webkit-details-marker { display: none; }
.konto-menue {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40;
  min-width: 220px; padding: 8px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.3);
}
.konto-name { padding: 8px 10px 10px; color: var(--tinte); font-weight: bold; border-bottom: 1px solid var(--linie); margin-bottom: 6px; }
.konto-name span { font-weight: normal; color: var(--gedaempft); font-size: 13px; }
.konto-menue a, .konto-menue button {
  display: block; width: 100%; padding: 8px 10px; text-align: left;
  background: none; border: 0; border-radius: var(--radius); color: var(--tinte-2); text-decoration: none;
}
.konto-menue a:hover, .konto-menue button:hover { background: var(--grund); color: var(--tinte); }
.nur-mobil { display: none !important; }

.fussnav { display: none; }

main { padding: 28px 24px 80px; }

/* ------------------------------------------------------------ Bausteine */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px;
  background: var(--papier); color: var(--tinte);
  border: 1px solid var(--linie); border-radius: var(--radius);
  text-decoration: none; white-space: nowrap;
}
.knopf:hover { background: var(--flaeche); border-color: var(--tinte); }
.knopf.primaer { background: var(--voll); border-color: var(--voll); color: var(--auf-voll); font-weight: bold; }
.knopf.primaer:hover { background: var(--voll-hover); border-color: var(--voll-hover); }
.knopf.gefahr { color: var(--signal); border-color: var(--signal); }
.knopf.gefahr:hover { background: var(--papier); border-color: var(--signal); }
.knopf.klein { min-height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; }
.knopf.klein .icon { width: 15px; height: 15px; }
.knopf.nur-icon { padding: 0; width: 38px; }
.knopf.breit { width: 100%; }
.knopf:disabled { opacity: 0.5; cursor: default; }

.mini {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  background: none; border: 0; border-radius: var(--radius); color: var(--gedaempft);
}
.mini:hover { background: var(--flaeche); color: var(--tinte); }
.mini .icon { width: 16px; height: 16px; }

.link { background: none; border: 0; padding: 0; color: var(--tinte); text-decoration: underline; text-underline-offset: 3px; }

.chip {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px;
  background: var(--papier); border: 1px solid var(--linie); border-radius: 11px;
  color: var(--tinte); font-size: 11.5px; font-weight: bold; letter-spacing: 0.02em;
}
.chip.gross { width: 36px; height: 36px; border-radius: 50%; font-size: 13px; background: none; border-color: var(--tinte-2); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* kleine Kennzeichnung, z. B. "neu" */
span.marke {
  display: inline-block; padding: 1px 6px; border-radius: 2px;
  background: var(--voll); color: var(--auf-voll);
  font-size: 11px; font-weight: bold; line-height: 1.4; vertical-align: 1px;
}
span.marke.nachtrag, span.marke.signal { background: none; color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }

.ueberzeile { font-size: 13px; color: var(--tinte-2); margin-bottom: 4px; }
.ueberzeile a { color: var(--tinte-2); }
.einleitung { max-width: 62ch; margin: 8px 0 20px; }
.zaehler { font-size: 13px; font-weight: normal; color: var(--gedaempft); }
.kategorie { font-size: 12px; color: var(--gedaempft); }
.fehler { color: var(--signal); font-weight: bold; }
.fehler::before { content: "! "; }
.feld-hinweis, .fussnote { font-size: 13px; color: var(--gedaempft); }
.leerzustand { padding: 40px 0; color: var(--tinte-2); max-width: 52ch; }

.filter { display: inline-flex; background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.filter > * {
  min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center;
  background: none; border: 0; border-right: 1px solid var(--linie); color: var(--tinte-2); text-decoration: none; white-space: nowrap;
}
.filter > *:last-child { border-right: 0; }
.filter > *:hover { color: var(--tinte); }
.filter > [aria-pressed="true"], .filter > [aria-current] { background: var(--voll); color: var(--auf-voll); font-weight: bold; }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.feld > span, .feld > legend { font-size: 13px; color: var(--tinte-2); }
.feld small { font-size: 12px; color: var(--gedaempft); }
.feld input[type="text"], .feld input[type="password"], .feld input[type="date"], .feld input[type="time"], .feld select, .feld textarea {
  width: 100%; min-height: 40px; padding: 8px 10px;
  background: var(--papier); color: var(--tinte);
  border: 1px solid var(--linie); border-radius: var(--radius);
}
.feld textarea { resize: vertical; line-height: 1.45; }
.feld input:focus, .feld select:focus, .feld textarea:focus { outline: 2px solid var(--tinte); outline-offset: 0; border-color: var(--tinte); }
.feldreihe { display: flex; gap: 14px; flex-wrap: wrap; }
.feldreihe > .feld { flex: 1 1 160px; }
.feldreihe > .feld.breit { flex: 2 1 240px; }
.stapel { display: flex; flex-direction: column; gap: 16px; }
.knopfzeile { display: flex; gap: 10px; flex-wrap: wrap; }
.auswahl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.auswahl-chips label { cursor: pointer; }
.auswahl-chips input { position: absolute; opacity: 0; }
.auswahl-chips span {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  background: var(--papier); border: 1px solid var(--linie); border-radius: 17px; color: var(--tinte-2);
}
.auswahl-chips input:checked + span { background: var(--voll); border-color: var(--voll); color: var(--auf-voll); font-weight: bold; }
.auswahl-chips input:focus-visible + span { outline: 2px solid var(--tinte); outline-offset: 2px; }

.karte { background: var(--papier); border: 1px solid var(--linie-zart); border-radius: var(--radius); padding: 22px 24px; }

/* ------------------------------------------------------------ Anmeldung */

.ohne-kopf main { padding-top: 0; }
.anmeldung { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 0; }
.anmeldung-karte { width: min(100%, 380px); }
.anmeldung-karte img { display: block; margin-bottom: 28px; border: 1px solid var(--linie-zart); }
.anmeldung-karte h1 { font-size: 34px; line-height: 1.1; color: var(--tinte); }
.unterzeile { color: var(--tinte-2); margin: 6px 0 28px; }
.anmeldung-karte .fussnote { margin-top: 22px; }

.schmale-seite { max-width: 460px; margin: 6vh auto 0; }
.schmale-seite h1 { font-size: 26px; color: var(--tinte); margin-bottom: 8px; }
.schmale-seite .karte { margin-top: 20px; }

/* --------------------------------------------------------------- Seiten */

.seite { max-width: 1180px; margin: 0 auto; }
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.seitenkopf h1, .sitzungstitel h1 { font-size: 28px; line-height: 1.15; color: var(--tinte); }

table.liste { width: 100%; border-collapse: collapse; }
table.liste th {
  text-align: left; padding: 9px 12px; background: var(--flaeche); color: var(--tinte);
  font-size: 13px; border: 1px solid var(--linie-zart);
}
table.liste td { padding: 10px 12px; background: var(--papier); border: 1px solid var(--linie-zart); vertical-align: top; }
table.liste td p + p { margin-top: 4px; }
table.liste .hinweis, .hinweis { font-size: 12.5px; color: var(--gedaempft); }
.ueberfaellig, .ueberfaellig .datum { color: var(--signal); }
.ueberfaellig .marke { margin-left: 6px; }
.datum { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--tinte); }

.aufgabengruppe { margin-bottom: 36px; }
.aufgabengruppe h2 { font-size: 18px; color: var(--tinte); margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.aufgaben td:nth-child(1) { width: 17%; }
.aufgaben td:nth-child(2) { width: 20%; }
.aufgaben td:nth-child(4) { width: 170px; }
.aufgaben td:nth-child(3) { color: var(--tinte); }

.objektkarten { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.objektkarte {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px;
  background: var(--papier); border: 1px solid var(--linie-zart); border-radius: var(--radius); text-decoration: none; color: var(--tinte-2);
}
.objektkarte:hover { border-color: var(--tinte); }
.objektkarte strong { font-size: 18px; }
.objektkarte.archiviert { opacity: 0.6; }
.ok-zahlen { font-size: 13px; margin-top: 8px; }

.verlauf-gruppe { margin-bottom: 32px; }
.verlauf-gruppe > h2 { font-size: 18px; color: var(--tinte); margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.verlauf { border: 1px solid var(--linie-zart); border-radius: var(--radius); margin-bottom: 8px; background: var(--papier); }
.verlauf summary { display: flex; gap: 14px; align-items: baseline; padding: 12px 16px; cursor: pointer; flex-wrap: wrap; }
.verlauf summary strong { font-size: 16px; }
.verlauf summary .zaehler { margin-left: auto; }
.status-text { font-size: 13px; color: var(--tinte-2); }
.zeitleiste { padding: 4px 16px 14px; }
.zeitleiste li { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--linie-zart); }
.zl-datum { font-variant-numeric: tabular-nums; font-weight: bold; }
.zl-inhalt { display: grid; gap: 10px; color: var(--tinte); }
.zl-label { display: block; font-size: 12px; color: var(--gedaempft); margin-bottom: 2px; }
.zl-meta { font-size: 13px; color: var(--tinte-2); margin-top: 2px; }

/* Einstellungen */
.einstellungen .karte { margin-bottom: 20px; overflow-x: auto; }
.einstellungen h2 { font-size: 20px; color: var(--tinte); margin-bottom: 14px; }
.einstellungen h3 { font-size: 14px; color: var(--tinte); flex-basis: 100%; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--linie-zart); }
.inline-form .feld { flex: 0 1 190px; }
.inline-form .fehler, .inline-form .feld-hinweis { flex-basis: 100%; }
input.still, .liste select {
  width: 100%; min-height: 32px; padding: 4px 8px; background: transparent; color: var(--tinte);
  border: 1px solid transparent; border-radius: var(--radius);
}
.liste select { border-color: var(--linie-zart); background: var(--papier); }
input.still:hover { border-color: var(--linie); }
input.still:focus { border-color: var(--tinte); background: var(--grund); outline: none; }
input.still.kurz { width: 64px; }
tr.inaktiv td { opacity: 0.55; }
td.aktionen { white-space: nowrap; text-align: right; }
td.reihenfolge { white-space: nowrap; width: 90px; }
.status-liste { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; }
.status-liste dt { color: var(--tinte); font-weight: bold; }
.status-liste + .feld-hinweis { margin-top: 14px; }
.startpasswort {
  margin: 14px 0; padding: 14px; text-align: center; user-select: all;
  background: var(--grund); border: 1px solid var(--linie); border-radius: var(--radius);
  font: bold 22px/1.2 Consolas, "Courier New", monospace; color: var(--tinte); letter-spacing: 0.04em;
}

/* -------------------------------------------------------------- Sitzung */

.sitzung { max-width: 1760px; margin: 0 auto; }
.sitzungskopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px 56px; flex-wrap: wrap; margin-bottom: 20px; }
.sitzungstitel h1 { font-size: 30px; }
.sitzungstitel .uhrzeit { font-weight: normal; color: var(--tinte-2); margin-left: 14px; font-size: 22px; white-space: nowrap; }
.phasenzeile { margin-top: 8px; font-size: 15px; }
.countdown {
  display: inline-block; margin-left: 8px; padding: 1px 9px; border: 1px solid var(--linie); border-radius: 11px;
  font-size: 13px; color: var(--tinte); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.countdown.knapp { border-color: var(--signal); color: var(--signal); }

/* Wochenlinie: wo steht die Woche zwischen Öffnung, Agenda-Schluss und Besprechung? */
.wochenlinie { --jetzt: 0; --schluss: 0.62; flex: 0 1 440px; min-width: 280px; padding: 22px 4px 40px; }
.wl-bahn { position: relative; height: 2px; background: var(--linie); }
.wl-fuellung { position: absolute; inset: 0 auto 0 0; width: calc(var(--jetzt) * 100%); background: var(--tinte); }
.wl-marke { position: absolute; top: -5px; width: 2px; height: 12px; margin-left: -1px; background: var(--tinte); }
.wl-schluss { left: calc(var(--schluss) * 100%); }
.wl-beginn { left: 100%; }
.wl-marke span { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.wl-beginn span { left: auto; right: -1px; transform: none; }
.wl-zeit { top: 17px; font-size: 12.5px; font-weight: bold; color: var(--tinte); font-variant-numeric: tabular-nums; }
.wl-text { top: 33px; font-size: 11.5px; color: var(--gedaempft); }
.wl-jetzt {
  position: absolute; top: -4px; left: calc(var(--jetzt) * 100%); width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--tinte); box-shadow: 0 0 0 3px var(--grund);
}
.wl-jetzt span { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); font-size: 11.5px; color: var(--tinte); }

/* Teilnehmer: wer dabei ist – zugleich die Legende für die Kürzel in der Tabelle. */
.teilnehmer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 18px; }
.tn-titel { font-size: 13px; font-weight: bold; color: var(--tinte); margin-right: 6px; }
.tn-hinweis { font-size: 12.5px; color: var(--gedaempft); margin-left: 6px; }
label.tn { cursor: pointer; }
.tn input { position: absolute; opacity: 0; }
.tn-name {
  display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px 0 9px;
  background: var(--papier); border: 1px solid var(--linie); border-radius: 15px; font-size: 13.5px; color: var(--tinte);
}
.tn-name b { font-size: 11.5px; letter-spacing: 0.02em; color: var(--gedaempft); }
.tn input:not(:checked) + .tn-name { background: none; border-color: var(--linie-zart); color: var(--gedaempft); text-decoration: line-through; }
label.tn:hover .tn-name { border-color: var(--tinte); }
.tn input:focus-visible + .tn-name { outline: 2px solid var(--tinte); outline-offset: 2px; }

.werkzeuge {
  display: flex; justify-content: space-between; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  padding: 12px 0; margin-bottom: 20px; border-top: 1px solid var(--linie-zart); border-bottom: 1px solid var(--linie-zart);
}
.wz-links, .wz-rechts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wz-hinweis { font-size: 13.5px; color: var(--tinte-2); }

.sitzungsraster { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 32px; align-items: start; }
.objektleiste { position: sticky; top: calc(var(--kopfhoehe) + 20px); max-height: calc(100vh - var(--kopfhoehe) - 40px); overflow-y: auto; }
.objektleiste a {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: baseline;
  padding: 7px 10px; border-left: 2px solid var(--linie-zart); color: var(--tinte-2); text-decoration: none; font-size: 14px;
}
.objektleiste a:hover { color: var(--tinte); border-left-color: var(--linie); }
.objektleiste a.aktiv { color: var(--tinte); font-weight: bold; border-left-color: var(--tinte); }
.objektleiste .nr, .objekt-kopf .nr, .z-thema .nr { color: var(--gedaempft); font-variant-numeric: tabular-nums; font-weight: normal; }
.ol-zahl { font-size: 12px; color: var(--gedaempft); font-variant-numeric: tabular-nums; font-weight: normal; }
.ol-zahl b { color: var(--tinte); }
.ol-neu {
  display: flex; align-items: center; gap: 7px; width: 100%; margin-top: 10px; padding: 7px 10px;
  background: none; border: 0; border-left: 2px solid transparent; color: var(--gedaempft); font-size: 13.5px; text-align: left;
}
.ol-neu:hover { color: var(--tinte); }
.ol-neu .icon { width: 15px; height: 15px; }
body.besprechung .ol-neu { display: none; }

.objekt { margin-bottom: 36px; }
.objekt-kopf { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; flex-wrap: wrap; }
.objekt-kopf h2 { font-size: 21px; color: var(--tinte); }
.objekt-kopf .nr { margin-right: 10px; }
.objekt-kopf .knopf { margin-left: auto; align-self: center; }
.objekt.ohne-themen { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--linie-zart); }
.objekt.ohne-themen .objekt-kopf { margin-bottom: 0; }
.objekt.ohne-themen h2 { font-size: 17px; color: var(--tinte-2); }

table.themen { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.themen th {
  text-align: left; padding: 8px 10px; background: var(--flaeche); color: var(--tinte);
  font-size: 13px; border: 1px solid var(--linie-zart);
}
table.themen td { padding: 8px 10px; background: var(--papier); border: 1px solid var(--linie-zart); vertical-align: top; overflow-wrap: break-word; }
/* Spaltenbreiten: die drei letzten Spalten sind fest, die letzte Textspalte bekommt den Rest. */
table.themen th:nth-last-child(3) { width: 110px; padding-left: 8px; padding-right: 8px; }
table.themen th:nth-last-child(2) { width: 104px; }
table.themen th:nth-last-child(1) { width: 138px; }
table.themen th:nth-child(1) { width: 13%; }
table.themen th:nth-child(2) { width: 19%; }
table.themen th:nth-child(3) { width: 15.5%; }
table.themen.phase-agenda th:nth-child(1) { width: 15%; }
table.themen.phase-agenda th:nth-child(2) { width: 22%; }
table.themen.phase-agenda th:nth-child(3) { width: auto; }
@media (min-width: 1280px) {
  table.themen th:nth-child(2) { width: 20%; }
  table.themen th:nth-child(3) { width: 17%; }
}
@media (min-width: 1400px) {
  table.themen th:nth-child(1) { width: 14%; }
  table.themen th:nth-child(2) { width: 22%; }
  table.themen th:nth-child(3) { width: 18%; }
  table.themen.phase-agenda th:nth-child(1) { width: 15%; }
  table.themen.phase-agenda th:nth-child(2) { width: 26%; }
}
@media (min-width: 1700px) {
  table.themen th:nth-child(1) { width: 13%; }
  table.themen th:nth-child(2) { width: 24%; }
  table.themen th:nth-child(3) { width: 21%; }
  table.themen.phase-agenda th:nth-child(1) { width: 14%; }
  table.themen.phase-agenda th:nth-child(2) { width: 28%; }
}

.z-thema { position: relative; }
.z-thema .nr { display: block; font-size: 12px; margin-bottom: 2px; }
.thema-titel { font-size: 15px; overflow-wrap: break-word; hyphens: auto; }
.thema-kopf .marke { margin-left: 6px; }
.z-thema .mini { position: absolute; top: 2px; right: 2px; opacity: 0; }
tr.thema:hover .z-thema .mini, .z-thema .mini:focus-visible { opacity: 1; }

.z-stand { font-size: 13.5px; color: var(--tinte-2); }
.z-stand p + p { margin-top: 4px; }
.stand-datum { font-size: 12px; color: var(--gedaempft); font-variant-numeric: tabular-nums; }
.schritt { display: flex; gap: 6px; align-items: flex-start; color: var(--tinte); }
.schritt .icon { width: 14px; height: 14px; margin-top: 3px; color: var(--gedaempft); }
td.z-zb .z-stand { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--linie-zart); }

.text { color: var(--tinte); }
.text p + p { margin-top: 4px; }

table.themen textarea {
  display: block; width: 100%; min-height: 34px; padding: 5px 7px; margin: -4px -6px; width: calc(100% + 12px);
  background: transparent; color: var(--tinte);
  border: 1px solid transparent; border-radius: var(--radius);
  resize: none; overflow: hidden; line-height: 1.45; field-sizing: content;
}
table.themen textarea::placeholder { color: var(--gedaempft); opacity: 0.75; }
table.themen textarea:hover { border-color: var(--linie); }
table.themen textarea:focus { border-color: var(--tinte); background: var(--grund); outline: none; }
table.themen textarea.konflikt { border-color: var(--signal); }
.z-zb .autor, .meldung .autor { display: inline-block; margin-top: 6px; font-size: 11.5px; font-weight: bold; color: var(--gedaempft); }
.meldung { position: relative; }

.wahl { position: relative; }
.wahl summary { list-style: none; cursor: pointer; padding: 3px; margin: -3px; border-radius: var(--radius); border: 1px solid transparent; min-height: 30px; }
.wahl summary::-webkit-details-marker { display: none; }
.wahl summary:hover, .wahl[open] summary { border-color: var(--linie); }
.wahl-liste {
  position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 210px; padding: 6px;
  background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten);
}
.wahl-liste label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius); cursor: pointer; color: var(--tinte); }
.wahl-liste label:hover { background: var(--grund); }
.wahl-liste input { width: 16px; height: 16px; accent-color: var(--voll); }

table.themen input[type="date"], table.themen select {
  width: 100%; min-height: 30px; padding: 3px 4px; background: transparent; color: var(--tinte);
  border: 1px solid transparent; border-radius: var(--radius); font-size: 13.5px; font-variant-numeric: tabular-nums;
}
table.themen input[type="date"]:hover, table.themen select:hover { border-color: var(--linie); }
table.themen input[type="date"]:focus, table.themen select:focus { border-color: var(--tinte); background: var(--grund); outline: none; }
table.themen input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
table.themen select option { background: var(--papier); color: var(--tinte); }
table.themen input[type="date"][value=""]:not(:focus) { color: var(--gedaempft); }
td.ueberfaellig input[type="date"] { color: var(--signal); font-weight: bold; }
.wiedervorlage { display: block; margin-top: 6px; font-size: 11.5px; color: var(--gedaempft); }

tr.status-erledigt .thema-titel { text-decoration: line-through; text-decoration-color: var(--gedaempft); }
tr.status-erledigt td, tr.status-zurueckgestellt td { background: var(--grund-tief); }
tr.status-erledigt .z-stand, tr.status-zurueckgestellt .z-stand { opacity: 0.7; }

.zurueckgestellt { margin-top: 10px; font-size: 13px; color: var(--tinte-2); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.zg-titel { color: var(--gedaempft); }
.zg-datum { color: var(--gedaempft); }

/* Filter */
.objekte[data-filter="meldung"] tr.thema:not(.hat-meldung),
.objekte[data-filter="meine"] tr.thema:not([data-meine="1"]),
.objekte:not([data-filter="alle"]) .objekt.ohne-themen,
.objekte .objekt.gefiltert-leer { display: none; }

/* Besprechungsmodus: ein Objekt nach dem anderen, groß genug für den geteilten Bildschirm */
.besprechungsleiste {
  position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 10px;
  padding: 10px 0; margin-bottom: 18px; background: var(--grund); border-bottom: 1px solid var(--linie-zart);
}
.bl-titel { font-weight: bold; color: var(--tinte); margin-right: 14px; }
.bl-position { min-width: 110px; text-align: center; font-variant-numeric: tabular-nums; }
body.besprechung { font-size: 17px; --kopfhoehe: 0px; }
body.besprechung .kopf, body.besprechung .fussnav, body.besprechung .werkzeuge, body.besprechung .wochenlinie,
body.besprechung .phasenzeile, body.besprechung .objekt:not(.aktiv) { display: none; }
body.besprechung main { padding-top: 0; }
/* Die Leiste mit Datum und Blättern steht ganz oben, die Teilnehmer darunter. */
body.besprechung .sitzung { display: flex; flex-direction: column; }
body.besprechung .besprechungsleiste { order: -1; }
body.besprechung .sitzungskopf { display: none; }
body.besprechung .objektleiste { top: 76px; }
body.besprechung .objektleiste a { font-size: 15px; padding: 9px 10px; }
body.besprechung .objekt-kopf h2 { font-size: 30px; }
body.besprechung .thema-titel { font-size: 17px; }
body.besprechung .z-stand { font-size: 15px; }
body.besprechung table.themen td { padding: 12px; }
body.besprechung table.themen input[type="date"], body.besprechung table.themen select { font-size: 15px; }
body.besprechung table.themen th:nth-last-child(2) { width: 124px; }
body.besprechung table.themen th:nth-last-child(1) { width: 154px; }
body.besprechung table.themen:not(.phase-agenda) th:nth-child(1) { width: 12%; }
body.besprechung table.themen:not(.phase-agenda) th:nth-child(2) { width: 17%; }
body.besprechung table.themen:not(.phase-agenda) th:nth-child(3) { width: 14%; }
@media (min-width: 1280px) {
  body.besprechung table.themen:not(.phase-agenda) th:nth-child(2) { width: 19%; }
  body.besprechung table.themen:not(.phase-agenda) th:nth-child(3) { width: 15.5%; }
}
@media (min-width: 1400px) {
  body.besprechung table.themen:not(.phase-agenda) th:nth-child(1) { width: 13%; }
  body.besprechung table.themen:not(.phase-agenda) th:nth-child(2) { width: 21%; }
  body.besprechung table.themen:not(.phase-agenda) th:nth-child(3) { width: 17.5%; }
}
@media (min-width: 1700px) {
  body.besprechung table.themen:not(.phase-agenda) th:nth-child(2) { width: 23%; }
  body.besprechung table.themen:not(.phase-agenda) th:nth-child(3) { width: 20%; }
}

/* -------------------------------------------------------------- Dialoge */

.dialog {
  width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0;
  background: var(--papier); color: var(--tinte-2);
  border: 1px solid var(--linie); border-radius: 5px; box-shadow: 0 24px 64px rgb(40 40 30 / 0.28);
}
.dialog.schmal { width: min(440px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgb(40 40 30 / 0.5); }
.dialog-form { display: flex; flex-direction: column; max-height: calc(100dvh - 34px); }
.dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.dialog h2 { font-size: 20px; color: var(--tinte); }
.dialog-inhalt { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px; overflow-y: auto; }
.dialog footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--linie-zart); flex-wrap: wrap; }
.dialog-hinweis { padding: 9px 12px; border: 1px solid var(--signal); border-radius: var(--radius); color: var(--signal); font-size: 13.5px; }
.textwerkzeuge { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: -8px; }
.werkzeug-status { font-size: 13px; color: var(--tinte-2); }
.knopf.laeuft { border-color: var(--signal); color: var(--signal); }

/* Einsprechen */
#dlg-einsprechen .es-arbeitet, #dlg-einsprechen .es-vorschlaege, #dlg-einsprechen .es-fuss { display: none; }
#dlg-einsprechen[data-zustand="arbeitet"] .es-start { display: none; }
#dlg-einsprechen[data-zustand="arbeitet"] .es-arbeitet { display: block; }
#dlg-einsprechen[data-zustand="vorschlaege"] .es-start { display: none; }
#dlg-einsprechen[data-zustand="vorschlaege"] .es-vorschlaege { display: block; }
#dlg-einsprechen[data-zustand="vorschlaege"] .es-fuss { display: flex; }

.aufnahme { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 10px 0 4px; text-align: center; }
.aufnahme-knopf {
  --pegel: 0;
  display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%;
  background: var(--voll); color: var(--auf-voll); border: 0;
  box-shadow: 0 0 0 calc(var(--pegel) * 22px) rgb(149 87 0 / 0.22);
  transition: box-shadow 90ms linear, background 150ms;
}
.aufnahme-knopf .icon { width: 36px; height: 36px; }
.aufnahme-knopf:hover { background: var(--voll-hover); }
.aufnahme-knopf.laeuft { background: var(--signal); }
.aufnahme-text { max-width: 40ch; }
.aufnahme-zeit { font: bold 22px/1 var(--schrift); color: var(--tinte); font-variant-numeric: tabular-nums; }
.trenner { display: flex; align-items: center; gap: 14px; margin: 14px 0; font-size: 13px; color: var(--gedaempft); }
.trenner::before, .trenner::after { content: ""; flex: 1; height: 1px; background: var(--linie-zart); }
.es-aktionen { display: flex; justify-content: flex-end; margin-top: 12px; }
.es-start .feld-hinweis { margin-top: 10px; }

.es-arbeitet { padding: 44px 0; text-align: center; color: var(--tinte); }
.laufbalken { height: 2px; background: var(--linie-zart); margin-bottom: 18px; overflow: hidden; position: relative; }
.laufbalken::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--tinte); animation: laufen 1.3s ease-in-out infinite; }
@keyframes laufen { from { left: -35%; } to { left: 100%; } }

.transkript { font-size: 13.5px; margin-bottom: 14px; }
.transkript summary { cursor: pointer; color: var(--tinte-2); }
.transkript p { margin-top: 8px; padding: 10px 12px; background: var(--grund); border-radius: var(--radius); color: var(--tinte-2); }
.vorschlaege { display: flex; flex-direction: column; gap: 12px; }
.vorschlag { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 14px; background: var(--grund); border: 1px solid var(--linie-zart); border-radius: var(--radius); }
.vorschlag.aus { opacity: 0.45; }
.vs-wahl input { width: 18px; height: 18px; margin-top: 26px; accent-color: var(--voll); }
.vs-felder { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vorschlag .feld input, .vorschlag .feld select, .vorschlag .feld textarea { background: var(--papier); }

/* ------------------------------------------------------- Rückmeldungen */

.speicherstatus {
  position: fixed; left: 16px; bottom: 16px; z-index: 50; padding: 6px 12px;
  background: var(--papier); border: 1px solid var(--linie); border-radius: 14px; font-size: 13px; color: var(--tinte-2);
  box-shadow: var(--schatten);
}
.speicherstatus.fehlerhaft { border-color: var(--signal); color: var(--signal); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px; background: var(--voll); color: var(--auf-voll); border-radius: var(--radius); font-weight: bold;
  box-shadow: var(--schatten); display: flex; gap: 14px; align-items: center;
}
.toast.warnung { background: var(--signal); }
.toast button { background: none; border: 0; padding: 0; color: inherit; font-weight: bold; text-decoration: underline; white-space: nowrap; }

/* ------------------------------------------------------- Kleine Geräte */

@media (max-width: 1180px) {
  .sitzungsraster { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .objektleiste {
    position: sticky; top: var(--kopfhoehe); z-index: 20; max-height: none; overflow-x: auto; overflow-y: hidden;
    margin: 0 -24px; padding: 8px 24px; background: var(--grund); border-bottom: 1px solid var(--linie-zart);
    scrollbar-width: none;
  }
  .objektleiste::-webkit-scrollbar { display: none; }
  .objektleiste ol { display: flex; gap: 6px; }
  .objektleiste a { display: flex; gap: 6px; white-space: nowrap; border: 1px solid var(--linie-zart); border-radius: 15px; padding: 5px 11px; }
  .objektleiste a.aktiv { border-color: var(--tinte); }
  .ol-neu { width: auto; margin: 0; padding: 5px 11px; border: 1px dashed var(--linie); border-radius: 15px; white-space: nowrap; }
  body.besprechung .objektleiste { top: 59px; }
}

@media (max-width: 860px) {
  body { font-size: 15.5px; }
  main { padding: 18px 14px calc(96px + env(safe-area-inset-bottom)); }
  .kopf { padding: 0 14px; gap: 14px; }
  .hauptnav { display: none; }
  .nur-mobil { display: block !important; }
  .objektleiste { margin: 0 -14px; padding: 8px 14px; }

  .fussnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr; align-items: end;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--papier); border-top: 1px solid var(--linie-zart);
  }
  .fussnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--gedaempft); text-decoration: none; font-size: 11.5px; }
  .fussnav a[aria-current] { color: var(--tinte); font-weight: bold; }
  .fussnav a.fuss-mikro { color: var(--auf-voll); }
  .fussnav .icon { width: 22px; height: 22px; }
  .fussnav .fuss-mikro {
    width: 60px; height: 60px; margin: -22px auto 2px; border-radius: 50%; justify-content: center;
    background: var(--voll); color: var(--auf-voll); box-shadow: 0 0 0 5px var(--papier);
  }
  .fussnav .fuss-mikro .icon { width: 28px; height: 28px; }
  body.ohne-kopf .fussnav { display: none; }
  .speicherstatus { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

  .sitzungstitel h1 { font-size: 24px; }
  .sitzungstitel .uhrzeit { display: block; margin: 2px 0 0; font-size: 17px; }
  .wochenlinie { flex-basis: 100%; }
  .werkzeuge { border-top: 0; padding-top: 0; }
  .wz-links { width: 100%; }
  .wz-links .knopf { flex: 1; min-height: 46px; }
  .wz-rechts [data-aktion="besprechungsmodus"], .wz-rechts [data-aktion="drucken"] { display: none; }

  /* Tabellen werden zu Karten */
  table.themen, table.themen tbody, table.themen td, table.liste, table.liste tbody, table.liste td { display: block; width: auto !important; }
  table.themen thead, table.liste thead { display: none; }
  table.themen tr.thema, table.liste tr {
    display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 10px 12px;
    padding: 14px; margin-bottom: 10px; background: var(--papier); border: 1px solid var(--linie-zart); border-radius: var(--radius);
  }
  table.liste tr { grid-template-columns: 1fr 1fr; }
  table.themen td, table.liste td { border: 0; padding: 0; grid-column: 1 / -1; min-width: 0; }
  table.themen td::before, table.liste td::before { content: attr(data-label); display: block; font-size: 11.5px; color: var(--gedaempft); margin-bottom: 3px; }
  table.themen td.z-thema::before, table.liste td.aktionen::before { display: none; }
  table.themen td.z-verantw, table.themen td.z-termin, table.themen td.z-status { grid-column: auto; }
  table.themen textarea { min-height: 44px; border-color: var(--linie-zart); margin: 0; width: 100%; padding: 9px 10px; }
  table.themen input[type="date"], table.themen select { border-color: var(--linie-zart); min-height: 38px; padding: 4px 6px; }
  .wahl summary { border-color: var(--linie-zart); min-height: 38px; padding: 7px; margin: 0; }
  .wahl-liste { left: 0; right: auto; }
  .z-thema .nr { display: inline; margin-right: 8px; }
  .thema-kopf { display: inline; }
  .thema-titel { font-size: 17px; }
  .z-thema .mini { opacity: 1; top: -6px; right: -6px; }
  tr.status-erledigt td, tr.status-zurueckgestellt td { background: none; }
  tr.status-erledigt, tr.status-zurueckgestellt { opacity: 0.75; }
  td.aktionen { text-align: left; }

  .dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 12px 12px 0 0; border-width: 1px 0 0; max-height: 94dvh; }
  .dialog-form { max-height: 94dvh; }
  .dialog footer { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .zeitleiste li { grid-template-columns: 1fr; gap: 6px; }
  .status-liste { grid-template-columns: 1fr; gap: 4px; }
  .status-liste dd { margin-bottom: 12px; }
  .inline-form .feld { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------- Druck */

@media print {
  :root {
    --grund: #fff; --grund-tief: #fff; --flaeche: #e9e9e4; --papier: #fff;
    --linie: #8a8a80; --linie-zart: #b9b9b0; --tinte: #000; --tinte-2: #1d1d1b; --gedaempft: #55554d; --signal: #000;
  }
  span.marke { background: none; color: #000; box-shadow: inset 0 0 0 0.5pt #000; }
  @page { size: A4 landscape; margin: 12mm; }
  body { font-size: 9.5pt; background: #fff; }
  main { padding: 0; }
  .kopf, .fussnav, .werkzeuge, .objektleiste, .wochenlinie, .besprechungsleiste, .mini, .knopf, .link,
  .speicherstatus, .toast, dialog, .filterleer, .objekt.ohne-themen, .zurueckgestellt, .countdown, .ol-neu { display: none !important; }
  .sitzungsraster { display: block; }
  .objekt, body.besprechung .objekt:not(.aktiv) { display: block !important; margin-bottom: 14pt; }
  body.besprechung .sitzungskopf { display: flex; }
  .sitzungstitel h1 { font-size: 18pt; }
  .objekt-kopf h2 { font-size: 13pt; break-after: avoid; }
  .objekt-kopf { break-after: avoid; }
  table.themen tr { break-inside: avoid; }
  table.themen th { font-size: 8.5pt; }
  table.themen td { padding: 4pt 5pt; }
  table.themen textarea, table.themen select, table.themen input[type="date"] { border: 0 !important; appearance: none; padding: 0; margin: 0; width: 100%; min-height: 0; }
  table.themen input[type="date"][value=""] { visibility: hidden; }
  table.themen textarea::placeholder { color: transparent; }
  .wahl summary { border: 0; padding: 0; margin: 0; min-height: 0; }
  .chip { border: 0; padding: 0; min-width: 0; height: auto; font-size: 9pt; margin-right: 4pt; }
  label.tn:has(input:not(:checked)), .tn-hinweis { display: none; }
  .tn-name { border: 0; padding: 0 8pt 0 0; min-height: 0; font-size: 9.5pt; gap: 3pt; }
  .tn-name b { color: #000; }
  tr.status-erledigt td, tr.status-zurueckgestellt td { background: #fff; }
  a { text-decoration: none; }
}
