/* ==================================================================
   Komponenten – Seitenrahmen, Kopfzeile, Reiter, Buttons,
   Aktionsleiste, leere Zustände
   ================================================================== */

/* ---------- Karten auf hellem Grund (0.99.27) ----------
   Helle Darstellungen brauchen Struktur: weiße Karten auf grauem Grund mit
   Rand und einem sehr leichten Schatten (Recherche Waldemar/Claude
   22.11.2026: Linear, Stripe, Vercel). Im Dunklen ist der Schatten „none“.
   Steht ganz oben, damit eigene Schatten einzelner Bausteine gewinnen. */
.form-card,
.person-tile,
.room-tile,
.vehicle-tile,
.empty-state,
.overview-status,
.overview-stat,
.linked-list__item,
.table-wrap,
.today-item {
  box-shadow: var(--karten-schatten);
}

/* Wasserzeichen der Darstellung „Siegel“: das Kundenlogo sehr blass unten rechts */
.wasserzeichen {
  position: fixed;
  right: -40px;
  bottom: -30px;
  z-index: 0;
  width: min(560px, 60vw);
  height: 300px;
  background: no-repeat center / contain;
  opacity: 0.05;
  pointer-events: none;
}

.wasserzeichen ~ .app-main,
.wasserzeichen ~ main {
  position: relative;
  z-index: 1;
}

/* ---------- Seitenrahmen ---------- */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
}

.page {
  padding: var(--space-6);
}

/* ---------- Kopfzeile ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: var(--header-height);
  padding: 0 var(--space-6);
  background: var(--color-surface);
  border-bottom: var(--border-width) solid var(--color-border);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  min-width: 0;
}

.header__logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 36px;
  max-width: 200px;
  object-fit: contain;
}

/* Helles Logo auf heller Darstellung: dunkler Kasten wie auf Ausdrucken */
.header__logo--kasten {
  box-sizing: content-box;
  padding: var(--space-1) var(--space-2);
  background: var(--logo-kasten);
  border-radius: var(--radius-sm);
}

.header__monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
}

.header__company {
  max-width: 220px;
  overflow: hidden;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.header__nav {
  flex: 1;
  align-self: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.header__nav::-webkit-scrollbar {
  display: none;
}

.header__tools {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.header__clock {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

/* ---------- Reiter ---------- */

.tabs {
  display: flex;
  gap: var(--space-1);
  height: 100%;
}

.tab {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
  padding: 0 var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.tab:hover {
  color: var(--color-text);
}

.tab--active {
  color: var(--color-text);
  border-bottom-color: var(--accent);
}

.tab:focus-visible {
  outline-offset: -2px;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 34px;
  padding: 0 var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  white-space: nowrap;
  background: transparent;
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.button:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.button--primary {
  color: var(--accent-contrast);
  background: var(--accent);
  border-color: var(--accent);
}

.button--primary:hover {
  color: var(--accent-contrast);
  background: color-mix(in srgb, var(--accent) 85%, var(--aufhellen));
  border-color: color-mix(in srgb, var(--accent) 85%, var(--aufhellen));
}

.button--status {
  color: var(--color-text);
}

/* ---------- Statuspunkt und Avatar ---------- */

.status-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--dot-color, var(--status-absent));
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.avatar--sm {
  width: 30px;
  height: 30px;
}

/* ---------- Aktionsleiste ---------- */

.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) 0;
}

.action-bar__title {
  font-size: var(--font-size-2xl);
}

.action-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Zusammengehörige Knöpfe, die nur gemeinsam umbrechen (Räume, E36) */
.view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---------- Leerer Zustand ---------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 480px;
  margin: var(--space-12) auto;
  padding: var(--space-8) var(--space-6);
  text-align: center;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}

.empty-state__icon {
  display: inline-flex;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-state__title {
  font-size: var(--font-size-lg);
}

.empty-state__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.empty-state__actions {
  justify-content: center;
}

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 1000px) {
  .header__company {
    display: none;
  }
}

@media (max-width: 700px) {
  .header {
    gap: var(--space-3);
    padding: 0 var(--space-3);
  }

  .header__clock,
  .button--status .button__label {
    display: none;
  }

  .action-bar,
  .page {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* ---------- Avatar in Akzentfarbe ---------- */

.avatar--accent {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--color-text);
}

/* ---------- Kontomenü ---------- */

.account-menu {
  position: relative;
}

.account-menu__trigger {
  display: flex;
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius-full);
}

.account-menu__trigger::-webkit-details-marker {
  display: none;
}

/* Platz für die Ziffer, die rechts neben den Initialen hängt (E11): Die
   Initialen stehen am Rand der Kopfzeile, am Handy bleiben dort 16 px –
   zu wenig für „12“, und die Zahl liefe aus dem Fenster. 12 px reichen bis
   „99+“, mehr zeigt die Kopfzeile nicht an. */
.account-menu__trigger:has(.header__badge) {
  position: relative;
  margin-right: var(--space-3);
}

.account-menu__panel {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 20;
  min-width: 240px;
  padding: var(--space-2);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgb(var(--schatten) / calc(0.35 * var(--schatten-staerke)));
}

.account-menu__header {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3) var(--space-3);
  margin-bottom: var(--space-2);
  border-bottom: var(--border-width) solid var(--color-border);
}

.account-menu__name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.account-menu__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.account-menu__badge {
  justify-self: start;
  margin-top: var(--space-1);
  padding: 2px var(--space-2);
  font-size: var(--font-size-xs);
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  border: var(--border-width) solid var(--accent-border);
}

.account-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.account-menu__item:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

/* ---------- Formularfelder ---------- */

.form {
  display: grid;
  gap: var(--space-4);
}

.field {
  display: grid;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.field__input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-3);
  font: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  background: var(--color-bg);
  /* Eigene Variable: Auf Kreide braucht der Rand eines Eingabefelds 3:1
     (WCAG 1.4.11) – der allgemeine kräftige Rand hätte alles schwer gemacht */
  border: var(--border-width) solid var(--color-input-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast) var(--ease-out);
}

.field__input:hover {
  border-color: var(--color-text-faint);
}

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.button--block {
  justify-content: center;
  width: 100%;
  height: 40px;
}

/* ---------- Hinweise ---------- */

.alert {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  border: var(--border-width) solid;
}

.alert--error {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--color-danger) 40%, transparent);
}

/* Kein Fehler, sondern eine Folge, die man vor dem Klick kennen muss:
   etwa dass fremde Buchungen abgesagt werden. Voller roter Rahmen statt
   des blassen – überlesen soll das niemand. */
.alert--consequence {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-danger) 8%, transparent);
  border: 2px solid var(--color-danger);
}

/* ---------- Anmeldeseite ---------- */

.auth__main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-6);
}

.auth__card {
  width: 100%;
  max-width: 380px;
  display: grid;
  gap: var(--space-6);
  padding: var(--space-8);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}

.auth__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.auth__logo {
  display: block;
  height: 32px;
  width: auto;
}

.auth__company {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.auth__heading {
  display: grid;
  gap: var(--space-1);
}

.auth__title {
  font-size: var(--font-size-2xl);
}

.auth__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.auth__footer {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

/* Erklärender Satz und Rückweg auf den Seiten des Passwort-Ablaufs.
   Die auth__card ist ein Raster mit eigenem Abstand – deshalb hier kein
   margin, sonst stünden die Abstände doppelt. */
/* Erklaerender Fliesstext: linksbuendig wie die Felder darunter. Zentriert
   wird er ueber mehrere Zeilen auf beiden Seiten ausgefranst und liest sich
   schlechter. */
.auth__hint {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Der Rueckweg dagegen ist eine einzelne Zeile und steht mittig unter dem
   Knopf, so wie man es dort erwartet. */
.auth__back {
  margin: 0;
  font-size: var(--font-size-sm);
  text-align: center;
}

.auth__link {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth__link:hover {
  color: var(--accent);
}

/* ---------- Fehlerseiten ---------- */

.empty-state__icon--muted {
  background: var(--color-surface-raised);
  color: var(--color-text-muted);
}

/* ---------- Erfolgsmeldung und Feldhinweise ---------- */

.alert--success {
  color: var(--color-text);
  background: color-mix(in srgb, var(--status-present) 12%, transparent);
  border-color: color-mix(in srgb, var(--status-present) 40%, transparent);
}

/* Hinweis, der weder Erfolg noch Fehler ist: etwas fehlt, aber nichts
   ist schiefgegangen – etwa Teilnehmer ohne E-Mail-Adresse. */
.alert--warning {
  color: var(--color-text);
  background: color-mix(in srgb, var(--status-busy) 12%, transparent);
  border-color: color-mix(in srgb, var(--status-busy) 40%, transparent);
}

/* Warnung, die man nicht übersehen soll (0.95.4, Waldemar: "fast voll" bei
   Meine Bescheinigungen) – kräftiger oranger Rahmen statt des getönten. */
.alert--warning-strong {
  border-width: 2px;
  border-color: var(--color-warning-strong);
  background: color-mix(in srgb, var(--color-warning-strong) 14%, transparent);
}

.field__hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Meldung am Feld statt oben über der Seite (components/feldfehler.html, 0.99.28) */
.field__error {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-danger-text);
}

.field__input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

/* ---------- Geräte ---------- */

.alert--info {
  color: var(--color-text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
}

.option-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pairing-code {
  padding: var(--space-4) var(--space-6);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.12em;
  background: var(--color-bg);
  border: var(--border-width) dashed var(--accent-border);
  border-radius: var(--radius-md);
}

.pairing-input {
  height: 56px;
  font-size: var(--font-size-2xl);
  letter-spacing: 0.2em;
  text-align: center;
}

/* ---------- Monitor-Platzhalter ---------- */

.monitor-placeholder {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  text-align: center;
}

.monitor-placeholder__mark {
  width: 48px;
  height: 48px;
  font-size: var(--font-size-md);
}

.monitor-placeholder__clock {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: var(--font-weight-medium);
  letter-spacing: var(--letter-spacing-tight);
  line-height: 1;
}

.monitor-placeholder__title {
  font-size: var(--font-size-2xl);
}

.monitor-placeholder__text {
  color: var(--color-text-secondary);
}

.monitor-placeholder__hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-faint);
}

/* ---------- Symbol-Button (Kopfzeile) ---------- */

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--color-text-muted);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-sm);
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.icon-button:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

/* Entfernen je Zeile (Teilnehmerliste, 0.99.29): rot erst beim Zeigen –
   zwanzig rote × untereinander machten die Liste zur Warnung */
.icon-button--danger:hover,
.icon-button--danger:focus-visible {
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
}

.icon-button--active {
  color: var(--color-text);
  background: var(--color-surface-raised);
  border-color: var(--color-border-strong);
}

/* ---------- Unternavigation ---------- */

.subnav {
  display: flex;
  /* Umbrechen statt über den Rand: Die Verwaltung hat neun Reiter, auf dem
     Tablet (768 px) schoben sie die Seite auf 968 px (Darstellungsprüfung,
     07.11.2026). Am Handy brach die Leiste schon immer um. */
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  border-bottom: var(--border-width) solid var(--color-border);
}

.subnav__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: calc(var(--border-width) * -1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
}

.subnav__item:hover {
  color: var(--color-text);
}

.subnav__item--active {
  color: var(--color-text);
  border-bottom-color: var(--accent);
}

.page-alert {
  margin-bottom: var(--space-4);
}

/* ---------- Werkzeugleiste und Suche ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.toolbar__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 480px;
  height: 40px;
  padding: 0 var(--space-3);
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}

.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  background: transparent;
  border: 0;
  outline: none;
}

/* ---------- Tabellen ---------- */

/* Wenn unter der Tabelle noch eine Kachel folgt (Gruppenseite der Anforderungen, 0.98.1) */
.table-wrap--spaced {
  margin-bottom: var(--space-6);
}

.table-wrap {
  overflow-x: auto;
  /* Sonst gehört Text für Bildschirmleser (.sr-only) nicht zum Scrollbereich
     und macht die ganze Seite breiter (Darstellungsprüfung, 07.11.2026) */
  position: relative;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.data-table th {
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
  background: var(--tabellenkopf);
  border-bottom: var(--border-width) solid var(--color-border);
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  vertical-align: middle;
  border-bottom: var(--border-width) solid var(--color-border);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--color-surface-hover) 50%, transparent);
}

.data-table__person {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.data-table__muted {
  color: var(--color-text-secondary);
}

.data-table__actions {
  text-align: right;
  white-space: nowrap;
}

/* Ein Löschformular neben Links in derselben Zelle (0.95.3, Meine Bescheinigungen) */
.data-table__actions form {
  display: inline-block;
}

/* ---------- Kennzeichen ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  white-space: nowrap;
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-full);
}

.badge--success {
  color: var(--color-text);
  background: color-mix(in srgb, var(--status-present) 12%, transparent);
  border-color: color-mix(in srgb, var(--status-present) 40%, transparent);
}

.badge--warning {
  color: var(--color-text);
  background: color-mix(in srgb, var(--status-busy) 12%, transparent);
  border-color: color-mix(in srgb, var(--status-busy) 40%, transparent);
}

/* Vorrangbuchung – fremde Buchungen mussten weichen */
.badge--danger {
  color: var(--color-on-danger);
  background: var(--color-danger-strong);
}

.badge--muted {
  color: var(--color-text-faint);
  background: var(--color-surface-raised);
}

/* ---------- Button-Varianten ---------- */

.button--small {
  height: 28px;
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
}

.button--danger {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--color-danger) 50%, transparent);
}

.button--danger:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-danger) 24%, transparent);
}

/* ---------- Formularkarten ---------- */

/* Ein Zahlenfeld für Tage oder Stunden braucht keine halbe Bildschirmbreite –
   ein überlanges Feld verspricht eine lange Eingabe. */
.field__input--narrow {
  max-width: 10rem;
}

/* Vergangene Veranstaltungen: zugeklappt, weil sie die Liste sonst mit der
   Zeit überwuchern – aber erreichbar, weil man für eine nachträgliche
   Bescheinigung genau dorthin muss. */
.past-events {
  padding: var(--space-4) var(--space-6);
}

.past-events__summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.past-events[open] .past-events__summary {
  margin-bottom: var(--space-4);
}

/* Meine Veranstaltungen: zwei Abschnitte untereinander */
.my-events__section {
  display: grid;
  gap: var(--space-3);
}

.my-events__section + .my-events__section {
  margin-top: var(--space-8, 32px);
}

.form-card {
  display: grid;
  gap: var(--space-6);
  max-width: 880px;
  margin-bottom: var(--space-6);
  padding: var(--space-6);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}

.form-section {
  display: grid;
  gap: var(--space-4);
}

.form-section + .form-section {
  padding-top: var(--space-6);
  border-top: var(--border-width) solid var(--color-border);
}

.form-section__title {
  font-size: var(--font-size-md);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

/* Datum, Von, Bis gehören in eine Zeile.

   Mit dem allgemeinen Raster (240 Pixel je Feld) brach "Bis" allein in die
   nächste Zeile um, sobald das Formular schmaler als 770 Pixel war. Drei
   Werte, die man in einem Zug eingibt, standen dadurch in zwei Zeilen, und
   die zweite war zu zwei Dritteln leer. Feste Anteile statt Mindestbreiten:
   Das Datum braucht mehr Platz als eine Uhrzeit, deshalb 1,3 zu 1 zu 1. */
.form-grid--when {
  grid-template-columns: 1.3fr 1fr 1fr;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-6);
  border-top: var(--border-width) solid var(--color-border);
}

/* Lange Formulare (Darstellung mit elf Karten): „Speichern“ auch am Rechner
   unten im Fenster – vorher stand er rund zwei Bildschirme tiefer
   (UX-Prüfer, 0.99.24). Am Handy klebt jede .form-actions ohnehin. */
@media (min-width: 701px) {
  .form-actions--klebend {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 calc(var(--space-6) * -1) calc(var(--space-6) * -1);
    padding: var(--space-4) var(--space-6) var(--space-6);
    background: var(--color-surface);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
  }
}

.form-actions--center {
  justify-content: center;
  padding-top: 0;
  border-top: 0;
}

.danger-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.danger-row + .danger-row {
  padding-top: var(--space-6);
  border-top: var(--border-width) solid var(--color-border);
}

.danger-row__text {
  display: grid;
  gap: var(--space-1);
  max-width: 540px;
}

