/* =====================================================================
   IR App — Weboberfläche
   Design eng an der Original-Community-Plattform (coapp) orientiert:
   warmer grauer Hintergrund, flache weiße Karten (kein Schlagschatten,
   Radius 18px), rote Autorennamen, zentrale Suche, „Manage"-Button.
   ===================================================================== */

@import url('tokens.css');   /* DIE Token-Quelle (CI, 15.09.2026) — seit 18.09.2026 auch für die App (Redesign P1) */
@import url('intro.css');
@import url('bausteine.css'); /* Bausteine aller Ebenen: Dialog, Claim-Zug (18.09.2026) */
@import url('symbole.css');   /* Liniensymbole (Redesign P1) */
@import url('mein-tag.css');  /* Bausteine Tagesblock, Kopf, Navigation, Mehr-Menü, Desktop-Raster (Redesign P1) */

/* App-Redesign P1 (Thomas 18.09.2026, Go für Test): Die App liest dieselben Token wie Backend und Frontend —
   Farben, Schriftstapel, Schatten stehen NUR in tokens.css. Die alten App-Namen (--red, --surface, --line, --ink-soft,
   --ink-faint, --font, --online, --red-tint …) sind Aliase auf den Kern und laufen aus; tokens.css führt die meisten
   schon, die übrigen stehen hier. Kein Hex mehr in dieser Datei, auch nicht als Fallback (Hook Abschnitt 1).
   Dunkelmodus: tokens.css schaltet ihn nach Systemeinstellung — die App bleibt vorerst bewusst HELL (data-theme=
   "light" setzt app.js beim Start), weil Bestandsansichten noch feste Weißwerte tragen; Dunkel ist ein eigenes Paket. */
:root {
  --surface: var(--bg);            /* Seitengrund */
  --line: var(--rule);             /* Standardlinie */
  --line-strong: var(--rule);      /* vorher eine Stufe dunkler — im Kern gibt es eine Linie und eine leisere (--rule-2) */
  --ink-soft: var(--ink-2);
  --ink-faint: var(--ink-3);
  --brand-grey: var(--ink-2);      /* warmes Grau aus dem Logo — nur noch an einer Stelle, geht im Kern auf */
  --radius: 18px;
  --radius-sm: 12px;
  --nav-w: 236px;
  --right-w: 300px;
  --header-h: 64px;
  --meldung-oben: calc(var(--header-h) + 12px);   /* Kurzmeldungen (IR.meldung) unter dem App-Kopf, bausteine.css */
}

/* Schriften: Inter (Text), Montserrat (Überschriften), Rock Salt (Claim) kommen aus tokens.css — die eine Stelle seit 18.09.2026. */
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.01em; }

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Tastaturbedienung: Wer mit Tabulator arbeitet, muss sehen, wo er steht.
   :focus-visible statt :focus — beim Antippen und Klicken erscheint kein Ring. */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Wer im Betriebssystem weniger Bewegung eingestellt hat, bekommt sie nicht.
   Betrifft auch Menschen, die auf Bewegung mit Schwindel reagieren. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px; background: var(--surface);
}
.boot-logo { width: 72px; height: 72px; display: flex; align-items: center; justify-content: center; }
/* Der Vereinsclaim. Steht überall dort, wo das Logo steht — außer in der
   Kopfleiste: Dort nimmt schon der Schriftzug ein Drittel des Telefons ein. */
.claim { font-family: 'Rock Salt', 'Segoe Print', cursive; font-size: 12.5px;
         color: var(--ir-red); margin-top: 8px; }
.boot-logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
/* Dasselbe Muster wie .mark (09.09.2026): Ein Bild, das PASSEN soll, wird ueber max-* begrenzt und vom
   Flex-Kasten zentriert — nie ueber width/height:100%. Prozenthoehen an einem Bild sind in Grid- und
   Flex-Zellen nicht verlaesslich; das Signet ist hochkant (630x847) und lief deshalb zweimal aus der Kachel. */
.boot-spin, .spin {
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid var(--line-strong); border-top-color: var(--red);
  animation: spin .7s linear infinite; margin: 10px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   Login
   ===================================================================== */
.login-wrap {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--surface);
}
.login-card {
  width: 100%; max-width: 400px; background: var(--card);
  border-radius: var(--radius); border: 1px solid var(--line); padding: 34px 30px;
}
.login-brand { display: flex; align-items: center; justify-content: center; margin-bottom: 26px; }
.login-brand .login-logo { height: 46px; width: auto; display: block; }
/* Kanzlei-Branding am Login (08.09.2026): Logo + Name der Kanzlei unter dem Ring-Logo —
   Farbe und Layout bleiben die des Rings (Doppelbranding). */
