/* Kontrollradar Hamburg – Stylesheet */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 24px;

  /* Nachtkarte: kühles Anthrazit, Signalgelb als einziger Akzent */
  --bg: oklch(0.17 0.012 240);
  --surface: oklch(0.22 0.014 240);
  --surface-2: oklch(0.27 0.016 240);
  --border: oklch(0.9 0.01 240 / 0.12);
  --text: oklch(0.95 0.008 90);
  --text-muted: oklch(0.72 0.012 240);
  --text-faint: oklch(0.58 0.012 240);
  --accent: oklch(0.86 0.17 92);        /* Signalgelb */
  --accent-ink: oklch(0.2 0.03 92);
  --risk-low: oklch(0.72 0.17 150);
  --risk-medium: oklch(0.8 0.16 80);
  --risk-high: oklch(0.65 0.22 25);
  --shadow: 0 8px 28px oklch(0.05 0.01 240 / 0.55);

  --font-body: 'Satoshi', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;

  --sheet-collapsed: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--space-2) + env(safe-area-inset-top)) var(--space-4) var(--space-2);
  background: oklch(0.17 0.012 240 / 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.logo { width: 36px; height: 36px; color: var(--text); flex: none; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand h1 { font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
.brand-city { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: var(--space-2); }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted);
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px;
  white-space: nowrap;
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 oklch(0.86 0.17 92 / 0.6); } 70% { box-shadow: 0 0 0 8px oklch(0.86 0.17 92 / 0); } 100% { box-shadow: 0 0 0 0 oklch(0.86 0.17 92 / 0); } }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center;
  background: transparent; border: 0; border-radius: var(--radius-md); color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.solid { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ---------- Karte & Overlays ---------- */
.app { position: relative; flex: 1; min-height: 0; }
.map { position: absolute; inset: 0; background: var(--bg); }
.maplibregl-ctrl-attrib { font-size: 11px; background: oklch(0.17 0.012 240 / 0.75) !important; color: var(--text-faint); }
.maplibregl-ctrl-attrib a { color: var(--text-muted); }
.maplibregl-popup-content { background: var(--surface); color: var(--text); border-radius: var(--radius-md); box-shadow: var(--shadow); padding: 12px 14px; font-family: var(--font-body); min-width: 200px; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
.maplibregl-popup-close-button { color: var(--text-muted); font-size: 18px; width: 28px; height: 28px; }
.popup h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: 4px; }
.popup .lines { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.popup .stat { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-sm); color: var(--text-muted); }
.popup .stat strong { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.popup .btn { margin-top: 10px; width: 100%; }

.line-bar {
  position: absolute; top: var(--space-3); left: 0; right: 0; z-index: 10;
  display: flex; gap: var(--space-2); padding: 0 var(--space-4);
  overflow-x: auto; scrollbar-width: none;
}
.line-bar::-webkit-scrollbar { display: none; }
.line-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px; border-radius: 999px;
  background: oklch(0.2 0.012 240 / 0.92); border: 1px solid var(--border);
  backdrop-filter: blur(8px); box-shadow: var(--shadow);
  font-family: var(--font-mono); font-size: var(--text-sm);
}
.line-chip.dim { opacity: 0.45; }
.line-chip .risk { width: 8px; height: 8px; border-radius: 50%; background: var(--risk-low); }
.line-chip .risk.medium { background: var(--risk-medium); }
.line-chip .risk.high { background: var(--risk-high); box-shadow: 0 0 0 3px oklch(0.65 0.22 25 / 0.3); }
.line-chip .n { color: var(--text-muted); font-size: var(--text-xs); }
.line-chip.bus-group .chev { color: var(--text-muted); transition: transform 0.2s; margin-left: -2px; }
.line-chip.bus-group.open .chev { transform: rotate(180deg); }
.line-chip.bus-group.open { border-color: #f28c28; }
.line-chip.bus-toggle { padding: 6px 12px; font-family: var(--font-body); font-size: var(--text-sm); color: var(--text); }
.line-badge.bus { border-radius: 999px; min-width: 32px; }
.line-badge.sm.bus { min-width: 28px; }
.line-badge.more { background: oklch(0.3 0.01 240); color: var(--text-muted); font-weight: 500; }

.line-badge {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px;
  border-radius: 5px; font-family: var(--font-mono); font-weight: 600; font-size: 12px; line-height: 1;
  color: #fff;
}
.line-badge.light { color: #111; }
.line-badge.sm { min-width: 26px; height: 20px; font-size: 11px; }

.map-controls { position: absolute; right: var(--space-4); bottom: calc(var(--sheet-collapsed) + 86px); z-index: 10; display: flex; flex-direction: column; gap: var(--space-2); }

/* Meldungs-Marker */
.report-marker { --marker: var(--accent); width: 26px; height: 26px; border-radius: 50%; background: var(--marker); border: 2px solid var(--bg); position: absolute; padding: 0; cursor: pointer; font-size: 14px; line-height: 22px; text-align: center; box-shadow: 0 2px 8px rgb(0 0 0 / .5); }
.report-marker::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--marker); animation: ping 1.8s ease-out infinite; opacity: 0.9; }
.report-marker.old { opacity: 0.55; }
.report-marker.old::after { animation: none; display: none; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }
.user-marker { width: 16px; height: 16px; border-radius: 50%; background: oklch(0.7 0.15 230); border: 3px solid #fff; box-shadow: 0 0 0 6px oklch(0.7 0.15 230 / 0.25); }

/* ---------- Melde-Button ---------- */
.report-btn {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--sheet-collapsed) + var(--space-4)); z-index: 15;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); border: 0;
  padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: var(--text-base);
  box-shadow: 0 10px 30px oklch(0.86 0.17 92 / 0.35), var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 52px; white-space: nowrap;
}
.report-btn:hover { transform: translateX(-50%) translateY(-1px); }
.report-btn:active { transform: translateX(-50%) scale(0.98); }