/* ---------- Auswahlfelder (Vorlagen) ---------- */

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.choice {
  position: relative;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice span {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.choice:hover span {
  color: var(--color-text);
}

.choice input:checked + span {
  color: var(--color-text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Checkboxen und Rechte-Matrix ---------- */

.checkbox {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Gesperrt, aber angehakt (abgeschlossene Veranstaltung, „War da“): volle
   Deckkraft, sonst war angehakt auf Weiß kaum von leer zu unterscheiden
   (UX-Prüfer, 0.99.25) */
.checkbox:disabled:checked {
  opacity: 1;
}

.permission-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.permission-matrix th,
.permission-matrix td {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-width) solid var(--color-border);
}

.permission-matrix thead th {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-regular);
  text-align: center;
  color: var(--color-text-muted);
}

.permission-matrix thead th:first-child,
.permission-matrix tbody th {
  text-align: left;
}

.permission-matrix tbody th {
  font-weight: var(--font-weight-regular);
}

.permission-matrix td {
  text-align: center;
}

.permission-matrix tbody tr:last-child > * {
  border-bottom: 0;
}

/* Eigene Bezeichnung eines Moduls unter dem Häkchen, etwa "Nutzen" bei
   Veranstaltungen: Die Spalte heißt "Ansehen", das Recht dort mehr */
.permission-matrix__own {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.permission-matrix__module {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

.permission-matrix__none {
  color: var(--color-text-faint);
}

/* Ein Schalter, kein Kasten.

   Vier dieser Zeilen standen untereinander im Buchungsformular und nahmen
   zusammen rund 400 Pixel ein – mehr als alle Pflichtfelder zusammen, für
   Angaben, die meistens leer bleiben. Mit gefülltem Hintergrund sahen sie
   obendrein aus wie eigene Karten und zogen den Blick von Titel, Datum und
   Uhrzeit weg.

   Ohne Füllung und mit knapperem Innenabstand bleibt die Umrandung als
   Trefferfläche erhalten, das Gewicht liegt aber wieder bei den Feldern,
   die ausgefüllt werden müssen. */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.check-row:hover {
  background: var(--color-surface-raised);
}

/* Angehakt tritt die Zeile hervor – dann gehört sie zu den Angaben, die
   gleich mitgeschickt werden, und nicht mehr zu den Angeboten. */
.check-row:has(.checkbox:checked) {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.check-row .checkbox {
  margin-top: 2px;
  /* Bei langem Text drückte Flex das Kästchen schmaler (Click Pilot, 0.99.9) */
  flex-shrink: 0;
}

.check-row__label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.check-row__hint {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ---------- Einmalpasswort ---------- */

.secret-card {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  max-width: 520px;
  margin: var(--space-8) auto;
  padding: var(--space-8) var(--space-6);
  text-align: center;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}

.secret-card__title {
  font-size: var(--font-size-xl);
}

.secret-card__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.secret-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: var(--border-width) dashed var(--accent-border);
  border-radius: var(--radius-md);
}

.secret-box__value {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--font-size-xl);
  letter-spacing: 0.02em;
}

.secret-card__details {
  display: grid;
  grid-template-columns: auto auto;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  font-size: var(--font-size-sm);
  text-align: left;
}

.secret-card__details dt {
  color: var(--color-text-muted);
}

.secret-card__details dd {
  margin: 0;
}

.empty-state__icon--danger {
  background: color-mix(in srgb, var(--color-danger) 14%, transparent);
  color: var(--color-danger-text);
}


/* ---------- Listenverwaltung (Abteilungen, Standorte) ---------- */

.page-intro {
  max-width: 720px;
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.inline-form {
  display: flex;
  /* Suchfeld, Häkchen und Knopf brechen am Handy um (Gäste-Adressbuch,
     Darstellungsprüfung 07.11.2026) */
  flex-wrap: wrap;
  gap: var(--space-2);
  max-width: 560px;
  margin-bottom: var(--space-6);
}

.inline-form .field__input {
  flex: 1;
}

/* Das Suchfeld nimmt den Platz, bricht aber nicht unter eine lesbare Breite */
.inline-form > .search {
  flex: 1 1 14rem;
}

/* Nur ein Halter zum Austauschen – die Schaltfläche darin soll im
   Flex-Layout der Kopfzeile liegen, als wäre nichts dazwischen. */
.header__status {
  display: contents;
}

.order-buttons {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

/* Die Spalte heißt "Reihenfolge" und zeigte nur zwei Pfeile – welche Stelle
   ein Eintrag hat, stand nirgends. Die Zahl beantwortet genau das. */
.order-buttons__position {
  min-width: 1.6em;
  margin-right: var(--space-1);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
}

/* Symbol-Buttons als echte <button>-Elemente */
button.icon-button {
  background: transparent;
  cursor: pointer;
}

.icon-button--small {
  width: 28px;
  height: 28px;
  border-color: var(--color-border);
}

/* Ein Knopf, den es gibt, der aber gerade nichts tun kann – sichtbar,
   damit man ihn findet, und mit Tooltip, warum er nicht geht. */
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-button:disabled {
  opacity: 0.3;
  cursor: default;
  background: transparent;
}

.data-table__actions .button + .button {
  margin-left: var(--space-2);
}


/* ---------- Auswahllisten und mehrzeilige Felder ---------- */

select.field__input {
  appearance: none;
  padding-right: 2.25rem;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a94a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
}

textarea.field__input {
  height: auto;
  min-height: 72px;
  padding: var(--space-2) var(--space-3);
  line-height: var(--line-height-normal);
  resize: vertical;
}

.toolbar__group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}


/* ---------- Sortierbare Tabellen ---------- */

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

.sort-button:hover {
  color: var(--color-text);
}

/* Pfeil zeigt die Sortierung: ↕ = nicht sortiert, ↑ = aufsteigend, ↓ = absteigend */
.sort-button::after {
  content: "↕";
  font-size: 0.95em;
  opacity: 0.35;
}

th[aria-sort="ascending"],
th[aria-sort="descending"] {
  color: var(--color-text);
}

th[aria-sort="ascending"] .sort-button::after {
  content: "↑";
  opacity: 1;
}

th[aria-sort="descending"] .sort-button::after {
  content: "↓";
  opacity: 1;
}


/* ---------- Zugang im Mitarbeiterformular ---------- */

.linked-account {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.linked-account__name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.account-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.account-option {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.account-option .field {
  width: 100%;
}

.account-option__title {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}


/* ---------- Fotos ---------- */

.avatar--photo {
  display: block;
  padding: 0;
  object-fit: cover;
}

.avatar--lg {
  width: 96px;
  height: 96px;
  font-size: var(--font-size-xl);
}

.photo-editor {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-6);
}

.photo-editor__controls {
  display: grid;
  flex: 1;
  gap: var(--space-4);
  min-width: 280px;
}

.photo-editor__form {
  display: grid;
  justify-items: start;
  gap: var(--space-4);
}

.photo-editor__form .field,
.photo-editor__form .check-row {
  width: 100%;
}

.file-input {
  max-width: 100%;
  font: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Der "Datei auswählen"-Knopf im Stil unserer Buttons */
.file-input::file-selector-button {
  margin-right: var(--space-3);
  height: 34px;
  padding: 0 var(--space-3);
  font: inherit;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.file-input::file-selector-button:hover {
  background: var(--color-surface-hover);
}


/* ---------- Zuschnitt-Werkzeug ---------- */

.crop-area {
  display: grid;
  gap: var(--space-3);
  width: 100%;
  max-width: 360px;
}

.crop-frame {
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: var(--color-bg);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
}

/* Cropper.js verlangt, dass das Bild höchstens so breit ist wie sein Rahmen */
.crop-frame img {
  display: block;
  max-width: 100%;
}

/* Runder Ausschnitt – so, wie das Foto später im Statusring erscheint */
.crop-frame .cropper-view-box,
.crop-frame .cropper-face {
  border-radius: 50%;
}

.crop-frame .cropper-view-box {
  outline: 2px solid var(--accent);
  outline-color: var(--accent);
}

/* Bereich außerhalb des Kreises abdunkeln */
.crop-frame .cropper-modal {
  background-color: var(--bild-grund);
  opacity: 0.6;
}

.crop-zoom {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
}

.crop-zoom input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
  cursor: pointer;
}


/* ---------- Umschalter (Segmente) ---------- */

.segmented {
  display: inline-flex;
  padding: var(--space-1);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}

.segmented__item {
  display: inline-flex;
  align-items: center;
  /* Außen so hoch wie ein .button (34 px) – in der Aktionsleiste standen
     38 px hohe Umschalter neben 34 px hohen Knöpfen (UX-Prüfer, 0.99.22) */
  height: calc(34px - 2 * var(--space-1) - 2 * var(--border-width));
  padding: 0 var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  /* Innen um den Abstand kleiner als außen, dann laufen die Ecken parallel */
  border-radius: calc(var(--radius-sm) - var(--space-1));
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.segmented__item:hover {
  color: var(--color-text);
}

.segmented__item--active {
  color: var(--color-text);
  background: var(--accent-soft);
}

/* ---------- Board ---------- */

.board-summary {
  margin-bottom: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.board-summary__value {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.board-group + .board-group {
  margin-top: var(--space-8);
}

.board-group__header {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: var(--border-width) solid var(--color-border);
}

.board-group__title {
  font-size: var(--font-size-md);
}

.board-group__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.person-grid {
  display: grid;
}

/* ---------- Kachel mit Statusring ---------- */

.person-tile {
  --ring-size: 108px;

  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4) var(--space-2);
  text-align: center;
  border-radius: var(--radius-md);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.person-tile:hover {
  background: var(--color-surface);
}

.person-tile__visual {
  position: relative;
  width: var(--ring-size);
  height: var(--ring-size);
  flex-shrink: 0;
}

.status-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Die Farbe blendet bei einem Statuswechsel weich über */
.status-ring circle {
  stroke: var(--ring-color);
  transition: stroke var(--duration-slow) var(--ease-out);
}

/* Avatar innerhalb des Rings – Maße als Anteile der Ringgröße (Kreis 88, Avatar 64) */
.person-tile__avatar {
  position: absolute;
  top: 13.64%;
  left: 13.64%;
  width: 72.73%;
  height: 72.73%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface-raised);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    filter var(--duration-slow) var(--ease-out);
}

.person-tile__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--ring-size) * 0.22);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

/* Symbol in der Lücke des Rings, unten rechts */
.person-tile__badge {
  position: absolute;
  top: 69.3%;
  left: 69.3%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25%;
  height: 25%;
  border-radius: 50%;
  /* Die Plakette gehört zu ihrem Symbol: Kalender gelb, Tasse braun, sonst
     die Anwesenheit. Ohne --badge-color (andere Vorlagen) wie der Ring. */
  color: var(--badge-color, var(--ring-color));
  background: var(--color-bg);
  border: 1.5px solid var(--badge-color, var(--ring-color));
  transition:
    color var(--duration-slow) var(--ease-out),
    border-color var(--duration-slow) var(--ease-out);
}

.person-tile__badge .icon {
  width: 60%;
  height: 60%;
}

.person-tile__name {
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0;
}

.person-tile__position {
  margin-top: 2px;
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.person-tile__lead {
  display: inline-block;
  margin-left: var(--space-1);
  padding: 0 6px;
  /* 9–10 px war nicht zu lesen (UX-Prüfer, 0.99.28) */
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-full);
}

.person-tile__status {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}

/* ---------- Dieselbe Kachel, am Schreibtisch quer ----------

   Auf der Wandtafel ist der Ring der Hauptdarsteller: Man steht vier Meter
   entfernt und sucht eine Farbe. Am Schreibtisch sucht man einen Namen, und
   dann ist ein Rund von 108 Pixeln vor allem im Weg.

   Hochkant brauchten dreißig Personen 2403 Pixel Höhe, also zweieinhalb
   Bildschirme. Schuld war nicht ihre Zahl, sondern dass jede Kachel
   unterschiedlich hoch wurde: "Unterwegs · Baustelle Köln-Mülheim" läuft
   auf zwei Zeilen, "Anwesend" auf eine, und die Reihe richtet sich nach der
   höchsten. Quer liegt jede Zeile fest – Ring links, drei Textzeilen rechts,
   jede auf eine Zeile gedeckelt. Gemessen: 1578 statt 2403 Pixel.

   Die Statusfarbe liegt zusätzlich als Streifen am linken Rand. Damit sieht
   eine Personenkarte aus wie eine Raumkarte; vorher hatte dasselbe Produkt
   zwei Bildsprachen für dieselbe Sache.

   Gilt nur im Board. Die Monitoransicht nutzt dieselbe Kachel in
   .monitor-grid und bleibt hochkant – dort stimmt die alte Gewichtung. */
/* --tile-scale kommt aus dem Profil (Kachelgröße je Zugang). zoom statt
   einzelner Maße: Ring, Schrift und Abstände wachsen gemeinsam, und die
   Spaltenbreite wächst mit, damit eine große Kachel nicht abgeschnitten
   wird, sondern weniger Kacheln in eine Reihe passen. */
.person-grid {
  grid-template-columns: repeat(auto-fill, minmax(calc(300px * var(--tile-scale, 1)), 1fr));
  gap: var(--space-2);
}

.person-grid .person-tile {
  --ring-size: 46px;

  zoom: var(--tile-scale, 1);

  display: grid;
  grid-template-columns: var(--ring-size) minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  column-gap: var(--space-3);
  padding: 11px var(--space-4);
  text-align: left;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  /* Der Streifen trägt die Statusfarbe. Er ersetzt den Rahmen links, statt
     zu ihm hinzuzukommen – sonst verspringt der Inhalt um drei Pixel. */
  /* Der Streifen trägt die Erreichbarkeit, der Ring die Anwesenheit. */
  border-left: 3px solid var(--stripe-color, var(--ring-color));
  border-radius: var(--radius-md);
}

.person-grid .person-tile:hover {
  background: var(--color-surface-raised);
}

.person-grid .person-tile__visual {
  grid-column: 1;
  grid-row: 1 / -1;
}

.person-grid .person-tile__name {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.person-grid .person-tile__position {
  grid-column: 2;
  grid-row: 2;
  margin-top: 1px;
}

.person-grid .person-tile__status {
  grid-column: 2;
  grid-row: 3;
  margin-top: 2px;
}

.person-grid .person-tile__contact {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
}

/* Jede Textzeile bleibt eine Zeile. Ohne das kippt die ganze Rechnung:
   Eine umbrechende Zeile macht die Karte höher, und weil alle Karten einer
   Reihe gleich hoch sind, kostet eine lange Ortsangabe dreimal Platz. */
.person-grid .person-tile__name,
.person-grid .person-tile__position,
.person-grid .person-tile__status,
.person-grid .person-tile__contact {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.person-grid .person-tile__lead {
  padding: 0 5px;
  vertical-align: 1px;
}

/* Abwesende treten zurück – Anwesende springen ins Auge */
.person-tile--absent .person-tile__avatar {
  opacity: 0.45;
  filter: grayscale(1);
}

/* Der Ring bleibt voll (E16, Waldemar 24.11.2026). Mit halber Deckkraft
   kam das Grau von „Abwesend“ nur auf 1,9 bis 2,4 : 1 gegen die Kachel –
   unter den 3 : 1, die jede Statusfarbe braucht. Zurück tritt die Kachel
   über das graue Foto, den gedämpften Streifen und den blasseren Text;
   der Ring selbst ist schon grau und damit ruhig genug. */

/* Auch der Streifen tritt zurück. Sonst zieht ausgerechnet die Karte von
   jemandem im Urlaub den kräftigsten Farbbalken der Reihe. */
.person-grid .person-tile--absent {
  border-left-color: color-mix(in srgb, var(--stripe-color, var(--ring-color)) 45%, transparent);
}

.person-tile--absent .person-tile__name {
  color: var(--color-text-secondary);
}

.person-tile--absent .person-tile__status {
  color: var(--color-text-faint);
}


/* ---------- Grundregel: hidden versteckt immer ---------- */
/* Ohne diese Regel würde z. B. display: flex einer Kachel das hidden-Attribut aushebeln */

[hidden] {
  display: none !important;
}

/* ---------- Board: Filterleiste ---------- */

.board-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.board-filters__search {
  flex: 1;
  min-width: 240px;
}

.board-filters__selects {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.board-filters__select {
  width: auto;
  min-width: 180px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 30px;
  padding: 0 var(--space-3);
  font: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: transparent;
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-knopf);
  cursor: pointer;
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.chip:hover {
  color: var(--color-text);
}

.chip--active {
  color: var(--color-text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.chip__count {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.chip--active .chip__count {
  color: var(--color-text-secondary);
}

/* Umschalter mit Symbol */
.segmented__item .icon {
  margin-right: var(--space-1);
}

/* ---------- Board: Tabelle ---------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.data-table__link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-border-strong);
  text-underline-offset: 3px;
}

.data-table__link:hover {
  color: var(--color-text);
  text-decoration-color: currentColor;
}
/* ---------- Detailkarte ---------- */

[data-person-id] {
  cursor: pointer;
}

.data-table tr[data-person-id]:focus-visible {
  outline-offset: -2px;
}

.person-card {
  position: fixed;
  z-index: 30;
  display: grid;
  gap: var(--space-4);
  width: 320px;
  max-width: calc(100vw - 16px);
  padding: var(--space-4);
  font-size: var(--font-size-sm);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgb(var(--schatten) / calc(0.4 * var(--schatten-staerke)));
}

.person-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.person-card__avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-surface-raised), 0 0 0 4px var(--ring-color);
}

.person-card__avatar--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.person-card__name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

.person-card__meta,
.person-card__hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.person-card__status {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-sm);
}

.person-card__status .status-dot {
  margin-top: 6px;
}

.person-card__status-line {
  font-weight: var(--font-weight-medium);
}

.person-card__facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-1) var(--space-4);
  margin: 0;
}

.person-card__facts dt {
  color: var(--color-text-muted);
}

.person-card__facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.person-card a:not(.button) {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-border-strong);
  text-underline-offset: 3px;
}

.person-card a:not(.button):hover {
  text-decoration-color: currentColor;
}

.person-card__info {
  padding-left: var(--space-3);
  color: var(--color-text-secondary);
  border-left: 2px solid var(--color-border-strong);
}

.person-card__label {
  margin-bottom: var(--space-1);
  font-size: var(--font-size-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.person-card__deputy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.person-card__deputy-name {
  font-weight: var(--font-weight-medium);
}

.person-card__actions {
  display: flex;
  /* Umbrechen statt über den Rand: Drei Knöpfe passten nicht in die schmale
     Fahrzeugkarte, "Buchen" ragte hinaus und zog den Statuskasten mit. */
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
  padding-top: var(--space-3);
  border-top: var(--border-width) solid var(--color-border);
}


/* ---------- Status-Dialog ---------- */

.status-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: var(--color-text);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgb(var(--schatten) / calc(0.5 * var(--schatten-staerke)));
}

.status-dialog::backdrop {
  background: rgb(var(--schatten) / calc(0.6 * var(--schatten-staerke)));
}

/* 680 statt 560 Pixel.

   Bei 560 blieben nach dem Innenabstand 512 übrig, und das Raster für
   Datum/Von/Bis setzt 240 Pixel je Feld an – zwei passten nebeneinander,
   das dritte rutschte allein in die nächste Zeile. Drei zusammengehörige
   Werte in zwei Zeilen, ungleich verteilt. Mit 680 stehen sie nebeneinander,
   und die Erklärsätze unter den Kontrollkästchen brauchen statt zwei nur
   noch eine Zeile – das allein spart rund siebzig Pixel.

   Breiter sollte es nicht werden: Ein Formular, dessen Felder über die
   halbe Bildschirmbreite laufen, liest sich schlechter, nicht besser. */
.status-page {
  max-width: 680px;
}

/* Die Überschrift des Formulars steht als Seitentitel schon darüber –
   wortgleich. Im Dialogfenster ist sie nötig, auf der eigenen Seite ist sie
   ein zweites Mal dasselbe. Die Zeile darunter (Raum, Ort, Plätze) bleibt;
   sie trägt die Angaben, die der Seitentitel nicht hat. */
.status-page .status-form__title {
  display: none;
}

.status-form {
  display: grid;
  gap: var(--space-5, 20px);
  padding: var(--space-6);
}

.status-page .status-form {
  padding: 0;
}

.status-form__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.status-form__title {
  font-size: var(--font-size-xl);
}

.status-page [data-dialog-close] {
  display: none;
}

.status-form__group {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

/* Vier große Auswahlknöpfe für den Aufenthalt */
.status-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-2);
}

.status-option {
  position: relative;
  cursor: pointer;
}

.status-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.status-option__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  transition:
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.status-option__box .icon {
  color: var(--option-color);
}

.status-option:hover .status-option__box {
  color: var(--color-text);
}

.status-option input:checked + .status-option__box {
  color: var(--color-text);
  background: color-mix(in srgb, var(--option-color) 14%, transparent);
  border-color: var(--option-color);
}

.status-option input:focus-visible + .status-option__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Dauer */
.duration-options {
  display: grid;
  gap: var(--space-2);
}

.duration-option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.duration-option input[type="radio"] {
  margin: 0;
  accent-color: var(--accent);
}

.duration-option__input {
  width: auto;
  height: 34px;
}

.duration-option__input:disabled {
  opacity: 0.4;
}

.status-form__reset-hint {
  margin: 0;
}

.status-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--color-border);
}

/* Offline-Hinweis aus form-submit.js: in der Knopfleiste, eigene Zeile
   ganz oben – die Leiste ist eine Flexreihe, am Handy umgekehrt gestapelt */
.form-offline {
  flex: 1 1 100%;
  order: -1;
  margin: 0;
}

.status-form__actions,
.form-actions {
  flex-wrap: wrap;
}

/* Auch am Rechner bleibt „Buchen“ unten im Dialog stehen. Bei 1440×900
   lag der Knopf mit Einladen und Vorbereitung unter dem Fensterrand, und
   man musste im Dialog suchen (UX-Prüfer, 21.11.2026). Die negativen
   Ränder legen die Leiste über den Innenabstand des Formulars, damit beim
   Scrollen nichts darunter hervorschaut. Am Handy gilt die Regel weiter
   unten mit ihrem eigenen Abstand. */
.status-dialog .status-form__actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 0 calc(var(--space-6) * -1) calc(var(--space-6) * -1);
  padding: var(--space-4) var(--space-6) var(--space-6);
  background: var(--color-surface-raised);
}

/* Status-Button in der Kopfzeile als Link */
a.button--status {
  text-decoration: none;
}


/* ---------- Auswahlzeile im Rechteformular ---------- */

.scope-row {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.scope-row legend {
  float: left;
  width: 100%;
  padding: 0;
}


/* ---------- Check-in ---------- */

.checkin-card {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  width: 100%;
  max-width: 420px;
  padding: var(--space-8) var(--space-6);
  text-align: center;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}

.checkin-card > * {
  width: 100%;
}

.checkin-card .auth__brand {
  justify-content: center;
}

.checkin-card__title {
  font-size: var(--font-size-2xl);
}

.checkin-card__person {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
}

.checkin-card__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border-radius: var(--radius-full);
}

/* Der große Button – mit dem Daumen bedienbar */
.checkin-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 140px;
  font: inherit;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  background: color-mix(in srgb, var(--action-color) 16%, transparent);
  border: 2px solid var(--action-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out);
}

.checkin-button:hover,
.checkin-button:active {
  background: color-mix(in srgb, var(--action-color) 28%, transparent);
}

.checkin-button .icon {
  color: var(--action-color);
}

/* Schnellwahl unter dem großen Knopf (0.98.2): zwei gleich große nebeneinander */
.checkin-quick {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: var(--space-3);
}

.checkin-button--small {
  min-height: 88px;
  font-size: var(--font-size-md);
  text-align: center;
  overflow-wrap: anywhere;
}

.checkin-card__hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.checkin-card__time {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-medium);
}

.checkin-result__icon {
  display: inline-flex;
  justify-self: center;
  width: auto;
  padding: var(--space-4);
  border-radius: var(--radius-full);
  color: var(--result-color);
  background: color-mix(in srgb, var(--result-color) 16%, transparent);
}


/* ---------- Automatisierung ---------- */

.secret-box__value--small {
  font-size: var(--font-size-sm);
  overflow-wrap: anywhere;
}

.guide-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-left: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  list-style: decimal;
}

.guide-list strong {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}


/* ---------- Suche in Infotexten ---------- */

.board-filters__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  cursor: pointer;
}

.board-filters__toggle:hover {
  color: var(--color-text-secondary);
}

.board-hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
}

.board-hint .icon {
  flex-shrink: 0;
  color: var(--accent);
}

.person-tile__info {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  line-height: 1.4;
  color: var(--color-text-secondary);
}


/* ---------- App installieren ---------- */

.install-page {
  display: grid;
  gap: var(--space-4);
  max-width: 640px;
}

