/* Groop – App-Stylesheet. Mobile-first, hell/dunkel, installierbare PWA. */

:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --text: #171923;
  --muted: #6a7185;
  --border: #e3e6ee;
  --primary: #5b5bd6;
  --primary-strong: #4949c4;
  --primary-soft: #eaeafc;
  --accent: #8b5cf6;
  /* Etwas dunkler als das naheliegende #d64545: Dieses Rot steht als
     Text auf Weiss, auf --bg und auf --danger-soft, und weisser Text
     steht darauf. Erst ab hier halten alle vier Faelle 4.5:1 ein. */
  --danger: #c62f2f;
  --danger-soft: #fbeaea;
  --ok: #1f9d6c;
  --ok-soft: #e5f6ef;
  /* Die Schriftfarbe **auf** diesen Flaechen ist eine eigene Rolle, kein
     festes #fff. Im dunklen Schema sind dieselben Flaechen aufgehellt, und
     weisser Text hielt dort 3.54:1 (jeder Hauptknopf), 2.80:1 (jeder
     Loeschknopf und jede Fehlermeldung) und 2.72:1 (jedes Amtsschild) -
     obwohl der Kommentar ueber --danger 4.5:1 fuer alle vier Faelle
     zusagt. Nachgerechnet war nur die helle Palette; jetzt rechnet
     tests/test_frontend.py mit. --on-ok ist auch im hellen Schema dunkel:
     Weiss auf #1f9d6c sind 3.45:1. */
  --on-primary: #fff;
  --on-danger: #fff;
  --on-ok: #14162b;
  --accent-soft: #f1ebfe;
  --accent-strong: #6d28d9;
  /* Der Farbverlauf von Kopfkarte und Avatar traegt weissen Text und
     bleibt deshalb in beiden Schemata derselbe. */
  --hero-from: #5b5bd6;
  --hero-to: #6d28d9;
  --warn: #b77b12;
  --warn-soft: #fdf3e0;
  --shadow: 0 1px 2px rgb(23 25 35 / 5%), 0 8px 24px rgb(23 25 35 / 7%);
  --radius: 16px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111322;
    --surface: #1a1d30;
    --surface-2: #232741;
    --text: #e9eaf4;
    --muted: #9aa1bb;
    --border: #2c3050;
    --primary: #7b7bf0;
    --primary-strong: #9b9bf5;
    --primary-soft: #26295099;
    --accent: #a78bfa;
    --danger: #f07575;
    --danger-soft: #40222b;
    --ok: #4ade9d;
    --ok-soft: #16323a;
    --on-primary: #14162b;
    --on-danger: #14162b;
    --on-ok: #14162b;
    --accent-soft: #2a2050;
    --accent-strong: #c4b5fd;
    --warn: #e3b25c;
    --warn-soft: #3a3122;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
  }
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
/* Ueberschriften tragen Namen, die Leute waehlen - und ein deutsches
   Kompositum wie "Wohngemeinschaftskuechenputzplan" ist ein Wort. Ohne
   Umbruch schob es bei 390 px die ganze Seite 44 px seitwaerts. */
