/* ============================================================
   app.css — Komponentenbibliothek v3 "Poolside Light" (Phase 5)
   Baut ausschließlich auf tokens.css auf. Jede Seite nutzt NUR
   diese Komponenten; neue Muster werden HIER ergänzt.
   ============================================================ */

/* ---- Reset & Basis ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  line-height: var(--lh-body); -webkit-font-smoothing: antialiased;
  min-height: 100vh; padding-bottom: 0;
}
/* Bottom-Nav schlanker: Höhen-Token hier überschrieben (tokens.css gehört nicht
   zu dieser Baustelle). Reduziert 74px → 66px → 56px; die Bar selbst ist ~54px
   (Touch-Ziel bleibt ≥44px). Alle abhängigen Abstände (has-bottomnav/has-nav
   padding-bottom, #toasts, .site-foot) ziehen über --bottomnav-h automatisch nach. */
:root { --bottomnav-h: calc(56px + var(--safe-bottom)); }
body.has-bottomnav { padding-bottom: var(--bottomnav-h); }
h1,h2,h3,h4 { margin: 0; font-weight: 700; letter-spacing: var(--track-tight); line-height: var(--lh-tight); text-wrap: balance; }
a { color: var(--a-ink); }
:focus-visible { outline: 3px solid rgba(74,144,244,.4); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 999; background: var(--card); padding: 10px 16px; border-radius: var(--r-m); box-shadow: var(--sh-2); }
.skip-link:focus { left: 12px; }

/* ---- Icons (SVG-Sprite, Linien) ---- */
svg.ic { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round;
  stroke-linejoin: round; display: inline-block; vertical-align: middle; flex: none;
  width: 20px; height: 20px; }

/* ---- Layout ---- */
.page { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter) var(--sp-7); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-6) 0 var(--sp-5); flex-wrap: wrap; }
.page-head h1 { font-size: var(--text-3xl); }
.page-head .sub { color: var(--ink-soft); margin-top: 6px; font-size: var(--text-base); }

/* ---- Karten ---- */
.card { background: var(--card); border: 1px solid var(--card-brd); border-radius: var(--r-l); box-shadow: var(--sh-2); }
.card-pad { padding: var(--sp-5); }
/* text-transform/letter-spacing/color explizit: Alt-style.css macht aus
   .card-title ein uppercase-Micro-Label (0.78rem, letter-spacing .8px,
   --text-secondary) — diese Properties würden sonst durchsickern. */
.card-title { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--sp-4); display: flex; align-items: center; gap: 10px;
  text-transform: none; letter-spacing: var(--track-tight); color: var(--ink); }
.card-title .ic { color: var(--a-ink); }

/* ---- Interaktive Startseiten-Kacheln ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-4); }
/* Tablet/Desktop: deutlich BREITERE Kacheln (User-Feedback) — größere
   min-Breite → weniger Spalten pro Reihe, mehr Luft. Mobil (≤640px)
   bleibt das 2-Spalten-Raster unten unverändert. */