.install-hero {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.install-hero__icon {
  flex-shrink: 0;
  border-radius: 22%;
}

.install-page .form-section__title .icon {
  margin-right: var(--space-1);
  vertical-align: -3px;
}


/* ==================================================================
   Handy – Grundgerüst (M1)
   Steht bewusst am Dateiende: Diese Regeln überschreiben frühere
   Regeln für schmale Bildschirme.
   ================================================================== */

/* Die Leiste unten gibt es nur auf dem Handy */
.bottom-nav {
  display: none;
}

@media (max-width: 700px) {
  /* ---------- Kopfzeile ---------- */

  /* Seitlich 16 px wie der Seitenrand darunter. Mit 12 px stand der
     Profilkreis auf Samsung-Geräten mit runden Ecken scheinbar am Rand
     (Waldemar, 29.10.2026), und das Logo saß 4 px links vom Seitentitel. */
  .header {
    gap: var(--space-2);
    height: calc(56px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) var(--space-4) 0;
  }

  /* Reiter wandern in die Leiste unten */
  .header__nav {
    display: none;
  }

  .header__brand {
    margin-right: auto;
  }

  /* Höchstens 64 px breit: Ein Logo mit Schriftzug (Vossberg: 73 px) ließ
     zusammen mit "RÄUMUNG" den Profilkreis über den Rand rutschen */
  .header__logo {
    height: 22px;
    max-width: 64px;
  }

  .header__tools {
    gap: var(--space-2);
    flex-shrink: 1;
    min-width: 0;
  }

  .header__admin {
    display: none;
  }

  /* Sicherheitsnetz, falls es trotzdem eng wird (längerer Räumungstext,
     längerer Status): Nur das Statuswort kürzt sich mit "…". Räumung und
     Profilkreis kürzen sich nie – ein Alarm muss lesbar bleiben, und der
     Kreis ist der Weg ins Konto. */
  .header__tools > *,
  .account-menu {
    flex-shrink: 0;
  }

  .button--status {
    flex-shrink: 1;
    min-width: 0;
  }

  /* Status-Button mit Text – der wichtigste Knopf am Handy */
  .button--status .button__label {
    display: block;
    min-width: 0;
    max-width: 30vw;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* ---------- Leiste unten ---------- */

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: flex;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--color-surface);
    border-top: var(--border-width) solid var(--color-border);
  }

  .bottom-nav__item {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 58px;
    font-size: 11px;
    color: var(--color-text-muted);
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav__item span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .bottom-nav__item .icon {
    width: 22px;
    height: 22px;
  }

  .bottom-nav__item--active {
    color: var(--color-text);
  }

  .bottom-nav__item--active .icon {
    color: var(--accent);
  }

  /* Platz für die Leiste, damit nichts dahinter verschwindet */
  .app {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  /* ---------- Seitenrahmen ---------- */

  .action-bar {
    gap: var(--space-3);
    padding: var(--space-4) var(--space-4) 0;
  }

  .action-bar__title {
    font-size: var(--font-size-xl);
  }

  .page {
    padding: var(--space-4);
  }

  .form-card {
    padding: var(--space-4);
  }

 

  .search {
    max-width: none;
  }

  /* ---------- Eingabefelder ---------- */
  /* Unter 16 px zoomt das iPhone beim Antippen hinein und nicht wieder heraus */

  .field__input,
  .search__input,
  .file-input,
  select,
  textarea {
    font-size: 16px;
  }

  /* ---------- Status-Dialog ---------- */

  .status-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }

  .status-form {
    padding: var(--space-4);
  }

  .status-options {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ==================================================================
   Handy – Board (M2)
   ================================================================== */

/* Am Desktop verhalten sich die beiden Rahmen, als gäbe es sie nicht –
   Suchfeld, Checkbox und Auswahlfelder stehen wie gewohnt in einer Reihe */
.board-filters__main,
.board-filters__panel {
  display: contents;
}

.board-filters__more {
  display: none;
}

.board-filters__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* Blatt von unten: 380 ms mit der Kurve, die iOS für seine Blätter nimmt –
   zügig los, sichtbar auslaufen. Mit 220 ms und ease-out sah man das
   Hochfahren gar nicht (Waldemar, 29.10.2026, nach 0.91.3). */
:root {
  --sheet-in: sheet-in 380ms cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Wer im System "Bewegung reduzieren" eingestellt hat, bekommt das Blatt
   sofort – kein Hereinfahren */
@media (prefers-reduced-motion: reduce) {
  :root {
    --sheet-in: none;
  }
}

@media (max-width: 700px) {


  /* ---------- Filter ---------- */

  .board-filters {
    display: grid;
    gap: var(--space-2);
  }

  .board-filters__main {
    display: flex;
    gap: var(--space-2);
    /* Ohne das schob die Raumseite am Handy 21 Pixel über den Rand hinaus:
       Als Rasterfeld hat dieser Kasten von Haus aus min-width:auto und kann
       damit nicht unter die Breite seines Inhalts schrumpfen. Das min-width
       am Suchfeld darunter half nichts – es greift erst, wenn der Kasten
       selbst schrumpfen darf. Nachgemessen bei 390 Pixeln: 411 → 390. */
    min-width: 0;
  }

  .board-filters__search {
    min-width: 0;
  }

  .board-filters__more {
    display: inline-flex;
    flex-shrink: 0;
    height: 44px;
  }

  .board-filters .search {
    height: 44px;
  }

  /* Zugeklappt, bis der Button gedrückt wird */
  .board-filters__panel {
    display: none;
  }

  .board-filters--open .board-filters__panel {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-md);
  }

  .board-filters__selects {
    display: grid;
    gap: var(--space-2);
  }

  .board-filters__select {
    width: 100%;
    min-width: 0;
    height: 44px;
  }


  /* ---------- Zusammenfassung und Gruppen ---------- */

  .board-summary {
    margin-bottom: var(--space-4);
  }

  .board-group + .board-group {
    margin-top: var(--space-6);
  }

  .board-group__header {
    margin-bottom: var(--space-2);
  }

  /* ---------- Kacheln: am Handy eine je Zeile ----------

     Zwei nebeneinander ergäben Karten von 175 Pixeln. "Susanne
     Vossberg-Reich" braucht schon 150, und der Status wäre nach zwei
     Wörtern abgeschnitten. Eine je Zeile liest sich wie eine Liste und ist
     am Daumen leichter zu treffen. Die Position steht seit 0.91b nicht mehr
     in der Zeile, siehe dort. */
  .person-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .person-grid .person-tile {
    --ring-size: 42px;

    padding: var(--space-2) var(--space-3);
  }

  .person-grid .person-tile__name {
    font-size: 14px;
    line-height: 1.25;
  }

  .person-grid .person-tile__position,
  .person-grid .person-tile__status {
    font-size: 12px;
    line-height: 1.3;
  }

  /* Durchwahl und Raum haben neben dem Status keinen Platz mehr – am Handy
     stehen sie in der Detailkarte, die ohnehin nur einen Tipp entfernt ist. */
  .person-grid .person-tile__contact {
    display: none;
  }

  /* ---------- Detailkarte als Blatt von unten ---------- */
  /* Das Skript setzt left/top für den Desktop – hier wird beides überschrieben */

  .person-card {
    top: auto !important;
    right: 0;
    bottom: 0;
    left: 0 !important;
    width: 100%;
    max-width: none;
    max-height: 80dvh;
    overflow-y: auto;
    padding: var(--space-6) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    border-width: var(--border-width) 0 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    /* Abdunkeln des Hintergrunds ohne zusätzliches Element */
    box-shadow: 0 0 0 100vmax rgb(var(--schatten) / calc(0.55 * var(--schatten-staerke)));
    animation: var(--sheet-in);
  }

  /* Griff oben am Blatt – zeigt, dass es sich um eine Ebene handelt */
  .person-card::before {
    content: "";
    position: absolute;
    top: var(--space-2);
    left: 50%;
    width: 40px;
    height: 4px;
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
    transform: translateX(-50%);
  }

  .person-card__actions .button {
    flex: 1;
    justify-content: center;
    height: 44px;
  }
}


/* ==================================================================
   Handy – nur senkrecht scrollen
   Grundregel: Am Handy ragt nichts über den rechten Rand.
   ================================================================== */

/* Ansicht und Gruppierung im Filter-Feld gibt es nur am Handy */
.board-filters__mobile-only {
  display: none;
}

@media (max-width: 700px) {
  /* Sicherheitsnetz: Nichts darf die Seite seitlich verbreitern */
  .app {
    overflow-x: clip;
  }

  /* ---------- Aktionsleiste: Umschalter wandern ins Filter-Feld ---------- */

  /* Nur die Umschalter der Tafeln (Ansicht, Gruppierung) – nicht jeder
     .segmented: Bis 0.99.21 verschwanden am Handy auch Tag- und
     Wochenwechsel und die Etagenwahl, und im Tagesplan ließ sich kein
     anderer Tag öffnen (UX-Prüfer, 21.11.2026) */
  .action-bar__actions .segmented--nur-breit {
    display: none;
  }

  /* Tagesplan und Grundriss behalten ihren Umschalter. Mit vier Einträgen
     und Symbolen lief er bei 390 px 27 px über (Click Pilot, 0.99.21):
     volle Breite, gleich breite Einträge, Text ohne Symbol */
  .action-bar__actions .segmented[aria-label="Ansicht"]:not(.segmented--nur-breit) {
    display: flex;
    width: 100%;
  }

  .action-bar__actions .segmented[aria-label="Ansicht"]:not(.segmented--nur-breit) .segmented__item {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 var(--space-1);
  }

  .action-bar__actions .segmented[aria-label="Ansicht"]:not(.segmented--nur-breit) .segmented__item .icon {
    display: none;
  }

  .board-filters__mobile-only {
    display: grid;
    gap: var(--space-2);
  }

  .board-views {
    margin-bottom: var(--space-3);
  }

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

  .segmented--block .segmented__item {
    flex: 1;
    justify-content: center;
    height: 36px;
  }

  /* ---------- Status-Chips: kompakt und umbrechend ---------- */

  .chip-row {
    gap: var(--space-2);
  }

  .chip {
    gap: var(--space-2);
    height: 30px;
    padding: 0 var(--space-3);
    font-size: var(--font-size-sm);
  }

  /* ---------- Unternavigation: ohne Symbole, passt in die Breite ---------- */

  .subnav {
    flex-wrap: wrap;
    gap: 0;
  }

  .subnav__item {
    padding: var(--space-2);
  }

  .subnav__item .icon {
    display: none;
  }
}

/* ==================================================================
   Handy – Tabellen als Karten und Formulare (M3)
   ================================================================== */

@media (max-width: 700px) {
  /* ---------- Aus jeder Tabellenzeile wird eine Karte ---------- */

  .table-wrap {
    overflow-x: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  /* Der Kopf entfällt – seine Texte stehen jetzt in den Zellen */
  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin-bottom: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-md);
  }

  .data-table tbody tr:hover {
    background: var(--color-surface);
  }

  .data-table td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    padding: 3px 0;
    text-align: left;
    border: 0;
  }

  /* Die Spaltenüberschrift als Beschriftung davor */
  .data-table td::before {
    content: attr(data-label);
    flex-shrink: 0;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
  }

  /* Erste Spalte ist die Überschrift der Karte */
  .data-table td:first-child {
    display: block;
    margin-bottom: var(--space-2);
    padding-bottom: var(--space-2);
    font-size: var(--font-size-md);
    border-bottom: var(--border-width) solid var(--color-border);
  }

  .data-table td:first-child::before,
  .data-table__actions::before {
    display: none;
  }

  /* Leere Werte weglassen statt "Standort –" anzuzeigen */
  .data-table td.is-empty {
    display: none;
  }

  .data-table__actions {
    justify-content: flex-end;
    margin-top: var(--space-3);
    /* Vier Knöpfe ("Verschieben", "Raum", "Einladen", "Absagen") passen am
       Handy nicht in eine Zeile – umbrechen statt aus der Karte ragen
       (Darstellungsprüfung, 07.11.2026) */
    flex-wrap: wrap;
    gap: var(--space-2);
    white-space: normal;
  }

  .data-table__actions .button + .button {
    margin-left: 0;
  }

  .data-table__actions .button {
    height: 38px;
  }

  /* Rechte-Matrix bleibt eine Tabelle – als Karten wäre sie unlesbar */
  .table-wrap:has(.permission-matrix) {
    overflow-x: auto;
    background: var(--color-surface);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-lg);
  }

  /* ---------- Formulare ---------- */

  .form-grid {
    grid-template-columns: 1fr;
  }

  /* Am Handy das Datum über die volle Breite, die beiden Uhrzeiten
     nebeneinander darunter – so, wie man es spricht: "am Dienstag, von
     neun bis zehn". */
  .form-grid--when {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid--when > .field:first-child {
    grid-column: 1 / -1;
  }

  .form-actions {
    flex-direction: column-reverse;
    gap: var(--space-2);
  }

  .form-actions .button,
  .form-actions button {
    justify-content: center;
    width: 100%;
    height: 44px;
  }

  .form-actions--center {
    flex-direction: column-reverse;
  }

  .form-actions--center form {
    width: 100%;
  }

  .status-form__actions {
    flex-direction: column-reverse;
  }

  /* Umgekehrt gestapelt: der höchste Rang steht oben */
  .status-form__actions .form-offline,
  .form-actions .form-offline {
    order: 99;
  }

  .status-form__actions .button {
    justify-content: center;
    width: 100%;
    height: 44px;
  }

  /* Gefährliche Aktionen untereinander statt nebeneinander */
  .danger-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }

  .danger-row form,
  .danger-row .button {
    justify-content: center;
    width: 100%;
    height: 44px;
  }

  .check-row {
    padding: var(--space-3);
  }

  /* ---------- Einmalpasswort und Links ---------- */

  .secret-card {
    padding: var(--space-6) var(--space-4);
  }

  .secret-box__value {
    font-size: var(--font-size-lg);
    overflow-wrap: anywhere;
  }

  .secret-card__details {
    grid-template-columns: 1fr;
    gap: 0;
    justify-self: stretch;
  }

  .secret-card__details dd {
    margin-bottom: var(--space-2);
    overflow-wrap: anywhere;
  }

  /* ---------- Fotos ---------- */

  .photo-editor {
    flex-direction: column;
    gap: var(--space-4);
  }

  .crop-frame {
    height: 280px;
  }
}


/* ---------- Räume: Ausstattung ---------- */

.amenity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-2);
}

.amenity-option {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.amenity-option:hover {
  border-color: var(--color-border-strong);
}

/* Bearbeitungszeile in einer Tabelle.

   Vorher stand hier eine feste Deckelung auf 320 px. Bei der Ausstattung
   mit einem Feld und einem Knopf ging das auf; bei den Zusatzleistungen mit
   zwei Feldern, zwei Kästchen und einem Knopf blieben für jedes Textfeld
   28 Pixel übrig – man sah die Bezeichnung nicht mehr, die man bearbeiten
   sollte. Gemessen in einer 645 px breiten Zelle.

   Statt einer Zahl für alle Fälle folgt die Zeile jetzt ihrer Zelle, und
   die Textfelder bekommen eine Mindestbreite plus einen Umbruch. Dadurch
   stimmt es bei einem Feld wie bei fünfen – und am schmalen Fenster rutscht
   der Knopf in die zweite Zeile, statt alles zu zerquetschen. */
.inline-form--tight {
  max-width: none;
  margin-bottom: 0;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form--tight .field__input {
  flex: 1 1 11rem;
  min-width: 8rem;
  /* Ein Namensfeld, das die halbe Tabelle einnimmt, hilft auch niemandem. */
  max-width: 22rem;
}


/* ---------- Raum-Board ---------- */

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}

.room-tile {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  cursor: pointer;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-left: 3px solid var(--state-color);
  border-radius: var(--radius-md);
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.room-tile:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
  border-left-color: var(--state-color);
}

.room-tile--blocked {
  opacity: 0.6;
}

.room-tile__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.room-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--state-color);
  background: color-mix(in srgb, var(--state-color) 14%, transparent);
  border-radius: var(--radius-sm);
}

.room-tile__name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

.room-tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.room-tile__status {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.room-tile__amenities,
.room-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.tag {
  padding: 2px var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  /* Getönt statt „raised“: Auf Kreide ist raised so weiß wie die Kachel, und
     „Gebucht“, „Winterreifen“ standen als lose Wörter da (UX-Prüfer, 0.99.25) */
  background: rgb(var(--tint) / 0.08);
  border-radius: var(--radius-full);
}

/* ---------- Detailkarte eines Raums ---------- */

.room-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  color: var(--ring-color);
  background: color-mix(in srgb, var(--ring-color) 14%, transparent);
  border-radius: var(--radius-md);
}

