/*
 * Bausteine aus docs/design.md. Maße aus docs/screens/*.html, Farben nur über var(--…) aus tokens.css.
 * Wo ein Baustein kleiner als 44 px gezeichnet ist, vergrößert ein unsichtbares ::after die Tippfläche.
 */

/* Seitenkopf: runder Zurück-Knopf, Titel, rechts höchstens ein Knopf */

.page-header {
  height: var(--size-header);
  flex-shrink: 0;
  padding: 0 var(--space-page);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Kopf der Hauptseiten: am Handy links das Zeichen der Marke (32 × 17 px) mittig im 40-px-Feld, wo auf
 * Unterseiten der Zurück-Knopf sitzt. Ein Link zu „Termine“; ::after vergrößert die Tippfläche auf 44 px. */
.page-header__brand {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
}

.page-header__brand::after {
  content: "";
  position: absolute;
  inset: -2px;
}

.page-header__brand .brand__mark {
  width: 32px;
  height: 17px;
}

/* Seitentitel 24 px Space Grotesk, auf den Hauptseiten (mit Zeichen und Glocke) 32 px wie in den Screens 01 und 19 */
.page-header__title {
  flex-grow: 1;
  min-width: 0;
  font: var(--text-title);
  letter-spacing: var(--letter-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-header--main .page-header__title {
  font-size: 32px;
}

/* Runder Knopf auf dem Grund: Zurück, Schließen, eigener Initialen-Kreis im Kopf */

.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-card);
  color: var(--color-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: var(--text-small);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.icon-button::after {
  content: "";
  position: absolute;
  inset: -2px;
}

/* Karte: Kartenfarbe, 22 px Radius, keine Rahmen und keine Schatten */

.card {
  padding: var(--space-card);
  border-radius: var(--radius-card);
  background: var(--color-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card--list {
  min-height: 72px;
  padding: 12px 14px 12px 12px;
  border-radius: var(--radius-card-list);
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.card--menu {
  padding: 6px 8px;
  gap: 0;
}

/* Überschrift in einer Menükarte, z. B. „Guthaben“ im Konto */
.card--menu__title {
  padding: 10px 8px 2px;
  font: var(--text-section);
  letter-spacing: var(--letter-tight);
}

/* Gruppenkarte (Screen 07, Aufgabe 72): weiße Karte mit Radius 24 px und 14 px Innenabstand, Gruppenkachel 52 px,
 * Name 18 px Space Grotesk mit Marke „Admin“, nächster Termin, Pfeil; darunter eine Zeile auf dem Grund mit dem
 * eigenen Guthaben, dem offenen Betrag, „Alles bezahlt“, „Kostenlos“ oder „Zahlt selbst“ */
.group-card {
  padding: 14px;
  border-radius: 24px;
  gap: 12px;
}

.group-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.group-card__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.group-card__title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.group-card__name {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Marke „Admin“ neben dem Namen kleiner als sonst, wie in Screen 07: 11 px, 20 px hoch */
.group-card__title .badge {
  height: 20px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 11px;
}

.group-card__balance {
  min-height: 42px;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--color-ground);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.group-card__label {
  color: var(--color-ink-2);
}

.group-card__amount {
  font-weight: 700;
}

/* Statusmarke „Admin“ neben dem Namen einer Gruppe: schwarz mit weißer Schrift, 12 px/700 (wie .pill--admin) */
.badge {
  height: 24px;
  flex-shrink: 0;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--color-ink);
  color: var(--color-on-ink);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
}

/* Karte mit Text links und Knopf rechts, z. B. die Serie in Verwaltung → Planen */
.card--row {
  padding: 18px var(--space-card);
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

/* Schmale Listenkarte mit kleiner Datumskachel, z. B. Termine in der Verwaltung */
.card--compact {
  min-height: 64px;
  padding: 10px 14px 10px 10px;
}

/* Listenkarte mit Knopf, der auf schmalen Bildschirmen unter den Text rutscht (Korrektur in der Verwaltung) */
.card--wrap {
  flex-wrap: wrap;
  row-gap: 10px;
}

.card--wrap > .lines {
  flex: 1 1 150px;
}

.card--wrap > form {
  margin-left: auto;
}

/* Karte mit Überschrift, Feld und Knopf, z. B. die beiden Wege der Einladung */
.card--tight {
  gap: 12px;
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Abschnittsüberschrift über einer Gruppe von Karten (20 px Space Grotesk in Textfarbe), rechts ein Textknopf.
 * In einer Karte ist sie eine Kartenüberschrift (19 px). */

.section-header {
  margin-top: 14px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-header__title {
  font: var(--text-heading);
  letter-spacing: var(--letter-tight);
}

.card .section-header__title {
  font: var(--text-section);
  letter-spacing: var(--letter-tight);
}

.text-button {
  position: relative;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.text-button::after {
  content: "";
  position: absolute;
  inset: -6px 0;
}

.text-button-form {
  display: flex;
}

/* Satz unter einer Karte */

.note {
  padding: 2px 4px;
  font: var(--text-small);
  color: var(--color-ink-2);
}

/* Zusage-Knöpfe ✓ und ✗ (Aufgabe 73, Leitfaden „Zusage-Knöpfe“): aus getönt mit Symbol in --color-icon-off, ✓ an
 * grün mit Haken in --color-on-accent, ✗ an in --color-declined (schwarz, dunkel hell). Kreis 44 px in Listen,
 * Symbol 22 px mit Strich 2,6 (im Markup) und runden Enden. */

.toggle {
  width: var(--size-rsvp);
  height: var(--size-rsvp);
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-icon-off);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toggle svg {
  width: 22px;
  height: 22px;
}

.toggle--large {
  width: var(--size-toggle-large);
  height: var(--size-toggle-large);
}

.toggle--large svg {
  width: 26px;
  height: 26px;
}

/* An: der Schalter selbst oder, nur zur Anzeige (Landing Page, Anleitung), ein Kreis mit toggle--on */
.toggle[aria-pressed="true"],
.toggle--on {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

/* ✗ an (Aufgabe 55): schwarz gefüllt, das Kreuz weiß (dunkel umgekehrt). Nicht rot, Rot bleibt Minus und Löschen. */
.toggle--no[aria-pressed="true"],
.toggle--no.toggle--on {
  background: var(--color-declined);
  color: var(--color-on-declined);
}

/* Die beiden Schalter einer Antwort nebeneinander: ✓ und ✗ (events/_answer) */
.answer-pair {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

/* Auf einer Gruppenfarbe (Karte „Als Nächstes“): aus in --color-group-off (Weiß 45 %) mit dem Symbol in
 * --color-on-group-off. Hell und dunkel gleich wie alles auf der Gruppenfläche, darum ✗ an auch dunkel schwarz. */
.answer-pair--on-group .toggle {
  background: var(--color-group-off);
  color: var(--color-on-group-off);
}

.answer-pair--on-group .toggle[aria-pressed="true"] {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.answer-pair--on-group .toggle--no[aria-pressed="true"] {
  background: var(--color-group-declined);
  color: var(--color-on-group-declined);
}

/* Nach Terminbeginn zeigt der Schalter den Stand nur noch an */
.toggle:disabled {
  cursor: default;
}

/* button_to steckt den Schalter in ein Formular, das ihn nicht größer machen soll */
.toggle-form {
  display: flex;
  flex-shrink: 0;
}

/* Gruppenfarben (Aufgabe 72): Eine Klasse je Farbe setzt die Fläche --group-fill und die Diagrammlinie --group-line
   (hell und dunkel aus tokens.css). Die Bausteine lesen nur diese beiden; Text auf der Fläche ist immer
   --color-on-group. Ohne Klasse gilt Grau (neutral) über den Rückfall in var(). */

.group-color--neutral {
  --group-fill: var(--group-neutral);
  --group-line: var(--group-neutral-line);
}

.group-color--blue {
  --group-fill: var(--group-blue);
  --group-line: var(--group-blue-line);
}

.group-color--violet {
  --group-fill: var(--group-violet);
  --group-line: var(--group-violet-line);
}

.group-color--pink {
  --group-fill: var(--group-pink);
  --group-line: var(--group-pink-line);
}

.group-color--orange {
  --group-fill: var(--group-orange);
  --group-line: var(--group-orange-line);
}

.group-color--yellow {
  --group-fill: var(--group-yellow);
  --group-line: var(--group-yellow-line);
}

.group-color--teal {
  --group-fill: var(--group-teal);
  --group-line: var(--group-teal-line);
}

/* Datumskachel, überall gleich (Aufgabe 42): oben klein der Monat, darunter groß der Tag. Seit Aufgabe 72 ohne
 * Gruppenfarbe, getönt in Textfarbe; die Gruppe zeigt in Listen der Gruppenpunkt vor ihrem Namen. */

.date-tile {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-tile);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.date-tile__day {
  font: var(--text-section);
  font-size: 18px;
  letter-spacing: var(--letter-tight);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Monat 10 px/700 in Großbuchstaben mit 0,06 em Sperrung in Nebentext (Aufgabe 73), 3 px über dem Tag */
.date-tile__month {
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-2);
}

/* In der Terminzeile 46 × 46 px (Aufgabe 73) */
.date-tile--small {
  width: 46px;
  height: 46px;
}

/* Gruppenpunkt (Aufgabe 72): 10 px in der Gruppenfläche vor dem Namen der Gruppe in Listen über alle Gruppen,
   aria-hidden, der Name steht immer dabei. */
.group-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  margin-right: 7px;
  border-radius: var(--radius-pill);
  background: var(--group-fill, var(--group-neutral));
  vertical-align: 1px;
}

/* Gruppenkachel (Aufgabe 72): Initialen in Space Grotesk auf der Gruppenfläche, Text --color-on-group.
   Grundgröße 32 px (Kalender, Einstellungen, neben einem Kippschalter), --medium 40 px (Konto),
   --preview 44 px (Vorschau in „Einstellungen“), --large 52 px (Gruppenliste). */
.group-tile {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--letter-tight);
  line-height: 1;
}

.group-tile--medium {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  font-size: 14px;
}

.group-tile--preview {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 16px;
}

.group-tile--large {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 18px;
}

/* Name der Gruppe als Pille in der Gruppenfläche (Vorschau in „Einstellungen“). Ein langer Name wird gekürzt. */
.group-pill {
  max-width: 100%;
  height: 24px;
  box-sizing: border-box;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Farbwahl: sieben Radio-Knöpfe, das runde Feld (38 px in der Gruppenfläche) ist ihre Beschriftung. Gewählt:
   doppelter Ring (2 px Kartenfarbe, dann 2 px Textfarbe) und Haken in --color-on-group. Ohne JavaScript nutzbar. */
.swatches {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.swatches__legend {
  padding: 0;
  margin-bottom: 6px;
  font: var(--text-small);
  font-weight: 600;
  color: var(--color-ink-2);
}

.swatch {
  position: relative;
  min-width: 0;
  height: var(--size-tap);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.swatch__input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.swatch__dot {
  width: min(38px, 100% - 8px);
  aspect-ratio: 1;
  box-sizing: border-box;
  border-radius: var(--radius-pill);
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.swatch__check {
  display: none;
}

.swatch__input:checked + .swatch__dot {
  box-shadow: 0 0 0 2px var(--color-card), 0 0 0 4px var(--color-ink);
}

.swatch__input:checked + .swatch__dot .swatch__check {
  display: block;
}

.swatch__input:focus-visible + .swatch__dot {
  outline: 2px solid var(--color-ink);
  outline-offset: 6px;
}

/* Karte „Farbe“ in „Einstellungen“ */
.card--color {
  padding-top: 16px;
  gap: 12px;
}

/* Vorschau in „Einstellungen“: Gruppenkachel, Name und eine Pille mit dem Datum des nächsten Termins in der
   gewählten Farbe, auf dem Grund (Radius 16 px). */
.color-preview {
  padding: 12px;
  border-radius: 16px;
  background: var(--color-ground);
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-preview[hidden] {
  display: none;
}

.color-preview__name {
  flex-grow: 1;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.color-preview .group-pill {
  flex-shrink: 0;
  height: 28px;
  line-height: 28px;
  border-radius: 14px;
}

/* Knöpfe: Hauptknopf schwarz (--color-action, dunkel hell), Nebenknopf getönt, beide als Pille. Nie grün. */

.button {
  position: relative;
  min-height: var(--size-tap);
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: var(--text-body);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: var(--color-action);
  color: var(--color-on-action);
}

.button--secondary {
  background: var(--color-tint);
  color: var(--color-ink);
}

/* Auf dem Grund statt in einer Karte, z. B. „Bearbeiten“ im Seitenkopf */
.button--raised {
  background: var(--color-card);
  color: var(--color-ink);
}

/* Nebenknopf für eine Aktion, die sich nicht zurücknehmen lässt, z. B. „Löschen“ in „Einstellungen“ */
.button--danger {
  color: var(--color-negative);
}

/* Ausgeschaltet: grau statt Text- oder Warnfarbe; ein Satz daneben sagt, warum */
.button:disabled {
  color: var(--color-ink-3);
  cursor: default;
}

/* Der Hauptknopf ausgeschaltet getönt statt schwarz, z. B. „Mitglied einladen“ bei abgelaufenem Link */
.button--primary:disabled {
  background: var(--color-tint);
}

.button--large {
  min-height: var(--size-field);
  font-size: 16px;
}

/* Im Seitenkopf 40 px hoch gezeichnet, Tippfläche trotzdem 44 px */
.button--small {
  min-height: 40px;
  font-size: 14px;
}

.button--small::after {
  content: "";
  position: absolute;
  inset: -2px 0;
}

/* Mit Symbol vor dem Text, z. B. „+ Termin“ im Seitenkopf */
.button--icon {
  padding: 0 16px 0 12px;
}

/* Der Hauptknopf der Seite (Layout-Platz .main-action): am Handy 52 px hoch, so breit wie sein Text plus
 * 26 px je Seite, auch mit Plus (Screens 07, 16), Schrift 15 px. Ab 900 px wie ein Knopf im Seitenkopf, 40 px hoch. Zu lange
 * Texte brechen um, statt über den Rand zu laufen. */
.button--main {
  min-height: 52px;
  max-width: 100%;
  padding: 0 26px;
  gap: 8px;
  font-size: 15px;
}

.button--main.button--icon {
  padding: 0 26px;
}

.button--main svg {
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .button--main {
    min-height: 40px;
    padding: 0 18px;
    gap: 6px;
    font-size: 14px;
  }

  .button--main.button--icon {
    padding: 0 16px 0 12px;
  }

  .button--main svg {
    width: 16px;
    height: 16px;
  }

  /* Tippfläche trotzdem 44 px, wie .button--small */
  .button--main::after {
    content: "";
    position: absolute;
    inset: -2px 0;
  }
}

.button--block {
  width: 100%;
  display: flex;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* button_to steckt den Knopf in ein Formular, das dann die Spalte füllt */
.button-row > form {
  display: flex;
  flex-direction: column;
}

/* Umschalter: in einer Karte auf --color-ground, auf dem Grund auf Kartenfarbe (--wide, --tabs). Das gewählte
 * Feld schwarz mit weißer Schrift (dunkel umgekehrt). */

.segmented {
  padding: 3px;
  border-radius: 18px;
  background: var(--color-ground);
  display: inline-flex;
  flex-shrink: 0;
}

.segmented__option {
  position: relative;
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 15px;
  background: none;
  color: var(--color-ink);
  font: var(--text-small);
  font-weight: 600;
  cursor: pointer;
}

.segmented__option::after {
  content: "";
  position: absolute;
  inset: -7px 0;
}

/* Als Link, z. B. Diagramm und Tabelle im Guthaben */
a.segmented__option {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.segmented__option[aria-current="true"],
.segmented__option[aria-current="page"],
.segmented__option[aria-pressed="true"] {
  background: var(--color-ink);
  color: var(--color-on-ink);
  font-weight: 600;
}

/* Über die ganze Breite auf weißer Fläche, direkt auf dem Grund: die Bereiche einer Gruppe. Gleich breite
 * Felder, 40 px hoch, Tippfläche 44 px. Den Text kürzt .segmented__label, nicht das Feld: Ein overflow am Feld
 * schnitte die Tippfläche (::after) auf 40 px ab. Damit „Who's coming“ auch bei 320 px in sein Drittel passt, wird die Schrift auf
 * schmalen Bildschirmen kleiner (14 px ab 390 px, 12 px bei 320 px), statt die Breite ungleich zu verteilen. */
.segmented--wide {
  border-radius: 23px;
  background: var(--color-card);
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
}

.segmented--wide .segmented__option {
  height: 40px;
  padding: 0 4px;
  border-radius: 20px;
  justify-content: center;
  font: var(--text-body);
  font-size: clamp(12px, 3.6vw, 14px);
  font-weight: 500;
  white-space: nowrap;
}

.segmented--wide a.segmented__option {
  display: block;
  line-height: 40px;
  text-align: center;
}

.segmented--wide .segmented__option::after {
  inset: -2px 0;
}

.segmented--wide .segmented__option[aria-current="page"] {
  font-weight: 600;
}

/* Über die ganze Breite einer Karte, auf getönter Fläche: „Gruppe hervorheben“ im Konto. Gleich breite
 * Felder, 38 px hoch, Tippfläche 44 px; den Text kürzt wie bei --wide .segmented__label. Ab vier Gruppen eine waagerecht scrollbare Reihe (--scroll). */
.segmented--fill {
  border-radius: 22px;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
}

.segmented--fill .segmented__option {
  height: 38px;
  padding: 0 4px;
  border-radius: 19px;
  justify-content: center;
  white-space: nowrap;
}

.segmented--fill a.segmented__option {
  display: block;
  line-height: 38px;
  text-align: center;
}

.segmented--fill .segmented__option::after {
  inset: -3px 0;
}

/* Als Radio-Paar in einem Formular (Preisart in „Gruppe anlegen“ und „Einstellungen“): Die Option ist das
 * Label, das Radio liegt unsichtbar darüber. Gewählt wie aria-pressed. Mit .segmented--fill. */
.segmented--radio {
  min-width: 0;
  margin: 0;
  border: 0;
}

/* Drei Preisarten (Aufgabe 64): wenig Innenabstand, und bei 320 px etwas kleinere Schrift, damit „Geteilt“ und
 * „Zahlt selbst“ auch gewählt (fett) ganz in ihr Drittel passen. */
.segmented--radio .segmented__option {
  padding-inline: 2px;
  font-size: clamp(12px, 3.75vw, 13px);
  display: flex;
  align-items: center;
}

.segmented--radio .segmented__option > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segmented__input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented__option:has(> .segmented__input:checked) {
  background: var(--color-ink);
  color: var(--color-on-ink);
  font-weight: 600;
}

.segmented__option:has(> .segmented__input:focus-visible) {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

.segmented--scroll {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.segmented--scroll::-webkit-scrollbar {
  display: none;
}

.segmented--scroll .segmented__option {
  flex: 0 0 auto;
  padding: 0 16px;
}

/* Nach dem Umschalter rückt die Überschrift näher heran */
.segmented--wide + .section-header {
  margin-top: 6px;
}

/* Menüzeile: runde getönte Fläche mit Symbol, Titel, Nebentext, Pfeil */

.menu-row {
  min-height: 64px;
  padding: 8px;
  border-radius: var(--radius-row);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-ink);
  text-decoration: none;
}

/* Eine Menüzeile als Knopf, z. B. „Abmelden“ im Konto */
.menu-row--button {
  width: 100%;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.menu-row__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Der Kreis in einer Gruppenfarbe (Verzeichnis der Anleitung), das Symbol fast schwarz */
.menu-row__icon--group {
  background: var(--group-fill);
  color: var(--color-on-group);
}

.menu-row__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu-row__title {
  font-weight: 600;
}

.menu-row__subtitle {
  font: var(--text-small);
  color: var(--color-ink-2);
}

/* Rechts vor dem Pfeil: die gewählte Sprache, oder fett ein Guthaben (--amount) */
.menu-row__value {
  flex-shrink: 0;
  color: var(--color-ink-2);
}

.menu-row__value--amount {
  color: var(--color-ink);
  font-weight: 700;
}

.menu-row__chevron {
  flex-shrink: 0;
  color: var(--color-ink-3);
}

/* Ohne Symbol, z. B. in „Konto“ */
.menu-row--plain {
  min-height: 56px;
  padding: 6px 12px;
}

/* Aktion in einer Menükarte: Titel und Nebentext, ganze Zeile als Knopf (Termin absagen, löschen) */

.action-row {
  width: 100%;
  min-height: 60px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-row);
  background: none;
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  font: var(--text-body);
  text-align: left;
  cursor: pointer;
}

/* Eine Zeile ohne Nebentext, z. B. „Abmelden“ im Konto */
.action-row--plain {
  min-height: 52px;
  font-weight: 600;
}

/* Eine Auswahl, die gewählte mit Haken rechts, z. B. die Sprache */
.action-row--choice {
  min-height: 56px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-row__title {
  font-weight: 600;
}

.action-row__subtitle {
  font: var(--text-small);
  color: var(--color-ink-2);
}

/* Als Link, z. B. „Korrektur“ im Journal eines Mitglieds */
a.action-row {
  text-decoration: none;
}

.action-row--danger {
  color: var(--color-negative);
}

/* Karte „Kosten“ im Termin-Detail: Preis nach Preisart, darunter getönt „Dein Anteil“ */
.card--costs {
  padding: 18px 20px 16px;
  gap: 10px;
}

.cost-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cost-list__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 12px;
}

.cost-list__row dt {
  color: var(--color-ink-2);
}

.cost-list__row dd {
  margin: 0;
  text-align: right;
}

/* Unter „Dabei“: wer belastet ist, aber nicht dabei (späte Absagen, ehemalige Mitglieder), eine eigene Zeile */
.cost-list__extra {
  flex-basis: 100%;
}

.share-total {
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--radius-row);
  background: var(--color-tint);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.share-total__label {
  font-weight: 600;
}

.share-total__amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.share-total__estimate {
  font: var(--text-small);
  color: var(--color-ink-2);
}

.share-total__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--letter-tight);
}

/* Getönte Zeile in einer Karte, die weiterführt (z. B. Initialen und Anzahl) */

.summary-row {
  min-height: var(--size-tap);
  padding: 0 12px;
  border-radius: var(--radius-row);
  background: var(--color-tint);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-ink);
  text-decoration: none;
}

.summary-row__label {
  flex-grow: 1;
  min-width: 0;
  font-weight: 600;
}

.summary-row svg {
  flex-shrink: 0;
  color: var(--color-ink-2);
}

/* Zeile „Zusagen“ unter einem kommenden Termin in den Listen (Aufgabe 61, seit Aufgabe 73 12 px/500): „min. 4, Zusagen 2“
 * in Nebentext, eine Zeile.
 * Hervorgehoben (fett in Textfarbe, dazu ein Hinweis für Screenreader), solange niemand dabei ist oder die
 * Mindestzahl fehlt. Weder Rot noch Grün. */
.attendance-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font: var(--text-tiny);
  font-weight: 500;
  color: var(--color-ink-2);
  white-space: nowrap;
}

.attendance-line svg {
  flex-shrink: 0;
}

.attendance-line__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-line--short {
  font-weight: 700;
  color: var(--color-ink);
}

/* Die Zeile „Zusagen“ bleibt eine Zeile: Ist die dritte Zeile einer Terminzeile schmaler als 129 px (bei 320 px neben
 * den Schaltern gut 115 px), entfällt das Symbol (nur Schmuck). „min. 12, going 11“ braucht fett (12 px/700) knapp so viel wie vorher „min. 12, going: 11“ (109 px), mit
 * Symbol (14 px) und Abstand (6 px) 129 px. */
.event-row__below {
  margin-top: 1px;
  container-type: inline-size;
}

@container (width < 129px) {
  .attendance-line svg {
    display: none;
  }
}

/* Angaben in einer Karte: Beschriftung links, Wert rechts (Ort, Preis, Hinweis im Termin-Detail) */

.card--details {
  padding: var(--space-card) var(--space-card) 10px;
  gap: 10px;
}

.detail-list {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.detail-row {
  min-height: 40px;
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-row dt {
  flex-shrink: 0;
}

.detail-row__value {
  min-width: 0;
  margin: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: break-word;
}

/* Wert in zwei Zeilen, rechtsbündig: „ca. 10 €“ und darunter „Zahlt jede Person selbst“ (Aufgabe 64) */
.detail-row__value--lines {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.detail-row__value--lines .text-small {
  font-weight: 400;
}

/* Wert mit Knopf daneben, z. B. ein Vorschlag mit „Übernehmen“ unter „Einstellungen“ */
.detail-row__value--action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-row__value--action .button {
  padding-inline: 14px;
}

/* Wird es eng (320 px, lange Texte), bricht die Beschriftung um statt den Knopf hinauszuschieben */
.detail-row:has(> .detail-row__value--action) > dt {
  flex-shrink: 1;
  min-width: 0;
}

/* Kostendeckung in der Kasse: Zeilen wie im Termin-Detail, darunter Satz und „Preis anpassen“ */
.card--coverage {
  padding-bottom: var(--space-card);
}

/* Zwei Nebenknöpfe nebeneinander in einer Karte, je 44 px hoch (Termin-Detail, Kalender-Link) */
.button--pair {
  padding: 0 8px;
  gap: 8px;
  font-size: 14px;
}

/* Steht nur einer da (abgesagter Termin nur mit „Alle abonnieren“), füllt er die Zeile */
.button-row--single {
  grid-template-columns: minmax(0, 1fr);
}

/* Gruppe: wer kommt wann. Eine Tabelle in einer Karte, Spalten 36 px breit, die Namen nehmen den Rest.
 * Sind es mehr Spalten, als hineinpassen, scrollt die Tabelle in ihrer Karte, nie die Seite. */

.card--roster {
  padding: 8px 12px 6px;
  gap: 0;
}

.roster-scroll {
  overflow-x: auto;
}

.roster {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

/* :where hält die Grundregel schwach, damit Spalten-Klassen sie ohne Verschachtelung überschreiben */
:where(.roster) th,
:where(.roster) td {
  position: relative;
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.roster__dates > * {
  height: 46px;
}

/* Wird es eng, bricht die Ecke in zwei Zeilen um, statt gekürzt zu werden */
.roster__slot {
  padding-right: 6px;
  font: var(--text-small);
  line-height: 1.2;
  color: var(--color-ink-2);
  text-align: left;
  overflow-wrap: anywhere;
}

/* Spaltenkopf wie Screen 09: Wochentag 11 px in Nebentext, darunter der Tag 16 px Space Grotesk (Aufgabe 74) */
.roster__date {
  width: 36px;
  line-height: 1.1;
}

.roster__weekday,
.roster__day {
  display: block;
}

.roster__weekday {
  font-size: 11px;
  font-weight: 400;
  color: var(--color-ink-2);
}

.roster__day {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: var(--letter-tight);
  font-variant-numeric: tabular-nums;
}

/* Zeile „Zusagen“ auf --color-ground (Screen 09) */
.roster__counts > * {
  height: 34px;
  background: var(--color-ground);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.roster__counts > :first-child {
  padding-left: 10px;
  border-radius: 14px 0 0 14px;
  color: var(--color-ink-2);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.roster__counts > :last-child {
  border-radius: 0 14px 14px 0;
}

/* Am Handy endet die Zeile vor den ausgeblendeten Spalten (only-wide) */
@media (max-width: 899.98px) {
  .roster__counts > :has(+ .only-wide) {
    border-radius: 0 14px 14px 0;
  }
}

.roster tbody > tr > * {
  height: 48px;
}

/* Rechts Luft, damit „(du)“ nicht am ersten Kreis klebt */
.roster__name {
  padding-left: 2px;
  padding-right: 6px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

/* Initialen-Kreis 28 px vor dem Namen, der eigene schwarz (Aufgabe 74) */
.roster__who {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar--roster {
  font-size: 11px;
}

.roster__label {
  min-width: 0;
  display: flex;
  gap: 4px;
}

.roster__truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster__suffix {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Zellen 30 px (Screen 09, Aufgabe 74): Zusage grüner Kreis mit schwarzem Haken, Absage schwarzer Kreis mit weißem
   Kreuz (dunkel umgekehrt wie der ✗-Knopf), keine Antwort leerer getönter Kreis. Die Bedeutung steht als Text daneben
   (Aufgabe 55), die Legende nennt alle drei. */
.roster__mark {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.roster__mark--in {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.roster__mark--out {
  background: var(--color-declined);
  color: var(--color-on-declined);
}

.roster-note {
  align-items: center;
  flex-wrap: wrap;
  row-gap: 2px;
  font: var(--text-small);
}

/* Legende: kleine Muster wie in der Matrix (16 px), je mit ihrem Wort */
.roster-legend {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
}

.roster-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.roster__mark--small {
  width: 16px;
  height: 16px;
  margin: 0;
}

/* Unter 360 px: schmalere Spalten, damit die Namen Platz behalten */
@media (max-width: 359px) {
  .card--roster {
    padding-inline: 8px;
  }

  .roster__date {
    width: 30px;
  }

  .roster__mark:not(.roster__mark--small) {
    width: 26px;
    height: 26px;
  }

  .roster__who {
    gap: 6px;
  }
}

/* Eingabefeld: in einer Karte die Fläche --color-ground ohne Rahmen, 48 px, Radius 14 px, Beschriftung 13 px/600
 * in Nebentext darüber. Direkt auf dem Grund (ohne Karte) getönt, damit es sich abhebt. */

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font: var(--text-small);
  font-weight: 600;
  color: var(--color-ink-2);
}

.field__input {
  width: 100%;
  height: var(--size-field);
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-row);
  background: var(--color-tint);
  color: var(--color-ink);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.card .field__input {
  background: var(--color-ground);
}

.field__input::placeholder {
  color: var(--color-ink-2);
  opacity: 1;
}

.field__input:focus-visible {
  outline-offset: 0;
}

/* Mehrzeilig, z. B. eine Beschreibung */
.field__input--area {
  height: auto;
  min-height: var(--size-field);
  padding: 13px 14px;
  line-height: 1.35;
  resize: vertical;
}

/* Die Beschreibung der Gruppe wächst mit ihrem Text (Screen 12), wo der Browser es kann */
.field__input--area[rows="1"] {
  field-sizing: content;
  max-height: 160px;
}

/* Auswahl mit eigenem Pfeil statt dem des Browsers */
.field__select {
  position: relative;
  display: flex;
  align-items: center;
}

.field__select .field__input {
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
}

.field__select svg {
  position: absolute;
  right: 14px;
  color: var(--color-ink-2);
  pointer-events: none;
}

/* Datumsfelder: in schmalen Spalten bleibt das Kalender-Symbol sichtbar */
.field__input[type="date"] {
  min-width: 0;
  padding: 0 10px 0 14px;
}

.field__hint {
  font: var(--text-small);
  color: var(--color-ink-2);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* Drei Felder in einer Zeile: Beginn, Ende und Preis eines Termins */
.field-row--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-row--three .field__input {
  min-width: 0;
  padding-inline: 12px;
}

/* Uhrzeit in drei Spalten (Termin bearbeiten, Screen 17): enger und mit kleinem Symbol, damit „19:00“ ganz zu sehen
 * bleibt */
.field-row--three .field__input[type="time"] {
  padding-inline: 10px 8px;
}

.field-row--three .field__input[type="time"]::-webkit-calendar-picker-indicator {
  width: 14px;
  margin-inline-start: 2px;
  padding: 0;
}

/* Absagen und Löschen in „Termin bearbeiten“ (Screen 17): zwei Nebenknöpfe, darunter ein Satz */
.card--event-actions {
  gap: 8px;
}

.card--event-actions > p {
  margin-top: 4px;
}

/* Ein Formular aus mehreren Karten, z. B. „Gruppe anlegen“ und „Einstellungen“ */
.form-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

.card--price {
  gap: 10px;
}

.card--quota {
  padding-block: 16px;
}

/* Rechner für Beitrag und Preis unter Beitrag und Saison (Gruppe anlegen, Einstellungen) */
.card--calculator {
  padding-block: 16px;
}

/* Bricht eine Beschriftung um („Gesamtkosten der Saison“), bleiben die Felder einer Zeile auf einer Linie */
.card--calculator .field-row {
  align-items: end;
}

/* Gesamtkosten neben den Mitgliedern; ohne JavaScript steht das Feld allein und füllt die Zeile. Ebenso der
   Wochentag einer Serie: neben der Woche im Monat nur bei „Monatlich am 3. Dienstag“, sonst allein (Aufgabe 58). */
.field-row--calculator:not(:has(> .field:not([hidden]) + .field:not([hidden]))) > .field,
.field-row--rhythm:not(:has(> .field:not([hidden]) ~ .field:not([hidden]))) > .field {
  grid-column: 1 / -1;
}

/* Bei „Monatlich am 14.“ ist die Zeile leer und fällt samt Abstand weg */
.field-row--rhythm:not(:has(> .field:not([hidden]))) {
  display: none;
}

/* Ein Rahmen, der nur einen Stimulus-Controller trägt und im Layout wegfällt */
.contents {
  display: contents;
}

/* Ein fieldset ohne eigenes Aussehen, etwa für die Felder der Serie unter „Regelmäßig treffen“ (Gruppe anlegen):
 * Es gruppiert und sperrt Felder, das Layout bestimmt die Klasse daneben (stack). */
.fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* Zeile mit Kippschalter: Titel und Erklärung links, Schalter rechts. Die ganze Zeile ist das Label. */
.switch-row {
  min-height: var(--size-tap);
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.switch-row__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-row__title {
  font: var(--text-body);
  font-weight: 600;
}

.switch-row__hint {
  font: var(--text-small);
  color: var(--color-ink-2);
}

/* Kippschalter: Checkbox mit role="switch", Pille 52 × 32 px mit Knopf von 26 px. An schwarz (--color-switch-on,
 * dunkel hell) mit Knopf in Gegenfarbe, aus grau.
 * Bewusst nicht grün, Grün bleibt der Zusage vorbehalten. */
.switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 52px;
  height: 32px;
  margin: 6px 0;
  border-radius: 16px;
  background: var(--color-switch-off);
  cursor: pointer;
  transition: background-color 0.15s;
}

.switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 13px;
  background: var(--color-switch-knob-off);
  transition: transform 0.15s;
}

.switch:checked {
  background: var(--color-switch-on);
}

.switch:checked::before {
  background: var(--color-on-ink);
  transform: translateX(20px);
}

@media (prefers-reduced-motion: reduce) {
  .switch,
  .switch::before {
    transition: none;
  }
}

/* Zwei Datumsfelder passen erst ab 360 px nebeneinander, darunter stehen sie untereinander */
@media (max-width: 359px) {
  .field-row--dates {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Initialen-Kreis: getönt, der eigene schwarz (dunkel hell) */

.avatar {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.avatar--own {
  background: var(--color-ink);
  color: var(--color-on-ink);
}

.avatar--medium {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.avatar--large {
  width: 40px;
  height: 40px;
  font: var(--text-small);
  font-weight: 700;
  line-height: 1;
}

/* Der eigene Kreis in „Konto“ */
.avatar--xl {
  width: var(--size-toggle-large);
  height: var(--size-toggle-large);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.avatar-stack {
  display: flex;
  align-items: center;
}

.avatar-stack .avatar {
  border: 2px solid var(--color-tint);
}

/* Auf getönter Fläche heben sich fremde Kreise mit --color-avatar ab */
.avatar-stack .avatar:not(.avatar--own) {
  background: var(--color-avatar);
}

.avatar-stack .avatar + .avatar {
  margin-left: -6px;
}

/* Statusmarke: getönte Pille mit Text, z. B. „Mitglied“ oder „Korrigiert“. „Admin“ schwarz mit weißer Schrift,
 * „Gast“ ohne Fläche mit gestricheltem Rand. */

.pill {
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--color-tint);
  color: var(--color-ink);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

/* Kleine Marke unter einer Zeile, z. B. „Geändert“ in Verwaltung → Planen */
.pill--small {
  min-height: 20px;
  margin-top: 2px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

.pill--admin {
  background: var(--color-ink);
  color: var(--color-on-ink);
  font-weight: 700;
}

.pill--guest {
  padding: 1.5px 8.5px;
  border: 1.5px dashed var(--color-ink-3);
  background: none;
  color: var(--color-ink-2);
}

/* Die eigene Person oben in „Konto“: Initialen-Kreis, Name, darunter Marke oder E-Mail */

.profile {
  flex-direction: row;
  align-items: center;
}

/* Im Konto kompakter, wie im Screen: Kreis 48 px, Name 17 px, die E-Mail in einer Zeile. Wo „Name ändern“
 * steht, hängt an der Breite der Karte (Container), nicht am Fenster: Grundfall darunter, linksbündig mit dem
 * Namen. Rechts daneben wie im Screen erst, wenn der Inhalt der Karte 326 px breit ist (Handy ab 390 px, Desktop);
 * die Namensspalte bleibt dann mindestens rund 126 px breit, genug für übliche Vor- und Nachnamen. */
.profile--account {
  padding: 16px;
  container-type: inline-size;
}

.profile__grid {
  flex-grow: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.profile__grid .profile__action {
  grid-column: 2;
  justify-self: start;
}

@container (min-width: 326px) {
  .profile__grid {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .profile__grid .profile__action {
    grid-column: 3;
  }
}

.profile--account .avatar {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.profile--account .profile__text {
  gap: 4px;
}

.profile--account .pill {
  white-space: nowrap;
}

/* Der Name bricht zwischen Wörtern um; nur ein Wort, das allein nicht in die Spalte passt, bricht im Wort
 * (overflow-wrap: break-word von .profile__name). */
.profile--account .profile__name {
  font: 700 17px/1.3 var(--font-sans);
  letter-spacing: 0;
}

.profile--account .profile__email {
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Die Gruppen in „Mein Guthaben“: Zeilen 60 px hoch, Text näher am Rand */
.balance-list .menu-row {
  min-height: 60px;
  padding: 6px 8px;
}

/* „Name ändern“ rechts in der Karte */
.profile__action {
  flex-shrink: 0;
}

/* „Mein Guthaben“ bei genau einer Gruppe: Name der Gruppe, Betrag groß, Prognose, Pfeil. Die ganze Karte
 * führt zur Guthaben-Seite der Gruppe. */
.balance-card {
  padding: 16px 12px 16px 20px;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.balance-card__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.balance-card__amount {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.profile__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.profile__name {
  max-width: 100%;
  font: var(--text-heading);
  letter-spacing: var(--letter-tight);
  overflow-wrap: break-word;
}

.profile__email {
  max-width: 100%;
  font: var(--text-small);
  overflow-wrap: anywhere;
}

/* Eine Einstellung in einer Karte: Beschriftung links, Umschalter rechts */

.setting {
  min-height: 64px;
  padding: 10px 14px 10px 20px;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.setting__label {
  font-size: 15px;
  font-weight: 600;
}

/* Marke: drei Haken (violett, orange, grün; Aufgabe 72) und „bin dabei“. --brand-ground ist die Fläche, auf der die
   Marke steht; in dieser Farbe ist die Lücke zwischen den Haken gezeichnet. */

.brand {
  --brand-ground: var(--color-ground);

  min-height: 32px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  width: 46px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand__check--first {
  stroke: var(--group-violet);
}

.brand__check--second {
  stroke: var(--group-orange);
}

.brand__check--third {
  stroke: var(--color-accent);
}

/* Ohne --brand-ground (Zeichen im Kopf der Hauptseiten) steht das Zeichen auf dem Grund. */
.brand__gap {
  stroke: var(--brand-ground, var(--color-ground));
  stroke-width: 20;
}

.brand__name {
  font: var(--text-heading);
  letter-spacing: var(--letter-tight);
}

/* Seiten ohne Leiste (Anmelden, Login-Link gesendet): Marke oben, große Abstände */

.entry {
  padding-top: 2px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Einladung: dichter, damit alle drei Karten auf den ersten Blick zu sehen sind */
.entry--invitation {
  gap: 10px;
}

.entry--invitation .brand {
  padding-bottom: 8px;
}

.intro {
  padding: 0 4px;
}

.text-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-wrap: break-word;
}

.text-block--tight {
  gap: 4px;
}

/* Überschrift der Seiten ohne Leiste (Anmelden, Wie heißt du?), 36 px wie Screen 25 */
.text-hero {
  font: var(--text-title);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* Karte mit Symbol oben, z. B. „Schau in dein Postfach“ */
.card--message {
  padding-top: 28px;
  gap: 14px;
}

.icon-badge {
  width: var(--size-toggle-large);
  height: var(--size-toggle-large);
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hinweis nach einer Aktion, z. B. ein abgelaufener Link */
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-row);
  background: var(--color-card);
  color: var(--color-ink);
}

.flash--alert {
  color: var(--color-negative);
}

.field__error {
  font: var(--text-small);
  color: var(--color-negative);
}

.field__input[aria-invalid="true"] {
  outline: 2px solid var(--color-negative);
  outline-offset: 0;
}

/* Guthaben: Restguthaben, Kacheln, Verlauf, Teilnahmequote */

.card--balance {
  gap: 8px;
}

.text-display {
  font: var(--text-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

/* Verbrauchsbalken: verbraucht von Beitrag */
.meter {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 6px;
  border: 0;
  border-radius: 4px;
  background: var(--color-track);
  overflow: hidden;
  appearance: none;
}

.meter::-webkit-progress-bar {
  border-radius: 4px;
  background: var(--color-track);
}

.meter::-webkit-progress-value {
  border-radius: 4px;
  background: var(--color-ink);
}

.meter::-moz-progress-bar {
  border-radius: 4px;
  background: var(--color-ink);
}

.card--chart {
  padding: 16px;
  gap: 10px;
}

.card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Titel und Nebentext auf einer Grundlinie, z. B. „Mein Guthaben“ und „Verlauf 2026“ */
.card-title-row--baseline {
  align-items: baseline;
}

/* Verlaufsdiagramm: tatsächlich durchgezogen, Prognose gestrichelt (2/7), gleichmäßig grau. Die Linien tragen die
   Linienfarbe der Gruppe (--group-line, Aufgabe 72), 3 px; ohne Klasse die von Grau. Senkrecht die Hilfslinie „heute“. */
.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart__grid {
  fill: none;
  stroke: var(--color-grid);
  stroke-width: 1;
}

.chart__axis {
  fill: var(--color-ink-2);
  font-size: 11px;
}

.chart__uniform {
  fill: none;
  stroke: var(--color-ink-3);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.chart__today {
  fill: none;
  stroke: var(--color-tint);
  stroke-width: 2;
}

.chart__actual,
.chart__forecast {
  fill: none;
  stroke: var(--group-line, var(--group-neutral-line));
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart__forecast {
  stroke-dasharray: 2 7;
}

.chart__dot {
  fill: var(--group-line, var(--group-neutral-line));
}

.chart__value {
  fill: var(--color-ink);
  font-size: 12px;
  font-weight: 700;
}

/* Der heutige Wert im Konto kann auf einer Linie liegen: ein Rand in Kartenfarbe hält ihn lesbar */
.chart__value--halo {
  paint-order: stroke;
  stroke: var(--color-card);
  stroke-width: 3px;
  stroke-linejoin: round;
}

/* Name einer Gruppe am Ende ihrer Linie (Konto) */
/* Text in Textfarbe statt Linienfarbe: Die Linien erreichen 3:1, für 11 px Text reicht das nicht (Aufgabe 72). */
.chart__name {
  fill: var(--color-ink);
  font-size: 11px;
  font-weight: 600;
}

/* Im Konto bei hervorgehobener Gruppe: die anderen Linien grau */
.chart__line--muted .chart__actual,
.chart__line--muted .chart__forecast {
  stroke: var(--color-ink-3);
}

.chart__line--muted .chart__dot {
  fill: var(--color-ink-3);
}

.chart__line--muted .chart__name {
  fill: var(--color-ink-2);
}

.chart-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font: var(--text-tiny);
  color: var(--color-ink-2);
}

.chart-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Journal in der Tabellenansicht, ohne Trennlinien */
.journal {
  width: 100%;
  border-collapse: collapse;
  font: var(--text-small);
}

.journal th {
  padding: 0 0 6px;
  color: var(--color-ink-2);
  font-weight: 500;
  text-align: left;
}

.journal td {
  padding: 6px 0;
  vertical-align: top;
}

.journal th:not(:last-child),
.journal td:not(:last-child) {
  padding-right: 12px;
}

.journal__date {
  color: var(--color-ink-2);
  white-space: nowrap;
}

.journal__kind {
  display: block;
  font-weight: 600;
}

.journal__detail {
  display: block;
  color: var(--color-ink-2);
}

.journal .journal__amount {
  text-align: right;
  white-space: nowrap;
}

.card--rate {
  padding: 14px 16px;
  border-radius: var(--radius-card-list);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rate__title {
  font: var(--text-body);
  font-weight: 600;
}

.rate__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: var(--letter-tight);
  white-space: nowrap;
}

/* Leiste unten (Aufgabe 79, „K2“, ersetzt N1 aus Aufgabe 71): am Handy fest am unteren Rand über die ganze Breite,
 * 64 px plus der Rand darunter (mindestens 20 px, sonst die safe-area), Fläche --color-card mit einer Linie oben in
 * --color-dock-line, ohne Schatten und Radius. Drei gleich breite Spalten, jede ganz antippbar: oben eine Pille
 * 60 × 32 px mit dem Symbol (21 px), 4 px darunter immer die Beschriftung (12 px), damit beim Wechsel der Seite nichts
 * springt. Aktiv die Pille in --color-ink mit Symbol in --color-on-ink, Beschriftung --color-ink 700; sonst
 * durchsichtig, Symbol und Beschriftung in --color-ink-2 600. Im Markup steht die Leiste vor dem Inhalt (für die
 * Leiste links am Desktop). Der Abstand des Inhalts unten und der Hauptknopf darüber stehen in application.css. */
.tab-bar {
  display: flex;
}

.tab-bar__item {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.tab-bar__item svg {
  flex-shrink: 0;
  stroke-width: 2;
}

@media (max-width: 899.98px) {
  .tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* Über dem Inhalt und dem Auslauf (z-index 1) */
    z-index: 2;
    height: var(--size-dock-total);
    padding: 10px 8px var(--space-dock-bottom);
    border-top: 1px solid var(--color-dock-line);
    background: var(--color-card);
  }

  .tab-bar__item {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    color: var(--color-ink-2);
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    white-space: nowrap;
  }

  .tab-bar__pill {
    width: 60px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tab-bar__pill svg {
    width: 21px;
    height: 21px;
  }

  .tab-bar__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tab-bar__item[aria-current="page"] {
    color: var(--color-ink);
    font-weight: 700;
  }

  .tab-bar__item[aria-current="page"] .tab-bar__pill {
    background: var(--color-ink);
    color: var(--color-on-ink);
  }
}

/* Ab 900 px: Navigationspunkte untereinander in der Leiste links auf Kartenfarbe, alle mit Beschriftung,
 * der aktuelle als Pille in Textfarbe mit Schrift in der Gegenfarbe (dunkel hell mit Schwarz). */
@media (min-width: 900px) {
  .app__sidebar .tab-bar {
    flex-direction: column;
    gap: 4px;
  }

  /* Die Pille gibt es nur am Handy; hier steht das Symbol direkt in der Zeile. */
  .app__sidebar .tab-bar__pill {
    display: contents;
  }

  .app__sidebar .tab-bar__item {
    height: auto;
    min-height: var(--size-tap);
    padding: 0 12px;
    border-radius: var(--radius-pill);
    justify-content: flex-start;
    gap: 12px;
    color: var(--color-ink-2);
    font: var(--text-body);
    font-weight: 500;
  }

  .app__sidebar .tab-bar__item svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
  }

  .app__sidebar .tab-bar__item:hover {
    color: var(--color-ink);
  }

  .app__sidebar .tab-bar__item[aria-current="page"] {
    background: var(--color-ink);
    color: var(--color-on-ink);
    font-weight: 700;
  }

  .app__sidebar .tab-bar__item[aria-current="page"] svg {
    stroke-width: 2.2;
  }
}

/* Kasse in der Verwaltung: Restguthaben der Gruppe etwas kleiner als das eigene im Guthaben */
.card--cash {
  padding: 18px var(--space-card);
  gap: 6px;
}

/* Restguthaben 48 px wie Screen 13, darunter Balken und die Zeilen „Eingezahlt“ und „Verbraucht“ */
.card--cash .text-display {
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.card--cash .meter {
  margin-block: 6px 4px;
}

.cash-figures {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
}

.cash-figures > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cash-figures dt {
  color: var(--color-ink-2);
}

.cash-figures dd {
  margin: 0;
}

/* Überschrift „Mitglieder“ der Kasse mit „Rest“ rechts (Screen 13) */
.cash-members-head {
  padding: 10px 8px 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

/* Kasse in der Verwaltung: ein Mitglied pro Zeile mit Initialen, Name, Prognose, Saldo und Pfeil */

.balance-row {
  min-height: 56px;
  padding: 0 8px;
  border-radius: var(--radius-row);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-ink);
  text-decoration: none;
}

.balance-row .avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.balance-row__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.balance-row__name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balance-row__detail {
  font: var(--text-small);
  color: var(--color-ink-2);
  font-variant-numeric: tabular-nums;
}

.balance-row__amount {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
}

/* Der Betrag der Prognose fett, ein Plus grün, ein Minus rot (Screen 13) */
.balance-row__forecast {
  font-weight: 700;
}

/* Ab 900 px wird die Liste zur Tabelle: Mitglied, Teilnahmen, Eingezahlt, Verbraucht, Rest, Prognose.
 * Dieselben Zeilen, als Raster mit gemeinsamen Spalten. Sie passt schon bei 900 px ohne Scrollen
 * (kleinste Breite der Zeile 544 px), ein langer Name wird gekürzt. */
@media (min-width: 900px) {
  .card--cash-table {
    padding: 8px 12px;
  }

  .balance-columns,
  .card--cash-table .balance-row {
    padding: 0 8px;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr));
    align-items: center;
    column-gap: 8px;
  }

  .balance-columns {
    height: 36px;
    font: var(--text-tiny);
    color: var(--color-ink-2);
    text-align: right;
  }

  .balance-columns > :first-child {
    text-align: left;
  }

  .card--cash-table .balance-row {
    min-height: 48px;
    border-radius: var(--radius-tile);
    font-variant-numeric: tabular-nums;
  }

  .card--cash-table .balance-row:hover {
    background: var(--color-tint);
  }

  /* Initialen und Name teilen sich die erste Spalte, die Prognose steht in der letzten. */
  .card--cash-table .balance-row .avatar {
    grid-area: 1 / 1;
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .card--cash-table .balance-row__text {
    display: contents;
  }

  .card--cash-table .balance-row__name {
    grid-area: 1 / 1;
    padding-left: 42px;
  }

  .card--cash-table .balance-row__attendance {
    grid-area: 1 / 2;
  }

  .card--cash-table .balance-row__paid-in {
    grid-area: 1 / 3;
  }

  .card--cash-table .balance-row__consumed {
    grid-area: 1 / 4;
  }

  .card--cash-table .balance-row__amount {
    grid-area: 1 / 5;
    text-align: right;
  }

  /* Ohne Kontingent fehlt die Spalte „Prognose“. */
  .card--cash-table.card--no-forecast .balance-row,
  .card--no-forecast .balance-columns {
    grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  }

  .card--cash-table .balance-row__detail {
    grid-area: 1 / 6;
    font: var(--text-body);
    text-align: right;
  }

  .card--cash-table .balance-row__detail:not(.text-negative),
  .balance-row__cell {
    color: var(--color-ink-2);
  }

  .balance-row__cell {
    text-align: right;
    white-space: nowrap;
  }

  .card--cash-table .balance-row__detail.text-strong {
    font-weight: 700;
  }

  .card--cash-table .balance-row__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .card--cash-table .menu-row__chevron {
    display: none;
  }
}

/* Knapp über 900 px: engere Spalten, damit der Name mehr Platz behält */
@media (min-width: 900px) and (max-width: 959.98px) {
  .balance-columns,
  .card--cash-table .balance-row {
    column-gap: 4px;
  }
}

/* Übersicht der Verwaltung: Kopf der Gruppenkarte, Kennzahlen, Einladungslink */

/* Drei getönte Kennzahl-Kacheln nebeneinander: Zahl groß, Beschriftung klein darunter. Gleich breit,
 * solange jede Beschriftung ihr längstes Wort ganz zeigen kann; sonst bekommt ihre Kachel mehr Platz
 * (min-content), z. B. „Cancellation“ bei 320 px. Wörter werden nie getrennt. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(min-content, 1fr));
  gap: 8px;
}

/* dt (Beschriftung) steht im Markup vor dd (Zahl), angezeigt wird die Zahl oben */
.stat {
  padding: 12px;
  border-radius: 16px;
  background: var(--color-ground);
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  min-width: 0;
}

.stat__value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--letter-tight);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.stat__label {
  font: var(--text-tiny);
  color: var(--color-ink-2);
  overflow-wrap: normal;
  hyphens: manual;
}

/* Unter 360 px: Kacheln enger */
@media (max-width: 359px) {
  .stat {
    padding: 10px 8px;
  }

  .stat__value {
    font-size: 18px;
  }
}

.invite-url {
  overflow-wrap: anywhere;
}

/* Kleine Hilfen für die Anordnung in Karten */

.cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cluster--wide {
  gap: 16px;
}

/* Zieht einen Block über den Seitenrand, z. B. einen Seitenkopf mitten im Inhalt */
.bleed {
  margin: 0 calc(-1 * var(--space-page));
}

/* Untereinander mit dem Abstand einer Karte, z. B. Feld und Knopf in einem Formular */
.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.grow {
  flex-grow: 1;
  min-width: 0;
}

/* Bleibt in einer Zeile, z. B. „Zusagen 7“ auf der Gruppenkarte */
.nowrap {
  white-space: nowrap;
}

.center {
  display: flex;
  justify-content: center;
}

.plain-link {
  color: var(--color-ink);
  text-decoration: none;
}

.block-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--color-ink);
  text-decoration: none;
}

.lines {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lines--loose {
  gap: 2px;
}

/* Überschrift links, Nebentext rechts auf einer Grundlinie, z. B. „7 dabei“ und „von 10 Mitgliedern“ */
.split {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
}

.numeric {
  font-variant-numeric: tabular-nums;
}

.text-title {
  font: var(--text-title);
  letter-spacing: var(--letter-tight);
}

/* Überschrift in einer Karte, 19 px Space Grotesk */
.text-section {
  font: var(--text-section);
  letter-spacing: var(--letter-tight);
}

.text-small {
  font: var(--text-small);
}

/* Überschrift in Textgröße, z. B. „Einladungslink“ */
.text-body {
  font: var(--text-body);
}

.text-strong {
  font-weight: 600;
}

/* Eine Zeile, zu lang endet sie mit „…“, z. B. der Name der Gruppe in einer Terminkarte */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted {
  color: var(--color-ink-2);
}

/* Grün nur für eine positive Prognose */
.text-positive {
  color: var(--color-positive);
}

/* Rot nur für Minus, Absage und Löschen */
.text-negative {
  color: var(--color-negative);
}

/* Abgesagter Termin: durchgestrichen und grau */
.struck {
  color: var(--color-ink-2);
  text-decoration: line-through;
}

/* Hervorhebung in Nebentext, z. B. die Adresse in „Schau in dein Postfach“ */
.text-ink {
  color: var(--color-ink);
}

/* Verwaltung → Mitglieder: Hinweiskarte zum Einladungslink, Liste mit Rollen-Pille und drei Punkten */

.card--hint {
  padding: 16px var(--space-card);
  gap: 12px;
}

/* „Gilt“: Auswahl und „Sichern“ in einer Zeile, der Knopf so hoch wie das Feld */
.invite-duration__row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invite-duration__row .field__select {
  flex: 1;
  min-width: 0;
}

.invite-duration__row .button {
  flex-shrink: 0;
  min-height: var(--size-field);
}

/* Abgelaufen: der Satz statt des Hinweises, kräftig statt in Nebentext, ohne Warnfarbe */
.invite-expired {
  color: var(--color-ink);
  font-weight: 600;
}

.cluster--tight {
  flex-wrap: wrap;
  gap: 6px;
}

.member-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-row {
  min-height: 50px;
  padding: 0 4px 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-row .avatar,
.choice-row .avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

/* Der Name darf gekürzt werden, „(du)“ und die Marke „Gast“ bleiben sichtbar */
.member-row__name {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* Bei einem Gast rutscht die Marke unter den Namen, wenn beide nicht in eine Zeile passen */
.member-row__name--wrap {
  flex-wrap: wrap;
  row-gap: 2px;
  padding-block: 4px;
}

.member-row__truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-row__name .pill,
.member-row__suffix {
  flex-shrink: 0;
}

/* Nebentext unter Name und Marke, z. B. „Gleicher Name“, in der Mitgliederliste und bei der Auswahl zum Zusammenführen */
.name-note {
  font: var(--text-small);
  color: var(--color-ink-2);
}

.member-row__name .name-note {
  flex-basis: 100%;
}

/* Name und „(du)“ mit normalem Wortabstand, die Marke „Gast“ mit etwas mehr */
.member-row__suffix {
  margin-left: -4px;
  white-space: nowrap;
}

/* Drei Punkte: 40 × 44 px, führt zur Seite des Mitglieds */
.more-button {
  width: 40px;
  height: var(--size-tap);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-2);
}

/* Aufklappbare Auswahl (<details>): Auslöser als summary, darunter rechtsbündig eine schwebende Karte */
.menu {
  position: relative;
  flex-shrink: 0;
}

.menu > summary {
  list-style: none;
}

.menu > summary::-webkit-details-marker {
  display: none;
}

/* Rollen-Pille: Admin fast schwarz, Mitglied getönt, 34 px hoch, Tippfläche 44 px */
.role-pill {
  position: relative;
  height: 34px;
  padding: 0 8px 0 12px;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.role-pill::after {
  content: "";
  position: absolute;
  inset: -5px 0;
}

.role-pill--admin {
  background: var(--color-ink);
  color: var(--color-on-ink);
  font-weight: 600;
}

/* Rechts bündig mit der Zeile (Abstand, drei Punkte, Rand: 12 + 40 + 4 px), auch bei 320 px innerhalb der Seite.
 * Ohne Rahmen und Schatten (design.md): Die getönte Fläche setzt sie von der Karte ab. */
.menu__popover {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  right: -56px;
  width: min(280px, calc(100vw - 48px));
  padding: 6px;
  border-radius: var(--radius-card-list);
  background: var(--color-tint);
  display: flex;
  flex-direction: column;
}

/* Die untersten drei Zeilen einer längeren Liste öffnen nach oben, sonst verschwände die Auswahl hinter der Leiste */
.member-row:nth-last-child(-n+3):not(:nth-child(-n+3)) .menu__popover {
  top: auto;
  bottom: calc(100% + 6px);
}

.menu__popover > form {
  display: flex;
}

.menu__title {
  padding: 8px 12px 4px;
  font: var(--text-small);
  color: var(--color-ink-2);
}

.menu-option {
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-row);
  background: none;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: 12px;
  font: var(--text-body);
  text-align: left;
}

button.menu-option {
  cursor: pointer;
}

.menu-option--current {
  background: var(--color-card);
}

.menu-option__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu-option__title {
  font-weight: 600;
}

.menu-option__subtitle {
  font: var(--text-small);
  color: var(--color-ink-2);
}

.menu-option__check {
  flex-shrink: 0;
}

/* Auswahl eines Mitglieds als Liste von Radio-Knöpfen, z. B. beim Zusammenführen */
.choice-list {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.choice-list legend {
  margin-bottom: 6px;
  padding: 0;
}

.choice-row {
  min-height: 52px;
  padding: 0 8px;
  border-radius: var(--radius-row);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.choice-row__input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-ink);
}

.choice-row__name {
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Name mit Marke „Gast“, darunter ein Nebentext wie „Gleicher Name“ (.name-note) */
.choice-row__text {
  min-width: 0;
  padding-block: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.choice-row__title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice-row__title .pill {
  flex-shrink: 0;
}

/* Eine Aktion, die gerade nicht geht; der Nebentext sagt warum */
.action-row[aria-disabled="true"],
.menu-option[aria-disabled="true"] {
  cursor: default;
}

/* Kalender (/account/calendar): Inhalt wählen, Gruppen an und aus, der Link */

.card--calendar {
  padding: 16px;
  gap: 10px;
}

.card--calendar-groups {
  padding: 14px 8px 6px;
  gap: 2px;
}

/* „Aus diesen Gruppen“ als Überschrift in der Karte, 19 px wie in Screen 22 */
.card--calendar-groups__title {
  padding: 8px 8px 2px;
  font: var(--text-section);
  letter-spacing: var(--letter-tight);
}

/* Eine Gruppe mit Kippschalter, 48 px hoch. Das Formular ist die Zeile. */
.calendar-group-row {
  min-height: 48px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.calendar-group-row__name {
  flex-grow: 1;
  min-width: 0;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Kippschalter als Knopf (role="switch", aria-checked) statt als Checkbox: speichert mit einem Tipp, auch
 * ohne JavaScript. Tippfläche 52 × 44 px, darin die Pille aus .switch. */
.switch-button {
  width: 52px;
  height: var(--size-tap);
  flex-shrink: 0;
  padding: 6px 0;
  border: 0;
  background: none;
  display: block;
  cursor: pointer;
}

.switch-button .switch {
  display: block;
  margin: 0;
}

.switch-button[aria-checked="true"] .switch {
  background: var(--color-ink);
}

.switch-button[aria-checked="true"] .switch::before {
  background: var(--color-on-ink);
  transform: translateX(20px);
}

/* Der Kalender-Link: getönt wie ein Eingabefeld, einzeilig und gekürzt, markierbar */
.calendar-link {
  height: var(--size-field);
  padding: 0 14px;
  border-radius: var(--radius-tile);
  background: var(--color-tint);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
}

.calendar-link__url {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 359px) {
  .card--calendar .button-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Benachrichtigungen: Glocke im Kopf, Liste (/notifications), Einstellungen (/account/notifications) */

/* Glocke: runder Knopf (40 px, Kartenfarbe) wie .icon-button. Gibt es Ungelesenes, sitzt oben rechts am
 * Symbol ein Punkt von 9 px in --group-orange mit 2 px Rand in Kartenfarbe, nie rot oder grün. */
.bell__dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--color-card);
  border-radius: var(--radius-pill);
  background: var(--group-orange);
}

/* Überschrift über einer Liste, rechts klein ein Nebentext („3 ungelesen“, „je Gruppe“) */
.heading-row {
  padding: 0 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.notification-section,
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-section + .notification-section,
.settings-section + .settings-section {
  margin-top: 14px;
}

/* Konto (Aufgabe 86): die Blöcke Geld, Einstellungen, Über die App und die Karte „Abmelden“ stehen wie Abschnitte
 * 24 px ab (10 px Abstand der Spalte plus 14 px), auch nach der Profilkarte oder „Konto anlegen“. */
.account-section {
  margin-top: 14px;
}

.notification-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Eine Benachrichtigung (Screen 06, Aufgabe 78): Listenkarte mit Radius 20 px, 14 × 16 px innen, oben bündig das
 * Symbol im getönten Kreis von 40 px, Text 15 px mit Zeilenhöhe 1,35 und darunter Gruppe und Zeit. Unter „Neu“ fett
 * mit Punkt oben rechts, sonst Gewicht 500. */
.notification {
  padding: 14px 16px;
  border-radius: var(--radius-card-list);
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-ink);
  text-decoration: none;
}

.notification__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nur der abgesagte Termin */
.notification__icon--alert {
  color: var(--color-negative);
}

.notification__body {
  flex-grow: 1;
  min-width: 0;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.notification__text {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.notification--fresh .notification__text {
  font-weight: 700;
}

.notification__meta {
  font: var(--text-small);
  color: var(--color-ink-2);
}

.notification__dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--color-ink);
}

/* „Bist du dabei?“ (Aufgabe 56, Screen 06): die Schalter ✓ und ✗ (44 px) stehen unter dem Text, 10 px darunter und
 * bündig mit ihm, außerhalb des Links. Der Link über Symbol und Text ist die obere Reihe der Karte. */
.notification--actions {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.notification__link {
  min-width: 0;
  min-height: 44px; /* Tippziel, auch ab 900 px */
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-ink);
  text-decoration: none;
}

.notification--actions > .answer-pair {
  margin-left: 52px; /* Symbol 40 px und 12 px Abstand */
  align-self: flex-start;
}

/* Eine Einstellung: Titel, Nebentext, Kippschalter (.switch-button), mindestens 60 px. Das Formular ist die
 * Zeile. Je Gruppe nur der Name, 52 px. */
.setting-row {
  min-height: 60px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.setting-row__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.setting-row__title,
.setting-row__name {
  font-weight: 600;
}

.setting-row__hint {
  font: var(--text-small);
  color: var(--color-ink-2);
}

/* Eine zweite Zeile unter dem Hinweis, etwa „Kommt nichts an?“ unter „Auf diesem Gerät“ (bd-6r3) */
.setting-row__hint-line {
  display: block;
  margin-top: 4px;
  color: var(--color-ink-2);
}

.setting-row--group {
  min-height: 52px;
  padding: 4px 8px;
}

.setting-row__name {
  flex-grow: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ab 900 px der vierte Punkt der Leiste mit der Zahl der ungelesenen: Marke 22 px hoch, fast schwarz mit
 * weißer Schrift. */
@media (min-width: 900px) {
  .app__sidebar .tab-bar__label {
    flex-grow: 1;
  }

  .tab-bar__badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: var(--color-ink);
    color: var(--color-on-ink);
    font: var(--text-tiny);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tab-bar__item[aria-current="page"] .tab-bar__badge {
    background: var(--color-on-ink);
    color: var(--color-ink);
  }
}

/* Umschalter auf „Termine“: Kommend · Unbezahlt · Vorbei über die ganze Breite auf Kartenfarbe, 44 px hoch,
 * Felder 40 px mit 2 px Abstand. Das gewählte in Textfarbe gefüllt. Gleich breite Felder; damit „Unbezahlt“
 * mit Marke auch bei 320 px ganz zu sehen ist, wird die Schrift auf schmalen Bildschirmen kleiner (14 px ab
 * 390 px), und das mittlere Feld ist nie schmaler als sein Inhalt. */
.segmented--tabs {
  height: var(--size-tap);
  margin-top: -4px; /* 4 px unter dem Kopf statt des Innenabstands der Seite */
  padding: 2px;
  border-radius: 22px;
  background: var(--color-card);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(max-content, 1fr) minmax(0, 1fr);
  gap: 2px;
}

/* Zwei Tabs, „Aktiv · Archiviert“ unter „Gruppen“ (Aufgabe 46): gleich breite Felder */
.segmented--tabs-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented--tabs .segmented__option {
  height: 40px;
  padding: 0 4px;
  border-radius: 20px;
  color: var(--color-ink);
  font: var(--text-body);
  font-size: clamp(12px, 3.6vw, 14px);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.segmented--tabs .segmented__option::after {
  inset: -2px 0;
}

.segmented--tabs .segmented__option[aria-current="page"] {
  background: var(--color-ink);
  color: var(--color-on-ink);
}

/* Text eines Felds, gekürzt mit „…“, wenn er nicht passt */
.segmented__label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Marke an „Unbezahlt“: 20 px hoch, auf einem nicht gewählten Feld schwarz mit weißer Zahl, auf dem gewählten
 * weiß mit schwarzer Zahl (dunkel jeweils umgekehrt) */
.tab-count {
  min-width: 20px;
  height: 20px;
  flex-shrink: 0;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--color-ink);
  color: var(--color-on-ink);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 20px;
  text-align: center;
}

.tab-count[hidden] {
  display: none;
}

.segmented__option[aria-current="page"] .tab-count {
  background: var(--color-on-ink);
  color: var(--color-ink);
}

/* Terminliste in einer Karte (Kommend, Unbezahlt, Vorbei): je Woche oder Monat eine Überschrift und eine Karte
 * mit Zeilen ohne Trennlinien. Unter „Unbezahlt“ eine Karte, die Überschrift nennt Anzahl und Summe. */
.event-list {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-list__header {
  padding: 0 4px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

/* Abschnittsüberschrift: 20 px Space Grotesk in Textfarbe */
.event-list__title {
  min-width: 0;
  font: var(--text-heading);
  letter-spacing: var(--letter-tight);
  color: var(--color-ink);
}

.event-list__value {
  flex-shrink: 0;
  font: var(--text-small);
  color: var(--color-ink-2);
}

/* Summe unter „Unbezahlt“: so groß wie die Überschrift, in Textfarbe */
.event-list__value--strong {
  font: var(--text-heading);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--letter-tight);
  color: var(--color-ink);
}

/* Liste ohne Aufzählung; steht vor .event-card, damit deren Innenabstand gilt, wenn beides an einer <ul> hängt */
.event-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.event-card {
  margin: 0;
  padding: 6px 14px;
  border-radius: var(--radius-card);
  background: var(--color-card);
}

/* Zeile (Aufgabe 73): mindestens 64 px plus 6 px oben und unten, links Kachel und zwei Zeilen als Link zum
 * Termin-Detail, rechts Schalter, €-Knopf oder Pfeil, 12 px zwischen den Teilen. Mit der Zeile „Zusagen“ (Aufgabe 61)
 * als dritter Zeile mindestens 66 px plus 7 px. */
.event-row {
  min-height: 76px; /* 64 px plus Innenabstand, box-sizing: border-box */
  padding: 6px 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.event-row__link {
  flex-grow: 1;
  min-width: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-ink);
  text-decoration: none;
}

.event-row__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-row__name,
.event-row__details {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-row__name {
  font-size: 15px;
  font-weight: 600;
}

.event-row__details {
  font: var(--text-small);
  color: var(--color-ink-2);
}

.event-row__details .text-strong {
  font-weight: 700;
}

.event-row--tall {
  min-height: 80px; /* 66 px plus Innenabstand */
  padding: 7px 0;
}

/* Verwaltung → Planen (Screen 16): rechts der Stift in einem getönten Kreis von 44 px; die Zeile ist ein Link */
.edit-circle {
  width: var(--size-rsvp);
  height: var(--size-rsvp);
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-event .event-row__link:hover .edit-circle {
  background: var(--color-switch-off);
}

/* Unter 360 px enger (Aufgabe 42): 8 px statt 12 px seitlich in der Karte und zwischen den Teilen der Zeile, damit
 * der Betrag in der Unterzeile ganz zu sehen bleibt, auch neben der Bezahlen-Pille und bei „Morgen, 19:00 · je
 * 7,34 €“. */
@media (max-width: 359px) {
  .event-card {
    padding-inline: 8px;
  }

  .event-row,
  .event-row__link {
    gap: 8px;
  }

  /* Neben den beiden Schaltern ✓ und ✗ (Aufgabe 55) ist für „Mi, 19:00 · je 1,10 €“ zu wenig Platz: Die Unterzeile
     bricht dann um, der Betrag bleibt beisammen und ganz zu sehen. */
  .event-row:has(.answer-pair) .event-row__details {
    white-space: normal;
  }

  .event-row:has(.answer-pair) .event-row__details .text-strong {
    white-space: nowrap;
  }
}

/* Karte „Als Nächstes“ über „Diese Woche“ (Aufgabe 73): der nächste nicht abgesagte Termin, der noch nicht begonnen
 * hat, in der Fläche seiner Gruppe, Radius 26 px, 18 px innen. Oben links „ALS NÄCHSTES · HEUTE“, rechts der
 * Betrag; darunter der Name der Gruppe (28 px) und „20:00 · min. 4, Zusagen 2“, rechts ✓ und ✗ (46 px). Der Link
 * liegt am Namen und deckt mit ::after die ganze Karte ab; die Knöpfe liegen darüber (kein Link um Formulare).
 * Text auf der Fläche immer --color-on-group, hell und dunkel gleich. */
.next-card {
  position: relative;
  margin-top: 4px;
  padding: 18px 18px 16px;
  border-radius: 26px;
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label amount"
    "name answer"
    "line answer";
  column-gap: 10px;
  align-items: center;
}

.next-card__label {
  grid-area: label;
  margin: 0;
  min-width: 0;
  font: var(--text-tiny);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-on-group-2);
}

.next-card__amount {
  grid-area: amount;
  justify-self: end;
  font: var(--text-small);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Fett in Textfarbe gilt auf der Fläche nicht: dort ist alles --color-on-group. */
.next-card .text-ink {
  color: inherit;
}

.next-card__link {
  grid-area: name;
  min-width: 0;
  margin-top: 12px;
  color: inherit;
  text-decoration: none;
  font: 700 28px/1.05 var(--font-display);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.next-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.next-card__link:focus-visible {
  outline: none;
}

/* Der Ring liegt innen auf der Gruppenfläche: außen stünde er dunkel fast schwarz auf fast schwarzem Grund. */
.next-card__link:focus-visible::after {
  outline: 2px solid var(--color-on-group);
  outline-offset: -4px;
}

.next-card__line {
  grid-area: line;
  margin: 3px 0 0;
  min-width: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-on-group-2);
}

.next-card .answer-pair {
  grid-area: answer;
  align-self: center;
  position: relative;
  z-index: 1;
  margin-top: 12px;
}

.next-card .toggle {
  width: var(--size-rsvp-next);
  height: var(--size-rsvp-next);
}

.next-card .toggle:focus-visible {
  outline-color: var(--color-on-group);
}

/* Pfeil unter „Vorbei“: nur Hinweis, die ganze Zeile ist der Link */
.event-row__arrow {
  width: var(--size-tap);
  height: var(--size-tap);
  flex-shrink: 0;
  color: var(--color-ink-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Leerer Zustand „Alles bezahlt“: zentriert, Haken in einem getönten Kreis */
.card--empty-state {
  padding: 32px 24px;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.empty-state__icon {
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hält Kopfzeile, Umschalter und Zeilen für pay_controller.js zusammen, ohne die Abstände der Seite zu ändern */
.pay-list {
  display: contents;
}

/* Platz für den Hinweis aus pay_controller.js über dem Umschalter; leer ohne eigenen Abstand */
.pay-notice {
  display: contents;
}

/* Zeile eines unbezahlten Termins (Terminliste in einer Karte), rechts das Feld von 52 px mit dem €-Knopf. Mit
 * JavaScript wechselt pay_controller.js data-pay-state: pending zeigt Haken und ablaufenden Ring, leaving blendet
 * die Zeile aus und klappt sie zusammen. */
.pay-row {
  height: 64px;
  overflow: hidden;
}

.pay-row__paid,
.pay-row[data-pay-state] .pay-row__open {
  display: none;
}

.pay-row[data-pay-state] .pay-row__paid {
  display: inline;
}

.pay-button {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-button__form {
  display: flex;
}

.pay-button__euro {
  width: var(--size-tap);
  height: var(--size-tap);
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Bezahlen-Pille (Aufgabe 40): statt des runden €-Knopfs, wenn die verantwortliche Person einen PayPal.me-Namen
 * hat. Platz von 88 px, darin die Pille 88 × 44 px auf getönter Fläche: links der Papierflieger (Link zu PayPal.me),
 * in der Mitte ein Trenner, rechts derselbe €-Knopf. Jede Hälfte 44 × 44 px mit eigenem Fokusring. Nach dem Tipp
 * auf € steht statt der ganzen Pille rechtsbündig das Feld von 52 px mit Haken und Ring. */
.pay-button--pill {
  width: 88px;
  justify-content: flex-end;
}

.pay-button--pill .pay-ring {
  left: auto;
  width: 52px;
}

.pay-button--pill .pay-button__undo {
  margin-right: 5px;
}

.pay-pill {
  position: relative;
  width: 88px;
  height: var(--size-tap);
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  display: flex;
}

.pay-pill__send,
.pay-pill .pay-button__euro {
  width: var(--size-tap);
  height: var(--size-tap);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inhalt je 2 px zur Mitte hin versetzt, wie im Screen */
.pay-pill__send {
  padding-left: 4px;
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
}

.pay-pill .pay-button__euro {
  padding-right: 4px;
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

/* Fokusring je Hälfte, nach innen, damit er nicht über den Trenner in die andere Hälfte reicht. --focus nur
 * unter /components. */
.pay-pill__send:focus-visible,
.pay-pill .pay-button__euro:focus-visible,
.pay-pill__half--focus {
  outline: 2px solid var(--color-ink);
  outline-offset: -2px;
}

.pay-pill__divider {
  position: absolute;
  top: 12px;
  left: calc(50% - 0.75px);
  width: 1.5px;
  height: 20px;
  background: var(--color-ink-3);
  pointer-events: none;
}

.pay-button__undo {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-on-ink);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Tippfläche 44 px wie der €-Knopf */
.pay-button__undo::after {
  content: "";
  position: absolute;
  inset: -1px;
}

.pay-ring {
  position: absolute;
  inset: 0;
  display: none;
}

.pay-ring circle {
  fill: none;
  stroke-width: 3;
}

.pay-ring__track {
  stroke: var(--color-tint);
}

/* Fortschritt in Textfarbe, oben beginnend, läuft in 4 s im Uhrzeigersinn ab (Umfang 2π · 24,5 ≈ 153,94) */
.pay-ring__progress {
  stroke: var(--color-ink);
  stroke-linecap: round;
  stroke-dasharray: 153.94;
  stroke-dashoffset: 0;
}

.pay-row[data-pay-state] .pay-button__form,
.pay-row[data-pay-state] .pay-pill {
  display: none;
}

.pay-row[data-pay-state] .pay-ring {
  display: block;
}

.pay-row[data-pay-state] .pay-button__undo {
  display: flex;
}

.pay-row[data-pay-state="pending"] .pay-ring__progress {
  animation: pay-drain 4s linear forwards;
}

.pay-row[data-pay-state="leaving"] .pay-ring__progress {
  stroke-dashoffset: 153.94;
}

/* Nach dem Senden blendet die Zeile in 0,5 s aus und klappt zusammen; die Zeilen darunter rücken nach */
.pay-row[data-pay-state="leaving"] {
  animation: pay-leave 0.5s ease-in-out forwards;
  pointer-events: none;
}

/* Nur unter /components: der Ring angehalten bei etwa 60 % übrig */
.pay-row--paused[data-pay-state] .pay-ring__progress {
  animation: none;
  stroke-dashoffset: 61.6;
}

@keyframes pay-drain {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: 153.94; }
}

@keyframes pay-leave {
  0% { opacity: 1; height: 64px; }
  55% { opacity: 0; height: 64px; }
  100% { opacity: 0; height: 0; }
}

/* Der Ring zeigt die verbleibende Zeit und läuft auch dann. Nur das Ausblenden entfällt: pay_controller.js
 * entfernt die Zeile sofort. */
@media (prefers-reduced-motion: reduce) {
  .pay-row[data-pay-state="leaving"] {
    animation: none;
    opacity: 0;
  }
}

/* Marke zum Stand einer Zahlung: „Bezahlt“ und „Kontingent“ getönt, „Unbezahlt“ gestrichelt ohne Fläche */
.status-badge {
  position: relative;
  height: 28px;
  flex-shrink: 0;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: 14px;
  background: var(--color-tint);
  color: var(--color-ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: var(--text-tiny);
  font-weight: 600;
  white-space: nowrap;
}

.status-badge--open {
  padding: 0 10px;
  border: 1.5px dashed var(--color-ink-3);
  background: none;
  color: var(--color-ink-2);
}

.status-badge--button {
  cursor: pointer;
}

/* Tippfläche 44 px */
.status-badge--button::after {
  content: "";
  position: absolute;
  inset: -8px -2px;
}

/* Termin-Detail: Satz zum Stand mit „Zurücknehmen“ rechts */
.cost-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cost-status__form {
  display: flex;
  flex-shrink: 0;
}

/* „Mit PayPal senden“ in „Kosten“ (Aufgabe 40): Nebenknopf über die ganze Breite der Karte */
.cost-paypal {
  width: 100%;
}

/* Termin-Detail: „Wer hat bezahlt“, je belasteter Mitgliedschaft eine Zeile */
.card--payers {
  padding: 18px var(--space-card);
  gap: 10px;
}

.payer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

.payer-row {
  min-height: var(--size-tap);
  display: flex;
  align-items: center;
  gap: 10px;
}

.payer-row__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payer-row__you {
  font-weight: 400;
  color: var(--color-ink-2);
}

.payer-row__form {
  display: flex;
  flex-shrink: 0;
}

/* Verantwortlich im Termin-Detail (Aufgabe 39): Initialen-Kreis, „Organisiert von Anna M.“ und rechts der
   Nebenknopf „Ich organisiere das“ oder „Austragen“. Wird es zu eng (320 px, Englisch), rückt der Knopf in eine
   eigene Zeile, rechtsbündig. */
.organizer-card {
  padding: 14px var(--space-card);
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.organizer-card__text {
  margin: 0;
  flex: 1 1 8em;
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.organizer-card__form {
  display: flex;
  margin-left: auto;
}

/* „Offen: Tim, Carsten · je 5,50 €“ unter einer Zeile in „Von dir organisiert“, bricht um statt zu kürzen. */
.organized-open {
  display: block;
  font: var(--text-small);
  color: var(--color-ink-2);
  overflow-wrap: anywhere;
}

/* Nur unter /components: die sieben Gruppenfarben je eine Zeile (Aufgabe 72) */
.color-samples {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ✓ und ✗ auf jeder Gruppenfarbe unter /components (Aufgabe 73) */
.toggle-sample {
  padding: 10px 12px;
  border-radius: var(--radius-row);
  background: var(--group-fill);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.color-sample {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.color-sample__name {
  min-width: 64px;
  font-weight: 600;
}

.color-sample__line {
  flex-shrink: 0;
}

/* Gruppenkopf G2 (Aufgabe 74, Leitfaden „Gruppenkopf (G2)“, Screens 08, 09, 10, 33, 34): Fläche in der Gruppenfarbe über
 * die ganze Breite, unten 28 px Radius, 18 px oben, 16 px seitlich und unten, 14 px zwischen den Reihen. Reihe 1 44 px,
 * Reihe 2 genau 92 px, Reihe 3 der Umschalter mit 46 px: Der Kopf ist in allen Fällen gleich hoch (226 px plus Ränder),
 * die Tabs springen nicht. Alles darauf ist hell und dunkel gleich, Text in --color-on-group. */
.group-head,
.group-band {
  flex-shrink: 0;
  padding: 18px var(--space-page) 16px;
  border-radius: 0 0 var(--radius-group-head) var(--radius-group-head);
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.group-head :focus-visible,
.group-band :focus-visible {
  outline-color: var(--color-on-group);
}

.group-head__top,
.group-band__top {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-head__top {
  height: 44px;
}

/* Runder weißer Knopf im Farbbereich (Zurück, Schließen), 40 px sichtbar; ::after macht die Tippfläche 44 px */
.icon-button--on-group {
  background: var(--color-group-button);
  color: var(--color-on-group);
}

.group-head__name {
  flex-grow: 1;
  min-width: 0;
  font: var(--text-title);
  letter-spacing: var(--letter-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Langer Name (ab 11 Zeichen, Aufgabe 85, GroupHeadHelper#group_head_long_name?), nur am Handy unter 900 px: 18 px auf
 * bis zu zwei Zeilen, damit er neben Zurück, Marke „Admin“ und dem Knopf „Du in dieser Gruppe“ auch bei 320 px lesbar
 * bleibt. Zwei Zeilen sind 43 px, die Reihe bleibt 44 px hoch; erst danach „…“. Ein Wort, das allein nicht passt,
 * bricht. Ab 900 px bleibt der Name in 24 px auf einer Zeile wie vorher. */
@media (max-width: 899.98px) {
  .group-head__name--long {
    font-size: 18px;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* Marke „Admin“ im Kopf: schwarz mit weißer Schrift, hell und dunkel gleich */
.badge--on-group {
  height: 27px;
  border-radius: 14px;
  background: var(--color-group-selected);
  color: var(--color-on-group-selected);
}

.group-head__fields {
  height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px;
}

/* Feld: Weiß 55 % über der Gruppenfarbe, Radius 20 px, 12 × 14 px Innenabstand, Breiten 1,35 : 1. Jede Zeile bleibt
 * einzeilig und wird gekürzt; nur der Zusatz „Absagen 4 · Unklar 5“ darf zwischen seinen Teilen umbrechen. */
.group-head__field {
  position: relative;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 20px;
  background: var(--color-group-field);
  color: var(--color-on-group);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.group-head__label,
.group-head__line,
.group-head__count {
  font-size: 12px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-head__label {
  font-weight: 600;
  color: var(--color-on-group-2);
}

.group-head__line {
  color: var(--color-on-group-2);
}

.group-head__count {
  font-weight: 700;
}

.group-head__date,
.group-head__value,
.group-head__empty {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--letter-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-head__date {
  font-size: 19px;
  line-height: 1.2;
}

/* Wert 24 px, bei 320 px etwas kleiner, damit „−123,50 €“ ins schmale Feld passt */
.group-head__value {
  font-size: clamp(19px, 6.2vw, 24px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.group-head__empty {
  font-size: 15px;
  line-height: 1.25;
  white-space: normal;
}

.group-head__extra {
  line-height: 1.2;
  white-space: normal;
}

.group-head__extra > span {
  display: inline-block;
  white-space: nowrap;
}

/* Umschalter im Kopf: Spur Weiß 45 %, 3 px Innenabstand, Felder 40 px, gewähltes Feld schwarz mit Weiß, die anderen in
 * --color-on-group; hell und dunkel gleich. */
.segmented--on-group {
  padding: 3px;
  border-radius: 23px;
  background: var(--color-group-track);
  gap: 2px;
}

.segmented--on-group .segmented__option {
  color: var(--color-on-group);
  font-weight: 600;
}

.segmented--on-group .segmented__option[aria-current="page"] {
  background: var(--color-group-selected);
  color: var(--color-on-group-selected);
}

/* Unter dem Kopf beginnt der Inhalt mit 16 px Abstand, unter dem Farbband mit 14 px; die erste Überschrift rückt nicht
 * weiter ab. */
.group-head + .app__main {
  padding-top: 16px;
}

.group-band + .app__main {
  padding-top: 14px;
}

.group-head + .app__main > .section-header:first-child {
  margin-top: 0;
}

/* Farbband der Unterseiten (Leitfaden „Farbband“, Screens 12 bis 18): klein der Name der Gruppe (13 px/600 in
 * --color-on-group-2), darunter der Titel (22 px Space Grotesk). */
.group-band__text {
  flex-grow: 1;
  min-width: 0;
}

.group-band__group {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-on-group-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-band__title {
  font: var(--text-title);
  font-size: 22px;
  letter-spacing: var(--letter-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Höheres Band der Guthaben-Seite (Screen 20): Guthaben 48 px, Balken mit Spur Weiß 50 % und schwarzer Füllung, zwei
 * Felder wie im Gruppenkopf. Unten 20 px statt 16 px. */
.group-band--tall {
  padding-bottom: 20px;
}

.group-band__balance {
  padding: 0 4px;
}

.group-band__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-on-group-2);
}

.group-band__amount {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.group-band__meter-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meter--on-group {
  height: 10px;
  margin-top: 0;
  border-radius: 5px;
  background: var(--color-group-meter);
}

.meter--on-group::-webkit-progress-bar {
  border-radius: 5px;
  background: var(--color-group-meter);
}

.meter--on-group::-webkit-progress-value {
  border-radius: 5px;
  background: var(--color-on-group);
}

.meter--on-group::-moz-progress-bar {
  border-radius: 5px;
  background: var(--color-on-group);
}

.group-band__note {
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--color-on-group-2);
}

.group-band__field .group-band__note {
  padding: 0;
}

.group-band__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.group-band__field {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--color-group-field);
}

.group-band__value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: var(--letter-tight);
  overflow-wrap: anywhere;
}

/* Weiße Pille neben einer Abschnittsüberschrift: „Bei allen zusagen“ (Screen 08), 36 px, 13 px/600; ::after macht die
 * Tippfläche 44 px hoch. */
.chip-button {
  position: relative;
  height: 36px;
  flex-shrink: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  background: var(--color-card);
  color: var(--color-ink);
  font: var(--text-small);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.chip-button::after {
  content: "";
  position: absolute;
  inset: -4px 0;
}

/* Termin-Detail T2 (Aufgabe 75, Leitfaden „Termin-Detail (T2)“, Screens 04 und 32). Farbiger Kopf in der Gruppenfarbe,
 * unten 32 px Radius, 18 px oben, 16 px seitlich, 22 px unten, 16 px zwischen den Reihen. Alles darauf ist hell und
 * dunkel gleich: weiße Knöpfe und Kachel, Text in --color-on-group, Fokusring in --color-on-group. */
.event-head {
  flex-shrink: 0;
  padding: 18px var(--space-page) 22px;
  border-radius: 0 0 var(--radius-event-head) var(--radius-event-head);
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.event-head :focus-visible {
  outline-color: var(--color-on-group);
}

/* Reihe 1 liegt über der nach oben erweiterten Tippfläche des Gruppennamens; nur ihre Knöpfe fangen Tipps ab. */
.event-head__top {
  position: relative;
  z-index: 2;
  pointer-events: none;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.event-head__top > * {
  pointer-events: auto;
}

/* „Teilen“ zeigt nach dem Kopieren kurz einen Haken (clipboard_controller.js setzt data-copied am Kopf) */
.event-head__copied,
.event-head[data-copied] .event-head__share > svg:first-child {
  display: none;
}

.event-head[data-copied] .event-head__copied {
  display: block;
}

/* „Korrigieren“ neben „Als bezahlt markieren“: weiße Pille wie die runden Knöpfe im Kopf */
.button--on-group {
  background: var(--color-group-button);
  color: var(--color-on-group);
}

.event-head__main {
  min-width: 0;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Weiße Datumskachel 76 × 76 px, Radius 22 px: Monat 12 px/700 in Großbuchstaben, Tag 34 px Space Grotesk */
.event-head__tile {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 22px;
  background: var(--color-group-button);
  color: var(--color-on-group);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.event-head__month {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-on-group-2);
}

.event-head__day {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.event-head__text {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Name der Gruppe 15 px/700, Link in die Gruppe. Sichtbar eine Zeile, die Tippfläche 44 px hoch: Sie wächst nur nach
 * oben in den Abstand zu Reihe 1 (der negative Rand nimmt den Überstand wieder weg), nie über die Zeit darunter; der
 * Text sitzt unten. Reihe 1 liegt darüber (z-index 2), Zurück und Teilen bleiben ganz tippbar. Ein langer Name wird
 * gekürzt. */
.event-head__group {
  position: relative;
  z-index: 1;
  max-width: 100%;
  min-height: var(--size-tap);
  margin-top: calc(15px * 1.3 - var(--size-tap));
  display: inline-flex;
  align-items: flex-end;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.event-head__group-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-head__group:hover {
  text-decoration: underline;
}

.event-head__past {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-on-group-2);
}

/* Groß die Zeit, 30 px Space Grotesk; „Mi, 11. Nov, 19:00“ bricht bei Bedarf nach dem Komma um */
.event-head__time {
  max-width: 100%;
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

/* Abgesagt: durchgestrichen, aber in --color-on-group statt Nebentext */
.event-head__time.struck {
  color: var(--color-on-group);
}

.event-head__until {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 14px;
  color: var(--color-on-group-2);
}

/* „Text zum Teilen“, wenn weder Teilen-Menü noch Zwischenablage gehen: weißes Feld auf der Gruppenfarbe */
.event-head__fallback .field__label {
  color: var(--color-on-group-2);
}

.event-head__fallback .field__input {
  background: var(--color-group-button);
  color: var(--color-on-group);
}

/* Karte „Ort“ (bis Aufgabe 79 „Ort und Frist“): je Zeile ein getönter Kreis 36 px mit Symbol, Titel 15 px/600, darunter 13 px Nebentext */
.event-facts {
  padding: 10px 16px;
  gap: 4px;
}

.event-facts__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact-row {
  min-height: var(--size-tap);
  display: flex;
  align-items: center;
  gap: 12px;
}

.fact-row__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.fact-row__text {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
}

.fact-row__title {
  font-size: 15px;
  font-weight: 600;
}

.fact-row__line {
  font: var(--text-small);
  color: var(--color-ink-2);
}

/* „Ort ändern“ in der Karte, über die ganze Breite */
.event-facts > .button {
  margin: 6px 0;
}

/* Nebenknöpfe auf dem Grund (In Kalender, Alle abonnieren): in Kartenfarbe, damit sie sich vom Grund abheben */
.button-row--ground .button--secondary {
  background: var(--color-card);
}

/* Karte „Wer kommt“: Überschrift 19 px mit Pfeil, drei gleich breite Felder (Zusagen in der Gruppenfarbe, Absagen und
 * Unklar auf dem Grund), Zahl 24 px Space Grotesk, Wort 13 px/600. Links zum Blatt „Wer kommt“ in sheet.css. */
.who-card {
  padding: 14px 16px 16px;
  gap: 12px;
  color: var(--color-ink);
  text-decoration: none;
}

.who-card__title {
  margin: 0;
  font: var(--text-section);
  letter-spacing: var(--letter-tight);
}

.who-card__chevron {
  flex-shrink: 0;
  color: var(--color-ink-3);
}

.who-card__fields {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 8px;
}

.who-field {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--color-ground);
  display: flex;
  flex-direction: column;
}

.who-field--going {
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
}

.who-field__count {
  font: var(--text-figure);
  letter-spacing: var(--letter-tight);
}

/* Bei 320 px und auf Englisch („Not going“) bricht das Wort um, statt gekürzt zu werden */
.who-field__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-ink-2);
  overflow-wrap: anywhere;
}

.who-field--going .who-field__label {
  color: var(--color-on-group-2);
}

/* „min. 4 · Es fehlen noch 2“ mit Personen-Symbol, 13 px/700 in Textfarbe, weder Rot noch Grün */
.who-card__shortfall {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.who-card__shortfall svg {
  flex-shrink: 0;
}

/* Menüzeile „Kosten und Organisation“: Kreis 36 px wie in der Karte „Ort“ */
.event-cost-row {
  padding: 4px 8px;
  color: var(--color-ink);
  text-decoration: none;
}

.event-cost-row .menu-row__icon {
  width: 36px;
  height: 36px;
}

/* „Dein Anteil“ in der Karte „Kosten“ in der Gruppenfarbe (Aufgabe 75) */
.card--costs .share-total {
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
}

.card--costs .share-total__estimate {
  color: var(--color-on-group-2);
}

/* Antwortkarte (Aufgabe 79, „K1“, ersetzt die Antwortleiste aus Aufgabe 75): erste Karte unter dem farbigen Kopf des
 * Termin-Details, am Handy und ab 900 px an derselben Stelle. Links die Überschrift (19 px) und darunter die Frist
 * (13 px in --color-ink-2), rechts ✓ und ✗ aus events/_answer in 52 px (--size-rsvp-card). */
.card.answer-card {
  padding: 14px 16px 14px 18px;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.answer-card__text {
  flex: 1 1 auto;
  min-width: 0;
}

.answer-card__title {
  margin: 0;
  font: var(--text-section);
  letter-spacing: var(--letter-tight);
}

.answer-card__line {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.3;
  color: var(--color-ink-2);
}

.answer-pair--card .toggle {
  width: var(--size-rsvp-card);
  height: var(--size-rsvp-card);
}

/* Seiten ohne Leiste im Redesign (Aufgabe 78, Screens 25 bis 27): Marke oben in einer Reihe von 60 px, darunter die
 * „Sticker“ (Anmelden), die Überschrift 36 px und die Karten mit 14 px Abstand. */
.entry > .brand {
  min-height: 60px;
}

.entry > .brand .brand__name {
  font-size: 22px;
}

/* „Sticker“: Beispielgruppen als leicht gedrehte Pillen in den Gruppenfarben, aria-hidden (shared/stickers) */
.stickers {
  padding: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sticker {
  padding: 8px 14px;
  border-radius: 18px;
  background: var(--sticker-fill);
  color: var(--color-on-group);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: var(--letter-tight);
  line-height: 1.2;
  white-space: nowrap;
  transform: rotate(var(--sticker-turn));
}

.sticker--badminton {
  --sticker-fill: var(--group-blue);
  --sticker-turn: -4deg;
}

.sticker--choir {
  --sticker-fill: var(--group-pink);
  --sticker-turn: 3deg;
}

.sticker--pottery {
  --sticker-fill: var(--group-orange);
  --sticker-turn: -2deg;
}

.sticker--running {
  --sticker-fill: var(--group-teal);
  --sticker-turn: 4deg;
}

.sticker--games {
  --sticker-fill: var(--group-violet);
  --sticker-turn: -3deg;
}

/* „Schau in dein Postfach“ (Screen 26): weiter unten, zentriert, Symbol 56 px in Violett */
.entry--message .card--message {
  margin-top: 52px;
}

.card--centered {
  align-items: center;
  text-align: center;
}

.card--centered .button-row {
  width: 100%;
}

.icon-badge--group {
  background: var(--group-violet);
  color: var(--color-on-group);
}

/* Einladung (Screen 27): die Gruppe als großer Block in ihrer Farbe, Text fast schwarz */
.invitation-group {
  padding: 22px 20px 24px;
  border-radius: 26px;
  background: var(--group-fill, var(--group-neutral));
  color: var(--color-on-group);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-wrap: break-word;
}

.invitation-group__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-on-group-2);
}

.invitation-group__name {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.invitation-group__description {
  font-size: 15px;
  line-height: 1.45;
}

.invitation-group__members {
  margin-top: 6px;
  min-height: 44px;
  padding: 6px 14px 6px 8px;
  border-radius: var(--radius-row);
  background: var(--color-group-field);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

/* Auf der Gruppenfläche hell und dunkel gleich: weiße Kreise mit fast schwarzer Schrift */
.invitation-group__members .avatar-stack .avatar {
  border-color: transparent;
  background: var(--color-group-button);
  color: var(--color-on-group);
}

/* Geteilter Termin für Nicht-Mitglieder: der Block der Einladung, die Überschrift kleiner als dort der Name, weil sie
 * ein ganzer Satz ist; darunter die Kachel wie im Kopf des Termin-Details mit Datum und Uhrzeit */
.shared-event__title {
  font-size: 26px;
}

.shared-event__when {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.shared-event__day {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.shared-event__time {
  font-size: 15px;
  color: var(--color-on-group-2);
  font-variant-numeric: tabular-nums;
}

/* Karte „Möchten beitreten“ unter Verwaltung → Mitglieder: je Anfrage Initialen, Name mit Marke, Nebentext und Termin,
 * darunter „Aufnehmen“ und „Ablehnen“ nebeneinander */
.join-request-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.join-request {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.join-request__person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.join-request__person .avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.join-request__name {
  font-weight: 600;
}

/* Serie in Verwaltung → Planen (Screen 16): Titel 16 px fett neben dem Symbol */
.schedule-row__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

/* Als App installieren, Code zum Anmelden und Übergabe (Aufgabe 80) */

/* Hinweiskarten unter „Termine“: Titel links, rechts × (40 px gezeichnet, 44 px Tippfläche über .icon-button::after),
 * auf der Karte getönt. Ab 900 px gibt es die Karte „Als App installieren“ nicht. */
.app-hint__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -6px -8px -6px 0;
}

.app-hint__close {
  background: var(--color-tint);
}

@media (min-width: 900px) {
  #install-hint {
    display: none;
  }
}

/* Feld für einen Code (Login-Mail, Übergabe): Ziffern groß, mittig und gleich breit */
.field__input--code {
  font: var(--text-figure);
  letter-spacing: 0.12em;
  text-align: center;
}

.field__input--code::placeholder {
  font: var(--text-body);
  font-size: 16px;
  letter-spacing: 0;
}

/* Auf „Schau in dein Postfach“ steht das Feld in der mittigen Karte, das Formular füllt die Breite. */
.code-form {
  width: 100%;
  text-align: left;
}

/* Konto → „Als App installieren“ */
.install-page {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
}

.install-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.install-step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-step__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--color-tint);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-step__text {
  min-width: 0;
  overflow-wrap: break-word;
}

/* Der Code zur Übergabe: groß, markierbar, zwei Vierergruppen */
.transfer-code {
  padding: 16px 14px;
  border-radius: var(--radius-row);
  background: var(--color-ground);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.transfer-code__digits {
  font: var(--text-display);
  font-size: 36px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#transfer-code {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.transfer-code__form {
  display: flex;
  flex-direction: column;
}