h1, h2, h3 { margin: 0 0 .4rem; line-height: 1.25; overflow-wrap: anywhere; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Topbar -------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .75rem;
  padding: calc(.6rem + env(safe-area-inset-top)) 1rem .6rem;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.topbar .spacer { flex: 1; }
.topbar select.lang {
  width: auto; max-width: 130px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: var(--radius-sm); padding: .35rem .5rem; font-size: .85rem;
}

/* Die Kopfzeile war breiter als jedes Telefon. Gemessen ohne Admin-Verweis
   389 px, mit ihm 467 px - bei 320, 360, 375 und 414 px Fensterbreite also
   immer zu breit. Folge: document.scrollWidth groesser als clientWidth auf
   JEDER Ansicht, die ganze Seite liess sich seitwaerts schieben, rechts
   stand ein leerer Streifen, und "Abmelden" war angeschnitten.

   Zwei Massnahmen, in dieser Reihenfolge: Auf dem Telefon wird die Zeile
   schmaler (das Wort "Groop" weicht, das Logo bleibt - es ist derselbe
   Verweis); und falls es dann immer noch nicht reicht, bricht sie um.

   Umbrechen statt rollen - dieselbe Entscheidung wie bei der Reiterleiste,
   und aus demselben Grund: Bei 320 px mit dem Admin-Verweis war die Zeile
   351 px breit, "Abmelden" lag vollstaendig ausserhalb, und der Rollbalken,
   der das auffangen sollte, war per CSS unsichtbar gemacht - kein Balken,
   kein Pfeil, keine Verlaufskante. Fuer den Admin ist "Abmelden" der
   einzige Weg hinaus. Eine zweite Zeile ist nicht schoen, aber jeder Knopf
   steht dort, wo man ihn sieht. */
.topbar { flex-wrap: wrap; row-gap: .35rem; }
.topbar > * { flex: 0 0 auto; }
.topbar .spacer { flex: 1 1 auto; min-width: 0; }

@media (max-width: 480px) {
  .topbar { gap: .4rem; padding-left: .6rem; padding-right: .6rem; }
  .topbar .brand-name { display: none; }
  .topbar select.lang { max-width: 92px; font-size: .78rem; padding: .3rem .35rem; }
  .topbar .btn.small { padding: .3rem .45rem; font-size: .78rem; }
  .topbar .btn.icon { padding: .3rem .4rem; }
}

/* ---- Layout -------------------------------------------------------- */
.page { max-width: 900px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
/* Auf dem Laptop stand die App wie auf dem Telefon: eine Spalte von 900 px
   in der Mitte, bei 1440 px Fensterbreite links und rechts je 270 px leer,
   und jede Liste als ein einziger langer Streifen. Ab 64rem waechst die
   Seite mit; was sie mit dem Platz tut, steht unten unter "Breite
   Bildschirme". Die Regel steht vor `.page-narrow` und `.present`, damit
   beide ihre eigene Breite behalten. */
@media (min-width: 64rem) {
  .page { max-width: 1280px; padding: 1.5rem 2rem 3rem; }
}
.page-narrow { max-width: 460px; }
/* Seiten aus einzelnen Karten, die der Person gehoeren (Profil, Meldungen):
   auf dem Telefon untereinander, sobald Platz ist in zwei Spalten (.columns).
   Breiter als zwei Formulare nebeneinander wird sie nicht - ein Eingabefeld
   ueber 600 px liest sich nicht mehr wie eines. */
.page-cards { max-width: 1080px; }
.center-screen {
  min-height: calc(100dvh - 120px);
  display: flex; flex-direction: column; justify-content: center;
}
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mt { margin-top: 1rem; }
.hidden { display: none !important; }

/* ---- Cards --------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem;
}
/* Die Gruppenkarte ist ein Link (Tastatur, Eingabetaste, neuer Tab) - sie
   soll aber nicht aussehen wie einer. */
a.card.clickable { display: block; color: inherit; text-decoration: none; }
.card.clickable { cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.card.clickable:hover { transform: translateY(-2px); border-color: var(--primary); }
.card-hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff; border: none;
}
.card-hero .muted { color: rgb(255 255 255 / 75%); }
/* Knoepfe auf dem Farbverlauf. Der volle Knopf stand inline auf
   `--primary-strong` - im dunklen Schema aufgehellt, 2.50:1 auf Weiss. Der
   Verlauf ist in beiden Schemata derselbe, also auch seine Farben;
   nachgerechnet in tests/test_frontend.py. */
.card-hero .btn:not(.ghost) { background: #fff; color: var(--hero-from); }
.card-hero .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 40%); }

/* ---- Buttons & Inputs ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: .6rem 1.05rem; font-size: .95rem; font-weight: 600;
  cursor: pointer; min-height: 44px;
  background: var(--primary); color: var(--on-primary);
  transition: filter .12s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.soft { background: var(--primary-soft); color: var(--primary-strong); }
.btn.danger { background: var(--danger); color: var(--on-danger); }
.btn.danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn.small { min-height: 34px; padding: .3rem .7rem; font-size: .85rem; }
.btn.block { width: 100%; }
.btn.icon { padding: .45rem .6rem; }

label.field, div.field { display: block; margin-bottom: .85rem; }
label.field > span, div.field > span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .3rem; color: var(--muted); }
/* Ausnahme: Chips innerhalb eines Feldes bleiben normal beschriftet. */
div.field > .chips span, div.field > .picks span { display: inline; font-size: inherit; font-weight: inherit; color: inherit; margin: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; padding: .65rem .8rem; font-size: 1rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  outline: none; font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea { resize: vertical; min-height: 70px; }
input.code {
  letter-spacing: .5em; text-align: center; font-size: 1.4rem; font-variant-numeric: tabular-nums;
}

/* ---- Gruppentyp-Auswahl ---------------------------------------------- */
.field-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--muted); }
.type-grid { display: grid; gap: .5rem; }
.type-card { display: flex; align-items: center; gap: .65rem; cursor: pointer; }
.type-card input[type="radio"] {
  width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--primary);
}
/* Auswahl ueber den Geschwister-Selektor markieren (zuverlaessiger als :has,
   dessen Neuberechnung nicht in allen Browsern greift). */
.type-card-body {
  display: flex; align-items: flex-start; gap: .7rem; flex: 1; min-width: 0;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .65rem .8rem; background: var(--surface);
  transition: border-color .12s ease, background .12s ease;
}
.type-card:hover .type-card-body { border-color: var(--primary); }
.type-card input:checked + .type-card-body {
  border-color: var(--primary); background: var(--primary-soft);
}
.type-card input:focus-visible + .type-card-body { box-shadow: 0 0 0 3px var(--primary-soft); }
.type-icon { font-size: 1.4rem; line-height: 1.2; flex: none; }
.type-name { display: block; font-weight: 700; font-size: .95rem; }
.type-desc { display: block; font-size: .82rem; color: var(--muted); }