.room-card__bookings {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-card__bookings li {
  display: grid;
  gap: 2px;
  padding-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  border-bottom: var(--border-width) solid var(--color-border);
}

.room-card__bookings li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.room-card__time {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.room-card__bookings .person-card__hint {
  display: block;
}

.board-filters__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}

@media (max-width: 700px) {
  .room-grid {
    grid-template-columns: 1fr;
  }

  .board-filters__amenities {
    display: grid;
    gap: var(--space-2);
  }
}


/* ---------- Schnellaktionen in der Raumkarte ---------- */

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Gefährliches vom Übrigen getrennt – etwa „Absagen“ unter „Termin ändern“ */
.quick-row--abgesetzt {
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: var(--border-width) solid var(--color-border);
}

.room-card__bookings li {
  position: relative;
  padding-right: var(--space-6);
}

.room-card__cancel {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
}

.room-card__cancel:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

/* ---------- Serie im Buchungsdialog ---------- */

.series-panel {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.weekday-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.weekday {
  position: relative;
  cursor: pointer;
}

.weekday input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekday span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 36px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
}

.weekday input:checked + span {
  color: var(--color-text);
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.weekday input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}


/* ---------- Vorschau im Buchungsdialog ---------- */

.preview__hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.preview__hint--free {
  /* Statusfarbe als Fließtext ist auf Hell zu schwach (3,1:1) – zur Schrift hin gemischt */
  color: color-mix(in srgb, var(--status-present) 60%, var(--color-text));
  background: color-mix(in srgb, var(--status-present) 12%, transparent);
}

/* Belegt ist kein Fehler, sondern eine Lage: Der Raum ist vergeben, die
   Eingabe war richtig. Bernstein, wie überall im Haus für "besetzt". */
.preview__hint--busy {
  color: color-mix(in srgb, var(--status-busy) 60%, var(--color-text));
  background: color-mix(in srgb, var(--status-busy) 12%, transparent);
}

/* Ein Fehler dagegen bedeutet: So kann es nicht abgeschickt werden.
   Dafür gibt es Rot – dasselbe wie in .alert--error.

   Vorher trugen beide das Violett von --status-business-trip. Das ist im
   Rest des Produkts die Farbe für "Unterwegs". Eine abgelehnte Eingabe in
   der Dienstreisefarbe zu melden, heißt die eigene Farbsprache gegen sich
   selbst zu verwenden: Wer gelernt hat, dass Violett "auswärts" bedeutet,
   liest hier zuerst alles andere als einen Fehler. */
.preview__hint--error {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  border: var(--border-width) solid color-mix(in srgb, var(--color-danger) 40%, transparent);
}

.preview {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.preview__summary {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.preview__list {
  display: grid;
  gap: 2px;
  max-height: 180px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.preview__item {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: baseline;
  gap: var(--space-2);
  padding: 2px 0;
  font-size: var(--font-size-sm);
}

.preview__icon {
  color: var(--status-present);
}

.preview__item--busy {
  color: var(--color-text-muted);
}

.preview__item--busy .preview__icon {
  color: var(--status-business-trip);
}

.preview__time {
  color: var(--color-text-muted);
}

.preview__conflict {
  grid-column: 2 / -1;
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}


/* ---------- Tagesplan und Wochenansicht ---------- */

.plan__date {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

.plan__date-range {
  margin-left: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-muted);
}

/* Waagerecht scrollbarer Bereich – die Zeitachse ist breiter als der Bildschirm */
.plan-scroll {
  margin-bottom: var(--space-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.plan {
  --hour-width: 140px;
  --label-width: 160px;

  display: grid;
  gap: var(--space-2);
  /* Namensspalte plus so viele Stunden, wie der Plan hat */
  width: calc(var(--label-width) + var(--space-3) + var(--hour-count) * var(--hour-width));
  min-width: 100%;
}

.plan__scale,
.plan__row {
  display: grid;
  grid-template-columns: var(--label-width) 1fr;
  gap: var(--space-3);
  align-items: center;
}

/* Raumnamen bleiben beim seitlichen Scrollen stehen */
.plan__label {
  position: sticky;
  left: 0;
  z-index: 3;
  display: grid;
  align-self: stretch;
  align-content: center;
  min-width: 0;
  padding-right: var(--space-2);
  /* Fläche statt Hintergrund und so hoch wie die Zeile: Auf Kreide saß jeder
     Raumname in einem grauen Fleck, kürzer als die weiße Zeile (UX-Prüfer, 0.99.25) */
  background: var(--color-surface);
}

/* Die leere Ecke über den Namen steht auf dem Seitengrund, nicht in einer Zeile */
.plan__scale .plan__label {
  background: var(--color-bg);
}

.plan__hours {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}



.plan__name {
  overflow: hidden;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

a.plan__name:hover {
  color: var(--accent);
}

.plan__sub {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.plan__track {
  position: relative;
  height: 64px;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.plan__track--blocked {
  background: repeating-linear-gradient(
    45deg,
    var(--color-surface),
    var(--color-surface) 8px,
    var(--color-surface-raised) 8px,
    var(--color-surface-raised) 16px
  );
}

.plan__blocked {
  position: absolute;
  top: 50%;
  left: var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
  transform: translateY(-50%);
}

.plan__line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border);
}

.plan__block {
  position: absolute;
  top: 5px;
  bottom: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 var(--space-3);
  overflow: hidden;
  white-space: nowrap;
  background: color-mix(in srgb, var(--status-business-trip) 26%, var(--color-surface));
  border-left: 4px solid var(--status-business-trip);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgb(var(--schatten) / calc(0.25 * var(--schatten-staerke)));
  cursor: default;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.plan__block:hover {
  background: color-mix(in srgb, var(--status-business-trip) 38%, var(--color-surface));
  box-shadow: 0 2px 8px rgb(var(--schatten) / calc(0.35 * var(--schatten-staerke)));
}

/* Eigene Buchungen heben sich ab */
.plan__block--own {
  background: color-mix(in srgb, var(--accent) 24%, var(--color-surface));
  border-left-color: var(--accent);
}

.plan__block--own:hover {
  background: color-mix(in srgb, var(--accent) 36%, var(--color-surface));
}

/* Belegt über einen abhängigen Raum: schraffiert statt gefüllt. Es ist
   keine Buchung dieses Raums, man kann sie hier weder ändern noch absagen. */
.plan__block--indirect {
  background: repeating-linear-gradient(
    -45deg,
    var(--color-surface-raised),
    var(--color-surface-raised) 6px,
    var(--color-surface) 6px,
    var(--color-surface) 12px
  );
  border-left-color: var(--color-border-strong);
  color: var(--color-text-muted);
}

/* Angefragt, noch nicht freigegeben: gestrichelt und blasser. Die Zeit ist
   frei gehalten, aber ob gefahren wird, steht noch nicht fest. */
.plan__block--tentative,
.plan__block--tentative:hover {
  border: 1px dashed var(--status-business-trip);
  border-left: 4px dashed var(--status-business-trip);
  background: color-mix(in srgb, var(--status-business-trip) 8%, var(--color-surface));
}

/* Zu schmal für Text – nur Farbe, Inhalt steht in der Kurzinfo */
.plan__block--narrow {
  padding: 0;
}

.plan__block-title {
  overflow: hidden;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  text-overflow: ellipsis;
}

.plan__block-meta {
  overflow: hidden;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-overflow: ellipsis;
}

.plan__block-meta {
  color: var(--color-text-secondary);
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Die aktuelle Uhrzeit */
.plan__now {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 2px;
  background: var(--status-present);
}

@media (max-width: 700px) {
  .plan__scale,
  .plan__row {
    grid-template-columns: 96px 1fr;
    gap: var(--space-2);
  }

  .plan__track {
    height: 40px;
  }

  .plan__block-meta {
    display: none;
  }
}


/* ---------- Plan: Stundenleiste bei 19 Stunden ---------- */

.plan__hour {
  flex: 1;
  text-align: center;
}

.plan__hour:first-child {
  text-align: left;
}

.plan__hour:last-child {
  text-align: right;
}

@media (max-width: 900px) {
  /* Nur jede zweite Stunde beschriften, sonst wird es unlesbar */
  .plan__hour:nth-child(even) {
    color: transparent;
  }
}

@media (max-width: 700px) {
  .plan__track {
    height: 56px;
  }

  .plan__block {
    padding: 0 var(--space-2);
  }
}


/* ---------- Plan mit fester Stundenbreite ---------- */

/* Kurze Buchungen: Zeitangabe weglassen, Titel bekommt den Platz */
.plan__block {
  min-width: 0;
}

.plan__block-title {
  overflow: hidden;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  text-overflow: ellipsis;
}

.plan__block-meta {
  overflow: hidden;
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-overflow: ellipsis;
}

/* Sanfter Hinweis, dass es seitlich weitergeht */
.plan-scroll {
  scrollbar-width: thin;
}

.plan-scroll::-webkit-scrollbar {
  height: 8px;
}

.plan-scroll::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-full);
}

@media (max-width: 700px) {
  .plan {
    --hour-width: 96px;
    --label-width: 110px;
  }
}


/* ---------- Buchen per Klick auf die Zeitleiste ---------- */

.plan__track--clickable {
  cursor: copy;
}

.plan__ghost {
  position: absolute;
  top: 5px;
  bottom: 5px;
  z-index: 1;
  display: flex;
  align-items: center;
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px dashed var(--accent-border);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

/* Am Handy gibt es kein Überfahren – dort wird über die Kachel gebucht */
@media (max-width: 700px) {
  .plan__ghost {
    display: none;
  }
}


/* ---------- Grundrisse ---------- */

.plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.plan-card {
  display: grid;
  overflow: hidden;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.plan-card__image {
  display: block;
  background: var(--papier);
}

.plan-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.plan-card__body {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
}

.plan-card__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

.plan-card__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.plan-card__warn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--status-busy);
}

.plan-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: var(--border-width) solid var(--color-border);
}

/* Vorschau im Formular – Grundrisse sind hell, deshalb weißer Grund */
.plan-preview {
  padding: var(--space-2);
  background: var(--papier);
  border-radius: var(--radius-sm);
}

.plan-preview img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Formularraster: Felder oben ausrichten ---------- */
/* Ohne diese Regel rutschen Felder ohne Hinweistext gegenüber solchen mit Hinweis nach unten */

.form-grid {
  align-items: start;
}

.field {
  display: grid;
  gap: var(--space-1);
  align-content: start;
}


/* ---------- Grundriss-Editor ---------- */

.editor__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-4);
  align-items: start;
}

.editor__stage {
  padding: var(--space-2);
  background: var(--papier);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
}

.editor__canvas {
  position: relative;
  width: 100%;
  cursor: crosshair;
  user-select: none;
}

.editor__canvas img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Ein markierter Raum */
.editor__area {
  position: absolute;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-1);
  padding: 2px;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  border: 2px solid var(--accent);
  border-radius: 3px;
  cursor: move;
}

.editor__area--unassigned {
  background: color-mix(in srgb, var(--color-danger) 22%, transparent);
  border-color: var(--color-danger);
}

.editor__area--drawing {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border-style: dashed;
  pointer-events: none;
}

.editor__area-label {
  overflow: hidden;
  padding: 1px 4px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--bild-text);
  white-space: nowrap;
  text-overflow: ellipsis;
  background: rgb(var(--schatten) / calc(0.55 * var(--schatten-staerke)));
  border-radius: 2px;
  pointer-events: none;
}

.editor__area-remove {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  color: var(--bild-text);
  background: rgb(var(--schatten) / calc(0.55 * var(--schatten-staerke)));
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.editor__area-remove:hover {
  background: var(--color-danger);
}

/* Griff rechts unten zum Vergrößern */
.editor__area-handle {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2px solid var(--bild-text);
  border-radius: 2px;
  cursor: nwse-resize;
}

/* Seitenleiste */
.editor__side {
  display: grid;
  gap: var(--space-4);
}

.editor__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.editor__list-item {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.editor__list-item .field__input {
  flex: 1;
  min-width: 0;
}

.editor__empty,
.editor__missing {
  margin: 0;
  padding: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  list-style: none;
}

.editor__missing li {
  padding: 2px 0;
}

@media (max-width: 900px) {
  .editor__layout {
    grid-template-columns: 1fr;
  }
}


/* ---------- Grundriss-Ansicht ---------- */

.floorplan {
  display: grid;
  gap: var(--space-3);
}

.floorplan__stage {
  position: relative;
  width: 100%;
  padding: var(--space-2);
  background: var(--papier);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
}

.floorplan__stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Ein eingezeichneter Raum */
.floorplan__room {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  background: color-mix(in srgb, var(--state-color) 34%, transparent);
  border: 2px solid var(--state-color);
  border-radius: 3px;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.floorplan__room--clickable {
  cursor: pointer;
}

.floorplan__room:hover,
.floorplan__room:focus-visible {
  background: color-mix(in srgb, var(--state-color) 52%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--state-color) 40%, transparent);
  outline: none;
}

.floorplan__room--blocked {
  background: repeating-linear-gradient(
    45deg,
    color-mix(in srgb, var(--state-color) 30%, transparent),
    color-mix(in srgb, var(--state-color) 30%, transparent) 6px,
    transparent 6px,
    transparent 12px
  );
}

.floorplan__label {
  display: grid;
  gap: 1px;
  max-width: 100%;
  padding: 2px 6px;
  text-align: center;
  background: rgb(var(--schatten) / calc(0.62 * var(--schatten-staerke)));
  border-radius: 3px;
}

.floorplan__name {
  overflow: hidden;
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  color: var(--bild-text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.floorplan__free {
  font-size: 10px;
  line-height: 1.2;
  color: color-mix(in srgb, var(--bild-text) 80%, transparent);
}

/* Legende */
.floorplan__legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.floorplan__legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.floorplan__swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.floorplan__legend-hint {
  margin-left: auto;
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.floorplan__missing {
  max-width: 720px;
}

@media (max-width: 700px) {
  .floorplan__name {
    font-size: 10px;
  }

  .floorplan__free {
    display: none;
  }

  .floorplan__legend-hint {
    margin-left: 0;
  }
}


/* ---------- Einladungen ---------- */

.invite-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.invite-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

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

.invite-list__state {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.invite-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  /* Zeilen so hoch wie ihr Inhalt. Ohne das rechnete das Raster mit
     eigener Bildlaufleiste jede Zeile auf ihre Mindesthöhe (44 px am
     Handy), und eine zweizeilige Funktion lief in den nächsten Namen –
     gemessen 69 px Inhalt in 44 px Zeile (F2b, 30.10.2026). */
  grid-auto-rows: max-content;
  gap: var(--space-1);
  max-height: 240px;
  padding: var(--space-2);
  overflow-y: auto;
  background: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}

.invite-option {
  display: flex;
  /* Oben auf Höhe des Namens: Bei zweizeiliger Funktion stand das Häkchen
     sonst neben der Funktion, und Namen nebeneinanderliegender Einträge
     begannen auf verschiedener Höhe (F2b) */
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.invite-option .checkbox {
  flex: none;
  margin-top: 2px;
}

.invite-option:hover {
  background: var(--color-surface);
}

.invite-option__meta {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}


/* ---------- Personenauswahl beim Einladen ---------- */

.invite-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.invite-tools__search {
  flex: 1;
  min-width: 160px;
  height: 36px;
}

.invite-tools__sort {
  width: auto;
  height: 36px;
}

.invite-tools__departments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.invite-tools__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.invite-tools__departments .chip {
  height: 28px;
  font-size: var(--font-size-xs);
}


/* ---------- Personenauswahl beim Einladen ---------- */

.invite-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.invite-tools__search {
  flex: 1;
  min-width: 160px;
  height: 36px;
}

.invite-tools__sort {
  width: auto;
  height: 36px;
}

.invite-tools__departments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.invite-tools__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.invite-tools__departments .chip {
  height: 28px;
  font-size: var(--font-size-xs);
}


/* ---------- Aktionen an einer Buchung in der Raumkarte ---------- */

.room-card__booking-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  gap: 2px;
}

.room-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
}

.room-card__action:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

/* Absagen in Rot – wie .button--danger; Rot ist keine Statusfarbe (Waldemar, 16.11.2026) */
.room-card__action--absagen {
  color: var(--color-danger);
}

.room-card__action--absagen:hover {
  color: var(--color-danger);
  background: color-mix(in srgb, var(--color-danger) 16%, transparent);
}

/* Platz für zwei Symbole statt einem */
.room-card__bookings li {
  padding-right: calc(var(--space-6) + 24px);
}


/* ---------- Übersichtsseite ---------- */

.overview {
  display: grid;
  gap: var(--space-8);
  max-width: 900px;
}

/* ---------- Kopfband der Übersicht ----------

   Eigener Status links, daneben je Modul eine Zahl. Das Band steht immer
   da; die Abschnitte darunter nur, wenn es etwas zu entscheiden gibt.

   Der Status bekommt mehr Platz als die Zahlen (2fr gegen 1fr), weil er
   das einzige Feld ist, auf das man tippt, um etwas zu ändern – die Zahlen
   führen nur weiter. Unter 720 Pixeln liegt der Status allein in der
   ersten Zeile und die Zahlen teilen sich die zweite. */
/* Flex, nicht Grid: "repeat(auto-fit, …)" ist ungültig, sobald eine andere
   Spalte eine fr-Breite hat – der Browser verwirft dann die ganze
   Zeilenangabe, und alle drei Felder standen untereinander. Mit Flex
   bekommt der Status das doppelte Gewicht, ohne dass eine Spaltenzahl
   festgeschrieben werden muss. */
.overview-top {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.overview-status {
  flex: 2 1 clamp(240px, 32%, 360px);
}

.overview-stat {
  flex: 1 1 160px;
}

.overview-status,
.overview-stat {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

/* Grundlinie statt Mitte: Mit dem Hinweis unter "Besucher im Haus" (F2b)
   ist dort die Bezeichnung zwei, drei Zeilen hoch und rutschte mittig
   nach oben. An der Grundlinie der Zahl ausgerichtet steht die erste
   Zeile jeder Bezeichnung auf gleicher Höhe, der Hinweis hängt darunter. */
.overview-stat {
  align-items: baseline;
}

.overview-status:hover,
.overview-stat:hover {
  background: var(--color-surface-raised);
  border-color: var(--color-border-strong);
}

.overview-status__dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
}

.overview-status__text {
  display: grid;
  min-width: 0;
}

.overview-status__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.overview-status__value {
  overflow: hidden;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Das Wort "Ändern" macht aus einer Anzeige eine Schaltfläche. Ohne es
   sieht die Kachel aus wie die Zahlen daneben, und die führen nur weiter. */
.overview-status__action {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-knopf);
}

.overview-status:hover .overview-status__action {
  color: var(--color-text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.overview-stat__icon {
  display: flex;
  flex-shrink: 0;
  color: var(--color-text-faint);
}

.overview-stat__figure {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
}

.overview-stat__value {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.overview-stat__total,
.overview-stat__label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.overview-stat__label {
  margin-left: auto;
  text-align: right;
}

.overview-stat__hint {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

/* Die ruhige Lage ist eine Zeile, kein Bildschirm.

   Vorher füllte "Nichts zu tun" als große leere Karte die ganze Seite –
   der häufigste Zustand sah damit aus wie ein Fehler. */
.overview-calm {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: calc(var(--space-8) * -1 + var(--space-4));
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.overview-calm .icon {
  color: var(--status-present);
}

.overview-calm {
  flex-wrap: wrap;
}

.overview-calm__weiter a {
  color: var(--accent);
}

@media (max-width: 720px) {
  /* Der Status allein in die erste Zeile, die Zahlen teilen sich die zweite. */
  .overview-status {
    flex: 1 1 100%;
  }

  .overview-stat {
    flex: 1 1 140px;
  }
}

.overview__section {
  display: grid;
  gap: var(--space-3);
}

.overview__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

/* „Alle“ rechts in der Überschrift, etwa zu „Meine Aufgaben“ (0.98.1) */
.overview__more {
  margin-left: auto;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
}

.overview__title .icon {
  color: var(--color-text-muted);
}

.overview__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: var(--radius-full);
}

.overview__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-3);
}

/* Karte einer Einladung */
.invite-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
}

.invite-card--proposal {
  border-left-color: var(--status-busy);
}

.invite-card__head {
  display: grid;
  gap: var(--space-1);
}

.invite-card__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

.invite-card__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.invite-card__from {
  margin-top: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.invite-card__note {
  margin-top: var(--space-2);
  padding-left: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  border-left: 2px solid var(--color-border-strong);
}

.invite-card__compare {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px var(--space-3);
  margin: var(--space-2) 0 0;
  font-size: var(--font-size-sm);
}

.invite-card__compare dt {
  color: var(--color-text-muted);
}

.invite-card__compare dd {
  margin: 0;
}

.invite-card__new {
  font-weight: var(--font-weight-medium);
  color: var(--status-present);
}

.invite-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Termine heute */
.today-list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.today-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.today-item--running {
  border-color: var(--status-present);
}

.today-item__time {
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

/* Symbol zwischen Uhrzeit und Text: In einer Liste aus Terminen UND
   Fahrten muss man auf einen Blick sehen, was was ist. Blass, damit es
   die Zeile nicht anführt – die Uhrzeit bleibt der Anker. */
.today-item__icon {
  display: flex;
  flex-shrink: 0;
  color: var(--color-text-faint);
}

.today-item__main {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: var(--space-1);
}

.today-item__title {
  font-weight: var(--font-weight-medium);
}

.today-item__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

/* Ziffer in der Kopfzeile.

   Rechts oben NEBEN die Initialen, nicht darüber: Mit 4 px Versatz lag die
   18-px-Ziffer auf dem zweiten Buchstaben – aus „CH“ wurde „C“ mit Zahl
   (E11, Click Pilot 21.11.2026). Etwas kleiner und weiter außen bleibt sie
   am Kreis hängen, und beide Buchstaben stehen frei. Am Handy galt das
   schon, jetzt in allen Breiten gleich. Links verankert, damit eine
   zweistellige Zahl nach außen wächst und nicht zurück über die Buchstaben. */
.header__badge {
  position: absolute;
  top: -7px;
  left: calc(100% - 4px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  /* Unter der Skala (--font-size-xs, --space-1) mit Absicht: Eine
     zweistellige Zahl soll in den Rand neben den Initialen passen und nicht
     breiter werden als der Kreis daneben hoch ist. */
  padding: 0 3px;
  font-size: 0.6875rem;
  line-height: 1;
  /* In jeder Darstellung gleich, nie in Akzentfarbe: Bei Petrol und Signal
     stand eine leuchtgelbe Ziffer neben dem gelben „Im Termin“ und las sich
     wie ein Status (UX-Prüfer, Waldemar 21.11.2026). Nicht Rot – Rot heißt
     Gefahr. */
  color: var(--zaehler-text);
  background: var(--zaehler-grund);
  border: 2px solid var(--color-bg);
  border-radius: var(--radius-full);
}

@media (max-width: 700px) {
  .overview__cards {
    grid-template-columns: 1fr;
  }

  .today-item {
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
  }

  /* Zwei Zeilen statt einer (F2b, 30.10.2026): oben Zeit und Symbol,
     Marken rechts außen; darunter der Titel über die volle Breite. Mit
     flex: 1 und min-width: 0 blieb der Text in der ersten Zeile und
     schrumpfte auf 87 px, "läuft" lag bis zu 33 px auf dem Titel. */
  .today-item__main {
    flex-basis: 100%;
    order: 1;
  }

  .today-item__icon {
    margin-right: auto;
  }
}


/* ---------- Raumseite ---------- */

.room-tile__link {
  display: grid;
  gap: var(--space-2);
  color: inherit;
}

.room-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-left: 4px solid var(--state-color);
  border-radius: var(--radius-md);
}

.room-head__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--state-color);
  background: color-mix(in srgb, var(--state-color) 16%, transparent);
  border-radius: var(--radius-md);
}

.room-head__main {
  flex: 1;
  min-width: 200px;
}

.room-head__status {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

.room-head__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Eigene Buchung im Kopf: eigene Zeile über die volle Breite */
.room-head__own {
  display: grid;
  gap: var(--space-2);
  flex-basis: 100%;
  min-width: 0;
  padding-top: var(--space-3);
  border-top: var(--border-width) solid var(--color-border);
}

.room-head__own-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.room-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: start;
  margin-bottom: var(--space-6);
}

.room-week {
  display: grid;
  gap: var(--space-3);
}

/* Liste kommender Buchungen */
.booking-list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.booking-list__link {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-2) var(--space-3);
  color: inherit;
  border-radius: var(--radius-sm);
}

.booking-list__link:hover {
  background: var(--color-surface-hover);
}

.booking-list__when {
  font-size: var(--font-size-xs);
  line-height: 1.3;
  color: var(--color-text-muted);
}

.booking-list__main {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
}

.booking-list__title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.booking-list__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

/* ---------- Buchungsseite ---------- */

.booking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.booking-head--running {
  border-color: var(--status-present);
}

.booking-head__when {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
}

.booking-head__room {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.booking-head__by {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.booking-note {
  max-width: 720px;
  margin-bottom: var(--space-4);
}

@media (max-width: 900px) {
  .room-page {
    grid-template-columns: 1fr;
  }
}


/* ---------- Absagen mit Grund ---------- */

.decline-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.decline-form__note {
  width: auto;
  min-width: 140px;
  max-width: 220px;
  height: 30px;
  font-size: var(--font-size-xs);
}

/* Abgelehnter Vorschlag – dieselbe Farbe wie der Punkt daneben */
.invite-card--rejected {
  border-left-color: var(--response-proposed);
}

/* Abgesagte Termine treten zurück */
.overview__section--muted {
  opacity: 0.75;
}

.today-item--declined .today-item__title {
  color: var(--color-text-secondary);
  text-decoration: line-through;
  text-decoration-color: var(--color-border-strong);
}

/* Termine auf der Übersicht sind anklickbar */
.today-item[data-person-id] {
  cursor: pointer;
}

.today-item[data-person-id]:hover {
  border-color: var(--color-border-strong);
}


/* ---------- Absagen: zurückhaltend rot ---------- */
/* Deutlich genug, um nicht versehentlich geklickt zu werden – aber kein
   Alarmrot wie bei "Endgültig löschen" */

.button--decline {
  color: color-mix(in srgb, var(--color-danger) 85%, var(--aufhellen));
  background: color-mix(in srgb, var(--color-danger) 12%, transparent);
  border-color: color-mix(in srgb, var(--color-danger) 40%, transparent);
}

.button--decline:hover {
  background: color-mix(in srgb, var(--color-danger) 22%, transparent);
  border-color: color-mix(in srgb, var(--color-danger) 60%, transparent);
}

.button--decline .icon {
  color: inherit;
}

/* Grund-Feld sitzt hinter dem Button und gehört sichtbar dazu */
.decline-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.decline-form__note {
  width: auto;
  min-width: 150px;
  max-width: 240px;
  height: 30px;
  font-size: var(--font-size-xs);
}


/* ---------- Rückmeldungen auf meine Einladungen ---------- */

.response-list {
  display: grid;
  gap: var(--space-1);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

.response-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* Absagen und Vorschläge treten hervor, Zusagen bleiben ruhig */
.response-item--negative {
  border-left: 3px solid var(--status-business-trip);
}

.response-item__main {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 1px;
  color: inherit;
}

.response-item__sentence {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.response-item__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.response-item__note {
  font-size: var(--font-size-xs);
  font-style: italic;
  color: var(--color-text-muted);
}

.response-item__main:hover .response-item__sentence {
  color: var(--accent);
}


/* ---------- Zusatzleistungen beim Buchen ---------- */

.service-list {
  display: grid;
  gap: var(--space-2);
}

/* Überschrift je Gruppe, wenn mehrere anforderbar sind (0.98.1) */
.service-list__group {
  margin: var(--space-3) 0 var(--space-1);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  gap: var(--space-2);
  align-items: center;
}

.service-row__check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

/* Bei zweizeiligem Namen schrumpfte das Kästchen (0.98.1, langer Artikel in den Prüfdaten) */
.service-row__check .checkbox {
  flex-shrink: 0;
}

/* Ohne Anzahl nimmt der Hinweis beide Spalten – sonst blieb „Hinweis (op“ stehen */
.service-row__note:nth-child(2) {
  grid-column: span 2;
}

.service-row__amount,
.service-row__note {
  height: 32px;
  font-size: var(--font-size-xs);
}

/* ---------- Sitzungsdienst auf der Übersicht ---------- */

.catering-list {
  display: grid;
  gap: var(--space-3);
}

.catering-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
}

.catering-card--done {
  border-left-color: var(--status-present);
  opacity: 0.6;
}

.catering-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.catering-card__when {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.catering-card__title {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

.catering-card__meta {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-regular);
  color: var(--color-text-faint);
}

.catering-card__items {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.catering-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
}

.catering-item__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--color-text-faint);
  background: transparent;
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.catering-item__toggle:hover {
  border-color: var(--status-present);
}

.catering-item--done .catering-item__toggle {
  color: var(--accent-contrast);
  background: var(--status-present);
  border-color: var(--status-present);
}

.catering-item--done .catering-item__text {
  color: var(--color-text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--color-border-strong);
}

/* Bei mehreren Gruppen: wohin der Artikel gehört (0.98.1) */
.catering-item__group {
  display: inline-block;
  margin-left: var(--space-1);
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

.catering-item__note {
  display: block;
  font-size: var(--font-size-xs);
  font-style: italic;
  color: var(--color-text-faint);
}

.catering-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.catering-card__title a {
  color: inherit;
}

.catering-card__booking-note {
  padding-left: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  border-left: 2px solid var(--color-border-strong);
}

@media (max-width: 700px) {
  .service-row {
    grid-template-columns: 1fr;
  }
}
/* ---------- Automatisierungen und Webhooks (0.99.33) ----------
   Vorher eigene .wh-*-Regeln mit festen Größen (12,8/13,6/16,8 px, Radius
   13 px); jetzt die üblichen Bausteine, hier nur, was sie nicht haben. */
.automation-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.automation-row__url {
  overflow-wrap: anywhere;
}

/* Doppelte Klasse: Die Handyregel von .visit-row steht weiter hinten in
   dieser Datei und gewann bei gleicher Stärke – Name und Adresse standen
   in der 3 rem schmalen Zeitspalte, die Knöpfe daneben (Click Pilot 0.99.36). */
@media (max-width: 640px) {
  .visit-row.automation-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .visit-row.automation-row .visit-row__state {
    grid-column: 1;
    justify-content: flex-start;
  }
}

.automation-beispiele {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.automation-beispiele summary {
  cursor: pointer;
}

.automation-beispiele ul {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-left: var(--space-5);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.automation-beispiele__gruppe {
  margin: var(--space-4) 0 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

/* Statusfilter liegt jetzt im Filterpanel und braucht etwas Luft davor */
.board-filters__panel > .chip-row {
  margin-top: 0.2rem;
}
/* ---------- Herstellerhinweis LFX Connect ---------- */

/* --vendor-color steht in tokens.css (hell und dunkel) */

.vendor {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--color-text-muted);
  text-decoration: none;
}

.vendor:hover .vendor__name,
.vendor:focus-visible .vendor__name {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.vendor__mark {
  flex: none;
  width: 1.15em;
  height: 1.3em;
  background-color: var(--vendor-color);
  -webkit-mask: url("../vendor/lfx-mark.svg") center / contain no-repeat;
  mask: url("../vendor/lfx-mark.svg") center / contain no-repeat;
}

.vendor__name {
  color: var(--vendor-color);
  font-weight: 600;
  letter-spacing: 0.015em;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-4);
  padding: 0.5rem 1.25rem 1.25rem;
}

/* Programmstand. So blass wie möglich und trotzdem lesbar: Man sucht ihn
   einmal nach einer Auslieferung und danach wochenlang nicht mehr. */
.app-version {
  font-size: var(--font-size-xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  /* Ohne zusätzliche Deckkraft: Mit 0.7 lag die Zahl auf Kreide bei 2,9:1 */
  color: var(--color-text-faint);
}

.auth .vendor {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

/* ==================================================================
   Status per Antippen – die Seite hinter einem NFC-Aufkleber

   Entworfen für eine Situation, nicht für einen Bildschirm: jemand steht
   vor der Bürotür, Jacke an, Tasche in der Hand, fünf Sekunden Zeit.

   Daraus folgt alles Weitere – volle Breite je Fläche statt Raster, keine
   Karten mit Schatten, kein Scrollen. Die Statusfarben, die sonst als
   8-Pixel-Punkt auftreten, sind hier das Motiv.
   ================================================================== */

.tap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: max(var(--space-4), env(safe-area-inset-top))
           var(--space-4)
           max(var(--space-4), env(safe-area-inset-bottom));
  background: var(--color-bg);
}

.tap__sheet {
  width: 100%;
  max-width: 26rem;
}

/* ---------- Kopf ---------- */

.tap__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  /* Knapper als die uebrigen Abschnitte: Zwischen Firmenname und erster
     Tippflaeche lagen mit der Statuszeile dazwischen 56 Pixel Luft. Die
     braucht niemand, und die Dauer-Zeile unten braucht den Platz. */
  margin-bottom: var(--space-4);
}

.tap__logo {
  max-height: 1.75rem;
  max-width: 9rem;
  object-fit: contain;
}

.tap__company {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.tap__who {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Was gerade gilt. Steht bewusst über den Knöpfen: erst sehen, dann tippen. */
.tap__now {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-4);
  font-size: var(--font-size-lg);
  color: var(--color-text);
  border-bottom: var(--border-width) solid var(--color-border);
}

/* ---------- Die vier Flächen ---------- */

.tap__choices {
  display: grid;
  gap: var(--space-2);
}

.tap__choice {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  /* 4,75rem waren es, als die Seite nur vier Flaechen hatte. Mit zwei Reihen
     sind es sieben, und die Seite soll weiterhin ohne Scrollen bedienbar
     sein - jemand steht mit Jacke und Tasche davor. 3,9rem bleiben deutlich
     ueber den 44 Pixeln, die eine Flaeche fuer den Daumen mindestens braucht;
     die volle Breite traegt die Treffsicherheit ohnehin. */
  min-height: 3.9rem;
  padding: 0 var(--space-5);
  font: inherit;
  color: var(--color-text);
  text-align: left;
  background: var(--color-surface);
  /* Die Haarlinie macht die Fläche sichtbar – ohne sie steht der Farbstreifen
     scheinbar frei im Dunkeln, weil Fläche und Hintergrund fast gleich sind. */
  border: var(--border-width) solid var(--color-border);
  /* Die Farbe wird zur Kante, nicht zur Verzierung: ein kräftiger Streifen
     links, der beim Wählen auf die ganze Fläche übergeht. */
  border-left: 4px solid var(--tone);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out);
}

.tap__choice:hover {
  background: var(--color-surface-hover);
}

.tap__choice:active {
  transform: scale(0.985);
}

.tap__choice:focus-visible {
  outline: 2px solid var(--tone);
  outline-offset: 2px;
}

.tap__icon {
  display: flex;
  flex: none;
  color: var(--tone);
}

.tap__label {
  font-size: var(--font-size-xl);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* Der eine Moment: Die gewählte Fläche füllt sich mit ihrer Farbe. Kein
   Erfolgsdialog, kein Häkchen – der Zustand selbst ist die Bestätigung, und
   man sieht sie noch im Weggehen. */
.tap__choice--chosen {
  color: var(--gray-950);
  background: var(--tone);
  border-color: var(--tone);
}

.tap__choice--chosen:hover {
  background: var(--tone);
}

.tap__choice--chosen .tap__icon {
  color: inherit;
}

.tap__foot {
  margin: var(--space-6) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-faint);
  text-align: center;
}

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

  .tap__choice:active {
    transform: none;
  }
}

/* ==================================================================
   Externe Gäste

   Gäste sind der seltenere Fall: Die meisten Besprechungen sind intern.
   Der ganze Block ist deshalb zugeklappt und optisch zurückgenommen – er
   soll auffindbar sein, nicht auffällig.
   ================================================================== */

.guest-block {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.guest-block__summary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

/* Das Standard-Dreieck von <details> entfernen – Safari braucht die zweite Zeile */
.guest-block__summary::-webkit-details-marker {
  display: none;
}

.guest-block__summary::after {
  margin-left: auto;
  color: var(--color-text-faint);
  content: "+";
}

.guest-block[open] .guest-block__summary::after {
  content: "–";
}

.guest-block__summary:hover {
  background: var(--color-surface-hover);
}

.guest-block__count {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.guest-block__body {
  display: grid;
  gap: var(--space-4);
  padding: 0 var(--space-4) var(--space-4);
}

.guest-new {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4);
  background: var(--color-surface);
  border: 0;
  border-radius: var(--radius-md);
}

.guest-new__legend {
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ---------- Antwort eines Gastes von Hand setzen ----------
   Drei Knöpfe statt eines Auswahlfelds: Ein Auswahlfeld bräuchte ein
   eigenes Formular, und verschachtelte Formulare gibt es in HTML nicht.
   Nebenbei ist eine Antwort so ein Klick statt dreier.                  */

.answer-switch {
  display: inline-flex;
  overflow: hidden;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-knopf);
}

.answer-switch__option {
  padding: 2px var(--space-2);
  font: inherit;
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.answer-switch__option + .answer-switch__option {
  border-left: var(--border-width) solid var(--color-border);
}

.answer-switch__option:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.answer-switch__option--on {
  color: var(--color-text);
  background: var(--color-surface-raised);
}

.tag--guest {
  color: var(--color-bg);
  background: var(--accent);
}

/* ---------- Adressbuch der Gäste ---------- */

.guest-cards {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}

.guest-card {
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

/* Stillgelegt: zurückgenommen, aber lesbar. Ausgegraut bis zur
   Unleserlichkeit wäre falsch – man sucht ihn ja gerade, um ihn
   wieder aufzunehmen. */
.guest-card--off {
  border-style: dashed;
}

.guest-card--off .guest-card__name,
.guest-card--off .guest-card__count {
  color: var(--color-text-muted);
}

.guest-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.guest-card__who {
  min-width: 0;
}

.guest-card__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 500;
}

.guest-card__meta {
  margin: 2px 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.guest-card__note {
  margin: var(--space-2) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-faint);
  font-style: italic;
}

.guest-card__count {
  flex: none;
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-faint);
  white-space: nowrap;
}

.guest-card__edit {
  margin-top: var(--space-3);
}

.guest-card__editlink {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  list-style: none;
}

.guest-card__editlink::-webkit-details-marker {
  display: none;
}

.guest-card__editlink:hover {
  color: var(--color-text);
}

.guest-card__edit[open] .guest-card__editlink {
  margin-bottom: var(--space-3);
}

/* Kennzeichen neben einem Suchfeld statt als eigene Zeile im Formular.
   Ohne die Rücknahme von Polster und Fläche sieht es aus wie ein zweiter
   Knopf – und bricht bei langem Text auf drei Zeilen um. */
.check-row--inline {
  align-items: center;
  padding: 0 var(--space-2);
  white-space: nowrap;
  background: transparent;
  border: 0;
}

.check-row--inline .checkbox {
  margin-top: 0;
}

.check-row--inline .check-row__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ==================================================================
   Mailversand in der Verwaltung

   Zwei Postfächer, zwei Zustände. Die Seite muss auf einen Blick
   beantworten, ob überhaupt etwas eingerichtet ist – deshalb der
   Statuspunkt in denselben Farben wie überall sonst im Cockpit.
   ================================================================== */

.mail-states {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  padding: 0;
  list-style: none;
}

.mail-state {
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.mail-state--off {
  border-style: dashed;
}

.mail-state__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.mail-state__name {
  margin: 0;
  font-size: var(--font-size-md);
  font-weight: 500;
}

.mail-state__purpose {
  margin: var(--space-2) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.mail-state__missing {
  margin: var(--space-3) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-faint);
}

/* Die harten Fakten: Absender, Server, Verschlüsselung. Genau die drei
   Angaben, die man am Telefon abgleicht, wenn etwas nicht ankommt. */
.mail-state__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-2) var(--space-4);
  margin: var(--space-3) 0 0;
}

.mail-state__facts dt {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.mail-state__facts dd {
  margin: 0;
  font-size: var(--font-size-sm);
  word-break: break-all;
}

/* ---------- Antwortseite für externe Gäste ----------
   Der Empfänger kennt weder das Cockpit noch zwingend die Firma. Deshalb
   stehen die Eckdaten groß und vollständig da, bevor ein Knopf kommt.    */

.answer-facts {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4);
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
}

.answer-facts dt {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.answer-facts dd {
  margin: 2px 0 0;
  font-size: var(--font-size-md);
}

.answer-facts__sub {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.answer-state {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.answer-form {
  display: grid;
  gap: var(--space-2);
}

/* Versandzustand einer Gasteinladung */
.tag--unsent {
  color: var(--color-text-faint);
  border: var(--border-width) dashed var(--color-border-strong);
  background: transparent;
}

.invite-sent {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

/* Kurzer Zwischenzustand, während die Antwort aus der Mail abgeschickt wird.
   Sichtbar nur mit JavaScript – ohne bleiben die Knöpfe stehen. */
.answer-pending {
  margin: 0;
  padding: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
}

/* ---------- Gäste aus einer Datei übernehmen ----------
   Die Vorschau muss auf einen Blick sagen, was passiert. Farbe trägt die
   Aussage nicht allein: Jede Zeile hat zusätzlich ihr Wort ("wird angelegt",
   "bleibt unverändert", "übersprungen"). */

.import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.import-summary__item {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
}

.import-summary__item strong {
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.import-summary__item--new strong {
  color: var(--response-accepted);
}

.import-summary__item--error strong {
  color: var(--response-declined);
}

/* Ein schmaler Streifen am Zeilenanfang statt einer eingefärbten Zeile:
   Die Tabelle bleibt lesbar, der Unterschied trotzdem sichtbar. */
.import-row td:first-child {
  border-left: 3px solid transparent;
  padding-left: var(--space-3);
}

.import-row--neu td:first-child {
  border-left-color: var(--response-accepted);
}

.import-row--fehler td:first-child {
  border-left-color: var(--response-declined);
}

.import-row--fehler {
  color: var(--color-text-muted);
}

.tag--new {
  color: var(--color-bg);
  background: var(--response-accepted);
}

/* Beispielzeile einer CSV-Datei: muss umbrechen dürfen, sonst schiebt sie
   am Handy die ganze Seite in die Breite. */
.import-board-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin: 0 0 var(--space-4);
}

.import-board-choice .field__hint {
  flex: 1 1 32rem;
  margin: 0;
}

/* Nicht invite-option__meta: Das ist ein Blockelement und verschiebt als
   Tabellenzelle die Zeilenlinien. */
.import-format__hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.code-sample {
  margin: var(--space-3) 0;
  padding: var(--space-3);
  overflow-x: auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: var(--font-size-xs);
  line-height: 1.7;
  color: var(--color-text-muted);
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Zeitfeld unter den Erreichbarkeitskacheln. Schmal gehalten: Eine Uhrzeit
   braucht keine volle Breite, und über die ganze Zeile gezogen sähe sie
   wichtiger aus als die Kacheln darüber, zu denen sie gehört. */
.status-form__until {
  max-width: 14rem;
  margin-top: var(--space-3);
}

/* Überschrift einer Knopfgruppe auf der NFC-Auswahlseite. Klein und ruhig:
   Sie ordnet nur, sie konkurriert nicht mit den Flächen darunter – die sind
   das, was der Daumen sucht. */
.tap__group {
  margin: var(--space-4) 0 var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
}

.tap__group:first-of-type {
  margin-top: 0;
}

/* Unterüberschrift einer Nebenfrage – "Dauer" unter den Erreichbarkeits-
   Knöpfen. Kleiner und dichter dran als eine eigene Gruppe: Sie gehört zu
   dem, was darüber steht, und beginnt keinen neuen Abschnitt. */
.tap__group--sub {
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* Dauer-Knöpfe: vier in einer Reihe, gleich breit. Schmaler als die
   Statusflächen darüber, weil sie etwas anderes sind – wer hier tippt,
   steht und schaut hin, statt im Gehen eine Fläche zu treffen. */
.tap__durations {
  display: flex;
  gap: var(--space-2);
}

.tap__duration {
  flex: 1;
  min-height: 2.75rem;
  padding: var(--space-2) 0;
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.tap__duration:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

.tap__duration:active {
  transform: scale(0.97);
}

.tap__duration:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tap__duration--chosen {
  border-color: var(--color-text-muted);
  background: var(--color-surface-hover);
  color: var(--color-text);
}

/* Steht an der Stelle der Erreichbarkeits-Knöpfe, wenn jemand als abwesend
   gemeldet ist. Dieselbe Fläche wie ein Knopf, nur gestrichelt und grau:
   Die Reihe verschwindet nicht spurlos (sonst springt das Layout beim
   Tippen), sie ist nur sichtbar nichts zum Drücken. */
.tap__hint {
  display: flex;
  align-items: center;
  min-height: 3.5rem;
  padding: var(--space-3) var(--space-4);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
}


/* ---------- Fahrzeugtafel ---------- */

/* Breiter als die Raumkacheln: Eine Kachel mit Bild im Querformat braucht
   Breite, sonst wird das Bild zum Briefmarkenformat. */
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.vehicle-tile {
  overflow: hidden;
  cursor: pointer;
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-left: 3px solid var(--state-color);
  border-radius: var(--radius-md);
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.vehicle-tile:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border-strong);
  border-left-color: var(--state-color);
}

.vehicle-tile--blocked {
  opacity: 0.6;
}

.vehicle-tile__link {
  display: grid;
  color: inherit;
}

/* 16:9 – dasselbe Verhältnis, auf das photos.py die Bilder bringt.
   Die feste Höhe hält die Kacheln einer Reihe gleich hoch, auch wenn
   ein Fahrzeug noch kein Bild hat. */
.vehicle-tile__photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0; /* figure bringt im Browser einen eigenen Rand mit */
  aspect-ratio: 16 / 9;
  background: var(--color-surface-raised);
}

.vehicle-tile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ohne Bild bleibt die Fläche neutral. Eine Fläche in der Zustandsfarbe
   wäre lauter als jedes Foto – und die meisten Kacheln hätten sie. */
.vehicle-tile__placeholder {
  color: var(--color-text-faint);
  opacity: 0.5;
}

/* Das Kennzeichen liegt auf dem Bild, nicht darunter: Es gehört zum
   Fahrzeug wie das Nummernschild zum Auto, und spart eine Textzeile. */
.vehicle-tile__plate {
  position: absolute;
  right: var(--space-2);
  bottom: var(--space-2);
  padding: 2px var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-surface) 82%, transparent);
  backdrop-filter: blur(4px);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}

/* Wer gerade unterwegs ist – als Kreis im Bild, unten links. Rechts sitzt
   das Kennzeichen; beide liegen in der Ecke, wo beim Fahrzeugbild am
   wenigsten passiert.

   Im Bild und nicht darunter, weil die Kachel schon Name, Marke, Sitze,
   Abteilung, Statuszeile und Ausstattungsschilder trägt. Eine weitere
   Zeile hätte alle Kacheln höher gemacht, nur damit auf zweien ein
   Gesicht steht. */
.vehicle-tile__driver {
  position: absolute;
  left: var(--space-2);
  bottom: var(--space-2);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-full);
  /* Der Ring in der Zustandsfarbe bindet den Kreis an die Kachel – sonst
     sieht er aus wie ein Bild im Bild. */
  border: 2px solid var(--state-color);
  background: var(--color-surface);
  box-shadow: 0 1px 4px rgb(var(--schatten) / calc(0.35 * var(--schatten-staerke)));
}

.vehicle-tile__driver img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-tile__driver-initials {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.02em;
  color: var(--color-text-secondary);
}

.vehicle-tile__body {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
}

.vehicle-tile__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.vehicle-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--state-color);
  background: color-mix(in srgb, var(--state-color) 14%, transparent);
  border-radius: var(--radius-sm);
}

.vehicle-tile__name {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

.vehicle-tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

.vehicle-tile__status {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

@media (max-width: 700px) {
  .vehicle-grid {
    grid-template-columns: 1fr;
  }
}

/* Besitzende Abteilung. Eigene Zeile statt in der Meta-Zeile: Ein
   Abteilungsname ist lang, und zwischen "VW Passat Variant" und
   "5 Sitze" wuerde er die Zeile umbrechen lassen. */
.vehicle-tile__owner {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}


/* ---------- Fahrzeugseite ---------- */

/* Kopf wie bei den Räumen, nur mit Bild links. Ab Tablet nebeneinander,
   am Handy untereinander – ein Bild im Querformat neben einem Textblock
   wird sonst zu schmal für beides. */
.vehicle-head {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-left: 4px solid var(--state-color);
  border-radius: var(--radius-md);
}

.vehicle-head__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-surface-raised);
  border-radius: var(--radius-sm);
}

.vehicle-head__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-head__main {
  display: grid;
  gap: var(--space-2);
  align-content: start;
  min-width: 0;
}

.vehicle-head__status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
}

.vehicle-head__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--state-color);
  background: color-mix(in srgb, var(--state-color) 14%, transparent);
  border-radius: var(--radius-sm);
}

.vehicle-head__meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-faint);
}

/* Zielfeld und Dauerknöpfe sitzen zusammen – ein Gedanke, ein Block */
.quick-start {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: var(--border-width) solid var(--color-border);
}

.booking-list__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

@media (max-width: 760px) {
  .vehicle-head {
    grid-template-columns: 1fr;
  }
}


/* ---------- Scan-Seite im Auto ---------- */

.scan-form {
  display: grid;
  gap: var(--space-3);
  text-align: left;
}

/* Häufige Ziele als Knöpfe statt Klappfeld: Ein Klappfeld am Handy kostet
   zwei Tipper und verdeckt die halbe Seite.

   Eine Zeile zum Schieben statt Umbruch: Acht Ziele untereinander drängen
   die Dauerknöpfe unter den Bildschirmrand, und der große Knopf ist der
   Grund, warum es diese Seite gibt. */
.scan-targets {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  /* Die Knöpfe sollen am Rand des Kartenrands anfangen und dort auch
     wieder verschwinden – sonst sieht die Zeile abgeschnitten aus. */
  margin: 0 calc(var(--space-6) * -1);
  padding: 0 var(--space-6) var(--space-1);
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.scan-targets::-webkit-scrollbar {
  display: none;
}

.scan-targets .chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.scan-durations {
  display: grid;
  gap: var(--space-2);
}

/* Drei Dauerknöpfe untereinander brauchen weniger Höhe als der eine große
   Knopf der Status-Seite – sonst scrollt die Seite auf jedem Handy. */
.checkin-button--compact {
  min-height: 64px;
  font-size: var(--font-size-lg);
}

/* Vierte Möglichkeit neben den Dauerknöpfen: Uhrzeit selbst eintragen.
   Eine Zeile, damit sie neben den großen Knöpfen nicht wie ein zweiter
   Hauptweg aussieht – die drei Knöpfe decken den Alltag ab. */
.scan-until {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.scan-until__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.scan-until__time {
  width: auto;
  min-width: 7.5rem;
  flex: 0 1 auto;
}

.scan-until__go {
  flex: 1 0 auto;
}

/* Plan über den ganzen Tag: schmalere Stundenspalten, sonst läuft die
   Achse endlos seitlich. 24 Stunden à 90 px sind immer noch weniger
   Schieberei als die 18 Stunden des Raumplans à 140 px. */
.plan--dense {
  --hour-width: 90px;
}

/* Belegungen, die über den Tagesrand hinausgehen: flache Kante statt
   runder. Ein Balken, der an beiden Seiten flach ist, gehört zu einer
   Fahrt, die den ganzen Tag läuft und vorher begann. */
.plan__block--from-before {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left-style: dashed;
}

.plan__block--into-next {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 2px dashed currentColor;
}

@media (max-width: 900px) {
  .plan--dense {
    --hour-width: 64px;
  }
}

/* Bild eines Fahrzeugs in der Verwaltung: Vorschau links, Knöpfe rechts.
   Am Handy untereinander – ein Dateiauswahlfeld neben einem Querformatbild
   wird sonst zu schmal für beides. */
/* Bild hochladen: Fahrzeuge und Räume teilen sich das Aussehen */
.vehicle-photo-edit,
.photo-edit {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.vehicle-photo-edit__preview,
.photo-edit__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}

.vehicle-photo-edit__preview img,
.photo-edit__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-photo-edit__actions,
.photo-edit__actions {
  display: grid;
  gap: var(--space-3);
}

@media (max-width: 760px) {
  .vehicle-photo-edit,
  .photo-edit {
    grid-template-columns: 1fr;
  }
}

/* Ausstattungsmerkmale auf der Fahrzeugkachel – gleiche Marken wie die
   Raumausstattung, nur unter dem Zustand statt darüber. */
.vehicle-tile__features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* Auswahl der Fahrzeugart als Symbolkarten statt Klappliste. Das Symbol
   steht später auf der Kachel – dann soll man beim Auswählen sehen, was
   man bekommt, statt ein Wort zu lesen. */
.icon-choice {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: var(--space-2);
}

.icon-choice__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.icon-choice__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.icon-choice__box:hover {
  border-color: var(--color-border-strong);
}

.icon-choice__option input:checked + .icon-choice__box {
  color: var(--color-text);
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Tastaturbedienung: Der Rahmen muss sichtbar sein, obwohl das Feld selbst
   unsichtbar ist. */
.icon-choice__option input:focus-visible + .icon-choice__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ==================================================================
   Teilnehmerliste einer Veranstaltung

   Die Anwesenheit ist eine Spalte Haekchen – schmal gehalten, damit der
   Name die Zeile fuehrt und nicht das Kaestchen davor.
   ================================================================== */

.participant-table__check {
  width: 4.5rem;
  text-align: center;
}

.participant-table__muted {
  color: var(--color-text-muted);
}

/* Lange Adressen wie "vorname.nachname.1129@gmail.com" brechen um, statt
   die Tabelle über den Rand der Kachel zu schieben (Waldemar, 07.11.2026) */
.participant-table td.participant-table__email {
  /* Umbruch an den Stellen aus dem Filter mail_umbruch (vor "@", nach Punkten);
     break-word nur als Notbehelf für ein einzelnes überlanges Stück */
  overflow-wrap: break-word;
  min-width: 12rem;
}

.participant-table__action {
  width: 3rem;
  text-align: right;
}

/* Referenten und Teilnehmer als Gruppen (0.95.0): Die Überschrift erklärt
   das Mikrofon vor dem Namen – ein zweites Schild in der Zeile wäre am
   Handy zu viel. */
.participant-table__group-head th {
  padding-top: var(--space-4);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: left;
}

.participant-table__speaker-name {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
}

/* Am Handy füllt der Name die Kopfzeile wie bei Teilnehmern die Beschriftung */
@media (max-width: 700px) {
  .participant-table__speaker-name {
    flex: 1;
  }
}

.participant-table__speaker {
  display: inline-flex;
  margin-right: var(--space-2);
  color: var(--color-text-muted);
  vertical-align: -2px;
}

.participant-table__speaker-name .participant-table__speaker {
  margin-right: 0;
}

/* Der eigene Betrieb bei Mitarbeitern: gedämpfter als eine echte Angabe,
   weil er nicht eingetragen, sondern aus der Konfiguration kommt. */
.participant-table__own {
  color: var(--color-text-faint);
}

/* Menü "⋯" je Zeile (0.95.0) – ein details-Element, damit es ohne
   Skript geht; row-menu.js schließt es beim Klick daneben und öffnet es
   beim Rechtsklick auf die Zeile. */
.row-menu {
  position: relative;
  display: inline-block;
}

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

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

.row-menu__list {
  position: absolute;
  right: 0;
  top: calc(100% + var(--space-1));
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 14rem;
  padding: var(--space-1);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgb(var(--schatten) / calc(0.25 * var(--schatten-staerke)));
}

.row-menu__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  font: inherit;
  color: var(--color-text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.row-menu__item:hover,
.row-menu__item:focus-visible {
  background: var(--color-surface-hover);
}

/* Überschrift einer Ablage mit Knopf daneben (0.95.2, "Per Mail an Teilnehmer") */
.attachments__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.attachments__head .form-section__title {
  margin: 0;
}

.row-menu__item--disabled,
.row-menu__item--disabled:hover {
  color: var(--color-text-faint);
  background: none;
  cursor: default;
}

/* ==================================================================
   Wiederholbare Eingabezeilen ("+ weitere Person")

   Eine Zeile je Person: Name breit, E-Mail mittel, Geburtsdatum schmal.
   Auf dem Handy stehen die Felder untereinander – nebeneinander waeren
   sie zu schmal zum Tippen.
   ================================================================== */

.guest-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.guest-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  align-items: end;
}

@media (min-width: 48rem) {
  .guest-row {
    grid-template-columns: 2fr 2fr 2fr 1fr auto;
  }
}

/* Das X sitzt auf Hoehe der Eingabefelder, nicht der Beschriftungen. */
.guest-row__remove {
  margin-bottom: 0.25rem;
}

/* ==================================================================
   Uebernahme zwischen Modulen

   Zwei Bausteine: die Liste dessen, was zu einer Veranstaltung gebucht
   wurde, und die Raumauswahl, auf der genau eine Frage zaehlt – ist
   dieser Raum zu meiner Zeit frei.
   ================================================================== */

.linked-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.linked-list__item {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3);
  background: var(--color-surface-raised);
  border-radius: var(--radius-md);
}

.linked-list__meta {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.room-offers {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.room-offer {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-raised);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

/* Freie Raeume stehen oben und tragen die Akzentlinie: Der Blick soll
   zuerst dort landen, wo es etwas zu klicken gibt. */
.room-offer:not(.room-offer--taken) {
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.room-offer--taken {
  opacity: 0.55;
}

.room-offer__text {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  align-items: baseline;
}

.room-offer__name {
  font-weight: 600;
}

.room-offer__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Ein zu kleiner Raum ist nicht belegt, aber eine Warnung wert. */
.tag--warning {
  color: var(--status-busy);
  background: color-mix(in srgb, var(--status-busy) 15%, transparent);
}

/* Knoepfe nebeneinander innerhalb eines form-section-Rasters. Ohne
   diesen Behaelter streckt das Raster einen einzelnen Knopf auf die
   volle Breite – .form-actions waere hier falsch, die Klasse setzt
   rechtsbuendig und zieht eine Trennlinie. */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-start;
}


/* ---------- Raumabhängigkeiten ----------
   Ohne Skript umgeschaltet: Die gewählte Art blendet den anderen Abschnitt aus. */

.dependency-form:has(input[name="art"][value="kombi"]:checked) .dependency-form__single,
.dependency-form:has(input[name="art"][value="einzel"]:checked) .dependency-form__combo {
  display: none;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-2);
}


/* ---------- Raumanfragen ---------- */

.request-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

/* Freigeben, Ablehnen und Begründung auf einer Linie. Das Ablehnen-Formular
   ist eine .inline-form und brachte deren Abstand nach unten mit – damit
   saß es höher als "Freigeben". Das Feld so hoch wie die kleinen Knöpfe. */
.request-card__actions form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
}

.request-card__actions .field__input {
  width: 14rem;
  max-width: 100%;
  height: 28px;
  font-size: var(--font-size-xs);
}

/* Am Handy ragte das Feld 13 px über die Karte und war 28 px hoch – zu
   klein zum Tippen (UX-Prüfer, 21.11.2026). Jetzt eigene Zeile, volle Breite. */
@media (max-width: 700px) {
  .request-card__actions,
  .request-card__actions form {
    width: 100%;
  }

  .request-card__actions .field__input {
    flex: 1 1 100%;
    width: 100%;
    height: 44px;
    font-size: var(--font-size-sm);
  }
}

/* ---------- Profil: Kachelgröße ---------- */

.tile-size__range {
  width: 100%;
  max-width: 420px;
  accent-color: var(--accent);
}

.tile-size__ticks {
  display: flex;
  justify-content: space-between;
  max-width: 420px;
  font-size: var(--font-size-xs, 12px);
  color: var(--color-text-muted);
}

.tile-size__preview {
  max-width: 560px;
  margin-top: var(--space-4);
}

.tile-size__preview .person-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- Raumbild ----------
   16:9 wie bei den Fahrzeugen. Auf der Kachel nur, wenn mindestens ein Raum
   ein Bild hat – dann bekommen alle die Fläche, die ohne Bild ein Symbol. */

.room-tile__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) var(--space-1);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  color: var(--color-text-faint);
  background: var(--color-surface-raised);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.room-tile__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-head__photo {
  flex: 0 0 auto;
  width: 240px;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
}

.room-head__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booking-form__photo {
  flex: 0 0 auto;
  width: 112px;
  height: 63px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.booking-form__heading {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 760px) {
  .room-head__photo {
    width: 100%;
  }
}

/* ---------- Ja/Nein-Schalter (Anforderungen) ----------
   Zwei Knöpfe statt Häkchen: Ein Häkchen, das erst mit "Speichern" in einer
   anderen Spalte wirkt, sah aus, als täte es nichts. Hier zählt der Klick.
   Seit 0.99.33 als .segmented (vorher eigener Nachbau .yes-no mit 4/10 px,
   UX-Prüfer Verwaltung #15) – hier nur, was ein <button> zusätzlich braucht. */

form.segmented {
  margin: 0;
}

button.segmented__item {
  min-width: 44px;
  justify-content: center;
  font: inherit;
  font-size: var(--font-size-sm);
  cursor: pointer;
  background: none;
  border: 0;
}

button.segmented__item--active {
  font-weight: var(--font-weight-medium);
  background: var(--accent-soft);
}

/* ---------- Sperren mit Richtung ----------
   Die Richtung ist nur bei angehakter Sperre von Belang; sonst blass. */

.exclusion-list {
  display: grid;
  gap: var(--space-2);
}

.exclusion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
  gap: var(--space-3);
  align-items: center;
}

.exclusion-row:not(:has(input:checked)) .exclusion-row__direction {
  opacity: 0.4;
}

@media (max-width: 760px) {
  .exclusion-row {
    grid-template-columns: 1fr;
  }
}

/* ==================================================================
   Bescheinigungen per Mail

   Der Versandvermerk steht klein unter der Adresse, an die verschickt
   wurde – dort sucht man ihn. Nicht .mail-state: Den Namen trägt schon
   die Postfachübersicht der Verwaltung, mit Rahmen und Innenabstand. Gescheitert ist rot wie .alert--error:
   Eine Bescheinigung, die nicht ankam, soll man beim Überfliegen sehen.
   ================================================================== */

/* Wege zur Bescheinigung über der Teilnehmerliste (0.94.7). Klein wie
   .field__hint, damit der Block die Liste nicht nach unten drückt; die
   Begriffsspalte trägt die Struktur, nicht Rahmen oder Fläche. */
.certificate-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.certificate-hint__title {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
}

.certificate-hint__lead {
  margin: 0 0 var(--space-2);
}

.certificate-hint__ways {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-1) var(--space-4);
  margin: 0;
}

.certificate-hint__ways dt {
  color: var(--color-text-secondary);
  font-weight: 600;
}

.certificate-hint__ways dd {
  margin: 0;
}

.certificate-hint__note {
  color: var(--color-text-faint);
}

.certificate-hint__closed {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  color: var(--color-text);
}

.certificate-hint__closed .icon {
  margin-top: 2px;
}

.certificate-mail {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* Das Rot von .alert--error, zur Schrift hin gemischt, damit es auf hellem
   wie dunklem Grund lesbar bleibt. Nicht --status-absent: Das ist das Grau
   für "Abwesend". */
.certificate-mail--failed {
  color: color-mix(in srgb, var(--color-danger) 75%, var(--color-text));
}

/* Urkunde und Briefumschlag nebeneinander: Übereinander verdoppelten sie
   die Zeilenhöhe der ganzen Liste. */
.participant-table__action--icons {
  width: auto;
  text-align: left;
}

/* Linksbündig, damit die Urkunde immer in derselben Spalte steht – auch
   in Zeilen ohne Adresse, in denen der Umschlag fehlt. */
.participant-table__icons {
  display: inline-flex;
  gap: var(--space-1);
  white-space: nowrap;
}

.mail-plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-4);
  padding: 0;
  list-style: none;
}

.mail-plan__item {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  align-items: baseline;
}

/* Häkchen und Name als ein Klickziel – wer auf den Namen tippt, meint die Person. */
.mail-choice {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
  cursor: pointer;
}

.mail-choice__all {
  margin-top: var(--space-2);
}

/* ==================================================================
   Veranstaltungsseite: Kopf, Nächste Schritte, Rest

   Rückmeldung nach dem ersten Durchklicken: Wer Teilnehmer eingetragen
   hatte, musste weit nach unten, um den Raum zu buchen, und vergaß es.
   Auf breiten Schirmen steht die Spalte deshalb neben der Liste und
   bleibt beim Scrollen stehen. Auf dem Handy direkt unter dem Kopf –
   unter der langen Liste fände sie dort niemand.
   ================================================================== */

.event-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "head"
    "aside"
    "main";
  gap: var(--space-6);
}

.event-layout__head { grid-area: head; }
.event-layout__aside { grid-area: aside; }
.event-layout__main { grid-area: main; min-width: 0; }

.event-layout > .form-card,
.event-layout__aside > .form-card {
  margin-bottom: 0;
}

@media (min-width: 72rem) {
  .event-layout {
    grid-template-columns: minmax(0, 880px) minmax(18rem, 22rem);
    grid-template-areas:
      "head aside"
      "main aside";
    align-items: start;
  }

  /* Klebt innerhalb ihrer Fläche, die über Kopf und Rest reicht. Der
     Abstand oben lässt die Kopfleiste der Seite frei. */
  .event-layout__aside {
    position: sticky;
    top: calc(64px + var(--space-4));
    align-self: start;
  }
}

/* Ohne Spalte (Leitung, Teilnehmer, Einsicht – 0.91.6) auch ohne ihre
   Zeile: Die leere Fläche "aside" zählte sonst zweimal den Abstand, und
   am Handy klaffte zwischen Kopf und Teilnehmern eine Lücke (F2b). */
.event-layout:not(:has(> .event-layout__aside)) {
  grid-template-columns: minmax(0, 880px);
  grid-template-areas:
    "head"
    "main";
}

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

.next-steps__item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: var(--border-width) solid var(--color-border);
}

.next-steps__mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
}

.next-steps__mark--done {
  color: var(--color-bg);
  background: var(--accent);
}

.next-steps__mark--open {
  border: 2px solid var(--color-text-muted);
}

/* Gestrichelt: kommt, sobald der Schritt davor erledigt ist. */
.next-steps__mark--later {
  border: 2px dashed var(--color-border);
}

.next-steps__body {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.next-steps__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-2);
  align-items: baseline;
}

.next-steps__title {
  font-weight: var(--font-weight-medium, 600);
}

.next-steps__state {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.next-steps__linked {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
  align-items: center;
}

.next-steps__cta {
  justify-content: center;
  width: 100%;
}

.next-steps__body > .button--small {
  justify-self: start;
}

/* "Personen hinzufügen" als aufklappbare Karte. Die Zeile oben sieht aus
   wie eine Überschrift mit Knopf; offen verschwindet der Knopf, weil das
   Formular selbst einen hat. */
.add-people__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  cursor: pointer;
  list-style: none;
}

.add-people__summary::-webkit-details-marker {
  display: none;
}

.add-people__hint {
  flex: 1;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.add-people[open] .add-people__toggle {
  display: none;
}

/* Eingeklappt nur die Kopfzeile: Der Zeilenabstand der Karte gälte sonst
   auch für das verborgene Formular und hinterließe unten eine Lücke. */
.add-people:not([open]) {
  gap: 0;
}

/* ==================================================================
   Teilnehmerliste am Handy

   Eine eigene Karte statt der allgemeinen: Das Häkchen steht links neben
   dem Namen, und die ganze Kopfzeile ist ein Tippziel (der Name ist die
   Beschriftung des Häkchens). Unten Urkunde und Umschlag links, das X
   rechts, je 44 px groß – mit dem Daumen, im Stehen, am Kursende.
   ================================================================== */

.participant-table__name label {
  cursor: pointer;
}

/* Zwischen Handy und breitem Bildschirm (Tablet, 768 px) ist die Tabelle mit
   E-Mail, Geburtsdatum und Aktionen breiter als die Kachel. Dort scrollt sie
   innerhalb der Kachel, statt über den Rand zu laufen (Waldemar, 07.11.2026).
   Unter 700 px greift die Kartenansicht. */
.participant-table-scroll {
  overflow-x: auto;
  /* Sonst gehört der unsichtbare Text für Bildschirmleser (.sr-only) nicht zum
     Scrollbereich und macht die ganze Seite breiter */
  position: relative;
}

/* Kacheln und Abschnitte sind Gitter. Ein Gitter-Element ist ohne
   min-width: 0 mindestens so breit wie sein Inhalt – eine breite Tabelle
   schob damit den ganzen Abschnitt über den Rand der Kachel, statt in ihr
   zu scrollen (Waldemar, 07.11.2026). Gilt für alle Kacheln. */
.form-card > *,
.form-section > * {
  min-width: 0;
}

@media (max-width: 700px) {
  /* Die Gruppenüberschrift ist keine Karte, sondern steht über ihnen */
  .participant-table tr.participant-table__group-head {
    display: block;
    margin: var(--space-3) 0 var(--space-1);
    padding: 0;
    background: none;
    border: 0;
  }

  .participant-table tr.participant-table__group-head th {
    display: block;
    padding: 0;
    border: 0;
  }

  .participant-table tr {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
      "check   name    name"
      "company company company"
      "email   email   email"
      "birth   birth   birth"
      "icons   icons   remove";
    align-items: center;
  }

  .participant-table td.participant-table__check {
    grid-area: check;
    display: flex;
    justify-content: flex-start;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .participant-table td.participant-table__check .checkbox {
    width: 24px;
    height: 24px;
  }

  .participant-table td.participant-table__name {
    grid-area: name;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 44px;
    margin: 0;
    padding: 0;
    font-size: var(--font-size-md);
    border: 0;
  }

  /* Die Beschriftung füllt die Zeile aus, damit der Tipp überall trifft. */
  .participant-table td.participant-table__name label {
    flex: 1;
    padding: var(--space-2) 0;
    /* Ein schneller zweiter Tipp markierte sonst den Namen blau, statt nur
       das Häkchen umzuschalten. */
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Hinweise zum Check-in unter Name und "QR", nicht daneben (0.96.3) */
  .participant-table td.participant-table__name { flex-wrap: wrap; }
  .participant-table td.participant-table__name .participant-notes {
    flex-basis: 100%;
    margin-top: 0;
    padding-bottom: var(--space-2);
  }

  .participant-table td.participant-table__company { grid-area: company; }
  .participant-table td.participant-table__email { grid-area: email; }
  .participant-table td.participant-table__birth { grid-area: birth; }

  /* Der Versandvermerk steht unter der Adresse, nicht neben der Beschriftung. */
  .participant-table td.participant-table__email {
    flex-wrap: wrap;
  }

  .participant-table td.participant-table__email .certificate-mail {
    flex-basis: 100%;
    text-align: right;
  }

  .participant-table td.participant-table__action--icons {
    grid-area: icons;
    margin-top: var(--space-2);
  }

  .participant-table td.participant-table__remove {
    grid-area: remove;
    justify-content: flex-end;
    margin-top: var(--space-2);
  }

  .participant-table td.participant-table__check::before,
  .participant-table td.participant-table__name::before,
  .participant-table td.participant-table__action::before {
    display: none;
  }

  .participant-table .icon-button {
    width: 44px;
    height: 44px;
  }

  /* Speichern bleibt über der Menüleiste stehen, solange die Liste im Bild
     ist – bei dreißig Personen läge der Knopf sonst weit unten. */
  .participant-table__save {
    position: sticky;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px) + var(--space-2));
    z-index: 2;
    padding: var(--space-2) 0;
    background: var(--color-surface);
  }

  .participant-table__save .button {
    width: 100%;
    justify-content: center;
  }
}

/* Zwischenüberschrift im Tagesplan: "Köln · EG". Klebt links mit der
   Namensspalte, damit sie beim seitlichen Scrollen nicht verschwindet. */
.plan__group {
  position: sticky;
  left: 0;
  width: max-content;
  margin-top: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary, var(--color-text-muted));
}

/* ==================================================================
   Legende der Mitarbeiterkacheln

   Ring = Anwesenheit, Randstreifen = Erreichbarkeit – in den Begriffen
   des Statusformulars. Rechts neben "12 von 30 erreichbar", damit sie
   keine eigene Zeile kostet; auf dem Handy darunter.
   ================================================================== */

.board-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2) var(--space-6);
  margin-bottom: var(--space-6);
}