@media (min-width: 641px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-5); }
  /* Inhaltsreiche Kacheln (Termine, Trainingszeiten) wie mobil verbreitern:
     kleine Tablets volle Zeile, ab Desktop doppelte Spaltenbreite. */
  #t-next, #t-times { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  #t-next, #t-times { grid-column: span 2; }
}
.tile { position: relative; min-width: 0; background: var(--card); border: 1px solid var(--card-brd);
  border-radius: var(--r-l); box-shadow: var(--sh-1); padding: 15px;
  display: flex; flex-direction: column; gap: 9px; color: var(--ink); text-decoration: none;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.tile:active { transform: scale(.985); }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile-head .ic { color: var(--a-ink); width: 24px; height: 24px; }
.tile-label { font-size: .82rem; font-weight: 700; color: var(--ink-soft); letter-spacing: .02em; }
.tile-value { font-size: 1.65rem; font-weight: 760; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile-value em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tile-sub { color: var(--ink-mute); font-size: .84rem; }
.tile-actions { display: flex; gap: 8px; margin-top: auto; }
.tile.tile-hero { grid-column: 1 / -1; background: var(--grad); border: none; color: #fff;
  box-shadow: var(--sh-grad); flex-direction: row; align-items: center; gap: 18px; padding: 22px; }
.tile.tile-hero .ic { color: #fff; width: 34px; height: 34px; }
.tile.tile-hero .tile-sub { color: rgba(255,255,255,.8); }
.tile.tile-hero .chev { margin-left: auto; color: rgba(255,255,255,.85); }
.tile.tile-on { background: var(--grad); border: none; color: #fff; box-shadow: var(--sh-grad); }
.tile.tile-on .ic, .tile.tile-on .tile-label { color: #fff; }
.tile.tile-on .tile-sub { color: rgba(255,255,255,.78); }
/* minmax(0,1fr): 1fr allein schrumpft nie unter den Inhalt -> nowrap-Zeilen sprengten das Raster */
@media (max-width: 640px) { .tiles { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } .tile.tile-hero { grid-column: 1 / -1; } }

/* Kachel-Inline-Aktionen (z.B. Zusagen/Absagen) */
.chipbtn { font: inherit; font-size: .82rem; font-weight: 700; border: none; cursor: pointer;
  min-height: 38px; padding: 8px 14px; border-radius: var(--r-full);
  background: var(--bg); color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast); }
.chipbtn:hover { transform: translateY(-1px); }
.chipbtn .ic { width: 15px; height: 15px; }
.chipbtn.on-ok { background: rgba(47,191,143,.14); color: var(--ok); }
.chipbtn.on-no { background: rgba(232,101,79,.13); color: var(--crit); }
.tile-hero .chipbtn { background: rgba(255,255,255,.2); color: #fff; }

/* Anwesenheit "Wer ist dabei?" — Aufklapp-Namensliste in der Startkachel */
.att-who-toggle { font: inherit; font-size: .8rem; font-weight: 700; background: none; border: none;
  cursor: pointer; color: var(--a-ink); padding: 2px 0; text-align: left; align-self: flex-start; }
.att-who-toggle:hover { text-decoration: underline; }
.att-who { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.att-who .who-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.att-who .who-label { font-size: .72rem; font-weight: 700; color: var(--ink-mute);
  text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.att-who .who-name { font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full); }
.att-who .who-name.go { color: var(--ok); background: rgba(47,191,143,.13); }
.att-who .who-name.no { color: var(--crit); background: rgba(232,101,79,.12); }
.att-who .who-empty { font-size: .78rem; color: var(--ink-mute); }

/* ---- Stat-Zeile ---- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px;
  background: var(--card-brd); border-radius: var(--r-l); overflow: hidden;
  border: 1px solid var(--card-brd); box-shadow: var(--sh-2); }
.stat { background: var(--card); padding: 18px 16px; text-align: center; }
.stat .v { font-size: 1.6rem; font-weight: 760; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .v em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .l { color: var(--ink-mute); font-size: .8rem; margin-top: 3px; }

/* ---- Buttons ---- */
.btn { font: inherit; font-weight: 700; font-size: .95rem; border: none; cursor: pointer;
  min-height: var(--touch); padding: 12px 24px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none;
  transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), filter var(--dur-fast); }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--sh-grad); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-soft { background: var(--grad-soft); color: var(--a-ink); }
.btn-ghost { background: var(--card); color: var(--ink-soft); border: 1px solid var(--card-brd); box-shadow: var(--sh-1); }
.btn-danger { background: rgba(232,101,79,.12); color: var(--crit); }
.btn-sm { min-height: 38px; padding: 8px 16px; font-size: .85rem; }

/* ---- Formulare ---- */
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 7px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink);
  padding: 13px 15px; border-radius: var(--r-m); background: var(--bg);
  border: 1px solid var(--card-brd); min-height: var(--touch); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none;
  border-color: var(--a1); background: var(--card); box-shadow: 0 0 0 4px rgba(74,144,244,.12); }
.field .hint { font-size: .78rem; color: var(--ink-mute); margin-top: 5px; }
.field.err input { border-color: var(--crit); }
.field .errmsg { font-size: .8rem; color: var(--crit); margin-top: 5px; }

/* ---- Privatsphäre-Umschalter ---- */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--card-brd);
  border-radius: var(--r-full); padding: 5px; gap: 3px; }