/* ---- Badges / Tags -------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  border-radius: 999px; padding: .12rem .6rem;
  font-size: .75rem; font-weight: 700;
  background: var(--surface-2); color: var(--muted);
}
.badge.owner { background: var(--primary-soft); color: var(--primary-strong); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }

/* ---- Tabs -----------------------------------------------------------
   Die Leiste rollte seitwaerts, und der Rollbalken war per CSS abgeschaltet:
   kein Balken, kein Pfeil, keine Verlaufskante. Der Vereinstyp fuehrt elf
   Reiter; gemessen war die Leiste 1139 px breit, ihr Behaelter aber immer
   nur 868 px, weil `.page` auf 900 px begrenzt ist - bei 1280, 1440, 1600,
   1920 und 2560 px Fensterbreite gleichermassen. "Einladungen" und
   "Einstellungen" lagen vollstaendig ausserhalb, und in den Einstellungen
   steht der einzige Ausgang aus der Gruppe.

   Deshalb umbrechen statt rollen: Zeilen sind nicht schoen, aber jeder
   Reiter ist da, wo man ihn sieht - und es braucht keine zweite Regel fuer
   Geraete, auf denen sich schlecht seitwaerts wischen laesst. */
.tabs {
  display: flex; flex-wrap: wrap; gap: .25rem;
  border-bottom: 1px solid var(--border); margin-bottom: 1rem;
}
.tab {
  padding: .55rem .95rem; font-size: .92rem; font-weight: 600;
  color: var(--muted); background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---- Listen --------------------------------------------------------- */
.list { display: flex; flex-direction: column; gap: .55rem; }
.list-item {
  display: flex; align-items: center; gap: .8rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .7rem .9rem;
}
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #fff; font-weight: 700; font-size: .95rem; text-transform: uppercase;
}