.board-summary-row .board-summary {
  margin-bottom: 0;
}

.tile-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  margin: 0;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.tile-legend__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-3);
}

.tile-legend dt {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary, var(--color-text-muted));
}

.tile-legend dd {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
}

.tile-legend__ring {
  width: 10px;
  height: 10px;
  border: 2px solid var(--legend-color);
  border-radius: var(--radius-full);
}

.tile-legend__stripe {
  width: 3px;
  height: 12px;
  background: var(--legend-color);
  border-radius: 1px;
}

/* ==================================================================
   Mitarbeiter → Einstellungen: Darstellung der Kacheln

   Zwei Wahlkarten nebeneinander, jede mit einer Musterkachel im Fall
   "Homeoffice, im Termin" – dort unterscheiden sich die beiden.
   ================================================================== */

.display-choice {
  display: grid;
  /* auto-fill: Eine einzelne Karte (Gruppe „Hell“) bleibt so breit wie die übrigen */
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: var(--space-4);
}

.display-choice__option input {
  position: absolute;
  opacity: 0;
}

.display-choice__box {
  display: grid;
  gap: var(--space-2);
  height: 100%;
  padding: var(--space-4);
  cursor: pointer;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.display-choice__option input:checked + .display-choice__box {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.display-choice__option input:focus-visible + .display-choice__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.display-choice__title {
  font-weight: var(--font-weight-medium);
}

.tile-sample {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-left: 3px solid var(--stripe-color);
  border-radius: var(--radius-md);
}

.tile-sample__ring {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  font-size: var(--font-size-xs);
  border: 3px solid var(--ring-color);
  border-radius: var(--radius-full);
}

.tile-sample__text {
  display: grid;
  font-size: var(--font-size-sm);
}

.tile-sample__text span {
  color: var(--color-text-muted);
}

/* Zeitfeld mit "Jetzt"-Knopf daneben – der Knopf so hoch wie das Feld. */
.time-now {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}

.time-now .field__input {
  flex: 1;
  min-width: 0;
}

.time-now__button {
  flex-shrink: 0;
  height: auto;
}

/* Verwaltung → Darstellung: ein Stück Oberfläche je Ton. */
.tone-sample {
  display: block;
  margin-top: var(--space-2);
  padding: var(--space-4);
  background: var(--sample-bg);
  border: var(--border-width) solid var(--sample-border);
  border-radius: var(--radius-md);
}

.tone-sample__card {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--sample-card);
  border: var(--border-width) solid var(--sample-border);
  border-radius: var(--radius-sm);
}

.tone-sample__ring {
  width: 18px;
  height: 18px;
  border: 3px solid var(--legend-color);
  border-radius: var(--radius-full);
}

/* Vorschau einer Darstellung (0.99.24): Ecken und Akzent der Darstellung,
   nicht der gerade gültigen – man soll vor dem Speichern sehen, was kommt */
.tone-sample,
.tone-sample__card {
  border-radius: var(--sample-radius, var(--radius-md));
}

.tone-sample__card {
  align-items: center;
}

.tone-sample__akzent {
  margin-left: auto;
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--sample-ink);
  background: var(--sample-accent);
  border-radius: calc(var(--sample-radius, var(--radius-md)) - 4px);
}

