/* Saldo-Fahrten: Dialog „Saldo“ (Salden · Fahrten · Einstellungen, .sd-*) und die Gruppenfahrt-Betriebsart des
   Taxi-Anfrage-Fensters (.sg-*, #modal-taxi-request.is-group-ride). Gehört zu public/saldo.js.
   Handy = Bottom-Sheet mit festem Fuß (das gibt .modal-card / .modal-actions vor), ab Tablet zentriertes Modal.
   Alle Tippflächen >= 44 px, Beträge tabular-nums, lange Namen umbrechen, nie horizontales Scrollen.
   Farben nur über die Variablen der App (die App ist durchgehend dunkel). Richtung und Zustand stehen
   immer auch als Text da – Farbe allein trägt nie eine Aussage. */

/* ---------- Betriebsart „Gruppenfahrt“ des Taxi-Anfrage-Fensters ---------- */
#modal-taxi-request .sr-group-slot { margin: 0 0 1rem; }
#modal-taxi-request.is-group-ride .taxi-time-pax-row { grid-template-columns: minmax(0, 1fr); }
#modal-taxi-request.is-group-ride #tr-group-quote { margin-top: 0.25rem; }

/* ---------- gemeinsame Bausteine ---------- */
/* Sehr lange Namen (Konten wie Externe, bis 40 Zeichen ohne Leerzeichen) brechen überall um – nie seitliches Scrollen. */
.sd-body, .sg-sec, .sg-quote, .sg-preview { overflow-wrap: anywhere; }
.sd-ico { display: inline-flex; flex: none; }
.sd-ico svg { display: block; }
.sd-amt { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.sd-amt.is-owed, .is-owed .sd-amt { color: var(--accent); }
.sd-amt.is-owe, .is-owe .sd-amt { color: var(--danger-text); }
.sd-name, .sd-person-name, .sg-chip-name, .sd-guest-name, .sd-entry-title, .sd-meta dd, .sd-msg, .sg-rank-name {
  overflow-wrap: anywhere; min-width: 0;
}
.sd-h { margin: 1.25rem 0 0.5rem; font-size: var(--label-size); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--text-muted); }
.sd-label { display: block; margin: 0 0 0.4rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); } /* = .form-group label */
.sd-tag {
  display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--text-muted) 18%, transparent); color: var(--text-muted);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.02em; vertical-align: middle; white-space: nowrap;
}
/* Mobile-Audit A2: „(du eingeschlossen)“ am Personen-Feld war 10,9 px – wie alle Plaketten mindestens 0,7 rem. */
#tr-passengers-label small { font-size: 0.7rem; }
.sd-none { margin: 0 0 0.75rem; }
.sd-link { background: none; border: 0; padding: 0.5rem 0; min-height: var(--touch-target); color: var(--accent); font: inherit; font-size: 0.85rem; font-weight: 600; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sd-icon-btn, .sg-chip-x {
  flex: none; width: var(--touch-target); height: var(--touch-target); display: grid; place-items: center; padding: 0; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius); background: transparent; color: var(--text-muted);
}
.sd-icon-btn:active, .sg-chip-x:active { transform: scale(0.94); }
html:not(.using-touch) .sd-icon-btn:hover, html:not(.using-touch) .sg-chip-x:hover { background: var(--cmp-tint-3); color: var(--text); }
.sd-pair:focus-visible, .sd-tab:focus-visible, .sd-link:focus-visible, .sd-back:focus-visible, .sd-icon-btn:focus-visible, .sg-chip-x:focus-visible,
.sd-ghost:focus-visible, .sd-rm-btn:focus-visible, .sg-opt:focus-visible, .sg-sug-btn:focus-visible,
.sd-seg-opt input:focus-visible + span, .sg-pay-opt input:focus-visible + span {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---------- Leise Knöpfe (Ghost) ----------
   Zusatzaktionen, die nie die Hauptaktion eines Blocks sind: Teilen · Karte anzeigen · entfernen · als bezahlt markieren. EINE Basis (.sd-ghost):
   44 px Tippfläche, Schrift 0,9 rem/600, --radius-btn, unsichtbarer 1-px-Rahmen (sichtbar nur bei .is-outline), Hover/Druck/Fokus wie die übrigen
   Knöpfe. Die Variante steht in den Eigenschaften --gh-fg (Farbe) und --gh-hover-fg (Hover): .sd-sec-btn = Akzent, .sd-rm-btn = zurückhaltend und
   erst beim Überfahren rot, .sd-map-toggle = mit Kontur, .sd-paid-btn = Chip (unten). Haupt- und Nebenaktionen eines Blocks bleiben .btn-primary/.btn-secondary. */
.sd-ghost, .sd-rm-btn {
  --gh-fg: var(--text-muted); --gh-hover-fg: var(--text); --gh-hover-bg: var(--cmp-tint-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; flex: 0 1 auto; max-width: 100%; box-sizing: border-box;   /* bei großer Schrift bricht die Beschriftung um, statt aus der Zeile zu ragen */
  min-height: var(--touch-target); min-width: var(--touch-target); padding: 0 0.8rem;
  border-radius: var(--radius-btn); border: 1px solid transparent; background: transparent; color: var(--gh-fg);
  font: inherit; font-size: 0.9rem; font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer; touch-action: manipulation;
  transition: color var(--motion-fast) var(--ease-standard), background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), transform var(--motion-xs) var(--ease-standard);
}
.sd-ghost svg, .sd-rm-btn svg { flex: none; }
html:not(.using-touch) :is(.sd-ghost, .sd-rm-btn):hover { background: var(--gh-hover-bg); color: var(--gh-hover-fg); }
:is(.sd-ghost, .sd-rm-btn):active { transform: scale(0.98); --press-opacity: 1; }
.sd-sec-btn { --gh-fg: var(--accent); --gh-hover-fg: var(--accent); }
.sd-map-toggle { --gh-fg: var(--text); border-color: var(--border-input); justify-self: start; }
.sd-rm-btn {
  --gh-hover-fg: var(--danger-text); --gh-hover-bg: color-mix(in srgb, var(--danger) 10%, transparent); margin-left: auto;
  /* „entfernen“ bei den Personen der Fahrt: leise Textschaltfläche rechts in der Zeile (Symbol + Wort), die Fläche wird erst beim Antippen/Überfahren sichtbar. */
}
html:not(.using-touch) .sd-rm-btn:hover { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.sd-rm-btn:active { color: var(--danger-text); background: color-mix(in srgb, var(--danger) 16%, transparent); }
/* Chip „bezahlt“ (Fahrer markiert Auszahlungen): optisch ein kompakter Chip (32 px), die Tippfläche bleibt die ganze Knopfhöhe (44 px; der Chip ist das ::before,
   der unsichtbare Rand ragt in den Zeilenabstand: margin-block). Beide Zustände sind gleich groß (die Beschriftungen liegen übereinander, die unpassende ist
   unsichtbar) – beim Umschalten springt nichts. Zustand = Symbol + Wort (leeres Kästchen „Als bezahlt markieren“ · Haken „bezahlt“ auf Akzentfläche), nie nur Farbe. */
.sd-paid-btn { --gh-hover-fg: var(--accent-text); --gh-hover-bg: transparent; position: relative; isolation: isolate; margin: -6px 0 -6px auto; padding: calc(6px + 0.2rem) 0.6rem; font-size: 0.85rem; }   /* 0,6 rem: Status („Externer – kein Konto“, 152 px) und Chip (187 px) passen in Zeile 2 der 367 px breiten Desktop-Liste – bei 0,75 rem fehlte ein Pixel und der Chip rutschte darunter */
.sd-paid-btn::before {
  content: ""; position: absolute; inset: calc((var(--touch-target) - 32px) / 2) 0;
  border-radius: var(--radius-btn); border: 1px solid var(--border-input); background: transparent;
  transition: background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard);
}
html:not(.using-touch) .sd-paid-btn:not(.is-on):hover::before { border-color: var(--accent); }
.sd-paid-btn.is-on { --gh-fg: var(--on-accent); --gh-hover-fg: var(--on-accent); }
.sd-paid-btn.is-on::before { background: var(--accent-btn); border-color: var(--accent-btn); }
html:not(.using-touch) .sd-paid-btn.is-on:hover::before { background: var(--accent-btn-strong); border-color: var(--accent-btn-strong); }
.sd-paid-btn > * { position: relative; }   /* Inhalt liegt über dem Chip (::before) – ohne z-index */
.sd-paid-mark { display: inline-flex; flex: none; width: 14px; height: 14px; }
.sd-paid-mark svg { display: block; }
.sd-paid-label { display: inline-grid; text-align: left; overflow-wrap: normal; hyphens: auto; }   /* bei 200 % Schrift trennt „markie-ren“ statt irgendwo mitten im Wort */
.sd-paid-label > span { grid-area: 1 / 1; }
.sd-paid-btn:not(.is-on) .sd-paid-on, .sd-paid-btn.is-on .sd-paid-off { visibility: hidden; }
/* Nicht-Fahrer sehen den Stand als Badge (kein Knopf – ein leeres Kästchen sähe nach Schalter aus): Maße und Fläche wie .badge / .sd-consent-state,
   „offen“ in der Farbe von „wartet“, „bezahlt“ in der Farbe von „einverstanden“ (Haken nur bei bezahlt; das Wort trägt den Stand, nie nur die Farbe).
   Dieselbe Badge-Optik haben die Zeilen der Externen-Liste (.sd-gline-state). */
.sd-paid-state, .sd-gline-state {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3rem; flex: 0 0 auto; padding: 0.2rem 0.55rem; border-radius: var(--radius-sm);
  font-size: var(--text-sm); font-weight: 700; line-height: 1.3; letter-spacing: 0.02em; text-align: center; white-space: nowrap;
  color: var(--badge-pending-text); background: color-mix(in srgb, var(--warning) 22%, transparent);
}
.sd-paid-state { margin-left: auto; }
.sd-paid-state.is-on, .sd-glines li.is-paid .sd-gline-state { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 22%, transparent); }
/* Der globale *:focus-visible setzt border-radius: 4px – die Segmente behalten beim Fokus ihre Rundung. */
.sd-tab:focus-visible, .sd-seg-opt input:focus-visible + span { border-radius: var(--radius); }
.sd-ghost:focus-visible, .sd-rm-btn:focus-visible { border-radius: var(--radius-btn); }
.sg-pay-opt input:focus-visible + span { border-radius: var(--radius-xs); }
.sd-error { display: grid; gap: 0.6rem; padding: 0.75rem; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--danger) 8%, var(--surface2)); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger-text); }
.sd-error p { margin: 0; overflow-wrap: anywhere; }
.sd-empty { display: grid; gap: 0.5rem; justify-items: start; padding: 1rem 0; }
.sd-empty p { margin: 0; line-height: 1.5; }
.sd-skel { padding: 0.5rem 0; }

/* ---------- Dialog „Saldo“ ---------- */
.sd-card { max-width: var(--modal-w-lg); --sd-head-h: 0px; --sd-bleed: 0px; /* Grundwerte; keepClearOfBars() setzt die gemessenen Maße (Dialogkopf, Kartenrand) inline */ }
/* Klemmt die Reiter-Animation seitlich ab: das Panel gleitet 16 px, und die unsichtbaren 44-px-Tippflächen der Info-Punkte am Rand ragen dabei kurz
   über den Kartenrand – der Dialog bekam bei 320 px einen seitlichen Scrollbereich. `clip` (nicht `hidden`) erzeugt keinen Scroll-Container, die
   klebende Kopfzeile .sd-subhead klebt weiter an der Karte; der Rand reicht bis zum Kartenrand (--sd-bleed), die Kopfzeile füllt ihn. */
.sd-clip { min-width: 0; overflow-x: clip; overflow-clip-margin: var(--sd-bleed); }
.sd-body { padding: 0.25rem 0 1.75rem; min-width: 0; }
.sd-body:focus { outline: none; }
/* Hauptdialog: steht die Fußleiste, genügt 1rem Endabstand (wie in allen Dialogen); ohne Fußleiste (Handy, kein „Neue Fahrt“) bleibt die volle Polsterung unten. */
.sd-card .sd-clip > .sd-body { padding-bottom: 1rem; }
@media (max-width: 540px) {
  .sd-card:has(> .modal-actions #sd-new-ride.hidden) .sd-clip > .sd-body { padding-bottom: 1.75rem; }
}
.sd-view { display: block; min-width: 0; }
/* Segmentleisten (Reiter, Offen | Erledigt, Wer hat gezahlt?, Wer fährt?): dieselbe Sprache wie .tab-bar/.tab-pill und .fb-modes
   der übrigen App – getönte Leiste, aktives Segment = grüne Tönung + Akzenttext (--accent-text, AA) + Unterstrich.
   Die gefüllte Akzentfläche gehört nur dem Perspektivwechsel „Verliehen | Geschuldet“ (.perspective-switch). */
.sd-tabs, .sd-seg, .sg-pay { display: flex; gap: 4px; padding: 4px; background: var(--cmp-tint-1); border-radius: var(--radius-segmented); }
.sd-tabs { margin: 0.65rem 0 0.5rem; }   /* Luft zwischen Titelzeile („Saldo“) und den Reitern */
.sd-tab {
  position: relative; flex: 1 1 auto; min-width: 0; min-height: var(--touch-target); padding: 0 0.5rem; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--text-muted); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  touch-action: manipulation; transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard);
}
.sd-tab.is-active, .sd-seg-opt input:checked + span, .sd-seg-btn.is-on, .sg-pay-opt input:checked + span {
  background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 -3px 0 0 var(--accent);
}
html:not(.using-touch) .sd-tab:not(.is-active):hover { color: var(--text); }
/* Gleitender Indikator wie .tab-bar (styles.css „Segment-Indikator“, app.js SEG_BAR_SELECTOR): ein ::before wandert zum aktiven Reiter;
   ohne .has-seg-indicator bleibt der Reiter selbst getönt (Fallback). */
.sd-tabs { position: relative; isolation: isolate; }
.sd-tabs.has-seg-indicator::before { background-color: var(--accent-soft); box-shadow: inset 0 -3px 0 0 var(--accent); }
.sd-tabs.has-seg-indicator > .sd-tab.is-active { background: transparent; box-shadow: none; }
/* Der Punkt sitzt an der Beschriftung (nicht am Rand des breiten Reiters, am Desktop lag er 120 px vom Wort entfernt). */
.sd-tab-label { position: relative; display: inline-block; }
.sd-tab-dot { position: absolute; top: -4px; right: -13px; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
/* Dasselbe für die Segmente (Offen | Erledigt, Wer fährt?, Ausgleich-Richtung, Admin Offen | Alle) und die Zahlart je Person: ein ::before
   gleitet zum gewählten Segment, das gewählte Segment selbst wird dann transparent. Ohne Indikator bleibt die Tönung am Segment. */
.sd-seg, .sg-pay { position: relative; isolation: isolate; }
.sd-seg.has-seg-indicator::before, .sg-pay.has-seg-indicator::before { background-color: var(--accent-soft); box-shadow: inset 0 -3px 0 0 var(--accent); }
.sg-pay.has-seg-indicator::before { border-radius: var(--radius-xs); }
.sd-seg.has-seg-indicator .sd-seg-opt input:checked + span, .sd-seg.has-seg-indicator .sd-seg-btn.is-on,
.sg-pay.has-seg-indicator .sg-pay-opt input:checked + span { background: transparent; box-shadow: none; }
.sd-tab-dot.hidden { display: none; }
@media (max-width: 380px) { .sd-tab { font-size: 0.82rem; padding: 0 0.25rem; } }

.sd-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.5rem 0 0.25rem; }
.sd-sum-card { display: grid; gap: 0.2rem; padding: 0.8rem 0.9rem; border-radius: var(--radius-tile); background: var(--surface2); border: 1px solid var(--border); min-width: 0; }
.sd-sum-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.sd-sum-card .sd-amt { font-size: 1.25rem; }
@media (max-width: 340px) { .sd-sum { grid-template-columns: 1fr; } }

.sd-pairs, .sd-entries, .sd-rides, .sd-people, .sd-guests { list-style: none; margin: 0; padding: 0; }
.sd-pairs { display: grid; gap: 0.5rem; }
.sd-pair {
  width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0.85rem;
  border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  touch-action: manipulation; transition: border-color var(--motion-fast) var(--ease-standard), transform var(--motion-xs) var(--ease-standard);
}
html:not(.using-touch) .sd-pair:hover { border-color: var(--cmp-tint-5); }
.sd-pair:active { transform: scale(0.99); }
.sd-pair-main { display: grid; gap: 0.1rem; min-width: 0; flex: 1 1 auto; }
.sd-pair-main .sd-name { font-weight: 700; font-size: 1rem; }
.sd-dir { font-size: 0.82rem; color: var(--text-muted); }
.is-owed .sd-dir, .is-owe .sd-dir { color: var(--text); }
.sd-pair-amt { display: inline-flex; align-items: center; gap: 0.4rem; flex: none; color: var(--text-muted); }
.sd-pair-amt .sd-amt { font-size: 1.05rem; }