.login-kanzlei { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: -8px 0 20px; }
.login-kanzlei img { max-height: 56px; max-width: 220px; width: auto; height: auto; object-fit: contain; display: block; }
.login-kanzlei .kanzlei-name { font-size: 13px; color: var(--ink-soft); }
/* Kanzlei-Logos in Listen: eine Kachel für alle Formate (quer, hoch, quadratisch). */
.logo-tile { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 32px; padding: 3px 6px; box-sizing: border-box; background: #fff; border: 1px solid var(--line); border-radius: 8px; flex-shrink: 0; overflow: hidden; color: var(--ink-soft); font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.logo-tile img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.logo-tile.lg { width: 120px; height: 52px; padding: 6px 10px; border-radius: 12px; font-size: 14px; }
.member-card .company { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.member-card .company .logo-tile { width: 96px; height: 40px; border: 0; padding: 2px 4px; }
.login-card h1 { font-size: 21px; margin-bottom: 4px; text-align: center; }
.login-card p.sub { color: var(--ink-soft); margin-bottom: 16px; font-size: 14px; text-align: center; }
.login-note { font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-bottom: 20px; text-align: center; }

/* Einwilligungs-Banner für Web-Analyse (Google Analytics) */
#ga-consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2000;
  max-width: 520px; margin: 0 auto; background: var(--card);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(31,35,40,.18); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
}
#ga-consent .ga-c-body strong { font-size: 14.5px; }
#ga-consent .ga-c-body p { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
#ga-consent .ga-c-body a { color: var(--red); }
#ga-consent .ga-c-actions { display: flex; gap: 10px; justify-content: flex-end; }
#ga-consent .ga-btn {
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
#ga-consent .ga-btn.ga-yes { background: var(--red); color: #fff; border-color: var(--red); }
@media (max-width: 520px) {
  #ga-consent .ga-c-actions { justify-content: stretch; }
  #ga-consent .ga-btn { flex: 1; }
}

.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  background: var(--red); color: #fff; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: var(--surface); color: var(--ink); }
.btn.sm { padding: 8px 14px; font-size: 13px; }

.form-error { background: var(--red-soft); color: var(--red-dark); padding: 11px 13px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.form-ok { background: #E9F7EF; color: #1A7A44; padding: 11px 13px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 14px; }
.link-btn { color: var(--red); font-weight: 600; font-size: 13.5px; background: none; }
.link-btn:hover { text-decoration: underline; }

/* Modal-Overlay (z. B. Passwort vergessen) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px;
  background: rgba(20, 25, 35, .45); backdrop-filter: blur(2px);
}
.modal-overlay .login-card { max-width: 400px; }

/* Gefahrenzone / Konto löschen */
.danger-zone { border-color: #F3C9CB; }

/* Admin: Mitglieder verwalten */
.manage-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 4px; border-top: 1px solid var(--line); }
.manage-row:first-child { border-top: none; }
.manage-actions { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.status-pill { font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.status-pill.on { background: #E9F7EF; color: #1A7A44; }
.status-pill.off { background: var(--surface); color: var(--ink-faint); border: 1px solid var(--line-strong); }
.reset-link-box { flex-basis: 100%; margin-top: 8px; background: var(--surface); border-radius: 10px; padding: 12px; }
.reset-link-box input { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12px; background: #fff; }

/* Social-Login */
.social-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.social-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  transition: background .12s, border-color .12s;
}
.social-btn:hover { background: var(--surface); }
.social-btn .g-ic { width: 18px; height: 18px; flex-shrink: 0; }
.social-btn.apple { background: #000; color: #fff; border-color: #000; }
.social-btn.apple:hover { background: #1a1a1a; }
.social-btn.facebook { background: #1877F2; color: #fff; border-color: #1877F2; }
.social-btn.facebook:hover { background: #1568d8; }
.divider { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; color: var(--ink-faint); font-size: 12.5px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
.login-legal { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-faint); display: flex; gap: 10px; justify-content: center; }
.login-legal a { color: var(--ink-soft); }
.login-legal a:hover { color: var(--red); }

/* =====================================================================
   App-Layout & Header
   ===================================================================== */
/* Die Kopfzeile war die Ursache des waagrechten Überlaufens: Sie ist eine
   Flex-Zeile ohne Umbruch, in der weder Logo noch Knopfleiste schrumpfen
   durften. Bei Vorstand + Admin standen dort sechs Bedienelemente und der
   ausgeschriebene Schriftzug — zusammen 555 px auf einem 411 px breiten
   Telefon. Ein zu breiter Kopf zieht die GANZE Seite mit: Am Handy weitet
   sich dann das Layoutfenster auf die Inhaltsbreite, alles wird kleiner
   gerechnet, und feststehende Elemente (der ＋-Knopf unten rechts) landen
   ausserhalb des Bildschirms.
   Deshalb: Beides darf schrumpfen, und die Knopfleiste blättert im Notfall
   in sich selbst, statt die Seite breiter zu machen. */
.app-header {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  display: flex; align-items: center; gap: 10px; padding: 0 14px;   /* Basis: Handy */
  background: var(--surface); border-bottom: 1px solid var(--line);
}
@media (min-width: 701px) { .app-header { gap: 18px; padding: 0 22px; } }
.app-header .brand { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; }
.app-header .brand .brand-logo {
  height: 30px; width: auto; display: block;
  max-width: 100%; object-fit: contain; object-position: left center;
}

/* Kopfsuche: am Handy kein Platz (Suche über die Navigation), ab Tablet sichtbar */
.header-search { display: none; flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.header-search input {
  width: 100%; padding: 10px 16px 10px 40px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: #fff; font-size: 14px;
}
.header-search input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.header-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-size: 15px; }

/* Letzte Sicherung: Kommt je ein Knopf dazu oder wächst die Schrift, blättert
   diese Leiste waagrecht in sich selbst — wie die Kanalleiste darunter — statt
   die Seite zu verbreitern. `overflow-y: hidden` verhindert dabei eine
   senkrechte Leiste in der nur 64 px hohen Kopfzeile. */
.header-actions {
  display: flex; align-items: center; gap: 8px;
  flex: 0 1 auto; min-width: 0; margin-left: auto;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.header-actions::-webkit-scrollbar { display: none; }
.header-actions > * { flex: none; }
.round-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line-strong); color: var(--ink-soft); font-size: 17px;
  position: relative; transition: background .12s;
}
.round-btn:hover { background: var(--surface); color: var(--ink); }
.round-btn .badge-dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 1.5px solid #fff; }
/* Basis = Handy: rotes Rund wie die übrigen Kopfknöpfe, Beschriftung erst,
   wenn Platz ist. Ein Textknopf kostet hier 83–107 px, ein rundes Zeichen 40. */
.btn-manage {
  background: var(--red); color: #fff; border-radius: 50%;
  width: 40px; height: 40px; padding: 0; display: grid; place-items: center;
  font-weight: 700; font-size: 17px; white-space: nowrap;
}
.btn-manage:hover { background: var(--red-dark); }

/* Was am Handy weicht bzw. erscheint. Kein allgemeiner Helfer, sondern je
   Element benannt: `display` ist bei Bild, Link und Span verschieden. */
.app-header .brand-logo.nur-breit,
.app-header .round-btn.nur-breit,
.app-header .btn-manage.nur-breit,
.app-header .btn-manage .nur-breit { display: none; }

@media (min-width: 701px) {
  .app-header .round-btn.nur-breit { display: grid; }
  .btn-manage {
    width: auto; height: auto; border-radius: 999px;
    padding: 9px 20px; font-size: 14px; display: inline-flex; align-items: center;
  }
  .app-header .brand-logo.nur-breit { display: block; }
  .app-header .btn-manage.nur-breit { display: inline-flex; }
  .app-header .btn-manage .nur-breit { display: inline; }
  .app-header .brand-logo.nur-schmal,
  .app-header .btn-manage .nur-schmal { display: none; }
}

/* MOBILE FIRST: Basis ist das Handy — eine Spalte, Platz unten für die
   Bottom-Navigation. Größere Bildschirme erweitern das weiter unten. */
.layout {
  max-width: 640px; margin: 0 auto; padding: 14px 12px 88px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
  align-items: start;
}
.col-left, .col-right { display: none; }
.col-sticky { position: sticky; top: calc(var(--header-h) + 22px); }

/* ---- linke Navigation: direkt auf dem Hintergrund, keine Karte ---- */
.channel-nav { display: flex; flex-direction: column; gap: 2px; }
.channel-nav .nav-item {
  display: flex; align-items: center; gap: 13px; width: 100%;
  padding: 10px 14px; border-radius: 999px; color: var(--ink); font-weight: 500; font-size: 14.5px;
  text-align: left; transition: background .12s;
}
.channel-nav .nav-item:hover { background: #EFEEED; }
.channel-nav .nav-item.active { background: var(--red-tint); color: var(--ink); font-weight: 600; }
.channel-nav .nav-item .ic { width: 22px; text-align: center; flex-shrink: 0; font-size: 16px; opacity: .85; }
.channel-nav .nav-item .count { margin-left: auto; font-size: 12px; color: var(--ink-faint); font-weight: 500; }
.channel-nav .sep { height: 1px; background: var(--line-strong); margin: 8px 12px; }
.channel-nav .add-channel {
  display: flex; align-items: center; gap: 10px; margin-top: 6px;
  padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-soft); font-weight: 600; font-size: 14px; align-self: flex-start;
}
.channel-nav .add-channel:hover { background: var(--surface); }

/* ---- Mittelspalte ---- */
.feed { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }

.composer { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 16px; }
.composer .composer-top { display: flex; align-items: center; gap: 12px; }
.composer textarea {
  /* Mindesthöhe mit der Schrift, nicht fest: Bei vergrösserter Anzeige wurde
     „Beitrag erstellen …" sonst in 46 px waagrecht abgeschnitten. */
  width: 100%; border: 1px solid var(--line-strong); resize: none;
  min-height: calc(1.6em + 26px); max-height: 300px;
  padding: 12px 16px; background: var(--surface); border-radius: 999px; transition: border-radius .15s;
}
.composer textarea:focus { outline: none; border-color: var(--red); background: #fff; border-radius: 16px; box-shadow: 0 0 0 3px var(--red-soft); }
/* Umbruch statt Überlauf: Die Kanalauswahl ist so breit wie ihr längster
   Eintrag („Gemeinschaftsgeschäft", 201 px) — mit Symbolen und Absendeknopf
   passt das auf 320 px nicht in eine Zeile. */
.composer .composer-bar { display: none; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.composer.open .composer-bar { display: flex; }
.composer.open textarea { border-radius: 16px; background: #fff; }
.composer select {
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--ink-soft); font-size: 13.5px;
  flex: 1 1 130px; min-width: 0; max-width: 100%;
}
.composer .btn { margin-left: auto; }

/* ---- Beitrag ---- */
.post { padding: 20px 22px; }
.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-head .meta { min-width: 0; }
.post-head .name { font-weight: 700; color: var(--red); font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
.post-head .name .who { color: var(--red); }
.post-head .time { font-size: 13px; color: var(--ink-faint); }
.post-head .sub { font-size: 13px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-channel { font-size: 11px; font-weight: 700; color: var(--red-dark); background: var(--red-soft); padding: 2px 9px; border-radius: 999px; }
.admin-tag { font-size: 10.5px; font-weight: 700; color: var(--ink-faint); background: var(--surface); border: 1px solid var(--line-strong); padding: 1px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }

/* Der Text übernommener coapp-Beiträge ist fremdes HTML. `overflow-wrap:
   anywhere` (nicht `break-word`) bricht auch eine 200 Zeichen lange Adresse
   und zählt beim Mindestmass mit — nur so kann ein einzelnes Wort die Karte
   nicht mehr aufziehen. Tabellen und Codeblöcke lassen sich nicht umbrechen;
   sie blättern deshalb in sich selbst. */
.post-body { color: var(--ink); overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.post-body img, .post-body video, .post-body iframe { max-width: 100%; height: auto; }
.post-body table { display: block; max-width: 100%; overflow-x: auto; }
.post-body pre { max-width: 100%; overflow-x: auto; }
.post-body p { margin: 0 0 10px; }
.post-body p:last-child { margin-bottom: 0; }
.post-body a { color: var(--red); text-decoration: none; }
.post-body a:hover { text-decoration: underline; }
.post-body.clamp { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.show-more { display: block; margin: 10px auto 0; padding: 7px 16px; border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-weight: 600; font-size: 13px; }
.show-more:hover { background: #EDECEB; }

.post-menu { margin-left: auto; position: relative; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-faint); transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--surface); color: var(--ink); }

/* Bildergalerie */
.post-images { margin-top: 14px; border-radius: 14px; overflow: hidden; display: grid; gap: 3px; }
.post-images img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; background: var(--surface); cursor: pointer; transition: opacity .12s; }
.post-images img:hover { opacity: .93; }
.post-images.n-1 { grid-template-columns: 1fr; }
.post-images.n-1 img { aspect-ratio: auto; height: auto; max-height: min(70vh, 640px); object-fit: contain; }   /* ein einzelnes Foto ganz, eigenes Seitenverhältnis, nach oben gedeckelt — Thomas 20.09. 00:1x: „die Fotos sind alle abgeschnitten“ (Hochformat 924×2000 war auf 3:2 beschnitten); Mehrbild-Raster bleiben Kacheln */
.post-images.n-2, .post-images.n-3, .post-images.n-4 { grid-template-columns: 1fr 1fr; }
.post-images.n-3 img:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
.post-images .more-wrap { position: relative; }
.post-images .more-badge { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20,30,45,.55); color: #fff; font-size: 26px; font-weight: 700; cursor: pointer; }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(15,20,30,.9); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }

/* Avatare */
.avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; position: relative; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 15px; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--online); border: 2px solid #fff; }

/* Reaktionen + Aktionen */
.post-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.react-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-width: 0; }
/* Basis = Handy: `min-height` und `min-width` sorgen für eine Fläche, die man
   mit dem Daumen trifft. Ohne sie wäre der Knopf 30 px hoch — beim häufigsten
   Handgriff der App zu wenig. Die Leiste bricht um, die Knöpfe machen die
   Seite also nicht breiter. */
.react-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; min-width: 44px; padding: 6px 13px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-strong);
  font-size: 15px; font-weight: 600; color: var(--ink-soft);
  transition: background .12s, border-color .12s;
}
.react-chip:hover { background: var(--surface); }
.react-chip.mine { background: var(--red-soft); border-color: #F0C9CB; color: var(--red-dark); }
/* Noch von niemandem gedrückt: gestrichelter Rand statt Zahl — man sieht auf
   einen Blick, dass hier nichts gezählt wird, ohne dass eine „0" dasteht. */
.react-chip.leer { border-style: dashed; color: var(--ink-faint); }
.react-chip.react-add { color: var(--ink-faint); font-size: 17px; padding: 6px 12px; }
.action-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px; }
.action-link:hover { background: var(--surface); }
.action-link.right { margin-left: auto; }
.post-actions .spacer { margin-left: auto; }

/* Kommentare */
.comments { border-top: 1px solid var(--line); margin: 16px -22px -20px; padding: 16px 22px; background: #FBFBFA; display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { background: var(--surface); border-radius: 14px; padding: 9px 14px; min-width: 0; }
.comment .bubble .name { font-weight: 700; font-size: 13px; color: var(--red); }
.comment .bubble .text { font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.comment .time { font-size: 11.5px; color: var(--ink-faint); margin-top: 3px; padding-left: 4px; }
.comment-form { display: flex; gap: 10px; align-items: flex-start; }
.comment-form textarea { flex: 1; border: 1px solid var(--line-strong); border-radius: 18px; padding: 10px 14px; resize: none; min-height: 42px; background: #fff; }
.comment-form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

/* Popover — hängt am Körper, `openPopover()` setzt top/left in Bildschirmmassen.
   `fixed` statt `absolute`: So kann kein Vorfahre es beschneiden oder verschieben. */
.popover {
  position: fixed; top: 0; left: 0; z-index: 60;
  max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 10px 34px rgba(20,30,45,.14); padding: 6px;
}
/* Umbruch, damit sechs Reaktionen auch bei vergrösserter Schrift auf 320 px passen. */
.reaction-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 100%; }
.reaction-picker button { font-size: 22px; padding: 5px 7px; border-radius: 10px; transition: transform .1s, background .1s; }
.reaction-picker button:hover { background: var(--surface); transform: scale(1.25); }
.menu-list button { display: block; width: 100%; text-align: left; padding: 9px 16px; border-radius: 8px; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.menu-list button:hover { background: var(--surface); }
.menu-list button.danger { color: var(--red); }

/* ---- Benachrichtigungen (#/meldungen) ----
   Mobile first: eine Spalte, ganze Zeile antippbar, mindestens 56 px hoch.
   Alle Breitenmasse sind verhältnismässig oder 0 — die Liste kann die Seite
   nicht verbreitern, auch nicht bei sehr langen Auszügen. */
.meldung-liste { display: flex; flex-direction: column; gap: 8px; }
.meldung {
  display: flex; align-items: flex-start; gap: 12px;
  min-height: 56px; padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink); text-align: left; min-width: 0;
}
a.meldung:hover { background: var(--surface); }
/* Gelesenes verschwindet nicht, es wird nur unauffälliger. */
.meldung.gelesen { background: transparent; border-color: transparent; opacity: .62; }
.meldung.ohne-ziel { cursor: default; }
.meldung-sym {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); font-size: 16px;
}
.meldung .avatar { flex: none; }
.meldung-txt { min-width: 0; flex: 1; }
.meldung-txt .titel { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.meldung-txt .anriss { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; overflow-wrap: anywhere; }
.meldung-txt .zeit { font-size: 11.5px; color: var(--ink-faint); margin-top: 4px; }
.meldung .neu-punkt {
  flex: none; align-self: center; width: 9px; height: 9px;
  border-radius: 50%; background: var(--red);
}
.meldung .gelesen-knopf {
  flex: none; align-self: center; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-faint);
  border: 1px solid var(--line-strong); background: #fff; font-size: 14px;
}
.meldung .gelesen-knopf:hover { background: var(--surface); color: var(--ink); }

/* ---- rechte Widgets ---- */
.widget { margin-bottom: 22px; }
.widget-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 0 6px; }
.widget-head .w-ic { color: var(--ink-soft); font-size: 16px; }
.widget-head h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.widget-head .chev { margin-left: auto; color: var(--ink-faint); }
.widget .row { display: flex; align-items: center; gap: 11px; padding: 7px 6px; border-radius: 10px; }
.widget a.row:hover { background: #EFEEED; }
.widget .row .meta { min-width: 0; }
.widget .row .name { font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget .row .sub { font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget .add-row { display: flex; align-items: center; gap: 11px; padding: 8px 6px; color: var(--red); font-weight: 600; font-size: 14px; }
.widget .add-row .plus { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.event-mini { display: flex; gap: 12px; padding: 8px 6px; align-items: center; border-radius: 10px; }
.event-mini:hover { background: #EFEEED; }
.event-mini .thumb { width: 46px; height: 46px; border-radius: 10px; background: var(--red-soft); color: var(--red-dark); display: grid; place-items: center; text-align: center; flex-shrink: 0; line-height: 1.1; }
.event-mini .thumb .d { font-weight: 800; font-size: 16px; }
.event-mini .thumb .m { font-size: 10px; text-transform: uppercase; }

/* Vorgeschlagene Inhalte (horizontale Kartenreihe) */
.suggested { margin-bottom: 4px; }
.suggested .sug-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; }
.suggested .sug-head .t { font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.suggested .sug-head .reload { font-size: 13px; color: var(--red); font-weight: 600; cursor: pointer; }
.sug-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.sug-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sug-card .sug-img { height: 110px; background: linear-gradient(135deg, var(--red-soft), #fff); display: grid; place-items: center; color: var(--red); font-size: 30px; }
.sug-card .sug-t { padding: 9px 11px; font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =====================================================================
   Seiten (Mitglieder, Events, Profil)
   ===================================================================== */
.page { max-width: 900px; margin: 0 auto; padding: 14px 12px 88px; }
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.page-head h1 { font-size: 23px; min-width: 0; overflow-wrap: anywhere; }
.page-head .btn { margin-left: auto; }

.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.member-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; transition: border-color .12s; }
/* `align-items: center` gibt jedem Kind seine Wunschbreite — ohne diese
   Schranke wächst „Gerhard Grosschädl" bei vergrösserter Schrift auf 547 px
   und ragt links wie rechts aus der Karte. */
.member-card > * { max-width: 100%; overflow-wrap: anywhere; }
.member-card:hover { border-color: var(--line-strong); }
.member-card .avatar { width: 62px; height: 62px; font-size: 21px; margin-bottom: 6px; }
.member-card .name { font-weight: 700; color: var(--ink); }
.member-card .company { font-size: 13px; color: var(--ink-soft); }
.member-card .role { font-size: 12px; color: var(--ink-faint); }

.event-list { display: flex; flex-direction: column; gap: 14px; }
.event-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; gap: 16px; }
.event-card .date-box { width: 64px; height: 64px; border-radius: 12px; background: var(--red); color: #fff; display: grid; place-items: center; text-align: center; flex-shrink: 0; line-height: 1.15; }
.event-card .date-box .d { font-weight: 800; font-size: 22px; }
.event-card .date-box .m { font-size: 11px; text-transform: uppercase; }
.event-card .info { flex: 1; min-width: 0; }
.event-card .info h3 { font-size: 17px; margin-bottom: 4px; }
.event-card .info .where { font-size: 13px; color: var(--ink-soft); }
.event-card .rsvp { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.chip-toggle { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--ink-soft); background: #fff; }
.chip-toggle.on { background: var(--red); color: #fff; border-color: var(--red); }
.chip-toggle.on.ja { background: var(--st-done); border-color: var(--st-done); }   /* Zusage grün, Absage bleibt rot — Thomas 20.09. 00:23 „Zusage tippen … müsste grün werden“; Klassen ja/nein aus events.js/sitzung.js */

.empty { text-align: center; color: var(--ink-faint); padding: 50px 20px; }
.empty .big { font-size: 34px; margin-bottom: 10px; }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 8px 30px rgba(20,30,45,.2); animation: toast-in .2s ease; }
.toast.err { background: var(--red-dark); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* Bottom-Navigation: am Handy die Hauptnavigation (Basis), ab Tablet ausgeblendet */
.bottom-nav {
  display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-strong); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0; min-height: 44px;            /* Touch-Ziel */
  color: var(--ink-faint); font-size: 11px; font-weight: 600;
}
.bottom-nav a.active { color: var(--red); }
.bottom-nav a .ic { font-size: 20px; }
.fab {
  position: fixed; right: 18px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 41;
  width: 56px; height: 56px; border-radius: 18px; background: var(--red); color: #fff;
  display: grid; place-items: center; font-size: 26px; box-shadow: 0 8px 30px rgba(193,39,45,.4);
}

/* =====================================================================
   Responsiv
   ===================================================================== */
/* Auswahl-Chips (Funktionen, Regionen) — Mehrfachauswahl per Antippen.
   Touch-Ziel bewusst ≥ 40px hoch (mobile first). */
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.sel-chip {
  padding: 10px 15px; min-height: 42px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--card);
  color: var(--ink-soft); font-size: 14px; font-weight: 600;
}
.sel-chip.active { background: var(--red); border-color: var(--red); color: #fff; }
/* Vereinsamt: reine Anzeige (von der Verwaltung gepflegt) */
.amt-chip {
  display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px;
  background: var(--red-tint); border: 1px solid var(--red-soft);
  color: var(--red-dark); font-size: 13.5px; font-weight: 700;
}
.field .hint { font-size: 12px; color: var(--ink-faint); margin-top: 6px; line-height: 1.45; }
.card-pad { padding: 22px; }

/* Kanal-Chips: am Handy die Kanalauswahl (Basis); ab Tablet ersetzt sie die
   senkrechte Kanalspalte links. */
.channel-chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 0; margin-bottom: 14px; -webkit-overflow-scrolling: touch;
}
.channel-chips::-webkit-scrollbar { display: none; }
.channel-chips .chchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; min-height: 40px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line-strong); color: var(--ink-soft);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.channel-chips .chchip .ic { font-size: 14px; }
.channel-chips .chchip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* =====================================================================
   Chat (Einzel & Gruppe) — mobile first
   Die Übersicht ist eine gewöhnliche Liste, das Gespräch eine eigene Seite,
   deren Verlauf scrollt und deren Eingabefeld unten stehen bleibt.
   ===================================================================== */
.chat-list { display: flex; flex-direction: column; }
.chat-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px; min-height: 64px;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.chat-row:last-child { border-bottom: 0; }
.chat-row:active { background: var(--card); }
.avatar.gruppe { background: var(--brand-grey); font-size: 19px; }
.chat-meta { flex: 1; min-width: 0; }
.chat-top { display: flex; align-items: baseline; gap: 10px; }
.chat-name { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-time { font-size: 12px; color: var(--ink-faint); flex: none; }
.chat-prev { font-size: 13.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row.unread .chat-name { font-weight: 700; }
.chat-row.unread .chat-prev { color: var(--ink); font-weight: 600; }
.chat-badge {
  flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}

/* Gesprächsansicht: füllt genau den Raum unter der Kopfzeile — der Verlauf
   scrollt für sich, die Seite selbst nicht. */
.chat-page {
  display: flex; flex-direction: column;
  height: calc(100dvh - var(--header-h));
  padding-bottom: calc(84px + env(safe-area-inset-bottom));   /* Platz für die Bottom-Nav (79 px) */
}
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--card); border-bottom: 1px solid var(--line); flex: none;
}
.chat-back { font-size: 28px; line-height: 1; color: var(--ink-soft); width: 32px; text-align: center; }
.chat-head-meta { min-width: 0; flex: 1; }
.chat-mute { flex: none; width: 40px; height: 40px; border-radius: 50%; font-size: 17px;
  background: none; color: var(--ink-soft); display: grid; place-items: center; }
.chat-mute:hover { background: var(--surface); }
.chat-head-name { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-sub { font-size: 12.5px; color: var(--ink-faint); }

.msg-scroll {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 8px; padding: 14px 12px;
}
.msg { max-width: 82%; align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; padding: 9px 13px; }
.msg.mine { align-self: flex-end; background: var(--red); border-color: var(--red); color: #fff; border-radius: 16px 16px 5px 16px; }
.msg-from { font-size: 12px; font-weight: 700; color: var(--red); margin-bottom: 2px; }
.msg-body { font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-foot { font-size: 11px; color: var(--ink-faint); margin-top: 3px; text-align: right; }
.msg.mine .msg-foot { color: rgba(255,255,255,.8); }

.msg-bar {
  flex: none; display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 10px; background: var(--card); border-top: 1px solid var(--line);
}
.msg-bar textarea {
  flex: 1; resize: none; max-height: 140px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface);
  font-family: var(--font); font-size: 15px; line-height: 1.4;
}
.msg-bar textarea:focus { outline: none; border-color: var(--red); background: #fff; }
.msg-send {
  flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--red);
  color: #fff; font-size: 17px; display: grid; place-items: center;
}
.msg-send:disabled { opacity: .5; }

/* Personenauswahl im Dialog „Neues Gespräch" */
.pick-chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pick-chosen:empty { display: none; }
.pick-chosen .sel-chip { min-height: 34px; padding: 6px 12px; font-size: 13px; background: var(--red); border-color: var(--red); color: #fff; }
.pick-list { max-height: 46vh; overflow-y: auto; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pick-row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; min-height: 52px;
  background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; color: var(--ink);
}
.pick-row:last-child { border-bottom: 0; }
.pick-row.on { background: var(--red-tint); }
.pick-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; display: flex; flex-direction: column; }
.pick-name small { font-weight: 400; font-size: 12px; color: var(--ink-faint); }
.pick-mark { color: var(--red); font-weight: 700; width: 16px; }

/* Bildanhänge im Composer: Kachelreihe zwischen Text und Leiste.
   Erscheint erst, wenn etwas angehängt ist — leer nimmt sie keinen Platz. */
.composer-anhaenge { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.composer-anhaenge:empty { display: none; }
.anhang {
  position: relative; width: 88px; height: 88px; border-radius: 10px;
  overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; flex: none;
}
.anhang img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anhang.laedt { border-style: dashed; }
.anhang-weg {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(20,24,30,.72); color: #fff;
  font-size: 16px; line-height: 1; display: grid; place-items: center;
}
.anhang-weg:hover { background: var(--red); }
.composer-icon {
  width: 40px; height: 40px; border-radius: 50%; font-size: 18px;
  background: none; color: var(--ink-soft); display: grid; place-items: center; flex: none;
}
.composer-icon:hover { background: var(--surface); color: var(--ink); }

/* Dateianhang im Composer: breiter als eine Bildkachel, weil der Name zählt. */
.anhang.datei {
  width: auto; max-width: 260px; height: 56px; padding: 0 34px 0 10px;
  display: flex; align-items: center; gap: 9px; justify-content: flex-start;
}
.anhang.datei .sym { font-size: 21px; flex: none; }
.anhang.datei .txt { display: flex; flex-direction: column; min-width: 0; }
.anhang.datei .nm {
  font-size: 13px; font-weight: 500; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.anhang.datei .gr { font-size: 11.5px; color: var(--ink-faint); }
.anhang.datei .anhang-weg { top: 50%; transform: translateY(-50%); }

/* Sichtbarkeitswahl im Composer */
.sicht-wahl { max-width: 220px; }
.sicht-hinweis {
  margin: 0 16px 12px; padding: 9px 12px; border-radius: 10px;
  background: var(--red-tint); border: 1px solid var(--red-soft);
  font-size: 12.5px; line-height: 1.55; color: var(--ink-soft);
}
.sicht-hinweis .warn { color: var(--red-dark); font-weight: 500; }

/* Dateien am Beitrag */
.post-dateien { display: flex; flex-direction: column; gap: 6px; padding: 4px 18px 2px; }
.datei-zeile {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink);
}
.datei-zeile:hover { background: var(--surface); border-color: var(--line-strong); }
.datei-zeile[disabled] { opacity: .55; }
.datei-zeile .sym { font-size: 22px; flex: none; }
.datei-zeile .txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.datei-zeile .nm {
  font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.datei-zeile .gr { font-size: 12px; color: var(--ink-faint); }
.datei-zeile .pfeil { color: var(--ink-faint); font-size: 15px; flex: none; }

/* Teilen-Menü */
.action-link.oeffentlich { color: var(--red); }
/* `min()` statt fester Mindestbreite: 236 px sind auf einem 320-px-Gerät mit
   vergrösserter Schrift breiter als der Platz im Popover. */
.menu-list.teilen { min-width: min(236px, 100%); padding: 4px; }
.menu-list.teilen button, .menu-list.teilen .als-knopf {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: 9px; font-size: 14px;
  color: var(--ink); text-decoration: none; overflow-wrap: anywhere;
}
.menu-list.teilen .als-knopf:hover { background: var(--surface); }
.menu-list.teilen .sym {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: var(--surface); color: var(--ink-soft);
}
/* Markenfarben, damit die Ziele auf einen Blick auseinandergehen */
.menu-list.teilen .sym.m-facebook { background: #1877F2; color: #fff; }
.menu-list.teilen .sym.m-linkedin { background: #0A66C2; color: #fff; font-size: 11px; }
.menu-list.teilen .sym.m-whatsapp { background: #25D366; color: #fff; font-size: 15px; }
.menu-list.teilen .nb { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); }
.menu-kopf {
  padding: 8px 12px 6px; font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint);
}
.menu-fuss {
  padding: 8px 12px 10px; font-size: 12px; line-height: 1.5;
  color: var(--ink-faint); white-space: normal; max-width: 240px;
}
.menu-trenner { height: 1px; background: var(--line); margin: 5px 8px; }

/* Themenauswahl der Benachrichtigungen: Zeile mit Schiebeschalter.
   Touch-Ziel ≥ 44 px, damit es am Handy sicher trifft. */
.themen-head { margin-top: 22px; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.themen { display: flex; flex-direction: column; }
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 0; min-height: 46px; border-bottom: 1px solid var(--line); font-size: 14.5px;
}
.switch-row:last-of-type { border-bottom: 0; }
.themen .hinweis { font-size: 12.5px; color: var(--ink-faint); line-height: 1.5; margin-top: 10px; }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong);
  transition: background .15s; pointer-events: none;
}
.switch .slider::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.switch input:checked + .slider { background: var(--red); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--red-soft); }
.switch input:disabled + .slider { opacity: .55; }

/* Ungelesen-Abzeichen an der Bottom-Navigation */
.bottom-nav a .ic { position: relative; }
.nav-badge {
  position: absolute; top: -4px; left: 12px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}

/* ---------------------------------------------------------------------
   Erweiterungen für größere Bildschirme (mobile first → min-width)
   Handy  (Basis)   : eine Spalte, Chips, Bottom-Nav, FAB
   ≥ 701px (Tablet) : Kanäle senkrecht links, Kopfsuche, keine Bottom-Nav
   ≥ 1041px (Desktop): zusätzlich rechte Widget-Spalte
   --------------------------------------------------------------------- */
@media (min-width: 701px) {
  :root { --nav-w: 196px; }
  .layout {
    max-width: 900px; padding: 18px 16px 60px; gap: 18px;
    grid-template-columns: var(--nav-w) minmax(0, 1fr);
  }
  .page { padding: 22px 22px 60px; }
  .col-left { display: block; }        /* Kanäle senkrecht links */
  .channel-chips { display: none; }
  .bottom-nav, .fab { display: none; }
  .header-search { display: block; }
  /* Ohne Bottom-Nav braucht das Gespräch den vollen Raum — und der Knopf für ein
     neues Gespräch bleibt sichtbar, weil es dafür sonst keinen Einstieg gibt. */
  .chat-page { padding-bottom: 0; height: calc(100dvh - var(--header-h)); }
  .fab.always { display: grid; bottom: 26px; }
  .msg { max-width: 62%; }
}

@media (min-width: 1041px) {
  :root { --nav-w: 236px; }
  .layout {
    max-width: 1240px; padding: 22px 22px 60px; gap: 26px;
    grid-template-columns: var(--nav-w) minmax(0, 1fr) var(--right-w);
  }
  .col-right { display: block; }
}

/* ---------------------------------------------------- Link-Vorschau */
.link-vorschau-box:empty { display: none; }
.link-vorschau-box { padding: 0 16px 12px; }
.link-karte {
  position: relative; display: flex; gap: 12px; align-items: stretch;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: var(--surface); text-decoration: none; color: inherit;
}
a.link-karte:hover { border-color: var(--line-strong); background: var(--card); }
.link-karte .bild { width: 112px; height: 92px; object-fit: cover; flex: none; display: block; }
.link-karte .txt { padding: 10px 12px; min-width: 0; display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.link-karte .seite {
  font-size: 11.5px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.link-karte .titel {
  font-size: 14.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.link-karte .anriss {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.link-karte.laedt { padding: 14px; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-faint); }
.link-weg {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(20,24,30,.72); color: #fff; font-size: 15px; display: grid; place-items: center;
}
.link-weg:hover { background: var(--red); }
.post-link { padding: 2px 18px 6px; }

/* ---------------------------------------------------- Video */
.anhang.datei.video .sym { font-size: 20px; }
.anhang.datei .poster { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; flex: none; }
.anhang.video.wartet .gr { color: var(--red-dark); }
.anhang.laedt .fortschritt { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.anhang.datei.laedt { flex-direction: column; gap: 3px; justify-content: center; padding: 0 12px; }

.post-video { position: relative; margin-top: 12px; background: #000; }
.post-video video { width: 100%; max-height: 560px; display: block; }
.post-video .dauer {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0,0,0,.68); color: #fff; font-size: 11.5px;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
.post-video.wartet {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  background: var(--surface); color: var(--ink-faint); font-size: 13.5px;
  padding: 26px; margin: 12px 18px 0; border-radius: 12px;
}

/* Video-Dialog vor dem Hochladen */
.modal-hg {
  position: fixed; inset: 0; z-index: 90; background: rgba(15,18,22,.55);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  background: var(--card); border-radius: 16px; padding: 24px;
  width: min(440px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.modal h3 { margin: 0 0 4px; font-size: 17px; }
.modal .sub { margin: 0 0 16px; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.modal .fuss { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-faint); }
.modal-knoepfe { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.video-wahl { display: flex; flex-direction: column; gap: 8px; }
.v-opt {
  display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 11px; cursor: pointer;
}
.v-opt:hover { border-color: var(--line-strong); }
.v-opt.aktiv { border-color: var(--red); background: var(--red-tint); }
.v-opt input { margin-top: 3px; accent-color: var(--red); flex: none; }
.v-opt .txt { display: flex; flex-direction: column; gap: 2px; }
.v-opt .t { font-size: 14px; font-weight: 500; }
.v-opt .s { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------- Anhänge im Chat */
.msg-leiste { display: flex; flex-direction: column; }
.msg-anhaenge { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 14px 0; }
.msg-anhaenge:empty { display: none; }
.msg-anh { width: 40px; height: 40px; border-radius: 50%; font-size: 17px;
  background: none; color: var(--ink-soft); display: grid; place-items: center; flex: none; }
.msg-anh:hover { background: var(--surface); color: var(--ink); }
.msg-anh-liste { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.msg-bilder { display: grid; gap: 3px; border-radius: 10px; overflow: hidden; max-width: 300px; }
.msg-bilder.n-1 { grid-template-columns: 1fr; }
.msg-bilder.n-2, .msg-bilder.n-3, .msg-bilder.n-4 { grid-template-columns: 1fr 1fr; }
.msg-bilder img { width: 100%; max-height: 260px; object-fit: cover; display: block; cursor: zoom-in; }
.msg-datei {
  display: flex; align-items: center; gap: 9px; text-align: left; width: 100%;
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.16);
  color: inherit; font-size: 13px;
}
.msg:not(.mine) .msg-datei { background: var(--surface); }
.msg-datei:hover { filter: brightness(1.08); }
.msg-datei .sym { font-size: 19px; flex: none; }
.msg-datei .txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.msg-datei .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-datei .gr { font-size: 11.5px; opacity: .75; }
.msg-datei .pfeil { flex: none; opacity: .7; }

/* ---------------------------------------------------- Beitritt */
.feld-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feld-hinweis {
  font-size: 12.5px; color: var(--ink-faint); line-height: 1.5;
  margin: -6px 0 14px;
}
.field .feld-hinweis { margin: 6px 0 0; }
.login-card .gross { font-size: 42px; text-align: center; margin-bottom: 6px; }
.login-card select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; font-size: 15px; background: var(--card); color: var(--ink);
}
@media (max-width: 420px) { .feld-paar { grid-template-columns: 1fr; } }

/* Profilbild im Profil */
.avatar-huelle { position: relative; flex: none; }
.avatar-huelle.laedt::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(255,255,255,.6);
  border: 2px solid var(--line); border-top-color: var(--red);
  animation: spin .8s linear infinite;
}
.link-btn { background: none; color: var(--red-dark); font-size: 13.5px; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ---------------------------------------------------- Suche */
.suche-kopf {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
  background: var(--card); border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 0 16px;
}
.suche-kopf .ic { font-size: 17px; color: var(--ink-faint); flex: none; }
.suche-feld {
  flex: 1; border: none; background: none; padding: 15px 0;
  font-size: 16px; color: var(--ink); outline: none;
}
.suche-feld::placeholder { color: var(--ink-faint); }
.suche-gruppe { margin-bottom: 22px; }
.suche-titel {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-faint);
}
.suche-titel .anz {
  background: var(--surface); border-radius: 20px; padding: 1px 8px;
  font-size: 11px; letter-spacing: 0;
}
.suche-treffer {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink); margin-bottom: 6px;
}
.suche-treffer:hover { border-color: var(--line-strong); background: var(--surface); }
.suche-treffer .sym {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 17px; background: var(--surface);
}
.suche-treffer .sym.datum { line-height: 1; display: grid; place-items: center; }
.suche-treffer .sym.datum b { font-size: 15px; font-weight: 700; }
.suche-treffer .sym.datum i { font-size: 9.5px; font-style: normal; text-transform: uppercase; color: var(--ink-faint); }
.suche-treffer .txt { flex: 1; min-width: 0; }
.suche-treffer .nm {
  font-size: 14.5px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.suche-treffer .sub {
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.suche-treffer .sub mark { background: var(--red-tint); color: var(--red-dark); padding: 0 1px; border-radius: 3px; }
.suche-treffer .zeit, .suche-treffer .chev { color: var(--ink-faint); font-size: 12.5px; flex: none; }

/* ---------------------------------------------------- Seiten */
.seiten-leiste { margin-bottom: 16px; }
.seiten-titel {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 8px;
}
.seiten-gitter { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seite-kachel {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink);
}
.seite-kachel:hover { border-color: var(--line-strong); background: var(--surface); }
.seite-kachel .sym { font-size: 18px; flex: none; }
.seite-kachel .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.seite-kachel .nm {
  font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.seite-kachel .gr { font-size: 11.5px; color: var(--ink-faint); }
.seite-kachel .chev { color: var(--ink-faint); flex: none; }
@media (max-width: 560px) { .seiten-gitter { grid-template-columns: 1fr; } }

.seite-kopf { padding: 22px; }
.seite-kopf .pfad {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px;
  color: var(--ink-faint); margin-bottom: 8px;
}
.seite-kopf .pfad a { color: var(--ink-soft); text-decoration: none; }
.seite-kopf .pfad a:hover { text-decoration: underline; }
.seite-kopf h1 { font-size: 22px; margin: 0 0 6px; }
.seite-kopf .sicht { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 12px; }
.seite-kopf .besch { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 16px; white-space: pre-wrap; }
.kopf-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.kopf-titel {
  display: flex; align-items: center; gap: 7px; margin-bottom: 8px;
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-faint);
}
.kopf-titel .anz { background: var(--surface); border-radius: 20px; padding: 1px 7px; letter-spacing: 0; }
.kopf-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin-bottom: 5px;
  border: 1px solid var(--line); border-radius: 10px; text-decoration: none;
  color: var(--ink); font-size: 14px;
}
.kopf-link:hover { background: var(--surface); }
.kopf-link .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-link .chev, .kopf-link .sym { color: var(--ink-faint); flex: none; }
.kopf-aktionen {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.rolle-marke {
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: var(--surface); color: var(--ink-soft);
}
.rolle-marke.inhaber { background: var(--red-tint); color: var(--red-dark); }
.btn.sm { padding: 7px 14px; font-size: 13.5px; }
.anfrage-zeile { display: flex; align-items: center; gap: 9px; padding: 6px 0; }
.anfrage-zeile .nm { flex: 1; font-size: 14px; }
.modal .field textarea, .modal .field input, .modal .field select { width: 100%; }

/* ---------------------------------------------------- Aufnahmeansuchen */
.aufnahme-wrap { max-width: 780px; margin: 0 auto; padding: 24px 16px 70px; }
.aufnahme-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.aufnahme-kopf img { height: 34px; }
.aufnahme-kopf b { display: block; font-size: 17px; }
.aufnahme-kopf span { font-size: 13px; color: var(--ink-faint); }
.aufnahme-wrap .karte {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; margin-bottom: 16px;
}
.aufnahme-wrap .karte h2 { font-size: 17px; margin: 0 0 4px; }
.aufnahme-wrap .karte h3 {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-faint); margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--line);
}
.aufnahme-wrap .karte h3:first-of-type { border-top: none; padding-top: 0; margin-top: 16px; }
.aufnahme-wrap .karte .sub { font-size: 13px; color: var(--ink-faint); margin: 0 0 14px; }
.aufnahme-wrap .karte.stand p { margin: 0; font-size: 14.5px; }

/* Fortschritt */
.schritte { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.schritt { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; }
/* Gerundetes Quadrat wie `.schrittnr` in bausteine.css und die Strecke im Backend — eine Nummernform in
   allen Ebenen (Thomas 22.09.2026: „diese Nummern sehen viel besser aus"). Vorher ein Kreis. */
.schritt .nr {
  width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--surface); color: var(--ink-faint);
}
.schritt b { display: block; font-size: 14px; }
.schritt span:last-child { font-size: 12.5px; color: var(--ink-faint); }
.schritt.fertig .nr { background: #EAF7EF; color: #1F7A45; }
.schritt.laeuft { border-color: var(--red); }
.schritt.laeuft .nr { background: var(--red); color: #fff; }
.schritt.abgelehnt .nr { background: var(--red-soft); color: var(--red-dark); }

/* Formularfelder */
.af { display: block; margin-bottom: 12px; }
.af > span { display: block; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 4px; }
.af input, .af textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; font: inherit; font-size: 15px; background: var(--card); color: var(--ink);
}
.af-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.af-drei { display: grid; grid-template-columns: 1fr 2fr 2fr; gap: 12px; }
/* Titel, Vorname, Nachname, Funktion — der Titel braucht wenig Platz. */
.af-vier { display: grid; grid-template-columns: 1fr 2fr 2fr 2fr; gap: 12px; }
.af-haken { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 14px; line-height: 1.5; }
.af-haken input { margin-top: 3px; accent-color: var(--red); flex: none; width: 17px; height: 17px; }
.af-hinweis { font-size: 12.5px; color: var(--ink-faint); margin: -4px 0 14px; }
.af-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Unterschriftsfeld. touch-action: none, sonst scrollt das Tablet beim
   Unterschreiben die Seite statt zu zeichnen. */
.sigpad {
  width: 100%; height: 150px; display: block; touch-action: none; cursor: crosshair;
  border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--card);
}
.sigpad:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* Zeilenlisten im Formular — je Standort eine Zeile, damit sich später je
   Bundesland eine eigene Freischaltung daraus ableiten lässt. */
.af-liste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.af-reihe { display: flex; gap: 8px; align-items: center; }
.af-reihe input {
  min-width: 0; padding: 9px 10px; border: 1px solid var(--line-strong);
  border-radius: 10px; font: inherit; font-size: 14px; background: var(--card); color: var(--ink);
}
.btn.klein { padding: 7px 11px; font-size: 14px; flex: none; }
@media (max-width: 560px) {
  .af-paar, .af-drei, .af-vier { grid-template-columns: 1fr; }
  .af-reihe { flex-wrap: wrap; }
  .af-reihe input { flex: 1 1 45% !important; }
}

/* Unterlagen */
.unterlagen { display: flex; flex-direction: column; gap: 7px; }
.unterlage {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
}
.unterlage.da { border-color: #B7E0C6; background: #FAFDFB; }
.unterlage.pflicht { border-color: var(--red-soft); background: #FFFBFC; }
.unterlage .sym { font-size: 19px; flex: none; width: 24px; text-align: center; }
.unterlage.da .sym { color: #1F7A45; font-weight: 700; }
.unterlage .txt { flex: 1; min-width: 0; }
.unterlage .nm { font-size: 14px; font-weight: 500; }
.unterlage .nm i { font-style: normal; color: var(--red-dark); font-weight: 400; font-size: 12.5px; }
.unterlage .gr { font-size: 12px; color: var(--ink-faint); display: block; }
a.gr { text-decoration: underline; }

/* Bürge */
.buerge { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stand-marke {
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 20px;
  background: var(--surface); color: var(--ink-soft);
}
.stand-marke.gut { background: #EAF7EF; color: #1F7A45; }
.stand-marke.rot { background: var(--red-soft); color: var(--red-dark); }
.angabe { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.angabe span { color: var(--ink-faint); }
.angabe b { text-align: right; }
.aufnahme-wrap textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; font: inherit; font-size: 15px; }
.karte.absenden { text-align: center; }
.btn.gross { padding: 13px 26px; font-size: 15.5px; }

/* Die Datumsauswahl wird in css/datum.css gestaltet — gemeinsam mit dem Cockpit. */
.af select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: 10px; font: inherit; font-size: 15px; background: var(--card); color: var(--ink);
}

/* =====================================================================
   Steckbrief — Merkmale, Motto, Gemeinsamkeiten
   Mobile first: Die Gruppen sind aufklappbar, weil sechs Gruppen mit rund
   130 Merkmalen offen untereinander am Telefon eine Bildlaufstrecke ohne
   Ende wären. Alle Tippziele mindestens 44px hoch.
   ===================================================================== */
.mg { border-top: 1px solid var(--line); }
.mg:first-of-type { border-top: 0; }
.mg > summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px;
  padding: 6px 0; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.mg > summary::-webkit-details-marker { display: none; }
/* Pfeil selbst zeichnen: Das Standardsymbol sitzt je nach Browser anders
   und lässt sich nicht anfassen. */
.mg > summary::before {
  content: '›'; flex: none; width: 16px; font-size: 20px; line-height: 1;
  color: var(--ink-faint); transition: transform .15s;
}
.mg[open] > summary::before { transform: rotate(90deg); }
.mg-name { flex: 1; min-width: 0; }
.mg-zahl {
  flex: none; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--red); color: #fff; font-size: 12.5px; font-weight: 700;
  display: grid; place-items: center;
}
.mg-zahl.leer { display: none; }
.mg-inhalt { padding: 4px 0 16px; }
.mg-frage { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
.mot-zahl { text-align: right; }

/* Anzeige im fremden Profil */
.steckbrief.leer { text-align: center; }
.sb-gruppe + .sb-gruppe { margin-top: 14px; }
.sb-titel {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 8px;
}
.sb-chip {
  display: inline-flex; align-items: center; padding: 7px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--ink-soft); font-size: 13.5px; font-weight: 600;
}
/* Das Verbindende sticht hervor — deshalb steht der Steckbrief überhaupt da. */
.sb-chip.gemein { background: var(--red); border-color: var(--red); color: #fff; }
.sb-chip.frei { font-weight: 500; font-style: italic; }

.gemeinsam {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
  padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius-sm);
  background: var(--red-tint); border: 1px solid var(--red-soft);
}
.gm-kopf { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--red-dark); }
.gm-liste { font-size: 14.5px; font-weight: 600; color: var(--ink); }

/* Motto: das eigene Wort der Person, deshalb abgesetzt vom übrigen Text. */
.motto {
  margin-top: 12px; max-width: 460px;
  font-size: 15.5px; font-style: italic; color: var(--ink); line-height: 1.5;
}

/* ---------------------------------------------------------- Beschlüsse
   Die Ansicht beantwortet zuerst „muss ich etwas tun?" — deshalb steht die
   offene Abstimmung als Karte mit Rand, der Rest ruhiger darunter. */
.beschluss { margin-bottom: 14px; }
.beschluss-kopf {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.beschluss-kopf h2 { margin: 0; font-size: 18px; }
.beschluss-text {
  white-space: pre-wrap; border-left: 3px solid var(--red);
  padding: 2px 0 2px 12px; margin: 10px 0 6px; color: var(--ink);
}
.beschluss.erledigt { opacity: .78; }

.chip.dringend { color: #fff; background: var(--red); border-color: var(--red); }
.chip.ja   { color: #1F7A4D; border-color: #1F7A4D; background: transparent; }
.chip.nein { color: #B3261E; border-color: #B3261E; background: transparent; }

.abschnitt { font-size: 16px; margin: 22px 0 10px; }
.abschnitt.klein { font-size: 14px; margin: 18px 0 4px; }

/* Ein Hinweis, der eine rechtliche Einschränkung nennt — auffällig, aber
   keine Fehlermeldung: Es ist kein Fehler, es ist eine Bedingung. */
.warnhinweis {
  background: #FFF6E5; border-left: 3px solid #B26A00; border-radius: 0 8px 8px 0;
  padding: 10px 12px; font-size: 13.5px; line-height: 1.55; color: #5B4300; margin: 12px 0;
}

.sigfeld { margin: 6px 0 4px; }

.tabelle-huelle { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.tabelle th {
  text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-faint); padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.tabelle td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabelle tr:last-child td { border-bottom: none; }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }

/* Startintro: Form in web/css/intro.css (seit 17.09.2026 auch vom Backend geladen), Schrift Rock Salt in tokens.css. */

/* Beitragsaufstellung im Ansuchen — nur sichtbar, wenn etwas anderes gilt als
   der Regelsatz. Zahlen rechtsbündig und in Tabellenziffern, damit die Spalte
   sich lesen lässt statt nur dazustehen. */
.beitragstabelle { width: 100%; border-collapse: collapse; margin: 10px 0 4px; }
.beitragstabelle td { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.beitragstabelle td.zahl { text-align: right; white-space: nowrap; padding-left: 14px;
                           font-variant-numeric: tabular-nums; }
.beitragstabelle td.notiz { color: var(--ink-3); font-size: 13px; padding-left: 14px; }
.beitragstabelle tr.summe td { font-weight: 600; border-bottom: none; border-top: 2px solid var(--ink); }

/* ---- Tech & Tools in der App (Thomas 16.09.2026: „muss synchron mit dem Backend laufen") — Ansicht
   web/js/views/tools.js, Liste aus GET /api/werkzeuge (Register private/lib/werkzeuge.php). Eine Karte je
   Werkzeug: Kopf mit Name und Zweck, der eingebettete Rechner (Höhe = Messwert aus dem Register, kommt inline),
   Fußzeile mit Verweis auf die volle Fassung und der Quelle. Dieselbe flache Karte wie überall in der App. */
.werkzeug-hinweis { margin: -8px 0 16px; font-size: 13px; color: var(--ink-soft); max-width: 62ch; }
.werkzeug-liste { display: flex; flex-direction: column; gap: 14px; }
.werkzeug-kopf { padding: 18px 20px 14px; }
.werkzeug-name { font-size: 17px; font-weight: 600; line-height: 1.25; }
.werkzeug-zweck { margin-top: 4px; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }
.werkzeug-rahmen { display: block; width: 100%; border: 0; background: #FFFFFF; border-top: 1px solid var(--line); }
.werkzeug-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 12px 20px 14px;
                 border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-faint); }
.werkzeug-link { color: var(--red); font-weight: 600; text-decoration: none; }
.werkzeug-link:hover { text-decoration: underline; text-underline-offset: .15em; }
.werkzeug-quelle { margin-left: auto; }
@media (max-width: 600px) {
  .werkzeug-kopf { padding: 14px 16px 12px; }
  .werkzeug-fuss { padding: 10px 16px 12px; }
  .werkzeug-quelle { margin-left: 0; width: 100%; }
}
/* Forum-Abschnitt oben in Tech & Tools (Thomas 16.09.2026: Ideen zu neuen Tools und Gadgets, synchron mit dem
   Kanal tools-tech der App): dieselbe Karte, darunter bis zu drei Anreißer als Zeilen mit feiner Trennlinie. */
.werkzeug-forum-liste { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.werkzeug-forum-beitrag { display: block; padding: 11px 20px; text-decoration: none; color: inherit; }
.werkzeug-forum-beitrag + .werkzeug-forum-beitrag { border-top: 1px solid var(--line); }
.werkzeug-forum-beitrag:hover { background: var(--surface); }
.werkzeug-forum-zeile { font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.werkzeug-forum-meta { margin-top: 3px; font-size: 12.5px; color: var(--ink-faint); }
@media (max-width: 600px) { .werkzeug-forum-beitrag { padding: 10px 16px; } }
/* Protokoll-Riegel unten (Thomas 16.09.2026 von der LDZ-Baustelle: „Weiteres Foto muss unten sein, nicht oben"):
   Bild- und Notiz-Knopf im festen Riegel neben Aufnahme, Stand, Zeit und „＋ Punkt" — kompakt, damit am Telefon
   alles in eine Zeile passt. Der Riegel selbst ist Bestand in views/protokoll.js (Wächter-Liste W1f). */
.pk-riegel-knopf { flex: none; padding: 8px 10px; font-size: 18px; line-height: 1; min-width: 0; }

/* ---- Anwesenheit im Protokoll (Thomas 16.09.2026 von der LDZ-Baustelle: „als ersten Punkt nach der Begrüßung
   die Anmeldeliste aufklappbar, alle abhaken, die da sind"). Ansicht views/protokoll.js: details.card.anwesenheit,
   Zeilen als label mit Häkchen; Zusagen zuerst, dann offen, dann Absagen; „da" hebt die Zeile leicht ab. ---- */
.anwesenheit { margin: 0 0 14px; }
.anwesenheit-kopf { list-style: none; cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 15px;
                    display: flex; align-items: center; gap: 10px; }
.anwesenheit-kopf::-webkit-details-marker { display: none; }
.anwesenheit-kopf::before { content: "›"; display: inline-block; width: 1em; color: var(--ink-faint); font-weight: 700;
                            transition: transform .15s ease; }
.anwesenheit[open] > .anwesenheit-kopf::before { transform: rotate(90deg); }
.anwesenheit-liste { border-top: 1px solid var(--line); }
.anwesenheit-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 18px; cursor: pointer;
                     border-bottom: 1px solid var(--line); min-height: 44px; }
.anwesenheit-zeile:last-child { border-bottom: 0; }
.anwesenheit-zeile input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--red); flex: none; margin: 0; }
.anwesenheit-zeile.da { background: var(--red-tint); }
.anwesenheit-zeile.nicht-da .anwesenheit-name { color: var(--ink-faint); text-decoration: line-through; }   /* ausdrücklich als „nicht da" erfasst */
.anwesenheit-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.anwesenheit-kanzlei { font-size: 13px; color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
.anwesenheit-antwort, .anwesenheit-zusatz { margin-left: auto; flex: none; font-size: 12px; font-weight: 600;
                     border-radius: 999px; padding: 3px 9px; border: 1px solid var(--line-strong); color: var(--ink-soft); }
.anwesenheit-antwort.ja { color: var(--red); border-color: var(--red-soft); background: var(--red-soft); }
.anwesenheit-antwort.nein { text-decoration: line-through; color: var(--ink-faint); }
.anwesenheit-zusatz { color: var(--ink); border-style: dashed; }
.anwesenheit-fuss { padding: 12px 18px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.anwesenheit-hinweis { margin: 0; font-size: 13px; color: var(--ink-soft); }
.anwesenheit-weitere { display: flex; flex-direction: column; gap: 8px; }
.anwesenheit-suche { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px;
                     font: inherit; font-size: 15px; background: var(--card); }
.anwesenheit-suche:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.anwesenheit-treffer { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 600px) {
  .anwesenheit-zeile { flex-wrap: wrap; gap: 6px 10px; padding: 10px 14px; }
  .anwesenheit-name { flex: 1; }
  .anwesenheit-kanzlei { width: 100%; padding-left: 34px; }
}

/* ---- Protokoll in drei Stufen (Thomas 16.09.2026 nach der Generalprobe LDZ: „am Handy oben ‚Protokoll
   abschließen', Versenden getrennt; Kommentare brauchen einen sichtbaren Abschluss"). Ansicht views/protokoll.js.
   Statusknopf oben rechts im Seitenkopf — in der Aufnahme der Hauptknopf, danach der stille Rückweg; Fertig-Häkchen
   und „gespeichert"-Zeile unter jedem Textfeld. ---- */
.pk-status-knopf { margin-left: auto; white-space: nowrap; }
.btn.pk-status-knopf:not(.ghost) { font-weight: 700; padding: 11px 16px; box-shadow: 0 6px 18px -10px rgba(229, 0, 57, .7); }
.pk-status-hinweis { margin: -8px 0 16px; padding: 10px 14px; border-radius: 12px; background: var(--red-tint);
                     color: var(--ink); font-size: 13.5px; line-height: 1.45; }
.pk-feld { display: flex; flex-direction: column; gap: 4px; }
.pk-feld-fuss { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 26px; }
.pk-gespeichert { font-size: 12px; color: var(--ink-faint); visibility: hidden; margin-right: auto; }
.pk-gespeichert.zeigt { visibility: visible; }
.pk-gespeichert.ungespeichert { color: var(--ink-soft); }
.pk-gespeichert.gespeichert { color: var(--online); }
.pk-gespeichert.fehler { color: var(--red); font-weight: 600; }
.pk-fertig { flex: none; width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line-strong);
             background: var(--card); color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer; padding: 0;
             display: inline-flex; align-items: center; justify-content: center; }
.pk-fertig:hover { border-color: var(--red); color: var(--red); }
.pk-feld:focus-within .pk-fertig { background: var(--red); border-color: var(--red); color: #fff; }
.pk-feld.einzeilig .pk-feld-fuss { min-height: 22px; }
@media (max-width: 600px) {
  .page-head .pk-status-knopf { flex: 1 1 100%; margin-left: 0; text-align: center; }
  .pk-fertig { width: 36px; height: 36px; }
}

/* ---- Formatleiste am Protokolltext (Thomas 17.09.2026, Live-Protokoll LDZ: „fett, kursiv und unterstrichen"):
   kleine Knopfleiste über dem Textfeld — B / I / U als Pillen, aktiv = Ink gefüllt; Marken **fett**, *kursiv*,
   __unterstrichen__ setzt views/protokoll.js, gerendert wird im PDF/HTML des Backends. ---- */
.pk-format { display: flex; gap: 6px; margin: 0 0 6px; }
.pk-format button { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line-strong); border-radius: 8px;
                    background: var(--card); color: var(--ink); font: inherit; font-size: 14px; line-height: 1;
                    cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pk-format button.fett { font-weight: 800; }
.pk-format button.kursiv { font-style: italic; }
.pk-format button.unterstrichen { text-decoration: underline; text-underline-offset: .15em; }
.pk-format button:hover { border-color: var(--ink-faint); }
.pk-format button.aktiv { background: var(--ink); border-color: var(--ink); color: #fff; }
.pk-format button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
@media (max-width: 600px) { .pk-format button { width: 40px; height: 36px; font-size: 15px; } }

/* ---- PDF-Vorschau im Dialog (Rückfall, wenn der Browser das PDF-Fenster sperrt — Thomas 17.09.2026, Protokoll
   am Desktop). views/protokoll.js: <dialog class="pk-pdf"> mit .pk-pdf-kopf (Titel, Link „In neuem Tab öffnen",
   Knopf Schließen) und iframe; Layout (Breite/Höhe/Flex) setzt die Ansicht, Rahmen, Grund und Schleier hier. ---- */
.pk-pdf { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--card); color: var(--ink);
          padding: 0; box-shadow: 0 30px 80px -30px rgba(31, 35, 40, .45); overflow: hidden; }
.pk-pdf::backdrop { background: rgba(31, 35, 40, .55); backdrop-filter: blur(3px); }
.pk-pdf-kopf { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line);
               font-weight: 600; font-size: 15px; background: var(--surface); }
.pk-pdf-kopf > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-pdf-kopf a { color: var(--red); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.pk-pdf-kopf a:hover { text-decoration: underline; }
.pk-pdf-kopf button { border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); border-radius: 999px;
                      padding: 6px 12px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pk-pdf-kopf button:hover { border-color: var(--ink-faint); }
.pk-pdf iframe { display: block; border: 0; background: #FFFFFF; }
@media (max-width: 600px) { .pk-pdf { border-radius: 14px; } .pk-pdf-kopf { padding: 10px 12px; } }

/* ---- Einbettung im Backend (App-Sitzung 17.09.2026: index.html?einbettung=1 im iframe, Klasse einbettung auf <html>,
   Kopfleiste und untere Navigation sind dann nicht da). Was sonst für sie Platz hält, rückt nach: der feste Riegel
   des Protokolls sitzt am unteren Rand statt über der Navigation; die Seite behält unten nur den Platz für den Riegel. */
html.einbettung .pk-riegel { bottom: env(safe-area-inset-bottom, 0px); }
html.einbettung .page { padding-top: 10px; }
html.einbettung .chat-page { height: 100dvh; padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ---- Aufnahme-Riegel im Protokoll, daumengerecht (Thomas 18.09.2026 nach der LDZ-Besichtigung: Diktat und Foto waren
   zu klein). Markup views/protokoll.js: .pk-riegel > .pk-riegel-stand + .pk-riegel-knoepfe > button.pk-werkzeug (Symbol
   .sym.gross + Beschriftung). Größen/Flex setzt die Ansicht (Bestand); hier Farbe, Rand, Rundung, Zustand. ---- */
.pk-werkzeug { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 50%;
               background: var(--card); border: 1px solid var(--rule); color: var(--ink); font: inherit; cursor: pointer;
               box-shadow: var(--shadow-sm); padding: 0; }
.pk-werkzeug span { font-size: 11px; font-weight: 600; line-height: 1; }
.pk-werkzeug .sym { width: 1.6em; height: 1.6em; }
.pk-werkzeug:hover { border-color: var(--ink-3); }
.pk-werkzeug:active { transform: scale(.96); }
.pk-werkzeug-haupt { background: var(--ir-red); border-color: var(--ir-red); color: var(--card); }
.pk-werkzeug-haupt:hover { border-color: var(--ir-red-deep); background: var(--ir-red-deep); }
.pk-werkzeug-haupt.laeuft { background: var(--ink); border-color: var(--ink); color: var(--card); animation: pkPuls 1.6s ease-in-out infinite; }
@keyframes pkPuls { 0%, 100% { box-shadow: 0 0 0 0 rgba(26, 30, 36, .35); } 50% { box-shadow: 0 0 0 10px rgba(26, 30, 36, 0); } }
.pk-werkzeuge .btn { min-height: 44px; }
.pk-riegel-stand { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); line-height: 1.3; min-width: 0; }
.pk-riegel-stand b { color: var(--ir-red); font-size: 12px; white-space: nowrap; }
.pk-riegel-stand > span:not(.pk-zeit) { flex: 1; min-width: 0; }
.pk-riegel-stand .pk-zeit { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