/* ---------- Feed-Sheet ---------- */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 12;
  background: var(--surface); border-top: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; box-shadow: 0 -10px 30px oklch(0.05 0.01 240 / 0.5);
  height: var(--sheet-collapsed); transition: height .3s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet.open { height: min(60vh, 520px); }
.sheet-handle {
  flex: none; display: grid; grid-template-columns: 1fr auto; align-items: center; row-gap: 2px;
  width: 100%; padding: 10px var(--space-5) 8px; background: transparent; border: 0; text-align: left;
  height: var(--sheet-collapsed);
}
.sheet-grip { grid-column: 1 / -1; justify-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--text-faint); margin-bottom: 4px; }
.sheet-title { font-weight: 700; font-size: var(--text-sm); display: flex; align-items: center; gap: 8px; }
.sheet-title .count { font-family: var(--font-mono); font-weight: 500; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 0 8px; font-size: var(--text-xs); line-height: 20px; }
.sheet-sub { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.sheet:not(.open) .feed { display: none; }
.feed { list-style: none; padding: 0 var(--space-4) 88px; overflow-y: auto; flex: 1; }
.feed li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 8px; border-top: 1px solid var(--border); cursor: pointer; border-radius: var(--radius-sm); }
.feed li:hover { background: var(--surface-2); }
.feed .st { font-weight: 700; font-size: var(--text-sm); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.feed .dir { color: var(--text-muted); font-size: var(--text-xs); }
.feed .time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); white-space: nowrap; }
.feed .demo-tag { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); border: 1px dashed var(--border); border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.feed .empty { grid-template-columns: 1fr; text-align: left; color: var(--text-muted); cursor: default; padding: var(--space-6) var(--space-2); font-size: var(--text-sm); border-top: 0; }
.feed .empty:hover { background: transparent; }
.feed .empty strong { display: block; color: var(--text); margin-bottom: 4px; }

