/* Stammtisch – warm-dunkel mit Terrakotta-Akzent (gleiche Familie wie die Fritzkonsole); hell per System oder Schalter. */
:root {
  color-scheme: dark;
  --bg: #141413; --leiste: #191817; --flaeche: #1e1d1b; --flaeche-2: #262522; --flaeche-hover: #2c2b28;
  --linie: #33312d; --linie-stark: #45423d;
  --text: #f0eee6; --text-2: #bdb9ae; --text-3: #8b877d;
  --akzent: #d97757; --akzent-text: #e8957a; --akzent-weich: rgba(217, 119, 87, .15); --auf-akzent: #1a1410;
  --gut: #3fb950; --kritisch: #e5534b; --kritisch-text: #ef6b6b; --warn-text: #fab219;
  --erwaehnung: rgba(250, 178, 25, .09); --erwaehnung-rand: #d19a1f;
  --schatten: 0 10px 30px rgba(0, 0, 0, .35);
  --f0: #d97757; --f1: #5b9cf0; --f2: #4cb87a; --f3: #c58af0; --f4: #e0b041; --f5: #3fbec4; --f6: #e86f9a; --f7: #9ea7b3;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f4f2eb; --leiste: #efece3; --flaeche: #fdfcf8; --flaeche-2: #f3f1ea; --flaeche-hover: #ebe8df;
    --linie: #e3dfd4; --linie-stark: #d0cbbe; --text: #1a1915; --text-2: #55534d; --text-3: #77746c;
    --akzent: #c96442; --akzent-text: #b4532f; --akzent-weich: rgba(201, 100, 66, .12); --auf-akzent: #fff;
    --gut: #1f8f3a; --kritisch: #c9372f; --kritisch-text: #b42f2f; --warn-text: #8a5d00;
    --erwaehnung: rgba(230, 160, 20, .12); --erwaehnung-rand: #c58a10;
    --schatten: 0 10px 30px rgba(60, 50, 30, .14);
    --f0: #c2593a; --f1: #2f6fc4; --f2: #23864d; --f3: #8f52c4; --f4: #a77a10; --f5: #16848a; --f6: #c2416f; --f7: #66707c;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f2eb; --leiste: #efece3; --flaeche: #fdfcf8; --flaeche-2: #f3f1ea; --flaeche-hover: #ebe8df;
  --linie: #e3dfd4; --linie-stark: #d0cbbe; --text: #1a1915; --text-2: #55534d; --text-3: #77746c;
  --akzent: #c96442; --akzent-text: #b4532f; --akzent-weich: rgba(201, 100, 66, .12); --auf-akzent: #fff;
  --gut: #1f8f3a; --kritisch: #c9372f; --kritisch-text: #b42f2f; --warn-text: #8a5d00;
  --erwaehnung: rgba(230, 160, 20, .12); --erwaehnung-rand: #c58a10;
  --schatten: 0 10px 30px rgba(60, 50, 30, .14);
  --f0: #c2593a; --f1: #2f6fc4; --f2: #23864d; --f3: #8f52c4; --f4: #a77a10; --f5: #16848a; --f6: #c2416f; --f7: #66707c;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); scrollbar-color: var(--linie-stark) transparent; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow: hidden;
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.verwaltung { overflow: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--akzent-text); }
code { font: 500 .88em ui-monospace, "JetBrains Mono", "Cascadia Code", monospace; background: var(--flaeche-2); border: 1px solid var(--linie); padding: 1px 5px; border-radius: 5px; }
pre { margin: 6px 0 2px; padding: 10px 12px; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 10px; overflow-x: auto; max-width: 100%; white-space: pre; }
pre code { background: none; border: 0; padding: 0; font-size: 13px; }
.unter { color: var(--text-3); font-size: 13px; }
.laden { display: grid; place-items: center; height: 100vh; color: var(--text-3); }
svg.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Knöpfe & Felder ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--linie-stark); background: var(--flaeche-2); cursor: pointer;
  font-weight: 550; font-size: 14px; white-space: nowrap;
}
a.knopf { text-decoration: none; color: inherit; }
.knopf:hover { background: var(--flaeche-hover); }
.knopf.primaer { background: var(--akzent); border-color: transparent; color: var(--auf-akzent); }
.knopf.primaer:hover { filter: brightness(1.07); }
.knopf.gefahr { color: var(--kritisch-text); }
.knopf.klein { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.knopf:disabled { opacity: .5; cursor: default; }
.ikon-knopf {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 0;
  background: none; color: var(--text-2); cursor: pointer; flex: none;
}
.ikon-knopf:hover { background: var(--flaeche-hover); color: var(--text); }
.ikon-knopf.an { color: var(--akzent-text); }
.feld { display: grid; gap: 6px; }
.feld > span { font-size: 13px; color: var(--text-2); font-weight: 550; }
input[type=text], input[type=password], input:not([type]), textarea, select {
  width: 100%; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--linie-stark);
  background: var(--bg); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-weich); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; }