.tone-sample__farbe {
  display: block;
  width: 100%;
  height: 12px;
  margin-top: var(--space-2);
  background: var(--sample-accent);
  border-radius: var(--radius-full);
}

.display-choice__group {
  margin-top: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
}

/* Anmeldeseite: der erste Eindruck, und hier stehen keine Daten – also darf
   sie mehr wirken als die App. Licht in der Firmenfarbe von oben, ein
   kühler Gegenschein unten rechts, feines Korn gegen Farbstufen im Verlauf.
   Nur die Anmeldeseiten (auth--login), nicht alles mit der Klasse auth:
   Die nutzt auch die Kopplungsseite des Monitors, und die kann auf einem
   Fernseher stundenlang stehen – dort kein Korn, siehe core/appearance.py. */
body.auth--login {
  background-color: var(--color-bg);
  background-image:
    radial-gradient(60% 45% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(40% 35% at 85% 100%, var(--licht-gegenschein), transparent 70%),
    url("../img/korn.png");
  background-repeat: no-repeat, no-repeat, repeat;
}

/* Helle Darstellung: Licht ja, Korn nein – auf Hellgrau wirkte es wie Schmutz (UX-Prüfer, 0.99.25) */
[data-theme="light"] body.auth--login {
  background-image:
    radial-gradient(60% 45% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(40% 35% at 85% 100%, var(--licht-gegenschein), transparent 70%);
  background-repeat: no-repeat, no-repeat;
}

.tone-sample--glow {
  background-image:
    radial-gradient(ellipse 80% 70% at 50% -20%, var(--licht-probe), transparent 70%),
    url("../img/korn.png");
}

/* Messenger-Knöpfe in der Detailkarte: einfarbige Logos, gedämpft, beim
   Überfahren hell. So stehen sie bereit, ohne der Karte die Aufmerksamkeit
   zu nehmen. */
.messenger-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.messenger-row__button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--color-text-muted);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
  transition:
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.messenger-row__button:hover,
.messenger-row__button:focus-visible {
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.messenger-choice {
  display: grid;
  gap: var(--space-2);
}

.messenger-choice .check-row__label .icon {
  vertical-align: -3px;
}

/* ---------- Etikettenbögen (Verwaltung) ---------- */

.sheet-editor {
  display: grid;
  /* Formular so breit wie die übrigen Formularkarten, die Vorschau direkt
     daneben – nicht am rechten Bildschirmrand. */
  grid-template-columns: minmax(0, 880px) minmax(220px, 280px);
  justify-content: start;
  gap: var(--space-4);
  align-items: start;
}

@media (max-width: 760px) {
  .sheet-editor {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unit-input {
  position: relative;
  display: block;
}

.unit-input .field__input {
  padding-right: 3rem;
}

.unit-input__unit {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  font-size: var(--font-size-sm);
  pointer-events: none;
}

.sheet-preview {
  max-width: none;
  margin: 0;
  padding: var(--space-4);
  display: grid;
  gap: var(--space-2);
  position: sticky;
  top: var(--space-4);
}

.sheet-preview__paper {
  width: 100%;
  height: auto;
}

/* Das Blatt bleibt weiß wie Papier, auch im dunklen Hintergrund: Die
   Vorschau soll aussehen wie das, was man in der Hand hält. */
.sheet-preview__page {
  fill: var(--papier);
}

.sheet-preview__label {
  fill: var(--papier-flaeche);
  stroke: var(--papier-linie);
  stroke-width: 0.6;
}

.sheet-preview__rest--bad {
  color: var(--color-danger);
  font-weight: 600;
}

/* ---------- Namensetiketten drucken ---------- */

.label-print {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--space-4);
  align-items: start;
}

/* Das Startraster ist ein verkleinerter Bogen: Etiketten im Seitenverhältnis
   des echten, damit man den angefangenen Bogen darin wiedererkennt. */
.label-start {
  display: grid;
  grid-template-columns: repeat(var(--label-columns), minmax(0, 1fr));
  gap: var(--space-1);
  max-width: 220px;
  padding: var(--space-2);
  background: var(--papier);
  border-radius: var(--radius-sm, 6px);
}

.label-start__cell {
  position: relative;
  aspect-ratio: var(--label-ratio);
  display: grid;
  place-items: center;
  border: 1px solid var(--papier-rand);
  border-radius: 3px;
  background: var(--papier-flaeche);
  color: var(--papier-text);
  font-size: var(--font-size-xs);
  cursor: pointer;
}

.label-start__cell input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.label-start__cell:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}

.label-start__cell:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.label-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
  max-height: 28rem;
  overflow-y: auto;
}

.label-print__people-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

/* ---------- Besucher ---------- */

.segmented-choice {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.segmented-choice__option {
  position: relative;
  cursor: pointer;
}

.segmented-choice__option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

/* Nur die Kapsel selbst, nicht das Symbol darin – sonst bekam das Symbol
   Rahmen und Innenabstand und erschien als leere Kapsel */
.segmented-choice__option > span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: 999px;
  color: var(--color-text-muted);
}

.segmented-choice__option input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--color-text);
}

.segmented-choice__option input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-actions--start {
  justify-content: flex-start;
  padding-top: 0;
  border-top: 0;
}

.visit-section {
  margin-bottom: var(--space-6);
}

.visit-section__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: var(--font-size-md);
}

.visit-section--upcoming > summary {
  cursor: pointer;
}

.visit-section__count {
  color: var(--color-text-faint);
  font-size: var(--font-size-sm);
  font-weight: 400;
}

.visit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.visit-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-left: 3px solid var(--color-border-strong);
  border-radius: var(--radius-md, 10px);
}

.visit-row--im_haus {
  border-left-color: var(--status-present);
}

.visit-row--gegangen {
  opacity: 0.7;
}

.visit-row__time {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.visit-row__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.visit-row__title {
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.visit-row__title:hover {
  text-decoration: underline;
}

.visit-row__meta {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.visit-row__state,
.visit-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .visit-row {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .visit-row__state,
  .visit-row__actions {
    grid-column: 2;
    justify-content: flex-start;
  }
  /* Ohne Uhrzeit keine leere Spalte (0.91). Das Raster verliert dann seine
     erste Spalte – nur das Element zu verstecken schob den Namen in die
     schmale Zeitspalte. */
  .visit-row:has(.visit-row__time:empty) {
    grid-template-columns: minmax(0, 1fr);
  }

  .visit-row:has(.visit-row__time:empty) .visit-row__state,
  .visit-row:has(.visit-row__time:empty) .visit-row__actions {
    grid-column: 1;
  }

  .visit-row__time:empty {
    display: none;
  }
}

.visit-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin: 0;
}

.visit-facts dt {
  color: var(--color-text-faint);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.visit-facts dd {
  margin: 2px 0 0;
}

.visit-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
  font-size: var(--font-size-sm);
}

.visit-add {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-2);
}

/* „Ablehnen“ steht nicht direkt am grünen „Bestätigen“ – ein Fehlgriff
   löscht die Anmeldung (UX-Prüfer Besucher #1, 0.99.30) */
.visit-row__abgesetzt {
  margin-inline-start: var(--space-4);
}

@media (min-width: 701px) {
  .form-actions__abgesetzt {
    margin-inline-start: auto;
  }
}

/* Zahl und Auswahl der Einheit nebeneinander („3 Jahre“) – vorher
   untereinander, weil beide Felder die ganze Zeile nahmen */
.unit-input--wahl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.unit-input--wahl .field__input {
  width: auto;
  padding-right: var(--space-3);
}

/* ---------- Besucher: Selbstanmeldung (öffentlich) ---------- */

.field__optional {
  color: var(--color-text-faint);
  font-weight: 400;
}

.self-choice {
  display: grid;
  gap: var(--space-3);
}

.self-choice__option {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-size-md);
}