.sd-back { display: inline-flex; align-items: center; gap: 0.3rem; min-height: var(--touch-target); margin: 0 0 0.25rem -0.4rem; padding: 0 0.6rem; border: 0; border-radius: var(--radius); background: transparent; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
/* Klebende Kopfzeile jeder Unteransicht („‹ Alle Salden“ + Titel): sitzt direkt unter dem Dialogkopf (Höhe --sd-head-h und seitlicher Rand --sd-bleed
   misst keepClearOfBars), deckend, damit Inhalt darunter nicht durchscheint. Scrollt man weiter als der Titel im Fluss, wandert der Name
   in dieselbe Zeile (rechts neben dem Zurück-Knopf, .is-compact); der Titel im Fluss bleibt unverändert und scrollt wie bisher mit.
   Zeilenhöhe bleibt gleich (Titel nur eingeblendet) – kein Springen. */
.sd-subhead {
  position: sticky; top: var(--sd-head-h); z-index: var(--z-dropdown);
  display: flex; align-items: center; gap: 0.75rem; min-height: var(--touch-target);
  margin: 0 calc(-1 * var(--sd-bleed)); padding: 0 var(--sd-bleed) 0.25rem;
  background: var(--surface);
}
.sd-subhead .sd-back { flex: none; margin: 0 0 0 -0.4rem; }
.sd-subhead-title {
  flex: 1 1 auto; min-width: 0; text-align: right; font-size: 1rem; font-weight: 800; letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  opacity: 0; visibility: hidden; transform: translateY(0.35rem);
  transition: opacity var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard), visibility 0s linear var(--motion-fast);
}
.sd-subhead.is-compact .sd-subhead-title {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity var(--motion-fast) var(--ease-standard), transform var(--motion-fast) var(--ease-standard), visibility 0s;
}
.sd-subhead.is-instant .sd-subhead-title { transition: none; }
@media (prefers-reduced-motion: reduce) { .sd-subhead-title, .sd-subhead.is-compact .sd-subhead-title { transition: none; transform: none; } }
.sd-person-title { margin: 0; font-size: 1.25rem; font-weight: 800; overflow-wrap: anywhere; }
.sd-person-title:focus { outline: none; }
.sd-person-sum { margin: 0.2rem 0 0; font-size: 1rem; font-weight: 600; }
.sd-person-sum.is-owed { color: var(--accent); }
.sd-person-sum.is-owe { color: var(--danger-text); }
.sd-entry { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.sd-entry:first-child { border-top: 0; }
.sd-entry-main { display: grid; gap: 0.15rem; min-width: 0; justify-items: start; }
.sd-entry-title { font-weight: 600; }
.sd-entry-meta { font-size: 0.8rem; color: var(--text-muted); }
.sd-entry-amt { display: grid; gap: 0.1rem; justify-items: end; text-align: right; flex: none; max-width: 45%; }
.sd-entry-amt .sd-dir { overflow-wrap: anywhere; }
.sd-more { width: 100%; margin-top: 1rem; }

/* Segment (Offen | Erledigt, Ich fahre | Name wählen | Errechnen) */
.sd-seg { margin: 0.25rem 0 1rem; }
.sd-seg-opt { flex: 1 1 0; min-width: 0; position: relative; cursor: pointer; }
.sd-seg-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sd-seg-opt span { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: var(--touch-target); padding: 0 0.4rem; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; text-align: center; color: var(--text-muted); transition: background var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard); overflow-wrap: anywhere; }
.sd-seg-opt input:active + span { transform: scale(0.97); }
html:not(.using-touch) .sd-seg-opt input:not(:checked):not(:disabled):hover + span { color: var(--text); }
.sd-seg-opt.is-off { opacity: var(--dim-disabled); cursor: not-allowed; }
.sd-seg-opt.is-off input { cursor: not-allowed; }

/* ---------- Fahrt-Karte ---------- */
.sd-rides { display: grid; gap: 0.9rem; margin-top: 0.25rem; }
.sd-ride { display: grid; gap: 0.7rem; padding: 0.95rem; border-radius: var(--radius-card); background: var(--surface2); border: 1px solid var(--border); min-width: 0; }
.sd-ride.is-spotlight { animation: sdSpot 2.4s var(--ease-standard); }
@keyframes sdSpot { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 3px transparent; } }
.sd-ride-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.sd-ride-title { margin: 0; flex: 1 1 auto; min-width: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sd-ride-title:focus { outline: none; }
.sd-ride-head .badge { flex: none; white-space: nowrap; }
.sd-meta { display: grid; gap: 0.3rem; margin: 0; }
.sd-meta > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0.5rem; font-size: 0.9rem; }
.sd-meta dt { color: var(--text-muted); }
.sd-meta dd { margin: 0; }
/* Handy: Bezeichnung und Wert bleiben nebeneinander (gestapelt wurde jede Karte ~90 px höher, drei Fahrten füllten drei Bildschirme);
   erst auf winzigen Bildschirmen stehen sie untereinander. */