.fehlertext { color: var(--kritisch-text); font-size: 13px; min-height: 18px; }

/* ---------- Anmeldung ---------- */
.anmeldung { display: grid; place-items: center; min-height: 100vh; padding: 16px; overflow: auto; }
.anmeldung form {
  width: min(380px, 100%); display: grid; gap: 14px; padding: 28px; background: var(--flaeche);
  border: 1px solid var(--linie); border-radius: 18px; box-shadow: var(--schatten);
}
.anmeldung h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.logo { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--akzent); color: var(--auf-akzent); flex: none; }
.logo svg.ic { width: 24px; height: 24px; stroke-width: 2; }

/* ---------- Chat-Rahmen ---------- */
.chat { display: grid; grid-template-columns: 264px minmax(0, 1fr) 248px; height: 100vh; height: 100dvh; }
.chat.ohne-mitglieder { grid-template-columns: 264px minmax(0, 1fr); }
.chat.ohne-mitglieder .mitglieder { display: none; }
.leiste { display: flex; flex-direction: column; min-height: 0; background: var(--leiste); border-right: 1px solid var(--linie); }
.kopf-server { padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--linie); display: flex; gap: 11px; align-items: center; min-height: 64px; }
.kopf-server > div:not(.logo) { min-width: 0; flex: 1; }
.kopf-server b { display: block; font-size: 16px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-server .unter { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-server .logo { width: 34px; height: 34px; border-radius: 10px; }
.kopf-server .logo svg.ic { width: 19px; height: 19px; }
.kanalliste { flex: 1; overflow-y: auto; padding: 6px 8px 10px; }
.gruppe-titel { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px; font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.gruppe-titel .ikon-knopf { width: 24px; height: 24px; margin: -4px -4px -4px 0; }
.gruppe-titel .ikon-knopf svg.ic { width: 15px; height: 15px; }
.kanal {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--text-2); cursor: pointer; text-align: left; font-size: 14.5px; min-height: 36px;
}
.kanal:hover { background: var(--flaeche-hover); color: var(--text); }
.kanal.aktiv { background: var(--akzent-weich); color: var(--text); font-weight: 600; }
.kanal.neu { color: var(--text); font-weight: 650; }
.kanal .raute { color: var(--text-3); font-weight: 500; width: 18px; text-align: center; flex: none; font-size: 16px; }
.kanal .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanal .schloss { color: var(--text-3); }
.kanal .schloss svg.ic { width: 14px; height: 14px; }
.zaehler { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--akzent); color: var(--auf-akzent); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ich-feld { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; border-top: 1px solid var(--linie); background: var(--flaeche); }
.ich-feld .wer { flex: 1; min-width: 0; }
.ich-feld .wer b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ich-feld .wer span { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ich-feld .avatar .punkt { border-color: var(--flaeche); }

/* Avatare */
.avatar {
  --c: var(--f0); position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: var(--c);
  letter-spacing: -.02em; user-select: none;
}
.avatar.klein { width: 30px; height: 30px; font-size: 12px; }
.avatar.winzig { width: 20px; height: 20px; font-size: 10px; }
.avatar.gross { width: 64px; height: 64px; font-size: 24px; }
.avatar .punkt { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--text-3); border: 3px solid var(--leiste); }
.avatar.klein .punkt { width: 11px; height: 11px; border-width: 2.5px; }
.avatar.gross .punkt { width: 18px; height: 18px; border-width: 4px; border-color: var(--flaeche); }
.avatar .punkt.an { background: var(--gut); }
.avatar.system, .avatar.ehemalig { background: var(--flaeche-hover); color: var(--text-2); }
.avatar.system { background: var(--akzent); color: var(--auf-akzent); }
.f0 { --c: var(--f0); } .f1 { --c: var(--f1); } .f2 { --c: var(--f2); } .f3 { --c: var(--f3); }
.f4 { --c: var(--f4); } .f5 { --c: var(--f5); } .f6 { --c: var(--f6); } .f7 { --c: var(--f7); }

/* ---------- Hauptbereich ---------- */
.haupt { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.haupt-kopf { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 20px; min-height: 64px; border-bottom: 1px solid var(--linie); }
.haupt-kopf .titel { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.haupt-kopf .titel .raute { color: var(--text-3); font-size: 20px; }
.haupt-kopf h2 { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.haupt-kopf .thema { color: var(--text-3); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--linie-stark); }
.nur-mobil { display: none !important; }
.verlauf { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0 14px; overscroll-behavior: contain; }
.verlauf-anfang { padding: 28px 22px 18px; }
.verlauf-anfang .gross-raute { width: 60px; height: 60px; border-radius: 50%; background: var(--flaeche-2); display: grid; place-items: center; font-size: 30px; color: var(--text-2); margin-bottom: 12px; }
.verlauf-anfang h3 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.mehr-laden { display: flex; justify-content: center; padding: 12px; }
.tag-trenner { display: flex; align-items: center; gap: 12px; margin: 18px 22px 6px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.tag-trenner::before, .tag-trenner::after { content: ""; flex: 1; height: 1px; background: var(--linie); }
.neu-trenner { display: flex; align-items: center; gap: 10px; margin: 8px 22px; color: var(--kritisch-text); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.neu-trenner::before { content: ""; flex: 1; height: 1px; background: var(--kritisch); }

.nachricht { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; padding: 5px 22px 3px; margin-top: 12px; }
.nachricht.folge { margin-top: 0; padding-top: 1px; }
.nachricht:hover { background: var(--flaeche); }
.nachricht.erwaehnt { background: var(--erwaehnung); box-shadow: inset 3px 0 0 var(--erwaehnung-rand); }
.nachricht.markiert { animation: blink 1.8s ease; }
@keyframes blink { 0%, 35% { background: var(--akzent-weich); } 100% { background: transparent; } }
.nachricht > .avatar { margin-top: 2px; cursor: pointer; width: 40px; height: 40px; grid-row: span 3; }
.nachricht .zeit-links { color: var(--text-3); font-size: 11px; text-align: center; padding-top: 3px; opacity: 0; white-space: nowrap; grid-row: span 3; }
.nachricht.folge:hover .zeit-links { opacity: 1; }
.nachricht .kopfzeile { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.nachricht .autor { font-weight: 650; cursor: pointer; }
.nachricht .autor:hover { text-decoration: underline; }
.nachricht .zeit { color: var(--text-3); font-size: 12px; }
.marke-rolle { font-size: 10px; font-weight: 750; padding: 1px 6px; border-radius: 5px; background: var(--akzent-weich); color: var(--akzent-text); text-transform: uppercase; letter-spacing: .05em; align-self: center; }
.text { overflow-wrap: anywhere; white-space: pre-wrap; color: var(--text); min-width: 0; }
.text .bearbeitet { color: var(--text-3); font-size: 11px; margin-left: 4px; }
.text .erw { background: var(--akzent-weich); color: var(--akzent-text); border-radius: 5px; padding: 0 3px; font-weight: 600; }
.text .zitat { display: block; padding-left: 10px; border-left: 3px solid var(--linie-stark); color: var(--text-2); }
.nachricht.system-nachricht .text { color: var(--text); }
.antwort-zeile { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin: 0 0 3px; cursor: pointer; min-width: 0; grid-column: 1 / -1; padding-left: 20px; }
.antwort-zeile b { color: var(--text-2); font-weight: 600; flex: none; }
.antwort-zeile .avatar { margin: 0; }
.antwort-zeile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.antwort-zeile::before { content: ""; width: 28px; height: 9px; border: 2px solid var(--linie-stark); border-right: 0; border-bottom: 0; border-top-left-radius: 7px; flex: none; transform: translateY(4px); }
.antwort-zeile:hover span { color: var(--text-2); }
.reaktionen { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.reaktion {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--linie); background: var(--flaeche); cursor: pointer; font-size: 13px;
}
.reaktion b { font-size: 12px; font-weight: 650; color: var(--text-2); }
.reaktion.meine { border-color: var(--akzent); background: var(--akzent-weich); }
.reaktion.meine b { color: var(--akzent-text); }
.werkzeuge {
  position: absolute; right: 18px; top: -15px; display: none; gap: 1px; padding: 3px; border-radius: 10px;
  background: var(--flaeche); border: 1px solid var(--linie-stark); box-shadow: var(--schatten); z-index: 2;
}
.nachricht:hover .werkzeuge, .werkzeuge.offen { display: flex; }
.werkzeuge .ikon-knopf { width: 30px; height: 28px; }
.werkzeuge .ikon-knopf.gefahr:hover { color: var(--kritisch-text); }
.bearbeiten-feld textarea { margin-top: 4px; resize: none; }
.bearbeiten-feld .unter { margin-top: 4px; }

/* ---------- Eingabe ---------- */
.eingabe-bereich { padding: 0 18px 14px; position: relative; }
.tippt { height: 22px; font-size: 12.5px; color: var(--text-3); padding: 2px 4px 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tippt b { color: var(--text-2); }
.punkte span { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); margin-right: 2px; animation: hopp 1.2s infinite; }
.punkte span:nth-child(2) { animation-delay: .15s; } .punkte span:nth-child(3) { animation-delay: .3s; }
@keyframes hopp { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }
.eingabe { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie-stark); }
.eingabe:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-weich); }
.antwort-leiste + .eingabe { border-top-left-radius: 0; border-top-right-radius: 0; }
.eingabe textarea { border: 0; background: none; box-shadow: none !important; padding: 7px 0; resize: none; max-height: 40vh; line-height: 1.45; }
.eingabe .senden { width: 36px; height: 36px; border-radius: 10px; background: var(--akzent); color: var(--auf-akzent); }
.eingabe .senden:hover { background: var(--akzent); filter: brightness(1.08); color: var(--auf-akzent); }
.eingabe .senden:disabled { opacity: .35; filter: none; cursor: default; }
.antwort-leiste { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 14px; font-size: 13px; color: var(--text-2); background: var(--flaeche-2); border: 1px solid var(--linie-stark); border-bottom: 0; border-radius: 14px 14px 0 0; }
.antwort-leiste span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.antwort-leiste .ikon-knopf { width: 26px; height: 26px; }
.gesperrt-hinweis { padding: 13px 14px; border-radius: 14px; background: var(--flaeche); border: 1px dashed var(--linie-stark); color: var(--text-3); font-size: 14px; text-align: center; }
.vorschlaege { position: absolute; left: 18px; right: 18px; bottom: calc(100% - 22px); background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: 12px; box-shadow: var(--schatten); padding: 5px; z-index: 5; max-height: 260px; overflow-y: auto; }
.vorschlaege .unter.titel { padding: 4px 9px 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.vorschlag { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 9px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; }
.vorschlag.an, .vorschlag:hover { background: var(--flaeche-hover); }
.vorschlag .unter { margin-left: auto; }

/* ---------- Mitglieder ---------- */
.mitglieder { background: var(--leiste); border-left: 1px solid var(--linie); overflow-y: auto; padding: 8px 8px 16px; min-height: 0; }
.mitglied { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; border-radius: 9px; background: none; cursor: pointer; text-align: left; }
.mitglied:hover { background: var(--flaeche-hover); }
.mitglied.weg { opacity: .5; }
.mitglied .wer { min-width: 0; flex: 1; }
.mitglied .wer b { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 550; overflow: hidden; white-space: nowrap; }
.mitglied .wer b i { font-style: normal; overflow: hidden; text-overflow: ellipsis; }
.mitglied .wer span { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Schwebendes: Menü, Profil, Dialog, Toast ---------- */
.schwebe { position: fixed; z-index: 30; background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: 14px; box-shadow: var(--schatten); }
.emoji-wahl { display: grid; grid-template-columns: repeat(4, 40px); gap: 4px; padding: 6px; }
.emoji-wahl button { width: 40px; height: 40px; font-size: 21px; border: 0; background: none; border-radius: 9px; cursor: pointer; }
.emoji-wahl button:hover { background: var(--flaeche-hover); }
.profil { width: 300px; max-width: calc(100vw - 24px); padding: 18px; display: grid; gap: 12px; }
.profil .oben { display: flex; gap: 14px; align-items: center; min-width: 0; }
.profil .oben > div { min-width: 0; }
.profil h3 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.schleier { position: fixed; inset: 0; z-index: 40; background: rgba(10, 9, 8, .6); display: grid; place-items: center; padding: 16px; }
.dialog { width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: 18px; box-shadow: var(--schatten); padding: 22px; display: grid; gap: 14px; }
.dialog h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.dialog .knoepfe { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.farbwahl { display: flex; gap: 8px; flex-wrap: wrap; }
.farbwahl button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; }
.farbwahl button.an { border-color: var(--text); box-shadow: 0 0 0 2px var(--flaeche) inset; }
.trenner { height: 1px; background: var(--linie); margin: 2px 0; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 60; max-width: calc(100vw - 32px); }
.toast { padding: 11px 15px; border-radius: 12px; background: var(--flaeche-2); border: 1px solid var(--linie-stark); box-shadow: var(--schatten); font-size: 14px; animation: rein .2s ease; }
.toast.fehler { border-color: var(--kritisch); }
@keyframes rein { from { transform: translateY(8px); opacity: 0; } }
.verbindung { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 50; padding: 6px 14px; border-radius: 20px; background: var(--flaeche-2); border: 1px solid var(--linie-stark); font-size: 13px; color: var(--warn-text); box-shadow: var(--schatten); white-space: nowrap; }
.abdunkeln { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 19; display: none; }

/* ---------- Schmal / Handy ---------- */
@media (max-width: 1080px) {
  .chat, .chat.ohne-mitglieder { grid-template-columns: 252px minmax(0, 1fr); }
  .mitglieder { position: fixed; right: 0; top: 0; bottom: 0; width: min(290px, 86vw); z-index: 20; display: none; box-shadow: var(--schatten); }
  .chat.mitglieder-offen .mitglieder { display: block; }
  .chat.mitglieder-offen .abdunkeln { display: block; }
}
@media (max-width: 760px) {
  .chat, .chat.ohne-mitglieder { grid-template-columns: minmax(0, 1fr); }
  .leiste { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 20; display: none; box-shadow: var(--schatten); }
  .chat.leiste-offen .leiste { display: flex; }
  .chat.leiste-offen .abdunkeln { display: block; }
  .nur-mobil { display: inline-grid !important; }
  .haupt-kopf { padding: 0 6px; gap: 2px; min-height: 56px; }
  .haupt-kopf .thema { display: none; }
  .nachricht { padding: 5px 12px 3px; column-gap: 10px; grid-template-columns: 36px minmax(0, 1fr); }
  .nachricht > .avatar { width: 36px; height: 36px; }
  .nachricht .zeit-links { font-size: 10px; }
  .eingabe-bereich { padding: 0 10px calc(10px + env(safe-area-inset-bottom)); }
  .vorschlaege { left: 10px; right: 10px; }
  .werkzeuge { right: 8px; }
  .tag-trenner, .neu-trenner { margin-left: 12px; margin-right: 12px; }
  .verlauf-anfang { padding: 22px 14px 14px; }
  .antwort-zeile { padding-left: 14px; }
}

/* ---------- Verwaltung ---------- */
.v-rahmen { max-width: 1180px; margin: 0 auto; padding: 24px 16px 60px; display: grid; gap: 18px; }
.v-kopf { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.v-kopf h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.v-kopf .rechts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.hinweis-geheim { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--akzent-weich); color: var(--text-2); font-size: 13.5px; }
.kacheln { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kachel { padding: 14px 16px; border-radius: 14px; background: var(--flaeche); border: 1px solid var(--linie); }
.kachel .zahl { font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kachel .unter { margin-top: 2px; }
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); overflow-x: auto; }
.reiter button { padding: 10px 14px; border: 0; background: none; cursor: pointer; color: var(--text-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter button.an { color: var(--text); border-bottom-color: var(--akzent); }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 16px; overflow: hidden; }
.karte-kopf { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.karte-kopf h2 { margin: 0; font-size: 15px; flex: 1; }
.karte-inhalt { padding: 16px; display: grid; gap: 14px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabelle th { text-align: left; font-size: 12px; color: var(--text-3); font-weight: 600; padding: 10px 16px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.tabelle td { padding: 10px 16px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle .wer { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tabelle .wer b { display: block; font-weight: 600; }
.tabelle .aktionen { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.pille { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; background: var(--flaeche-2); color: var(--text-2); white-space: nowrap; }
.pille.an { color: var(--gut); } .pille.an::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gut); }
.pille.rot { color: var(--kritisch-text); }
.pille.gelb { color: var(--warn-text); }
.pille.akzent { color: var(--akzent-text); background: var(--akzent-weich); }
.formzeile { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.formzeile.drei { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto auto; }
.passwort-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--flaeche-2); border: 1px dashed var(--akzent); flex-wrap: wrap; }
.passwort-box code { font-size: 16px; padding: 4px 9px; letter-spacing: .03em; }
.protokoll > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--linie); font-size: 13.5px; }
.protokoll > div:last-child { border-bottom: 0; }
.mod-liste .nachricht { margin-top: 0; padding: 8px 16px; border-bottom: 1px solid var(--linie); }
.mod-liste .nachricht:last-child { border-bottom: 0; }
.leer { padding: 22px 16px; color: var(--text-3); text-align: center; }
.schalter { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.schalter input { width: 18px; height: 18px; accent-color: var(--akzent); }
.scroll-x { overflow-x: auto; }
@media (max-width: 900px) {
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formzeile, .formzeile.drei { grid-template-columns: minmax(0, 1fr); }
  .protokoll > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tabelle .weg-mobil { display: none; }
  .tabelle th, .tabelle td { padding: 10px 12px; }
}