.seg button { font: inherit; font-size: .83rem; font-weight: 700; border: none; background: transparent;
  color: var(--ink-mute); padding: 9px 15px; border-radius: var(--r-full); cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; }
.seg button .ic { width: 15px; height: 15px; }
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: var(--sh-1); }
.seg .s-pub[aria-pressed="true"] { color: var(--ok); }
.seg .s-trn[aria-pressed="true"] { color: var(--warn); }
.seg .s-prv[aria-pressed="true"] { color: var(--crit); }

/* ---- Pills / Badges ---- */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px;
  border-radius: var(--r-full); font-size: .78rem; font-weight: 700; }
.pill .ic { width: 14px; height: 14px; }
.pill-ok { color: var(--ok); background: rgba(47,191,143,.12); }
.pill-warn { color: var(--warn); background: rgba(235,168,58,.14); }
.pill-crit { color: var(--crit); background: rgba(232,101,79,.12); }
.pill-info { color: var(--a-ink); background: var(--grad-soft); }

/* ---- Tabellen ---- */
.tablecard { padding: 4px 8px; overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th { text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-mute); padding: 12px 16px; border-bottom: 1px solid var(--card-brd); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--card-brd); }
.tbl tr:last-child td { border: none; }
.tbl tbody tr:hover td { background: var(--bg); }
.tbl .no { font-family: var(--mono); font-size: .8rem; color: var(--ink-mute); }
.tbl .no.top { color: var(--a-ink); font-weight: 700; }
.tbl .time { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.who { display: flex; align-items: center; gap: 11px; }
.ava { width: 32px; height: 32px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: .72rem; font-weight: 800; flex: none; overflow: hidden; }
.ava img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Zustände ---- */
.skel { height: 13px; border-radius: 7px; background: linear-gradient(90deg, var(--bg), var(--bg-soft), var(--bg));
  background-size: 200% 100%; animation: skel-sh 1.4s infinite; }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
@keyframes skel-sh { to { background-position: -200% 0; } }
.empty { text-align: center; padding: var(--sp-6); color: var(--ink-mute); }
.empty .ic { width: 38px; height: 38px; opacity: .55; margin-bottom: 8px; }

/* ---- Toast ---- */
/* z-index 1200 > Bottom-Nav (1000); bottom über --bottomnav-h + Nav-Abstand
   (10px) + 12px Luft → Toasts erscheinen sichtbar ÜBER der Bottom-Nav. */
#toasts { position: fixed; left: 50%; transform: translateX(-50%); z-index: 1200;
  bottom: calc(var(--bottomnav-h) + 22px); display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
body:not(.has-bottomnav) #toasts { bottom: 24px; }
.toast { background: var(--glass); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-brd); box-shadow: var(--sh-3); border-radius: var(--r-m);
  padding: 12px 16px; font-size: .9rem; font-weight: 600; display: flex; gap: 10px; align-items: center;
  animation: toast-in var(--dur-base) var(--ease); }
.toast .ic { width: 17px; height: 17px; }
.toast.ok .ic { color: var(--ok); } .toast.err .ic { color: var(--crit); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---- Modal ---- */
.modal-ov { position: fixed; inset: 0; z-index: 1100; background: rgba(20,30,50,.4);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--card); border-radius: var(--r-xl); box-shadow: var(--sh-3);
  width: min(480px, 100%); max-height: 86vh; overflow-y: auto; padding: var(--sp-5); }

/* ============================================================
   NAVIGATION
   ============================================================ */
/* Desktop Top-Bar */
.topnav { position: sticky; top: 0; z-index: 900; background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(1.4); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  border-bottom: 1px solid var(--card-brd); }
.topnav-in { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--nav-h); display: flex; align-items: center; gap: var(--sp-4); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.brand .mark { width: 34px; height: 34px; border-radius: 11px; background: var(--grad);
  display: grid; place-items: center; color: #fff; box-shadow: var(--sh-grad); }
.brand .mark .ic { width: 19px; height: 19px; }
.navlinks { display: flex; gap: 2px; margin-left: var(--sp-4); }
.navlinks a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .92rem;
  padding: 9px 14px; border-radius: var(--r-full); transition: background var(--dur-fast), color var(--dur-fast); }