@media (max-width: 520px) { .sd-meta > div { grid-template-columns: 6rem minmax(0, 1fr); } }
@media (max-width: 340px) { .sd-meta > div { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.sd-msg { margin: 0; padding: 0.5rem 0.75rem; border-left: 3px solid var(--border-input); color: var(--text-muted); font-size: 0.9rem; white-space: pre-wrap; }
.sd-role, .sd-myshare { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.sd-myshare { color: var(--text); }
.sd-people { display: grid; gap: 0.4rem; }
.sd-person { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; padding: 0.45rem 0.65rem; border-radius: var(--radius-xs); background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.sd-person.is-paid { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
/* Mitfahrerzeile (E27, verdichtet): Zeile 1 Name | Betrag. Zeile 2 gibt es nur mit einem STATUS (einverstanden, wartet, Einspruch, entfernt): der Block .sd-person-sub
   (volle Breite) trägt ihn links und die Aktionen („entfernen“, „bezahlt“) rechts – der Status steht immer linksbündig unter dem Namen, unabhängig davon, wie viel Platz die
   erste Zeile braucht. Ohne Status stehen die Aktionen in Zeile 1 rechts neben dem Betrag (Name | Betrag | Chip), sofern der Platz reicht – sonst bricht der Chip nach
   rechts in Zeile 2 um; ohne Status und ohne Aktion gibt es keine Zeile 2. Die Aktionen liegen nie in der Spalte des Betrags: sie drücken den Namen nicht zusammen. */
.sd-person > .sd-person-main { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.25rem 0.6rem; }   /* Name | Betrag; die Aktion daneben (ohne Status) richtet sich nach der Breite dieses Blocks: passt sie dahinter, steht sie in Zeile 1, sonst bricht sie um */
.sd-person-main > .sd-person-info { justify-content: flex-end; text-align: right; min-width: 0; }
.sd-person > .sd-person-acts, .sd-person-sub > .sd-person-acts { flex: 0 0 auto; margin-left: auto; justify-self: end; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.25rem 0.5rem; min-width: 0; max-width: 100%; }
.sd-person > .sd-person-sub { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; min-width: 0; }
/* N6 (Etiketten-Position): Zeile 2 = Status-Etikett links (einzeilig, solange es allein in die Zeile passt) · Aktionen rechts. Passen beide nicht nebeneinander, rutschen die
   Aktionen als Ganzes in eine eigene Zeile rechts – das Etikett wird nie zu einem mehrzeiligen Kasten gequetscht. Die Begründung eines Einspruchs ist
   Text, kein Teil des Etiketts: schmal in einer eigenen Zeile unter dem Etikett, breit (Desktop) direkt dahinter. */
.sd-person-sub > .sd-consent-state { order: 0; flex: 0 1 auto; }
.sd-person-sub > .sd-person-acts { order: 1; }
.sd-person-sub > .sd-consent-reason { order: 2; flex: 1 1 100%; min-width: 0; }
.sd-people { container-type: inline-size; }
@container (min-width: 22rem) { .sd-person-sub > .sd-consent-reason { order: 0; flex: 1 1 8rem; } }   /* Handy (bis 402 px: ~310 px Liste) eigene Zeile; Tablet/Desktop (Liste ≥ 352 px, auch die rechte Spalte der Fahrt bei 1280 px) dahinter */
.sd-person-acts > .sd-paid-btn { margin-left: 0; }
/* „entfernen“ ist wie der „bezahlt“-Chip 44 px hoch (Tippfläche), sein Rand ragt in den Zeilenabstand (margin-block) – die Zeile mit Status + „entfernen“ war 12 px höher als die mit Chip */
.sd-person-acts > .sd-rm-btn { margin-block: -6px; }
/* Große Schrift: alles untereinander in einer Spalte */
html.text-big :is(.sd-person, .sd-person-main, .sd-person-sub) { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; }
html.text-big :is(.sd-person, .sd-person-main, .sd-person-sub) > * { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; margin-left: 0; max-width: 100%; }
html.text-big .sd-person-acts { justify-content: flex-start; }
html.text-big .sd-person-acts > .sd-rm-btn { margin-block: 0; }
.sd-person-name { flex: 1 1 8rem; font-weight: 600; }
.sd-person-info { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; font-size: 0.85rem; color: var(--text-muted); }
.sd-person-info .sd-amt { color: var(--text); }
.sd-map-wrap { display: grid; gap: 0.4rem; min-width: 0; }
.sd-map-wrap.hidden { display: none; }
.sd-map { position: relative; z-index: 0; isolation: isolate; /* Leaflet-Ebenen (z-index bis 1000) dürfen nicht über .modal-actions (z-index 4) und den Kopf ragen */ height: var(--taxi-map-h); border-radius: var(--radius-xs); overflow: hidden; background: var(--surface); border: 1px solid var(--border); touch-action: pan-x pan-y; }
.sd-map-msg { margin: 0; font-size: 0.82rem; }
.sd-map-msg:empty { display: none; }
.sd-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sd-actions > button { flex: 1 1 max-content; max-width: 100%; width: auto; margin: 0; min-height: var(--touch-target); }   /* Beschriftung bricht nicht um, solange sie in die Zeile passt: sonst eigene Zeile über die ganze Breite (kein Wechsel 44 | 62 px zwischen Handy-Breiten) */

/* Einstellungen */
.sd-guests { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.9rem; }
.sd-guest { display: inline-flex; align-items: center; gap: 0.1rem; max-width: 100%; padding: 0 0.15rem 0 0.8rem; min-height: var(--touch-target); border-radius: var(--radius-btn); background: var(--surface2); border: 1px solid var(--border-input); }
.sd-guest-add-row { display: flex; gap: 0.5rem; }
.sd-guest-add-row input { flex: 1 1 auto; min-width: 0; }
.sd-guest-add-row .btn-secondary { flex: none; }

/* ---------- Gruppenfahrt anfragen: Mitfahrer, Fahrer, Vorschau ---------- */
.sg-sec { border: 0; margin: 0 0 1.1rem; padding: 0; min-width: 0; }
.sg-sec legend { padding: 0; margin: 0 0 0.45rem; font-size: var(--label-size); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--text-muted); }
.sg-count { display: block; margin: 0 0 0.5rem; font-size: 0.82rem; color: var(--text-muted); }
/* Mitfahrer wählen: gewählt (.sg-chip, mit ×) und wählbar (.sg-sug-btn, mit +) teilen Höhe, Rahmen, Schrift und Raster – [Name][44-px-Feld mit × bzw. +].
   Beim Antippen ändert sich weder Höhe noch Breite (gleicher Name = gleiche Breite); das Feld ragt 1 px über den Rahmen und bleibt so eine volle
   44-px-Tippfläche in einem 44 px hohen Chip. */
.sg-chips { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sg-chip, .sg-quick .sg-sug-btn {
  display: inline-flex; align-items: center; box-sizing: border-box; max-width: 100%; min-height: var(--touch-target); padding: 0 0 0 calc(0.8rem - 1px);
  border-radius: var(--radius-btn); font: inherit; font-weight: 600; line-height: 1.25; text-align: left;
}
.sg-chip { background: var(--surface2); border: 1px solid var(--border); }
.sg-chip.is-guest, .sg-quick .sg-sug-btn.is-guest { border-style: dashed; }
.sg-chip-name, .sg-sug-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.sg-chip .sg-chip-x, .sg-sug-btn .sg-sug-plus { flex: none; width: var(--touch-target); height: var(--touch-target); margin: -1px -1px -1px 0; }
.sg-sug-plus { display: grid; place-items: center; color: var(--text-muted); }
.sg-pay { grid-area: pay; padding: 0.2rem; border-radius: var(--radius); justify-self: start; max-width: 100%; }
.sg-pay-note { grid-area: pay; font-size: 0.85rem; color: var(--text-muted); }
.sd-estimate { margin: 0; padding: 0.45rem 0.65rem; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); font-size: 0.85rem; }
/* Rückgängig-Fenster (saldo.js decoratePending): die Aktion der Karte wartet auf den Versand. Gleicher Hinweis wie .entry-pending-badge der
   Leihen-Karten (eigene Klasse: _applyPendingQueueMarkers in app.js räumt jedes .entry-pending beim Neuzeichnen weg). */
.sd-pending { display: flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.55rem; border-radius: var(--radius-xs); font-size: 0.76rem; font-weight: 600; color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent); }
.sd-pending-spin { flex: 0 0 auto; width: 0.72rem; height: 0.72rem; border: 2px solid color-mix(in srgb, var(--warning) 40%, transparent); border-top-color: var(--warning); border-radius: 50%; animation: entryPendingSpin 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .sd-pending-spin { animation: none; } }
.sd-ride.is-pending, .sd-prop.is-pending { box-shadow: inset 4px 0 0 0 var(--warning); }
.sg-pay-opt { position: relative; flex: 0 1 auto; min-width: var(--touch-target); cursor: pointer; }
.sg-pay-opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.sg-pay-opt span { display: flex; align-items: center; justify-content: center; min-height: var(--touch-target); min-width: var(--touch-target); padding: 0 0.7rem; border-radius: var(--radius-xs); font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.sg-pay-opt.is-off { opacity: var(--dim-disabled); cursor: not-allowed; }
.sg-pay-opt.is-off input { cursor: not-allowed; }
.sg-add { display: grid; gap: 0.5rem; }
.sd-fg { margin-bottom: 0; }
.sg-add input[type="text"] { width: 100%; }
.sg-combo { position: relative; }
.sg-results { list-style: none; margin: 0.25rem 0 0; padding: 0.25rem; max-height: 12.5rem; overflow-y: auto; overscroll-behavior: contain; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border-input); box-shadow: var(--shadow); position: absolute; top: 100%; left: 0; right: 0; z-index: var(--z-autocomplete); /* wie .taxi-stop-results: Vorschlagsliste liegt über dem Fuß (.modal-actions, z 4), sonst schnitt der Fuß die Treffer ab */ }
.sg-results.hidden { display: none; }
/* Wie die Adress-Vorschläge der Taxi-Anfrage (.taxi-stop-results, styles.css): am Feld verankert und fixiert. Absolut unter dem Feld endete die
   Liste an der Unterkante des scrollenden Inhalts und verschwand hinter dem Fuss (gemessen bei 390 x 700: nur 2 von 6 Treffern sichtbar);
   fixiert wird sie nicht abgeschnitten und klappt bei wenig Platz nach oben. Ohne Anker-Unterstützung bleibt die absolute Liste (scrollbar). */
@supports (anchor-name: --a) {
  #sg-person-q { anchor-name: --sg-person; }
  #sg-person-results { position: fixed; position-anchor: --sg-person; position-try-fallbacks: flip-block; top: anchor(bottom); left: anchor(left); right: anchor(right); margin-top: 2px; }
}
.sg-opt, .sg-sug-btn { width: 100%; min-height: var(--touch-target); padding: 0 0.75rem; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
html:not(.using-touch) .sg-opt:hover, html:not(.using-touch) .sg-sug-btn:hover { background: var(--cmp-tint-3); }
.sg-none { padding: 0.7rem 0.75rem; font-size: 0.9rem; }
.sg-guest-btn { justify-self: start; flex: none; }
.sg-guest-box.hidden { display: none; }
.sg-guest-box { display: grid; gap: 0.5rem; padding: 0.75rem; border-radius: var(--radius); border: 1px dashed var(--border-input); }
.sg-guest-row { display: flex; gap: 0.5rem; }
.sg-guest-row input { flex: 1 1 auto; min-width: 0; }
.sg-guest-row .btn-secondary { flex: none; }
.sg-sug { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sg-sug.hidden { display: none; }
.sg-sug-btn { width: auto; border: 1px solid var(--border-input); border-radius: var(--radius-btn); }
.sg-driver-seg { margin-bottom: 0.75rem; }
/* Wer fährt? in Worten (Punkt 2 der Rückmeldung von Kevin): unter der Leiste, an der Stelle der Auswahl bei „Jemand anderes“, steht bei „Vorschlag“
   der vorgeschlagene Fahrer samt Grund, bei „Ich fahre“ das Auto. Die Hülle (aria-live) bleibt im Dokument, die Karte kommt und geht per reveal. */
.sg-driver-hint { min-width: 0; }
.sg-hint-card { display: grid; gap: 0.15rem; margin: 0 0 0.75rem; padding: 0.6rem 0.8rem; border-radius: var(--radius-xs); background: var(--surface2); border: 1px solid var(--border); min-width: 0; transition: opacity var(--motion-fast) linear; }
.sg-hint-card.hidden { display: none; }
.sg-hint-card.is-stale { opacity: 0.55; }
.sg-hint-main, .sg-hint-sub { margin: 0; overflow-wrap: anywhere; }
.sg-hint-sub { font-size: 0.85rem; color: var(--text-muted); }
.sg-hint-card .sd-link { justify-self: start; margin-top: -0.2rem; padding-top: 0.25rem; padding-bottom: 0.25rem; }
.sg-pick, .sg-vehicle { margin-bottom: 0.5rem; }
.sg-pick.hidden, .sg-vehicle.hidden, .sg-nodriver.hidden { display: none; }
.sg-nodriver:empty { display: none; }

.sg-quote { min-width: 0; }
.sg-preview { display: grid; gap: 0.7rem; padding: 0.9rem; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); transition: opacity var(--motion-fast) linear; }
.sg-preview.is-stale { opacity: 0.55; }
.sg-hint { margin: 0; font-size: 0.9rem; }
.sg-facts { display: grid; gap: 0.3rem; margin: 0; }
.sg-facts > div { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.9rem; }
.sg-facts dt { color: var(--text-muted); flex: none; }
.sg-facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sg-facts .is-total { font-size: 1.05rem; font-weight: 800; }
.sg-facts .is-total dt { color: var(--text); }
.sg-myshare { margin: 0; padding: 0.6rem 0.75rem; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); font-size: 1rem; }
.sg-myshare .sd-amt { font-size: 1.15rem; }
.sg-sub { margin: 0.25rem 0 0; font-size: var(--label-size); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--text-muted); }
.sg-effects { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.sg-effects li { display: grid; gap: 0.1rem; font-size: 0.9rem; }
.sg-effects li span { color: var(--text-muted); overflow-wrap: anywhere; }
.sg-rank { margin: 0.4rem 0; padding: 0; list-style: none; display: grid; gap: 0.4rem; counter-reset: rank; }
.sg-rank li { display: block; padding: 0.5rem 0.65rem; border-radius: var(--radius-xs); background: var(--surface); border: 1px solid var(--border); font-size: 0.9rem; counter-increment: rank; }
.sg-rank li::before { content: counter(rank) ". "; color: var(--text-muted); font-weight: 700; }
.sg-rank-sum { display: block; margin-top: 0.1rem; font-weight: 600; }
.sg-rank-parts { display: block; margin-top: 0.1rem; font-size: 0.85rem; color: var(--text-muted); overflow-wrap: anywhere; }
.sg-rank-legend { margin: 0 0 0.25rem; }
.sg-rank li.is-chosen { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.sg-rank-name { font-weight: 700; }
.sg-rank-sum { color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sg-conflicts { padding: 0.6rem 0.75rem; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); font-size: 0.9rem; }
.sg-conflicts ul { margin: 0.25rem 0 0 1.1rem; padding: 0; }

/* ===============================================================================================
   Runde 2: Ausgleich/Verrechnung, Verlauf, nächster Fahrer, Gäste-Sammelliste, Lebenszyklus, Vorlagen, Admin, Export
   ====================================================================================================== */
.sd-tab.hidden { display: none; }
.sd-h-first { margin-top: 0.25rem; }
/* Info-Punkte („i“): Titelzeile, Überschriften und Label-Zeilen halten Text und Punkt auf einer Linie. */
.sd-title-row, .sd-info-row { display: flex; align-items: center; gap: 0.1rem; min-width: 0; }
.sd-info-row { margin: 0 0 0.4rem; }
.sd-info-row .sd-label { margin: 0; }
.sd-h .info-dot, .sg-sub .info-dot { text-transform: none; letter-spacing: 0; vertical-align: middle; }
.sg-step-head .info-dot { margin-left: 0.1rem; }
legend.label-with-info, .sd-chks legend { display: inline-flex; align-items: center; }
.sd-todo .info-dot, .sd-confirm-note .info-dot, .sd-chart-cap .info-dot { margin-left: 0.3rem; }
.sd-count { display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; margin-left: 0.5rem; padding: 0 0.4rem; border-radius: var(--radius-sm); background: var(--warning); color: var(--bg); font-size: 0.75rem; font-weight: 800; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; vertical-align: middle; }
/* ---------- Aufklappkarten (<details>) ----------
   EINE Bauart für jedes Aufklappmenü im Saldo-Bereich (Referenz: .reliability-how in styles.css): Karte in --surface2 mit Rahmen, fette Zeile (mind. 44 px),
   Pfeil rechts (dreht sich beim Öffnen), Hover = hellerer Rahmen, Druck = getönte Zeile, Fokus = Ring innen. Inhalt klappt per ::details-content auf (unten).
   Varianten: .sd-fold--flat (in einer Karte: nur Trennlinie oben, Vorschau, Fahrerwahl, Termine, Auszahlungen), .sd-fold--sub (gestrichelt, in einer Aufklappkarte).
   Der Zustand bleibt beim Live-Neuaufbau erhalten, wenn die Karte eine Id trägt (saldo.js onPanelToggle/openDetails). */
.sd-fold { margin: 1rem 0 0; padding: 0 0.85rem; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); min-width: 0; transition: border-color var(--motion-fast) var(--ease-standard); }
.sd-fold[open] { padding-bottom: 0.85rem; }
.sd-fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: var(--touch-target); margin: 0 -0.85rem; padding: 0.35rem 0.85rem; border-radius: var(--radius); /* nicht inherit: das Elternteil eines <summary> ist der <slot> von <details> (Radius 0), Druckfläche war eckig (#20) */
  font-size: var(--text-fold); font-weight: 700; cursor: pointer; list-style: none; touch-action: manipulation; user-select: none; transition: background-color var(--motion-fast) var(--ease-standard);
}
.sd-fold > summary::-webkit-details-marker { display: none; }
/* Pfeil: dieselbe Form, Drehung und Dauer überall (auch .sd-ride-chev/.sd-chat-chev der Knopf-Köpfe und .tl-group-head in styles.css): zu = nach unten, offen = nach oben. */
.sd-fold > summary::after, .sd-ride-chev::after, .sd-chat-chev::after {
  content: ""; flex: none; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg) translateY(-2px); transition: transform var(--motion-base) var(--ease-standard);
}
.sd-fold[open] > summary::after, .sd-ride-toggle[aria-expanded="true"] .sd-ride-chev::after, .sd-chat-toggle[aria-expanded="true"] .sd-chat-chev::after { transform: rotate(-135deg) translateY(-2px); }
.sd-ride-toggle .sd-ride-chev > *, .sd-chat-toggle .sd-chat-chev > .sd-ico { display: none; }   /* das Symbol im Markup wird durch den Pfeil oben ersetzt (gleiche Form wie bei den Aufklappkarten) */
.sd-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
html:not(.using-touch) .sd-fold:has(> summary:hover) { border-color: var(--cmp-tint-5); }
.sd-fold > summary:active { background: color-mix(in srgb, white 6.5%, transparent); --press-opacity: 1; }
.sd-fold > summary > span:first-child { flex: 1 1 auto; min-width: 0; }
.sd-fold[open] > :not(summary) { margin-top: 0.6rem; margin-bottom: 0; }
.sd-fold--flat { margin: 0; padding: 0.5rem 0 0; background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; }
.sd-fold--flat[open] { padding-bottom: 0; }
.sd-fold--flat > summary { margin: 0 -0.4rem; padding: 0.35rem 0.4rem; border-radius: var(--radius-xs); }
html:not(.using-touch) .sd-fold--flat:has(> summary:hover) { border-color: var(--border); }
html:not(.using-touch) .sd-fold--flat > summary:hover { background: var(--cmp-tint-1); }
.sd-fold--sub { margin-top: 0.5rem; background: transparent; border-style: dashed; }
.sd-gbox-sum { margin-left: auto; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; text-align: right; }

/* Vorschläge (Ausgleich, Verrechnung, Korrektur-Anträge, Meldungen) */
.sd-props { margin: 0 0 1rem; }
.sd-prop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.sd-prop { display: grid; gap: 0.5rem; padding: 0.8rem 0.9rem; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); min-width: 0; }
.sd-prop.is-incoming { border-color: color-mix(in srgb, var(--warning) 60%, transparent); background: color-mix(in srgb, var(--warning) 8%, var(--surface2)); }
.sd-prop.is-stale { border-style: dashed; }
.sd-prop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.sd-prop-title { flex: 1 1 auto; min-width: 0; font-size: 1rem; overflow-wrap: anywhere; }
.sd-prop-head .badge { flex: none; white-space: nowrap; }
.sd-prop-meta, .sd-prop-note { margin: 0; font-size: 0.85rem; color: var(--text-muted); overflow-wrap: anywhere; }
.sd-prop-note { color: var(--text); white-space: pre-wrap; }
.sd-prop-err { display: grid; gap: 0.5rem; justify-items: start; margin: 0 0 1rem; }
.sd-prop-err p { margin: 0; overflow-wrap: anywhere; }
.sd-person-actions { margin: 0.9rem 0 0; display: flex; }
.sd-person-actions .btn-secondary { flex: 1 1 auto; min-height: var(--touch-target); }
.sd-entry-links { display: flex; flex-wrap: wrap; gap: 0 0.9rem; }
.sd-seg-btn { flex: 1 1 0; min-width: 0; min-height: var(--touch-target); padding: 0 0.4rem; border: 0; border-radius: var(--radius); background: transparent; color: var(--text-muted); font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.sd-seg-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
.sd-seg-btn { transition: color var(--motion-fast) var(--ease-standard); }

/* Mit Leihen verrechnen (zugeklappte Karte wie .sd-next) */
.sd-offset-line { margin: 0; font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; }

/* Verrechnung (E10): „Verrechnung möglich“ im Salden-Reiter, „Grund der Verrechnung“ an Vorschlag, Karte, Buchung. Die Überschrift steht im Text (nicht nur Farbe). */
.sd-netting { margin: 0 0 1rem; display: grid; grid-template-columns: minmax(0, 1fr); /* bei großer Schrift nie breiter als der Dialog */ gap: 0.6rem; }
.sd-netting .sd-h { margin: 0.25rem 0 0; }
.sd-netting .btn-secondary { min-height: var(--touch-target); }
.sd-why { display: grid; gap: 0.3rem; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border: 1px solid var(--border); min-width: 0; }
.sd-why-label { margin: 0; font-size: var(--label-size); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--text-muted); }
.sd-why-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; font-size: 0.88rem; line-height: 1.45; overflow-wrap: anywhere; }
.sd-entry-why { display: block; margin-top: 0.15rem; font-size: 0.8rem; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.sd-offset .btn-secondary { min-height: var(--touch-target); }

/* Verlaufsdiagramm */
.sd-chart { margin: 0; }
.sd-chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sd-chart-zero { stroke: var(--border-input); stroke-width: 1; stroke-dasharray: 3 3; }
.sd-chart-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sd-chart-area { fill: var(--accent); opacity: 0.12; stroke: none; }
.sd-chart-dot { fill: var(--accent); }
.sd-chart-label, .sd-chart-axis { font-size: var(--text-xs); fill: var(--text-muted); font-variant-numeric: tabular-nums; font-family: inherit; }
/* Zahl am Höchst-/Tiefstpunkt: Rand in der Kartenfarbe (Halo), damit sie auch über Nulllinie und Fläche lesbar bleibt; Punkt markiert die Stelle. */
.sd-chart-label { fill: var(--text); font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.sd-chart-mark { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.sd-chart-cap { margin: 0.35rem 0 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; overflow-wrap: anywhere; }
.sd-chart-skel { height: 96px; border-radius: var(--radius-xs); }
.sd-chart-data ul { margin: 0 0 0.5rem; padding-left: 1.1rem; display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

/* „Wer fährt als Nächstes?“ */
.sd-chks { border: 0; margin: 0 0 0.5rem; padding: 0; min-width: 0; }
.sd-chk-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sd-chk { position: relative; max-width: 100%; cursor: pointer; }
.sd-chk input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
/* Auswahl-Chip: gewählt und ungewählt sind gleich groß. Der Selektor trifft nur das Beschriftungs-<span> (`> span`): `.sd-chk span` traf auch das
   Icon-<span> im Chip und setzte dem Häkchen Rahmen, Innenabstand und Mindesthöhe – der gewählte Chip war 51 px breiter und 2 px höher. Das Symbol
   hat einen festen Platz (14 px), ungewählt steht dort „+“, gewählt das Häkchen (Icons aus dem App-Set). */
.sd-chk > span { display: flex; align-items: center; box-sizing: border-box; min-height: var(--touch-target); padding: 0 0.9rem; border-radius: var(--radius-btn); border: 1px solid var(--border-input); background: var(--surface); color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.sd-chk input:checked + span { background: var(--accent-btn); border-color: transparent; color: var(--on-accent); }
.sd-chk .sd-ico { flex: none; display: inline-flex; width: 14px; height: 14px; margin-right: 0.4rem; }
.sd-chk .sd-chk-off { color: var(--text-muted); }
.sd-chk .sd-chk-on, .sd-chk input:checked + span .sd-chk-off { display: none; }
.sd-chk input:checked + span .sd-chk-on { display: inline-flex; }
.sd-chk input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sd-chk.is-off { opacity: var(--dim-disabled); cursor: not-allowed; }
.sd-chk.is-off input { cursor: not-allowed; }
.sd-next-go { width: 100%; min-height: var(--touch-target); margin: 0.25rem 0 0.75rem; }
.sd-next-result { display: grid; gap: 0.5rem; padding: 0.8rem 0.9rem; border-radius: var(--radius-xs); background: var(--surface); border: 1px solid var(--border); }
.sd-next-result:focus { outline: none; }
.sd-next-result .sg-rank { margin: 0; }
.sd-next-driver { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.sd-excluded { display: grid; gap: 0.25rem; }
.sd-excluded-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.2rem; font-size: 0.9rem; overflow-wrap: anywhere; }

/* Gäste-Sammelliste */
.sd-glist { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.sd-guest-card { display: grid; gap: 0.5rem; padding: 0.7rem 0.8rem; border-radius: var(--radius-xs); background: var(--surface); border: 1px dashed var(--border-input); min-width: 0; }
.sd-guest-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.sd-guest-head .sd-guest-name { min-width: 0; }
.sd-glines { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.sd-glines li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; font-size: 0.9rem; }
.sd-gline-main { min-width: 0; overflow-wrap: anywhere; color: var(--text-muted); }
.sd-gline-amt { display: inline-flex; align-items: center; gap: 0.5rem; flex: none; }
.sd-gpaid { justify-self: end; }
.sd-guests-err { margin: 0 0 0.75rem; }

/* Lebenszyklus der Fahrt: fällig, Meldungen, weitere Aktionen */
.sd-due, .sd-report-note { margin: 0; padding: 0.5rem 0.7rem; border-radius: var(--radius-xs); font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; }
.sd-due { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); }
.sd-report-note { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent); }
.sd-ride.is-due { border-color: color-mix(in srgb, var(--warning) 55%, transparent); }
.sd-sec-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
/* N5: „An Yannick senden“ – ein langer Name ohne Leerzeichen bricht um, statt die Karte zu verbreitern. */
.sd-guest-share { overflow-wrap: anywhere; }
.sd-copy-ta { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; }

/* Eingabe-Dialoge (Sheets) */
.sd-sheet { max-width: var(--modal-w-md); }
/* The kicker names the person ("Saldo mit …"): 40 characters without a space must wrap, not widen the sheet. */
.sd-sheet .modal-kicker, .sd-sheet h2 { overflow-wrap: anywhere; min-width: 0; }
.sd-sheet-body { display: grid; gap: 0.75rem; align-content: start; padding-bottom: 1rem; /* Endabstand zur Fußleiste 1rem wie in den anderen Dialogen (.sd-body bringt 1.75rem mit) */ }
.sd-sheet-body > div { display: grid; gap: 0.75rem; min-width: 0; }
.sd-sheet-lead { margin: 0; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.sd-field { margin: 0; }
.sd-field input[type="text"], .sd-field textarea { width: 100%; }
.sd-field textarea { min-height: 5.5rem; resize: vertical; }
.sd-sheet-err:empty { display: none; }
.sd-sheet-err { margin: 0; }
.sd-chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.75rem; }

/* Vorlagen */
.sd-tpl-list, .sd-tpl-pick { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sd-tpl { display: flex; align-items: stretch; gap: 0.25rem; min-width: 0; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); }
.sd-tpl-main { display: grid; gap: 0.1rem; flex: 1 1 auto; min-width: 0; padding: 0.55rem 0 0.55rem 0.85rem; }
.sd-tpl-name { overflow-wrap: anywhere; }
.sd-tpl-sub, .sd-tpl-warn { font-size: 0.82rem; color: var(--text-muted); overflow-wrap: anywhere; }
.sd-tpl-warn { color: var(--danger-text); }
.sd-tpl .sd-icon-btn { align-self: center; }
.sd-tpl-use { display: grid; gap: 0.1rem; flex: 1 1 auto; min-width: 0; min-height: 56px; padding: 0.55rem 0.2rem 0.55rem 0.85rem; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius); touch-action: manipulation; }
.sd-tpl-use:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sd-tpl-last { width: 100%; min-height: var(--touch-target); margin: 0.25rem 0; }
.sd-tpl-sheet { min-height: 3rem; }
.sg-tpl-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sg-tpl-btn { flex: 1 1 9rem; min-height: var(--touch-target); }
.sg-tpl-note { margin: 0.4rem 0 0; overflow-wrap: anywhere; }
.sg-tpl-note:empty { display: none; }
/* Stammgruppen (E9): Chips im Gruppenfahrt-Dialog (Schritt 2) und das Sheet „Stammgruppe“. Chips sind .btn-pct (Antippen, 44 px); ein vollständig eingetragener Chip trägt ein Häkchen, nicht nur Farbe. */
.sg-groups { display: grid; gap: 0.5rem; }
.sg-groups.hidden { display: none; }
.sg-group-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sg-group-chips { display: contents; }
.sg-group-chip, .sg-group-replace { max-width: 100%; text-align: left; overflow-wrap: anywhere; white-space: normal; }
.sg-group-replace.hidden { display: none; }
.sg-group-n { font-weight: 500; font-variant-numeric: tabular-nums; }
.sg-group-chip.active::before, .sg-group-replace.active::before { content: "✓"; content: "✓" / ""; margin-right: 0.35em; font-weight: 700; }
.sg-groups-note { margin: 0; overflow-wrap: anywhere; }
.sg-groups-note:empty { display: none; }
.sg-group-save { justify-self: start; min-height: var(--touch-target); }
.sg-group-save.hidden { display: none; }
.sd-grp-members { list-style: none; margin: 0 0 0.5rem; padding: 0; display: grid; gap: 0.4rem; }
.sd-grp-members:empty { display: none; }
.sd-grp-member { display: flex; align-items: center; gap: 0.5rem; min-height: var(--touch-target); padding: 0 0 0 calc(0.8rem - 1px); border: 1px solid var(--border); border-radius: var(--radius-btn); background: var(--surface2); }
.sd-grp-member.is-guest { border-style: dashed; }
.sd-grp-member-name { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.sd-grp-member .sd-icon-btn { flex: none; margin: -1px -1px -1px 0; }
.sd-grp-add { display: flex; gap: 0.5rem; }
.sd-grp-add select, .sd-grp-add input { flex: 1 1 auto; min-width: 0; }
.sd-grp-add .btn-secondary { flex: none; }
.sd-grp-new { margin-top: 0.6rem; min-height: var(--touch-target); }
.sg-limit { padding: 0.6rem 0.75rem; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); font-size: 0.9rem; overflow-wrap: anywhere; }
.sg-limit ul { margin: 0.25rem 0 0.25rem 1.1rem; padding: 0; }
.sg-limit .settings-help-text { margin: 0.25rem 0 0; }

/* CSV-Export */
.sd-csv-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem; margin: 0 0 0.6rem; }
.sd-csv-range input { width: 100%; min-height: var(--touch-target); }
@media (max-width: 340px) { .sd-csv-range { grid-template-columns: minmax(0, 1fr); } }
.sd-csv-go { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; width: 100%; min-height: var(--touch-target); }

/* Schmale Handys: vier Reiter (mit „Admin“) passen nebeneinander */
@media (max-width: 380px) {
  .sd-tabs { gap: 0.15rem; padding: 0.2rem; }
  .sd-tab { padding: 0 0.15rem; font-size: 0.76rem; }
}

/* ---------- Telefon im Querformat: Kopf + Tabs + Fuß dürfen den Inhalt nicht auffressen ---------- */
@media (max-height: 480px) {
  .sd-tabs { margin-bottom: 0.25rem; }
  .sd-map { height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  .sd-fold, .sd-fold > summary, .sd-fold > summary::after, .sd-ride-chev::after, .sd-chat-chev::after, .sd-ghost, .sd-paid-btn::before { transition: none; }
  .sd-ghost:active { transform: none; }
  .sd-ride.is-spotlight { animation: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 70%, transparent); }
  .sd-pair, .sd-tab, .sd-seg-opt span, .sg-preview, .sd-icon-btn, .sg-chip-x { transition: none; }
  .sd-ride-toggle, .sd-ride, .sd-goto { transition: none; }
  .sd-ride-toggle:active, .sd-goto:active { transform: none; }
  .sd-pair:active, .sd-icon-btn:active, .sg-chip-x:active, .sd-seg-opt input:active + span { transform: none; }
}

/* ======================================================================================================
   Runde 3 (UX-Audit): Aufgabenhinweise, Fehlertexte, Fußzeile der Gruppenfahrt, Handy-Fuß
   ====================================================================================================== */
.sd-error-lead { font-weight: 700; }
.sd-error-detail { font-size: 0.9rem; }
.sd-error-hint { font-size: 0.85rem; color: var(--text-muted); }
.sd-none { font-size: 0.9rem; }

/* Was diese Karte von MIR will (oder worauf sie wartet) – als Satz, nicht nur als Farbe */
.sd-todo { margin: 0; padding: 0.5rem 0.7rem; border-radius: var(--radius-xs); font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.sd-todo.is-wait { background: var(--surface); border-color: var(--border); color: var(--text-muted); }
.sd-todo.is-wait strong { color: var(--text); }
.sd-tasks { margin: 0 0 0.75rem; padding: 0.55rem 0.75rem; border-radius: var(--radius-xs); font-size: 0.9rem; line-height: 1.45; background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); }
.sd-confirm-note { margin: 0; }

/* Fußzeile der Gruppenfahrt: eine sichtbare Zeile über den Knöpfen (was fehlt / dein Anteil) */
#modal-taxi-request .modal-actions { flex-wrap: wrap; }
#modal-taxi-request .sg-foot { flex: 0 0 100%; margin: 0; font-size: 0.85rem; line-height: 1.35; color: var(--text-muted); overflow-wrap: anywhere; }
#modal-taxi-request .sg-foot:empty { display: none; }
/* Handy: statt des ganzen Satzes („Es fehlt noch: mindestens ein Mitfahrer (Schritt 2), ein Fahrer: Mit „Vorschlag“ …“, ein Viertel des Bildschirms)
   steht eine Kurzzeile; der volle Satz bleibt für Screenreader und als Tooltip im Text. */
#modal-taxi-request .sg-foot .sg-foot-short { display: none; }
@media (max-width: 540px) {
  #modal-taxi-request .sg-foot.has-brief .sg-foot-short { display: block; font-size: 0.8rem; line-height: 1.3; }
  #modal-taxi-request .sg-foot.has-brief .sg-foot-full { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* Handy: Fußbereich der Gruppenfahrt schlanker, damit mehr vom Formular zu sehen ist – Knöpfe 44 px statt 72 px hoch (der Haupt-Knopf bricht
   nicht mehr um: er bekommt mehr Breite als „Abbrechen“), weniger Abstand um Hinweiszeile und Knöpfe. Touch-Ziele bleiben ≥ 44 px. */
@media (max-width: 540px) {
  #modal-taxi-request.is-group-ride .modal-card > .modal-actions { gap: 0.35rem 0.5rem; padding-top: 0.45rem; padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px)); }
  #modal-taxi-request.is-group-ride .modal-card > .modal-actions:has(> button + button) { flex-direction: row; flex-wrap: wrap; }   /* nebeneinander auch auf hohen Bildschirmen (vorher übereinander ab 760 px Höhe) */
  #modal-taxi-request.is-group-ride .modal-card > .modal-actions > button { min-height: var(--touch-target); }
  #modal-taxi-request.is-group-ride .modal-card > .modal-actions > #tr-submit { flex: 1 1 0; min-width: 0; width: auto; }   /* Haupt-Knopf nimmt den Rest und bricht nicht um */
  #modal-taxi-request.is-group-ride .modal-card > .modal-actions > button:not(#tr-submit) { flex: 0 0 auto; width: auto; }
}
/* V4: Querformat – die Hinweiszeile bricht um (höchstens zwei, bei schmalem Fenster drei Zeilen) statt auf eine Zeile mit Ellipse gekürzt zu
   werden: B4 verließ sich auf `title` und aria-describedby, aber am Handy gibt es keinen Tooltip – wer sehen will, WARUM „Gruppenfahrt anfragen“
   gesperrt ist („Es fehlt noch: …“), konnte es im Querformat nicht lesen (844 × 390: 654 von 870 px). Der Absatz kostet 18 px je Zeile. */
@media (orientation: landscape) and (max-height: 500px) {
  #modal-taxi-request .sg-foot { line-height: 1.25; }
}

/* Handy hochkant: „Schließen“ im Fuß wiederholt nur das ✕ im Kopf (wie beim Protokoll-Fenster) – der Platz gehört dem Inhalt.
   Wer nicht anfragen darf, hat dann gar keinen Fuß. */
@media (max-width: 540px) {
  #sd-close { display: none; }
  .sd-card > .modal-actions:has(#sd-new-ride.hidden) { display: none; }
}

/* Weiße Zahl auf dem Akzentgrün (--accent) hatte nur 2,7 : 1 – wie bei allen Weiß-auf-Grün-Flächen der App gilt --accent-btn (WCAG AA). */
#modal-taxi-request.is-group-ride .taxi-stop-num { background: var(--accent-btn); }

/* ======================================================================================================
   Runde 5 (Vereinfachung): Dashboard-Karte, Erster-Besuch-Hinweis, Gesamtstand, zugeklappte Fahrten,
   Gruppenfahrt in drei Schritten mit „Mehr Optionen“, kompakte Vorschau
   ====================================================================================================== */
/* Dashboard-Karte „Saldo“ (E22: EINE kompakte Karte, beide Sichten; E32: eine eigene Karte in voller Breite im Streifen .dash-compact, hinter der Netto-Übersicht und vor den Aktionsknöpfen, siehe
   `.dash-compact` in styles.css).
   E26: aufklappbar wie die Netto-Übersicht (<details>, gleiche Bauart wie .net-overview-details in styles.css: Zeile ≥ 44 px in 1 rem, Pfeil rechts, ::details-content gleitet auf).
   Aufbau (public/saldo.js entryHtml): Titelzeile (immer sichtbar) „Saldo · Gruppenfahrten (i)“, der Kurzstand („Dir schuldet man … · Du schuldest …“) und – nur wenn es etwas gibt –
   die Chips „n Aufgaben“ (wartet auf dich) und „Verrechnung möglich“ sowie rechts davon „Gruppenfahrt anfragen“ (E27: auch zugeklappt; steht nicht im <summary>); aufgeklappt darunter:
   die Stand-Zeile (öffnet den Saldo-Dialog) und EINE Status-Zeile (die wichtigste, „+ n weitere“ als Zähler am Zeilenende). Nichts davon steht als leerer Platzhalter da. */
.saldo-entry-slot:empty { display: none; }
.saldo-entry { --radius-saldo-entry: var(--radius-card); /* wie die Kacheln im Raster (.dashboard-card) und die Netto-Karte (.net-overview) */ display: block; min-width: 0; margin: 0;
  container-type: inline-size; /* die Chips zeigen ihren Klartext erst, wenn die Karte breit genug ist (@container unten) */ }
.saldo-entry-card {
  position: relative; min-width: 0; border-radius: var(--radius-saldo-entry); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card); transition: var(--transition-ui);
  /* Spalte: wird die Karte neben der Netto-Übersicht höher gezogen (Desktop-Raster), sitzt der Knopf „Gruppenfahrt anfragen“ (.saldo-entry-foot) unten rechts in der Karte,
     nicht direkt unter den Chips mit leerem Raum darunter. */
  display: flex; flex-direction: column;
}
.saldo-entry-card > .saldo-entry-details { flex: 1 1 auto; min-width: 0; }
.saldo-entry-card > .saldo-entry-foot { margin-top: auto; }
/* Hover/Press wie die anderen klickbaren Dashboard-Kacheln und die Netto-Übersicht (.dashboard-card-clickable in styles.css): die Titelzeile hebt die Karte leicht an (Akzent-Rahmen, Schatten),
   beim Drücken sinkt sie ein. Nur mit der Maus (kein klebriger Hover auf dem Handy). Die Knöpfe IN der Titelzeile (Chips, Info-Punkt) und im aufgeklappten Teil heben sich nicht
   zusätzlich an: Akzent-Rahmen bzw. Tönung genügt, und ein Tipp auf sie lässt die Karte nicht einsinken. */
html:not(.using-touch) .saldo-entry-card:has(.saldo-entry-summary:hover) {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift), inset 0 1px 0 var(--cmp-tint-1);
}
html:not(.using-touch) .saldo-entry-main:hover .saldo-entry-chev { color: var(--accent); transform: translateY(-50%) translateX(2px); }
html:not(.using-touch) .saldo-entry-main:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.saldo-entry-chev, .saldo-entry-chip, .saldo-entry .saldo-entry-new { transition: var(--transition-ui); }
html:not(.using-touch) .saldo-entry-card:has(.saldo-entry-summary:active) { transform: scale(0.985); transition-duration: 60ms; }
html:not(.using-touch) .saldo-entry-chip:hover, html:not(.using-touch) .saldo-entry .saldo-entry-new:hover { border-color: var(--accent); }
html:not(.using-touch) .saldo-entry .saldo-entry-new:hover { transform: none; }   /* .btn-secondary:hover hebt sonst noch einmal um 1 px an: die Karte bewegt sich schon */
@media (prefers-reduced-motion: reduce) {
  html:not(.using-touch) .saldo-entry-card:has(.saldo-entry-summary:hover), html:not(.using-touch) .saldo-entry-card:has(.saldo-entry-summary:active) { transform: none; }
  html:not(.using-touch) .saldo-entry-main:hover .saldo-entry-chev { transform: translateY(-50%); }
}
/* Die Titelzeile: Überschrift „Saldo“ + „Gruppenfahrten“ + Kurzstand; Pfeil rechts (wie .net-overview-summary). Der Info-Punkt ist ein Knopf und darf nicht IM <summary> stehen:
   er liegt rechts neben dem Pfeil auf der Titelzeile (die Zeile lässt ihm rechts Platz). */
.saldo-entry-summary {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2); min-height: var(--touch-target); padding: var(--space-1) 4.6rem var(--space-1) var(--space-4);
  list-style: none; cursor: pointer; user-select: none; touch-action: manipulation; border-radius: var(--radius-card);
}
.saldo-entry-summary::-webkit-details-marker { display: none; }
/* Große Schrift (200 %, html.text-big): der rechte Rand ist in rem angelegt und fraß bei 320 px fast die ganze Zeile – „schuldet“ brach in „schulde|t“.
   Etwas knapper (Info-Punkt und Pfeil liegen weiter rechts im Rand, siehe unten), das Wort passt wieder in die Zeile; gebrochen wird nur noch an Wortgrenzen. */