/* ---------- Dialoge ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: oklch(0.08 0.01 240 / 0.7); backdrop-filter: blur(4px); display: grid; place-items: end center; padding: 0; }
.dialog {
  width: 100%; max-width: 520px; max-height: min(92vh, 760px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-6) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
  animation: rise .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog h2 { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-3); }
.dialog p { color: var(--text-muted); font-size: var(--text-sm); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.dialog-head h2 { margin: 0; }
.rules { padding-left: 18px; margin: var(--space-4) 0 var(--space-6); color: var(--text-muted); font-size: var(--text-sm); display: grid; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: var(--text-sm);
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; width: 100%; font-weight: 700; }
.btn.primary:disabled { opacity: 0.6; cursor: wait; }
.btn.ghost { background: transparent; }
.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-3); }

.field-label { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: var(--text-sm); margin: var(--space-4) 0 var(--space-2); color: var(--text); }
.field-label .req { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.field-label .opt { font-family: var(--font-mono); font-weight: 500; font-size: 11px; color: var(--text-faint); letter-spacing: 0.06em; text-transform: uppercase; }
#station-search {
  width: 100%; min-height: 48px; padding: 0 14px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md);
}
#station-search::placeholder { color: var(--text-faint); }
.hint { font-size: var(--text-xs); color: var(--text-faint); margin-top: 6px; }
.hint button { background: none; border: 0; color: var(--accent); padding: 0; text-decoration: underline; font-size: inherit; }
.station-list { list-style: none; padding: 0; margin-top: var(--space-3); max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--border); }
.station-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 6px; border-bottom: 1px solid var(--border); cursor: pointer; border-radius: var(--radius-sm); min-height: 48px; }
.station-list li:hover, .station-list li[aria-selected="true"] { background: var(--surface-2); }
.station-list .name { font-weight: 600; font-size: var(--text-sm); }
.station-list .meta { display: flex; align-items: center; gap: 4px; }
.station-list .dist { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); margin-right: 6px; }
.station-list .group { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase; padding: 10px 6px 4px; border-bottom: 0; cursor: default; min-height: 0; }
.station-list .group:hover { background: transparent; }

.chosen-station { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); text-align: left; font-weight: 700; font-size: var(--text-sm); }
.chosen-station span { font-weight: 500; color: var(--accent); font-size: var(--text-xs); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); font-size: var(--text-sm); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: oklch(0.86 0.17 92 / 0.12); }
.chip .line-badge { margin-left: -6px; }
.dialog p.error, .error { color: var(--risk-high); font-size: var(--text-sm); margin: var(--space-3) 0; }
#report-submit { margin-top: var(--space-5); }

.howto { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: var(--text-sm); }
.howto dt { font-family: var(--font-mono); color: var(--accent); font-size: var(--text-xs); letter-spacing: 0.06em; text-transform: uppercase; padding-top: 3px; }
.howto dd { margin: 0; color: var(--text-muted); }
.info-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: var(--space-5) 0; }
.info-stats div { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; }
.info-stats b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: var(--text-lg); }
.info-stats span { font-size: var(--text-xs); color: var(--text-faint); }
.demo-box { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: var(--space-4); }
.demo-box summary { cursor: pointer; font-weight: 600; font-size: var(--text-sm); }
.demo-box p { margin-top: 8px; }
.credits { font-size: var(--text-xs); color: var(--text-faint); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--sheet-collapsed) + 88px); transform: translateX(-50%) translateY(12px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: var(--text-sm);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--risk-high); color: #fff; }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  .overlay { place-items: center; padding: var(--space-6); }
  .dialog { border-radius: var(--radius-lg); animation-name: pop; }
  @keyframes pop { from { transform: scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
  .sheet { left: var(--space-4); bottom: var(--space-4); width: 380px; right: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); height: auto; max-height: calc(100% - 32px); }
  .sheet.open { height: auto; }
  .sheet .feed { max-height: 48vh; padding-bottom: var(--space-4); }
  .sheet-handle { height: auto; }
  .sheet-grip { display: none; }
  .report-btn { left: auto; right: var(--space-6); bottom: var(--space-6); transform: none; }
  .report-btn:hover { transform: translateY(-1px); }
  .report-btn:active { transform: scale(0.98); }
  .map-controls { right: var(--space-6); bottom: 100px; }
  .toast { bottom: var(--space-10); }
  .line-bar { left: var(--space-4); right: auto; max-width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Beschwerden, Feedback, Moderation */