.navlinks a:hover { background: var(--bg); color: var(--ink); }
.navlinks a.on { background: var(--grad-soft); color: var(--a-ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.iconbtn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--card-brd);
  background: var(--card); color: var(--ink-soft); cursor: pointer; display: grid; place-items: center; box-shadow: var(--sh-1); }
.iconbtn .ic { width: 18px; height: 18px; }
.nav-user { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .9rem; }

/* Unterseiten-Dropdown (Desktop) */
.pagemenu { position: relative; }
.pagemenu-btn { font: inherit; font-weight: 700; font-size: .95rem; border: 1px solid var(--card-brd);
  background: var(--card); color: var(--ink); box-shadow: var(--sh-1); cursor: pointer;
  padding: 9px 16px; border-radius: var(--r-full); display: inline-flex; align-items: center; gap: 8px; }
.pagemenu-list { position: absolute; top: calc(100% + 8px); left: 0; z-index: 950; min-width: 230px;
  background: var(--glass); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-brd); border-radius: var(--r-l); box-shadow: var(--sh-3); padding: 8px; display: none; }
.pagemenu.open .pagemenu-list { display: block; }
.pagemenu-list a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--r-m);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; }
.pagemenu-list a:hover { background: var(--grad-soft); }
.pagemenu-list a.on { color: var(--a-ink); }
.pagemenu-list .sep { height: 1px; background: var(--card-brd); margin: 6px 4px; }

/* Mobile: Liquid-Glass-Bottom-Nav */
.bottomnav { position: fixed; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom)); z-index: 1000;
  display: none; justify-content: space-around; gap: 2px; padding: 3px 4px; border-radius: 22px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(var(--blur)) saturate(1.6); -webkit-backdrop-filter: blur(var(--blur)) saturate(1.6);
  border: 1px solid var(--glass-brd); box-shadow: 0 12px 32px rgba(34,48,74,.18); }
/* Schlankere Bar (~54px): min-height 46px hält das Touch-Ziel ≥44px, das
   vertikale Padding ist minimiert. */
.bottomnav a { flex: 1 1 0; min-width: 0; text-align: center; text-decoration: none; color: var(--ink-mute);
  font-size: .57rem; font-weight: 700; letter-spacing: -.01em; padding: 2px 1px; display: flex; flex-direction: column;
  gap: 1px; align-items: center; border-radius: 14px; min-height: 46px; justify-content: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bottomnav a span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.bottomnav a .ic { width: 19px; height: 19px; }
.bottomnav a.on { color: var(--a-ink); }
.bottomnav a.on::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--grad); }

@media (max-width: 860px) {
  .navlinks, .pagemenu { display: none; }
  .bottomnav { display: flex; }
  body.has-nav { padding-bottom: var(--bottomnav-h); }
  /* Skalierungs-Audit 375px: langer Vereinsname drückte .nav-right aus dem
     Viewport (Logout-Button abgeschnitten). Brand darf schrumpfen + Ellipsis,
     Icons rechts bleiben vollständig sichtbar. */
  .topnav-in { gap: 10px; min-width: 0; }
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-right { flex: none; }
}