html.text-big .saldo-entry-summary { padding-right: 4rem; }
html.text-big .saldo-entry-short { overflow-wrap: break-word; }
.saldo-entry-summary::after {
  content: ""; position: absolute; right: var(--space-4); top: 50%; width: 0.55rem; height: 0.55rem; margin-top: -0.4rem;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg);
  transition: transform var(--motion-fast) var(--ease-standard);
}
.saldo-entry-details[open] > .saldo-entry-summary::after { transform: rotate(-135deg); margin-top: -0.15rem; }
.saldo-entry-card > .info-dot { position: absolute; z-index: var(--z-card-control); right: 2.9rem; top: calc((var(--touch-target) - 1.12rem) / 2); margin: 0; }
@media (prefers-reduced-motion: reduce) { .saldo-entry-summary::after { transition: none; } }
.saldo-entry-summary:focus-visible, .saldo-entry-main:focus-visible, .saldo-entry-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* E23: die Zeile steht wie jede Aufklapp-Zeile in 1 rem (Titel fett); nur „Gruppenfahrten“ und der Kurzstand daneben bleiben klein. */
.saldo-entry-summary { font-size: var(--text-fold); }
.saldo-entry-title { margin: 0; font-size: var(--text-fold); font-weight: 700; color: var(--text); }
.saldo-entry-sub { font-size: var(--text-sm); color: var(--text-muted); }
.saldo-entry-short { flex: 1 1 12rem; min-width: 0; font-size: var(--text-sm); color: var(--text-muted); line-height: 1.35; overflow-wrap: anywhere; }
.saldo-entry-short .sd-amt { font-size: inherit; }
.saldo-entry-short.is-loading { display: flex; align-items: center; min-height: 1.35em; }   /* reserviert die Zeile: der Wechsel zu den Zahlen springt nicht */
.saldo-entry-short-skel { display: block; height: 0.9rem; width: 70%; max-width: 14rem; }
/* Aufgeklappt steht der Stand in der Stand-Zeile darunter (die Zeile öffnet den Dialog): der Kurzstand oben entfällt, die Chips rücken in eine eigene Zeile. */
.saldo-entry-details[open] .saldo-entry-short { display: none; }
.saldo-entry-body { border-top: 1px solid var(--border); padding-top: var(--space-1); }
.saldo-entry-main {
  position: relative; display: grid; gap: 0.2rem; width: 100%; min-height: var(--touch-target); align-content: center; padding: var(--space-1) 2.4rem var(--space-1) 0.95rem; text-align: left;
  border: 0; border-radius: var(--radius-card); background: transparent; color: var(--text); font: inherit; cursor: pointer; touch-action: manipulation;
}
.saldo-entry-stand { font-size: 1rem; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.saldo-entry-chev { position: absolute; right: 0.9rem; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--text-muted); }
/* „Gruppenfahrt anfragen“: ein kleiner Knopf rechts in der Fußzeile unter der Titelzeile bzw. dem aufgeklappten Teil, ZUGEKLAPPT UND AUFGEKLAPPT sichtbar (E27: seit die Karte
   einklappbar ist (E26), brauchte der Knopf am Handy einen Tipp mehr). Er steht nicht im <summary> (Knopf im Knopf, axe `nested-interactive`), sondern wie die Chips in
   `.saldo-entry-foot`; passt er neben die Chips, teilt er sich die Zeile, sonst bekommt er eine eigene (die zugeklappte Karte wächst höchstens um diese eine Zeile).
   .btn-secondary liefert sonst `flex: 1` (Dialog-Fuß) und die Glasfläche. */
.saldo-entry-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; padding: 0 var(--space-2) var(--space-2) 0.95rem; }
.saldo-entry .saldo-entry-new {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; margin-left: auto; min-height: var(--touch-target); padding: 0 var(--space-3);
  border-radius: var(--radius-btn); background: transparent; border: 1px solid var(--border); color: var(--text); font-size: var(--text-base); font-weight: 600;
  white-space: normal; text-align: left;   /* große Schrift (200 %): der Text bricht um, statt über den Kartenrand zu ragen */
}
/* Aufklappen: wie .net-overview-details (Höhe + Einblenden); reduzierte Bewegung: kein Gleiten. Eine schon offene Karte, die neu gezeichnet wird, trägt data-no-anim (styles.css). */
@supports selector(::details-content) {
  .saldo-entry-details { interpolate-size: allow-keywords; }
  .saldo-entry-details::details-content {
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition:
      height var(--motion-base) var(--ease-standard),
      opacity var(--motion-base) var(--ease-standard),
      content-visibility var(--motion-base) allow-discrete;
  }
  .saldo-entry-details[open]::details-content { height: auto; opacity: 1; }
  @media (prefers-reduced-motion: reduce) {
    .saldo-entry-details::details-content { transition: none; height: auto; opacity: 1; }
  }
}

/* Fahrten-Status der Karte (shared/saldo-entry.js; public/saldo.js entryHtml): EINE Zeile – unterwegs, wartet auf andere, nächste Fahrt oder zuletzt –, die Zeile ist
   ein Knopf (Symbol + Text, nie nur Farbe), Tippfläche ≥ 44 px, Fokusrahmen wie die übrige Karte. „+ n weitere“ steht als Zähler am Ende des Textes. */
.saldo-entry-card.has-status .saldo-entry-main { padding-bottom: 0.1rem; }
.saldo-entry-status { margin: 0; padding: 0 var(--space-2) var(--space-2); min-width: 0; }
.saldo-entry-status.is-loading { min-height: calc(var(--touch-target) + var(--space-2)); display: grid; align-content: center; padding: 0 0.95rem var(--space-2); }   /* reserviert die Höhe EINER Zeile: der Wechsel zum Inhalt springt nicht */
.saldo-entry-skel { display: block; height: 0.9rem; width: 70%; max-width: 18rem; }
.saldo-entry-empty { margin: 0; box-sizing: border-box; display: flex; align-items: center; min-height: calc(var(--touch-target) + var(--space-2)); /* gleich hoch wie das Skelett: kein Sprung beim Laden */ padding: 0.1rem 0.95rem var(--space-2); font-size: 0.9rem; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.saldo-entry-line {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); width: 100%; min-height: var(--touch-target); padding: var(--space-1) var(--space-2); text-align: left;
  border: 1px solid transparent; border-radius: var(--radius-btn); background: transparent; color: var(--text); font: inherit; font-size: var(--text-base); line-height: 1.35;
  cursor: pointer; touch-action: manipulation; transition: background-color var(--motion-fast) var(--ease-standard);
}
.saldo-entry-line:focus-visible, .saldo-entry-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
html:not(.using-touch) .saldo-entry-line:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.saldo-entry-ic { display: inline-flex; flex: none; color: var(--text-muted); }
.saldo-entry-txt { min-width: 0; overflow-wrap: anywhere; }
.saldo-entry-extra { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.saldo-entry-chev2 { display: inline-flex; flex: none; color: var(--text-muted); }
.saldo-entry-line.is-now { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); font-weight: 700; }
.saldo-entry-line.is-now .saldo-entry-ic { color: var(--accent); }
.saldo-entry-line.is-wait, .saldo-entry-line.is-past { color: var(--text-muted); }

/* Zähler-Chips: „n Aufgaben“ (wartet auf dich – Warnfarbe + Symbol + Wort) und „Verrechnung möglich“ (ruhig). Kleine Pillen, Tippfläche ≥ 44 px (auch mit der Maus: die Chips sind die einzige Zeile zu ihrer Aufgabe);
   der Klartext (alle Aufgaben, „Saldo gegen Schulden“) steht für Bildschirmleser im Chip und wird bei breiter Karte sichtbar. */
