/* TB Party Admin-Portal – Gestaltung
   Idee „Werkstatt-Leitstand“: ruhige, helle Arbeitsfläche, Navy für Struktur und Aktionen,
   Amber nur für das, was Aufmerksamkeit braucht (Warteschlangen-Anhänger, aktives Menü, Fokus).
   Schriften wie in der App: Archivo (Überschriften, Zahlen, Menü) und DM Sans (Text, Tabellen). */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 500 900; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/Archivo-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 500 900; font-stretch: 62% 125%; font-display: swap;
  src: url(fonts/Archivo-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/DMSans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(fonts/DMSans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --navy: #0C2D5B;
  --navy-2: #17447F;
  --navy-3: #08203F;
  --navy-soft: #E5ECF6;
  --amber: #EFB34C;
  --amber-soft: #FCF0D6;
  --amber-ink: #6B4A07;
  --bg: #F2F5F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --ink: #172A45;
  --muted: #5A6A81;
  --line: #D5DDE8;
  --line-2: #E6EBF2;
  --ok: #1B7349;
  --ok-soft: #E4F3EA;
  --danger: #B3261E;
  --danger-soft: #FBEAE8;
  --r-sm: 6px;
  --r-md: 10px;
  --font-ui: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Archivo', 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-code: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --rail-w: 240px;
  /* Statistik (v1.39): Reihenfarben geprüft mit dem Paletten-Validator (alle Paare, Fläche #FFFFFF: Farbsehschwäche-ΔE ≥ 10,5,
     normal ≥ 22,6, Kontrast ≥ 3:1). Vergleich = Grau. Wärmebild = ein Farbton hell → dunkel (7 Stufen, 0 = neutral). */
  --s1: #2B5C9E;
  --s2: #D9622B;
  --s3: #1B9E77;
  --cmp: #98A4B5;
  --track: #EEF2F7;
  --hm0: #F1F4F8;
  --hm1: #DAEDFF;
  --hm2: #BAD3F5;
  --hm3: #97B6E2;
  --hm4: #7197CC;
  --hm5: #3A69AA;
  --hm6: #234D85;
  --hm7: #11325E;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.adm, body.pub {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--navy-2); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-head); color: var(--navy); margin: 0; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--font-code); font-size: 13px; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(239, 179, 76, .55); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; font-weight: 600; }
.skip { position: fixed; z-index: 120; left: 8px; top: -80px; padding: 10px 14px; border: 0; border-radius: var(--r-sm); background: var(--amber); color: var(--navy); font: 700 14px var(--font-ui); cursor: pointer; }
.skip:focus { top: 8px; }

/* ---------- Ladebalken (Maßband) ---------- */
.loadbar {
  position: fixed; z-index: 90; top: 0; left: 0; right: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--amber) 0 9px, var(--navy) 9px 10px);
  background-size: 40px 3px; animation: tape .7s linear infinite;
}
@keyframes tape { to { background-position: 40px 0; } }