.self-choice__option:hover,
.self-choice__option:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.self-choice__title {
  font-weight: 600;
}

.self-form {
  display: grid;
  gap: var(--space-4);
}

/* Fangfeld: für Menschen unsichtbar, für Vorleseprogramme verborgen (aria-hidden) */
.self-form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.self-form__choice {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.self-form__privacy {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.self-form__privacy summary {
  cursor: pointer;
  color: var(--accent);
}

.self-own__text {
  font-size: var(--font-size-md);
  margin: 0 0 var(--space-4);
}

.self-own__group {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  text-align: center;
}

.self-own__heading {
  font-size: var(--font-size-md);
  margin: 0;
}

/* Der QR-Code braucht hellen Grund – auf dunklem lesen ihn viele Kameras nicht */
.self-own__qr {
  padding: var(--space-3);
  background: var(--papier);
  border-radius: var(--radius-md);
  line-height: 0;
}

.self-own__count {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
}

.self-own__leave {
  display: grid;
  gap: var(--space-2);
}

.self-own__keep {
  margin-top: var(--space-3);
}

/* ---------- Besucher: Anmeldepunkt-Formular ---------- */

.point-fields {
  display: grid;
  gap: var(--space-3);
}

.point-fields__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

.point-fields__label {
  min-width: 10rem;
}

.segmented-choice__option--small > span {
  padding: var(--space-1) var(--space-3);
  font-size: var(--font-size-sm);
}

.visit-group-qr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.book-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
  align-items: end;
  margin-bottom: var(--space-3);
}

.book-filters__search {
  grid-column: span 2;
}

.book-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 640px) {
  .book-filters__search {
    grid-column: auto;
  }
}

/* ---------- Besucher: Dokumente ---------- */

.doc-list {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}

.doc-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  margin: 0;
}

.doc-card__remove {
  justify-self: end;
}

.doc-card__legend {
  padding: 0 var(--space-2);
  font-weight: 600;
}

.doc-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-start;
}

.doc-card__image img {
  display: block;
  width: 160px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
}

.doc-answers {
  display: grid;
  gap: var(--space-2);
}

.doc-answer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
}

.doc-answer__correct {
  padding: 0;
  border: 0;
  background: none;
}

.doc-read__step {
  color: var(--color-text-faint);
  font-size: var(--font-size-sm);
  margin: 0;
}

.doc-read__title {
  font-size: var(--font-size-lg, 1.25rem);
  margin: 0;
}

.doc-read__image {
  width: 100%;
  border-radius: var(--radius-md);
}

.doc-read__text p,
.doc-read p {
  margin: 0 0 var(--space-3);
  line-height: 1.55;
}

.doc-read__text ul,
.doc-read ul {
  margin: 0 0 var(--space-3);
  padding-left: 1.2em;
  line-height: 1.55;
}