.saldo-entry-chips { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: var(--space-2); min-width: 0; max-width: 100%; }   /* außerhalb des <summary> (in .saldo-entry-foot): unter der Titelzeile, auch zugeklappt sichtbar; aufgeklappt unter dem aufgeklappten Teil */
.saldo-entry-chip {
  position: relative; display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; max-width: 100%; min-height: var(--touch-target); padding: 0 var(--space-3); text-align: left;
  border-radius: var(--radius-btn); background: var(--surface2); border: 1px solid var(--border); color: var(--text); font: inherit; font-size: var(--text-base); font-weight: 600; line-height: 1.3;
  cursor: pointer; touch-action: manipulation;
}
/* Im Chip behält das Wort („2 Aufgaben“, „Verrechnung möglich“) seine volle Breite und schrumpft nie; nur der Klartext dahinter wird mit … gekürzt. */
.saldo-entry-chip .saldo-entry-txt { flex: 0 0 auto; max-width: 100%; overflow-wrap: break-word; }   /* kein Schrumpfen auf „Aufga | ben“; nur wenn die Karte zu schmal ist (große Schrift), bricht es zwischen Wörtern um */
.saldo-entry-chip .saldo-entry-ic { flex: none; }
.saldo-entry-todo { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border-color: color-mix(in srgb, var(--warning) 45%, transparent); font-weight: 700; }
.saldo-entry-todo .saldo-entry-ic { color: var(--text); }
html:not(.using-touch) .saldo-entry-chip:active { transform: scale(0.985); transition-duration: 60ms; }
@media (prefers-reduced-motion: reduce) { html:not(.using-touch) .saldo-entry-chip:active { transform: none; } }
.saldo-entry-chip-more {
  /* schmal: nur für Bildschirmleser (wie .sr-only) */
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
/* Breite, AUFGEKLAPPTE Karte: der Klartext der Chips steht dahinter (zugeklappt bleibt die Titelzeile kurz, der Klartext nur für Bildschirmleser). */
@container (min-width: 36rem) {
  .saldo-entry-card:has(.saldo-entry-details[open]) .saldo-entry-chip-more { position: static; width: auto; height: auto; margin: 0 0 0 calc(-1 * var(--space-2)) /* rückt den Doppelpunkt an das Wort (hebt den Abstand des Chips auf) */; overflow: hidden; clip-path: none; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; font-weight: 500; color: var(--text-muted); min-width: 0; }
  .saldo-entry-card:has(.saldo-entry-details[open]) .saldo-entry-todo .saldo-entry-chip-more { color: var(--text); }
}
@media (prefers-reduced-motion: reduce) { .saldo-entry-line { transition: none; } }

/* Salden: Das steht an, Gesamtstand */
.sd-todo-sec { margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.sd-todo-sec .sd-h { margin: 0.25rem 0 0; }
.sd-goto {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; min-height: var(--touch-target); padding: 0.5rem 0.85rem; text-align: left;
  border-radius: var(--radius); background: color-mix(in srgb, var(--warning) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.sd-goto:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Hover/Press wie die anderen antippbaren Zeilen der Salden (.sd-pair): Rahmen wird heller, beim Drücken sinkt die Zeile ein. */
.sd-goto { transition: border-color var(--motion-fast) var(--ease-standard), transform var(--motion-xs) var(--ease-standard); }
html:not(.using-touch) .sd-goto:hover { border-color: color-mix(in srgb, var(--warning) 75%, transparent); }
.sd-goto:active { transform: scale(0.99); }
.sd-stand { margin: 0.25rem 0 0.25rem; padding: 0.85rem 0.95rem; border-radius: var(--radius-tile); background: var(--surface2); border: 1px solid var(--border); font-size: 1.02rem; line-height: 1.55; overflow-wrap: anywhere; }
.sd-stand .sd-amt { font-size: 1.2rem; }
.sd-outgoing .sd-prop-list { margin-bottom: 0.25rem; }
.sd-person-actions { align-items: center; gap: 0.35rem; margin-bottom: 0.25rem; }
.sd-person-actions .btn-primary { flex: 1 1 auto; min-height: var(--touch-target); }

/* Fahrten: zugeklappte Karten */
.sd-rides { gap: 0.6rem; }
.sd-ride { gap: 0.5rem; padding: 0.35rem 0.8rem 0.8rem; }
.sd-ride:not(:has(> .sd-todo, > .sd-actions, > .sd-due, > .sd-report-note, > .sd-confirm-note)) { padding-bottom: 0.35rem; }
.sd-ride-head { margin: 0; font: inherit; }
.sd-ride-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; min-height: 56px; margin: 0; padding: 0.35rem 0; text-align: left;
  border: 0; border-radius: var(--radius); background: transparent; color: var(--text); font: inherit; cursor: pointer; touch-action: manipulation;
}
.sd-ride-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Hover/Press wie die Personenzeilen (.sd-pair): die ganze Fahrtkarte reagiert, wenn man ihren Kopf berührt – nur mit der Maus (kein klebriger Hover am Handy). */
.sd-ride { transition: border-color var(--motion-fast) var(--ease-standard); }
html:not(.using-touch) .sd-ride:not(.is-due):has(> .sd-ride-head .sd-ride-toggle:hover) { border-color: var(--cmp-tint-5); }
.sd-ride-toggle { transition: transform var(--motion-xs) var(--ease-standard); }
.sd-ride-toggle:active { transform: scale(0.99); }
.sd-ride-toggle-main { display: grid; gap: 0.15rem; min-width: 0; flex: 1 1 auto; }
.sd-ride-line1 { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.sd-ride-line1 .sd-ride-title { flex: 1 1 auto; min-width: 0; font-size: 1.02rem; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sd-ride-line1 .badge { flex: none; white-space: nowrap; }
.sd-ride-line2 { font-size: 0.85rem; color: var(--text-muted); overflow-wrap: anywhere; }
.sd-ride-chev { flex: none; display: inline-flex; }
.sd-ride-detail { display: grid; gap: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--border); min-width: 0; }
.sd-ride-detail[hidden] { display: none; }

/* Gruppenfahrt in drei Schritten */
.sg-step-head { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--text); }
.sg-sec legend.sg-step-head { float: left; width: 100%; padding: 0; font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--text); }
.sg-sec legend.sg-step-head + * { clear: both; }
.sg-step-num { flex: none; display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: var(--radius-pill); background: var(--accent-btn); color: var(--on-accent); font-size: 0.85rem; font-weight: 800; }
#modal-taxi-request.is-group-ride #tr-group-riders, #modal-taxi-request.is-group-ride #tr-group-driver, #modal-taxi-request.is-group-ride #tr-group-more { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
/* "Änderung vorschlagen" leert Mitfahrer und Fahrer (nur Strecke, Zeit, Zweck und Nachricht sind vorschlagbar): ohne Inhalt bleibt auch ihre Trennlinie weg (sonst drei Striche ohne Grund). */
#modal-taxi-request.is-group-ride :is(#tr-group-riders, #tr-group-driver, #tr-group-more):empty { display: none; }
/* „Änderung vorschlagen“ › Mitfahrer: Name des Externen und sein Knopf in einer Zeile (Handy: der Knopf darunter, wenn es nicht passt). */
.sg-prop-riders .sg-prop-sub { margin: 0.75rem 0 0.4rem; }
.sg-prop-guest-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: stretch; }
.sg-prop-guest-row input { flex: 1 1 10rem; width: auto; min-width: 0; }   /* der App-Stil (.form-group input) gibt Rahmen, Farbe und 16 px: kleinere Schrift ließe das iPhone beim Antippen hineinzoomen */
.sg-prop-guest-row .sg-prop-guest-btn { flex: 0 0 auto; }
#modal-taxi-request.is-group-ride #tr-group-top { margin-bottom: 0.5rem; }
#modal-taxi-request.is-group-ride #tr-ride-at-help { display: none; }
.sg-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sg-quick.hidden { display: none; }
.sg-quick .sg-sug-btn:disabled { opacity: var(--dim-disabled); cursor: not-allowed; }
.sg-sug-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sg-chips:empty { display: none; }
.sg-count { margin-bottom: 0.6rem; }

/* Mehr Optionen */
.sg-more { margin: 0; }
.sg-more > summary > span:first-child { display: grid; gap: 0.1rem; }
.sg-more-sub { margin-left: auto; font-size: 0.8rem; font-weight: 500; color: var(--text-muted); text-align: right; }
.sg-more-flag { font-size: 0.8rem; font-weight: 600; color: var(--accent-text); }
.sg-more-flag:empty { display: none; }
.sg-more-body { display: grid; gap: 1.1rem; min-width: 0; }
.sg-more-body .sg-sec { margin: 0; }
.sg-more-body .message-field { margin: 0; }
.sg-pays-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.sg-pay-row { display: grid; gap: 0.25rem; }
.sg-pay-name { font-weight: 700; overflow-wrap: anywhere; }
.sg-pay-row .sg-pay { justify-self: start; }

/* Vorschau: erst das Wichtigste */
.sg-headline { margin: 0; font-size: 1.1rem; font-weight: 700; }
.sg-headline .sd-amt { font-size: 1.5rem; }
.sg-headline-sub { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }
.sg-lead { margin: 0; font-size: 0.9rem; color: var(--text-muted); overflow-wrap: anywhere; }
.sg-preview .sg-why, .sg-preview .sg-split { margin: 0; }

/* ======================================================================================================
   Runde 7 (Anordnung): Handy bleibt gestapelt (eine Spalte, Hauptaktion unten), der Desktop nutzt seine Breite.
   Die Reihenfolge im DOM ist überall die Lesereihenfolge (= Tab-Reihenfolge); Spalten entstehen nur per CSS-Grid.
   ====================================================================================================== */
/* Reiterwechsel: der Dialog behält seine Mindesthöhe, damit Kopf, Reiter und Fuß beim Wechsel nicht springen (ein kurzer Reiter
   ließ den Dialog schrumpfen und die Reiterleiste unter dem Finger/Zeiger wandern). */
.sd-card { min-height: min(44rem, calc(100dvh - 7rem)); }
/* …gilt nur für den großen Saldo-Dialog mit Reitern: die kleinen Eingabe-Dialoge (Ausgleich, „Ich war nicht dabei“, Vorlage …) sind nur so hoch wie ihr Inhalt. */
.sd-card.sd-sheet { min-height: 0; }
/* Betrag und Richtung einer Buchung bleiben zusammen oben rechts (in einer hohen Zeile rutschte die Richtung an die Unterkante). */
.sd-entry-amt { align-content: start; }
/* Zusatzangabe in Aufklappzeilen („2 Personen · 13,01 €“, „1 wartet auf Antwort“) steht am Handy unter der Beschriftung statt daneben –
   nebeneinander brachen beide in zwei Zeilen um. */
@media (max-width: 540px) {
  .sd-fold > summary:has(> :is(.sd-gbox-sum, .sg-more-sub)) { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.6rem; align-items: center; }
  .sd-fold > summary:has(> :is(.sd-gbox-sum, .sg-more-sub)) > span:first-child { grid-column: 1; }
  .sd-fold > summary > :is(.sd-gbox-sum, .sg-more-sub) { grid-column: 1; grid-row: 2; margin: 0; text-align: left; font-weight: 500; }
  .sd-fold > summary:has(> :is(.sd-gbox-sum, .sg-more-sub))::after { grid-column: 2; grid-row: 1 / span 2; }
}
/* „Zahlart je Person“ (Mehr Optionen): Name links, Umschalter rechts in derselben Zeile (bricht erst bei wenig Platz um). Der Umschalter trug noch
   das grid-area „pay“ der alten Chip-Zeile, das hier eine unsichtbare zweite Spalte aufmachte und ihn weder links noch rechts bündig setzte. */
.sg-pay-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.1rem 0.75rem; }
.sg-pay-row .sg-pay-name { flex: 1 1 7rem; min-width: 0; }
.sg-pay-row .sg-pay { grid-area: auto; flex: none; }
/* Wer fährt, hat statt des Umschalters den Text „fährt“ – gleich hoch wie der Umschalter, damit die Zeile beim Wechsel des Fahrers nicht springt. */
.sg-pay-row .sg-pay-note { grid-area: auto; flex: none; display: flex; align-items: center; min-height: calc(var(--touch-target) + 0.4rem); padding: 0 0.9rem; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
/* Fahrt-Karte aufgeklappt: Fakten (Abfahrt, Fahrer, Strecke, Kosten) und Beteiligte stehen untereinander; am Desktop nebeneinander. */
.sd-ride-facts { display: grid; gap: 0.7rem; min-width: 0; }
.sd-person-grid { display: block; }
@media (min-width: 1280px) {
  /* Salden: zwei Personen je Zeile statt einer 860 px breiten Zeile mit dem Betrag am anderen Ende. */
  .sd-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.75rem; }
  /* Person: links was ich tun kann (Vorschläge, Ausgleich, Verrechnung, Verlauf), rechts die Buchungen. */
  .sd-person-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 1.75rem; align-items: start; margin-top: 0.75rem; }
  .sd-person-side, .sd-person-main { min-width: 0; }
  .sd-person-side > :first-child, .sd-person-main > :first-child { margin-top: 0; }
  .sd-person-side > .sd-props:first-child > .sd-h { margin-top: 0; }
  .sd-person-main > .sd-h:first-child { margin-top: 0.25rem; }
  /* Fahrt-Karte: „Wartet auf dich“ links, die Knöpfe rechts daneben (primär rechts außen), statt zwei Zeilen übereinander. */
  .sd-ride { grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.8rem; }
  .sd-ride > * { grid-column: 1 / -1; }
  .sd-ride > .sd-todo:has(+ .sd-actions) { grid-column: 1; align-self: center; }
  .sd-ride > .sd-todo + .sd-actions { grid-column: 2; flex-wrap: nowrap; }
  .sd-ride > .sd-todo + .sd-actions > button { flex: 0 0 auto; min-width: 8.5rem; padding-left: 1rem; padding-right: 1rem; white-space: nowrap; }
  .sd-ride-detail { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 1.75rem; align-items: start; }
  .sd-ride-detail > * { grid-column: 1 / -1; }
  .sd-ride-detail > .sd-ride-facts { grid-column: 1; grid-row: 1; }
  .sd-ride-detail > .sd-people { grid-column: 2; grid-row: 1; }
  .sd-ride-detail > .sd-map-toggle { justify-self: start; }
}
/* Gruppenfahrt auf dem Desktop: die Vorschau steht rechts neben den Schritten (klebt beim Scrollen) statt unter „Mehr Optionen“ am
   Ende einer langen Spalte; der Dialog ist dafür breiter. Handy und kleine Fenster: wie bisher eine Spalte mit der Vorschau unten. */
@media (min-width: 1100px) and (min-height: 600px) {
  #modal-taxi-request.is-group-ride .modal-card { max-width: min(1040px, calc(100vw - 4rem)); }
  #modal-taxi-request.is-group-ride .modal-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem); column-gap: 2rem; align-content: start; }
  #modal-taxi-request.is-group-ride .modal-body > * { grid-column: 1; min-width: 0; }
  /* Im Grid kollabieren Außenabstände nicht mehr (Block: ein Abstand von 1,1 rem zwischen den Schritten) – der untere Rand der Abschnitte entfällt. */
  #modal-taxi-request.is-group-ride .modal-body > :is(#tr-group-riders, #tr-group-driver, #tr-group-more) { margin-bottom: 0; }
  #modal-taxi-request.is-group-ride .modal-body > :is(#tr-group-riders, #tr-group-driver, #tr-group-more) > .sg-sec { margin-bottom: 0; }
  #modal-taxi-request.is-group-ride #tr-group-quote { grid-column: 2; grid-row: 1 / span 24; align-self: start; position: sticky; top: 0; margin-top: 0; }
}

/* ======================================================================================================
   Bewegung: dieselben Bausteine, Dauern und Kurven wie die übrige App (--motion-*, --ease-*; keine eigenen Werte)
   ====================================================================================================== */
/* Aufklappkarten (<details>): wie .settings-section / .perm-history / .reliability-how (styles.css „Natives <details>“) –
   Höhe und Deckkraft des Inhalts per ::details-content, nur wo der Browser es kennt (sonst klappt es wie bisher sofort auf).
   Neu aufgebaute, schon offene Karten tragen data-no-anim (styles.css): kein erneutes Aufklappen beim Neuzeichnen. */
@supports selector(::details-content) {
  .sd-fold { interpolate-size: allow-keywords; }
  .sd-fold::details-content {
    height: 0; opacity: 0; overflow: hidden;
    transition: height var(--motion-base) var(--ease-standard), opacity var(--motion-base) var(--ease-standard), content-visibility var(--motion-base) allow-discrete;
  }
  .sd-fold[open]::details-content { height: auto; opacity: 1; }
  /* Der Innenabstand unten kommt mit dem Aufklappen, nicht als Sprung davor/danach (nicht beim Wiederherstellen eines schon offenen Zustands: data-no-anim). */
  .sd-fold:not(.sd-fold--flat) { transition: border-color var(--motion-fast) var(--ease-standard), padding-bottom var(--motion-base) var(--ease-standard); }
  .sd-fold[data-no-anim] { transition: none; }
  /* ::details-content ist weder * noch ::before/::after – die globale Reduce-Motion-Regel greift dort nicht. */
  @media (prefers-reduced-motion: reduce) {
    .sd-fold:not(.sd-fold--flat) { transition: none; }
    .sd-fold::details-content { transition: none; height: auto; opacity: 1; }
  }
}

/* ======================================================================================================
   V4 (Barrierefreiheit): Windows-Kontrastmodus (forced-colors) und Systemschrift ab 150 % / Zoom 400 %
   ====================================================================================================== */
/* Kontrastmodus: Hintergründe, Schatten und die gleitende Tönung fallen weg – was nur darüber lief, braucht Rand und Systemfarbe.
   Das gewählte Segment/der gewählte Reiter trägt eine 3-px-Linie in `Highlight` (Systemfarbe, bleibt erhalten), die anderen eine
   unsichtbare, damit nichts springt; die gleitende Tönung (::before) entfällt. */
@media (forced-colors: active) {
  .sd-tabs.has-seg-indicator::before, .sd-seg.has-seg-indicator::before, .sg-pay.has-seg-indicator::before { display: none; }
  .sd-tab, .sd-seg-opt span, .sd-seg-btn, .sg-pay-opt span { border-bottom: 3px solid transparent; }
  .sd-tab.is-active, .sd-tab[aria-selected="true"], .sd-seg-opt input:checked + span, .sd-seg-btn.is-on, .sg-pay-opt input:checked + span {
    border-bottom-color: Highlight; /* kein fetterer Schnitt: Textbreite und Segmentgröße bleiben gleich */
  }
  .sd-chk > span { border-width: 1px; }
  .sd-paid-btn::before { border-color: ButtonText; }
  .sd-paid-btn.is-on::before { border-color: Highlight; border-width: 2px; }
  /* gewählter Chip: zweite Linie INNEN (Outline), der Rahmen bleibt 1 px – die Größe ändert sich nicht */
  .sd-chk input:checked + span { border-color: Highlight; outline: 1px solid Highlight; outline-offset: -3px; }
  .sd-tab-dot { forced-color-adjust: none; background: Highlight; }
  .sd-count { border: 1px solid ButtonText; }
  .sd-ride.is-spotlight { outline: 3px solid Highlight; outline-offset: 2px; }
  .sd-ride.is-pending, .sd-prop.is-pending { border-left: 4px solid Highlight; }
}