/* ---------- Start ---------- */
.boot { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.boot img { border-radius: 12px; }

/* ---------- Knöpfe ---------- */
.btn {
  --b-bg: var(--surface); --b-fg: var(--navy); --b-line: #B9C6D8;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 7px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--b-line); background: var(--b-bg); color: var(--b-fg);
  font: 600 14px/1.2 var(--font-ui); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .12s, border-color .12s;
}
.btn:hover { --b-bg: var(--surface-2); --b-line: var(--navy); color: var(--b-fg); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { --b-bg: var(--navy); --b-fg: #fff; --b-line: var(--navy); }
.btn-primary:hover { --b-bg: var(--navy-2); --b-line: var(--navy-2); }
.btn-ok { --b-bg: var(--ok); --b-fg: #fff; --b-line: var(--ok); }
.btn-ok:hover { --b-bg: #145C3A; --b-line: #145C3A; }
.btn-danger { --b-bg: var(--surface); --b-fg: var(--danger); --b-line: #E2A9A4; }
.btn-danger:hover { --b-bg: var(--danger-soft); --b-line: var(--danger); }
.btn-danger-solid { --b-bg: var(--danger); --b-fg: #fff; --b-line: var(--danger); }
.btn-danger-solid:hover { --b-bg: #8F1D17; --b-line: #8F1D17; }
.btn-ghost { --b-bg: transparent; --b-line: transparent; }
.btn-ghost:hover { --b-bg: var(--navy-soft); --b-line: transparent; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn kbd { font: 600 11px/1 var(--font-ui); padding: 3px 5px; border-radius: 4px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.35); }
.btn-danger kbd, .btn:not(.btn-primary):not(.btn-ok):not(.btn-danger-solid) kbd { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--navy-2); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
@media (pointer: coarse) { .btn { min-height: 44px; } .btn-sm { min-height: 38px; } }

/* ---------- Anhänger (Warteschlangen-Zähler) ---------- */
.tag {
  --tag-bg: var(--amber); --hole: var(--surface);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 22px; min-width: 24px; margin-left: 9px; padding: 0 7px 0 6px;
  border-radius: 0 4px 4px 0; background: var(--tag-bg); color: var(--navy);
  font: 700 13px/1 var(--font-head); font-stretch: 85%; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.tag::before { content: ''; position: absolute; left: -9px; top: 0; border-style: solid; border-width: 11px 9px 11px 0; border-color: transparent var(--tag-bg) transparent transparent; }
.tag::after { content: ''; position: absolute; left: -3px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--hole); }
.tag-zero { --tag-bg: #E2E8F0; color: var(--muted); }
.tag-lg { height: 30px; min-width: 34px; padding: 0 10px 0 8px; font-size: 17px; margin-left: 12px; }
.tag-lg::before { left: -12px; border-width: 15px 12px 15px 0; }
.tag-lg::after { left: -4px; width: 7px; height: 7px; margin-top: -3.5px; }

/* ---------- Abzeichen ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font: 600 12px/1.5 var(--font-ui); background: #EAEFF5; color: #3E4E66; white-space: nowrap; }
.badge-admin { background: var(--navy); color: #fff; }
.badge-mod { background: var(--navy-soft); color: var(--navy); }
.badge-blocked { background: var(--danger-soft); color: var(--danger); }
.badge-plus { background: var(--amber-soft); color: var(--amber-ink); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--amber-soft); color: var(--amber-ink); }
.badge-draft { background: #EEF1F5; color: var(--muted); border: 1px dashed #B9C6D8; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .field > .lbl { font-weight: 600; font-size: 14px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); margin: 0; }
input[type=text], input[type=email], input[type=search], input[type=number], input[type=url], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid #B9C6D8; border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font: 400 16px/1.35 var(--font-ui);
}
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: #8EA0B8; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--navy); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--navy); flex: none; }
.form-err { color: var(--danger); font-size: 14px; font-weight: 600; margin: 6px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span2 { grid-column: 1 / -1; }
@media (max-width: 719px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.seg { display: inline-flex; border: 1px solid #B9C6D8; border-radius: var(--r-sm); overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 13px; font: 600 14px/1.2 var(--font-ui); color: var(--muted); cursor: pointer; min-height: 36px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.switch:last-child { border-bottom: 0; }
.switch strong { display: block; }
.switch small { color: var(--muted); font-size: 13px; }
.switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 13px; background: #C3CDDA; position: relative; cursor: pointer; flex: none; transition: background-color .15s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(20px); }

/* ---------- Hinweise ---------- */
.note { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--navy-soft); color: var(--navy); font-size: 14px; margin: 0 0 14px; }
.note-warn { background: var(--amber-soft); color: #5A3E05; border-left: 4px solid var(--amber); }
.note-danger { background: var(--danger-soft); color: #7D1A14; border-left: 4px solid var(--danger); }
.note-ok { background: var(--ok-soft); color: #134F33; }
.note p:last-child { margin: 0; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-brand img { border-radius: 10px; }
.auth-brand strong { display: block; font: 800 22px/1.1 var(--font-head); font-stretch: 85%; color: var(--navy); }
.auth-brand span { color: var(--muted); font-size: 14px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px 26px 22px; }
.auth-card h1 { font-size: 22px; font-weight: 700; font-stretch: 90%; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.auth-steps { display: flex; gap: 6px; margin-bottom: 16px; }
.auth-steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line-2); }
.auth-steps span.on { background: var(--navy); }
.auth-steps span.cur { background: var(--amber); }
.auth-foot { margin-top: 16px; font-size: 13px; color: var(--muted); }
.code-input { font: 700 26px/1 var(--font-head) !important; letter-spacing: .28em; text-align: center; font-variant-numeric: tabular-nums; }
.mfa-setup { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 18px; align-items: start; margin: 4px 0 16px; }
.mfa-qr { width: 168px; height: 168px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.mfa-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.mfa-secret { font: 600 15px/1.6 var(--font-code); letter-spacing: .06em; word-break: break-all; background: var(--surface-2); border: 1px solid var(--line); padding: 8px 10px; border-radius: 6px; margin: 6px 0 8px; }
.mfa-list { margin: 0 0 14px; padding-left: 20px; font-size: 14px; }
.mfa-list li { margin-bottom: 4px; }
@media (max-width: 479px) { .mfa-setup { grid-template-columns: minmax(0, 1fr); } .mfa-qr { margin: 0 auto; } .auth-card { padding: 20px 16px; } }

/* ---------- Rahmen: Menü + Inhalt ---------- */
.topbar { position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--navy); color: #fff; }
.topbar-menu { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 1px solid rgba(255,255,255,.28); border-radius: var(--r-sm); background: transparent; color: #fff; font: 600 14px var(--font-ui); cursor: pointer; }
.topbar-brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font: 700 17px/1 var(--font-head); font-stretch: 88%; }
.topbar-brand:hover { color: #fff; }
.topbar-brand img { border-radius: 6px; }
.topbar-queue { margin-left: auto; text-decoration: none; }
.topbar-queue .tag { --hole: var(--navy); }
.rail {
  position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: var(--rail-w); max-width: 86vw;
  display: flex; flex-direction: column; background: var(--navy); color: #fff;
  transform: translateX(-102%); transition: transform .2s ease; overflow-y: auto;
}
.shell.nav-open .rail { transform: none; }
.scrim { display: none; }
.shell.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(8, 24, 48, .5); }
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; }
.rail-brand img { border-radius: 8px; }
.rail-brand strong { display: block; font: 800 19px/1.05 var(--font-head); font-stretch: 85%; letter-spacing: .01em; }
.rail-brand span { font-size: 13px; color: rgba(255,255,255,.66); }
.rail-nav { list-style: none; margin: 4px 0; padding: 0 10px; flex: 1; }
.rail-nav a {
  display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 8px 10px; margin: 1px 0; border-radius: var(--r-sm);
  color: rgba(255,255,255,.8); text-decoration: none; font: 600 15px/1.2 var(--font-head); font-stretch: 95%;
}
.rail-nav a svg { flex: none; opacity: .85; }
.rail-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail-nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--amber); }
.rail-nav a:focus-visible { outline-color: var(--amber); box-shadow: none; }
.rail-nav [data-navcount] { margin-left: auto; display: inline-flex; }
.rail-nav .tag { --hole: var(--navy); }
.rail-nav a[aria-current="page"] .tag { --hole: #24426A; }
.rail-nav .sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 8px; }
.rail-user { padding: 14px 18px 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; }
.rail-user .who { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; min-width: 0; }
.rail-user .who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-user .who span { color: rgba(255,255,255,.66); font-size: 13px; }
.rail-user .btn { --b-bg: transparent; --b-fg: #fff; --b-line: rgba(255,255,255,.3); width: 100%; }
.rail-user .btn:hover { --b-bg: rgba(255,255,255,.08); --b-line: #fff; }
.rail-user .btn:focus-visible { outline-color: var(--amber); box-shadow: none; }
.view { padding: 20px 16px 56px; min-width: 0; outline: none; }
.view-inner { max-width: 1240px; }
@media (min-width: 1024px) {
  .topbar, .scrim { display: none !important; }
  .rail { transform: none; transition: none; }
  .view { margin-left: var(--rail-w); padding: 28px 36px 72px; }
  .shell { min-height: 100vh; background: linear-gradient(90deg, var(--navy) var(--rail-w), transparent var(--rail-w)); }
}
.devflag { position: fixed; z-index: 95; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 3px; background: var(--amber); color: var(--navy); font: 700 11px/1.4 var(--font-ui); pointer-events: none; opacity: .9; }
@media (min-width: 1024px) { .devflag { left: auto; right: 6px; bottom: auto; top: 6px; } }

/* ---------- Seitenkopf ---------- */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.ph h1 { font-size: 27px; line-height: 1.15; font-weight: 700; font-stretch: 88%; }
.ph .sub { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.ph .btn-row { margin-left: auto; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; margin-bottom: 10px; text-decoration: none; font-weight: 600; }
.back:hover { text-decoration: underline; }

/* ---------- Flächen ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 20px; min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel-h h2 { font-size: 18px; font-weight: 700; font-stretch: 92%; }
.panel-h .sub { color: var(--muted); font-size: 13px; margin: 0; }
.panel-b { padding: 16px 18px; }
.panel-b.flush { padding: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-2 > .panel { margin-bottom: 0; }
.stack > * + * { margin-top: 20px; }
@media (max-width: 1099px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 20px; overflow: hidden; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: 16px 18px 14px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0 -1px -1px 0; }
.kpi b { display: block; font: 700 34px/1.05 var(--font-head); font-stretch: 78%; color: var(--navy); font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.kpi small { display: block; font-size: 13px; color: var(--ok); margin-top: 2px; }
.kpi small.muted { color: var(--muted); }
.queue-list { list-style: none; margin: 0; padding: 0; }
.queue-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-weight: 600; }
.queue-list li:last-child a { border-bottom: 0; }
.queue-list a:hover { background: var(--surface-2); }
.queue-list .tag { --hole: var(--surface); }
.queue-list a:hover .tag { --hole: var(--surface-2); }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: #2B5C9E; }
.chart .bar-today { fill: #5F86BE; }
.chart .bar.is-hover { fill: var(--navy); }
.chart .axis { fill: var(--muted); font: 400 12px var(--font-ui); }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* ---------- Werkzeugleiste über Tabellen ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.toolbar .field { margin: 0; }
.toolbar .grow { flex: 1 1 260px; }
.toolbar select { width: auto; min-width: 140px; }
.toolbar .check { align-self: center; font-size: 14px; }
.toolbar .checks { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Tabellen ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-weight: 600; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.rowlink { cursor: pointer; }
.tbl tbody tr.rowlink:hover td, .tbl tbody tr:focus-within td { background: #F5F8FC; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .nowrap { white-space: nowrap; }
.tbl .act { text-align: right; white-space: nowrap; }
.tbl .act .btn + .btn { margin-left: 6px; }
.tbl .muted, .muted { color: var(--muted); }
.who-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-cell a, .who-cell strong { font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: break-word; }
.who-cell > div { min-width: 0; }
.tbl td.cell-main { min-width: 190px; }
.who-cell .badge { margin-left: 6px; vertical-align: 1px; }
.who-cell a:hover { text-decoration: underline; color: var(--navy); }
.who-cell .meta { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 719px) {
  .tbl-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl-stack, .tbl-stack tbody { display: block; }
  .tbl-stack tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  .tbl-stack tbody tr:last-child { border-bottom: 0; }
  .tbl-stack td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 0; border: 0; text-align: right; min-height: 26px; }
  .tbl-stack td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
  .tbl-stack td.cell-main { display: block; text-align: left; padding-bottom: 6px; }
  .tbl-stack td.act { justify-content: flex-start; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
  .tbl-stack td.act .btn + .btn { margin-left: 0; }
  .tbl-stack td:empty { display: none; }
}
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--muted); }
.state { padding: 34px 18px; text-align: center; color: var(--muted); }
.state strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.state .btn { margin-top: 12px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Avatare ---------- */
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-soft); object-fit: cover; flex: none; display: block; }
.av.preset { object-fit: contain; object-position: center bottom; }
.av.is-broken { visibility: visible; color: transparent; }
.img-missing { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 48px; padding: 6px; background: var(--navy-soft); color: var(--muted); font-size: 12px; text-align: center; border-radius: 8px; }
.rf-thumb.img-missing { width: 52px; height: 52px; min-height: 0; font-size: 0; }
.av-initial { display: inline-flex; align-items: center; justify-content: center; font: 700 14px/1 var(--font-head); color: var(--navy); }
.av-initial.av-lg { font-size: 28px; }
.av-lg { width: 72px; height: 72px; }
.av-xl { width: 160px; height: 160px; border-radius: 12px; }

/* ---------- Spieler-Detail ---------- */
.pl-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.pl-head > div { flex: 1 1 280px; min-width: 0; }
.pl-head h1 { font-size: 27px; font-weight: 700; font-stretch: 88%; overflow-wrap: anywhere; }
.pl-head .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pl-head .ids { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.pl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.pl-actions { position: sticky; top: 20px; }
.pl-actions .panel-b { display: flex; flex-direction: column; gap: 8px; }
.pl-actions h3 { font-size: 14px; color: var(--muted); font-weight: 600; font-family: var(--font-ui); margin: 6px 0 2px; }
.pl-actions h3:first-child { margin-top: 0; }
.pl-actions .btn { justify-content: flex-start; width: 100%; }
.pl-actions .why { font-size: 12px; color: var(--muted); margin: -2px 0 4px; }
@media (max-width: 1099px) { .pl-layout { grid-template-columns: minmax(0, 1fr); } .pl-actions { position: static; order: -1; } .pl-actions .panel-b { flex-direction: row; flex-wrap: wrap; } .pl-actions .btn { width: auto; } .pl-actions h3 { width: 100%; } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px 18px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font: 700 19px/1.2 var(--font-head); font-stretch: 85%; color: var(--navy); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.facts dd.txt { font: 600 15px/1.35 var(--font-ui); color: var(--ink); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; }
.chip time { color: var(--muted); font-size: 12px; }
.loglist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.loglist li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--line-2); }
.loglist li:last-child { border-bottom: 0; }
.loglist time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.loglist .det { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 479px) { .loglist li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.pending-photo { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ---------- Moderation ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; align-items: center; padding: 10px 14px 11px; color: var(--muted); text-decoration: none; font: 600 15px/1.2 var(--font-head); font-stretch: 95%; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--navy); }
.tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }
.tabs .tag { --hole: var(--bg); }
@media (max-width: 479px) { .tabs a { padding: 9px 9px 10px; font-size: 14px; } .tabs .tag { margin-left: 8px; } }
.report { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.report:last-child { border-bottom: 0; }
.report-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.report-reason { margin: 8px 0 0; padding: 8px 12px; background: var(--surface-2); border-left: 3px solid var(--line); border-radius: 0 6px 6px 0; font-size: 14px; overflow-wrap: anywhere; }
.report-meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.report-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 170px; }
@media (max-width: 719px) { .report { grid-template-columns: minmax(0, 1fr); } .report-act { flex-direction: row; flex-wrap: wrap; min-width: 0; } }
.kbd-hint { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.kbd-hint kbd { font: 600 12px/1 var(--font-ui); padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--ink); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.photo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 10px; outline: none; }
.photo-card:focus-visible, .photo-card.is-focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(239, 179, 76, .7); }
.photo-card .img { aspect-ratio: 1; border-radius: 8px; background: repeating-conic-gradient(#EEF2F7 0 25%, #fff 0 50%) 0 0 / 16px 16px; overflow: hidden; }
.photo-card .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-card .who-cell { font-size: 14px; }
.photo-card .btn-row .btn { flex: 1; }
.photo-card.is-done { opacity: .45; pointer-events: none; }

/* ---------- Verlosungen ---------- */
.rf-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--navy-soft); flex: none; }
.rf-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.rf-head .rf-img { width: 200px; aspect-ratio: 1; border-radius: var(--r-md); object-fit: cover; background: var(--navy-soft); border: 1px solid var(--line); }
.rf-head .rf-noimg { width: 200px; aspect-ratio: 1; border-radius: var(--r-md); background: var(--navy-soft); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; padding: 12px; }
@media (max-width: 719px) { .rf-head { grid-template-columns: minmax(0, 1fr); } .rf-head .rf-img, .rf-head .rf-noimg { width: 140px; } }
.seed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border: 1px dashed var(--navy); border-radius: var(--r-sm); background: var(--surface-2); }
.seed code { font-size: 14px; word-break: break-all; color: var(--navy); font-weight: 600; }
.addr { white-space: pre-line; font-size: 14px; line-height: 1.45; }
.copyable { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; }
.copyable > span { overflow-wrap: break-word; min-width: 0; }
.win-mail { margin: 4px 0 0 44px; font-size: 13px; color: var(--muted); }
.addr { display: block; min-width: 170px; }
.tbl tr.is-redrawn td { color: var(--muted); }
.tbl tr.is-redrawn .who-cell a { color: var(--muted); text-decoration: line-through; }
.lb-note { margin: 0; padding: 0 18px 14px; }
.meta-line { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 46ch; }
.act-wrap { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.team-tbl .act { white-space: normal; min-width: 210px; }
@media (max-width: 719px) { .act-wrap { justify-content: flex-start; } .team-tbl td[data-label='Aktivität'] { flex-wrap: wrap; } }
#setVer { max-width: 220px; }
.img-pick { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.img-pick img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--navy-soft); }

/* ---------- Einstellungen ---------- */
.boards-tbl input[type=number] { width: 150px; min-height: 34px; padding: 5px 8px; font-size: 14px; }
.boards-tbl input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ok); }
.settings-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: -8px 0 18px; font-size: 14px; }
.panel-f { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); flex-wrap: wrap; }
.panel-f .dirty { margin-right: auto; color: var(--amber-ink); font-size: 13px; font-weight: 600; }

/* ---------- Kleinteile ---------- */
.mt-s { margin-top: 12px; }
.mb-m { margin-bottom: 16px; }
.small { font-size: 13px; }
.lbl { display: block; font-weight: 600; font-size: 14px; color: var(--ink); }
.pre { white-space: pre-line; }
.mono-num { font-variant-numeric: tabular-nums; }
.subhead { font: 600 14px/1.3 var(--font-ui); color: var(--muted); margin: 18px 0 8px; }
.subhead.first { margin-top: 0; }
.loglist.boxed { border: 1px solid var(--line-2); border-radius: var(--r-sm); margin-bottom: 4px; }
.loglist.boxed li { padding: 8px 12px; }
.tbl .det { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.chart-box { position: relative; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:focus { outline: none; }
.chart .hit:focus-visible { fill: rgba(239, 179, 76, .18); }
.chart-tip { position: absolute; z-index: 2; transform: translate(-50%, -100%); pointer-events: none; background: var(--navy); color: #fff; font-size: 13px; line-height: 1.3; padding: 5px 9px; border-radius: 6px; white-space: nowrap; }
.chart-table { margin-top: 10px; font-size: 14px; }
.chart-table summary { cursor: pointer; color: var(--navy-2); font-weight: 600; }
.chart-table .tbl { margin-top: 8px; }
details > summary { cursor: pointer; }

/* ---------- Statistik (v1.39) ---------- */
.st-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.st-filters .field { margin: 0; }
.st-filters .field > label { font-size: 13px; color: var(--muted); font-weight: 600; }
.st-filters select { width: auto; min-width: 132px; min-height: 38px; padding: 6px 10px; font-size: 15px; }
.st-filters input[type=date] { width: auto; min-height: 38px; padding: 6px 10px; font-size: 15px; }
.st-checks { display: flex; flex-direction: column; gap: 4px; padding-bottom: 2px; }
@media (max-width: 719px) {
  .st-filters > .field { flex: 1 1 calc(50% - 6px); }
  .st-filters select, .st-filters input[type=date] { min-width: 0; width: 100%; }
  .st-checks { flex-basis: 100%; }
}
.st-checks .check { font-size: 14px; }
.st-range { margin: 8px 2px 18px; font-size: 14px; color: var(--muted); }
.st-range strong { color: var(--ink); }
.st-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.st-w { grid-column: span 6; margin: 0; display: flex; flex-direction: column; }
@media (min-width: 1100px) { .st-S, .st-M { grid-column: span 3; } }
@media (min-width: 1500px) { .st-S { grid-column: span 2; } }
.st-wh { flex-wrap: nowrap; align-items: flex-start; padding: 12px 12px 10px 18px; }
.st-wt { min-width: 0; }
.st-wt h2 { font-size: 17px; overflow-wrap: anywhere; }
.st-wt .sub { margin-top: 2px; }
.st-tools { display: flex; gap: 2px; flex: none; margin-top: -2px; }
.st-tool { min-height: 32px; padding: 4px 7px; color: var(--muted); }
.st-tool:hover { color: var(--navy); }
.st-tool[aria-pressed="true"] { background: var(--navy-soft); color: var(--navy); }
.st-wb { padding: 14px 18px 16px; flex: 1; container-type: inline-size; transition: opacity .15s; min-width: 0; }
.st-wb.is-refetch { opacity: .45; }
.st-wb > .state { padding: 26px 8px; }
.st-w.is-edit { border-style: dashed; border-color: #9DB0C8; }
.st-editdesc { margin: 0 0 12px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-sm); font-size: 13px; color: var(--muted); }
.st-editbar { border-color: var(--amber); background: #FFFCF4; }
.st-editbar .btn-row { margin-top: 6px; }
.st-grow { flex: 1; }
.st-dirty { color: var(--amber-ink); font-size: 13px; font-weight: 600; }
.st-modswitch { margin-top: 12px; padding-bottom: 0; border-top: 1px solid var(--line-2); border-bottom: 0; }
.st-sub { font: 600 14px/1.3 var(--font-ui); color: var(--ink); margin: 18px 0 10px; }
.st-wb > .st-sub:first-child { margin-top: 0; }
.st-foot { margin: 12px 0 0; }
.st-share { color: var(--muted); font-size: 12px; min-width: 3.6em; text-align: right; }
.st-emoji { margin-right: 6px; }
.st-emoji-lg { font-size: .9em; }
.av-sm { width: 24px; height: 24px; margin-right: 8px; display: inline-block; vertical-align: -6px; }
.av-sm.av-initial { font-size: 11px; }
.st-typelist { margin: 0 0 14px; padding-left: 18px; font-size: 14px; max-height: 210px; overflow-y: auto; }
.st-typelist li { margin-bottom: 4px; }
.st-gloss { margin-top: 20px; }
.st-gloss summary { padding: 14px 18px; font: 600 15px var(--font-head); color: var(--navy); }
.st-gloss .kv { grid-template-columns: minmax(0, 13em) minmax(0, 1fr); gap: 8px 18px; }
@media (max-width: 719px) { .st-gloss .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .st-gloss .kv dd { margin-bottom: 8px; } }

/* Kacheln */
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.st-tile { padding: 12px 14px 10px; min-width: 0; display: flex; flex-direction: column; gap: 2px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0 -1px -1px 0; }
.st-tile-l { font-size: 13px; color: var(--muted); }
.st-tile-v { font: 700 27px/1.1 var(--font-head); font-stretch: 82%; color: var(--navy); overflow-wrap: anywhere; }
.st-tile-d { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-height: 18px; }
.st-tile-d small { font-size: 12px; color: var(--muted); }
.st-spark { display: block; margin-top: 6px; max-width: 100%; }
.st-spark polyline { fill: none; stroke: var(--cmp); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.st-spark circle { fill: var(--s1); stroke: #fff; stroke-width: 1.5; }
.st-delta { font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-delta.good { color: var(--ok); }
.st-delta.bad { color: var(--danger); }
.st-delta.flat { color: var(--muted); font-weight: 600; }

/* Balkenliste */
.st-bars, .st-div { list-style: none; margin: 0; padding: 0; }
.st-row { display: grid; grid-template-columns: minmax(7em, 38%) minmax(40px, 1fr) auto; align-items: center; gap: 4px 12px; padding: 5px 4px; border-radius: 6px; min-width: 0; }
.st-bars.ranked .st-row { grid-template-columns: 1.7em minmax(7em, 36%) minmax(40px, 1fr) auto; }
.st-row.is-hover, .st-row:focus-within { background: #F3F6FA; }
.st-row:focus-visible { outline: 2px solid var(--navy); outline-offset: 0; }
.st-rank { font: 600 13px var(--font-head); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.st-name { min-width: 0; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.st-name a { color: var(--ink); font-weight: 600; text-decoration: none; }
.st-name a:hover { text-decoration: underline; color: var(--navy); }
.st-name > span { font-weight: 600; }
.st-name small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.st-track { position: relative; height: 18px; display: flex; align-items: center; }
.st-fill { display: block; height: 12px; width: 0; background: var(--s1); border-radius: 0 4px 4px 0; transition: width .25s ease; }
.st-row.is-hover .st-fill { background: var(--navy); }
.st-prev { position: absolute; top: 0; width: 2px; height: 18px; margin-left: -1px; background: var(--cmp); border-radius: 1px; box-shadow: 0 0 0 1px #fff; }
.st-val { display: flex; align-items: baseline; justify-content: flex-end; gap: 6px; white-space: nowrap; font-size: 14px; font-variant-numeric: tabular-nums; }
.st-val strong { color: var(--ink); }
@container (max-width: 430px) {
  .st-row, .st-bars.ranked .st-row { grid-template-columns: minmax(0, 1fr) auto; }
  .st-bars.ranked .st-row { grid-template-columns: 1.7em minmax(0, 1fr) auto; }
  .st-track { grid-column: 1 / -1; grid-row: 2; }
  .st-bars.ranked .st-track { grid-column: 2 / -1; }
}
.st-dtrack { position: relative; height: 18px; }
.st-dtrack::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); }
.st-dfill { position: absolute; top: 3px; height: 12px; width: 0; }
.st-dfill.pos { left: 50%; margin-left: 1px; background: var(--s1); border-radius: 0 4px 4px 0; }
.st-dfill.neg { right: 50%; margin-right: 1px; background: var(--s2); border-radius: 4px 0 0 4px; }
.st-div .st-row { grid-template-columns: minmax(7em, 34%) minmax(60px, 1fr) auto; }
@container (max-width: 430px) { .st-div .st-row { grid-template-columns: minmax(0, 1fr) auto; } .st-dtrack { grid-column: 1 / -1; grid-row: 2; } }
.st-mbar { display: block; height: 4px; margin-top: 6px; max-width: 220px; }
.st-mbar .st-fill { height: 4px; border-radius: 0 2px 2px 0; }
.st-btbl td.cell-main { min-width: 210px; }
.tbl .st-delta { margin-left: 6px; }

/* Diagramme */
.st-chart { width: 100%; min-height: 40px; }
.st-svg .st-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.st-svg .st-line-main { stroke: var(--s1); }
.st-svg .st-line-cmp { stroke: var(--cmp); }
.st-svg .st-area { fill: var(--s1); opacity: .10; }
.st-svg .st-dot { fill: var(--s1); stroke: #fff; stroke-width: 2; }
.st-svg .st-endlbl { fill: var(--ink); font: 600 12px var(--font-ui); font-variant-numeric: tabular-nums; }
.st-svg .st-cross { stroke: #7F8DA1; stroke-width: 1; opacity: 0; }
.st-svg .st-cross.on { opacity: 1; }
.st-svg .st-hdot { stroke: #fff; stroke-width: 2; opacity: 0; }
.st-svg .st-hdot.on { opacity: 1; }
.st-svg .st-hdot-main { fill: var(--s1); }
.st-svg .st-hdot-cmp { fill: var(--cmp); }
.st-svg .st-ov { fill: transparent; cursor: crosshair; }
.st-svg .st-ov:focus { outline: none; }
.st-svg .st-ov:focus-visible { stroke: var(--amber); stroke-width: 2; }
.st-svg .st-col-s1 { fill: var(--s1); }
.st-svg .st-col-s2 { fill: var(--s2); }
.st-svg .st-col.is-hover { filter: brightness(.8); }
.st-multi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 26px; }
@container (min-width: 700px) { .st-multi-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-mini { margin: 0; min-width: 0; }
.st-mini figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-bottom: 4px; font-size: 14px; }
.st-mini figcaption span { color: var(--muted); font-size: 13px; display: inline-flex; gap: 6px; align-items: baseline; }
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; background: var(--s1); flex: none; }
.st-key.rect { width: 10px; height: 10px; border-radius: 2px; }
.st-key-main, .st-key-s1 { background: var(--s1); }
.st-key-cmp { background: var(--cmp); }
.st-key-s2 { background: var(--s2); }
.st-tip { position: fixed; z-index: 110; pointer-events: none; max-width: 300px; padding: 7px 10px; border-radius: 6px; background: var(--navy-3); color: #fff; font-size: 13px; line-height: 1.35; box-shadow: 0 6px 18px rgba(8, 32, 63, .28); }
.st-tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.st-tip-row strong { font-variant-numeric: tabular-nums; }
.st-tip-row span { color: rgba(255,255,255,.82); overflow: hidden; text-overflow: ellipsis; }
.st-tip-head span { color: #fff; font-weight: 600; white-space: normal; }
.st-tip .st-key { box-shadow: 0 0 0 1px rgba(255,255,255,.35); }
.st-tip .st-key-main, .st-tip .st-key-s1 { background: #8FB2E6; }

/* Wärmebild und Kohorten */
.hm0 { background: var(--hm0); } .hm1 { background: var(--hm1); } .hm2 { background: var(--hm2); } .hm3 { background: var(--hm3); }
.hm4 { background: var(--hm4); } .hm5 { background: var(--hm5); color: #fff; } .hm6 { background: var(--hm6); color: #fff; } .hm7 { background: var(--hm7); color: #fff; }
.st-hm { display: grid; gap: 2px; font-size: 11px; color: var(--muted); }
.st-hm-row { display: grid; grid-template-columns: 2.1em repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.st-hm-head span { text-align: left; font-variant-numeric: tabular-nums; }
.st-hm-day { font-weight: 600; color: var(--ink); font-size: 12px; }
.st-hm-c { display: block; height: 20px; border-radius: 2px; }
.st-hm-c.is-hover { box-shadow: 0 0 0 2px var(--navy); }
.st-hm-legend { display: flex; align-items: center; gap: 2px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.st-hm-legend i { display: block; width: 18px; height: 10px; border-radius: 2px; }
.st-hm-legend span:first-child { margin-right: 6px; }
.st-hm-legend span:last-child { margin-left: 6px; }
.st-coh { border-collapse: separate; border-spacing: 2px; font-size: 13px; min-width: 100%; }
.st-coh th { font-weight: 600; color: var(--muted); text-align: left; padding: 4px 6px; white-space: nowrap; }
.st-coh thead th.num { text-align: center; }
.st-coh tbody th { color: var(--ink); }
.st-coh tbody th small { font-weight: 400; margin-left: 4px; }
.st-coh td { padding: 5px 6px; border-radius: 2px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 3.2em; }
.st-coh td.num:nth-child(2) { text-align: right; background: transparent; color: var(--ink); }
.st-coh td.hm-na { background: transparent; }
.st-coh td.is-hover { box-shadow: 0 0 0 2px var(--navy); }
.st-tblwrap { max-height: 460px; overflow: auto; border: 1px solid var(--line-2); border-radius: var(--r-sm); }
.st-tblwrap .tbl { font-size: 13px; }
.st-tblwrap .tbl td, .st-tblwrap .tbl th { padding: 7px 10px; }
@media print { .st-tools, .st-filters .st-checks, .st-gloss { display: none !important; } .st-w { break-inside: avoid; } }

/* ---------- Dialog ---------- */
.dlg { border: 0; border-radius: 12px; padding: 0; width: min(540px, calc(100vw - 24px)); max-height: calc(100vh - 32px); color: var(--ink); box-shadow: 0 24px 64px rgba(8, 32, 63, .35); }
.dlg::backdrop { background: rgba(8, 24, 48, .55); }
.dlg form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dlg-h { padding: 18px 22px 10px; }
.dlg-h h2 { font-size: 20px; font-weight: 700; font-stretch: 90%; }
.dlg-b { padding: 4px 22px 8px; overflow-y: auto; }
.dlg-b > p { color: var(--ink); }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; flex-wrap: wrap; }
@media (max-width: 479px) { .dlg-f .btn { flex: 1; } }

/* ---------- Meldungen (Toasts) ---------- */
.toasts { position: fixed; z-index: 100; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { padding: 11px 14px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 14px; box-shadow: 0 8px 24px rgba(8, 32, 63, .25); border-left: 4px solid var(--amber); animation: toastIn .18s ease-out; }
.toast-ok { border-left-color: #5BC48D; }
.toast-err { background: #7D1A14; border-left-color: #F2A39C; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }
@media (max-width: 719px) { .toasts { left: 16px; right: 16px; max-width: none; } }

/* ---------- Kein Zugriff / Fehlerseite ---------- */
.blocked-page { max-width: 560px; }
.blocked-page h1 { font-size: 24px; margin-bottom: 8px; }

/* ---------- Öffentliche Seite „Konto löschen“ ---------- */
body.pub { background: var(--bg); }
.pub-top { background: var(--navy); color: #fff; }
.pub-top-in { max-width: 720px; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 12px; }
.pub-top-in img { border-radius: 8px; }
.pub-top-in strong { font: 800 20px/1.1 var(--font-head); font-stretch: 85%; }
.pub-lang { margin-left: auto; display: flex; gap: 4px; }
.pub-lang button { background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 4px; padding: 4px 9px; font: 600 13px var(--font-ui); cursor: pointer; min-height: 32px; }
.pub-lang button[aria-pressed="true"] { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.pub-main { max-width: 720px; margin: 0 auto; padding: 28px 16px 64px; }
.pub-main h1 { font-size: 30px; font-weight: 800; font-stretch: 85%; margin-bottom: 10px; line-height: 1.1; }
.pub-main h2 { font-size: 19px; font-weight: 700; font-stretch: 92%; margin: 0 0 8px; }
.pub-main .lead { font-size: 17px; color: var(--ink); max-width: 62ch; }
.pub-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.pub-cols .panel { margin: 0; }
.pub-cols ul { margin: 0; padding-left: 20px; font-size: 15px; }
.pub-cols li { margin-bottom: 4px; }
@media (max-width: 639px) { .pub-cols { grid-template-columns: minmax(0, 1fr); } }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin: 18px 0 6px; }
.pub-card .btn-row { margin-top: 6px; }
.pub-done { text-align: left; }
.pub-foot { margin-top: 28px; font-size: 14px; color: var(--muted); }
/* Rechtstexte (agb.html) */
.pub-doc h2 { margin-top: 28px; }
.pub-doc p, .pub-doc li { font-size: 15px; line-height: 1.6; }
.pub-doc p { margin: 0 0 10px; }
.pub-doc ol { margin: 0 0 10px; padding-left: 22px; }
.pub-doc li { margin-bottom: 6px; }
.pub-doc h1 + .pub-foot { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .loadbar { animation: none; }
}
@media print {
  .rail, .topbar, .toasts, .loadbar, .devflag { display: none !important; }
  .view { margin: 0 !important; padding: 0 !important; }
}

/* Aktionen (promo.js) */
#promoList .tbl code { font-weight: 600; }
#promoList .tbl td.act { white-space: nowrap; }
.st-gloss .panel-b > .hint { margin: 0 0 12px; }