.dialog-sub { color: var(--text-muted); font-size: var(--text-sm); margin: 0 0 var(--space-2); }
.dialog textarea, .text-input {
  width: 100%; padding: 12px 14px; font: inherit; font-size: var(--text-sm); color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); resize: vertical;
}
.text-input { min-height: 48px; }
.dialog textarea::placeholder, .text-input::placeholder { color: var(--text-faint); }
.check { display: flex; align-items: flex-start; gap: 10px; margin: var(--space-4) 0 0; font-size: var(--text-sm); color: var(--text-muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.fineprint { font-size: var(--text-xs); color: var(--text-faint); margin: var(--space-3) 0 0; line-height: 1.5; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
#flag-submit, #feedback-submit { margin-top: var(--space-5); width: 100%; }
.feed li { grid-template-columns: auto 1fr auto auto; }
.feed .flag-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  color: var(--text-faint); background: transparent; border: 0; margin-right: -8px;
}
.feed .flag-btn:hover, .feed .flag-btn:focus-visible { color: var(--text); background: var(--surface-2); }
.feed .flag-btn.own { color: var(--accent); }
.popup .flag-link { display: block; margin-top: 8px; font-size: var(--text-xs); color: var(--text-faint); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.safety-row { margin: 0 0 var(--space-4); }
.credits .todo { color: var(--risk-medium); }

/* ---------- Pendler in Hamburg: Kategorien, Menü, Popup ---------- */
.cat-list { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.cat-option { display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left; padding: var(--space-3); border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--border); color: var(--text); cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.cat-option:hover, .cat-option:focus-visible { border-color: var(--accent); background: var(--surface); outline: none; }
.cat-option .cat-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cat-option strong { font-size: var(--text-base); font-weight: 600; }
.cat-option small { color: var(--text-muted); font-size: var(--text-sm); }
.cat-option .chev { color: var(--text-muted); font-size: 22px; line-height: 1; }
.cat-icon { --marker: var(--accent); flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: color-mix(in oklab, var(--marker) 18%, transparent); border: 1px solid color-mix(in oklab, var(--marker) 45%, transparent); }
.feed li .cat-icon { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
.own-tag { background: color-mix(in oklab, var(--accent) 25%, transparent); color: var(--text); }
.menu-dialog { padding: var(--space-3) var(--space-3) var(--space-4); max-width: 420px; }
.dialog h2.menu-title { font-size: var(--text-sm); line-height: 1.4; color: var(--text-muted); font-weight: 500; padding: var(--space-2) var(--space-3); margin: 0 0 var(--space-2); }
.menu-list { display: grid; gap: 2px; }
.menu-item { display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left; padding: 14px var(--space-3); border-radius: var(--radius-md); background: transparent; border: 0; color: var(--text); font: inherit; font-size: var(--text-base); cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
.menu-item.cancel { justify-content: center; color: var(--text-muted); margin-top: var(--space-2); border-top: 1px solid var(--border); border-radius: 0; }
.menu-item.hidden { display: none; }
.pp-cats { display: grid; gap: 6px; margin: var(--space-2) 0 var(--space-3); }
.pp-cat { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); }
.pp-cat strong { margin-left: auto; font-family: var(--font-mono); }
.popup .muted { color: var(--text-muted); font-size: var(--text-sm); }

/* Kopfzeile auf schmalen Geräten: Zähler zweizeilig, damit Marke, Zähler und Info nebeneinander passen */
@media (max-width: 560px) {
  .topbar { padding-left: var(--space-3); padding-right: var(--space-3); }
  .brand { gap: var(--space-2); }
  .live-pill { flex-direction: column; gap: 0; padding: 4px 10px; line-height: 1.15; align-items: center; }
  .live-pill .live-dot { display: none; }
  .live-pill #live-count { font-size: 15px; font-weight: 600; color: var(--text); }
  .live-pill #live-label { font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; }
}

/* Rechtliches */
.legal-links a, .credits a, .fineprint a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.legal-links a:hover, .credits a:hover, .fineprint a:hover { color: var(--text); }
.legal { max-width: 720px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-8); line-height: 1.6; }
.legal header { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-6); }
.legal header a { color: var(--text-muted); text-decoration: none; font-size: var(--text-sm); }
.legal header a:hover { color: var(--text); }
.legal h1 { font-size: var(--text-xl); margin: 0 0 var(--space-2); letter-spacing: -0.01em; }
.legal h2 { font-size: var(--text-lg); margin: var(--space-6) 0 var(--space-2); }
.legal h3 { font-size: var(--text-base); margin: var(--space-4) 0 var(--space-1); color: var(--text); }
.legal p, .legal li { color: var(--text-muted); font-size: var(--text-base); }
.legal strong { color: var(--text); }
.legal a { color: var(--accent); }
.legal ul { padding-left: 1.2em; }
.legal table { width: 100%; border-collapse: collapse; margin: var(--space-3) 0; font-size: var(--text-sm); }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-muted); }
.legal th { color: var(--text); font-weight: 600; }
.legal .meta { font-size: var(--text-sm); color: var(--text-muted); margin: 0 0 var(--space-4); }
body.legal-page { overflow: auto; display: block; height: auto; min-height: 100%; }

@media (max-width: 640px) {
  .legal table, .legal tbody, .legal tr, .legal td { display: block; width: 100%; }
  .legal thead { display: none; }
  .legal tr { border-bottom: 2px solid var(--border); padding: var(--space-2) 0; }
  .legal td { border: 0; padding: 6px 0; }
  .legal td::before { content: attr(data-l); display: block; font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 2px; }
}