/* ---- Chat ------------------------------------------------------------ */
#chat-panel { display: flex; flex-direction: column; gap: .7rem; }
.chat-log {
  display: flex; flex-direction: column; gap: .35rem;
  height: min(58dvh, 520px); overflow-y: auto;
  padding: .6rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  overscroll-behavior: contain;
}
.chat-older { align-self: center; margin-bottom: .3rem; }
.chat-day {
  align-self: center; margin: .5rem 0 .2rem;
  font-size: .75rem; font-weight: 700; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: .1rem .7rem;
}
.chat-msg { display: flex; align-items: flex-end; gap: .5rem; max-width: 100%; }
.chat-msg.mine { flex-direction: row-reverse; }
.chat-msg .avatar { width: 30px; height: 30px; font-size: .75rem; }
.chat-bubble {
  max-width: min(75%, 520px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: .45rem .7rem;
}
.chat-msg.mine .chat-bubble {
  background: var(--primary-soft); border-color: transparent;
}
.chat-author { font-size: .78rem; font-weight: 700; color: var(--primary-strong); }
.chat-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-meta {
  display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
  margin-top: .15rem; font-size: .72rem; color: var(--muted);
}
.chat-action {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; color: var(--primary); text-decoration: underline;
}
.chat-composer { display: flex; gap: .5rem; align-items: flex-end; }
.chat-composer .emoji-toggle { min-width: 48px; font-size: 1.2rem; padding: .5rem; }

/* ---- Emoji-Auswahl ---------------------------------------------------- */
#chat-panel { position: relative; }
.emoji-panel {
  position: absolute; bottom: 3.6rem; left: 0; z-index: 30;
  width: min(100%, 360px); max-height: 300px; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.emoji-tabs {
  display: flex; gap: .1rem; overflow-x: auto; flex: none;
  padding: .35rem; border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.emoji-tabs::-webkit-scrollbar { display: none; }
.emoji-tab {
  flex: none; border: none; background: none; cursor: pointer;
  font-size: 1.15rem; line-height: 1; padding: .35rem .45rem;
  border-radius: var(--radius-sm); opacity: .6;
}
.emoji-tab:hover { background: var(--surface-2); opacity: 1; }
.emoji-tab.active { background: var(--primary-soft); opacity: 1; }
.emoji-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: .1rem; padding: .4rem; overflow-y: auto; overscroll-behavior: contain;
}
.emoji-btn {
  border: none; background: none; cursor: pointer;
  font-size: 1.35rem; line-height: 1; padding: .3rem;
  border-radius: var(--radius-sm); min-height: 38px;
}
.emoji-btn:hover { background: var(--surface-2); }
.emoji-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
/* Reaktions-Chips unter der Nachricht */
.chat-reactions { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.reaction-chip {
  display: inline-flex; align-items: center; gap: .2rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); cursor: pointer;
  padding: .05rem .45rem; font-size: .85rem; line-height: 1.4;
}
.reaction-chip:hover { border-color: var(--primary); }
.reaction-chip.mine { background: var(--primary-soft); border-color: var(--primary); }
.reaction-emoji { font-size: 1rem; }
.reaction-count { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.reaction-chip.mine .reaction-count { color: var(--primary-strong); }
/* Auswahl im Modal (fuer Reaktionen) statt schwebend ueber der Eingabe */
.emoji-panel-modal { position: static; width: 100%; max-height: 260px; box-shadow: none; }

/* Nachrichten aus reinen Emojis groesser darstellen. */
.chat-text.emoji-only { font-size: 2.1rem; line-height: 1.25; }
.chat-composer textarea {
  flex: 1; min-height: 44px; max-height: 160px; resize: none; line-height: 1.4;
}
.chat-composer .btn { min-width: 52px; font-size: 1.1rem; }

/* ---- Statistiken (Admin) -------------------------------------------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; }
.stat .value { font-size: 1.5rem; font-weight: 800; }
.stat .label { font-size: .8rem; color: var(--muted); font-weight: 600; }

/* ---- Tabellen (Admin), auf Mobil gestapelt --------------------------- */
.table-wrap { overflow-x: auto; }
table.admin { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.admin th, table.admin td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.admin th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 640px) {
  table.admin thead { display: none; }
  table.admin, table.admin tbody, table.admin tr, table.admin td { display: block; width: 100%; }
  table.admin tr { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .7rem; background: var(--surface); padding: .4rem .2rem; }
  table.admin td { border: none; padding: .25rem .8rem; }
  table.admin td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
}

/* ---- Modal ----------------------------------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgb(10 11 20 / 55%);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  background: var(--surface); color: var(--text);
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 430px; max-height: 90dvh; overflow: auto;
  padding: 1.2rem 1.3rem;
}
.modal img.preview { max-width: 100%; border-radius: var(--radius-sm); display: block; margin: 0 auto; }
.modal .modal-actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }

/* ---- Toast ----------------------------------------------------------- */
#toast-root {
  position: fixed; z-index: 80; left: 50%; transform: translateX(-50%);
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 420px);
}
.toast {
  background: var(--text); color: var(--bg);
  border-radius: var(--radius-sm); padding: .7rem 1rem; font-size: .92rem;
  box-shadow: var(--shadow); animation: toast-in .18s ease;
}
.toast.error { background: var(--danger); color: var(--on-danger); }
.toast.ok { background: var(--ok); color: var(--on-ok); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---- Auth-Screens ----------------------------------------------------- */
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-bottom: 1.4rem; }
.auth-logo img { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow); }
.auth-logo .name { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.oauth-list { display: flex; flex-direction: column; gap: .5rem; }
.divider {
  display: flex; align-items: center; gap: .8rem; color: var(--muted);
  font-size: .8rem; margin: 1.1rem 0;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---- Sonstiges -------------------------------------------------------- */
.empty {
  text-align: center; color: var(--muted); padding: 2.2rem 1rem;
  border: 1.5px dashed var(--border); border-radius: var(--radius);
}
.spinner {
  width: 26px; height: 26px; margin: 2.5rem auto; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
code.inline { background: var(--surface-2); border-radius: 6px; padding: .1rem .4rem; font-size: .88em; word-break: break-all; }

/* ---- Planer: Aufgaben & Termine --------------------------------------- */
.badges { gap: .35rem; margin-top: .3rem; }
.pre { white-space: pre-wrap; word-break: break-word; }
.avatar.small { width: 26px; height: 26px; font-size: .7rem; }

/* Runde Abhak-Schaltflaeche – gross genug fuer den Daumen. */
.check {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--surface);
  color: var(--ok); font-size: .95rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, background .15s ease;
}
.check:hover:not(:disabled) { border-color: var(--ok); }
.check.on { background: var(--ok-soft); border-color: var(--ok); }
.check:disabled { opacity: .45; cursor: not-allowed; }

.list-item.task { align-items: flex-start; }
.list-item.task .title { white-space: normal; }
.list-item.is-done .title { text-decoration: line-through; color: var(--muted); }
/* Abgelehnt ist nicht erledigt: durchgestrichen waere gelogen, offen ist
   die Aufgabe aber auch nicht mehr - deshalb nur zurueckgenommen. */
.list-item.status-rejected .title { color: var(--muted); }
.list-item.status-archived { opacity: .75; }

.done-block { margin-top: 1rem; }
.done-block > summary {
  cursor: pointer; color: var(--muted); font-size: .9rem; padding: .4rem 0;
}
.done-block .list { margin-top: .5rem; }

/* Auslastung */
.workload > summary { cursor: pointer; list-style: none; }
.workload > summary::-webkit-details-marker { display: none; }
.load-list { display: flex; flex-direction: column; gap: .75rem; margin-top: .8rem; }
.load-name { display: flex; align-items: center; gap: .5rem; font-size: .92rem; }
.load-bar {
  height: 8px; border-radius: 99px; background: var(--surface-2);
  overflow: hidden; margin: .3rem 0 .2rem;
}
.load-bar > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.load-bar > span.over { background: var(--warn); }

/* Auswahl-Chips (Vorwahlliste, Faelligkeit) */
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 99px; padding: .3rem .7rem; font-size: .85rem; cursor: pointer;
}
.chip:hover { border-color: var(--primary); }
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }

/* Mehrfachauswahl von Mitgliedern */
.picks { display: flex; flex-wrap: wrap; gap: .4rem; }
.pick {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: 99px;
  padding: .3rem .7rem; font-size: .85rem;
}
.pick:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.pick input { accent-color: var(--primary); }

/* Anhaenge */
.attachments { display: flex; flex-direction: column; gap: .35rem; margin: .6rem 0; }
.attachment {
  display: flex; align-items: center; gap: .5rem;
  background: var(--surface-2); border-radius: var(--radius-sm); padding: .4rem .6rem;
  font-size: .88rem;
}
.attachment .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-icon { flex: none; }
/* Der Dateiname laedt herunter, ohne die App zu verlassen (herunterladen()
   in app.js) - ein Knopf, der aussieht wie der Verweis, der er vorher war. */