/* Systemschrift 150–200 %: Beschriftungen, die in einer Zeile standen, brechen um statt sich zu überlagern oder Buchstabe für Buchstabe zu
   zerfallen (gemessen bei 200 % auf 390 px: Reiter „Salden/Fahrten/Einstellungen“ lagen übereinander, ein Fahrttitel stand neben dem
   Status-Etikett als „Wo|che|ne|nd“). Bei Normalschrift bleibt alles in einer Zeile (die Mindestbreite 9 rem passt neben ein Etikett). */
.sd-tabs { flex-wrap: wrap; }
.sd-tab { overflow-wrap: anywhere; hyphens: auto; }
.sd-prop-head, .sd-ride-line1, .sd-guest-head { flex-wrap: wrap; }
.sd-guest-head .sd-guest-name { flex: 1 1 9rem; }
/* N6: Status-Etikett im Kartenkopf immer rechts oben (Fahrt, Ausgleich, Verrechnung, Korrektur). Mit 9 rem Mindestbreite rutschte ein langes Etikett
   („Zu entscheiden“, „Vorschlag von Money“, heute „Vorschlag“) auf 360 px in eine eigene Zeile links unter den Titel, ein kurzes („Wartet“) blieb rechts. 6 rem passen auf
   360 px neben jedes Etikett; erst bei echtem Platzmangel (Zoom) bricht es um. */
.sd-prop-title, .sd-ride-line1 .sd-ride-title { flex: 1 1 6rem; }
.sd-pair { flex-wrap: wrap; }
.sd-pair-main { flex: 1 1 8rem; }
.sd-pair-amt { margin-left: auto; }
html.text-big .sd-meta > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
html.text-big .sd-guest { gap: 0.4rem; }
/* UI-Audit E19: Stapel-Raster ohne Spaltenvorgabe wuchsen bei 200 % auf die Breite ihres längsten Inhalts und schoben „Das steht an“, „Verrechnung möglich“
   und die Fahrtkarten über den Dialogrand (je 40–70 px). Eine Spalte `minmax(0, 1fr)` = immer so breit wie der Dialog; bei Normalschrift ändert sich nichts.
   Die langen Etiketten und Beträge dürfen dann umbrechen. */
:where(.sd-todo-sec, .sd-prop-list, .sd-prop, .sd-rides, .sd-ride, .sd-ride-detail, .sd-ride-facts, .sd-pairs, .sd-people, .sd-glist, .sd-guest-card, .sd-sheet-body, .sd-chat, .sd-chat-body, .sd-chat-compose, .sd-chat-form) { grid-template-columns: minmax(0, 1fr); }   /* :where = Spezifität 0: die Spalten der Breitbild-Regeln (.sd-pairs, .sd-ride, .sd-ride-detail …) gewinnen weiter */
html.text-big .sd-prop-head .badge { white-space: normal; max-width: 100%; }
html.text-big .sd-pair-amt { flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
html.text-big .sd-entry { flex-wrap: wrap; }
html.text-big .sd-entry-main { flex: 1 1 9rem; }
html.text-big .sd-entry-amt { max-width: 100%; margin-left: auto; }
/* Der Dialogkopf (Titel + Reiter) war bei 200 % 348 px hoch und klebte – mit dem Fuß blieb ein Viertel des Bildschirms für den Inhalt.
   Ab 150 % scrollt der Kopf mit, der Fuß mit der Hauptaktion bleibt; die Zeile „‹ Alle Salden“ klebt dann ganz oben. */
html.text-big .sd-card .modal-sticky-header { position: static; }
html.text-big .sd-card { scroll-padding-top: 0 !important; }
html.text-big .sd-subhead { top: 0; }

/* Gruppenfahrt bei 150 %+ Schrift: Kopf und Fuß (Hinweiszeile + zwei Knöpfe) nahmen zusammen mehr als den ganzen Bildschirm ein
   (200 % auf 390 × 844: Kopf 491 px + Fuß 434 px) – der Inhalt war nicht erreichbar. Dann scrollen beide mit dem Inhalt. */
html.text-big #modal-taxi-request.is-group-ride .modal-sticky-header,
html.text-big #modal-taxi-request.is-group-ride .modal-actions { position: static; }
html.text-big #modal-taxi-request.is-group-ride .history-modal-header { flex-wrap: wrap; }
html.text-big #modal-taxi-request.is-group-ride .history-modal-header > :first-child { flex: 1 1 100%; }
/* Die Karte scrollt dann als Ganzes: ein Körper mit Basis 0 schrumpfte sonst auf Höhe 0 (und wurde zum unsichtbaren Scrollbereich). */
html.text-big #modal-taxi-request.is-group-ride .modal-body { flex: 0 0 auto; overflow: visible; }
/* E27: Abbrechen und „Gruppenfahrt anfragen“ nebeneinander ließen dem Haupt-Knopf 84–116 px: der Text brach Buchstabe für Buchstabe (Knopf 325–564 px hoch). Bei großer Schrift untereinander. */
html.text-big #modal-taxi-request.is-group-ride .modal-card > .modal-actions:has(> button + button) { flex-direction: column; align-items: stretch; }
html.text-big #modal-taxi-request.is-group-ride .modal-card > .modal-actions > #tr-submit,
html.text-big #modal-taxi-request.is-group-ride .modal-card > .modal-actions > button:not(#tr-submit) { flex: 0 0 auto; width: 100%; min-width: 0; }

/* Zoom 400 % (1280 px → 320 × 256 px) und sehr niedrige Fenster: Kopf mit Reitern (182 px) und Fuß (67 px) füllten die ganze Höhe, für den Inhalt
   blieben 7 px. Unter 340 px Höhe scrollen Kopf, Inhalt und Fuß gemeinsam (WCAG 1.4.10, Umbruch ohne Verlust von Inhalt oder Funktion). */
@media (max-height: 340px) {
  .sd-card, .sd-sheet, #modal-taxi-request.is-group-ride .modal-card { scroll-padding-top: 0 !important; scroll-padding-bottom: 0 !important; }
  .sd-card .modal-sticky-header, .sd-sheet .modal-sticky-header, #modal-taxi-request.is-group-ride .modal-sticky-header,
  .sd-card > .modal-actions, .sd-sheet > .modal-actions, #modal-taxi-request.is-group-ride .modal-actions { position: static; }
  .sd-subhead { position: static; }
  .sd-card { min-height: 0; }
  #modal-taxi-request.is-group-ride .modal-body { flex: 0 0 auto; overflow: visible; }
}

/* Aufschlag des Fahrers (Schalter unter „Mehr Optionen“, nur bei Auszahlung und wenn der Fahrer etwas aufschlägt) */
.sg-markup .toggle-field { margin: 0; }
.sg-markup .sg-markup-note { margin: 0.35rem 0 0; }
.sg-markup .sg-markup-info { display: inline-flex; }
/* Zusatzkosten (E5): Parkgebühr und Maut unter „Mehr Optionen“ – zwei Felder nebeneinander, am schmalen Handy untereinander; Fehler in Worten */
.sg-extras .sg-extra-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr)); gap: 0.6rem 0.9rem; }
.sg-extras .sg-extra-row { margin: 0; }
.sg-extras .sg-extra-input { width: 100%; min-height: var(--touch-target); font-variant-numeric: tabular-nums; }
.sg-extras .error-msg { margin: 0.4rem 0 0; }
/* Runde 9: Einspruchsfrist für Konto-Mitfahrer – der Stand jedes Mitfahrers steht in Worten (nie nur als Farbe) */
.sd-consent-line { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
.sd-consent-note, .sg-objection { margin: 0; overflow-wrap: anywhere; }
.sg-objection { font-size: 0.9rem; line-height: 1.45; }
.sd-consent-state { flex: 0 1 auto; display: inline-block; max-width: 100%; text-align: center; padding: 0.2rem 0.55rem; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--text-muted) 18%, transparent); font-size: var(--text-sm); font-weight: 700; line-height: 1.3; letter-spacing: 0.02em; color: var(--text-muted); overflow-wrap: break-word; }   /* N6: Maße und Fläche wie die Chip-Basis von .badge (styles.css „Chip-Basis“: --text-sm, 0,2/0,55 rem, Zeilenhöhe 1,3) – gleiche Höhe wie das Etikett der Fahrtkarte; kein Rahmen – sah wie ein Knopf aus. Kein nowrap: als Flex-Kind (Basis = eine Zeile) bricht es nur um, wenn es allein nicht in die Zeile passt (320 px, langer Stand des Erstellers) – vorher rutschen die Aktionen weg */
.sd-consent-state.is-removed { font-style: italic; }   /* wie .badge-withdrawn (zurückgezogen, abgelaufen, ausgefallen) */
.sd-consent-state.is-agreed { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 22%, transparent); }
.sd-consent-state.is-pending { color: var(--badge-pending-text); background: color-mix(in srgb, var(--warning) 22%, transparent); }   /* „wartet“ / „steht aus“ = Farbe „wartet“ (wie .badge-pending), damit es sich von den grauen Rollen-Etiketten (.sd-tag) abhebt */
.sd-consent-state.is-objected { color: var(--badge-rejected-text); background: color-mix(in srgb, var(--danger) 22%, transparent); }
.sd-consent-reason { font-size: 0.85rem; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.sd-person.is-removed { opacity: 0.8; }
@media (forced-colors: active) { .sd-consent-state, .sd-prop-head > .badge, .sd-ride-line1 > .badge { border: 1px solid ButtonText; color: ButtonText; } .sd-consent-state.is-objected { border-width: 2px; } }   /* Kontrastmodus: die Flächen der Etiketten verschwinden – ein Rahmen hält sie als Etikett erkennbar (Kopf und Mitfahrerzeile gleich) */

/* Runde 10: Gruppenfahrten bearbeiten (Knopf in der Karte, Hinweis „Bearbeitet …“, Dialog mit „Was ändert sich?“) */
.sd-edit-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; }
.sd-edit-btn .sd-ico { display: inline-flex; }
.sd-edit-hint, .sd-propose-hint { margin: 0.1rem 0 0; }
.sd-edit-note { margin: 0; padding: 0.5rem 0.7rem; border-radius: var(--radius-xs); font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.sd-edit-lines { margin: 0.25rem 0 0.25rem 1.1rem; padding: 0; font-size: 0.9rem; line-height: 1.45; color: var(--text-muted); overflow-wrap: anywhere; }
.sg-edit-notice { margin: 0 0 0.6rem; padding: 0.55rem 0.75rem; border-radius: var(--radius-xs); font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.sg-changes { display: grid; gap: 0.4rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); }
.sg-changes .sg-sub { margin: 0; }
.sg-change-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.sg-change-list li { display: grid; gap: 0.1rem; font-size: 0.92rem; line-height: 1.4; overflow-wrap: anywhere; }
.sg-change-label { font-weight: 700; }
.sg-change-text { color: var(--text); }
.sg-before { color: var(--text-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-muted) 60%, transparent); }
.sg-after { font-weight: 600; }
.sg-arrow { color: var(--text-muted); }
.sg-change-share, .sg-notify { margin: 0; font-size: 0.9rem; line-height: 1.45; overflow-wrap: anywhere; }
@media (forced-colors: active) { .sd-edit-note, .sg-edit-notice { border-color: CanvasText; } .sg-before { text-decoration-thickness: 2px; } }
/* E35: Änderung vorschlagen – Zeile „Dein Vorschlag wartet auf …“ (Karte des Vorschlagenden), Block „Änderungsvorschlag von …“ (Detail beim Ersteller), Dialog */
.sd-proposal-own { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.2rem 0.8rem; padding: 0.3rem 0.4rem 0.3rem 0.7rem; border-radius: var(--radius-xs); font-size: 0.9rem; line-height: 1.4; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); overflow-wrap: anywhere; }
.sd-proposal-own > span { flex: 1 1 12rem; min-width: 0; }
.sd-proposal { display: grid; gap: 0.5rem; min-width: 0; padding: 0.75rem; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); overflow-wrap: anywhere; }
.sd-proposal .sg-sub, .sd-proposal .sd-proposal-when, .sd-proposal .sd-proposal-note { margin: 0; }
.sd-proposal-note { font-size: 0.92rem; line-height: 1.45; }
.sd-proposal .sd-actions { margin: 0; }
.sd-proposal .note-textarea, .sg-proposal-why .note-textarea { width: 100%; box-sizing: border-box; }
.sd-propose-btn { --gh-fg: var(--text); border-color: var(--border-input); }
.sg-proposal-quote { display: grid; gap: 0.4rem; }
.sg-proposal-quote.is-stale .sg-change-list { opacity: 0.6; }
@media (forced-colors: active) { .sd-proposal, .sd-proposal-own { border-color: CanvasText; } }
/* Gruppenfahrt-Dialog: der letzte Abschnitt („Mehr Optionen“) klebte am Fuß-Strich – unten im Scrollbereich bleibt Luft. */
#modal-taxi-request.is-group-ride .modal-body { padding-bottom: 1.5rem; }