/* Auth-Seiten (Login etc.): Vollbild-Hintergrund + schwebende Karte */
.auth-bg { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(90% 60% at 80% 0%, rgba(63,208,201,.25), transparent 60%),
    radial-gradient(80% 60% at 10% 100%, rgba(74,144,244,.22), transparent 60%),
    linear-gradient(160deg, #dcecfb 0%, #eef7fb 45%, #d7f2f0 100%); }
:root[data-theme="dark"] .auth-bg { background:
    radial-gradient(90% 60% at 80% 0%, rgba(63,208,201,.12), transparent 60%),
    radial-gradient(80% 60% at 10% 100%, rgba(74,144,244,.12), transparent 60%),
    linear-gradient(160deg, #101a28 0%, #0d1622 55%, #0e1f26 100%); }
/* Auth-Dark auch für den Media-Query-Pfad (JS aus / data-theme nicht gesetzt) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth-bg { background:
      radial-gradient(90% 60% at 80% 0%, rgba(63,208,201,.12), transparent 60%),
      radial-gradient(80% 60% at 10% 100%, rgba(74,144,244,.12), transparent 60%),
      linear-gradient(160deg, #101a28 0%, #0d1622 55%, #0e1f26 100%); }
}
.auth-card { width: min(420px, 100%); background: var(--glass); backdrop-filter: blur(var(--blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4); border: 1px solid var(--glass-brd);
  border-radius: var(--r-xl); box-shadow: var(--sh-3); padding: 30px; }
.auth-card .brand { justify-content: center; margin-bottom: 18px; }
.auth-title { text-align: center; font-size: var(--text-2xl); }
.auth-sub { text-align: center; color: var(--ink-soft); font-size: .92rem; margin: 8px 0 22px; }
.auth-links { text-align: center; margin-top: 16px; font-size: .88rem; }
.remember { display: flex; align-items: center; gap: 9px; font-size: .88rem; font-weight: 600; color: var(--ink-soft); margin: 4px 0 16px; cursor: pointer; }
.remember input { width: 18px; height: 18px; accent-color: var(--a1); }

/* ============================================================
   Übergangs-Overrides gegen Alt-style.css (bis alle Seiten
   migriert sind): Ground, Inputs, Auth-Seiten ohne Topnav.
   ============================================================ */
/* KRITISCH: Alt-style.css sperrt html/body auf height:100%;overflow:hidden (Kiosk-Layout).
   v3 scrollt über den Body → Sperre aufheben, normales Dokument-Scrollen erlauben. */
html, body { background: var(--bg) !important; height: auto !important; min-height: 100% !important;
  overflow: visible !important; overflow-x: hidden !important; position: static !important; }
body::before, body::after { content: none !important; }
.field input, .field select, .field textarea {
  background: var(--bg) !important; border: 1px solid var(--card-brd) !important;
  color: var(--ink) !important; box-shadow: none !important; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--a1) !important; background: var(--card) !important;
  box-shadow: 0 0 0 4px rgba(74,144,244,.12) !important; }
/* Auth-Seiten: volle Fläche, keine Topnav/Bottom-Nav */
body:has(.auth-bg) .topnav, body:has(.auth-bg) .bottomnav { display: none; }
body:has(.auth-bg) { padding-bottom: 0 !important; }
.auth-bg { min-height: 100vh; }

/* Alt-style.css setzt body.dark-mode { --bg: <dunkler Gradient> } und
   schlägt damit die :root-Tokens (Klasse+Element > :root-Guard greift
   hier nicht, da Custom-Property-Vererbung über den body läuft).
   inherit → body erbt --bg wieder vom html-Element = Token-Wert. */
body.dark-mode { --bg: inherit; }

/* ---- Footer (dezent, unter dem Inhalt) ---- */
.site-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 5px; text-align: center; color: var(--ink-mute); font-size: .66rem; opacity: .8;
  padding: 12px 16px calc(12px + var(--safe-bottom)); }
.site-foot .sep { opacity: .6; }
body.has-bottomnav .site-foot { padding-bottom: calc(var(--bottomnav-h) + 8px); }
@media (max-width: 640px) {
  .site-foot { font-size: .58rem; gap: 4px; padding: 8px 12px calc(8px + var(--safe-bottom)); }
}

/* Timer-Phasen-Punkte (ersetzen 🟢/🟠) */
.dot-ok, .dot-warn { display:inline-block; width:10px; height:10px; border-radius:50%; vertical-align:middle; }
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-crit { display:inline-block; width:10px; height:10px; border-radius:50%; vertical-align:middle;
  background: var(--crit); animation: dotpulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce){ .dot-crit { animation: none; } }
@keyframes dotpulse { 50% { opacity: .45; } }
