/* TKC Chat – modernes Aussehen (CF 04.10.2026: „Chat sieht altbacken aus, mach den auch so schön modern“).
   Liegt ÜBER assets/chat.css (dort bleibt Aufbau und Verhalten). Alle Regeln mit „:root body …“, damit sie die älteren
   „body.dark-mode …“-Regeln sicher überstimmen. Farben nur über die Variablen unten – hell und dunkel (body.dark-mode). */

:root body {
  --m-rot: #8b140d; --m-rot-2: #7a0f2b; --m-pflaume: #5b1747; --m-gold: #e2bd62;
  --m-grund: #f3efea; --m-flaeche: #ffffff; --m-flaeche-2: #f8f5f1; --m-linie: rgba(60, 30, 20, .10); --m-linie-2: rgba(60, 30, 20, .06);
  --m-text: #1f1714; --m-text-2: #4d3f3a; --m-leise: #7d6f69; --m-hover: rgba(139, 20, 13, .06); --m-aktiv: rgba(139, 20, 13, .09);
  --m-blase: #ffffff; --m-blase-text: #1f1714; --m-schatten: 0 1px 2px rgba(40, 20, 12, .06), 0 6px 18px rgba(40, 20, 12, .06);
  --m-ich: linear-gradient(135deg, #a3171d 0%, #8b140d 55%, #6f0f22 100%);
  --m-r: 18px;
  background: var(--m-rot); color: var(--m-text);   /* außen CI-Rot: iOS färbt danach die Statusleiste der Web-App (sonst „Glas“) */
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
}
/* iPhone-Statusleiste (CF 04.10.2026: im Browser ok, als Web-App „Glas“): iOS 26 färbt die Leiste nach dem Seitenhintergrund bzw.
   nach einer oben festklebenden Leiste. Darum Seite außen rot, Inhalt (Chat, Anmeldung) mit eigenem hellen Grund, Kopfleisten sticky. */
html { background: #8b140d; }
:root body .chat-shell { background: var(--m-grund); }   /* Anmeldeseite hat eigenen deckenden Hintergrund */
:root body .chat-list-header, :root body .message-header { position: sticky; top: 0; z-index: 30; }
:root body.dark-mode {
  --m-grund: #121011; --m-flaeche: #1b1819; --m-flaeche-2: #232021; --m-linie: rgba(255, 255, 255, .08); --m-linie-2: rgba(255, 255, 255, .05);
  --m-text: #f2ece8; --m-text-2: #d3c8c3; --m-leise: #a2958f; --m-hover: rgba(255, 255, 255, .05); --m-aktiv: rgba(227, 107, 92, .14);
  --m-blase: #262223; --m-blase-text: #f2ece8; --m-schatten: 0 1px 2px rgba(0, 0, 0, .4);
  --m-ich: linear-gradient(135deg, #9a1a22 0%, #7d1210 60%, #5e0d1c 100%);
}

/* ---------- Gerüst ---------- */
:root body .chat-list-pane { background: var(--m-flaeche); border-right: 1px solid var(--m-linie); }
:root body .message-pane { background: var(--m-grund); }

/* Kopf links: TKC-Rot wie die anderen TKC-Apps */
:root body .chat-list-header {
  background: var(--m-rot); color: #fff; border-bottom: 0;   /* einfarbig wie die Statusleiste darüber – kein Verlauf, sonst sichtbare Kante (CF 04.10.2026) */
  min-height: 72px; padding: 14px 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
:root body .chat-list-header .eyebrow { color: rgba(255, 255, 255, .7); letter-spacing: .12em; }
:root body .chat-list-header h1, :root body .chat-list-header h2 { color: #fff; font-weight: 800; letter-spacing: -.01em; }
:root body .chat-list-header .icon-button {
  width: 38px; height: 38px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none;
  transition: background .15s;
}
:root body .chat-list-header .icon-button:hover { background: rgba(255, 255, 255, .26); }
:root body .chat-list-header .icon-button.active { background: #fff; color: var(--m-rot); }

/* Kopf rechts: hell, deckend (kein Glas-Effekt – CF-Regel fürs iPhone) */
:root body .message-header {
  background: var(--m-flaeche); -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom: 1px solid var(--m-linie); color: var(--m-text); min-height: 72px;
}
:root body .message-header h2 { color: var(--m-text); font-weight: 800; letter-spacing: -.01em; }
:root body .message-header .eyebrow { color: var(--m-leise); }
:root body .message-header .icon-button {
  width: 38px; height: 38px; border: 1px solid var(--m-linie); border-radius: 12px; background: var(--m-flaeche); color: var(--m-text-2); box-shadow: none;
}
:root body .message-header .icon-button:hover { background: var(--m-hover); color: var(--m-rot); }

/* Angemeldet als … */

/* Reiter Gruppen / Personen / Chats / Aufgaben: ruhige Segmente */
:root body .desktop-category-tabs { margin: 6px 14px 4px; padding: 4px; gap: 4px; border-radius: 14px; background: var(--m-flaeche-2); border: 0; }
:root body .desktop-category-tab {
  border: 0; border-radius: 10px; background: transparent; color: var(--m-leise); font-weight: 650; min-height: 52px; box-shadow: none;
}
:root body .desktop-category-tab:hover:not(.active) { background: var(--m-hover); color: var(--m-text); }
:root body .desktop-category-tab.active { background: var(--m-flaeche); color: var(--m-rot); box-shadow: 0 1px 3px rgba(40, 20, 12, .12); }
:root body.dark-mode .desktop-category-tab.active { background: #2c2728; color: #f0a49c; }
:root body .desktop-category-tab .tab-badge { background: var(--m-rot); color: #fff; }

/* ---------- Liste ---------- */
:root body .conversation-list { padding: 4px 8px 12px; background: transparent; }
:root body .conversation-section-title {
  padding: 14px 18px 6px; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--m-leise);
  /* bleibt beim Scrollen oben stehen → fester Hintergrund über die ganze Breite, sonst scheinen die Einträge durch (CF 05.10.2026) */
  background: var(--m-flaeche); border: 0; margin: 0 -8px; z-index: 2;
}
:root body .conversation-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 10px; margin: 1px 0; border: 0 !important; border-radius: 14px;
  background: transparent; color: var(--m-text); text-align: left; box-shadow: none; transition: background .12s;
}
:root body .conversation-item:hover { background: var(--m-hover); }
:root body .conversation-item.active { background: var(--m-aktiv); box-shadow: none; }
:root body .conversation-item.active::before, :root body .conversation-item.active::after { display: none; }
:root body .conv-text { flex: 1; min-width: 0; }
:root body .conversation-title-row { display: flex; align-items: center; gap: 8px; }
:root body .conversation-title-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
:root body .conversation-title { font-weight: 700; font-size: .95rem; color: var(--m-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .conversation-preview { color: var(--m-leise); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
:root body .conv-rechts { display: inline-flex; align-items: center; gap: 6px; flex: none; }
:root body .conv-time { font-size: .72rem; color: var(--m-leise); font-variant-numeric: tabular-nums; }
:root body .conversation-item .badge { background: var(--m-rot) !important; color: #fff; border-radius: 999px; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center; font-size: .7rem; font-weight: 800; }
:root body .conversation-item:has(.badge) .conv-time { color: var(--m-rot); font-weight: 700; }
:root body .conversation-pin { width: 24px; height: 24px; border: 0; background: transparent; color: var(--m-leise); border-radius: 8px; font-size: .8rem; flex: none; }
:root body .conversation-pin.is-pinned { color: var(--m-rot); }
:root body .conversation-pin:hover { background: var(--m-hover); }

/* Kürzel-Symbole */
:root body .conv-avatar, :root body .msg-avatar {
  --a: #8b140d; flex: none; display: grid; place-items: center; border-radius: 50%; font-weight: 800; letter-spacing: .02em;
  background: color-mix(in srgb, var(--a) 15%, var(--m-flaeche)); color: var(--a); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--a) 28%, transparent);
}
:root body.dark-mode .conv-avatar, :root body.dark-mode .msg-avatar { background: color-mix(in srgb, var(--a) 30%, #1b1819); color: color-mix(in srgb, var(--a) 40%, #fff); }
:root body .conv-avatar { width: 44px; height: 44px; font-size: .85rem; }
:root body .msg-avatar { width: 30px; height: 30px; font-size: .68rem; align-self: flex-end; margin-right: 8px; margin-bottom: 2px; }
:root body .msg-avatar.leer { visibility: hidden; }

/* Online-Punkt */
:root body .presence-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px var(--m-flaeche); }

/* ---------- Verlauf ---------- */
:root body .messages { padding: 14px clamp(10px, 3vw, 34px) 18px; background: var(--m-grund); }
:root body .day-sep { display: flex; justify-content: center; margin: 18px 0 10px; position: sticky; top: 4px; z-index: 2; pointer-events: none; }
:root body .day-sep span {
  font-size: .72rem; font-weight: 700; color: var(--m-text-2); background: var(--m-flaeche);
  padding: 4px 12px; border-radius: 999px; box-shadow: 0 1px 2px rgba(40, 20, 12, .1);
}
:root body .message-row { margin: 10px 0 0; align-items: flex-end; }
:root body .message-row.folge { margin-top: 3px; }
:root body .bubble {
  position: relative; max-width: min(640px, 76%); border: 0; border-radius: var(--m-r); padding: 8px 12px 9px;
  background: var(--m-blase); color: var(--m-blase-text); box-shadow: var(--m-schatten);
}
:root body .message-row:not(.own) .bubble { border-bottom-left-radius: 6px; }
:root body .message-row.own .bubble { background: var(--m-ich); color: #fff; border: 0; border-bottom-right-radius: 6px; box-shadow: 0 2px 10px rgba(122, 15, 43, .22); }
:root body .message-row.folge:not(.own) .bubble { border-top-left-radius: 8px; }
:root body .message-row.folge.own .bubble { border-top-right-radius: 8px; }
:root body .message-meta { font-size: .72rem; font-weight: 700; color: var(--m-rot); margin-bottom: 2px; gap: 8px; justify-content: space-between; }
:root body .message-meta > span:last-child { color: var(--m-leise); font-weight: 500; font-variant-numeric: tabular-nums; }
:root body.dark-mode .message-meta { color: #f0a49c; }
:root body .message-row.own .message-meta, :root body .message-row.own .message-meta > span:last-child { color: rgba(255, 255, 255, .78); }
:root body .message-row.own .message-meta > span:first-child { display: none; }   /* „Du“ ist überflüssig */
:root body .message-row.own .message-meta { justify-content: flex-end; }
:root body .message-row.folge .message-meta > span:first-child { display: none; }  /* gleicher Absender kurz danach */
:root body .message-row.folge .message-meta { justify-content: flex-end; }
:root body .message-body { font-size: .95rem; line-height: 1.45; overflow-wrap: anywhere; }
:root body .message-row.own .message-body a { color: #fff; text-decoration: underline; }
:root body .message-row.message-highlight .bubble { box-shadow: 0 0 0 3px var(--m-gold), var(--m-schatten); }

/* Antwort-Zitat, Weitergeleitet, Aufgabe */
:root body .reply-quote {
  border: 0; border-left: 3px solid var(--m-rot); background: var(--m-flaeche-2); color: var(--m-text-2); border-radius: 10px; padding: 6px 10px; margin: 4px 0 6px;
}
:root body .message-row.own .reply-quote { border-left-color: rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .14); color: #fff; }
:root body .forwarded-header { font-size: .74rem; font-style: italic; color: var(--m-leise); }
:root body .message-row.own .forwarded-header { color: rgba(255, 255, 255, .8); }

/* Anhänge */
:root body .attachment img, :root body .attachment video { border-radius: 12px; }
:root body .attachment { border-radius: 12px; overflow: hidden; }

/* Reaktionen: kleine Pillen */
:root body .reaction-chips { margin-top: 6px; gap: 4px; }
:root body .reaction-chip {
  height: 26px; min-width: 0; padding: 0 8px; border: 1px solid var(--m-linie) !important; border-radius: 999px; background: var(--m-flaeche); color: var(--m-text); font-size: .82rem;
}
:root body .reaction-chip.own-reaction { border-color: color-mix(in srgb, var(--m-rot) 45%, transparent) !important; background: var(--m-aktiv); }
:root body .message-row.own .reaction-chip { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .28) !important; color: #fff; }

/* Breitere Blasen am Computer (die schwebende Aktionsleiste gibt es seit 15.10.2026 nicht mehr – Menü über die drei Punkte/Rechtsklick) */
@media (hover: hover) and (min-width: 992px) {
  :root body .message-row.mit-avatar .bubble { max-width: min(640px, 72%); }
  :root body .message-row { padding-top: 6px; }
  :root body .message-row.folge { padding-top: 2px; }
}
:root body .message-action {
  min-width: 30px; height: 30px; padding: 0 7px; border: 0 !important; border-radius: 999px; background: transparent; color: var(--m-text-2);
}
:root body .message-action:hover { background: var(--m-hover); color: var(--m-rot); }
:root body .message-action.danger:hover { color: #dc2626; background: rgba(220, 38, 38, .08); }
:root body .message-row.own .message-action { color: #fff; background: rgba(255, 255, 255, .16); }   /* in der roten Blase (iPad/Handy) hell, sonst unlesbar (CF 04.10.2026) */
:root body .message-row.own .message-action:hover { color: #fff; background: rgba(255, 255, 255, .3); }
@media (hover: hover) and (min-width: 992px) {   /* am Computer: schwebende helle Leiste → wieder dunkle Symbole */
  :root body .message-row.own .message-action { color: var(--m-text-2); background: transparent; }
  :root body .message-row.own .message-action:hover { background: var(--m-hover); color: var(--m-rot); }
}

/* Angeheftet */
:root body .pinned-message-banner {
  margin: 10px clamp(10px, 3vw, 34px) 0; border: 0; border-left: 4px solid var(--m-gold); border-radius: 14px; background: var(--m-flaeche);
  box-shadow: var(--m-schatten); color: var(--m-text);
}
:root body .pinned-message-label { color: #a8862f; letter-spacing: .08em; }
:root body.dark-mode .pinned-message-label { color: var(--m-gold); }

/* Tippt gerade … */
:root body .typing-indicator { color: var(--m-leise); }

/* ---------- Eingabe: schwebende Leiste ---------- */
:root body .composer {
  margin: 0 clamp(8px, 2.4vw, 28px) 12px; padding: 6px; border: 0; border-radius: 26px; background: var(--m-flaeche);
  box-shadow: 0 6px 24px rgba(40, 20, 12, .12), 0 0 0 1px var(--m-linie); color: var(--m-text);
}
:root body .composer .form-control, :root body #messageInput {
  border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--m-text); font-size: .98rem; padding: 9px 6px;
}
:root body .composer .form-control::placeholder { color: var(--m-leise); }
:root body .composer-button, :root body .composer .btn, :root body #attachButton, :root body #voiceButton {
  width: 42px; height: 42px; border-radius: 50% !important; border: 0 !important; background: var(--m-flaeche-2); color: var(--m-text-2); display: inline-grid; place-items: center; flex: none;
}
:root body .composer-button:hover, :root body #attachButton:hover, :root body #voiceButton:hover { background: var(--m-hover); color: var(--m-rot); }
:root body .composer button[type="submit"], :root body .composer .btn-tkc { background: var(--m-ich) !important; color: #fff !important; box-shadow: 0 2px 8px rgba(122, 15, 43, .3); }
:root body .reply-preview, :root body .media-preview, :root body .voice-preview { border-radius: 16px; background: var(--m-flaeche-2); border: 0; }

/* Leerer Zustand */
:root body .empty-state { color: var(--m-leise); }
:root body .empty-state i { color: color-mix(in srgb, var(--m-rot) 45%, transparent); }

/* ---------- Dialoge ---------- */
:root body .modal-content { border: 0; border-radius: 20px; background: var(--m-flaeche); color: var(--m-text); box-shadow: 0 24px 60px rgba(20, 10, 6, .3); }
:root body .modal-header { border-bottom: 1px solid var(--m-linie-2); padding: 16px 20px; }
:root body .modal-footer { border-top: 1px solid var(--m-linie-2); }
:root body .modal-title { font-weight: 800; }
:root body .modal-backdrop.show { opacity: .4; }
:root body .btn-tkc { background: var(--m-ich); border: 0; color: #fff; border-radius: 12px; font-weight: 700; }
:root body .btn-tkc:hover { filter: brightness(1.06); color: #fff; }
:root body .btn-outline-secondary { border-radius: 12px; }

/* ---------- Einstellungen (neu CF 04.10.2026: Karten mit Zeilen, Schalter, Gästeverwaltung) ---------- */
:root body .einst { padding: 14px 12px 28px; display: grid; gap: 14px; color: var(--m-text); }
:root body .einst-kopf { display: flex; align-items: center; gap: 14px; padding: 6px 6px 2px; }
:root body .einst-avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
  color: #fff; background: var(--a, var(--m-rot)); box-shadow: 0 4px 14px rgba(40, 20, 12, .15); }
:root body .einst-avatar.klein { width: 40px; height: 40px; font-size: .85rem; box-shadow: none; }
:root body .einst-kopf-text { min-width: 0; }
:root body .einst-name { font-size: 1.15rem; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .einst-rolle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font-size: .8rem; color: var(--m-leise); }
:root body .einst-pille { padding: 2px 9px; border-radius: 999px; background: var(--m-aktiv); color: var(--m-rot); font-weight: 700; font-size: .72rem; }
:root body.dark-mode .einst-pille { color: #f0a49c; }

:root body .einst-gruppe { display: grid; gap: 6px; }
:root body .einst-titel { margin: 4px 8px 0; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--m-leise); }
:root body .einst-karte { background: var(--m-flaeche-2); border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--m-linie-2); }
:root body .einst-karte-innen { padding: 6px; }
:root body .einst-zeile { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; background: transparent;
  color: var(--m-text); text-align: left; font: inherit; cursor: pointer; position: relative; }
:root body .einst-zeile + .einst-zeile { box-shadow: inset 0 1px 0 var(--m-linie-2); }
:root body button.einst-zeile:hover, :root body label.einst-zeile:hover { background: var(--m-hover); }
:root body .einst-zeile.aus { opacity: .6; }
:root body .einst-symbol { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--m-aktiv); color: var(--m-rot); font-size: 1rem; }
:root body.dark-mode .einst-symbol { color: #f0a49c; }
:root body .einst-zeile-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
:root body .einst-zeile-text b { font-weight: 700; font-size: .93rem; }
:root body .einst-zeile-text small { color: var(--m-leise); font-size: .78rem; line-height: 1.3; }
:root body .einst-pfeil { color: var(--m-leise); font-size: .9rem; }
:root body .einst-gefahr, :root body .einst-gefahr b { color: #b91c1c; }
:root body .einst-gefahr .einst-symbol { background: rgba(185, 28, 28, .1); color: #b91c1c; }
:root body.dark-mode .einst-gefahr, :root body.dark-mode .einst-gefahr b, :root body.dark-mode .einst-gefahr .einst-symbol { color: #f87171; }
/* Schalter (iOS-Art) */
:root body .einst-schalter { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 999px; position: relative;
  background: color-mix(in srgb, var(--m-leise) 40%, transparent); cursor: pointer; transition: background .18s; }
:root body .einst-schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s; }
:root body .einst-schalter:checked { background: #2f9e55; }
:root body .einst-schalter:checked::after { transform: translateX(18px); }
:root body .einst-schalter:disabled { opacity: .45; cursor: default; }
:root body .einst-schalter:focus-visible { outline: 2px solid var(--m-rot); outline-offset: 2px; }
/* Eingaben */

:root body .einst-eingabe { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--m-linie); border-radius: 12px; background: var(--m-flaeche);
  color: var(--m-text); font: inherit; font-size: .95rem; }
:root body textarea.einst-eingabe { resize: vertical; }
:root body .einst-eingabe:focus { outline: none; border-color: color-mix(in srgb, var(--m-rot) 55%, transparent); box-shadow: 0 0 0 3px var(--m-aktiv); }

:root body .einst-chip { border: 1px solid var(--m-linie); background: var(--m-flaeche); color: var(--m-text-2); border-radius: 999px; padding: 6px 12px;
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
:root body .einst-chip:hover { border-color: color-mix(in srgb, var(--m-rot) 35%, transparent); }
:root body .einst-chip.an { background: var(--m-ich); border-color: transparent; color: #fff; }
:root body .einst-chip.klein { padding: 2px 9px; font-size: .74rem; cursor: default; }
/* Segment (Hell | Dunkel, Tage) */
:root body .einst-segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: var(--m-flaeche); box-shadow: 0 0 0 1px var(--m-linie-2); }
:root body .einst-segment > button, :root body .einst-segment > label > span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 0; border-radius: 10px;
  background: transparent; color: var(--m-text-2); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
:root body .einst-segment > label { margin: 0; }
:root body .einst-segment > label > input { position: absolute; opacity: 0; pointer-events: none; }
:root body .einst-segment > button.an, :root body .einst-segment > label > input:checked + span { background: var(--m-ich); color: #fff; box-shadow: 0 2px 8px rgba(122, 15, 43, .25); }
:root body .einst-segment > label > input:focus-visible + span { outline: 2px solid var(--m-rot); outline-offset: 1px; }
:root body .einst-segment-klein > label > span { min-height: 36px; font-size: .84rem; }
/* Knöpfe */
:root body .einst-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 12px;
  background: var(--m-ich); color: #fff; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
:root body .einst-knopf:hover { filter: brightness(1.07); }
:root body .einst-knopf:disabled { opacity: .6; cursor: default; }
:root body .einst-knopf-zweit { background: var(--m-flaeche); color: var(--m-text); box-shadow: 0 0 0 1px var(--m-linie); }
:root body .einst-knopf-breit { width: 100%; }

:root body .einst-knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; }
/* Gäste */
:root body .einst-leiste { display: flex; align-items: center; }
:root body .einst-zurueck { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--m-rot); font: inherit; font-weight: 700; padding: 4px 6px 4px 0; cursor: pointer; }
:root body.dark-mode .einst-zurueck { color: #f0a49c; }
:root body .einst-ueberschrift { margin: 0 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
:root body .einst-hinweis { margin: -6px 4px 0; color: var(--m-leise); font-size: .84rem; line-height: 1.4; }
:root body .einst-laden { padding: 20px; text-align: center; color: var(--m-leise); }
:root body .einst-formular { padding: 14px; display: grid; gap: 8px; }
:root body .einst-formular.zu { padding: 0; background: transparent; box-shadow: none; }
:root body .einst-karte-titel { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; }
:root body .einst-label { margin-top: 6px; font-size: .78rem; font-weight: 700; color: var(--m-text-2); }
:root body .einst-klein { color: var(--m-leise); font-size: .78rem; line-height: 1.35; }
:root body .einst-gruppen-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
:root body .einst-chip-wahl { margin: 0; position: relative; }
:root body .einst-chip-wahl input { position: absolute; opacity: 0; pointer-events: none; }
:root body .einst-chip-wahl span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--m-linie); background: var(--m-flaeche); color: var(--m-text-2);
  border-radius: 999px; padding: 7px 13px; font-size: .84rem; font-weight: 600; cursor: pointer; }
:root body .einst-chip-wahl input:checked + span { background: var(--m-ich); border-color: transparent; color: #fff; }
:root body .einst-chip-wahl input:checked + span::before { content: ""; width: 5px; height: 9px; margin: -3px 1px 0 0; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
:root body .einst-chip-wahl input:focus-visible + span { outline: 2px solid var(--m-rot); outline-offset: 2px; }
:root body .einst-link-karte { padding: 14px; display: grid; gap: 10px; box-shadow: 0 0 0 2px color-mix(in srgb, #2f9e55 55%, transparent); }
:root body .einst-link-kopf { display: flex; align-items: center; gap: 8px; color: #2f7d47; }
:root body.dark-mode .einst-link-kopf { color: #6fd08f; }
:root body .einst-link-feld { font-size: .82rem; color: var(--m-text-2); }
:root body .einst-gast { padding: 12px 12px 8px; display: grid; gap: 10px; }
:root body .einst-gast-kopf { display: flex; align-items: center; gap: 12px; }
:root body .einst-gast-text { flex: 1; min-width: 0; display: grid; }
:root body .einst-gast-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .einst-gast-text small { color: var(--m-leise); font-size: .78rem; }
:root body .einst-marke { flex: none; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; }
:root body .einst-marke.aktiv { background: rgba(47, 158, 85, .14); color: #237a41; }
:root body .einst-marke.warten { background: rgba(226, 189, 98, .22); color: #8a6512; }
:root body .einst-marke.abgelaufen { background: var(--m-hover); color: var(--m-leise); }
:root body.dark-mode .einst-marke.aktiv { color: #6fd08f; }
:root body.dark-mode .einst-marke.warten { color: var(--m-gold); }
:root body .einst-gast-gruppen { display: flex; flex-wrap: wrap; gap: 5px; }
:root body .einst-gast-bearbeiten { display: grid; gap: 10px; padding: 10px; border-radius: 12px; background: var(--m-flaeche); }
:root body .einst-gast-knoepfe { display: flex; gap: 2px; margin: 0 -6px; border-top: 1px solid var(--m-linie-2); padding-top: 6px; }
:root body .einst-gast-knoepfe button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: var(--m-text-2); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
:root body .einst-gast-knoepfe button:hover { background: var(--m-hover); color: var(--m-rot); }
:root body .einst-gast-knoepfe button.gefahr:hover { color: #b91c1c; background: rgba(185, 28, 28, .08); }

/* ---------- Medien im Verlauf wie Telegram (CF 04.10.2026) ---------- */
:root body .medien-raster { display: grid; gap: 3px; border-radius: 14px; overflow: hidden; margin: 2px 0 6px; width: min(340px, 72vw); grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; }
:root body .medien-raster.einzeln { display: block; aspect-ratio: 4 / 3; max-height: 420px; max-width: 100%; }
:root body .medien-raster.einzeln .medien-kachel img, :root body .medien-raster.einzeln .medien-kachel video { object-fit: contain; }   /* nichts abschneiden (CF 14.10.2026) */
:root body .medien-raster.anzahl-3 { grid-template-columns: repeat(2, 1fr); grid-template-rows: 170px 120px; }
:root body .medien-raster.anzahl-3 > :first-child { grid-column: 1 / -1; }
:root body .medien-raster.anzahl-5, :root body .medien-raster.anzahl-6, :root body .medien-raster.anzahl-7, :root body .medien-raster.anzahl-8,
:root body .medien-raster.anzahl-9, :root body .medien-raster.anzahl-10 { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; }
:root body .medien-kachel { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--m-flaeche-2); cursor: zoom-in; overflow: hidden; }
:root body .medien-kachel img, :root body .medien-kachel video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
:root body .medien-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; font-size: 1.3rem; padding-left: 3px; }
:root body .medien-dauer { position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .72rem; font-weight: 700; }
:root body .medien-mehr { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 1.5rem; font-weight: 800; }
:root body .bubble.nur-medien { padding: 4px; }
:root body .bubble.nur-medien .message-meta { padding: 4px 8px 2px; }
:root body .bubble.nur-medien .medien-raster { margin: 0; border-radius: 12px; }
:root body .message-row.own .bubble.nur-medien { background: var(--m-flaeche-2); color: var(--m-text); }
:root body .message-row.own .bubble.nur-medien .message-meta, :root body .message-row.own .bubble.nur-medien .message-meta > span:last-child { color: var(--m-leise); }
/* CF 06.10.2026: Häkchen bei nur Bild/GIF/Video – die Blase ist hier hell, weiße Häkchen (für die rote Blase gedacht) waren unsichtbar */
:root body .message-row.own .bubble.nur-medien .read-receipt { color: var(--m-leise); }
:root body .message-row.own .bubble.nur-medien .read-receipt.is-read { color: #b3261e; }
:root body .message-row.own .bubble.nur-medien .read-receipt.is-read.alle { color: #1a86d0; }
:root body.dark-mode .message-row.own .bubble.nur-medien .read-receipt.is-read { color: #f0a49c; }
:root body.dark-mode .message-row.own .bubble.nur-medien .read-receipt.is-read.alle { color: #7fd3ff; }
/* Datei-Karte */
:root body .datei-karte { display: flex !important; align-items: center; gap: 10px; padding: 8px 10px; margin-top: 6px; border-radius: 12px; text-decoration: none;
  background: rgba(0, 0, 0, .04); color: inherit; max-width: 320px; }
:root body .message-row.own .datei-karte { background: rgba(255, 255, 255, .16); color: #fff; }
:root body .datei-sym { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--m-rot); color: #fff; font-size: 1.1rem; }
:root body .message-row.own .datei-sym { background: rgba(255, 255, 255, .92); color: var(--m-rot); }
:root body .datei-text { min-width: 0; display: grid; }
:root body .datei-text b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .datei-text small { font-size: .74rem; opacity: .75; }
/* Audio-Player */
:root body .audio-spieler { display: flex; align-items: center; gap: 10px; min-width: 230px; max-width: 320px; margin-top: 4px; }
:root body .audio-knopf { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--m-rot); color: #fff; display: grid; place-items: center; font-size: 1.15rem; cursor: pointer; }
:root body .audio-knopf i { margin-left: 2px; }
:root body .audio-spieler.spielt .audio-knopf i { margin-left: 0; }
:root body .message-row.own .audio-knopf { background: #fff; color: var(--m-rot); }
:root body .audio-mitte { flex: 1; min-width: 0; display: grid; gap: 4px; }
:root body .audio-wellen { display: flex; align-items: center; gap: 2px; height: 28px; cursor: pointer; }
:root body .audio-wellen span { flex: 1; min-width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--m-text) 22%, transparent); transition: background .1s; }
:root body .audio-wellen span.an { background: var(--m-rot); }
:root body .message-row.own .audio-wellen span { background: rgba(255, 255, 255, .4); }
:root body .message-row.own .audio-wellen span.an { background: #fff; }
:root body .audio-name { font-size: .85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .audio-leiste { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--m-text) 15%, transparent); cursor: pointer; overflow: hidden; }
:root body .audio-leiste span { display: block; height: 100%; width: 0; background: var(--m-rot); }
:root body .message-row.own .audio-leiste { background: rgba(255, 255, 255, .3); }
:root body .message-row.own .audio-leiste span { background: #fff; }
:root body .audio-zeit { display: flex; align-items: center; gap: 8px; font-size: .74rem; opacity: .8; font-variant-numeric: tabular-nums; }
:root body .audio-tempo { border: 0; border-radius: 999px; padding: 0 7px; font-size: .7rem; font-weight: 800; background: rgba(0, 0, 0, .08); color: inherit; cursor: pointer; }
:root body .message-row.own .audio-tempo { background: rgba(255, 255, 255, .22); }
/* Vollbild-Betrachter */
:root body .betrachter { position: fixed; inset: 0; z-index: 3000; background: #000; display: flex; flex-direction: column; color: #fff; animation: betrachter-ein .15s ease-out; }
@keyframes betrachter-ein { from { opacity: 0; } }
:root body .betrachter-kopf { display: flex; align-items: center; gap: 10px; flex: none; min-height: 64px; box-sizing: border-box; position: relative; z-index: 2;
  padding: calc(12px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) 12px max(14px, env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, rgba(0, 0, 0, .85), rgba(0, 0, 0, .55)); border-bottom: 1px solid rgba(255, 255, 255, .08); }
:root body .betrachter-info { line-height: 1.25; padding: 0 2px; }
:root body .betrachter-info b, :root body .betrachter-info small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root body .betrachter-knopf { flex: none; }
:root body .betrachter-buehne { padding-bottom: env(safe-area-inset-bottom, 0px); }
:root body .betrachter-info { flex: 1; min-width: 0; display: grid; }
:root body .betrachter-info b { font-size: .95rem; } :root body .betrachter-info small { font-size: .76rem; opacity: .75; }
:root body .betrachter-knopf { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; font-size: 1.05rem; cursor: pointer; text-decoration: none; }
:root body .betrachter-buehne { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; }
:root body .betrachter-buehne img, :root body .betrachter-buehne video { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .15s; }
:root body .betrachter-pfeil { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14);
  color: #fff; display: grid; place-items: center; font-size: 1.2rem; cursor: pointer; z-index: 2; }
:root body .betrachter-pfeil.links { left: 12px; } :root body .betrachter-pfeil.rechts { right: 12px; }
@media (hover: none) { :root body .betrachter-pfeil { display: none; } }

/* ---------- Sprachaufnahme wie Telegram (CF 04.10.2026) ---------- */
:root body #sendForm { position: relative; }
:root body .aufnahme-leiste { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 0 8px;
  background: var(--m-flaeche); border-radius: inherit; }
:root body .aufnahme-punkt { width: 10px; height: 10px; border-radius: 50%; background: #e0362c; animation: aufnahme-puls 1s infinite; flex: none; }
@keyframes aufnahme-puls { 50% { opacity: .25; } }
:root body .aufnahme-zeit { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 42px; }
:root body .aufnahme-pegel { flex: 1; min-width: 0; height: 30px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; }
:root body .aufnahme-pegel span { flex: none; width: 3px; border-radius: 2px; background: var(--m-rot); }
:root body .aufnahme-knopf { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--m-hover); color: var(--m-text-2); display: grid; place-items: center; cursor: pointer; }
:root body .aufnahme-knopf.senden { background: var(--m-ich); color: #fff; width: 44px; height: 44px; }

/* ---------- Link-Vorschau wie Telegram (CF 04.10.2026) ---------- */
:root body .link-karte { display: block; margin-top: 6px; max-width: 340px; border-left: 3px solid var(--m-rot); border-radius: 8px; background: rgba(0, 0, 0, .04);
  overflow: hidden; color: inherit; text-decoration: none; }
:root body .link-karte.laedt { height: 0; margin: 0; border: 0; }
:root body .message-row.own .link-karte { background: rgba(255, 255, 255, .14); border-left-color: rgba(255, 255, 255, .85); }
:root body .link-bild { position: relative; display: block; aspect-ratio: 1.91 / 1; background: #1b1516; }
:root body .link-karte.youtube .link-bild { aspect-ratio: 16 / 9; }
:root body .link-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
:root body .link-text { display: grid; gap: 2px; padding: 7px 10px 8px; }
:root body .link-seite { font-size: .72rem; font-weight: 800; color: var(--m-rot); text-transform: none; }
:root body.dark-mode .link-seite { color: #f0a49c; }
:root body .message-row.own .link-seite { color: #fff; opacity: .9; }
:root body .link-text b { font-size: .86rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
:root body .link-beschr { font-size: .78rem; line-height: 1.35; opacity: .8; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* ---------- Reaktionen, Wischen, Umfragen wie Telegram (CF 04.10.2026) ---------- */

:root body .action-sheet-reactions { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
:root body .message-row .bubble { position: relative; will-change: transform; }
:root body .message-row.wischt-genug .bubble { box-shadow: 0 0 0 2px color-mix(in srgb, var(--m-rot) 40%, transparent); }
:root body .herz-blitz { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.4); font-size: 2.6rem; pointer-events: none;
  animation: herz-blitz .65s ease-out forwards; }
@keyframes herz-blitz { 40% { transform: translate(-50%, -50%) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -70%) scale(1); opacity: 0; } }
:root body .umfrage { min-width: min(280px, 66vw); max-width: 340px; display: grid; gap: 8px; margin: 2px 0 4px; }
:root body .umfrage-frage { font-weight: 800; font-size: .98rem; line-height: 1.3; }
:root body .umfrage-art { font-size: .74rem; opacity: .75; margin-top: -4px; }
:root body .umfrage-optionen { display: grid; gap: 6px; }
:root body .umfrage-option { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: 12px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
:root body .umfrage-option:hover { background: color-mix(in srgb, currentColor 7%, transparent); }
:root body .umfrage-kreis { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; opacity: .7; position: relative; }
:root body .umfrage-kreis.eckig { border-radius: 6px; }
:root body .umfrage-option.an .umfrage-kreis { opacity: 1; background: currentColor; }
:root body .umfrage-option.an .umfrage-kreis::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid var(--m-flaeche); border-width: 0 2px 2px 0; transform: rotate(45deg); }
:root body .message-row.own .umfrage-option.an .umfrage-kreis::after { border-color: var(--m-rot); }
:root body .umfrage-ergebnis { display: grid; gap: 3px; }
:root body .umfrage-zeile { display: flex; align-items: baseline; gap: 8px; font-size: .9rem; }
:root body .umfrage-zeile b { min-width: 42px; font-variant-numeric: tabular-nums; }
:root body .umfrage-zeile span { flex: 1; min-width: 0; }
:root body .umfrage-balken { height: 5px; border-radius: 4px; background: color-mix(in srgb, currentColor 14%, transparent); overflow: hidden; }
:root body .umfrage-balken span { display: block; height: 100%; border-radius: 4px; background: currentColor; opacity: .55; }
:root body .umfrage-ergebnis.meine .umfrage-balken span { opacity: 1; }
:root body .umfrage-namen { font-size: .72rem; opacity: .72; }
:root body .umfrage-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
:root body .umfrage-fuss small { flex: 1; opacity: .75; font-size: .76rem; }
:root body .umfrage-knopf { border: 0; border-radius: 10px; padding: 6px 12px; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer;
  background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; }
:root body .umfrage-knopf:disabled { opacity: .45; cursor: default; }
:root body .umfrage-knopf.leise { background: transparent; text-decoration: underline; padding: 6px 4px; }
:root body .umfrage-eingabe { display: flex; gap: 6px; align-items: center; }

/* ---------- PDF wie Telegram ---------- */
:root body .pdf-karte { display: flex; align-items: center; gap: 10px; width: min(320px, 70vw); margin-top: 6px; padding: 8px; border: 0; border-radius: 12px;
  background: rgba(0, 0, 0, .04); color: inherit; text-align: left; font: inherit; cursor: pointer; }
:root body .message-row.own .pdf-karte { background: rgba(255, 255, 255, .16); color: #fff; }
:root body .pdf-vorschau { flex: none; width: 54px; height: 70px; border-radius: 6px; overflow: hidden; background: #fff; display: grid; place-items: center; color: #c0392b; font-size: 1.6rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
:root body .pdf-vorschau img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
:root body .pdf-betrachter { background: #2a2626; }
:root body .pdf-seiten-liste { --zoom: 1; flex: 1; min-height: 0; overflow: auto; padding: 12px; display: block; -webkit-overflow-scrolling: touch; }
:root body .pdf-seite { width: calc(min(900px, 100%) * var(--zoom)); margin: 0 auto 12px; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
:root body .pdf-seite canvas { width: 100%; height: 100%; display: block; }
/* Links in PDFs (CF 16.10.2026): leicht hinterlegt, damit man sieht, dass man tippen kann */
:root body .pdf-seite { position: relative; }
:root body .pdf-links { position: absolute; inset: 0; pointer-events: none; }
:root body .pdf-links a { position: absolute; display: block; pointer-events: auto; border-radius: 3px; background: rgba(13, 110, 253, .10); border-bottom: 2px solid rgba(13, 110, 253, .55); }
:root body .pdf-links a:hover, :root body .pdf-links a:active { background: rgba(13, 110, 253, .22); }
:root body .pdf-fehler { color: #fff; text-align: center; margin-top: 40px; }
:root body .pdf-fehler a { color: #f0a49c; }

/* ---------- Senden wie Telegram: Vorschau mit Kacheln (CF 04.10.2026) ---------- */
:root body .media-preview { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; min-width: 0; max-width: 100%; box-sizing: border-box; }
:root body .media-preview > * { min-width: 0; }
:root body .media-preview-actions { display: flex; justify-content: flex-end; gap: 8px; }
:root body .composer .media-preview-actions .btn, :root body .composer .voice-preview-actions .btn { width: auto; height: auto; min-height: 40px; padding: 8px 18px;
  border-radius: 12px !important; display: inline-flex; font-weight: 700; }
:root body .composer .media-preview-actions .btn-outline-secondary, :root body .composer .voice-preview-actions .btn-outline-secondary { background: var(--m-flaeche); color: var(--m-text); }
:root body .media-preview-thumb.kacheln { width: auto; min-height: 0; background: none; border-radius: 0; overflow-x: auto; overflow-y: hidden;
  display: flex; gap: 8px; padding-bottom: 2px; scrollbar-width: thin; }
:root body .upload-kachel { position: relative; flex: none; width: 86px; height: 86px; border-radius: 12px; overflow: hidden; background: #241916; border: 0; padding: 0; }
:root body .upload-kachel img, :root body .upload-kachel video { width: 100%; height: 100%; object-fit: cover; display: block; }
:root body .kachel-weg { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff;
  display: grid; place-items: center; font-size: .7rem; cursor: pointer; }
:root body .kachel-video { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 1.4rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); pointer-events: none; }
:root body .kachel-datei { display: grid; place-items: center; align-content: center; gap: 4px; height: 100%; padding: 6px; background: var(--m-flaeche); color: var(--m-rot); }
:root body .kachel-datei i { font-size: 1.5rem; }
:root body .kachel-datei small { color: var(--m-text-2); font-size: .66rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }
:root body .kachel-mehr { background: var(--m-flaeche); color: var(--m-rot); border: 2px dashed color-mix(in srgb, var(--m-rot) 35%, transparent); display: grid; place-items: center; font-size: 1.4rem; cursor: pointer; }
:root body .media-verkleinern { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--m-text-2); margin: 0; }
:root body .media-verkleinern input { accent-color: var(--m-rot); width: 16px; height: 16px; }

/* ---------- Fenster (früher To-do-Dialog; Klassen von Passkey-/Umfrage-Fenstern weiter genutzt) ---------- */
:root body .todo-dialog { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 20px;
  background: var(--m-flaeche); color: var(--m-text); box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
:root body .todo-dialog::backdrop { background: rgba(20, 12, 10, .45); }
:root body .todo-form { display: grid; gap: 8px; padding: 18px; }
:root body .todo-knoepfe { justify-content: flex-end; margin-top: 6px; }

/* ---------- Handy ---------- */
@media (max-width: 991.98px) {
  :root body .chat-list-header { min-height: 64px; }
  :root body #settingsButton { display: none; }   /* Handy: Einstellungen gibt es unten als Reiter */
  :root body .bubble { max-width: 84%; }
  :root body .composer { margin: 0 8px 8px; }
  :root body .mobile-tabbar {
    background: var(--m-flaeche); -webkit-backdrop-filter: none; backdrop-filter: none;   /* deckend, kein Glas */
    border-top: 1px solid var(--m-linie); box-shadow: none;
  }
  :root body .mobile-tabbar button, :root body .mobile-tabbar .mobile-tab { color: var(--m-leise); }
  :root body .mobile-tabbar .active, :root body.dark-mode .mobile-tabbar .active { background: var(--m-ich); color: #fff; }
  :root body .mobile-tabbar .active i, :root body .mobile-tabbar .active span { color: #fff; }
}

/* ---------- Anmeldung ---------- */
:root body .login-panel { border: 0; border-radius: 24px; background: var(--m-flaeche); box-shadow: 0 20px 50px rgba(40, 20, 12, .14); }
:root body .login-panel .form-control { border-radius: 14px; }
:root body .pk-oder { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--m-leise); font-size: .8rem; }
:root body .pk-oder::before, :root body .pk-oder::after { content: ""; flex: 1; height: 1px; background: var(--m-linie); }
:root body .pk-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 14px; font-weight: 700; font-size: 1.05rem; white-space: nowrap;
  background: var(--m-flaeche); color: var(--m-rot); border: 1.5px solid color-mix(in srgb, var(--m-rot) 45%, transparent); }
:root body .pk-knopf:hover { background: var(--m-hover); color: var(--m-rot); }
:root body.dark-mode .pk-knopf { color: #f0a49c; }
:root body .pk-zeile { cursor: default; }
:root body .pk-weg { flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--m-leise); display: grid; place-items: center; cursor: pointer; }
:root body .pk-weg:hover { background: rgba(185, 28, 28, .08); color: #b91c1c; }
:root body .einst-zeile:disabled { opacity: .55; cursor: default; }
:root body .einladung-titel { margin: 4px 0 6px; text-align: center; font-size: 1.3rem; font-weight: 800; }
:root body .einladung-text { margin: 0 0 14px; text-align: center; color: var(--m-text-2); font-size: .92rem; line-height: 1.45; }
:root body .einladung-label { margin: 4px 0 -2px; font-size: .78rem; font-weight: 700; color: var(--m-text-2); }
:root body #einladungName { background: var(--m-flaeche-2); color: var(--m-text-2); }
:root body .einladung-zurueck { display: block; margin-top: 14px; text-align: center; color: var(--m-leise); font-size: .85rem; }

/* Einstellungen-Knopf hat in chat.css eigene Farben (per ID) – im roten Kopf wie die anderen weiß */
:root body #settingsButton, :root body.dark-mode #settingsButton { color: #fff; background: rgba(255, 255, 255, .14); border: 0; }
:root body #settingsButton:hover, :root body.dark-mode #settingsButton:hover { color: #fff; background: rgba(255, 255, 255, .26); }

/* Dunkel: Lesbarkeit im Zitat */
:root body.dark-mode .reply-quote strong, :root body.dark-mode .reply-quote span { color: #f0a49c; }
:root body.dark-mode .reply-quote { color: var(--m-text-2); }

/* Hinweis unten (Toast): dunkle Pille, in hell und dunkel gut lesbar */
:root body #statusToast, :root body .toast { background: #241b19 !important; color: #fff !important; border: 0; border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
:root body #statusToast .toast-body, :root body .toast .toast-body { color: #fff; font-weight: 600; }
:root body.dark-mode #statusToast, :root body.dark-mode .toast { background: #f2ece8 !important; color: #1f1714 !important; }
:root body.dark-mode #statusToast .toast-body { color: #1f1714; }

/* Pinnnadel im aktiven Eintrag ohne weißes Kästchen */
:root body .conversation-item .conversation-pin, :root body .conversation-item.active .conversation-pin { background: transparent; border: 0; box-shadow: none; }

/* ---------- Anhang-Menü (CF 05.10.2026: „sieht nicht gut aus“ – Beschriftungen abgeschnitten): 2 Reihen à 4, runde farbige
   Symbole wie bei Telegram, Beschriftung ganz lesbar, keine Trennstriche ---------- */
:root body .attach-menu { width: min(360px, calc(100vw - 24px)); grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 10px;
  border-radius: 18px; border: 1px solid var(--m-linie, rgba(0,0,0,.08)); background: var(--m-flaeche, #fff); box-shadow: 0 18px 50px rgba(49, 24, 18, .18); }
:root body .attach-menu button { min-height: 78px; border: 0 !important; border-radius: 12px; gap: 6px; padding: 8px 2px; background: transparent;
  color: var(--m-text, #241916); font-size: 12px; font-weight: 650; white-space: nowrap; }
:root body .attach-menu button:hover, :root body .attach-menu button:focus-visible { background: var(--m-hover, #fff4f2); color: var(--m-text, #241916); }
:root body .attach-menu button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
:root body .attach-menu i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; color: #fff; }
:root body .attach-menu [data-attach-action="image"] i { background: #3b82f6; }
:root body .attach-menu [data-attach-action="kamera"] i { background: #b3142a; }
:root body .attach-menu [data-attach-action="gif"] i { background: #8b5cf6; }
:root body .attach-menu [data-attach-action="emoji"] i { background: #e0a21b; }
:root body .attach-menu [data-attach-action="pdf"] i { background: #dc2626; }
:root body .attach-menu [data-attach-action="umfrage"] i { background: #16a34a; }
:root body .attach-menu [data-attach-action="file"] i { background: #64748b; }
:root body.dark-mode .attach-menu { background: #201b1a; border-color: rgba(255,255,255,.08); }
:root body.dark-mode .attach-menu button { background: transparent; color: #ece4e1; }
:root body.dark-mode .attach-menu button:hover, :root body.dark-mode .attach-menu button:focus-visible { background: rgba(255,255,255,.06); }

/* ---------- Reaktionen unten wie bei Telegram (CF 05.10.2026: „sollten die nicht unten sein als Auswahl?“) ----------
   Reaktionsknopf und Rechtsklick öffnen das Auswahlblatt: oben die Nachricht, dann eine Reaktionsleiste (eigene markiert),
   darunter die Aktionen. Keine Klapp-Auswahl an der Nachricht mehr. */
:root body .action-sheet { width: min(460px, calc(100% - 20px)); border-radius: 22px; padding: 12px; background: var(--m-flaeche); border-color: var(--m-linie); }
:root body .action-sheet-reactions { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 6px; margin: 0 0 6px;
  border: 0; border-radius: 999px; background: var(--m-flaeche-2); -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
:root body .action-sheet-reactions::-webkit-scrollbar { display: none; }
:root body .action-sheet-reaction { flex: 0 0 44px; height: 44px; display: grid; place-items: center; font-size: 26px; padding: 0; border-radius: 50%;
  scroll-snap-align: start; transition: transform .12s ease, background .12s; cursor: pointer; }
:root body .action-sheet-reaction:hover { background: var(--m-hover); transform: scale(1.15); }
:root body .action-sheet-reaction:active { transform: scale(.92); }
:root body .action-sheet-reaction.an { background: var(--m-aktiv); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--m-rot) 45%, transparent); }
:root body .action-sheet-items { padding: 4px 0 2px; }
/* Kopf über den Aktionen (Route, Idee, Mitteilungen): Titel und Text untereinander, nicht aneinandergeklebt (CF 15.10.2026) */
:root body .action-sheet-vorschau { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 10px; overflow-wrap: anywhere; }
:root body .action-sheet-vorschau b { font-size: 16px; font-weight: 800; color: var(--m-text); line-height: 1.3; }
:root body .action-sheet-vorschau span { font-size: 14px; color: var(--m-leise); line-height: 1.4; }
:root body .action-sheet-vorschau span:empty { display: none; }
:root body .action-sheet-item { padding: 12px; cursor: pointer; }
:root body .action-sheet-item:hover { background: var(--m-hover); }
:root body .action-sheet-cancel { cursor: pointer; }
:root body .message-action.reaction-toggle .bi { font-size: 1rem; }

/* Im Chat-Fenster des Chor-Tools (CF 05.10.2026, ?eingebettet=1): ohne Fußzeile – Platz fürs Gespräch */
:root body.eingebettet .legal-footer { display: none !important; }
/* eingebettet: das Fenster im Chor-Tool trägt schon „TKC Chat“ – hier nur noch eine schmale Leiste mit den Knöpfen */
:root body.eingebettet .chat-list-header { min-height: 0; padding: 8px 12px 0; background: transparent !important; box-shadow: none !important;
  justify-content: flex-end; border: 0; }
:root body.eingebettet .chat-list-header .eyebrow, :root body.eingebettet .chat-list-header h1 { display: none; }
:root body.eingebettet .chat-list-header.leer { display: none; }   /* kein Knopf zu zeigen → gar keine Leiste (CF 05.10.2026: „rotes Chat-Band weg“) */
:root body.eingebettet .chat-list-header .icon-button { background: var(--m-aktiv); color: var(--m-rot); width: 36px; height: 36px; }
:root body.eingebettet .chat-list-header .icon-button:hover { background: var(--m-hover); }
:root body.eingebettet.dark-mode .chat-list-header .icon-button { color: #f0a49c; }
/* Handy-Ansicht im Fenster: „+“ rechts in der Zeile der Überschrift „GRUPPEN“ statt eigener Zeile */
@media (max-width: 991.98px) {
  :root body.eingebettet .chat-list-pane { position: relative; }
  /* CF 07.10.2026: seit die Reiter oben stehen, lag die schwebende Knopfleiste über den Reitern → eigene schmale Zeile darüber */
  :root body.eingebettet .chat-list-header { position: static; display: flex; align-items: center; gap: 6px; padding: 6px 12px 0; }
}

/* Dateien hineinziehen (CF 05.10.2026: „geht Reinziehen am Desktop richtig?“): deutliche Ablage-Fläche wie bei Telegram */
:root body .message-pane { position: relative; }
:root body.file-dragging .message-pane::after { content: "Dateien hier ablegen"; position: absolute; inset: 10px; z-index: 40; display: grid;
  place-items: center; border: 2.5px dashed color-mix(in srgb, var(--m-rot) 55%, transparent); border-radius: 18px; pointer-events: none;
  background: color-mix(in srgb, var(--m-flaeche) 88%, transparent); color: var(--m-rot); font-weight: 800; font-size: 1.15rem;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
:root body.dark-mode.file-dragging .message-pane::after { color: #f0a49c; }
:root body.file-dragging .messages { outline: 0; background: transparent; }

/* ---------- Kopfleiste immer fest (CF 05.10.2026: „in der Web-App ist die Kopfleiste manchmal nicht fest“) ----------
   Ursache: die Seite selbst konnte verrutschen (iPhone schiebt beim Tippen alles hoch, Inhalt unter dem Gerüst).
   Jetzt: Seite steht fest, nur Liste/Gespräch scrollen; Höhe und Lage folgen dem sichtbaren Bereich (--app-h/--app-top aus chat.js). */
html, body { overscroll-behavior: none; }
body:has(.chat-shell:not(.d-none)) { position: fixed; inset: 0; width: 100%; overflow: hidden; }
:root body .chat-shell { height: var(--app-h, 100dvh); transform: translateY(var(--app-top, 0px)); }
@media (max-width: 991.98px) {
  :root body .chat-list-pane, :root body .message-pane, :root body .chat-shell.has-selection .message-pane { height: calc(var(--app-h, 100dvh) - 92px); }
  /* Tastatur offen: Reiterleiste weg, Gespräch nutzt die ganze sichtbare Höhe – Eingabefeld direkt über der Tastatur */
  :root body.tastatur-offen .chat-shell { padding-bottom: 0; }
  :root body.tastatur-offen .chat-list-pane, :root body.tastatur-offen .message-pane,
  :root body.tastatur-offen .chat-shell.has-selection .message-pane { height: var(--app-h, 100dvh); }
  :root body.tastatur-offen .mobile-tabbar { display: none; }
}

/* ---------- Kopfleisten überall gleich hoch (CF 05.10.2026: „mal höher, mal nicht – identisch überall“) ----------
   Liste, Gespräch, Einstellungen, Handy und Rechner: feste 68 px, Inhalt mittig (vorher 64–73 px je nach Inhalt). */
:root body:not(.eingebettet) .chat-list-header, :root body .message-header {
  box-sizing: border-box; height: 68px; min-height: 68px; max-height: 68px; padding-top: 0; padding-bottom: 0;
  display: flex; align-items: center; overflow: hidden;
}
:root body:not(.eingebettet) .chat-list-header h1, :root body .message-header h2 { line-height: 1.15; margin: 0; }
:root body:not(.eingebettet) .chat-list-header .eyebrow, :root body .message-header .eyebrow { line-height: 1.1; margin: 0 0 2px; }

/* ---------- Profilbilder (CF 05.10.2026) ---------- */
:root body .conv-avatar.mit-bild, :root body .msg-avatar.mit-bild, :root body .einst-avatar.mit-bild { padding: 0; overflow: hidden; background: var(--m-flaeche-2); }
:root body .mit-bild > img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
:root body .einst-avatar-knopf { position: relative; flex: none; border: 0; padding: 0; background: none; border-radius: 50%; cursor: pointer; }
:root body .einst-avatar-knopf:focus-visible { outline: 3px solid color-mix(in srgb, var(--m-rot) 50%, transparent); outline-offset: 2px; }
:root body .einst-avatar-stift { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--m-rot); color: #fff; font-size: .72rem; box-shadow: 0 0 0 2px var(--m-flaeche); }
:root body .einst-avatar-aktionen { display: flex; gap: 12px; margin-top: 2px; }
:root body .einst-link { border: 0; background: none; padding: 0; font: inherit; font-size: .8rem; font-weight: 700; color: var(--m-rot); cursor: pointer; }
:root body.dark-mode .einst-link { color: #f0a49c; }
:root body .einst-link.gefahr { color: var(--m-leise); }

/* Datenspeicher (Admin, CF 05.10.2026) */
:root body .einst-wert { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--m-text-2, inherit); opacity: .8; }
:root body .einst-speicher .einst-zeile.aus { opacity: .45; pointer-events: none; }
:root body .einst-speicher .bi-check-circle { color: #2e9d57; } :root body .einst-speicher .bi-exclamation-triangle { color: #d08a00; }
/* vorläufig gezeigte Bilder/GIFs (werden noch hochgeladen): nur leicht blass, Uhr-Symbol statt Häkchen (CF 06.10.2026) */
:root body .message-row.pending .bubble.nur-medien { opacity: .85; }

/* ---------- Reiter oben (CF 06.10.2026: „überall oben unter der Kopfleiste, fixiert – die Leute sind gewohnt, dass unten nichts ist“) ----------
   Die Reiterleiste steht jetzt in der Chat-Liste direkt unter der Kopfleiste (nur die Liste darunter scrollt). Unten ist frei. */
@media (max-width: 991.98px) {
  :root body .chat-shell { padding-bottom: 0; }
  :root body .chat-list-pane, :root body .message-pane, :root body .chat-shell.has-selection .message-pane { height: var(--app-h, 100dvh); }
  :root body .mobile-tabbar {
    position: static; inset: auto; height: auto; flex: none; z-index: auto;
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
    margin: 6px 12px 6px; padding: 4px; border: 0; border-radius: 14px; box-shadow: none;
    background: var(--m-flaeche-2);
  }
  :root body .mobile-tabbar .mobile-tab { min-height: 48px; border-radius: 11px; }
  :root body #settingsButton { display: inline-grid; place-items: center; }   /* Einstellungen oben rechts statt eigener Reiter – mittig wie die anderen Knöpfe */
}
/* Glocke neben dem Zahnrad (CF 06.10.2026): Push schnell an/aus – an = goldene Glocke */
:root body #pushButton, :root body.dark-mode #pushButton { color: #fff; background: rgba(255, 255, 255, .14); border: 0; }
:root body #pushButton:hover { background: rgba(255, 255, 255, .26); }
:root body #pushButton.active { color: #f6dc93; }
:root body.eingebettet #pushButton { display: none !important; }   /* im Chor-Tool-Fenster gibt es dafür die Glocke des Chor-Tools */
/* Datenschutz/Impressum nur noch in den Einstellungen (nicht mehr unter den Chats) */
:root body .einst-version { margin: 16px 0 0; text-align: center; font-size: 12px; color: var(--m-leise); font-variant-numeric: tabular-nums; }   /* CF 14.10.2026 */
:root body .einst-version a { color: var(--m-rot); font-weight: 700; }
:root body .einst-version + .einst-rechtliches { margin-top: 4px; }
:root body .einst-rechtliches { margin: 14px 0 6px; text-align: center; font-size: 12px; color: var(--m-leise); }
:root body .einst-rechtliches a { color: var(--m-leise); text-decoration: underline; }

/* Eingabe höher (CF 06.10.2026: „iPhone ist unten abgerundet“): als App vom Home-Bildschirm unten Platz für die Rundung/den
   Home-Strich lassen. Ohne viewport-fit=cover meldet iOS keinen safe-area-Abstand – darum fester Wert. Tastatur offen: kein Abstand. */
@media (pointer: coarse) {
  html.als-app body .composer { margin-bottom: 30px; }
  html.als-app body.tastatur-offen .composer { margin-bottom: 8px; }
}
/* iPhone zoomt beim Antippen in Felder mit Schrift unter 16 px – darum auf Touch-Geräten mindestens 16 px (CF 06.10.2026) */
@media (pointer: coarse) {
  :root body input, :root body textarea, :root body select, :root body #messageInput, :root body .composer .form-control { font-size: max(16px, 1em); }
}

/* Antwort-/Weiterleitungs-Vorschau (CF 06.10.2026: „Text läuft raus“): Textblock darf schrumpfen, Inhalt auf höchstens zwei
   Zeilen mit „…“ – nichts ragt mehr über das Eingabefeld hinaus, das X bleibt sichtbar. Gleiches für Zitate in den Sprechblasen. */
:root body .composer { min-width: 0; max-width: 100%; box-sizing: border-box; }
:root body .reply-preview { min-width: 0; max-width: 100%; box-sizing: border-box; }
:root body .reply-preview > div:first-child { flex: 1 1 auto; min-width: 0; }
:root body .reply-preview-sender { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .reply-preview-body, :root body .reply-quote strong {
  white-space: normal; overflow: hidden; text-overflow: ellipsis; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
:root body .reply-quote { grid-template-columns: minmax(0, 1fr); max-width: 100%; min-width: 0; box-sizing: border-box; }
:root body .reply-quote span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .forwarded-header { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* Eigene Rückfrage-/Eingabefenster (CF 06.10.2026, statt Browser-Popups) */
.cf-huelle { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(20, 12, 10, .45); opacity: 0; transition: opacity .16s ease; }
.cf-huelle.offen { opacity: 1; }
.cf-fenster { width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--m-flaeche, #fff); color: var(--m-text, #1f1714);
  border-radius: 20px; padding: 20px 20px 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); transform: translateY(8px) scale(.98); transition: transform .16s ease; }
.cf-huelle.offen .cf-fenster { transform: none; }
.cf-titel { margin: 0 0 6px; font-size: 17px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.cf-text { margin: 0 0 4px; color: var(--m-text-2, #4d3f3a); font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.cf-feld { margin-top: 10px; }
.cf-eingabe { width: 100%; box-sizing: border-box; border: 1px solid var(--m-linie, rgba(60,30,20,.12)); border-radius: 14px; padding: 10px 12px;
  font: inherit; font-size: 16px; line-height: 1.4; background: var(--m-flaeche-2, #f8f5f1); color: var(--m-text, #1f1714); resize: vertical; outline: none; }
.cf-eingabe:focus { border-color: var(--m-rot, #8b140d); box-shadow: 0 0 0 3px rgba(139, 20, 13, .12); }
.cf-knoepfe { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.cf-knoepfe button { border: 0; border-radius: 12px; padding: 10px 16px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; min-height: 42px; }
.cf-nein { background: var(--m-flaeche-2, #f3efea); color: var(--m-text, #1f1714); }
.cf-ja { background: var(--m-rot, #8b140d); color: #fff; }
.cf-ja.gefahr { background: #c0262d; }
.cf-knoepfe button:focus-visible { outline: 3px solid #f6dc93; outline-offset: 2px; }
@media (max-width: 560px) {
  .cf-huelle { align-items: flex-end; padding: 0; }
  .cf-fenster { width: 100%; border-radius: 20px 20px 0 0; padding-bottom: 28px; transform: translateY(24px); }
  .cf-knoepfe button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .cf-huelle, .cf-fenster { transition: none; } }

/* Bot-Knöpfe in TKC-Farben (CF 06.10.2026: „Drucken“ war Bootstrap-Blau) */
:root body .bot-action-row .btn-primary { background: var(--m-rot, #8b140d); border-color: var(--m-rot, #8b140d); color: #fff; }
:root body .bot-action-row .btn-primary:hover { filter: brightness(1.08); }

/* Druckerstatus-Streifen in „Drucken“ (CF 06.10.2026) */
.druck-status { display: flex; align-items: center; gap: 8px; margin: 8px 12px 0; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  line-height: 1.35; background: var(--m-flaeche-2, #f8f5f1); color: var(--m-text, #1f1714); flex: none; }
.druck-status .bi { opacity: .75; }
.druck-status-text { min-width: 0; overflow-wrap: anywhere; }
.druck-status-punkt { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #9ca3af; }
.druck-status.stufe-gruen .druck-status-punkt { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.druck-status.stufe-gelb { background: #fef6e0; color: #7a4a00; }
.druck-status.stufe-gelb .druck-status-punkt { background: #e8a200; animation: druckPuls 1.6s ease-in-out infinite; }
.druck-status.stufe-orange { background: #fff0e6; color: #9a3412; }
.druck-status.stufe-orange .druck-status-punkt { background: #ea580c; }
.druck-status.stufe-rot { background: #fdecec; color: #991b1b; }
.druck-status.stufe-rot .druck-status-punkt { background: #dc2626; }
body.dark-mode .druck-status.stufe-gelb { background: rgba(232, 162, 0, .14); color: #f5d38a; }
body.dark-mode .druck-status.stufe-orange { background: rgba(234, 88, 12, .16); color: #fdba8c; }
body.dark-mode .druck-status.stufe-rot { background: rgba(220, 38, 38, .16); color: #fca5a5; }
@keyframes druckPuls { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .druck-status-punkt { animation: none !important; } }

/* Nur EIN Echtzeit-Punkt (CF 06.10.2026: „2 grüne Punkte auf dem iPad“): sind Liste und Gespräch nebeneinander, bleibt der in der
   Kopfleiste der Liste; am Handy (eine Spalte) zeigt das offene Gespräch seinen eigenen. */
@media (min-width: 992px) { :root body .message-header .echtzeit-punkt { display: none; } }

/* Profilbild-Editor (CF 06.10.2026) */
.av-editor { width: min(380px, 100%); }
.av-buehne { position: relative; width: min(300px, 76vw); aspect-ratio: 1; margin: 12px auto 6px; border-radius: 14px; overflow: hidden;
  background: #fff; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.av-buehne:active { cursor: grabbing; }
.av-buehne canvas { display: block; width: 100%; height: 100%; }
.av-maske { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 999px rgba(20, 12, 10, .45); outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -2px; }
.av-regler { display: flex; align-items: center; gap: 10px; margin: 8px 4px 0; color: var(--m-leise, #7d6f69); font-weight: 700; }
.av-regler input[type=range] { flex: 1; accent-color: var(--m-rot, #8b140d); }
.av-drehen { border: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--m-flaeche-2, #f3efea); color: var(--m-text, #1f1714); display: grid; place-items: center; cursor: pointer; }

/* eingebettet (ohne rote Kopfleiste): Zahnrad wie die anderen Knöpfe dort – sonst weiß auf weiß (CF 07.10.2026) */
:root body.eingebettet #settingsButton { background: var(--m-aktiv); color: var(--m-rot); }
:root body.eingebettet #settingsButton:hover { background: var(--m-hover); }
:root body.eingebettet.dark-mode #settingsButton { color: #f0a49c; }
/* Zahnrad hervorgehoben, solange die Einstellungen offen sind (Umschalter, CF 07.10.2026) */
:root body #settingsButton.active { background: #fff; color: var(--m-rot); }
:root body.eingebettet #settingsButton.active { background: var(--m-rot); color: #fff; }

/* Gruppen verwalten (Admin, CF 07.10.2026): Symbol statt Profilbild */
:root body .einst-gruppen-symbol { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--tkc-rot, #8b0000) 12%, transparent); color: var(--tkc-rot, #8b0000); font-size: 1.05rem; }
body.dark-mode .einst-gruppen-symbol { background: rgba(255, 255, 255, .1); color: #ffb4b4; }

/* ---------- Projekt-Räume (CF 08.10.2026): Reiter „Projekte“ ----------
   Kopf mit Umschalter Aktuell/Geplant/Archiv + Suche (klebt oben), Zeilen mit Kalenderblatt (Farbe = Status), Status-Marke rechts. */
:root body .pj { display: flex; flex-direction: column; min-height: 100%; }
:root body .pj-kopf { position: sticky; top: 0; z-index: 5; padding: 8px 12px 10px; background: var(--m-flaeche); border-bottom: 1px solid var(--m-linie-2); }
:root body .pj-umschalter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 12px; background: var(--m-flaeche-2); }
:root body .pj-umschalter button { position: relative; border: 0; background: transparent; color: var(--m-leise); font-weight: 650; font-size: 14px; min-height: 36px; border-radius: 9px; padding: 0 6px; white-space: nowrap; }
:root body .pj-umschalter button small { font-size: 12px; font-weight: 600; opacity: .65; }
:root body .pj-umschalter button.an { background: var(--m-flaeche); color: var(--m-text); box-shadow: 0 1px 3px rgba(40, 20, 12, .12); }
:root body.dark-mode .pj-umschalter button.an { background: #3a3435; color: #fff; box-shadow: none; }
:root body .pj-punkt { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #dc2626; margin-left: 5px; vertical-align: 2px; }
:root body .pj-suche { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 0 12px; height: 40px; border-radius: 11px; background: var(--m-flaeche-2); color: var(--m-leise); cursor: text; }
:root body .pj-suche input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--m-text); font-size: 16px; }
:root body .pj-suche input::placeholder { color: var(--m-leise); }
:root body .pj-inhalt { flex: 1; }

:root body .pj-zeile { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--m-linie-2);
  background: transparent; color: var(--m-text); text-align: left; cursor: pointer; transition: background .12s; }
:root body .pj-zeile:hover { background: var(--m-hover); }
:root body .pj-zeile.active { background: var(--m-aktiv); }
:root body .pj-blatt { flex: none; width: 48px; display: flex; flex-direction: column; align-items: center; overflow: hidden; border-radius: 12px;
  background: var(--m-flaeche); border: 1px solid var(--m-linie); box-shadow: 0 1px 2px rgba(40, 20, 12, .06); }
:root body .pj-blatt small { align-self: stretch; text-align: center; font-size: 10px; font-weight: 800; letter-spacing: .06em; line-height: 1; padding: 4px 0 3px; color: #fff; background: var(--m-rot); }
:root body .pj-blatt b { font-size: 19px; font-weight: 800; line-height: 1.1; padding: 3px 0 2px; color: var(--m-text); font-variant-numeric: tabular-nums; }
:root body .pj-blatt em { font-style: normal; font-size: 10px; font-weight: 700; line-height: 1; padding: 0 0 4px; color: var(--m-leise); }
:root body .pj-blatt.st-anfrage small { background: #d97706; }
:root body .pj-blatt.st-angebot small { background: #2563eb; }
:root body.dark-mode .pj-blatt { background: #262223; }
:root body .pj-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
:root body .pj-reihe { display: flex; align-items: center; gap: 8px; min-width: 0; }
:root body .pj-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
:root body .pj-zeit { flex: none; font-size: 12px; color: var(--m-leise); align-self: flex-start; padding-top: 2px; }
:root body .pj-info { font-size: 13px; color: var(--m-leise); }
:root body .pj-ort, :root body .pj-letzte > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .pj-letzte { font-size: 13px; color: var(--m-text-2); }
:root body .pj-zeile.neu .pj-letzte { color: var(--m-text); font-weight: 600; }
:root body .pj-status { flex: none; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
:root body .pj-status.st-anfrage { background: rgba(217, 119, 6, .14); color: #b45309; }
:root body .pj-status.st-angebot { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
:root body .pj-status.st-fest { background: rgba(22, 163, 74, .12); color: #15803d; }
:root body.dark-mode .pj-status.st-anfrage { background: rgba(251, 191, 36, .16); color: #fbbf24; }
:root body.dark-mode .pj-status.st-angebot { background: rgba(147, 197, 253, .16); color: #93c5fd; }
:root body.dark-mode .pj-status.st-fest { background: rgba(134, 239, 172, .14); color: #86efac; }
:root body .pj-jahr { width: 100%; display: flex; align-items: center; gap: 8px; border: 0; padding: 9px 16px; background: var(--m-flaeche-2); color: var(--m-text-2);
  font-size: 13px; font-weight: 800; letter-spacing: .02em; text-align: left; cursor: default; border-bottom: 1px solid var(--m-linie-2); }
:root body .pj-jahr.klappbar { cursor: pointer; }
:root body .pj-jahr small { font-size: 12px; font-weight: 500; color: var(--m-leise); }
:root body .pj-jahr i { margin-left: auto; transition: transform .15s; color: var(--m-leise); }
:root body .pj-jahr.zu i { transform: rotate(-90deg); }
:root body .pj-abschnitt { padding: 12px 16px 4px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--m-leise); }
:root body .pj-leer { padding: 32px 22px; text-align: center; color: var(--m-leise); font-size: 14px; line-height: 1.55; }
/* Kopfzeile im Raum: Datum · Ort · Status · Chor-Tool */
:root body .pj-kopfzeile { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
:root body .pj-kopfzeile .pj-status { font-size: 10px; padding: 3px 7px; }
:root body .pj-chortool { color: inherit; opacity: .8; text-decoration: none; font-weight: 600; }
:root body .pj-chortool:hover { opacity: 1; text-decoration: underline; }
:root body .einst-pr-avatar { width: 34px; height: 34px; min-width: 34px; font-size: 12px; margin-right: 2px; }
@media (max-width: 420px) {
  :root body .pj-umschalter button { font-size: 13px; }
  :root body .pj-zeile { padding: 10px 12px; gap: 10px; }
  :root body .pj-chortool { display: none; }   /* am schmalen Handy reicht Datum · Ort · Status */
}

/* ---------- Neue Version (CF 08.10.2026, wie Mein TKC) ---------- */
:root body .neue-version { position: fixed; z-index: 1200; left: 50%; transform: translateX(-50%);
  bottom: calc(96px + env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  border: 0; border-radius: 999px; padding: 11px 18px; background: #1f2937; color: #fff; font: inherit; font-size: 14px; font-weight: 700;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28); cursor: pointer; animation: neueVersionRein .35s ease-out; }
:root body .neue-version i { font-size: 16px; }
:root body.dark-mode .neue-version { background: #f2ece8; color: #1f1714; }
@keyframes neueVersionRein { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Mitglieder einer Gruppe (CF 08.10.2026): Tipp auf den Gruppennamen ---------- */
:root body .kopf-mitglieder { cursor: pointer; border-radius: 10px; }
:root body .kopf-mitglieder:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
:root body .mg-fenster { max-width: 440px; width: calc(100vw - 32px); padding: 0; display: flex; flex-direction: column; max-height: min(78vh, 680px); overflow: hidden; }
:root body .mg-kopf { display: flex; align-items: flex-start; gap: 10px; padding: 18px 18px 12px; border-bottom: 1px solid var(--m-linie-2); }
:root body .mg-kopf > div { flex: 1; min-width: 0; }
:root body .mg-kopf .cf-titel { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .mg-kopf small { color: var(--m-leise); font-size: 13px; }
:root body .mg-zu { flex: none; width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--m-flaeche-2); color: var(--m-text-2); display: grid; place-items: center; }
:root body .mg-liste { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 10px; }
:root body .mg-abschnitt { padding: 12px 18px 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--m-leise); }
:root body .mg-zeile { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 18px; border: 0; background: transparent; color: var(--m-text); text-align: left; }
:root body button.mg-zeile { cursor: pointer; }
:root body button.mg-zeile:hover { background: var(--m-hover); }
:root body .mg-avatar { width: 38px; height: 38px; min-width: 38px; font-size: 13px; }
:root body .mg-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
:root body .mg-name b { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .mg-name small { font-size: 12px; color: #2f9e55; display: flex; align-items: center; gap: 5px; }
:root body .mg-name small:empty { display: none; }
:root body .mg-pfeil { color: var(--m-leise); font-size: 16px; }
/* Personen: Umschalter Mitarbeiter | Männerchor (CF 08.10.2026) */
:root body .pj-umschalter.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:root body .pj-umschalter.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* Mitarbeiter | Männerchor | Jungmänner */
:root body .personen-kopf { margin-bottom: 2px; }

/* ---------- Drei Punkte unten rechts in jeder Nachricht (CF 08.10.2026, deutlicher) ----------
   Schwebt rechts hinter der letzten Textzeile (wie die Uhrzeit bei WhatsApp); ohne Text eigene kleine Zeile. */
:root body .mehr-knopf { float: right; display: inline-grid; place-items: center; width: 34px; height: 26px; margin: 2px -6px -4px 10px; padding: 0;
  border: 0; border-radius: 13px; background: rgba(0, 0, 0, .1); color: inherit; opacity: 1; cursor: pointer; line-height: 1; }
:root body .mehr-knopf i { font-size: 22px; }   /* CF 14.10.2026: größer und deutlicher – Punkte kräftiger */
:root body .mehr-knopf svg circle { stroke: currentColor; stroke-width: 1.1px; }
:root body .mehr-knopf:hover, :root body .mehr-knopf:focus-visible { background: rgba(0, 0, 0, .18); }
:root body .message-row.own .mehr-knopf { background: rgba(255, 255, 255, .24); }
:root body .message-row.own .mehr-knopf:hover { background: rgba(255, 255, 255, .36); }
:root body.dark-mode .mehr-knopf { background: rgba(255, 255, 255, .16); }
:root body .message-body::after { content: ""; display: table; clear: both; }
:root body .mehr-zeile { display: flex; justify-content: flex-end; margin: 2px -6px -4px 0; }
:root body .mehr-zeile .mehr-knopf { float: none; margin: 0; }
:root body .bubble.nur-medien .mehr-zeile { margin: 4px 2px 2px; }
@media (hover: hover) and (pointer: fine) {   /* Computer: dezenter, beim Darüberfahren deutlich */
  :root body .mehr-knopf { opacity: .7; }
  :root body .message-row:hover .mehr-knopf { opacity: 1; }
}
/* Text in Nachrichten am Handy wieder markierbar (vorher alles gesperrt wegen des Lang-Druck-Menüs) */
:root body .messages .message-body,
:root body .messages .message-body *,
:root body .messages .umfrage-frage {
  -webkit-user-select: text; user-select: text; -webkit-touch-callout: default;
}
/* Gruppenbild im Mitglieder-Fenster (CF 08.10.2026) */
:root body .mg-kopf { align-items: center; }
:root body .mg-bild { position: relative; flex: none; }
:root body .mg-bild.aenderbar { cursor: pointer; }
:root body .mg-gruppenbild { width: 64px; height: 64px; min-width: 64px; font-size: 20px; }
:root body .mg-kamera { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--m-rot); color: #fff; border: 2px solid var(--m-flaeche); font-size: 12px; }
:root body .mg-bild-knoepfe { display: flex; gap: 12px; margin-top: 4px; }
:root body .mg-bild-knoepfe:empty { display: none; }
:root body .mg-bild-knoepfe .einst-link { font-size: 13px; }
:root body .mg-kopf > .mg-bild { flex: none; width: 64px; height: 64px; }
:root body .mg-kopf small { display: block; }
:root body .mg-bild-knoepfe .einst-link { white-space: nowrap; }
:root body .group-editor-grid.nur-admins { grid-template-columns: 1fr; }

/* ---------- Rechte (CF 08.10.2026): je Person Schalter-Chips ---------- */
:root body .rechte-erklaerung summary { cursor: pointer; font-weight: 700; padding: 12px 14px; }
:root body .rechte-erklaerung .rechte-zeile { display: flex; flex-direction: column; padding: 8px 14px; border-top: 1px solid var(--m-linie-2); }
:root body .rechte-erklaerung .rechte-zeile small { color: var(--m-leise); }
:root body .rechte-suche { margin: 10px 0 12px; }
:root body .rechte-person { padding: 12px 14px; }
:root body .rechte-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
:root body .rechte-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
:root body .rechte-name b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root body .rechte-name small { color: var(--m-leise); font-size: 12px; }
:root body .rechte-schalter { display: flex; flex-wrap: wrap; gap: 6px; }
:root body .rechte-chip { position: relative; cursor: pointer; margin: 0; }
:root body .rechte-chip input { position: absolute; opacity: 0; pointer-events: none; }
:root body .rechte-chip span { display: inline-block; padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--m-linie); background: var(--m-flaeche-2); color: var(--m-text-2); }
:root body .rechte-chip.an span { background: var(--m-rot); border-color: var(--m-rot); color: #fff; }
:root body .rechte-chip.gesperrt { cursor: not-allowed; opacity: .75; }
:root body .rechte-chip input:focus-visible + span { outline: 2px solid var(--m-rot); outline-offset: 2px; }

/* Zurück wischen am Handy (CF 08.10.2026): Gespräch folgt dem Finger, mit Schatten an der linken Kante */
:root body .message-pane.wischt-zurueck { transition: none !important; box-shadow: -10px 0 24px rgba(0,0,0,.18); will-change: transform; user-select: none; -webkit-user-select: none; }

/* Lese-Fenster am Haken (CF 08.10.2026): kompakt, direkt beim Haken; Haken mit größerer Tippfläche */
:root body .message-row.own .read-receipt { padding: 6px 5px; margin: -6px -5px -6px -1px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:root body .lese-fenster { position: fixed; z-index: 2500; min-width: 190px; max-width: min(280px, calc(100vw - 16px)); max-height: min(60vh, 360px); overflow-y: auto;
  background: var(--m-flaeche); color: var(--m-text); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.22), 0 0 0 1px var(--m-linie-2);
  padding: 8px 4px 6px; font-size: .84rem; animation: lf-ein .12s ease-out; }
@keyframes lf-ein { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
:root body .lese-fenster .lf-kopf { padding: 0 10px 5px; font-size: .74rem; font-weight: 700; color: var(--m-leise); text-transform: uppercase; letter-spacing: .03em; }
:root body .lese-fenster .lf-kopf b { color: var(--m-text); }
:root body .lese-fenster .lf-unter { padding: 6px 10px 3px; margin-top: 3px; border-top: 1px solid var(--m-linie-2); font-size: .7rem; font-weight: 700; color: var(--m-leise); text-transform: uppercase; letter-spacing: .03em; }
:root body .lese-fenster .lf-zeile { display: flex; align-items: center; gap: 7px; padding: 3px 10px; line-height: 1.25; }
:root body .lese-fenster .lf-haken { flex: none; display: inline-flex; color: #1a86d0; }
:root body .lese-fenster .lf-zeile.offen .lf-haken { color: var(--m-leise); }
:root body .lese-fenster .lf-zeile.offen .lf-name { color: var(--m-leise); }
:root body .lese-fenster .lf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
:root body .lese-fenster .lf-zeit { flex: none; font-size: .74rem; color: var(--m-leise); font-variant-numeric: tabular-nums; }
:root body.dark-mode .lese-fenster .lf-haken { color: #7fd3ff; }

/* ═════ Eingabe wie Telegram (CF 08.10.2026, Bild aus Telegram): Leiste selbst durchsichtig, drei eigene Teile –
   runder Anhang-Knopf · Eingabe-Pille (mit GIF-Knopf) · runder Mikrofon-/Senden-Knopf. Etwas höher, ruhiger. ═════ */
:root body .composer { background: transparent; box-shadow: none; border: 0; padding: 4px 0 0; gap: 8px; align-items: flex-end; border-radius: 0; }
:root body .composer #attachButton, :root body .composer #voiceButton, :root body .composer .send-button {
  width: 48px; height: 48px; flex: none; background: var(--m-flaeche); color: var(--m-text-2);
  box-shadow: 0 2px 10px rgba(40, 20, 12, .10), 0 0 0 1px var(--m-linie); font-size: 1.3rem; }
:root body .composer .send-button { background: var(--m-ich) !important; color: #fff !important; font-size: 1.1rem; box-shadow: 0 3px 10px rgba(122, 15, 43, .3); }
:root body .composer:not(.hat-text) .send-button { display: none !important; }
:root body .composer.hat-text #voiceButton { display: none !important; }
:root body .eingabe-pille { flex: 1 1 0; min-width: 0; display: flex; align-items: center; min-height: 48px; border-radius: 24px; padding: 0 16px 0 18px;
  background: var(--m-flaeche); box-shadow: 0 2px 10px rgba(40, 20, 12, .10), 0 0 0 1px var(--m-linie); }
:root body .eingabe-pille #messageInput { flex: 1 1 auto; min-width: 0; box-sizing: border-box; display: block; margin: 0; min-height: 0; height: 48px;
  padding: 13px 0 !important; line-height: 22px; resize: none; max-height: 150px; overflow-y: hidden; scrollbar-width: none; -webkit-appearance: none; appearance: none; }

:root body .composer .aufnahme-leiste { border-radius: 24px; box-shadow: 0 2px 10px rgba(40, 20, 12, .10), 0 0 0 1px var(--m-linie); }
/* Felder über der Eingabe (Antwort, Vorschau, Hochladen …) brauchen jetzt selbst einen Grund */
:root body .composer > .reply-preview, :root body .composer > .media-preview, :root body .composer > .voice-preview,
:root body .composer > .upload-progress-panel, :root body .composer > .typing-indicator:not(.d-none) {
  background: var(--m-flaeche); box-shadow: 0 2px 10px rgba(40, 20, 12, .08), 0 0 0 1px var(--m-linie); }
:root body .composer > .typing-indicator:not(.d-none) { border-radius: 14px; padding: 4px 10px; align-self: flex-start; }
:root body .composer { margin: 0 clamp(10px, 2.4vw, 28px) 16px; }
@media (max-width: 991.98px) { :root body .composer { margin: 0 10px 12px; } }
@media (pointer: coarse) {
  html.als-app body .composer { margin-bottom: 30px; }
  html.als-app body.tastatur-offen .composer { margin-bottom: 8px; }
}

/* ═════ @Erwähnen ═════ */
:root body .erwaehn-menu { max-height: 290px; overflow-y: auto; }
:root body .erwaehn-item { display: flex; align-items: center; gap: 10px; }
:root body .erwaehn-menu .erwaehn-avatar { width: 32px !important; height: 32px !important; min-width: 32px; font-size: .72rem; flex: none; margin: 0; }
:root body .erwaehn-name { font-weight: 600; color: var(--m-text); }
:root body .erwaehnung { font-weight: 700; color: var(--m-rot); }
:root body .message-row.own .erwaehnung { color: #ffe1a6; }
:root body .erwaehnung.ich { background: rgba(226, 189, 98, .28); border-radius: 5px; padding: 0 3px; }
:root body.dark-mode .erwaehnung:not(.ich) { color: #ff9c8f; }

/* ═════ Stumm + Entwurf in der Liste ═════ */
:root body .conv-stumm { display: inline-block !important; width: 14px; height: 14px; color: var(--m-leise); margin-left: 6px; vertical-align: -1px; flex: none; }
:root body .conv-stumm svg { width: 100%; height: 100%; display: block; }
:root body .conversation-item .badge.stumm { background: #a8a0a0 !important; }
:root body #stummKnopf.ist-stumm { color: var(--m-leise); }
:root body .entwurf-wort { color: #c0392b; font-weight: 700; }
:root body.dark-mode .entwurf-wort { color: #ff8a7a; }

/* ═════ Suche in allen Chats: deckt die Liste ab ═════ */
:root body .chat-list-pane { position: relative; }
:root body .such-blatt { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; background: var(--m-flaeche); animation: lf-ein .12s ease-out; }
:root body .such-kopf { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--m-linie); }
:root body .such-feld { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: 21px; background: var(--m-flaeche-2); box-shadow: inset 0 0 0 1px var(--m-linie); margin: 0; }
:root body .such-feld i { color: var(--m-leise); }
:root body .such-feld input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--m-text); font-size: max(16px, 1rem); }
:root body .such-zu { flex: none; border: 0; background: transparent; color: var(--m-rot); font-weight: 700; padding: 8px 6px; }
:root body .such-ergebnis { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 0 20px; }
:root body .such-hinweis { padding: 18px 16px; color: var(--m-leise); font-size: .88rem; text-align: center; }
:root body .such-abschnitt { padding: 12px 16px 4px; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--m-leise); }
:root body .such-abschnitt small { font-weight: 700; margin-left: 4px; }
:root body .such-zeile { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 16px; border: 0; background: transparent; color: var(--m-text); text-align: left; cursor: pointer; }
:root body .such-zeile:hover, :root body .such-zeile:active { background: var(--m-hover); }
:root body .such-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
:root body .such-text small { color: var(--m-leise); font-size: .76rem; }
:root body .such-zeile-kopf { display: flex; align-items: baseline; gap: 8px; }
:root body .such-zeile-kopf b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .such-auszug { font-size: .86rem; color: var(--m-text-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
:root body .such-auszug em { font-style: normal; font-weight: 600; color: var(--m-leise); }
:root body .such-blatt mark { background: rgba(226, 189, 98, .45); color: inherit; padding: 0 1px; border-radius: 3px; }

/* Route-Knöpfe unter Schulwerbungs-Meldungen (CF 08.10.2026; 12.10.2026 als Karte – Schulname ganz, zweizeilig statt „…“; ein Knopf → Auswahl Apple/Google) */
:root body .route-reihe { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
:root body .route-knopf { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 420px; padding: 10px 12px; border-radius: 14px;
  background: var(--m-flaeche-2); border: 1px solid var(--m-linie); color: var(--m-text); text-decoration: none;
  transition: background .15s, transform .1s; -webkit-tap-highlight-color: transparent; font: inherit; text-align: left; cursor: pointer; }
:root body .route-knopf:hover { background: var(--m-hover); }
:root body .route-knopf:active { transform: scale(.98); background: var(--m-aktiv); }
:root body .route-symbol { flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--m-rot); color: #fff; }
:root body .route-symbol i { width: 18px; height: 18px; display: block; }
:root body .route-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
:root body .route-text small { font-size: .74rem; font-weight: 600; color: var(--m-leise); letter-spacing: .01em; }
:root body .route-text b { font-size: .95rem; font-weight: 700; color: var(--m-rot); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
:root body .route-pfeil { flex: none; width: 16px; height: 16px; color: var(--m-leise); }
:root body .route-pfeil i, :root body .route-knopf i.bi svg { display: block; width: 100%; height: 100%; }
:root body.dark-mode .route-text b { color: #ff9c8f; }
:root body.dark-mode .route-symbol { background: #9a1a22; }

/* Medien laden (CF 08.10.2026): heller Schimmer + Kreisel + „Wird geladen …“ statt schwarzer Fläche */
:root body .medien-kachel img, :root body .medien-kachel video { transition: opacity .2s; }
:root body .medien-kachel.laedt img, :root body .medien-kachel.laedt video { opacity: 0; }
:root body .medien-lade { display: none; }
:root body .medien-kachel.laedt .medien-lade, :root body .medien-kachel.fehlt .medien-lade {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--m-leise); font-size: .8rem; font-weight: 600;
  background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 70%) var(--m-flaeche-2);
  background-size: 220% 100%; animation: medien-schimmer 1.3s linear infinite; }
:root body.dark-mode .medien-kachel.laedt .medien-lade { background-image: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.07) 50%, rgba(255,255,255,0) 70%); }
:root body .medien-kachel.laedt .medien-lade > * { opacity: 0; animation: medien-zeigen .2s .35s forwards; }   /* kurz warten: Bilder aus dem Zwischenspeicher blitzen nicht */
:root body .medien-ring { width: 26px; height: 26px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--m-leise) 30%, transparent); border-top-color: var(--m-rot); animation: medien-dreh .8s linear infinite, medien-zeigen .2s .35s forwards !important; }
/* Video, dessen Bild erst beim Abspielen kommt: ruhig, ohne Kreisel */
:root body .medien-kachel.ist-video.bereit .medien-ring { display: none; }
:root body .medien-kachel.ist-video.bereit .medien-lade { animation: none; background: linear-gradient(160deg, var(--m-flaeche-2), color-mix(in srgb, var(--m-rot) 14%, var(--m-flaeche-2))); }
:root body .medien-kachel.ist-video.bereit .medien-lade-text { transform: translateY(40px); }
:root body .medien-kachel.fehlt .medien-lade { animation: none; }
:root body .medien-kachel.fehlt .medien-ring { display: none; }
@keyframes medien-schimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes medien-dreh { to { transform: rotate(360deg); } }
@keyframes medien-zeigen { to { opacity: 1; } }
:root body .medien-kachel.ist-video.laedt:not(.bereit) .medien-play { display: none; }   /* beim Laden nur Kreisel + Text */

/* Bildansicht zoomen (CF 08.10.2026): während Finger-/Zieh-Gesten ohne Verzögerung; gezoomt: Hand-Zeiger, Pfeile weg */
:root body .betrachter.ohne-uebergang .betrachter-buehne img { transition: none; }
:root body .betrachter.gezoomt .betrachter-buehne img { cursor: grab; }
:root body .betrachter.gezoomt .betrachter-pfeil { display: none; }
:root body .betrachter-knopf[hidden] { display: none !important; }

/* Trenner „Neue Nachrichten“ (wie im PBC-Chat, CF 08.10.2026) */
:root body .neu-trenner { display: flex; align-items: center; gap: 10px; margin: 14px 4px 10px; }
:root body .neu-trenner::before, :root body .neu-trenner::after { content: ""; flex: 1 1 auto; height: 1px; background: color-mix(in srgb, var(--m-rot) 40%, transparent); }
:root body .neu-trenner span { flex: none; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--m-rot);
  background: var(--m-flaeche); padding: 3px 10px; border-radius: 999px; box-shadow: 0 1px 2px rgba(40, 20, 12, .08); }
:root body.dark-mode .neu-trenner span { color: #ff9c8f; }

/* Knopfleiste im Chor-Tool-Fenster wurde bei langen Listen (z. B. 42 Projekte) zusammengedrückt und ragte in die Reiter
   (CF 09.10.2026, Bild). Kopf und Reiter schrumpfen nie, nur die Liste darunter scrollt. */
:root body .chat-list-header, :root body .mobile-tabbar, :root body .desktop-category-tabs { flex: none; }
:root body #conversationList { flex: 1 1 0; min-height: 0; }
:root body.eingebettet .chat-list-header { padding-top: 8px; padding-bottom: 2px; }

/* ═════ Projekte: Reiter „Ideen“, Archiv nur als Symbol (CF 09.10.2026) ═════ */
:root body .pj-umschalter { grid-template-columns: repeat(3, minmax(0, 1fr)) 44px; }
:root body .pj-umschalter .pj-archiv-knopf { padding: 0; display: grid; place-items: center; }
:root body .pj-umschalter .pj-archiv-knopf i { width: 17px; height: 17px; display: block; }
:root body .pj-umschalter .pj-archiv-knopf .pj-punkt { position: absolute; top: 5px; right: 6px; margin: 0; }
:root body .pj-neue-idee { display: inline-flex; align-items: center; gap: 6px; margin: 8px 12px 6px; padding: 6px 13px 6px 10px; border-radius: 999px; border: 0;
  background: color-mix(in srgb, var(--m-rot) 9%, var(--m-flaeche)); color: var(--m-rot); font-size: .84rem; font-weight: 700; line-height: 1.2; cursor: pointer; }
:root body .pj-neue-idee:hover { background: color-mix(in srgb, var(--m-rot) 15%, var(--m-flaeche)); }
:root body .pj-neue-idee > i { flex: none; width: 15px; height: 15px; display: block; }
:root body.dark-mode .pj-neue-idee { background: color-mix(in srgb, var(--m-rot) 22%, #262223); color: #f3a5a5; }
:root body .pj-idee-symbol { justify-content: center; height: 48px; background: color-mix(in srgb, #e2bd62 22%, var(--m-flaeche)) !important; color: #b8860b; }
:root body .pj-idee-symbol i { width: 22px; height: 22px; display: block; margin: auto; line-height: 0; }
:root body .pj-idee-symbol i svg { display: block; width: 100%; height: 100%; }
:root body.dark-mode .pj-idee-symbol { background: color-mix(in srgb, #e2bd62 18%, #262223) !important; color: #e2bd62; }
:root body .pj-zeile.abgelegt { opacity: .7; }
:root body .pj-kopfzeile .bi-lightbulb { width: 12px; height: 12px; display: inline-block; vertical-align: -1px; color: #b8860b; }

/* ───── Drucken (CF 09.10.2026): Knopf oben in der Chat-Liste + Druckfenster ───── */
:root body .druck-knopf { position: relative; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px 0 11px; border: 0; border-radius: 18px;
  background: var(--m-rot); color: #fff; font-size: .86rem; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px color-mix(in srgb, var(--m-rot) 30%, transparent); }
:root body .druck-knopf.d-none { display: none; }
/* Läuft ein Druck (egal von wem) / braucht der Drucker Hilfe – für alle mit Druckrecht deutlich sichtbar (CF 12.10.2026) */
:root body .druck-knopf.druckt, :root body .chat-list-header .druck-knopf.druckt, :root body.eingebettet .chat-list-header .druck-knopf.druckt {
  background: #fde68a; color: #6b3f00; animation: druckRing 1.8s ease-out infinite; }
:root body .druck-knopf.druckt i { animation: druckWippen 1.2s ease-in-out infinite; }
:root body .druck-knopf.hilfe, :root body .chat-list-header .druck-knopf.hilfe, :root body.eingebettet .chat-list-header .druck-knopf.hilfe {
  background: #fed7aa; color: #9a3412; animation: druckRingOrange 1.4s ease-out infinite; }
@keyframes druckRing { 0% { box-shadow: 0 0 0 0 rgba(253, 230, 138, .9); } 100% { box-shadow: 0 0 0 10px rgba(253, 230, 138, 0); } }
@keyframes druckRingOrange { 0% { box-shadow: 0 0 0 0 rgba(251, 146, 60, .9); } 100% { box-shadow: 0 0 0 10px rgba(251, 146, 60, 0); } }
@keyframes druckWippen { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { :root body .druck-knopf.druckt, :root body .druck-knopf.hilfe, :root body .druck-knopf.druckt i { animation: none; } }
:root body .chat-list-header .druck-knopf { background: #fff; color: #8b140d; box-shadow: 0 2px 10px rgba(0, 0, 0, .22); }   /* auf der roten Kopfleiste: weiß, damit er heraussticht */
:root body.eingebettet .chat-list-header .druck-knopf { background: var(--m-rot); color: #fff; box-shadow: 0 2px 8px color-mix(in srgb, var(--m-rot) 30%, transparent); }
:root body .druck-knopf:hover { filter: brightness(1.08); }
:root body .druck-knopf:active { transform: scale(.97); }
:root body .druck-knopf i { width: 17px; height: 17px; display: block; }
:root body .druck-knopf.wartet::after { content: ""; position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: #e8a200; border: 2px solid var(--m-flaeche); animation: druckPuls 1.6s ease-in-out infinite; }
/* Symbol-SVGs sind sonst fest 1em groß und sitzen oben im Rahmen (CF 09.10.2026: „Symbol sitzt nicht sauber mittig“) */
:root body .druck-fenster i.bi svg, :root body .druck-knopf i.bi svg, :root body .pj-neue-idee i.bi svg { display: block; width: 100%; height: 100%; }
@media (max-width: 359.98px) { :root body .druck-knopf { width: 36px; padding: 0; justify-content: center; } :root body .druck-knopf span { display: none; } }

:root body .druck-fenster { position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(20, 12, 12, .42); animation: lf-ein .12s ease-out; }
:root body .druck-karte { position: relative; width: min(440px, 100%); max-height: min(720px, calc(100dvh - 40px)); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 20px; background: var(--m-flaeche); color: var(--m-text); box-shadow: 0 20px 60px rgba(0, 0, 0, .28); }
:root body .druck-karte.ziehen { box-shadow: 0 0 0 3px var(--m-rot), 0 20px 60px rgba(0, 0, 0, .28); }
:root body .druck-kopf { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 16px; border-bottom: 1px solid var(--m-linie); }
:root body .druck-kopf h2 { flex: 1; margin: 0; font-size: 1.12rem; font-weight: 800; }
:root body .druck-kopf-symbol { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--m-rot); color: #fff; }
:root body .druck-kopf-symbol i { width: 18px; height: 18px; display: block; }
:root body .druck-zu { width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--m-flaeche-2); color: var(--m-leise); cursor: pointer; }
:root body .druck-zu i { width: 15px; height: 15px; display: block; }
:root body .druck-inhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 12px; }
:root body .druck-lage { margin: 0; }
:root body .druck-status.stufe-laedt { background: var(--m-flaeche-2); color: var(--m-leise); }
:root body .druck-status.stufe-gruen { background: color-mix(in srgb, #16a34a 9%, var(--m-flaeche)); color: color-mix(in srgb, #15803d 85%, var(--m-text)); }
:root body .druck-waehlen { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 20px 12px; border-radius: 14px; cursor: pointer;
  border: 1.5px dashed color-mix(in srgb, var(--m-rot) 40%, transparent); background: color-mix(in srgb, var(--m-rot) 4%, var(--m-flaeche)); color: var(--m-text); }
:root body .druck-waehlen:hover { background: color-mix(in srgb, var(--m-rot) 8%, var(--m-flaeche)); }
:root body .druck-waehlen i { width: 28px; height: 28px; display: block; color: var(--m-rot); margin-bottom: 4px; }
:root body .druck-waehlen small, :root body .druck-gewaehlt small, :root body .druck-auftrag small { color: var(--m-leise); font-size: .78rem; }
:root body .druck-gewaehlt { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--m-flaeche-2); box-shadow: inset 0 0 0 1px var(--m-linie); }
:root body .druck-gewaehlt-text, :root body .druck-auftrag-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
:root body .druck-gewaehlt-text b, :root body .druck-auftrag-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
:root body .druck-auftrag-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .druck-pdf-symbol { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, #dc2626 12%, var(--m-flaeche)); color: #dc2626; }
:root body .druck-pdf-symbol.klein { width: 32px; height: 32px; border-radius: 9px; }
:root body .druck-pdf-symbol i { width: 19px; height: 19px; display: block; }
:root body .druck-pdf-symbol.klein i { width: 16px; height: 16px; }
:root body .druck-anders { flex: none; border: 0; background: transparent; color: var(--m-rot); font-weight: 700; font-size: .82rem; padding: 6px 2px; cursor: pointer; }
:root body .druck-mehr { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
:root body .druck-mehr button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; border-radius: 999px; padding: 5px 11px; font-size: .8rem;
  background: var(--m-flaeche-2); color: var(--m-text); box-shadow: inset 0 0 0 1px var(--m-linie); cursor: pointer; }
:root body .druck-mehr button.an { background: var(--m-rot); color: #fff; box-shadow: none; }
:root body .druck-art-titel { margin: 0 0 6px; font-weight: 700; }
:root body .druck-arten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
:root body .druck-arten button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 9px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--m-flaeche-2); color: var(--m-text); box-shadow: inset 0 0 0 1px var(--m-linie); text-align: center; }
:root body .druck-arten button:hover { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--m-rot) 45%, transparent); }
:root body .druck-arten button i { width: 22px; height: 22px; display: block; color: var(--m-leise); margin-bottom: 3px; }
:root body .druck-arten button b { font-size: .92rem; }
:root body .druck-arten button small { font-size: .72rem; color: var(--m-leise); line-height: 1.2; }
:root body .druck-arten button.an { background: color-mix(in srgb, var(--m-rot) 10%, var(--m-flaeche)); box-shadow: inset 0 0 0 2px var(--m-rot); }
:root body .druck-arten button.an i, :root body .druck-arten button.an b { color: var(--m-rot); }
body.dark-mode .druck-arten button.an { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 2px #f3a5a5; }
body.dark-mode .druck-arten button.an i, body.dark-mode .druck-arten button.an b { color: #f3a5a5; }
:root body .druck-anzahl { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; }
:root body .druck-stepper { display: flex; align-items: center; border-radius: 12px; background: var(--m-flaeche-2); box-shadow: inset 0 0 0 1px var(--m-linie); overflow: hidden; }
:root body .druck-stepper button { width: 42px; height: 40px; border: 0; background: transparent; color: var(--m-rot); display: grid; place-items: center; cursor: pointer; }
:root body .druck-stepper button:hover { background: var(--m-hover); }
:root body .druck-stepper button i { width: 16px; height: 16px; display: block; }
:root body .druck-stepper input { width: 52px; height: 40px; border: 0; outline: 0; background: transparent; color: var(--m-text); text-align: center; font-size: max(16px, 1.05rem); font-weight: 800; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
:root body .druck-stepper input::-webkit-outer-spin-button, :root body .druck-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
:root body .druck-los { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border: 0; border-radius: 14px; background: var(--m-rot); color: #fff; font-size: 1rem; font-weight: 800; cursor: pointer; }
:root body .druck-los:disabled { opacity: .45; cursor: default; }
:root body .druck-los i { width: 19px; height: 19px; display: block; }
:root body .druck-liste-titel { margin: 6px 0 4px; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--m-leise); }
:root body .druck-auftrag { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--m-linie); }
:root body .druck-chip { flex: none; font-size: .7rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--m-flaeche-2); color: var(--m-leise); }
:root body .druck-auftrag.st-offen .druck-chip { background: #fef6e0; color: #7a4a00; }
:root body .druck-auftrag.st-gedruckt .druck-chip { background: color-mix(in srgb, #16a34a 14%, var(--m-flaeche)); color: #15803d; }
:root body .druck-auftrag.st-fehler .druck-chip { background: #fdecec; color: #991b1b; }
:root body .druck-nochmal { flex: none; display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 6px 10px; background: color-mix(in srgb, var(--m-rot) 9%, var(--m-flaeche)); color: var(--m-rot); font-size: .78rem; font-weight: 700; cursor: pointer; }
:root body .druck-nochmal:hover { background: color-mix(in srgb, var(--m-rot) 15%, var(--m-flaeche)); }
:root body .druck-nochmal i { width: 14px; height: 14px; display: block; }
body.dark-mode .druck-auftrag.st-offen .druck-chip { background: rgba(232, 162, 0, .16); color: #f5d38a; }
body.dark-mode .druck-auftrag.st-gedruckt .druck-chip { background: rgba(22, 163, 74, .18); color: #86efac; }
body.dark-mode .druck-auftrag.st-fehler .druck-chip { background: rgba(220, 38, 38, .18); color: #fca5a5; }
body.dark-mode .druck-status.stufe-gruen { background: rgba(22, 163, 74, .14); color: #86efac; }
body.dark-mode .druck-nochmal { background: rgba(255, 255, 255, .07); color: #f3a5a5; }
body.dark-mode .druck-fenster { background: rgba(0, 0, 0, .55); }
@media (max-width: 575.98px) {
  :root body .druck-fenster { align-items: flex-end; padding: 0; }
  :root body .druck-karte { width: 100%; max-height: calc(100dvh - 40px); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  :root body .druck-nochmal span { display: none; }
  :root body .druck-nochmal { padding: 7px; }
}

/* ───── Word und Tabellen ansehen (CF 09.10.2026) ───── */
:root body .office-karte { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
:root body .office-inhalt { --office-zoom: 1; flex: 1; min-height: 0; overflow: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
:root body .office-word > div { zoom: var(--office-zoom); }
:root body .office-word .docx-wrapper { background: transparent; padding: 0; }
:root body .office-word .docx-wrapper > section.docx { margin: 0 auto 12px; box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
:root body .office-tabellen { background: #f3f1f1; }
:root body .office-tabelle { border-collapse: collapse; background: #fff; color: #1d1b1b; font-size: calc(13px * var(--office-zoom)); }
:root body .office-tabelle td, :root body .office-tabelle th { border: 1px solid #d9d4d4; padding: .25em .55em; white-space: nowrap; max-width: 28em; overflow: hidden; text-overflow: ellipsis; text-align: left; }
:root body .office-tabelle th { background: #ece8e8; color: #6b6262; font-weight: 600; font-size: .85em; text-align: center; }
:root body .office-tabelle thead th { position: sticky; top: -12px; z-index: 1; }
:root body .office-tabelle tbody th { position: sticky; left: -12px; }
:root body .office-tabelle td.zahl { text-align: right; font-variant-numeric: tabular-nums; }
:root body .office-hinweis { color: #6b6262; font-size: .85rem; margin: 10px 2px; }
:root body .office-blaetter { flex: none; display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 8px; }
:root body .office-blaetter button { flex: none; border: 0; border-radius: 999px; padding: 6px 12px; background: rgba(255, 255, 255, .12); color: #fff; font-size: .82rem; font-weight: 600; cursor: pointer; }
:root body .office-blaetter button.an { background: #fff; color: #8b140d; }

/* ───── Sprachnachricht als Text (CF 09.10.2026) ───── */
:root body .transkript { margin-top: 6px; }
:root body .transkript-knopf { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 4px 11px 4px 9px; cursor: pointer;
  background: color-mix(in srgb, currentColor 9%, transparent); color: inherit; font-size: .78rem; font-weight: 700; opacity: .85; }
:root body .transkript-knopf:hover { opacity: 1; }
:root body .transkript-knopf i { width: 14px; height: 14px; display: block; }
:root body .transkript-knopf i svg { display: block; width: 100%; height: 100%; }
:root body .transkript-text { margin: 8px 0 2px; padding: 2px 0 2px 11px; border-left: 3px solid color-mix(in srgb, var(--m-rot) 55%, transparent);
  font-style: italic; font-size: .93rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; color: inherit; }
:root body .message-row.own .transkript-text { border-left-color: rgba(255, 255, 255, .6); }
:root body .transkript-stand { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: .76rem; opacity: .7; font-style: italic; }
:root body .transkript-punkt { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: druckPuls 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { :root body .transkript-punkt { animation: none; } }

/* ───── Dateien & Medien eines Chats (CF 09.10.2026) ───── */
:root body .message-pane { position: relative; }
:root body .ablage-blatt { position: absolute; inset: 0; z-index: 45; display: flex; flex-direction: column; background: var(--m-flaeche); animation: lf-ein .12s ease-out; }
:root body .ablage-kopf { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--m-linie); }
:root body .ablage-titel { min-width: 0; display: flex; flex-direction: column; }
:root body .ablage-titel b { font-size: 1.05rem; }
:root body .ablage-titel small { color: var(--m-leise); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .ablage-reiter { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--m-linie); }
:root body .ablage-reiter button { display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 10px; padding: 8px 4px; background: transparent; color: var(--m-leise); font-size: .84rem; font-weight: 700; cursor: pointer; min-width: 0; }
:root body .ablage-reiter button i { width: 15px; height: 15px; display: block; flex: none; }
:root body .ablage-reiter button i svg { display: block; width: 100%; height: 100%; }
:root body .ablage-reiter button small { font-size: .72rem; opacity: .75; }
:root body .ablage-reiter button.an { background: color-mix(in srgb, var(--m-rot) 10%, var(--m-flaeche)); color: var(--m-rot); }
@media (max-width: 359.98px) { :root body .ablage-reiter button span { display: none; } }
@media (max-width: 420px) { :root body .ablage-reiter button { font-size: .76rem; gap: 4px; } }
:root body .ablage-inhalt { flex: 1; min-height: 0; overflow-y: auto; padding: 0 0 24px; -webkit-overflow-scrolling: touch; }
:root body .ablage-monat { position: sticky; top: 0; z-index: 1; padding: 10px 14px 6px; font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--m-leise); background: var(--m-flaeche); }
:root body .ablage-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 3px; padding: 0 3px; }
:root body .ablage-kachel { position: relative; aspect-ratio: 1; border: 0; padding: 0; overflow: hidden; background: var(--m-flaeche-2); cursor: pointer; }
:root body .ablage-kachel img { width: 100%; height: 100%; object-fit: cover; display: block; }
:root body .ablage-video-leer { position: absolute; inset: 0; display: grid; place-items: center; background: #1d1b1b; color: #fff; }
:root body .ablage-video-leer i { width: 28px; height: 28px; display: block; opacity: .8; }
:root body .ablage-dauer { position: absolute; left: 5px; bottom: 5px; display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px 2px 3px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .7rem; font-weight: 700; }
:root body .ablage-dauer i { width: 12px; height: 12px; display: block; }
:root body .ablage-zeile { display: flex; align-items: center; gap: 4px; padding: 0 8px 0 4px; }
:root body .ablage-zeile + .ablage-zeile { border-top: 1px solid var(--m-linie); }
:root body .ablage-haupt { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 8px; border: 0; background: transparent; color: var(--m-text); text-align: left; text-decoration: none; cursor: pointer; border-radius: 10px; }
:root body .ablage-haupt:hover { background: var(--m-hover); }
:root body .ablage-sym { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--m-rot) 10%, var(--m-flaeche)); color: var(--m-rot); }
:root body .ablage-sym i { width: 19px; height: 19px; display: block; }
:root body .ablage-sym i svg, :root body .ablage-zur i svg, :root body .ablage-dauer i svg, :root body .ablage-video-leer i svg { display: block; width: 100%; height: 100%; }
:root body .ablage-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
:root body .ablage-text b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .ablage-text small { color: var(--m-leise); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .ablage-text .ablage-url { color: var(--m-rot); opacity: .85; }
:root body .ablage-text .ablage-zitat { font-style: italic; color: var(--m-text); opacity: .8; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
:root body .ablage-zur { flex: none; width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--m-leise); cursor: pointer; }
:root body .ablage-zur:hover { background: var(--m-hover); color: var(--m-rot); }
:root body .ablage-zur i { width: 17px; height: 17px; display: block; }
:root body .ablage-leer { padding: 40px 20px; text-align: center; color: var(--m-leise); font-size: .9rem; }

/* Lange Fehlermeldungen (z. B. Passkey-Hinweise der iPhone-App mit langen Kennungen) umbrechen statt die Anmeldekarte zu verbreitern – CF 10.10.2026 */
#loginError { overflow-wrap: anywhere; }

/* Kopfzeile am Handy zweizeilig (CF 10.10.2026: „Überschriften und zuletzt online werden auf dem iPhone mit … gekürzt – kleiner
   darstellen und die Knöpfe eine Zeile drunter, fixiert – schön machen“): oben Zurück, Name (ganze Breite, notfalls 2 Zeilen) und
   Status in Kurzform; darunter eine feste Leiste mit beschrifteten Knöpfen (Medien, Mitteilungen/Stumm, Verwalten, Leeren). */
@media (max-width: 575.98px) {
  :root body .message-header {
    height: auto; min-height: 0; max-height: none; flex-wrap: wrap; align-items: center;
    padding: 8px 10px 8px 8px; column-gap: 6px; row-gap: 7px;
  }
  :root body .message-header::before { content: ""; order: 3; flex-basis: 100%; height: 0; margin-top: -7px; }   /* Zeilenumbruch vor den Knöpfen (ohne doppelten Abstand) */
  :root body .message-header #backButton { order: 0; flex: none; align-self: center; }
  :root body .message-header > div { order: 1; flex: 1 1 0; min-width: 0; }
  :root body .message-header .echtzeit-punkt { order: 2; width: 7px; height: 7px; margin: 0 0 0 2px; }
  :root body .message-header h2 {
    font-size: 17px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: clip;
  }
  :root body .message-header #conversationMeta { white-space: normal; text-overflow: clip; letter-spacing: .04em; }
  :root body .message-header > .icon-button:not(#backButton) {   /* gleich breit, Symbol über der Beschriftung – passt in eine Zeile */
    order: 4; flex: 1 1 0; min-width: 0; width: auto; height: 44px; margin: 0 !important; padding: 4px 2px 3px; gap: 2px;
    border-radius: 12px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 10.5px; font-weight: 700; line-height: 1.1; white-space: nowrap; overflow: hidden;
  }
  :root body .message-header > .icon-button:not(#backButton) i { font-size: 16px; }
  :root body .message-header > .icon-button:not(#backButton)::after { content: attr(data-kurz); max-width: 100%; overflow: hidden; }
  :root body .message-header > .icon-button.d-none { display: none !important; }
}

/* Admin-Ansicht (CF 12.10.2026): Auge oben – offen = alle Gruppen unsichtbar mitlesen; Balken im mitgelesenen Chat */

:root body .conversation-item .conv-still { color: var(--m-leise); font-size: .85rem; margin-right: 4px; }
:root body .still-leiste {
  display: flex; align-items: center; gap: 10px; margin: 0 12px 12px; padding: 10px 12px; border-radius: 14px;
  background: var(--m-flaeche); border: 1px solid var(--m-linie); color: var(--m-text);
}
:root body .still-leiste.d-none { display: none; }
:root body .still-leiste > i { font-size: 1.25rem; color: var(--m-leise); flex: none; }
:root body .still-leiste > div { flex: 1; min-width: 0; line-height: 1.3; }
:root body .still-leiste b { display: block; font-size: .92rem; }
:root body .still-leiste small { display: block; color: var(--m-leise); font-size: .8rem; }
:root body .still-leiste button { flex: none; border: 0; border-radius: 10px; padding: 8px 12px; min-height: 40px; font-weight: 700; background: var(--m-rot); color: #fff; }
@media (max-width: 991px) { :root body .still-leiste { margin: 0 8px 8px; } }
html.als-app body .still-leiste { margin-bottom: 30px; }
/* Schmale Handys (CF 12.10.2026, mit Auge passte die Kopfleiste nicht mehr): Knöpfe etwas kleiner, „Drucken“ nur als Symbol –
   außer während des Druckens/bei Hilfe, dann bleibt der Text sichtbar */
:root body .chat-list-header .header-actions { gap: 6px; }   /* überall: die Kopfleiste der Chatliste ist auch am Desktop nur ~430 px breit */
:root body .chat-list-header .icon-button { width: 34px; height: 34px; border-radius: 11px; }
@media (max-width: 430px) {
  :root body .chat-list-header .druck-knopf:not(.druckt):not(.hilfe) { width: 36px; padding: 0; justify-content: center; }
  :root body .chat-list-header .druck-knopf:not(.druckt):not(.hilfe) span { display: none; }
}

/* Männerchor: wer hat sich angemeldet (CF 13.10.2026) – Filter-Chips + Punkt rechts */
:root body .einst-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 2px 10px; }
:root body .einst-filter button { border: 1px solid var(--m-linie); background: var(--m-flaeche); color: var(--m-text-2); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; min-height: 32px; cursor: pointer; }
:root body .einst-filter button.an { background: var(--m-rot); border-color: var(--m-rot); color: #fff; }
:root body .mc-punkt { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-left: auto; background: var(--m-linie); }
:root body .mc-punkt.ja { background: #16a34a; opacity: .55; }
:root body .mc-punkt.online { background: #16a34a; }

/* Wer hat reagiert (CF 13.10.2026) – Fenster wie beim Lesestatus, oben Reiter je Reaktion */
:root body .lese-fenster.reaktionen { min-width: 210px; }
:root body .lese-fenster .rk-reiter { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 8px 6px; border-bottom: 1px solid var(--m-linie-2); margin-bottom: 4px; }
:root body .lese-fenster .rk-reiter button { border: 0; background: transparent; color: var(--m-leise); border-radius: 999px; padding: 4px 9px; font: inherit; font-size: .8rem; cursor: pointer; min-height: 28px; }
:root body .lese-fenster .rk-reiter button b { color: var(--m-text-2); font-weight: 700; }
:root body .lese-fenster .rk-reiter button.an { background: var(--m-flaeche-2); color: var(--m-text); }
:root body .lese-fenster .rk-emoji { flex: none; width: 22px; text-align: center; font-size: 1.05rem; }
:root body .lese-fenster .rk-zeile { padding-top: 5px; padding-bottom: 5px; }
:root body .lese-fenster .rk-zeile.ich { cursor: pointer; }
:root body .lese-fenster .rk-zeile.ich:hover { background: var(--m-hover); }
:root body .lese-fenster .rk-zeile .lf-name small { display: block; font-weight: 500; font-size: .72rem; color: var(--m-leise); }
:root body .einst-chip-wahl.fest span { border-style: dashed; }   /* feste Gruppe (Entschuldigungen, Schulwerbung, Alle) – CF 13.10.2026 */

/* Projekte mit neuen Nachrichten deutlicher (CF 13.10.2026): ganze Zeile zart rot, roter Balken links, „Neu“-Schild, rote Uhrzeit,
   Kalenderblatt mit Ring. Kommt eine neue Nachricht dazu (Zeile wandert hoch), leuchtet sie einmal kurz auf. */
:root body .pj-zeile.neu { background: color-mix(in srgb, var(--m-rot) 7%, transparent); box-shadow: inset 4px 0 0 var(--m-rot); }
:root body .pj-zeile.neu:hover { background: color-mix(in srgb, var(--m-rot) 11%, transparent); }
:root body .pj-zeile.neu.active { background: var(--m-aktiv); }
:root body .pj-zeile.neu .pj-zeit { color: var(--m-rot); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
:root body .pj-zeile.neu .pj-blatt { box-shadow: 0 0 0 2px var(--m-rot); border-color: transparent; }
:root body .pj-neu-schild { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--m-rot);
  border-radius: 999px; padding: 3px 7px; line-height: 1; }
@keyframes pj-aufleuchten { 0% { background: color-mix(in srgb, var(--m-rot) 30%, transparent); } 100% { background: color-mix(in srgb, var(--m-rot) 7%, transparent); } }
:root body .pj-zeile.neu.frisch { animation: pj-aufleuchten 1.6s ease-out 1; }
@media (prefers-reduced-motion: reduce) { :root body .pj-zeile.neu.frisch { animation: none; } }

/* Mein Speicher (CF 14.10.2026) */
:root body .speicher-balken { display: block; height: 8px; border-radius: 99px; background: var(--m-linie); overflow: hidden; margin-top: 8px; }
:root body .speicher-balken.klein { height: 5px; margin-top: 6px; max-width: 220px; }
:root body .speicher-balken > span { display: block; height: 100%; width: 0; background: #16a34a; border-radius: 99px; transition: width .3s; }
:root body .speicher-balken.voll > span { background: var(--m-rot); }
:root body .speicher-kopf { padding: 14px 16px; }
:root body .speicher-zahl { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
:root body .speicher-zahl b { font-size: 24px; font-weight: 800; color: var(--m-text); }
:root body .speicher-zahl span { color: var(--m-leise); font-size: 14px; }
:root body .speicher-rest { margin-top: 8px; font-size: 13px; color: var(--m-text-2); }
:root body .speicher-datei .einst-zeile-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
:root body .speicher-datei .einst-zeile-text { min-width: 0; }
:root body .speicher-datei.springt { cursor: pointer; }   /* antippen → zur Nachricht im Chat (CF 14.10.2026) */
:root body .speicher-datei.springt:hover { background: var(--m-hover); }
:root body .speicher-datei.springt:focus-visible { outline: 2px solid var(--m-rot); outline-offset: -2px; }
:root body .speicher-groesse { flex: none; font-size: 13px; font-weight: 700; color: var(--m-text-2); font-variant-numeric: tabular-nums; }
:root body .speicher-weg { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--m-rot); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
:root body .speicher-weg:hover { background: var(--m-hover); }

/* ---------- Profil einer Person (CF 14.10.2026): Avatar/Name antippen → großes Bild, Name, Nachricht + Anrufen ---------- */
:root body .msg-avatar[data-profil] { cursor: pointer; }
:root body .msg-avatar[data-profil]:focus-visible { outline: 2px solid var(--m-rot); outline-offset: 2px; }
:root body .pf-fenster { position: relative; max-width: 380px; width: calc(100vw - 32px); padding: 30px 22px calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; text-align: center; }
:root body .pf-zu { position: absolute; top: 12px; right: 12px; }
/* Profil auch am Handy mittig als Karte, nicht als Blatt von unten (CF 15.10.2026) */
:root body .pf-huelle { align-items: center; padding: 16px; }
:root body .pf-huelle .pf-fenster { border-radius: 22px; padding: 30px 22px 22px; transform: translateY(8px) scale(.98); }
:root body .pf-huelle.offen .pf-fenster { transform: none; }
:root body .pf-avatar { width: 128px; height: 128px; min-width: 128px; font-size: 42px; font-weight: 750; border-radius: 50%; }
:root body .pf-name { margin: 14px 0 2px; font-size: 22px; font-weight: 800; max-width: 100%; overflow-wrap: anywhere; }
:root body .pf-zeile { color: var(--m-leise); font-size: 14px; }
:root body .pf-zeile:empty { display: none; }
:root body .pf-status { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--m-flaeche-2); color: var(--m-text-2); font-size: 14px; max-width: 100%; overflow-wrap: anywhere; }
:root body .pf-knoepfe { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; width: 100%; margin-top: 20px; }
:root body .pf-knopf { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border: 0; border-radius: 16px;
  background: var(--m-flaeche-2); color: var(--m-rot); font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
:root body .pf-knopf i { font-size: 22px; }
:root body .pf-knopf:hover { filter: brightness(.96); }
:root body .pf-knopf:disabled { color: var(--m-leise); opacity: .5; cursor: not-allowed; filter: none; }
:root body.dark-mode .pf-knopf { color: #f2b8b8; }
:root body.dark-mode .pf-knopf:disabled { color: var(--m-leise); }
:root body .pf-nummer { margin-top: 10px; color: var(--m-leise); font-size: 13px; }
:root body .pf-nummer:empty { display: none; }

/* Weiterleiten: etwas dazuschreiben (CF 14.10.2026) */
:root body .forward-kommentar { margin: 0 0 12px; border-radius: 12px; border: 1px solid var(--m-linie); background: var(--m-flaeche); color: var(--m-text);
  font-size: 16px; resize: vertical; min-height: 52px; }
:root body .forward-kommentar:focus { border-color: color-mix(in srgb, var(--m-rot) 50%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--m-rot) 15%, transparent); }

/* Reaktionen: Schnellleiste + „+“ mit ganzer Auswahl nach Gruppen (CF 14.10.2026) */
:root body .action-sheet-reactions { justify-content: space-between; }
:root body .action-sheet-reaction.reaktion-mehr { font-size: 20px; color: var(--m-text-2); background: var(--m-flaeche); box-shadow: inset 0 0 0 1px var(--m-linie); }
:root body .action-sheet-reaction.reaktion-mehr i { transition: transform .18s ease; }
:root body .action-sheet-reaction.reaktion-mehr.an { background: var(--m-aktiv); color: var(--m-rot); }
:root body .action-sheet-reaction.reaktion-mehr.an i { transform: rotate(45deg); }
:root body .reaktion-alle { max-height: min(52vh, 420px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 2px 4px 8px; margin: 0 0 6px; }
:root body .reaktion-alle[hidden], :root body .action-sheet-items[hidden] { display: none; }
:root body .reaktion-gruppe + .reaktion-gruppe { margin-top: 8px; }
:root body .reaktion-gruppe small { display: block; padding: 4px 6px 4px; font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--m-leise); }
:root body .reaktion-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; }
:root body .reaktion-raster .action-sheet-reaction { width: 100%; flex: none; }
/* Schnellleiste: alle 8 Knöpfe passen auch aufs Handy (schrumpfen statt seitlich weglaufen) */
:root body .action-sheet-reactions > .action-sheet-reaction { flex: 1 1 0; min-width: 0; max-width: 44px; height: auto; aspect-ratio: 1; font-size: clamp(20px, 6.4vw, 26px); }
:root body .action-sheet-reactions > .action-sheet-reaction.reaktion-mehr { font-size: 18px; }

/* Animierte Emojis (CF 14.10.2026) */
:root body .animoji { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; line-height: 1; vertical-align: -0.2em; }
:root body .animoji.bewegt svg { width: 100% !important; height: 100% !important; display: block; }
:root body .reaction-chip .animoji { width: 20px; height: 20px; vertical-align: middle; }
:root body .action-sheet-reaction .animoji { width: 1.15em; height: 1.15em; }
:root body .bubble.nur-emoji { background: transparent !important; box-shadow: none !important; border: 0 !important; padding-left: 2px; padding-right: 2px; }
:root body .message-row.own .bubble.nur-emoji { color: var(--m-text); }
:root body .message-row.own .bubble.nur-emoji .message-meta, :root body .message-row.own .bubble.nur-emoji .message-meta *,
:root body .message-row.own .bubble.nur-emoji .mehr-knopf { color: var(--m-leise) !important; }
:root body .message-row.own .bubble.nur-emoji .mehr-knopf { background: rgba(0, 0, 0, .08); }
:root body .message-body.gross-emoji { font-size: 52px; line-height: 1.1; }
:root body .message-body.gross-emoji .animoji { width: 76px; height: 76px; vertical-align: middle; }

/* Emoji-Auswahl im Eingabefeld mit Gruppen (CF 14.10.2026) */
:root body .emoji-picker { display: block; max-height: min(330px, 46vh); width: min(400px, calc(100vw - 34px)); padding: 6px 8px 10px; border-radius: 18px;
  background: var(--m-flaeche); border: 1px solid var(--m-linie); overscroll-behavior: contain; }
:root body .emoji-picker.d-none { display: none !important; }
:root body .emoji-gruppe small { position: sticky; top: -6px; z-index: 1; display: block; padding: 8px 4px 5px; background: var(--m-flaeche);
  font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--m-leise); }
:root body .emoji-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; }
:root body .emoji-option { height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; font-size: 24px; line-height: 1; padding: 0; cursor: pointer; }
:root body .emoji-option:hover, :root body .emoji-option:focus-visible { background: var(--m-hover); }
:root body .emoji-option .animoji { width: 1.1em; height: 1.1em; }
:root body.dark-mode .emoji-option { background: transparent; }
/* eigene TKC-Emojis haben mehr Rand als die Google-Emojis → etwas größer zeigen */
:root body .animoji.tkc-emoji { width: 1.5em; height: 1.5em; margin: -0.12em 0; }
:root body .emoji-option .animoji.tkc-emoji, :root body .action-sheet-reaction .animoji.tkc-emoji { width: 1.4em; height: 1.4em; margin: 0; }
:root body .reaction-chip .animoji.tkc-emoji { width: 24px; height: 24px; margin: -2px 0; }
:root body .message-body.gross-emoji .animoji.tkc-emoji { width: 92px; height: 92px; margin: 0; }

/* Private Chats ausblenden (CF 14.10.2026) */
:root body .ausgeblendet-knopf { display: flex; align-items: center; gap: 10px; width: calc(100% - 16px); margin: 10px 8px 6px; padding: 10px 14px;
  border: 0; border-radius: 14px; background: var(--m-flaeche-2); color: var(--m-text-2); font-weight: 700; font-size: 14px; cursor: pointer; }
:root body .ausgeblendet-knopf span { flex: 1; text-align: left; }
:root body .ausgeblendet-knopf:hover { background: var(--m-hover); }
:root body .conv-ausblenden { display: none; width: 26px; height: 26px; border-radius: 8px; place-items: center; color: var(--m-leise); margin-right: 4px; cursor: pointer; }
:root body .conv-ausblenden:hover { background: var(--m-hover); color: var(--m-rot); }
@media (hover: hover) and (pointer: fine) {
  :root body .conversation-item:hover .conv-ausblenden, :root body .conv-ausblenden:focus-visible { display: inline-grid; }
}

/* Schriftgröße-Wahl (CF 14.10.2026) */
:root body .einst-unterzeile { margin: 12px 4px 6px; font-size: 12px; font-weight: 700; color: var(--m-leise); }
:root body .einst-schrift > button { gap: 6px; }
:root body .schrift-a { font-weight: 800; line-height: 1; font-family: Georgia, "Times New Roman", serif; }
:root body .schrift-normal { font-size: 14px; } :root body .schrift-gross { font-size: 18px; } :root body .schrift-sehrgross { font-size: 22px; }

/* drei Punkte ganz unten, bei Reaktionen rechts daneben (CF 14.10.2026) */
:root body .mehr-zeile.mit-reaktionen { justify-content: space-between; align-items: center; gap: 8px; }
:root body .mehr-zeile.mit-reaktionen .reaction-chips { margin: 0; flex: 1; min-width: 0; }
:root body .mehr-zeile.mit-reaktionen .mehr-knopf { flex: none; align-self: flex-end; }

/* Verbindungsbalken (CF 15.10.2026) */
:root body .verbindungs-balken { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 10px); z-index: 4000; transform: translate(-50%, -140%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); padding: 8px 8px 8px 14px; border-radius: 999px;
  background: #1f1a18; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: transform .25s ease; }
:root body .verbindungs-balken.an { transform: translate(-50%, 0); }
:root body .vb-punkt { width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; flex: none; animation: vb-puls 1.2s ease-in-out infinite; }
@keyframes vb-puls { 50% { opacity: .35; } }
:root body .vb-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root body .vb-knopf { flex: none; border: 0; border-radius: 999px; padding: 6px 12px; background: #fff; color: #8b140d; font-weight: 700; font-size: 13px; cursor: pointer; }

/* Menü einer Nachricht wie bei Telegram (CF 15.10.2026): schwebt an den drei Punkten bzw. an der Maus.
   Oben die Reaktionsleiste (Pfeil = alle), darunter die Aktionen in Gruppen mit Trennstrichen, Löschen rot. */
:root body .nm-hintergrund { position: fixed; inset: 0; z-index: 1090; background: transparent; }
@media (pointer: coarse) { :root body .nm-hintergrund { background: rgba(20, 10, 8, .28); transition: opacity .15s; opacity: 0; } :root body .nm-hintergrund.open { opacity: 1; } }
:root body .nm { position: fixed; display: flex; flex-direction: column; gap: 8px; width: 304px; max-width: calc(100vw - 16px);
  opacity: 0; transform: scale(.96); transform-origin: top center; transition: opacity .12s ease, transform .12s ease; -webkit-user-select: none; user-select: none; }
:root body .nm-hintergrund.open .nm { opacity: 1; transform: none; }
:root body .nm-reaktionen, :root body .nm-alle, :root body .nm-liste { background: var(--m-flaeche); color: var(--m-text);
  box-shadow: 0 10px 34px rgba(40, 20, 12, .22), 0 0 0 1px var(--m-linie); }
:root body.dark-mode .nm-reaktionen, :root body.dark-mode .nm-alle, :root body.dark-mode .nm-liste { background: #262223; box-shadow: 0 12px 36px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .07); }
:root body .nm .nm-reaktionen { margin: 0; padding: 4px; border-radius: 999px; gap: 0; }
:root body .nm .nm-reaktionen > .action-sheet-reaction { max-width: 38px; font-size: 23px; }
:root body .nm .reaktion-mehr { box-shadow: none; background: var(--m-flaeche-2); }
:root body .nm .reaktion-mehr.an i { transform: rotate(180deg); }
:root body .nm .nm-alle { margin: 0; border-radius: 18px; padding: 6px 6px 8px; max-height: min(50vh, 380px); }
:root body .nm-liste { border-radius: 16px; padding: 4px 0; overflow: hidden; }
:root body .nm-liste[hidden], :root body .nm-alle[hidden] { display: none; }
:root body .nm-gruppe + .nm-gruppe { border-top: 1px solid var(--m-linie); margin-top: 4px; padding-top: 4px; }
:root body .nm-eintrag { display: flex; align-items: center; gap: 14px; width: 100%; padding: 9px 18px; border: 0; background: transparent;
  color: inherit; font: inherit; font-size: .98rem; text-align: left; cursor: pointer; }
:root body .nm-eintrag i { font-size: 1.12rem; width: 22px; text-align: center; color: var(--m-text-2); }
:root body .nm-eintrag:hover, :root body .nm-eintrag:focus-visible { background: var(--m-hover); outline: none; }
:root body .nm-eintrag.danger, :root body .nm-eintrag.danger i { color: #d43c35; }
:root body.dark-mode .nm-eintrag.danger, :root body.dark-mode .nm-eintrag.danger i { color: #f2847d; }
@media (pointer: coarse) { :root body .nm-eintrag { padding: 12px 18px; font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) { :root body .nm { transition: none; } }

/* ---------- Später senden, Termin, Auswählen (CF 15.10.2026) ---------- */
:root body .attach-menu [data-attach-action="termin"] i { background: #0e7490; }
:root body .attach-menu [data-attach-action="spaeter"] i { background: #a16207; }
:root body .geplant-leiste { width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 0; border-radius: 16px; cursor: pointer;
  background: color-mix(in srgb, #a16207 10%, var(--m-flaeche-2)); color: var(--m-text); font: inherit; font-size: .86rem; font-weight: 650; text-align: left; }
:root body .geplant-leiste span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .geplant-leiste > i:first-child { color: #a16207; font-size: 1rem; }
:root body.dark-mode .geplant-leiste > i:first-child { color: #f0c26a; }
:root body .geplant-leiste > i:last-child { color: var(--m-leise); }
:root body .plan-vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; }
:root body .plan-vorschlag { border: 1px solid var(--m-linie); border-radius: 999px; padding: 7px 12px; background: var(--m-flaeche); color: var(--m-text); font: inherit; font-size: .86rem; font-weight: 650; cursor: pointer; }
:root body .plan-vorschlag:hover { background: var(--m-hover); }
:root body .plan-vorschlag.an { background: var(--m-aktiv); border-color: color-mix(in srgb, var(--m-rot) 45%, transparent); color: var(--m-rot); }
:root body.dark-mode .plan-vorschlag.an { color: #f0a49c; }
:root body .plan-felder { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
:root body .plan-felder label { display: grid; gap: 3px; }
:root body .plan-felder label small { font-size: .75rem; color: var(--m-leise); font-weight: 700; }
:root body .plan-felder[hidden] { display: none; }
:root body .plan-hinweis { color: var(--m-leise); min-height: 1.1em; }
:root body .geplant-liste { display: grid; gap: 8px; max-height: min(60vh, 520px); overflow-y: auto; }
:root body .geplant-eintrag { border-radius: 14px; background: var(--m-flaeche-2); padding: 10px 12px; display: grid; gap: 6px; }
:root body .geplant-zeit { font-size: .8rem; font-weight: 800; color: #a16207; display: flex; gap: 6px; align-items: center; }
:root body.dark-mode .geplant-zeit { color: #f0c26a; }
:root body .geplant-text { white-space: pre-wrap; word-break: break-word; font-size: .92rem; max-height: 8em; overflow: hidden; }
:root body .geplant-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; }
:root body .geplant-knoepfe button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; padding: 6px 10px; font: inherit; font-size: .8rem; font-weight: 700;
  background: var(--m-flaeche); color: var(--m-text); cursor: pointer; }
:root body .geplant-knoepfe button:hover { background: var(--m-hover); }
:root body .geplant-knoepfe button.gefahr { color: #d43c35; }
:root body.dark-mode .geplant-knoepfe button.gefahr { color: #f2847d; }

/* Termin-Karte */
:root body .termin { min-width: min(290px, 68vw); max-width: 360px; display: grid; gap: 10px; margin: 2px 0 4px; }
:root body .termin-kopf { display: flex; gap: 12px; align-items: flex-start; }
:root body .termin-blatt { flex: none; width: 48px; border-radius: 12px; overflow: hidden; text-align: center; background: var(--m-flaeche);
  box-shadow: 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent); color: var(--m-text); }
:root body .termin-blatt small { display: block; background: var(--m-rot); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 0; }
:root body .termin-blatt b { display: block; font-size: 1.35rem; line-height: 1.5; font-weight: 800; }
:root body .termin-angaben { min-width: 0; display: grid; gap: 3px; }
:root body .termin-art { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
:root body .termin-titel { font-weight: 800; font-size: 1rem; line-height: 1.3; word-break: break-word; }
:root body .termin-zeile { display: flex; gap: 6px; align-items: flex-start; font-size: .86rem; line-height: 1.35; padding: 0; border: 0; background: none; color: inherit; font-family: inherit; text-align: left; }
:root body .termin-zeile i { opacity: .7; margin-top: 1px; }
:root body .termin-ort { cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
:root body .termin-notiz { font-size: .88rem; white-space: pre-wrap; word-break: break-word; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, currentColor 6%, transparent); }
:root body .termin-knoepfe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
:root body .termin-antwort { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; cursor: pointer;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent); background: transparent; color: inherit; font: inherit; font-size: .78rem; font-weight: 700; }
:root body .termin-antwort i { font-size: 1.05rem; }
:root body .termin-antwort:hover { background: color-mix(in srgb, currentColor 7%, transparent); }
:root body .termin-antwort.an[data-t="ja"] { background: #16a34a; border-color: #16a34a; color: #fff; }
:root body .termin-antwort.an[data-t="vielleicht"] { background: #d97706; border-color: #d97706; color: #fff; }
:root body .termin-antwort.an[data-t="nein"] { background: #64748b; border-color: #64748b; color: #fff; }
:root body .termin-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
:root body .termin-wer { border: 0; background: none; padding: 2px 0; color: inherit; font: inherit; font-size: .78rem; opacity: .8; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; }
:root body .termin-kalender { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; padding: 6px 10px; font: inherit; font-size: .8rem; font-weight: 700;
  background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; cursor: pointer; }
:root body .termin.vorbei .termin-blatt { opacity: .6; }
:root body .termin-wer-block { display: grid; gap: 6px; }
:root body .termin-wer-block b { font-size: .86rem; }
:root body .termin-wer-block b small { color: var(--m-leise); font-weight: 700; margin-left: 4px; }
:root body .termin-wer-block > div { display: flex; flex-wrap: wrap; gap: 5px; }
:root body .termin-wer-block span { padding: 4px 9px; border-radius: 999px; background: var(--m-flaeche-2); font-size: .82rem; }

/* Auswählen */
:root body .auswahl-leiste { display: flex; align-items: center; gap: 6px; margin: 0 clamp(8px, 2.4vw, 28px) 12px; padding: 6px; border-radius: 26px;
  background: var(--m-flaeche); color: var(--m-text); box-shadow: 0 6px 24px rgba(40, 20, 12, .12), 0 0 0 1px var(--m-linie); padding-bottom: max(6px, env(safe-area-inset-bottom)); }
:root body .auswahl-leiste.d-none { display: none; }
:root body .auswahl-leiste button { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 21px;
  background: var(--m-flaeche-2); color: var(--m-text); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; }
:root body .auswahl-leiste button:hover:not(:disabled) { background: var(--m-hover); }
:root body .auswahl-leiste button:disabled { opacity: .4; cursor: default; }
:root body .auswahl-leiste button.gefahr { color: #d43c35; }
:root body.dark-mode .auswahl-leiste button.gefahr { color: #f2847d; }
:root body .auswahl-leiste .auswahl-zu { width: 42px; padding: 0; justify-content: center; }
:root body .auswahl-zahl { flex: 1; min-width: 0; font-weight: 800; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { :root body .auswahl-leiste button span { display: none; } :root body .auswahl-leiste button { width: 42px; padding: 0; justify-content: center; } }
:root body.auswahl-modus #sendForm { display: none !important; }
:root body.auswahl-modus .mehr-knopf { visibility: hidden; }
:root body.auswahl-modus .message-row { cursor: pointer; position: relative; padding-left: 38px; -webkit-user-select: none; user-select: none; }
:root body.auswahl-modus .message-row .bubble * { pointer-events: none; }
:root body .auswahl-kreis { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--m-text) 35%, transparent); display: grid; place-items: center; color: transparent; font-size: 13px; background: var(--m-flaeche); }
:root body .message-row.ausgewaehlt .auswahl-kreis { background: var(--m-rot); border-color: var(--m-rot); color: #fff; }
:root body.auswahl-modus .message-row.ausgewaehlt { background: color-mix(in srgb, var(--m-rot) 8%, transparent); border-radius: 12px; }
:root body .termin-gruende { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
:root body .termin-gruende li { display: grid; gap: 1px; padding: 6px 10px; border-radius: 10px; background: var(--m-flaeche-2); font-size: .84rem; }
:root body .termin-gruende li b { font-size: .82rem; }
:root body .termin-gruende li span { color: var(--m-text-2); white-space: pre-wrap; word-break: break-word; }

/* Reihenfolge der Gruppen (CF 15.10.2026) */
:root body .reihen-liste { padding: 4px 0; }
:root body .reihen-zeile { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; border-top: 1px solid var(--m-linie); transition: background .4s; }
:root body .reihen-zeile:first-child { border-top: 0; }
:root body .reihen-zeile.bewegt { background: var(--m-aktiv); }
:root body .reihen-nr { width: 22px; text-align: right; color: var(--m-leise); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
:root body .reihen-name { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root body .reihen-zeile button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--m-flaeche-2); color: var(--m-text-2); display: grid; place-items: center; cursor: pointer; font-size: 1rem; }
:root body .reihen-zeile button:hover:not(:disabled) { background: var(--m-hover); color: var(--m-rot); }
:root body .reihen-zeile button:disabled { opacity: .3; cursor: default; }
/* Auswahl-Modus: Platz für den Kreis – Blasen dürfen nicht über den Rand laufen */
:root body.auswahl-modus .message-row .bubble { max-width: calc(100% - 6px) !important; min-width: 0; }
:root body.auswahl-modus .termin, :root body.auswahl-modus .umfrage { min-width: 0; }
/* Büroklammer: längere Namen („Später senden“) zweizeilig statt abgeschnitten (CF 15.10.2026) */
:root body .attach-menu button span { white-space: normal; text-align: center; line-height: 1.15; overflow: visible; }
/* Als ungelesen markiert (CF 15.10.2026): Punkt statt Zahl */
:root body .badge.ungelesen-punkt { min-width: 12px; width: 12px; height: 12px; padding: 0; border-radius: 50%; }
:root body .nm.nm-klein { width: auto; min-width: 240px; max-width: min(320px, calc(100vw - 16px)); }
/* Chat-Liste: langes Tippen öffnet unser Menü – kein Markieren/Vorschau-Menü des iPhones */
:root body .conversation-item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Betrachter (CF 15.10.2026: „Hochformat-Video wird abgeschnitten“): feste Spur, damit max-height:100 % greift – Bild/Video passt immer ganz hinein */
:root body .betrachter-buehne { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); }
:root body .betrachter-buehne > video { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; background: #000; }
:root body .betrachter-buehne > img { max-width: 100%; max-height: 100%; width: auto; height: auto; min-width: 0; min-height: 0; }

/* Termin in der eigenen Blase (CF 15.10.2026: „etwas zu rot“): helle Karte wie bei den anderen, roter Rand + Kalenderblatt als Akzent */
:root body .message-row.own .bubble.termin-blase { background: var(--m-blase); color: var(--m-blase-text); box-shadow: var(--m-schatten), inset 0 0 0 2px color-mix(in srgb, var(--m-rot) 35%, transparent); }
:root body .message-row.own .bubble.termin-blase .message-meta, :root body .message-row.own .bubble.termin-blase .message-meta > span:last-child,
:root body .message-row.own .bubble.termin-blase .read-receipt { color: var(--m-leise); }
:root body .message-row.own .bubble.termin-blase .read-receipt.is-read { color: #b3261e; }
:root body .message-row.own .bubble.termin-blase .read-receipt.is-read.alle { color: #1a86d0; }
:root body.dark-mode .message-row.own .bubble.termin-blase .read-receipt.is-read { color: #f0a49c; }
:root body.dark-mode .message-row.own .bubble.termin-blase .read-receipt.is-read.alle { color: #7fd3ff; }
:root body .message-row.own .bubble.termin-blase .mehr-knopf { background: rgba(0, 0, 0, .06); color: var(--m-text-2); }
:root body.dark-mode .message-row.own .bubble.termin-blase .mehr-knopf { background: rgba(255, 255, 255, .08); }
:root body .message-row.own .bubble.termin-blase .reaction-chip { background: var(--m-flaeche-2); border-color: var(--m-linie) !important; color: var(--m-text); }
:root body .bubble.termin-blase .termin-titel { color: var(--m-text); }
:root body .bubble.termin-blase .termin-art { color: var(--m-rot); opacity: 1; }
:root body.dark-mode .bubble.termin-blase .termin-art { color: #f0a49c; }
:root body .bubble.termin-blase .termin-antwort:not(.an) { border-color: var(--m-linie); background: var(--m-flaeche-2); }
:root body .bubble.termin-blase .termin-antwort:not(.an):hover { background: var(--m-hover); }
:root body .bubble.termin-blase .termin-kalender { background: var(--m-aktiv); color: var(--m-rot); }
:root body.dark-mode .bubble.termin-blase .termin-kalender { color: #f0a49c; }
:root body .bubble.termin-blase .termin-notiz { background: var(--m-flaeche-2); }
/* Teilen eines PDFs: erst „Drucken“ oder „In einen Chat“ (CF 15.10.2026) */
:root body .teilen-wahl-datei { margin: -2px 0 4px; color: var(--m-leise); font-size: .86rem; word-break: break-word; }
:root body .teilen-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
:root body .teilen-wahl button { display: grid; justify-items: center; gap: 4px; padding: 18px 10px; border: 1px solid var(--m-linie); border-radius: 16px;
  background: var(--m-flaeche-2); color: var(--m-text); font: inherit; cursor: pointer; }
:root body .teilen-wahl button:hover { background: var(--m-hover); }
:root body .teilen-wahl button i { font-size: 1.9rem; color: var(--m-rot); }
:root body.dark-mode .teilen-wahl button i { color: #f0a49c; }
:root body .teilen-wahl button b { font-size: 1rem; }
:root body .teilen-wahl button small { color: var(--m-leise); font-size: .78rem; }
/* Betrachter (CF 15.10.2026: „beim Abspielen in der iOS-App ist unten die Leiste zu weit unten“): Abstand über dem Home-Balken,
   damit die Abspielleiste eines Videos nicht unter dem Balken bzw. am Rand klebt */
:root body .betrachter-buehne { padding-bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 16px)); }

/* Speicher auf diesem Gerät (CF 17.10.2026) */
:root body .geraet-speicher-stand { display: flex; align-items: center; gap: 12px; padding: 8px 8px 4px; }
:root body .geraet-speicher-stand small { display: block; color: var(--m-text-2); font-size: .78rem; line-height: 1.35; margin-top: 2px; }
:root body .geraet-grenze > button { min-height: 36px; font-size: .82rem; padding: 0 4px; }
:root body .geraet-speicher-leeren { display: flex; justify-content: center; padding: 10px 0 6px; }
:root body .geraet-speicher-leeren .einst-link { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: #c0262d; }
:root body.dark-mode .geraet-speicher-leeren .einst-link { color: #f2847d; }

/* Meine Geräte (CF 17.10.2026) */
:root body .geraet-zeile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
:root body .geraet-zeile + .geraet-zeile { border-top: 1px solid var(--m-linie); }
:root body .geraet-zeile .einst-zeile-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
:root body .geraet-zeile .einst-zeile-text b { overflow-wrap: anywhere; }
:root body .geraet-dieses { margin-left: 6px; font-size: .7rem; vertical-align: 2px; }
:root body .geraet-push { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; margin-top: 2px; }
:root body .geraet-push.an { color: #2f7d47; }
:root body.dark-mode .geraet-push.an { color: #6fd08f; }
:root body .geraet-push.aus, :root body .geraet-push.uhr { color: var(--m-leise); }
:root body .einst-link.geraet-weg { flex: none; color: #c0262d; }
:root body.dark-mode .einst-link.geraet-weg { color: #f2847d; }

/* „Gespeichert“ (CF 17.10.2026, wie Telegram) */
:root body .gespeichert-avatar { background: linear-gradient(135deg, #b3262d, #7a0f2b) !important; color: #fff !important; box-shadow: none !important; border: 0 !important; }
:root body .gespeichert-avatar .bi { font-size: 1.15em; }

/* Player wie Telegram (CF 17.10.2026) – Leiste oben im Chat */
:root body .player-leiste { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 10px 8px 8px; background: var(--m-flaeche);
  border-bottom: 1px solid var(--m-linie); box-shadow: 0 2px 10px rgba(40, 20, 12, .05); z-index: 3; }
:root body .player-leiste[hidden] { display: none; }
:root body .player-leiste button { border: 0; background: none; color: var(--m-text); font: inherit; padding: 0; cursor: pointer; }
:root body .pl-spielen { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--m-ich) !important; color: #fff !important;
  display: grid; place-items: center; font-size: 1.05rem; box-shadow: 0 3px 10px rgba(139, 20, 13, .25); }
:root body .pl-text { flex: 1; min-width: 0; display: grid; text-align: left; line-height: 1.2; padding: 2px 4px !important; }
:root body .pl-text b { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root body .pl-text small { font-size: .74rem; color: var(--m-leise); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root body .pl-sprung, :root body .pg-sprung { position: relative; display: grid; place-items: center; }
:root body .pl-sprung { width: 36px; height: 36px; color: var(--m-text-2) !important; font-size: 1.25rem; border-radius: 50%; }
:root body .pl-sprung span, :root body .pg-sprung span { position: absolute; font-size: .5rem; font-weight: 800; top: 50%; left: 50%; transform: translate(-50%, -38%); }
:root body .pl-sprung:hover, :root body .pl-zu:hover { background: var(--m-hover) !important; }
:root body .pl-tempo { flex: none; min-width: 34px; height: 24px; border-radius: 12px !important; background: var(--m-flaeche-2) !important; box-shadow: 0 0 0 1px var(--m-linie);
  font-size: .74rem !important; font-weight: 800; color: var(--m-text-2) !important; padding: 0 7px !important; }
:root body .pl-zu { flex: none; width: 32px; height: 32px; border-radius: 50%; color: var(--m-leise) !important; display: grid; place-items: center; }
:root body .pl-fortschritt { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; cursor: pointer; }
:root body .pl-fortschritt::before { content: ""; position: absolute; inset: 1px 0; background: var(--m-linie); }
:root body .pl-fortschritt span { position: absolute; left: 0; top: 1px; bottom: 1px; width: 0; background: var(--m-rot); transition: width .25s linear; }
body.dark-mode .pl-fortschritt span { background: #e36b5c; }

/* Großer Player (Blatt von unten) */
.player-gross-hintergrund { position: fixed; inset: 0; z-index: 2000; background: rgba(20, 10, 8, 0); pointer-events: none; transition: background .25s; display: flex; align-items: flex-end; justify-content: center; }
.player-gross-hintergrund.offen { background: rgba(20, 10, 8, .45); pointer-events: auto; }
.player-gross { width: min(520px, 100%); background: var(--m-flaeche); color: var(--m-text); border-radius: 26px 26px 0 0; padding: 12px 22px calc(26px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); transform: translateY(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); display: grid; justify-items: center; gap: 6px; }
.player-gross-hintergrund.offen .player-gross { transform: none; }
.player-gross button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.pg-kopf { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pg-runter { width: 40px; height: 40px; border-radius: 50%; font-size: 1.3rem; color: var(--m-leise) !important; }
.pg-zurnachricht { font-size: .85rem !important; font-weight: 700; color: var(--m-rot) !important; display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px !important; border-radius: 18px; background: var(--m-hover) !important; }
body.dark-mode .pg-zurnachricht { color: #f0a49c !important; }
.pg-symbol { width: 132px; height: 132px; border-radius: 30px; background: var(--m-ich); color: #fff; display: grid; place-items: center; font-size: 3.4rem; box-shadow: 0 12px 30px rgba(139, 20, 13, .3); margin: 6px 0 12px; }
.pg-titel { font-size: 1.15rem; font-weight: 800; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.pg-von { font-size: .85rem; color: var(--m-leise); text-align: center; margin-bottom: 10px; }
.pg-regler { width: 100%; height: 22px; -webkit-appearance: none; appearance: none; background: transparent; margin: 4px 0 0; }
.pg-regler::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--m-rot) var(--anteil, 0%), var(--m-linie) var(--anteil, 0%)); }
.pg-regler::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--m-rot) var(--anteil, 0%), var(--m-linie) var(--anteil, 0%)); }
.pg-regler::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; margin-top: -6px; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); }
.pg-regler::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); }
.pg-zeiten { width: 100%; display: flex; justify-content: space-between; font-size: .78rem; color: var(--m-leise); font-variant-numeric: tabular-nums; }
.pg-knoepfe { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0 14px; }
.pg-knoepfe button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; color: var(--m-text) !important; }
.pg-knoepfe button:disabled { opacity: .3; cursor: default; }
.pg-knoepfe button:not(:disabled):not(.pg-spielen):hover { background: var(--m-hover) !important; }
.pg-knoepfe .pg-spielen { width: 72px; height: 72px; background: var(--m-ich) !important; color: #fff !important; font-size: 2rem; box-shadow: 0 8px 22px rgba(139, 20, 13, .35); }
.pg-sprung span { font-size: .55rem !important; }
.pg-tempo { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--m-flaeche-2); box-shadow: 0 0 0 1px var(--m-linie); }
.pg-tempo button { min-width: 50px; height: 34px; border-radius: 10px; font-size: .82rem !important; font-weight: 800; color: var(--m-text-2) !important; }
.pg-tempo button.an { background: var(--m-ich) !important; color: #fff !important; }

/* Liste mit Knöpfen ! / X vom TKCBot (CF 20.10.2026, Solostunden-Erinnerung): ! rot, X grau – gedrückt = voll gefärbt */
:root body .checkliste { min-width: min(260px, 66vw); max-width: 360px; display: grid; gap: 2px; margin: 2px 0 4px; }
:root body .checkliste-titel { font-weight: 800; font-size: .98rem; line-height: 1.3; }
:root body .checkliste-unter { font-size: .8rem; opacity: .75; margin: 0 0 6px; }
:root body .checkliste-zeilen { display: grid; gap: 3px; }
:root body .cl-zeile { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-radius: 11px; transition: background .15s; }
:root body .cl-zeile span { flex: 1; min-width: 0; font-size: .98rem; overflow-wrap: anywhere; transition: opacity .15s; }
:root body .cl-knopf { flex: none; width: 40px; height: 34px; padding: 0; border-radius: 10px; border: 1.5px solid; font: inherit; font-weight: 900; font-size: 1.02rem;
  line-height: 1; display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, transform .1s; -webkit-tap-highlight-color: transparent; }
:root body .cl-knopf:active { transform: scale(.92); }
:root body .cl-rot { background: #fdecec; color: #c62828; border-color: #f0b3b3; }
:root body .cl-rot.an { background: #d32f2f; color: #fff; border-color: #d32f2f; }
:root body .cl-grau { background: #eef0f3; color: #475569; border-color: #cbd2da; }
:root body .cl-grau.an { background: #64748b; color: #fff; border-color: #64748b; }
:root body .cl-zeile.rot { background: #fdecec; }
:root body .cl-zeile.rot span { color: #b71c1c; font-weight: 800; }
:root body .cl-zeile.grau span { opacity: .4; text-decoration: line-through; }
:root body .cl-zeile.grau .cl-rot { opacity: .45; }
:root body.dark-mode .cl-rot { background: #3b1d20; color: #ff8a80; border-color: #7a3438; }
:root body.dark-mode .cl-rot.an { background: #e53935; color: #fff; border-color: #e53935; }
:root body.dark-mode .cl-grau { background: #2a2b30; color: #cbd2da; border-color: #4a4d55; }
:root body.dark-mode .cl-grau.an { background: #94a3b8; color: #111; border-color: #94a3b8; }
:root body.dark-mode .cl-zeile.rot { background: #3b1d20; }
:root body.dark-mode .cl-zeile.rot span { color: #ff8a80; }