/* ---------- E6: Treffpunkt und Kurznachrichten ---------- */
/* Treffpunkt: hervorgehobener Block vor den übrigen Angaben der Fahrt (Symbol + Wort, nie nur Farbe). */
.sd-meeting { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; padding: 0.7rem 0.85rem; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); min-width: 0; }
.sd-meeting.is-empty { background: var(--surface); border: 1px dashed var(--border-input); }
.sd-meeting-ico { flex: none; display: inline-flex; color: var(--accent); }
.sd-meeting-main { flex: 1 1 10rem; min-width: 0; display: grid; gap: 0.1rem; }
.sd-meeting-label { margin: 0; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.sd-meeting-text { margin: 0; font-size: 1.1rem; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.sd-meeting-text.is-none { font-size: 0.95rem; font-weight: 400; color: var(--text-muted); }
.sd-meeting-by { margin: 0; font-size: 0.8rem; color: var(--text-muted); overflow-wrap: anywhere; }
.sd-meeting-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-width: min-content; min-height: var(--touch-target); }
.sd-meeting-btn .sd-ico { display: inline-flex; }
/* Treffpunkt entfernen: leiser roter Text-Knopf links (wie „entfernen“ bei den Mitfahrern), nicht mehr ein Vollbreiten-Knopf neben „Speichern“ */
.sd-meeting-remove { justify-self: start; margin: 0 0 0 -0.8rem; }
/* N7: Treffpunkt mit Ort – Hinweis unter der Adresse, „Navigation“ (Link im Knopf-Design wie bei Taxi) und „Ändern“ nebeneinander, am Handy in voller Breite. */
.sd-meeting-hint { margin: 0; font-size: 0.95rem; line-height: 1.35; overflow-wrap: anywhere; }
.sd-meeting-acts { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 0.5rem; min-width: 0; }
.sd-meeting-nav { text-decoration: none; border-radius: var(--radius-btn); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media (max-width: 480px) {
  .sd-meeting-acts { flex: 1 1 100%; }
  .sd-meeting-acts > .sd-meeting-btn { flex: 1 1 8rem; }
}
html.text-big .sd-meeting-acts { flex: 1 1 100%; }
html.text-big .sd-meeting-acts > .sd-meeting-btn { flex: 1 1 100%; }
/* Beschriftung aus einem Wort („Navigation“, „Festlegen“) nie trennen (vorher „Naviga-tion“ bei 200 %): das Wort bestimmt die Mindestbreite (min-content oben,
   wie .btn-borrower-action in styles.css); Innenabstände bei großer Schrift auf den Wert bei 100 % gedeckelt wie bei den Karten. */
.sd-meeting-btn > span:not(.sr-only):not(.sd-ico) { overflow-wrap: normal; -webkit-hyphens: manual; hyphens: manual; }
html.text-big .sd-meeting { padding: min(0.7rem, 11.2px) min(0.85rem, 13.6px); }
/* Dialog: Ort (Suche, Vorschläge, „Auf der Karte wählen“), Kurzauswahl als .btn-pct-Chips, darunter der Hinweis */
.sd-meeting-form { display: grid; gap: 0.5rem; min-width: 0; }
.sd-meeting-form .form-group { margin: 0; }
.sd-meeting-place { display: grid; gap: 0.35rem; min-width: 0; }
.sd-meeting-place .sd-meeting-q { width: 100%; min-width: 0; }
.sd-meeting-place-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.sd-meeting-place-acts > .sd-meeting-map { flex: 0 1 auto; width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: var(--touch-target); }
.sd-meeting-map .sd-ico, .sd-meeting-clear .sd-ico { display: inline-flex; }
.sd-meeting-clear[hidden], .sd-meeting-chips[hidden] { display: none; }
.sd-meeting-chips { align-items: center; margin: 0; }
.sd-meeting-chips-label { flex: 1 1 100%; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.sd-meeting-chip { max-width: 100%; overflow-wrap: anywhere; text-align: left; display: inline-flex; align-items: center; gap: 0.3rem; }
.sd-meeting-chip .sd-ico { display: inline-flex; }
.sd-meeting-chip.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
html.text-big .sd-meeting-place-acts > .sd-meeting-map { flex: 1 1 100%; }
/* Pin des Treffpunkts auf der Fahrt-Karte */
.sd-meet-marker { background: none; border: 0; }
.sd-meet-pin { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 2px solid var(--on-accent); box-shadow: var(--shadow-card); }
.sd-meeting-line { margin: 0; display: flex; align-items: flex-start; gap: 0.4rem; font-size: 0.9rem; line-height: 1.4; overflow-wrap: anywhere; }
.sd-meeting-line .sd-ico { flex: none; margin-top: 0.15rem; color: var(--accent); display: inline-flex; }
/* Ungelesene Kurznachricht unter der zugeklappten Karte: Satz + Knopf „Lesen“ (44 px) */
.sd-chat-new { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.8rem; padding: 0.4rem 0.7rem; border-radius: var(--radius-xs); font-size: 0.9rem; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); overflow-wrap: anywhere; }
.sd-chat-read { min-height: var(--touch-target); padding: 0 1rem; margin: 0; }

/* Kurznachrichten: aufklappbarer Abschnitt in der Fahrt */
.sd-chat { display: grid; gap: 0.4rem; min-width: 0; border-top: 1px solid var(--border); padding-top: 0.4rem; }
.sd-chat-head { margin: 0; font-size: 1rem; }
.sd-chat-toggle { display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: var(--touch-target); padding: 0 0.2rem; background: transparent; border: 0; color: var(--text); font: inherit; font-size: var(--text-fold); font-weight: 700; text-align: left; cursor: pointer; touch-action: manipulation; flex-wrap: wrap; }
.sd-chat-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
.sd-chat-toggle .sd-ico { display: inline-flex; flex: none; color: var(--accent); }
.sd-chat-count-badge { font-weight: 600; color: var(--text-muted); }
.sd-chat-count-badge:empty { display: none; }
.sd-chat-pill { padding: 0.05rem 0.55rem; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); font-size: 0.78rem; font-weight: 700; line-height: 1.35; }
.sd-chat-chev { margin-left: auto; display: inline-flex; }
.sd-chat-body { display: grid; gap: 0.6rem; min-width: 0; }
.sd-chat-body.hidden { display: none; }
.sd-chat-hint, .sd-chat-closed { margin: 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.sd-chat-closed { color: var(--text-muted); }
.sd-chat-list { padding: 0.1rem; max-height: 18rem; overflow-y: auto; overscroll-behavior: contain; }
.sd-chat-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.sd-chat-list:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
.sd-chat-msg { display: grid; gap: 0.1rem; min-width: 0; max-width: 92%; justify-self: start; padding: 0.45rem 0.7rem; border-radius: var(--radius-xs); background: var(--surface); border: 1px solid var(--border); }
.sd-chat-msg.is-mine { justify-self: end; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.sd-chat-meta { display: flex; flex-wrap: wrap; gap: 0.1rem 0.5rem; font-size: 0.78rem; color: var(--text-muted); }
.sd-chat-who { font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.sd-chat-text { margin: 0; font-size: 0.95rem; line-height: 1.4; overflow-wrap: anywhere; }
.sd-chat-del { justify-self: end; margin-left: 0; padding: 0 0.5rem; }
.sd-chat-compose { display: grid; gap: 0.5rem; min-width: 0; }
/* Schnellantworten (E20): die Chips der übrigen App (`.quick-replies` / `.quick-reply-chip`, app.js mountQuickReplies), hier mit 44-px-Zielen,
   langer Text bricht um. Gewählt = `is-selected` (Rahmen + Farbe der App) plus ein Haken, nicht nur Farbe. */
.sd-chat-quick { margin-top: 0; }
.sd-chat-compose .quick-reply-chip,
.sd-chat-compose .quick-reply-chip-saved-wrap .quick-reply-chip-saved,
.sd-chat-compose .quick-reply-chip-manage,
.sd-chat-compose .quick-reply-chip-edit,
.sd-chat-compose .quick-reply-chip-delete,
.sd-chat-compose .quick-reply-save-btn { min-height: var(--touch-target); }
.sd-chat-compose .quick-reply-chip { max-width: 100%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.sd-chat-compose .quick-reply-chip-saved-wrap .quick-reply-chip-saved { white-space: normal; max-width: 100%; }
.sd-chat-compose .quick-reply-chip.is-selected::before { content: "✓"; content: "✓" / ""; margin-right: 0.35em; font-weight: 700; }
/* Eigene Nachricht im Rückgängig-Fenster oder unterwegs: gedimmt, statt des Löschen-Knopfs steht „wird gesendet“ bzw. „wird gelöscht“ (mit Uhr, nicht nur Dimmung). */
.sd-chat-msg.is-pending { opacity: 0.75; }
.sd-chat-pending { justify-self: end; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--text-muted); }
.sd-chat-form { display: grid; gap: 0.3rem; }
.sd-chat-label { font-size: 0.85rem; color: var(--text-muted); }
.sd-chat-row { display: flex; gap: 0.5rem; align-items: stretch; }
.sd-chat-input { flex: 1 1 auto; min-width: 0; min-height: var(--touch-target); box-sizing: border-box; background: var(--surface2); border: 1px solid var(--border-input); border-radius: var(--radius-xs); color: var(--text); padding: 0.65rem 0.9rem; font: inherit; font-size: 1rem; outline: none; -webkit-appearance: none; appearance: none; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.sd-chat-input:focus { border-color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.sd-chat-input:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sd-chat-send { flex: none; width: auto; min-height: var(--touch-target); margin: 0; padding: 0 1rem; }
.sd-chat-count { justify-self: end; font-size: 0.78rem; color: var(--text-muted); }
.sd-chat-count.is-near { color: var(--danger-text); font-weight: 700; }
.sd-chat-err { margin: 0; }
.sd-chat-err:empty { display: none; }
html.text-big .sd-chat-row { flex-wrap: wrap; }
html.text-big .sd-chat-input { flex-basis: 100%; }
html.text-big .sd-chat-msg { max-width: 100%; }
html.text-big .sd-meeting-btn { width: 100%; padding-inline: min(0.75rem, 12px); }
/* Treffpunkt-Knopf („Festlegen“, „Navigation“): das nie getrennte Wort plus Symbol plus Abstand war bei 320 px und 200 % ~17 px breiter als die Karte; das Symbol ist reine Zierde und entfällt dort. */
html.text-big .sd-meeting-btn > .sd-ico { display: none; }
@media (forced-colors: active) { .sd-meeting, .sd-chat-msg, .sd-chat-new { border-color: CanvasText; } .sd-chat-msg.is-mine { border-width: 2px; } .sd-chat-pill { border-color: ButtonText; color: ButtonText; } }

/* Belege (Fotos) zu Parkgebühr und Maut (E17): in der Fahrtkarte eine Zeile je Posten mit Vorschaubild und „Beleg ansehen“, im Sheet „Parkgebühr / Maut“
   ein leiser, freiwilliger „Beleg anhängen (optional)“-Knopf unter dem Betrag. Alle Ziele 44 px, Text bricht um, nur Tokens. */
.sd-receipts { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.sd-receipt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; min-height: var(--touch-target); font-size: 0.9rem; color: var(--text-muted); }
.sd-receipt-what { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; }
.sd-receipt-link { display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--touch-target); max-width: 100%; padding: 0; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--accent); font: inherit; font-weight: 600; text-align: left; cursor: pointer; touch-action: manipulation; }
.sd-receipt-link:disabled { color: var(--text-muted); cursor: default; }
.sd-receipt-link:focus-visible, .sd-receipt-add:focus-visible, .sd-receipt-rm:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sd-receipt-link .sd-receipt-text { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.sd-receipt-link:disabled .sd-receipt-text { text-decoration: none; }
.sd-receipt-thumb { flex: none; display: block; width: var(--touch-target); height: var(--touch-target); object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius-xs); background: var(--surface2); }
.sd-receipt-box { display: grid; gap: 0.25rem; margin-top: 0.35rem; }
.sd-receipt-cur { display: flex; align-items: center; gap: 0.6rem; min-height: var(--touch-target); font-size: 0.9rem; color: var(--text-muted); }
.sd-receipt-cur[hidden], .sd-receipt-rm[hidden] { display: none; }
.sd-receipt-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; margin-left: -0.8rem; }
.sd-receipt-rm { color: var(--text-muted); }
/* Das Bild-Widget zeigt die neue Auswahl als Kachel; das Entfernen übernimmt der 44-px-Knopf darunter (das runde ✕ der Kachel ist dafür zu klein) */
.sd-receipt-new .mi-thumb-remove { display: none; }
.sd-receipt-new { margin: 0.25rem 0 0; }
.sd-receipt-new.is-empty { margin: 0; }
html.text-big .sd-receipt-actions { flex-direction: column; align-items: flex-start; }
@media (forced-colors: active) { .sd-receipt-thumb { border-color: CanvasText; } .sd-receipt-link { color: LinkText; } }
/* Wiederholen (E16): leise unter „Mehr Optionen“ – Rhythmus als Chips (mit Haken, nie nur Farbe), darunter Anzahl oder Enddatum und ein Satz, der die Termine nennt */
.sg-repeat .sg-repeat-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sg-repeat .sg-repeat-chip { flex: 0 1 auto; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: center; }
.sg-repeat .sg-repeat-chip.active::before { content: "✓"; content: "✓" / ""; margin-right: 0.35em; font-weight: 700; }
.sg-repeat .sg-repeat-opts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.7rem; margin-top: 0.7rem; min-width: 0; }
.sg-repeat .sg-repeat-opts > * { min-width: 0; }
.sg-repeat .sg-repeat-opts.hidden, .sg-repeat .sg-repeat-row.hidden { display: none; }
.sg-repeat .sg-repeat-row { margin: 0; }
.sg-repeat .sg-repeat-input { width: 100%; max-width: min(100%, 14rem); min-height: var(--touch-target); font-variant-numeric: tabular-nums; }
.sg-repeat .sg-repeat-note { margin: 0; overflow-wrap: anywhere; }
.sg-repeat .sg-repeat-note:empty, .sg-repeat .error-msg:empty { display: none; }
.sg-repeat .error-msg { margin: 0; }
/* Wiederkehrende Fahrten in den Einstellungen (nur sichtbar, wenn es welche gibt): Text links, Knöpfe darunter bzw. rechts; die Termine zugeklappt */
.sd-recs { margin-bottom: 0.4rem; }
.sd-rec { flex-wrap: wrap; align-items: flex-start; }
.sd-rec .sd-tpl-main { padding-right: 0.85rem; }
.sd-rec.is-paused .sd-rec-state { color: var(--text); }
.sd-rec-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 0.85rem 0.7rem; width: 100%; }
.sd-rec-btn { min-height: var(--touch-target); }
.sd-rec-terms { margin-top: 0.3rem; font-size: 0.9rem; }
.sd-rec-times { list-style: none; margin: 0 0 0.3rem; padding: 0; display: grid; gap: 0.1rem; }
.sd-rec-time { overflow-wrap: anywhere; color: var(--text-muted); }
.sd-rec-time .sd-link { margin-left: 0.4rem; font-size: 0.82rem; }
@media (min-width: 640px) {
  .sd-rec { flex-wrap: nowrap; align-items: center; }
  .sd-rec-actions { width: auto; flex: none; padding: 0.55rem 0.85rem 0.55rem 0; }
}
/* E24: große Schrift (html.text-big), Fortsetzung – Zeilen mit festem Betrag/Etikett umbrechen, Beschriftungen nur zwischen Wörtern (Silbentrennung statt anywhere). */
html.text-big .sd-subhead { flex-wrap: wrap; row-gap: 0; }
html.text-big .sd-subhead .sd-back { max-width: 100%; white-space: normal; text-align: left; }
html.text-big .sd-subhead-title { display: none; }   /* der Name steht darunter im Fluss; der eingeblendete Doppelgänger neben „‹ Alle Salden“ entfällt */
html.text-big .sd-glines li { flex-wrap: wrap; }
html.text-big .sd-gline-main { flex: 1 1 auto; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
html.text-big .sd-gline-amt { flex-wrap: wrap; max-width: 100%; }
html.text-big .sd-ride-title, html.text-big .sd-ride-line1 .sd-ride-title, html.text-big .sd-person-title, html.text-big .sd-consent-state { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
html.text-big .sd-actions > button, html.text-big .sd-link, html.text-big .sd-sec-btn, html.text-big .sd-paid-btn { white-space: normal; max-width: 100%; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
html.text-big .sd-actions > button { flex: 1 1 100%; }
html.text-big .sd-rec { flex-wrap: wrap; }
/* Umschalter (z. B. „3 Tage | 7 Tage | 14 Tage | 30 Tage | Datum“): umbrechen, Beschriftung bleibt je Option ganz („Tag|e“ vorher). */
/* Innenabstände der Karten auf den Wert bei 100 % gedeckelt (in rem verdoppeln sie sich bei 200 % und lassen bei 320 px nur 172 von 320 px für den Inhalt). */
html.text-big .sd-prop { padding: min(0.8rem, 12.8px) min(0.9rem, 14.4px); }
html.text-big .sd-ride { padding-inline: min(0.8rem, 12.8px); }
html.text-big .sd-fold { padding-inline: min(0.85rem, 13.6px); }
html.text-big .sd-guest-card { padding-inline: min(0.8rem, 12.8px); }
html.text-big .sd-fold > summary { margin-inline: calc(-1 * min(0.85rem, 13.6px)); padding-inline: min(0.85rem, 13.6px); }   /* die Ränder (−0,85 rem) müssen zum gedeckelten Innenabstand der Karte passen, sonst ragte die Kopfzeile 13 px heraus */
html.text-big .sd-fold--flat > summary { margin-inline: -6.4px; padding-inline: 6.4px; }
/* Aufklapper mit Überschrift und Zusammenfassung („So setzt sich der Preis zusammen“ / „Gesamt …“): der Pfeil nahm eine eigene Spalte neben der Überschrift (140 px), „zusammen“ (165 px) brach mitten im Wort.
   Bei großer Schrift steht die Überschrift über die ganze Breite, der Pfeil sitzt neben der Zusammenfassung darunter. */
html.text-big .sd-fold > summary:has(> :is(.sd-gbox-sum, .sg-more-sub)) > span:first-child { grid-column: 1 / -1; }
html.text-big .sd-fold > summary:has(> :is(.sd-gbox-sum, .sg-more-sub))::after { grid-column: 2; grid-row: 2; }
html.text-big .sd-person-actions, html.text-big .sd-info-row { flex-wrap: wrap; }
html.text-big .sd-guest-add-row { flex-wrap: wrap; }
html.text-big .sd-guest-add-row input { flex: 1 1 8rem; }
html.text-big .sd-guest-add-row .btn-secondary { flex: 1 1 auto; }
html.text-big .sd-seg, html.text-big .sg-pay { flex-wrap: wrap; }
html.text-big .sd-seg-opt { flex: 1 1 auto; min-width: 0; }
html.text-big .sd-seg-opt span { white-space: normal; overflow-wrap: break-word; padding: 0.2rem 0.6rem; }

/* Teilstrecken N1 (Eingabe im Gruppenfahrt-Dialog): Strich „Rückfahrt“ in der Stopp-Liste, ruhige Häkchen am Halt
   („Auch auf der Rückfahrt“, „Adresse für … merken“) und am Kurzweg, gemerkte Adresse am Namen, „Reihenfolge prüfen“. Einstellungen › „Abholadressen“. */
#tr-stops .taxi-stop-sep { display: flex; align-items: center; gap: 0.6rem; margin: 0.35rem 0 0.1rem; color: var(--text-muted); font-size: 0.85rem; font-weight: 700; }
#tr-stops .taxi-stop-sep::before, #tr-stops .taxi-stop-sep::after { content: ''; flex: 1 1 auto; height: 0; border-top: 1px solid var(--border); }
#tr-stops .taxi-stop-sep span { flex: none; }
/* N8: Ablagezone unter dem Strich, nur während ein Zwischenstopp gezogen wird und die Rückfahrt noch leer ist (statisch, ohne Bewegung). */
#tr-stops .taxi-stop-dropzone { display: flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0.5rem 0.75rem; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-muted); font-size: 0.85rem; text-align: center; overflow-wrap: anywhere; }
.sg-stop-for-opts { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.sg-stop-for-opts.hidden { display: none; }
.sg-check { display: inline-flex; align-items: center; gap: 0.45rem; min-height: var(--touch-target); margin: 0; font-size: 0.9rem; font-weight: 500; line-height: 1.35; color: var(--text); cursor: pointer; overflow-wrap: anywhere; min-width: 0; }
.sg-check-input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--accent); }
.sg-pickup-back.hidden { display: none; }
.sg-pickup-at { color: var(--text-muted); font-weight: 500; }
.sg-order-slot { margin: 0 0 0.75rem; }
.sg-order-slot:empty, .sg-order-slot.hidden { display: none; }
.sg-order { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.sg-order-btn { flex: none; }
.sg-order-note { margin: 0; flex: 1 1 14rem; overflow-wrap: break-word; }
.sg-order-seq { margin: 0; flex: 1 1 100%; overflow-wrap: anywhere; }
.sg-order-apply { flex: none; }
.sd-place-edit { flex: 1 1 100%; display: grid; gap: 0.35rem; min-width: 0; padding: 0 0.85rem 0.75rem; }
.sd-place-edit .form-group { margin: 0; }
.sd-place-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.sd-place-hit { width: 100%; min-height: var(--touch-target); padding: 0.4rem 0.6rem; text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-xs); cursor: pointer; overflow-wrap: anywhere; font: inherit; }
html:not(.using-touch) .sd-place-hit:hover { border-color: var(--accent); }
.sd-place-status { margin: 0; }
.sd-place-status:empty { display: none; }
.sd-place-edit-actions { display: flex; justify-content: flex-end; }
.sd-place.is-editing { flex-wrap: wrap; }

/* Teilstrecken / Umweg (Rückmeldung #23). Dialog: „Halt für …“ an jedem Zwischenstopp, Kurzweg „Abholen bei …“ unter den Mitfahrern (.btn-pct wie die Stammgruppen),
   Vorschau mit dem Umweg je Person. Detail: die Strecke als Zeitleiste wie beim Taxi (.taxi-detail-stops aus styles.css), am Halt der Umweg, „Preis je Person“. */
.sg-stop-for { display: grid; gap: 0.2rem; }
.sg-stop-for-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; }
.sg-stop-for-row label { flex: none; margin: 0; }
.form-group.sg-stop-for-row select { flex: 1 1 11rem; width: auto; min-width: 0; max-width: 100%; }
.sg-stop-for.is-set .sg-stop-for-row select { border-color: color-mix(in srgb, var(--map-start) 60%, var(--border-input)); }
.sg-stop-for-note { margin: 0; overflow-wrap: break-word; }
/* #24: „Auch für“ – weitere Personen an einem Halt teilen sich den Umweg (Kästchen wie die Häkchen am Halt) */
.sg-stop-also { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1rem; }
.sg-stop-also.hidden { display: none; }
.sg-also-label { flex: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 700; }
.sg-pickups { display: grid; gap: 0.4rem; margin: 0 0 0.75rem; }
.sg-pickups.hidden { display: none; }
.sg-pickup-btns { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sg-pickup-btn { display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%; text-align: left; overflow-wrap: anywhere; white-space: normal; }
.sg-detour { display: grid; gap: 0.1rem; padding: 0.55rem 0.75rem; border-radius: var(--radius-xs); background: color-mix(in srgb, var(--map-start) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--map-start) 35%, transparent); }
.sg-detour .sd-info-row { margin: 0; }
.sg-detour-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.sg-detour-list li { font-size: 0.9rem; line-height: 1.45; overflow-wrap: break-word; }
.sg-detour-calc { font-variant-numeric: tabular-nums; }
.sd-route { display: grid; gap: 0.35rem; min-width: 0; }
.sd-route .sg-sub, .sd-route .sd-info-row { margin: 0; }
.sd-stops .taxi-detail-stop { cursor: default; }
html:not(.using-touch) .sd-stops .taxi-detail-stop:hover, .sd-stops .taxi-detail-stop:active { background: none; }
.sd-stops .taxi-detail-addr { white-space: normal; overflow-wrap: anywhere; }
.sd-stops .taxi-detail-stop.is-detour .taxi-detail-num { background: var(--map-start); }
/* Kopfzeile eines Halts (N2): Name/Rolle · was der Halt kostet · geschätzte Uhrzeit rechts; bricht am Handy um, die Uhrzeit bleibt rechts. */
.sd-stop-top { align-items: baseline; gap: 0.6rem; }
.sd-stop-what { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.45rem; flex: 1 1 auto; min-width: 0; }
.sd-stop-detour { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.sd-stop-eta { flex: none; font-size: var(--text-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Hinfahrt | Rückfahrt: Überschrift mit Trennstrich; die Rückfahrt beginnt unter einer Linie über die ganze Breite. */
.sd-stops-wrap { display: grid; gap: 0.15rem; min-width: 0; }
.sd-leg-head { display: flex; align-items: center; gap: 0.5rem; margin: 0; font-size: var(--label-size); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--text-muted); }
.sd-leg-head::after { content: ""; flex: 1 1 auto; border-top: 1px solid var(--border); }
.sd-leg-head.is-return { margin-top: 0.35rem; }
/* Preis (N2): der eigene Betrag, darunter die Rechnung zum Aufklappen. */
.sd-price { display: grid; gap: 0.35rem; min-width: 0; }
.sd-price .sd-fold--flat { margin-top: 0.15rem; }
.sd-calc { display: grid; gap: 0.6rem; min-width: 0; container-type: inline-size; font-size: 0.9rem; }
.sd-calc table { width: 100%; border-collapse: collapse; }
.sd-calc th, .sd-calc td { padding: 0.3rem 0; vertical-align: baseline; text-align: left; font-weight: 400; }
.sd-calc td { padding-left: 0.75rem; text-align: right; }
.sd-calc-label { display: block; color: var(--text); }
.sd-calc-sub { display: block; color: var(--text-muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.sd-calc-table tr + tr > * { border-top: 1px solid var(--border); }
.sd-calc-table tr.is-sum > * { font-weight: 700; border-top-color: var(--text-muted); }
.sd-calc-table tr.is-sum .sd-calc-label { font-weight: 700; }
.sd-calc-people thead th { padding-top: 0; font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.sd-calc-people thead th:not(:first-child) { padding-left: 0.6rem; text-align: right; }
.sd-calc-people td { padding-left: 0.6rem; }
.sd-calc-people tbody > tr > *, .sd-calc-people tfoot > tr > * { border-top: 1px solid var(--border); }
.sd-calc-people tbody th { overflow-wrap: anywhere; }
.sd-calc-people tbody th .sd-tag { margin-left: 0.35rem; }
.sd-calc-people tr.is-me th { font-weight: 700; }
.sd-calc-people td:not(.is-total) { color: var(--text-muted); font-weight: 400; }
.sd-calc-people tfoot > tr > * { font-weight: 700; border-top-color: var(--text-muted); }
/* Schmal (Handy mit großer Schrift): je Person eine Zeile Name · Summe, darunter „Gemeinsam … · Umweg …“ statt vier Spalten. */
@container (max-width: 17rem) {
  .sd-calc-people.has-detour thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sd-calc-people.has-detour tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.75rem; border-top: 1px solid var(--border); padding: 0.3rem 0; }
  .sd-calc-people.has-detour tr > * { border-top: 0; padding: 0; }
  .sd-calc-people.has-detour tbody tr:first-child { border-top: 0; }
  .sd-calc-people.has-detour tfoot tr { border-top-color: var(--text-muted); }
  .sd-calc-people.has-detour th { grid-column: 1; grid-row: 1; }
  .sd-calc-people.has-detour td.is-total { grid-column: 2; grid-row: 1; }
  .sd-calc-people.has-detour td[data-label] { grid-column: 1 / -1; padding: 0; text-align: left; font-size: var(--text-sm); }
  .sd-calc-people.has-detour td[data-label]::before { content: attr(data-label) " "; }
  .sd-calc-people.has-detour tr.no-detour td[data-label] { display: none; }   /* ohne Umweg ist „Gemeinsam“ = Summe: nichts doppelt */
}
.sd-route-legend { margin: 0.4rem 0 0; }

/* „Wie wird das gerechnet?“ unter der Preisrechnung (öffnet die Hilfe) */
.sd-price-help { margin-top: 0.6rem; }

/* ---------- Große Karte mit Stopp-Liste (#modal-saldo-map, saldo.js „Große Karte“) ----------
   Ein normales Fenster wie die übrigen (.modal-card-wide): Handy = Blatt mit Griff und dem üblichen Abstand oben (wie Protokoll und Benachrichtigungen), Desktop =
   breite Karte. Handy hochkant: Karte oben, Stopps darunter; ab 900 px Breite und Handy quer: Karte links, Stopps rechts. Die Stopps sind die Zeitleiste der
   Taxi-Funktion (.taxi-detail-stops aus styles.css: Nummer auf der Schiene, Name, Uhrzeit, Adresse); die ganze Zeile ist antippbar. */
#modal-saldo-map .modal-card.sd-bigmap-card { max-width: min(72rem, 100%); height: var(--modal-max-h); max-height: var(--modal-max-h); display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 540px) {
  #modal-saldo-map .modal-card.sd-bigmap-card {
    height: calc(100dvh - max(3.75rem, calc(env(safe-area-inset-top, 0px) + 2.75rem)) - 0.5rem - var(--modal-kb-inset));
    max-height: calc(100dvh - max(3.75rem, calc(env(safe-area-inset-top, 0px) + 2.75rem)) - 0.5rem - var(--modal-kb-inset));
  }
}
.sd-bigmap {
  flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(11rem, 42%) minmax(0, 1fr);
  gap: 0.6rem; padding: 0.25rem 0 max(env(safe-area-inset-bottom, 0px), 0.9rem); overflow: hidden;
}
.sd-bigmap-map { min-height: 0; min-width: 0; flex: none; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); position: relative; z-index: 0; contain: paint; isolation: isolate; }
.sd-bigmap-side { min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.sd-bigmap-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; }
.sd-bigmap-scroll .sd-route-legend { margin: 0; }
.sd-bigmap-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 0.45rem; align-content: start; scroll-padding-block: 0.35rem; }
.sd-bigmap-list { margin: 0; padding: 0; }
.sd-bigmap-list > .sd-bigmap-row { grid-template-columns: 2rem minmax(0, 1fr); }
.sd-bigmap-list > .sd-bigmap-row.has-nav { grid-template-columns: 2rem minmax(0, 1fr) var(--touch-target); }   /* die Schiene streckt sich über die ganze Zeile (durchgehende Linie) */
.sd-bigmap-row.is-none { cursor: default; }
.sd-bigmap-row.is-none .taxi-detail-stop-btn, .sd-bigmap-row.is-none .taxi-detail-addr { color: var(--text-muted); }
.sd-bigmap-stop { display: block; width: 100%; text-align: left; overflow-wrap: anywhere; }
.sd-bigmap-stop:disabled { cursor: default; }
.sd-bigmap-noaddr { color: var(--text-muted); font-style: italic; }
.sd-bigmap-msg { margin: 0; font-size: 0.85rem; }
.sd-bigmap-msg:empty { display: none; }
.sd-bigmap .leaflet-marker-icon.is-active > * { transform: scale(1.3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent); }
.sd-bigmap-open, .sg-bigmap-btn, .sd-bigmap-fit { --gh-fg: var(--text); border-color: var(--border-input); justify-self: start; }   /* Knopf mit Kontur wie „Karte anzeigen“ (.sd-map-toggle) */
.sd-bigmap-open { margin-top: 0.4rem; }
.sg-bigmap-btn { margin-top: -0.25rem; margin-bottom: 0.5rem; }
@media (min-width: 900px), (orientation: landscape) and (max-height: 500px) {
  .sd-bigmap { grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem); grid-template-rows: minmax(0, 1fr); column-gap: 0.75rem; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #modal-saldo-map .history-modal-header { padding-bottom: 0.4rem; }
  #modal-saldo-map .modal-kicker { display: none; }
}
/* Sehr große Schrift (html.text-big) oder sehr wenig Höhe: Karte kleiner und das ganze Blatt scrollt – nie eine leere Liste */
html.text-big .sd-bigmap { overflow-y: auto; grid-template-rows: minmax(10rem, 40dvh) auto; }
html.text-big .sd-bigmap-side, html.text-big .sd-bigmap-scroll { overflow: visible; min-height: auto; }
@media (min-width: 900px) { html.text-big .sd-bigmap { grid-template-rows: auto; } }
@media (orientation: landscape) and (max-height: 500px) { html.text-big .sd-bigmap { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(10rem, 70dvh) auto; } }   /* quer + sehr große Schrift: übereinander statt eine 4 px breite Karte */
.sd-bigmap-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; min-width: 0; }
.sd-bigmap-actions .sd-ghost { padding: 0 0.5rem; gap: 0.25rem; font-size: 0.85rem; flex: 1 1 auto; justify-content: center; white-space: nowrap; }   /* drei Knöpfe in einer Zeile ab 360 px, gleichmäßig verteilt */
.sd-bigmap-nav {
  display: grid; place-items: center; align-self: start; width: var(--touch-target); min-height: var(--touch-target); margin-top: -0.2rem; text-decoration: none; color: var(--accent-text);
  border-radius: var(--radius-xs); touch-action: manipulation;
}
html:not(.using-touch) .sd-bigmap-nav:hover { background: var(--cmp-tint-3); }
.sd-bigmap-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sd-bigmap-same { color: var(--text-muted); font-size: var(--text-xs); }
.sd-bigmap-leg { color: var(--text-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
/* „Wo bin ich?“: Punkt in der Akzentfarbe mit Genauigkeitskreis */
.sd-me-dot { display: block; width: 18px; height: 18px; margin: 2px; border-radius: 50%; background: var(--accent); border: 3px solid var(--text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); box-sizing: border-box; }
.sd-me-ring { fill: var(--accent); fill-opacity: 0.12; stroke: var(--accent); stroke-opacity: 0.5; }

/* ---------- Live-Standort (public/saldo.js „Live-Standort“): Block in der großen Karte, Markierungen, Hinweis in der Fahrt ---------- */
.sd-live { display: grid; gap: 0.6rem; padding: 0.6rem 0.75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xs); }
.sd-live-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; min-height: var(--touch-target); cursor: pointer; list-style: none; }
.sd-live-head::-webkit-details-marker { display: none; }
.sd-live-count { color: var(--text-muted); font-size: var(--text-sm); }
.sd-live-count:empty { display: none; }
.sd-live-head::after { content: ''; flex: none; width: 0.5rem; height: 0.5rem; margin-left: auto; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg); transition: transform var(--motion-fast) var(--ease-standard); }
.sd-live[open] > .sd-live-head::after { transform: rotate(-135deg); }
.sd-live:not([open]) { padding-bottom: 0.2rem; }
.sd-live-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.sd-live-people[hidden] { display: none; }
.sd-live-person {
  display: flex; align-items: center; gap: 0.6rem; width: 100%; min-height: var(--touch-target); padding: 0.3rem 0.4rem; box-sizing: border-box;
  text-align: left; font: inherit; color: var(--text); cursor: pointer; touch-action: manipulation;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-xs);
}
html:not(.using-touch) .sd-live-person:hover:not(.is-none) { border-color: var(--accent); }
.sd-live-person:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sd-live-person.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.sd-live-person.is-none { cursor: default; }   /* die globale Regel button:disabled dämpft sonst auf rund 3:1 – gedämpft wird über Farbe und Avatar */
.sd-live-ava, .sd-live-pin {
  display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; font-weight: 800;
  background: var(--accent-btn); color: var(--on-accent);
}
.sd-live-ava { width: 1.9rem; height: 1.9rem; font-size: 0.85rem; }
.sd-live-person.is-none .sd-live-ava { background: color-mix(in srgb, var(--text-muted) 40%, transparent); color: var(--text); }
.sd-live-person.is-none .sd-live-name { color: var(--text-muted); }   /* kein opacity: der Status steht in der Zeile und muss lesbar bleiben */
.sd-live-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.sd-live-age { flex: none; color: var(--text-muted); font-size: var(--text-sm); text-align: right; }
.sd-live-empty { color: var(--text-muted); font-size: 0.85rem; padding: 0.2rem 0.4rem; }
.sd-live-switch[hidden] { display: none; }
.sd-live-switch { justify-self: start; --gh-fg: var(--text); border-color: var(--border-input); }
.sd-live-switch[aria-checked="false"] { --gh-fg: var(--text-muted); }
.sd-live-note, .sd-live-hint { margin: 0; color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; }
.sd-live-hint { margin-top: 0.3rem; }
.sd-live-pin { width: 32px; height: 32px; font-size: 0.95rem; border: 3px solid var(--text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent); box-sizing: border-box; }
.sd-live-marker { background: transparent; border: 0; }
.sd-danger-btn { --gh-fg: var(--danger-text); --gh-hover-fg: var(--danger-text); }   /* „Fahrt ist ausgefallen“: nicht umkehrbar, als Gefahr erkennbar */