.doc-question {
  border: 0;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.doc-question__text {
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.doc-question__answers {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: var(--space-1);
}

/* Einheit direkt hinter einem schmalen Feld, nicht am rechten Rand der Karte */
.unit-input:has(.field__input--narrow) {
  display: inline-block;
  justify-self: start;
}

/* ---------- Vorschläge beim Tippen (name-suggest.js) ---------- */

.name-suggest {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: 100%;
  margin: 4px 0 0;
  padding: var(--space-1);
  list-style: none;
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgb(var(--schatten) / calc(0.35 * var(--schatten-staerke)));
  max-height: 18rem;
  overflow-y: auto;
}

.name-suggest__item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.name-suggest__item:hover,
.name-suggest__item--active {
  background: var(--accent-soft);
}

.name-suggest__detail {
  color: var(--color-text-faint);
  font-size: var(--font-size-sm);
  text-align: right;
}

/* ---------- Besucher: Termine ---------- */

.termin-link {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-start;
}

.termin-link__text {
  flex: 1 1 18rem;
  display: grid;
  gap: var(--space-2);
}

.termin-link__url {
  word-break: break-all;
}

.termin-add {
  margin-top: var(--space-4);
  display: grid;
  gap: var(--space-2);
}

/* ---------- Info-Symbol und Einblendung (0.90, F1) ----------
   Erklärungen erscheinen auf Wunsch statt als Dauertext. Das Symbol ist
   klein, aber die Trefferfläche nicht: 28 px, damit es am Handy mit dem
   Daumen zu treffen ist. */
.info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -6px -4px -6px 0;
  padding: 0;
  /* Auf die Mitte der Großbuchstaben, nicht auf "middle": Das saß 1,3 px zu
     tief (Waldemar, 29.10.2026). In em, damit es bei jeder Schriftgröße passt
     – gemessen mit ~/.cache/lfx-pruefung/skripte/info_lage.py. */
  vertical-align: -0.18em;
  color: var(--color-text-muted);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: help;
}

.info svg {
  width: 15px;
  height: 15px;
}

.info:hover,
.info:focus-visible {
  color: var(--accent);
}

.info:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.info-tip {
  /* fixed und ohne die Vorgaben des Browsers für Popover (inset: 0, margin:
     auto, die ihn sonst mittig setzen) – info.js setzt top/left selbst */
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 1000;
  max-width: min(320px, calc(100vw - 16px));
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  line-height: 1.45;
  color: var(--color-text);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgb(var(--schatten) / calc(0.35 * var(--schatten-staerke)));
  pointer-events: none;
}

/* ==================================================================
   Handy im Premium-Look, Schritt 0.91a – Grundlagen
   Nur unterhalb von 700 px; am Rechner ändert sich nichts.
   Konzept und Vorher/Nachher: docs/konzept-0.91.md
   ================================================================== */

@media (max-width: 700px) {
  /* ---------- Untere Leiste: fünf Ziele, "Mehr" ---------- */

  button.bottom-nav__item {
    font: inherit;
    font-size: 11px;
    background: none;
    border: 0;
    cursor: pointer;
  }

  /* Der aktive Eintrag bekommt eine Pille hinter dem Symbol – nur Farbe
     war am Handy in der Sonne kaum zu erkennen */
  .bottom-nav__item {
    position: relative;
  }

  .bottom-nav__item--active::before {
    position: absolute;
    top: 6px;
    left: 50%;
    z-index: -1;
    width: 52px;
    height: 30px;
    content: "";
    background: var(--accent-soft);
    border-radius: 15px;
    transform: translateX(-50%);
  }

  .bottom-nav__sheet {
    position: fixed;
    inset: auto 0 calc(58px + env(safe-area-inset-bottom, 0px)) 0;
    width: 100%;
    margin: 0;
    padding: var(--space-2);
    color: var(--color-text);
    background: var(--color-surface-raised);
    border: 0;
    border-top: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -12px 32px rgb(var(--schatten) / calc(0.35 * var(--schatten-staerke)));
  }

  .bottom-nav__sheet-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 52px;
    padding: 0 var(--space-4);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
  }

  .bottom-nav__sheet-item--active {
    background: var(--accent-soft);
  }

  .bottom-nav__sheet-item--active .icon {
    color: var(--accent);
  }


  /* ---------- Hauptknopf fest unten ----------
     "Buchen", "Speichern", "Eintragen" lagen unter der Leiste und mussten
     gesucht werden. Jetzt steht die Leiste der Knöpfe direkt über der
     Navigation, volle Breite, 48 px. */

  .form-actions,
  .status-form__actions {
    position: sticky;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    z-index: 5;
    margin-inline: calc(var(--space-4) * -1);
    padding: var(--space-3) var(--space-4);
    background: color-mix(in srgb, var(--color-bg) 90%, transparent);
    backdrop-filter: blur(10px);
  }

  /* Im Dialog gibt es keine Leiste darunter; der Rand unten passt zum
     kleineren Innenabstand des Formulars am Handy */
  .status-dialog .status-form__actions {
    bottom: 0;
    margin-bottom: calc(var(--space-4) * -1);
    background: var(--color-surface-raised);
  }

  .form-actions > .button--primary,
  .status-form__actions > .button--primary {
    flex: 1;
    min-height: 48px;
    justify-content: center;
  }

  /* Keine Karte in der Karte: Formulare nutzen die volle Breite */
  .status-page.form-card {
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  /* ---------- Filter in einer wischbaren Reihe ---------- */

  .chip-row,
  .scan-targets {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    /* Der rechte Rand blendet aus – man sieht, dass es weitergeht */
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }

  .chip-row::-webkit-scrollbar,
  .scan-targets::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: none;
    min-height: 44px;
  }

  /* ---------- Berührungsziele mindestens 44 px ---------- */

  /* Tag- und Wochenwechsel stehen seit 0.99.21 auch am Handy da – mit 28 px
     waren „‹“ und „›“ kaum zu treffen (UX-Prüfer, 21.11.2026) */
  .segmented__item {
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .field__hint--link a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* Raumname im Tagesplan, Wochentag auf der Raumseite: Der Link war 21 px
     hoch. Statt die Zeile zu strecken, wird die ganze Namensspalte der Zeile
     (64 px) zur Tippfläche (UX-Prüfer, 0.99.22) */
  a.plan__name::after {
    position: absolute;
    inset: 0;
    content: "";
  }

  .search {
    height: 44px;
  }

  .button,
  .icon-button {
    min-height: 44px;
  }

  .icon-button {
    min-width: 44px;
  }

  .info {
    width: 36px;
    height: 36px;
    margin-block: -10px;
  }

}

/* ---------- Touch-Geräte jeder Breite: Tippflächen 44 px ----------

   Die Regeln oben gelten nur am Handy. Am Empfangstablet (768 px, Touch)
   waren Umschalter 24 px, Status-Chips 30 px und Häkchen 18 px groß
   (UX-Prüfer, 0.99.28) – das betraf jede Seite, nicht nur Mitarbeiter.
   pointer: coarse statt Breite: Ein Laptop mit Maus behält die dichte
   Darstellung, ein Tablet bekommt Flächen für den Finger. */
@media (pointer: coarse) {
  .segmented__item {
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  /* 0.99.34 (UX-Prüfer Kern #5): Initialen 30 px, Menüeinträge 37 px,
     Haken der Aufgaben 26 px, Eingabefelder 30 px hoch – gemessen am Handy
     und am Empfangstablet */
  .account-menu__trigger {
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .account-menu__item {
    min-height: 44px;
  }

  .catering-item__toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .field__input {
    min-height: 44px;
  }

  .chip {
    min-height: 44px;
  }

  .search {
    height: 44px;
  }

  .button,
  .icon-button {
    min-height: 44px;
  }

  .icon-button {
    min-width: 44px;
  }

  .checkbox {
    width: 24px;
    height: 24px;
  }

  /* Häkchen ohne eigene Zeile: das Etikett wird zur Tippfläche */
  .board-filters__toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  /* Anwesenheit abhaken (0.99.29): das Etikett um das Kästchen füllt 44 × 44 */
  .participant-check {
    min-width: 44px;
    min-height: 44px;
  }

  .next-steps__link,
  .past-events__summary {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Sah nicht wie ein Link aus (UX-Prüfer 0.99.29) */
.next-steps__link {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Die Zelle der Anwesenheit ist ganz Tippfläche – das Etikett um das
   Kästchen füllt sie (0.99.29) */
.participant-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.participant-check:has(.checkbox:disabled) {
  cursor: default;
}

/* Name klein unter dem gebuchten Raum, wenn er mehr sagt als der Raum (0.99.29) */
.event-place__note {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Druck gibt es am Handy nicht – die Knöpfe schoben dort den Inhalt aus dem Bild (0.99.29) */
@media (max-width: 700px) {
  .button--nur-breit {
    display: none;
  }
}

@media (max-width: 700px) {
  /* Fuß des Menüs: persönliche Einstellungen und Abmelden, abgesetzt */
  .bottom-nav__sheet-foot {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: var(--border-width) solid var(--color-border);
  }

  button.bottom-nav__sheet-item {
    width: 100%;
    font: inherit;
    background: none;
    border: 0;
    cursor: pointer;
  }
}

/* ==================================================================
   Handy im Premium-Look, Schritt 0.91b – Räume als Zeilen
   Eine Kachel kostete am Handy 120 px, auf den ersten Bildschirm passten
   knapp drei Räume. Als Zeile mit Zustand und Plätzen sind es sieben bis
   acht. Nummer, Ausstattung und Bild stehen auf der Raumseite, die das
   Antippen öffnet. Plätze bleiben in der Zeile: Nach "frei?" fragt man
   "passen wir rein?", und das soll keinen Tipp je Raum kosten.
   ================================================================== */

.room-tile__extra,
.room-tile__chevron {
  display: none;
}

@media (max-width: 700px) {
  .room-grid {
    gap: var(--space-2);
  }

  .room-tile {
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  }

  .room-tile__link {
    grid-template-columns: 32px minmax(0, 1fr) auto;
    grid-template-areas:
      "icon name chevron"
      "icon status chevron";
    column-gap: var(--space-3);
    row-gap: 2px;
    align-items: center;
  }

  /* Kopf auflösen, damit Symbol und Name eigene Zellen im Raster bekommen */
  .room-tile__head {
    display: contents;
  }

  .room-tile__icon {
    grid-area: icon;
  }

  .room-tile__name {
    grid-area: name;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .room-tile__status {
    grid-area: status;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .room-tile__extra {
    display: inline;
    color: var(--color-text-faint);
  }

  .room-tile__chevron {
    grid-area: chevron;
    display: inline-flex;
    color: var(--color-text-faint);
  }

  .room-tile__photo,
  .room-tile__meta,
  .room-tile__amenities {
    display: none;
  }
}

/* ---------- 0.91b – Fahrzeuge als Zeilen ----------
   Eine Fahrzeugkachel war am Handy gut 400 px hoch – das Bild allein
   200 px, meist nur ein Platzhalter. Als Zeile: Symbol, Name, Kennzeichen,
   darunter Zustand und Fahrer. Bild, Marke, Sitze, Abteilung, Ausstattung
   und Fahrtziel stehen auf der Fahrzeugseite, die das Antippen öffnet. */

.vehicle-tile__row-plate,
.vehicle-tile__chevron,
.vehicle-tile__status--short {
  display: none;
}

@media (max-width: 700px) {
  .vehicle-grid {
    gap: var(--space-2);
  }

  .vehicle-tile__photo,
  .vehicle-tile__meta,
  .vehicle-tile__owner,
  .vehicle-tile__features,
  .vehicle-tile__status:not(.vehicle-tile__status--short) {
    display: none;
  }

  .vehicle-tile__body {
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    grid-template-areas:
      "icon name plate chevron"
      "icon status status chevron";
    column-gap: var(--space-3);
    row-gap: 2px;
    align-items: center;
    padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4);
  }

  .vehicle-tile__head {
    display: contents;
  }

  .vehicle-tile__icon {
    grid-area: icon;
  }

  .vehicle-tile__name {
    grid-area: name;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Dasselbe Schild wie sonst auf dem Bild */
  .vehicle-tile__row-plate {
    grid-area: plate;
    display: inline-block;
    padding: 1px var(--space-2);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    white-space: nowrap;
    color: var(--color-text);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius-sm);
  }

  .vehicle-tile__status--short {
    grid-area: status;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vehicle-tile__chevron {
    grid-area: chevron;
    display: inline-flex;
    color: var(--color-text-faint);
  }
}

/* ---------- 0.91b – Mitarbeiter als zweizeilige Liste ----------
   Die Karte trug am Handy drei Zeilen: Name, Position, Status. Die Position
   entfällt dort (Waldemar, 29.10.2026) – sie steht in der Detailkarte, einen
   Tipp entfernt. "Leitung" rückt neben den Namen. Ring, Plakette und
   Streifen bleiben: Sie tragen Anwesenheit und Erreichbarkeit. */

.person-tile__lead--name,
.tile-legend-info {
  display: none;
}

/* Das Legendenblatt: mittig, über einem abgedunkelten Hintergrund. Antippen
   daneben schließt es – das bringt popover von selbst mit. display und
   margin von .tile-legend schlagen die Grundregeln des Browsers für
   Popover: Ohne die beiden Zeilen hier stand das Blatt immer offen, und
   zwar oben links. */
.tile-legend--popover:not(:popover-open) {
  display: none;
}

.tile-legend--popover {
  inset: 0;
  margin: auto;
  height: fit-content;
  flex-direction: column;
  gap: var(--space-4);
  max-width: min(22rem, calc(100vw - 2 * var(--space-4)));
  padding: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-raised);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgb(var(--schatten) / calc(0.45 * var(--schatten-staerke)));
}

.tile-legend--popover:popover-open {
  display: flex;
}

.tile-legend--popover::backdrop {
  background: rgb(var(--schatten) / calc(0.4 * var(--schatten-staerke)));
}

@media (max-width: 700px) {
  .person-grid .person-tile__position {
    display: none;
  }

  .person-grid .person-tile__status {
    grid-row: 2;
  }

  .person-grid .person-tile__lead--name {
    display: inline-block;
  }

  /* hidden kommt von board.js in der Tabellenansicht und muss gewinnen */
  .tile-legend--inline {
    display: none;
  }

  .tile-legend-info:not([hidden]) {
    display: inline-flex;
  }

  /* ⓘ in derselben Zeile wie "20 von 30 erreichbar", nicht darunter */
  .board-summary-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: var(--space-2);
  }
}

/* ---------- 0.91b – Übersicht: Kennzahlen im Raster ----------
   Am Handy lagen die Zahlen mal einzeln, mal zu zweit in einer Reihe, und in
   den halben Karten brachen "12 von 15" und "Räume frei" um. Jetzt zwei
   gleiche Spalten: Zahl groß oben, Bezeichnung links darunter, Symbol klein
   oben rechts. Der Status bleibt über die volle Breite.

   Wie viele Zahlen es gibt, hängt an den gebuchten Modulen (Gerüst
   app/overview/content.py). Bei ungerader Zahl nimmt die letzte die ganze
   Breite – sonst bliebe rechts unten ein Loch. "of .overview-stat" zählt nur
   die Zahlen, gleich ob der Status davorsteht. */

@media (max-width: 700px) {
  .overview-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .overview-status {
    grid-column: 1 / -1;
  }

  .overview-stat:last-child:nth-child(odd of .overview-stat) {
    grid-column: 1 / -1;
  }

  .overview-stat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "figure icon"
      "label label";
    align-items: start;
    /* Oben bündig: Ist die Nachbarkachel durch einen Hinweis höher, bleibt
       der Platz unten frei, statt die Bezeichnung nach unten zu ziehen */
    align-content: start;
    gap: var(--space-1) var(--space-2);
    padding: var(--space-3) var(--space-4);
  }

  .overview-stat__figure {
    grid-area: figure;
    flex-wrap: wrap;
    white-space: nowrap;
  }

  .overview-stat__icon {
    grid-area: icon;
  }

  .overview-stat__label {
    grid-area: label;
    margin-left: 0;
    text-align: left;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
  }
}

/* ==================================================================
   Handy im Premium-Look, Schritt 0.91c – Dialoge als Blatt von unten
   Der gemeinsame Dialog (Mein Status, Buchen, Einladen, Verschieben,
   Vorschlagen) schwebte am Handy mittig mit 8 px Rand. Jetzt liegt er
   unten bündig wie die Detailkarte, mit Griff; nach unten wischen
   schließt (static/js/blatt.js). Der Räumungsdialog bleibt mittig.
   ================================================================== */

@media (max-width: 700px) {
  .status-dialog {
    inset: auto 0 0;
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    margin: 0;
    padding-top: var(--space-4);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-width: var(--border-width) 0 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgb(var(--schatten) / calc(0.45 * var(--schatten-staerke)));
  }

  .status-dialog[open] {
    animation: var(--sheet-in);
  }

  /* Griff wie bei der Detailkarte */
  .status-dialog::before {
    content: "";
    position: absolute;
    top: var(--space-2);
    left: 50%;
    width: 40px;
    height: 4px;
    background: var(--color-border-strong);
    border-radius: var(--radius-full);
    transform: translateX(-50%);
  }

  /* Der Hauptknopf liegt am unteren Rand – dort sitzt beim iPhone der Balken */
  .status-dialog .status-form__actions {
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  }
}

/* ---------- 0.91c – Ziele ab 44 px in Formularen ----------
   Gemessen im Fahrzeugformular, gilt überall, wo die Bausteine stehen:
   Auswahlknöpfe (.choice) 32 px, Suchfeld 34 px, Personenzeilen der
   Auswahlliste, Ausstattungszeilen und Reiter je 39 px. 44 px empfehlen Apple und Google als
   kleinste Fläche für einen Daumen. Häkchen und Kacheln waren nie zu
   klein – dort ist die ganze Beschriftung die Fläche. */

@media (max-width: 700px) {
  .choice span {
    height: 44px;
    padding: 0 var(--space-4);
  }

  .search {
    height: 44px;
  }

  .invite-option {
    min-height: 44px;
    padding: var(--space-2);
  }

  .amenity-option {
    min-height: 44px;
  }

  .subnav__item {
    min-height: 44px;
  }
}

/* ---------- 0.91.8 – F2b: Personenauswahl am Handy ----------
   Waldemars Bildschirmfoto vom echten Gerät (Vossberg, Mitfahrer): Die
   Einträge standen zu nah aneinander. Gemessen 4 px zwischen zwei
   Personen; bei zweizeiliger Funktion ("Abteilungsleiterin Infrastruktur
   · Infrastruktur und Verkehr") berührte die zweite Zeile den nächsten
   Namen. Jetzt 12 px oben und unten und eine feine Linie dazwischen. Das
   Häkchen auf Höhe des Namens gilt überall (Grundregel von .invite-option).

   Die Abteilungsknöpfe brauchten bei Vossberg fünf Zeilen vor der
   eigentlichen Liste; am Handy eine wischbare Reihe wie die Filter aus
   0.91a. Gilt überall, wo components/person_picker.html steckt. */

@media (max-width: 700px) {
  /* Mit dem neuen Abstand passten in 240 px nur zweieinhalb Personen */
  .invite-picker {
    gap: 0;
    max-height: min(60dvh, 480px);
  }

  .invite-option {
    padding: var(--space-3) var(--space-2);
  }

  .invite-option + .invite-option {
    border-top: var(--border-width) solid var(--color-border);
    border-radius: 0;
  }

  .invite-tools__departments {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }

  .invite-tools__departments::-webkit-scrollbar {
    display: none;
  }

  .invite-tools__label {
    flex: none;
  }
}

/* 0.93a – Nachweisliste: PDF und Löschen nebeneinander, auch am Handy */
.proof-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

/* 0.93b – Datenschutzhinweis auf der eigenen Seite des Besuchers */
.self-own__privacy {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.self-own__briefing {
  display: grid;
  gap: var(--space-2);
}

.self-own__footer {
  text-align: center;
  font-size: var(--font-size-sm);
}

/* Vollbild-QR am Empfang: so groß wie die Karte erlaubt, Polster eingerechnet */
.self-own__qr--large {
  box-sizing: border-box;
  max-width: 100%;
}

.self-own__qr--large svg {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  margin: 0 auto;
}

/* 0.93.2 – Abschnittstext: wächst mit, Zähler wird rot über der Grenze */
.doc-card__text {
  min-height: 14em;
  resize: vertical;
}

.field__hint--error {
  color: var(--color-danger-text);
}

.doc-read__zoom {
  display: block;
  cursor: zoom-in;
}

/* 0.94 – Unterlagen und Links: eine Zeile je Eintrag, auch am Handy */
.attachment-list {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.attachment-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-height: 44px;
}

.attachment-row__icon {
  color: var(--color-text-muted);
  flex: none;
}

.attachment-row__main {
  display: grid;
  flex: 1;
  min-width: 0;
}

.attachment-row__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-row__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.attachment-add {
  margin-top: var(--space-2);
}

.attachment-add > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
}

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

.attachment-form {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.attachment-form__visibility {
  border: 0;
  padding: 0;
  margin: 0;
}

/* 0.94b – Verwaltung → Speicher */
.storage-figure {
  margin: 0 0 var(--space-2);
}

.storage-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--color-surface-raised);
  overflow: hidden;
  margin-bottom: var(--space-2);
}

.storage-bar > span {
  display: block;
  height: 100%;
  background: var(--speicher-gut);
}

.storage-bar--high > span {
  background: var(--speicher-knapp);
}

.storage-bar--full > span {
  background: var(--speicher-voll);
}

/* 0.94.5 – Meine Termine: zwei Abschnitte untereinander */
.my-dates + .my-dates {
  margin-top: var(--space-5);
}

/* Meine Termine (0.94.8): ein Symbol vor dem Titel sagt, ob es ein Raum
   oder eine Veranstaltung ist – die Spalte "Rolle" allein ließe das offen,
   denn "Angelegt" gibt es bei beiden. */
.my-dates__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.my-dates__icon {
  color: var(--color-text-muted);
  display: inline-flex;
}

.my-dates__detail {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.my-dates__role {
  white-space: nowrap;
}

.my-dates__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: var(--space-2);
}

/* 0.94.6 – Knopf, den es gibt, der aber gerade nicht geht (mit ⓘ daneben) */
.button--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Check-in am Handy (0.96.0, events/checkin_public.html) */
.checkin-public__event {
  margin: 0 0 var(--space-4, 1rem);
  text-align: center;
  line-height: 1.4;
}

.checkin-public__done {
  margin: var(--space-4, 1rem) 0;
  font-size: 1.15rem;
  text-align: center;
  line-height: 1.45;
}

.checkin-public__privacy {
  margin: 0 0 var(--space-4, 1rem);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.checkin-public__privacy summary { cursor: pointer; list-style: none; }
.checkin-public__privacy summary::-webkit-details-marker { display: none; }
.checkin-public__more { text-decoration: underline; white-space: nowrap; }
.checkin-public__privacy p { margin: 0.6rem 0 0; }

.checkin-public__form { display: flex; flex-direction: column; gap: var(--space-3, 0.75rem); }

/* Kennzeichnung in der Teilnehmerliste: eingecheckt per QR (0.96.0) */
.participant-qr {
  display: inline-block;
  margin-left: 0.4em;
  padding: 0 0.4em;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
  color: var(--color-text-muted);
}

.checkin-public__lead { margin: 0 0 var(--space-4); text-align: center; }


.close-confirm__list {
  margin: 0 auto var(--space-4);
  padding: 0;
  max-width: 34rem;
  list-style: none;
  text-align: left;
  line-height: 1.6;
}

.checkin-public__note {
  margin: 0 0 var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* „Name ändern“ war nicht als Link zu erkennen (Click Pilot 0.99.29) */
.checkin-public__note a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checkin-public__name { margin: 0; font-weight: 600; font-size: 1.1rem; }


/* Hinweise unter dem Namen (0.96.2/0.96.3): je Hinweis eine Zeile, Symbol
   in einer festen Spalte, Text daneben eingerückt – auch wenn er umbricht */
.participant-notes {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.3rem;
}

.participant-notes__clock { display: contents; }

.participant-note {
  display: grid;
  grid-template-columns: 13px 1fr;
  column-gap: 0.4em;
  align-items: start;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--status-busy);
  text-align: left;
}

.participant-note .icon { margin-top: 0.1em; }

.participant-note--merge {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.participant-note--merge > span:last-child { text-decoration: underline; }

/* Mehrere Wege aus einem leeren Bereich, untereinander und gleich breit
   (Besucher → Dokumente: Einweisung oder Bestätigung anlegen) */
.empty-state__actions {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}

/* Offen zur Anmeldung (0.97.0) */
.open-events {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.open-events__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.open-events__head .form-section__title { margin: 0; }

/* Feld und Knopf gleich groß (Waldemar, 0.98.5): zwei gleiche Spalten, die
   Zeile so hoch wie das höhere von beiden – am Handy der Knopf mit 44 px */
.open-events__code {
  display: grid;
  grid-template-columns: repeat(2, 8.5rem);
  gap: var(--space-2);
}

.open-events__code .field__input,
.open-events__code .button {
  width: 100%;
  height: auto;
  min-height: 40px;
  max-width: none;
}

.open-event {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}

.open-event__main { min-width: 0; flex: 1 1 16rem; }
.open-event__title { margin: 0; font-size: var(--font-size-md); overflow-wrap: anywhere; }
.open-event__meta { margin: var(--space-1) 0 0; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
.open-event__seats { margin: var(--space-1) 0 0; color: var(--color-text-muted); font-size: var(--font-size-sm); }

/* Eine kleine Handlung mitten in einer Angabe, etwa "Neuen Code erzeugen" (0.97.0) */
.inline-action { display: inline; margin-left: var(--space-2); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--color-text-secondary);
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover { color: var(--color-text); }

/* Knöpfe am Ende einer Listenzeile, etwa Warteliste: "Nachrücken lassen", "Entfernen" (0.97.1) */
.linked-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Gastzugang abgelaufen (0.97.2) – fällt auf, ohne wie ein Fehler auszusehen */
.participant-qr--warn {
  color: var(--status-busy);
}

/* ---------- Kategorien einer Gruppe der Anforderungen (0.98.3) ---------- */

.category-list {
  display: grid;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  padding: 0;
  list-style: none;
}

/* Pfeile, Name mit Speichern, Löschen – am Handy rutscht Löschen in die nächste Zeile */
.category-list__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.category-list__row > .inline-form {
  flex: 1 1 16rem;
  min-width: 0;
}

.requisition-table__category th {
  padding-top: var(--space-4);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: left;
  overflow-wrap: anywhere;
}

/* Kategorie im Auswahlfeld: Zwischenüberschrift unter der Gruppe */
.service-list__category {
  margin: var(--space-2) 0 0;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.booking-orders__head {
  overflow-wrap: anywhere;
}

/* ---------- Auswahl der Anforderungen: Suche und Kategorien zum Zuklappen (0.98.5) ---------- */

.order-picker__search {
  margin-bottom: var(--space-2);
}

.order-picker__category > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  cursor: pointer;
  list-style: none;
}

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

/* Pfeil vor der Kategorie, gedreht, wenn offen */
.order-picker__category > summary::before {
  content: "›";
  display: inline-block;
  width: 1ch;
  transition: transform 0.15s;
}

.order-picker__category[open] > summary::before {
  transform: rotate(90deg);
}

.order-picker__category > .service-list {
  margin: var(--space-1) 0 var(--space-2);
}

.order-picker__chosen {
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
}

/* Code-Feld am Handy: Knopf als Berührungsziel 44 px, das Feld gleich hoch */
@media (max-width: 700px) {
  .open-events__code .field__input,
  .open-events__code .button {
    min-height: 44px;
  }
}

/* Verwaltung → Organisation: Abteilungen | Standorte (0.99.0) */
.organization-switch {
  margin-bottom: var(--space-4);
}

/* ---------------------------------------------------------------- Einrichtungsassistent (0.99.7) */
.einrichtung__kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; }
.einrichtung__kopf > div { flex: 1 1 320px; min-width: 0; }
.einrichtung__titel { font-size: var(--font-size-xl); margin: 0 0 var(--space-2); }
.einrichtung__zaehler { margin: 0; color: var(--color-text-muted); white-space: nowrap; }
.einrichtung__pfad { display: flex; flex-wrap: wrap; gap: var(--space-2); color: var(--color-text-muted); font-size: var(--font-size-sm); margin: 0 0 var(--space-2); }
.einrichtung__balken { height: 4px; border-radius: 2px; background: var(--color-surface-raised); overflow: hidden; margin-bottom: var(--space-4); }
.einrichtung__balken > span { display: block; height: 100%; background: var(--accent); }
.einrichtung__knoepfe { flex-wrap: wrap; }
.einrichtung__fuss { margin-top: var(--space-3); }
.einrichtung__liste { padding-left: 1.2em; display: flex; flex-direction: column; gap: var(--space-1); }
.einrichtung p { overflow-wrap: anywhere; }
.einrichtung__bereiche { display: flex; flex-direction: column; gap: var(--space-4); }
.einrichtung__bereich { border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.einrichtung__bereichkopf { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.einrichtung__checkliste { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-direction: column; }
.einrichtung__frage { display: grid; grid-template-columns: 1.5em minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-2) 0; border-top: 1px solid var(--color-border-subtle, var(--color-border)); }
.einrichtung__fragetext { min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; }
.einrichtung__haken { text-align: center; color: var(--color-text-faint); }
.einrichtung__frage--gespeichert .einrichtung__haken, .einrichtung__frage--gelesen .einrichtung__haken { color: var(--status-present); }

/* Datenexport (0.99.9): Knöpfe untereinander, damit die Tabelle bei 768 px
   nicht seitlich scrollen muss */
.datenexport-knoepfe {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
}

/* Auf der Übersicht ist eine Knopfleiste Teil ihrer Karte, kein Formular-
   abschluss: Die feste Leiste über der Navigation (Handy) legte sich bei der
   Einrichtungskarte über „Heute“ und ragte über den Rand (Click Pilot, 0.99.9). */
@media (max-width: 767px) {
  .overview__section .form-actions {
    position: static;
    margin-inline: 0;
    padding: var(--space-3) 0 0;
    background: none;
    backdrop-filter: none;
  }
}

/* ------------------------------------------------------------------
   0.99.10 Tickets an LFX: Verlauf, Bildschirmfotos, Schwärzen
   ------------------------------------------------------------------ */

.ticket-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.ticket-kopf__text {
  min-width: 0;
  flex: 1 1 16rem;
}

.ticket-titel {
  margin: 0;
  font-size: var(--font-size-lg);
  overflow-wrap: anywhere;
}

.ticket-liste__betreff,
.ticket-liste__betreff a {
  overflow-wrap: anywhere;
}

/* 0.99.11: T-VOS-12 bricht sonst bei 768 px in drei Zeilen (Click Pilot) */
.ticket-liste__nr {
  white-space: nowrap;
}

.ticket-liste__inhalt {
  min-width: 0;
  flex: 1 1 auto;
}

.ticket-liste__anleger {
  display: block;
  /* Wortweise umbrechen; nur ein einzelnes überlanges Wort darf geteilt werden */
  overflow-wrap: break-word;
}

.ticket-seite {
  overflow-wrap: anywhere;
  font-size: var(--font-size-sm);
}

/* 0.99.13 Übersicht und Formular: Stand und Knopf rechts, langer Betreff bricht um */
.ticket-uebersicht__text {
  min-width: 0;
  flex: 1 1 14rem;
}

.ticket-uebersicht__betreff {
  overflow-wrap: anywhere;
}

.ticket-uebersicht__rechts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.ticket-offen-kasten .linked-list__item {
  flex-wrap: wrap;
}

/* 0.99.11 Ticket im Auftrag: Name breit, Tag und Uhrzeit daneben; schmal untereinander */
.ticket-anruf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 10rem) minmax(0, 7rem);
  gap: var(--space-3);
}

.ticket-anruf > .field {
  min-width: 0;
}

@media (max-width: 640px) {
  .ticket-anruf {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .ticket-anruf__name {
    grid-column: 1 / -1;
  }
}

.vorschlag-hinweis {
  overflow-wrap: anywhere;
}

.ticket-nachricht__kopf .data-table__muted {
  overflow-wrap: anywhere;
}

.ticket-verlauf {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.ticket-nachricht {
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.ticket-nachricht--lfx {
  border-color: var(--accent-border);
}

.ticket-nachricht__kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
}

.ticket-nachricht__text {
  margin: 0 0 var(--space-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-bilder__liste {
  list-style: none;
  margin: var(--space-2) 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.ticket-bilder__liste li {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  max-width: 100%;
}

.ticket-bilder__vorschau {
  display: block;
  max-width: min(16rem, 100%);
  max-height: 10rem;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-sm);
}

.ticket-bilder__waehlen {
  justify-self: start;
  width: fit-content;
  cursor: pointer;
}

.ticket-loeschen summary {
  list-style: none;
  width: fit-content;
}

.ticket-loeschen summary::-webkit-details-marker {
  display: none;
}

.ticket-loeschen[open] summary {
  margin-bottom: var(--space-3);
}

.ticket-staende {
  margin-bottom: var(--space-4);
}

.ticket-bilder__waehlen[hidden] {
  display: none;
}

.schwaerzen {
  width: min(64rem, calc(100vw - 2 * var(--space-4)));
  max-height: calc(100vh - 2 * var(--space-4));
  padding: var(--space-4);
  color: var(--color-text);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-lg);
}

.schwaerzen::backdrop {
  background: rgb(var(--schatten) / calc(0.6 * var(--schatten-staerke)));
}

.schwaerzen[open] {
  display: grid;
  gap: var(--space-3);
}

.schwaerzen__kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.schwaerzen__titel {
  margin: 0;
  font-size: var(--font-size-md);
}

.schwaerzen__modus {
  display: flex;
  gap: var(--space-2);
}

/* Das ganze Bild passt immer ins Fenster, auch ein Handyfoto im Hochformat:
   Mit touch-action none ließe sich eine scrollende Fläche am Handy nicht
   wischen, und der untere Rand bliebe ungeschwärzt (Click Pilot, 0.99.10) */
.schwaerzen__flaeche {
  min-height: 0;
  display: flex;
  justify-content: center;
}

.schwaerzen__flaeche canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 16rem);
  max-height: calc(100dvh - 16rem);
  touch-action: none;
  cursor: crosshair;
}

.schwaerzen__aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.schwaerzen__abstand {
  flex: 1 1 auto;
}

/* ------------------------------------------------------------------
   0.99.14 Hilfe mit Suche (F11)
   ------------------------------------------------------------------ */

.hilfe-suche {
  display: flex;
  gap: var(--space-2);
  max-width: 880px;
  margin-bottom: var(--space-4);
}

.hilfe-suche .field__input {
  flex: 1 1 auto;
  min-width: 0;
}

.hilfe {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 880px);
  gap: var(--space-6);
  align-items: start;
}

/* Klebt beim Lesen unter der Kopfzeile – und scrollt selbst, wenn es höher
   ist als das Fenster. Ohne Höhengrenze war das Ende der Liste erst am
   Seitenende erreichbar (Waldemar, 17.11.2026) */
.hilfe__verzeichnis {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  min-width: 0;
  max-height: calc(100vh - var(--header-height) - var(--space-8));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.hilfe__verzeichnis--schmal {
  display: none;
}

.hilfe__verzeichnis ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
}

.hilfe__verzeichnis ul ul {
  margin: var(--space-1) 0 var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
}

.hilfe__verzeichnis a {
  display: block;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.hilfe__verzeichnis a:hover,
.hilfe__verzeichnis a[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.hilfe__inhalt {
  min-width: 0;
}

.hilfe__titel {
  margin: 0;
  font-size: var(--font-size-xl);
}

.hilfe-abschnitt {
  scroll-margin-top: var(--space-6);
  overflow-wrap: anywhere;
}

.hilfe-abschnitt h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-lg);
}

.hilfe-abschnitt p,
.hilfe-abschnitt ul,
.hilfe-abschnitt ol {
  margin: 0 0 var(--space-2);
  line-height: 1.6;
}

.hilfe-abschnitt li + li {
  margin-top: var(--space-1);
}

.hilfe__treffer {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

.hilfe__treffer a {
  overflow-wrap: anywhere;
}

.hilfe__auszug {
  margin: var(--space-1) 0 0;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

.hilfe__kacheln {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-3);
}

.hilfe__kachel {
  display: grid;
  align-content: start;
  gap: var(--space-1);
  height: 100%;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.hilfe__kachel:hover {
  background: var(--color-surface-hover);
}

/* Am Handy: Inhalt als aufklappbare Liste über dem Text */
@media (max-width: 900px) {
  .hilfe {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
  }

  .hilfe__verzeichnis--breit {
    display: none;
  }

  .hilfe__verzeichnis--schmal {
    display: block;
    position: static;
    max-height: none;
    overflow: visible;
  }

  .hilfe__verzeichnis--schmal summary {
    cursor: pointer;
    padding: var(--space-2) 0;
    font-weight: 600;
  }
}

/* Hilfe nach den Schreibregeln (0.99.15): Gruppen, Rechte-Schild, Schritte */
.hilfe-gruppe {
  margin: var(--space-6) 0 var(--space-2);
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--color-border);
  font-size: var(--font-size-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.hilfe-gruppe:first-of-type {
  margin-top: var(--space-2);
  padding-top: 0;
  border-top: 0;
}

.hilfe-schild {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 100%;
  margin: 0 0 var(--space-2);
  padding: 2px var(--space-2);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  overflow-wrap: anywhere;
}

.hilfe-schild svg {
  flex: 0 0 auto;
}

.hilfe-abschnitt ol {
  padding-left: 1.4em;
}

.hilfe-abschnitt b {
  color: var(--color-text);
  font-weight: 600;
}

.hilfe__gruppe-klappe > summary {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-md);
}

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

.hilfe__gruppe-klappe > summary::before {
  content: "›";
  display: inline-block;
  width: 0.8em;
  font-size: 1.2em;
  line-height: 1;
  transition: transform 0.15s ease;
}

.hilfe__gruppe-klappe[open] > summary::before {
  transform: rotate(90deg);
}

.hilfe__gruppe-klappe > summary:hover {
  color: var(--color-text);
}

.hilfe__gruppe-klappe > ul {
  margin-left: var(--space-2);
}

.hilfe__verzeichnis a[aria-current="location"] {
  color: var(--color-text);
  background: var(--color-surface-hover);
}

.hilfe__verzeichnis .hilfe__gruppe {
  margin-top: var(--space-2);
  padding: 0 var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Hilfe: häufige Aufgaben nach Rolle auf der Startseite */
.hilfe__rollen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-2);
}

.hilfe__rolle {
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
}

.hilfe__rolle h3 {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.hilfe__rolle ul {
  display: grid;
  gap: var(--space-1);
  padding: 0;
  list-style: none;
  font-size: var(--font-size-sm);
}

.hilfe__rolle a {
  overflow-wrap: anywhere;
}

/* ---------- 0.99.20 – Wischhinweis an der Kopfleiste (E8) ----------
   Weicher Rand nur auf der Seite, auf der es weitergeht; js/header-nav.js
   setzt die Klassen. 32 px wie RAND dort. */
.header__nav--weiter-rechts {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

.header__nav--weiter-links {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 32px);
  mask-image: linear-gradient(to right, transparent, #000 32px);
}

.header__nav--weiter-links.header__nav--weiter-rechts {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}

/* ---------- 0.99.20 – Zahl offener Raumanfragen an Reiter und Knopf (E9) ---------- */
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 var(--space-1);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* ==================================================================
   Veranstaltung anlegen (0.99.29, UX-Prüfer)
   ================================================================== */

/* Gruppe von Häkchen ohne den Rahmen des Browsers */
fieldset.field--plain {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* „Wer geht durch die Einweisung?“ nur mit gewählter Einweisung */
.form-section:has(#einweisung option[value=""]:checked) .einweisung-wer {
  display: none;
}

/* ---------- Lange Namen in Tabellen am Handy (0.99.33) ----------
   .data-table__person bricht am Rechner bewusst nicht um. In der Kartenansicht
   (bis 700 px) lief „Fernseher Eingangshalle neben der Garderobe im
   Erdgeschoss Nord“ 180 px über die Karte – gefunden erst mit den langen
   Prüfdaten der Infobildschirme. */
@media (max-width: 700px) {
  .data-table__person {
    min-width: 0;
    white-space: normal;
  }

  .data-table__person > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* Links in Hinweistexten sichtbar als Links – der Gastname unter „Profil
   löschen“ war grau wie der Text daneben (Click Pilot 0.99.33) */
.field__hint a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Abhaken (0.99.34, UX-Prüfer Kern #6) ----------
   Sichtbar, dass der Haken sendet; der Offline-Hinweis steht unter der
   Zeile (data-offline-unter), nicht über dem Artikel. */
.catering-item__toggle[aria-busy="true"] {
  cursor: progress;
  opacity: 0.5;
}

.catering-item {
  flex-wrap: wrap;
}

.catering-item > .form-offline {
  /* .form-offline hat order: -1 (oben in der Knopfleiste) – hier unter die Zeile */
  order: 0;
  flex-basis: 100%;
  margin: var(--space-1) 0 0;
}

/* Der Anker der Aufgabe landet unter der klebenden Kopfzeile statt darunter */
.catering-card {
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

/* ---------- Kontomenü in Gruppen (0.99.34, UX-Prüfer Kern #9) ----------
   Trennlinie zwischen Meine …, Einstellungen, Hilfe, Betrieb und Abmelden.
   Fehlt eine Gruppe (Gerät, Gast), fallen doppelte und führende Linien weg. */
.account-menu__trenner {
  height: var(--border-width);
  margin: var(--space-1) 0;
  background: var(--color-border);
}

.account-menu__header + .account-menu__trenner,
.account-menu__trenner + .account-menu__trenner {
  display: none;
}

/* Kennzahlen am Rechner: „16 von / 30“ und „Räume / frei“ brachen in
   schmalen Kacheln um (UX-Prüfer Kern #12, 0.99.34) */
.overview-stat__figure,
.overview-stat__label {
  white-space: nowrap;
}

/* Lange Gruppennamen in Knöpfen („Lehrmittel und Moderationsmaterial
   Schulungszentrum Köln: Artikel pflegen“) liefen bei 390 px 95 px über die
   Kachel (Click Pilot 0.99.34). Die Filterchips oben sind am Handy eine
   wischbare Reihe und bleiben einzeilig. */
.catering-card__actions .button {
  max-width: 100%;
  height: auto;
  white-space: normal;
  text-align: left;
}

/* Mit flex-wrap (Offline-Hinweis) rutschte ein langer Artikeltext unter
   den Haken – der Text nimmt den Rest der Zeile */
.catering-item__text {
  flex: 1 1 0;
  min-width: 0;
}

/* Suchfeld am Touchgerät: Das Feld selbst war 42 px (44 minus Rahmen),
   getippt wird aber das Feld (Click Pilot 0.99.34) */
@media (pointer: coarse) {
  .search {
    height: auto;
  }

  .search__input {
    min-height: 44px;
  }
}