.attachment button.grow {
  border: 0; background: none; padding: 0; font: inherit; text-align: left;
  color: var(--primary); cursor: pointer;
}
.attachment button.grow:hover { text-decoration: underline; }

/* Termine */
.list-item.event { align-items: flex-start; }
.list-item.event .title { white-space: normal; }
.datebox {
  flex: none; width: 46px; text-align: center; border-radius: var(--radius-sm);
  background: var(--primary-soft); color: var(--primary-strong); padding: .35rem 0;
}
.datebox .day { display: block; font-size: 1.15rem; font-weight: 700; line-height: 1.1; }
.datebox .mon { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }

.facts { display: flex; flex-direction: column; gap: .4rem; margin: .6rem 0; }
.fact { display: flex; gap: .55rem; align-items: flex-start; font-size: .92rem; }
.fact > span:first-child { flex: none; }

.updates { display: flex; flex-direction: column; gap: .5rem; max-height: 240px; overflow-y: auto; }
.update {
  border-left: 3px solid var(--primary); padding: .1rem .6rem;
  background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .92rem;
}
.link-btn {
  border: 0; background: none; color: var(--muted); cursor: pointer;
  font-size: .8rem; padding: 0 .2rem;
}
.link-btn:hover { color: var(--danger); }

/* ---- Meldungen --------------------------------------------------------- */
.notice {
  border: 1px solid var(--border); border-left: 4px solid var(--primary);
  background: var(--surface); border-radius: var(--radius-sm);
  padding: .7rem .9rem; margin-bottom: 1rem; font-size: .92rem;
}
.notice.ok { border-left-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.notice.warn { border-left-color: var(--warn); background: var(--warn-soft); color: var(--warn); }

.kinds { display: flex; flex-direction: column; gap: .2rem; margin-top: .6rem; }
.kind {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  padding: .7rem 0; border-top: 1px solid var(--border);
}
.kind:first-child { border-top: 0; }
.kind .grow { flex: 1; min-width: 180px; }
.kind .title { font-weight: 600; }
.switches { gap: .4rem; }

/* Schalter je Zustellweg – gross genug zum Antippen. */
.switch {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  border: 1px solid var(--border); border-radius: 99px;
  padding: .35rem .7rem; font-size: .85rem; min-height: 36px;
}
.switch:has(input:checked) {
  background: var(--primary-soft); border-color: var(--primary);
  color: var(--primary-strong); font-weight: 600;
}
.switch input { accent-color: var(--primary); }
.switch.off { opacity: .5; cursor: not-allowed; }

/* Einwilligung: eine Zeile je Punkt, damit nichts ueberlesen wird. */
.consent-list { list-style: none; margin: .8rem 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.consent-list li { display: flex; gap: .6rem; align-items: flex-start; font-size: .93rem; }
.consent-list li > span:first-child { flex: none; }

/* ---- Tagesplan --------------------------------------------------------- */
.day-nav { justify-content: space-between; margin-bottom: .8rem; }

/* Der Tag als durchgehender Streifen: Nur so sieht man, dass zwischen zwei
   Terminen zwanzig Minuten liegen und der Abend schon voll ist. */
.day-strip { display: flex; flex-direction: column; gap: .25rem; }
.day-row {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .7rem; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--border);
}
.day-row .grow { display: flex; flex-direction: column; min-width: 0; }
.day-time {
  flex: none; width: 3.2rem; font-variant-numeric: tabular-nums;
  font-size: .85rem; color: var(--muted);
}
.day-icon { flex: none; }
.day-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-row.task { border-left-color: var(--primary); cursor: pointer; }
.day-row.event { border-left-color: var(--accent); cursor: pointer; }
.day-row.protected { border-left-color: var(--ok); background: var(--surface-2); }
/* Fremde Belegung bleibt bewusst neutral – es gibt nichts zu sehen. */
.day-row.external {
  border-left-color: var(--muted); background: var(--surface-2);
  border-style: dashed;
}
.day-row.external .day-title { color: var(--muted); font-weight: 500; }
.day-row.free { border-style: dashed; background: transparent; }
.day-row.is-done .day-title { text-decoration: line-through; color: var(--muted); }

.balance { margin-bottom: 1rem; }
.balance-item { margin-bottom: .8rem; }
.balance-chips { gap: .35rem; }
.danger-text { color: var(--danger); }
.focus-now { margin-bottom: 1rem; }

.adhd-details { border-top: 1px solid var(--border); margin-top: .8rem; }

/* Nur fuer Screenreader - sichtbar ist die Frage bereits darueber. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Eine Dateiauswahl im Knopf (`<label class="btn">` mit `sr-only`-Feld)
   bleibt in der Tabreihenfolge - mit `.hidden` fiel sie heraus, und
   hochladen ging nur mit der Maus. Der Fokus liegt dann auf einem Pixel;
   zeigen muss ihn das Label. */
label.btn:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --- Umfragen ---------------------------------------------------------- */
.poll-option { padding: .6rem 0; border-top: 1px solid var(--border); }
.poll-option:first-child { border-top: 0; }
.poll-option .load-bar { margin: .35rem 0; }
.poll-option .chips { margin: .4rem 0 0; }
.chip.vote[disabled] { opacity: .5; cursor: default; }
/* Zeitvorschlaege untereinander: sie sind lang und wollen gelesen werden. */
.chips.slots { flex-direction: column; align-items: stretch; }
.chips.slots .pick { justify-content: flex-start; }
.pick.slot span { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* --- Methodenkatalog --------------------------------------------------- */
.method { border-top: 1px solid var(--border); padding: .5rem 0; }
.method > summary {
  display: flex; align-items: center; gap: .6rem;
  cursor: pointer; list-style: none; font-weight: 600;
}
/* Der Titel nimmt den Platz, das Schild bleibt rechts – sonst rutscht die
   Beschriftung in die Mitte und die Liste liest sich nicht mehr. */
.method > summary > span:first-of-type { flex: 1; }
.method > summary::-webkit-details-marker { display: none; }
.method > summary::before { content: "\25B8"; color: var(--muted); font-weight: 400; }
.method[open] > summary::before { content: "\25BE"; }
.method p { margin: .4rem 0; }
.method .steps { margin: .4rem 0 .6rem; padding-left: 1.2rem; color: var(--muted); }
.method .steps li { margin: .2rem 0; }

/* --- Teilschritte ------------------------------------------------------- */
.list.slim .list-item.step { padding: .35rem .5rem; gap: .5rem; }
/* Teilschritte sind Saetze, keine Titel: Sie duerfen umbrechen. */
.list-item.step .title { font-weight: 500; white-space: normal; }
.list-item.step.is-done .title { text-decoration: line-through; color: var(--muted); }

/* --- Spiele ------------------------------------------------------------- */
.card.match { margin-bottom: .8rem; }
/* Anzeigetafel: Heim rechtsbuendig an den Stand, Gast linksbuendig davon
   weg - so steht der Stand wirklich in der Mitte, auch bei langen Namen. */
.match-line {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: baseline; gap: .6rem; font-weight: 600;
}
.match-line .side:first-child { text-align: right; }
.match-line .side:last-child { text-align: left; }
/* Der Stand ist das, was am Spielfeldrand aus zwei Metern lesbar sein muss. */
.match-line .score {
  font-size: 1.5rem; font-variant-numeric: tabular-nums;
  color: var(--primary-strong); white-space: nowrap;
}
.match-controls { gap: .35rem; margin-top: .5rem; flex-wrap: wrap; }
.match-controls .btn { min-width: 2.4rem; }

/* Schwellen nebeneinander, auf dem Telefon untereinander. */
.row.levels { gap: .8rem; align-items: flex-start; }
@media (max-width: 520px) { .row.levels { flex-direction: column; } }

/* --- Marktplatz --------------------------------------------------------- */
/* Angebote sind Bilder, keine Zeilen: eine Auslage, die sich mit dem
   Bildschirm mitwaechst - auf dem Telefon zwei Spalten, am Rechner mehr. */
.offer-grid {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.card.offer { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
/* Der Ausschnitt kommt als Hintergrundbild - das Foto liegt genau einmal
   auf der Platte, jeder Rahmen zeigt nur seinen Teil davon. */
.offer-photo {
  aspect-ratio: 4 / 3; background-repeat: no-repeat;
  background-color: var(--surface-2);
}
.offer-photo.empty-photo {
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.offer-text { padding: .6rem .7rem .7rem; display: flex; flex-direction: column; }
.offer-text .title { font-weight: 600; overflow-wrap: anywhere; }
.offer-price { margin: .2rem 0 0; font-weight: 600; color: var(--primary-strong); }
/* Weggegebenes bleibt sichtbar, tritt aber zurueck - wer sucht, sieht
   sofort, was noch zu haben ist. */
.card.offer.gone { opacity: .6; }
.card.offer.gone .offer-photo { filter: grayscale(1); }

/* Das Foto mit den gefundenen Rahmen darueber. */
.photo-frame { position: relative; line-height: 0; margin: .6rem 0; }
.photo-frame img { width: 100%; border-radius: 10px; }
.photo-box {
  position: absolute; box-sizing: border-box;
  border: 2px solid var(--primary); border-radius: 6px;
  background: rgb(255 255 255 / 12%);
  color: #fff; font: 600 .75rem/1.4 inherit; text-align: center;
  text-shadow: 0 1px 2px rgb(0 0 0 / 70%);
}
/* Der Rahmen zur Zeile, in der gerade getippt wird - sonst muss man raten,
   welcher Gegenstand gemeint ist. */
.photo-box.active { background: rgb(255 255 255 / 35%); border-width: 3px; }
.photo-item { flex-wrap: nowrap; }

/* Suchleiste des Marktplatzes. Die Filter nutzen die vorhandenen .chip. */
.offer-filter { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem; }
.search {
  width: 100%; padding: .55rem .75rem; font: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.search:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Angehaengtes Angebot im Chat: eine schmale Karte ueber dem Text. */
.chat-offer {
  display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem;
  padding: .35rem; border-radius: var(--radius-sm); text-decoration: none;
  background: var(--surface-2); color: inherit;
}
.chat-offer.gone { opacity: .6; }
.chat-offer-photo {
  width: 2.6rem; height: 2.6rem; flex: none; border-radius: 8px;
  background-color: var(--surface); background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.chat-offer.gone .chat-offer-photo { filter: grayscale(1); }
.chat-offer-text { display: flex; flex-direction: column; min-width: 0; }
.chat-offer-title { font-weight: 600; overflow-wrap: anywhere; }
/* Der vorgemerkte Verweis sitzt direkt ueber dem Eingabefeld, damit klar
   ist, worauf sich die naechste Nachricht bezieht. */
.chat-attach {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .35rem .6rem; background: var(--primary-soft);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

/* --- Checklisten, Dienste, Beitraege, Protokolle ------------------------ */
.card.checklist, .card.shift, .card.due { margin-bottom: .8rem; }
/* Abgelegte Listen bleiben lesbar, treten aber zurueck. */
.card.checklist.archived { opacity: .65; }
/* Ein offener Dienst faellt auf - das ist der ganze Zweck der Anzeige. */
.card.shift.is-open { border-left: 3px solid var(--warn); }
/* Ein Protokoll ist vorformatierter Text: Absaetze und Einrueckungen sind
   Teil der Aussage, deshalb bleibt der Umbruch erhalten. */
.minutes-text {
  white-space: pre-wrap; overflow-wrap: anywhere; font: inherit;
  max-height: 60vh; overflow-y: auto; margin: .6rem 0;
  background: var(--surface-2); padding: .7rem; border-radius: var(--radius-sm);
}

/* --- Aushang, Kalender, Aemter ------------------------------------------ */
.card.post { margin-bottom: .8rem; }
/* Ein Aushang ist gesetzter Text: Absaetze gehoeren zur Aussage. */
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: .6rem 0 0; }
/* Das Amt steht neben dem Namen und sieht anders aus als die Rolle - es ist
   eine Beschriftung, keine Berechtigung. */
.badge.office { background: var(--accent-soft); color: var(--accent-strong); }

.cal-day { margin-bottom: .9rem; }
.cal-date {
  font-weight: 600; font-size: .9rem; color: var(--muted);
  padding-bottom: .25rem; border-bottom: 1px solid var(--border);
  margin-bottom: .35rem;
}
.cal-icon { width: 1.6rem; text-align: center; flex: none; }
/* Der Energiewert steht am Tag, nicht am Eintrag: Er gilt fuer den ganzen
   Tag und ueber alle Gruppen. Normal bleibt er zurueckhaltend - er soll
   auffallen, wenn er ueber dem Vorgesehenen liegt, sonst nicht. */
.cal-energy { font-weight: 500; font-variant-numeric: tabular-nums; }
/* Fremdbelegung traegt keinen Titel und soll auch nicht so aussehen, als
   haette man einen vergessen. */
.cal-entry.external { opacity: .6; }
.cal-entry.external .cal-icon { color: var(--muted); }
/* Die Mitgliederzeile traegt Name, E-Mail, Amt, Rolle und bis zu zwei
   Knoepfe. Auf dem Telefon passt das nicht nebeneinander - dann bricht sie
   um, statt den Namen zu zerdruecken. */
.list-item.member { flex-wrap: wrap; }
.list-item.member .grow { min-width: 55%; }
.list-item.member .btn { margin-left: auto; }

/* --- Breite Bildschirme -------------------------------------------------- */
/* Breite wird genutzt, nicht gestreckt. Eine Aufgabenzeile ueber 1200 px
   mit dem Knopf am rechten Rand ist keine bessere Aufgabenzeile, nur eine
   laengere. Deshalb drei Mittel, je nach Art des Inhalts:

   1. Sammlungen gleichartiger Eintraege (Aufgaben, Termine, Umfragen,
      Dienste, Mitglieder, Tage im Kalender ...) stehen in so vielen
      Spalten, wie mit mindestens 22rem nebeneinander passen. Ohne
      Umbruchpunkt, wie `.ov-grid`: auf dem Telefon eine Spalte, auf dem
      Tablet zwei, am Rechner zwei bis drei. `auto-fill` statt `auto-fit`,
      damit ein einzelner Eintrag nicht wieder ueber die ganze Breite
      gezogen wird.
   2. Seiten aus verschiedenen Karten (Profil, Meldungen, Einstellungen der
      Gruppe) fliessen in zwei Spalten - als Zeitungsspalten, nicht als
      Raster: Die Karten sind sehr verschieden hoch, und ein Raster liesse
      unter jeder kurzen ein Loch. Die Lesereihenfolge bleibt die der
      Seite, erst links hinunter, dann rechts.
   3. Was eine Zeitachse ist, bleibt eine Spalte: Chat und Tagesstreifen
      lesen sich von oben nach unten. Der Tagesplan stellt Energie und
      Vorschlaege daneben, statt darueber. */
.collection {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}
.list.collection { gap: .55rem .8rem; }
/* Der Abstand kommt aus dem Raster; ein eigener Rand unten machte die
   Zeilen ungleich hoch. */
.collection > .card, .collection > .cal-day { margin: 0; }

.columns { columns: 2 24rem; column-gap: 1rem; }
.columns > * { break-inside: avoid; }

@media (min-width: 64rem) {
  /* Die Reiter werden zur Leiste am Rand. Elf Reiter brachen oben in zwei
     Zeilen um und nahmen dem Inhalt die Hoehe; nebeneinander gestellt
     stehen sie alle in einer Spalte und bleiben beim Rollen sichtbar. */
  .group-body {
    display: grid; grid-template-columns: 12.5rem minmax(0, 1fr);
    gap: 1.75rem; align-items: start;
  }
  .group-body > .tabs {
    position: sticky; top: 4.75rem;
    flex-direction: column; flex-wrap: nowrap; gap: .15rem;
    border-bottom: 0; margin: 0;
  }
  .group-body > .tabs .tab {
    text-align: left; white-space: normal;
    border-bottom: 0; border-left: 3px solid transparent;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }
  .group-body > .tabs .tab:hover { color: var(--text); background: var(--surface-2); }
  .group-body > .tabs .tab.active {
    color: var(--primary-strong); background: var(--primary-soft);
    border-left-color: var(--primary);
  }
  /* Der Chat nimmt die Hoehe des Fensters statt fester 520 px. */
  .chat-log { height: max(22rem, calc(100dvh - 19rem)); }
  .day-layout {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 1.25rem; align-items: start;
  }
}

/* --- Uebersicht und Praesentationsbildschirm ----------------------------- */
/* Vier Karten nebeneinander, sobald Platz ist. `auto-fit` statt einer festen
   Spaltenzahl: Auf dem Telefon steht eine Karte je Zeile, auf dem Bildschirm
   an der Wand stehen alle vier - dieselbe Regel, ohne Umbruchpunkte, die
   irgendwann keiner mehr pflegt. */
.ov-grid {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.ov-card { margin: 0; }
/* Alle Groessen hier in `em`, nicht in `rem`: Der Bildschirm an der Wand
   stellt seine Schriftgroesse an EINER Stelle (`.present`) und alles darin
   waechst mit. Mit `rem` waere die Karte auf der Wand genauso gross wie in
   der App - genau das war der erste Anlauf. */
.ov-card h3 { margin: 0 0 .5rem; font-size: 1.05em; }
.ov-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.ov-row { display: flex; align-items: baseline; gap: .5rem; font-size: .95em; }
.ov-icon { flex: none; }
/* Der Titel darf umbrechen, das Wann nicht: Ein "in 3 Tagen", das in zwei
   Zeilen zerfaellt, liest sich als zwei Angaben. */
.ov-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ov-when { flex: none; color: var(--muted); font-size: .82em; white-space: nowrap; }
/* Ein Name darf umbrechen: Er ist so lang, wie ihn jemand eingetragen hat,
   und mit `nowrap` schob ein langer die Karte ueber den Bildschirmrand. */
.ov-person { flex: 0 1 auto; min-width: 0; color: var(--muted); font-size: .82em; overflow-wrap: anywhere; }
/* Ueberfaellig wird an der Farbe erkannt - und zusaetzlich daran, dass es
   ganz oben in seiner eigenen Karte steht. Farbe allein waere zu wenig. */
.ov-late .ov-when { color: var(--danger); font-weight: 600; }
/* Eine Zeile, die woandershin fuehrt, sieht aus wie die daneben - erst der
   Zeiger und die Farbe beim Ueberfahren verraten, dass sie etwas tut. Der
   Zeigefinger haengt am Attribut, nicht an der Klasse: Auf dem Bildschirm an
   der Wand fehlt es, und dort fuehrt keine Zeile irgendwohin. Ein
   `cursor: pointer` ohne Ziel waere ein Versprechen ohne Einloesung. */
.ov-row[data-ov-tab] { cursor: pointer; border-radius: var(--radius-sm); }
.ov-row[data-ov-tab]:hover .ov-title { color: var(--primary); }
.ov-row[data-ov-tab]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ov-empty { margin: 0; }
.ov-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; }

/* Der Bildschirm an der Wand wird aus einigen Metern Entfernung gelesen und
   hat den ganzen Schirm fuer sich: kein `max-width: 900px` wie eine
   Leseseite, und eine Schriftgroesse, die mit der Breite waechst. Der erste
   Anlauf setzte nur die Schriftgroesse - und weil `.page` bei 900 Pixeln
   endet und alles darin in `rem` gerechnet war, sah die Wand auf einem
   1920er Schirm exakt aus wie die App auf dem Laptop: drei Karten in einer
   Spalte von 870 Pixeln, der Rest leer. */
.present { max-width: 1600px; font-size: clamp(1rem, .55vw + .8rem, 1.5rem); }
.present .small { font-size: .85em; }
.present-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .8rem; flex-wrap: wrap; margin-bottom: .9rem;
}
.present-head h1 { margin: 0; font-size: 1.6em; }
/* Auf der Wand stehen die drei Listen nebeneinander, sobald der Schirm es
   hergibt - eine Karte, die allein in die zweite Zeile rutscht, sieht aus
   wie ein Fehler. ("Wartet auf dich" gibt es dort nicht: siehe
   overviewBody().) */
@media (min-width: 1200px) {
  .present .ov-grid { grid-template-columns: repeat(3, 1fr); }
}