/* Saldo-Dialog im Querformat (wenig Höhe): Kopf und Fuß kompakt – es blieben nur ~44 % der Höhe für den Inhalt (Prüfbericht Oberfläche). Tippflächen bleiben 44 px. */
@media (orientation: landscape) and (max-height: 500px) {
  #modal-saldo .modal-kicker { display: none; }
  #modal-saldo .modal-drag-handle { display: none; }
  #modal-saldo .modal-sticky-header { padding-top: 0.5rem; }
  #modal-saldo .history-modal-header { padding-bottom: 0.3rem; }
  #modal-saldo .modal-card > .modal-actions { padding-top: 0.4rem; padding-bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px)); }
}

/* Live-Standort einer Taxifahrt: Hinweis in den Details der Fahrt und der Block unter der Vollbild-Karte (gleiche Bausteine wie .sd-live). */
.taxi-live-hint { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; padding: 0.5rem 0.65rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; }
.taxi-live-hint > span { flex: 1 1 14rem; min-width: 0; }
.taxi-live-open { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: var(--touch-target); text-align: center; }
.taxi-modal-live:empty { display: none; }
.taxi-modal-live .sd-live-people { max-height: 30dvh; overflow-y: auto; overscroll-behavior: contain; }

/* Einmalige Frage, bevor das Gerät den Standort zum ersten Mal abfragt (nicht aus heiterem Himmel der System-Dialog). */
.sd-live-ask { position: fixed; left: max(0.75rem, env(safe-area-inset-left, 0px)); right: max(0.75rem, env(safe-area-inset-right, 0px)); bottom: max(0.75rem, env(safe-area-inset-bottom, 0px)); z-index: var(--z-confirm); max-width: 28rem; margin-inline: auto; display: grid; gap: 0.6rem; padding: 0.85rem 1rem; background: var(--surface2); border: 1px solid var(--border-input); border-radius: var(--radius); box-shadow: var(--shadow); }
.sd-live-ask p { margin: 0; line-height: 1.4; }
.sd-live-ask-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 0.5rem; align-items: stretch; }   /* alle Reihen gleich hoch: auch einspaltig (große Schrift) sind beide Knöpfe gleich groß */
.sd-live-ask-actions > button { margin: 0; /* .btn-primary hat global margin-top 8px: der Knopf saß tiefer und wirkte kleiner */ min-height: var(--touch-target); min-width: 0; padding-inline: 0.5rem; text-align: center; white-space: normal; line-height: 1.2; }   /* beide Knöpfe immer gleich breit und gleich hoch, auch wenn einer umbricht */
html.text-big .sd-live-ask-actions { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 340px) { .sd-live-ask-actions { grid-template-columns: minmax(0, 1fr); } }

/* Große Schrift (html.text-big): nichts läuft über den Rand, nichts bricht mitten im Wort (Prüfbericht Prozess). */
html.text-big .sd-live-person { flex-wrap: wrap; }
html.text-big .sd-live-name { flex: 1 1 8rem; overflow-wrap: break-word; }
html.text-big .sd-live-age { flex: 1 0 100%; text-align: left; }
html.text-big .sd-live-switch { white-space: normal; text-align: left; }
html.text-big .sd-live-head { flex-wrap: wrap; }
html.text-big .sg-stop-for-row select { flex: 1 1 100%; }
html.text-big .sg-stop-for-row, html.text-big .sg-stop-also, html.text-big .sg-stop-for-note, html.text-big .sg-stop-for-opts { min-width: 0; max-width: 100%; }
@media (orientation: landscape) and (max-height: 500px) { html.text-big .sd-bigmap { grid-template-rows: minmax(10rem, 45dvh) auto; } }   /* quer + sehr große Schrift: die Karte lässt Platz zum Weiterscrollen */
/* Preis-Rechnung bei 200 %: Bezeichnung über dem Betrag (statt „Fahrtkosten“ mitten im Wort zu brechen) */
html.text-big .sd-calc-table tr { display: block; }
html.text-big .sd-calc-table th, html.text-big .sd-calc-table td { display: block; padding-left: 0; text-align: left; }
html.text-big .sd-calc-table td { padding-top: 0; }

/* Live-Block: Inhalt in eigenem Behälter (der gap des <details> wirkt sonst nur zwischen Kopfzeile und Inhalt) */
.sd-live-body { display: grid; gap: 0.6rem; min-width: 0; }
.taxi-live-open { white-space: normal; min-width: 0; flex: 1 1 auto; }
html.text-big .taxi-live-open { flex: 1 1 100%; }
/* Karte der Fahrt (Vollbild) bei großer Schrift: der Rumpf wird dort nur so hoch wie sein Inhalt – ohne Mindesthöhe schrumpfte die Karte auf 2 px */
html.text-big .taxi-modal-map { min-height: 45dvh; }
@media (orientation: landscape) and (max-height: 500px) { html.text-big .taxi-modal-map { min-height: 35dvh; } }

/* Einstellungen › Live-Standort: Schalter und „Dieses Gerät“ (erlaubt · Knopf · blockiert) */
.sd-live-setting { display: grid; gap: 0.5rem; margin-top: 0.6rem; }
.sd-live-device { display: grid; gap: 0.5rem; justify-items: start; }
.sd-live-device[hidden] { display: none; }
.sd-live-device-text { display: flex; align-items: flex-start; gap: 0.4rem; margin: 0; color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; }
.sd-live-device-text svg { flex: none; margin-top: 0.15rem; color: var(--accent-text); }
.sd-live-device-text.is-warn { color: var(--text); }
.sd-live-allow { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; min-height: var(--touch-target); text-align: center; white-space: normal; }
@media (max-width: 540px) { .sd-live-allow { width: 100%; } }

.sd-live-hint-btn { display: flex; align-items: center; gap: 0.3rem; min-height: var(--touch-target); margin-top: 0.4rem; }   /* eigener Block unter dem Satz, nicht mitten im Fließtext */

.sd-live-ask { max-height: 80dvh; overflow-y: auto; overscroll-behavior: contain; }   /* bei großer Schrift nie bildschirmfüllend: scrollt in sich */
