    /* ── reset + variables ────────────────────────────────────────────── */
    * { margin: 0; padding: 0; box-sizing: border-box; }
    html, body { height: 100%; }

    body {
      font-family: 'IBM Plex Mono', monospace;
      --bg:         #0f0f0f;
      --surface:    #1a1a1a;
      --surface2:   #222;
      --border:     #2a2a2a;
      --text:       #e0e0e0;
      --text-muted: #8a8a8a;
      --text-dim:   #555;
      --accent:     #4d94ff;
      --accent-dim: #4d94ff44;
      --warn:       #e07b00;
    }
    body.light {
      --bg:         #f0f0ec;
      --surface:    #ffffff;
      --surface2:   #f5f5f0;
      --border:     #ddd;
      --text:       #111;
      --text-muted: #777;
      --text-dim:   #bbb;
      --accent:     #1a6fd4;
      --accent-dim: #1a6fd422;
    }

    /* ── map ──────────────────────────────────────────────────────────── */
    #map { position: fixed; inset: 0; }
    body.dark  #map canvas { filter: brightness(0.78); }
    body.light #map canvas { filter: brightness(0.96); }

    /* ── top bar ──────────────────────────────────────────────────────── */
    #top-bar {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 10;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 12px;
      background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
      pointer-events: none;
    }
    #top-bar button {
      pointer-events: all;
      background: var(--surface);
      border: 1px solid var(--text-dim);
      border-radius: 8px;
      padding: 6px 10px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 13px;
      color: var(--text-muted);
      cursor: pointer;
      transition: color 0.15s, border-color 0.15s;
    }
    #top-bar button:hover { color: var(--text); border-color: var(--accent); }

    #legend-btn { font-size: 16px; letter-spacing: -0.5px; }
    #mode-toggle { font-size: 13px; }
    #date-mode-toggle {
      display: flex;
      align-items: center;
      gap: 4px;
    }
    #date-mode-icon { font-size: 12px; }
    #date-mode-label {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      letter-spacing: 0.05em;
    }

    /* ── legend overlay ───────────────────────────────────────────────── */
    #legend-overlay {
      position: fixed;
      top: 56px; left: 12px;
      z-index: 10;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 12px 14px;
      min-width: 240px;
      display: none;
      box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    }
    #legend-overlay.open { display: block; }
    .legend-title {
      font-family: 'Rajdhani', sans-serif;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 10px;
    }
    .legend-row {
      display: flex;
      align-items: center;
      gap: 9px;
      font-size: 12px;
      color: var(--text-muted);
      line-height: 2;
    }
    .legend-row svg { flex-shrink: 0; }

    /* ── bottom section ───────────────────────────────────────────────── */
    #bottom-section {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      z-index: 10;
      padding: 0 12px 10px;
      background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      pointer-events: none;
    }

    /* ── chip bar ─────────────────────────────────────────────────────── */
    #chip-bar {
      max-width: 100%;
      pointer-events: all;
      display: flex;
      gap: 6px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 999px;
      padding: 5px 8px;
      box-shadow: 0 2px 16px rgba(0,0,0,0.35);
      flex-wrap: nowrap;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none; /* Firefox */
    }
    #chip-bar::-webkit-scrollbar {
      display: none; /* Chrome/Safari */
    }
    .chip {
      background: none;
      border: 1px solid transparent;
      border-radius: 999px;
      padding: 5px 12px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      font-weight: 500;
      color: var(--text-muted);
      cursor: pointer;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .chip:hover { color: var(--text); }
    .chip.active {
      color: var(--text);
      border-color: var(--accent);
      background: var(--accent-dim);
    }
    .chip-dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: var(--accent);
      animation: chipPulse 2s infinite;
      display: none;
    }
    .chip.active .chip-dot { display: block; }
    @keyframes chipPulse {
      0%, 100% { opacity: 1; }
      50%       { opacity: 0.25; }
    }

    /* ── bereich chip ─────────────────────────────────────────────────── */
    .bereich-chip {
      border-right: 1px solid rgba(255,255,255,0.1);
      margin-right: 4px;
      padding-right: 12px;
      white-space: nowrap;
      flex-shrink: 0;
    }
    body.light .bereich-chip { border-right-color: rgba(0,0,0,0.1); }

    /* ── bereich tooltip ──────────────────────────────────────────────── */
    .bereich-tooltip {
      position: absolute;
      top: calc(100% + 8px);
      left: 8px;
      background: var(--accent);
      color: #fff;
      padding: 6px 12px;
      border-radius: 8px;
      font-family: 'Rajdhani', sans-serif;
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      z-index: 100;
      animation: tooltipFadeIn 0.3s ease;
      pointer-events: none;
    }
    @keyframes tooltipFadeIn {
      from { opacity: 0; transform: translateY(-4px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── bereich panel ────────────────────────────────────────────────── */
    #bereich-backdrop {
      position: fixed; inset: 0; z-index: 20;
      background: rgba(0,0,0,0.5);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s;
    }
    #bereich-backdrop.open { opacity: 1; pointer-events: all; }

    #bereich-panel {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 21;
      background: var(--surface);
      border-radius: 24px 24px 0 0;
      border: 1px solid var(--border);
      border-bottom: none;
      padding: 0 16px 40px;
      transform: translateY(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      max-height: 60vh;
      overflow-y: auto;
    }
    #bereich-panel.open { transform: translateY(0); }

    #bereich-panel-content { padding-top: 4px; }

    .bereich-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 4px 0 16px;
    }
    .bereich-panel-title {
      font-family: 'Rajdhani', sans-serif;
      font-size: 15px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-muted);
    }
    #bereich-close {
      background: none;
      border: none;
      color: var(--text-dim);
      cursor: pointer;
      font-size: 16px;
      padding: 4px 6px;
      line-height: 1;
    }
    #bereich-close:hover { color: var(--text); }

    #bereich-current {
      display: none;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 12px;
      padding: 8px 12px;
      background: var(--surface2);
      border-radius: 8px;
      border: 1px solid var(--border);
    }
    #bereich-current.visible { display: flex; }
    #bereich-current-label {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      color: var(--text);
      flex: 1;
    }
    #bereich-saved-row {
      display: none;
      gap: 10px;
      align-items: center;
      width: 100%;
      background: none;
      border: 1px solid var(--accent);
      border-radius: 10px;
      padding: 10px 12px;
      cursor: pointer;
      color: var(--accent);
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      margin-bottom: 8px;
      transition: background 0.12s;
      box-sizing: border-box;
    }
    #bereich-saved-row.visible { display: flex; }
    #bereich-saved-row:hover { background: var(--surface2); }

    #bereich-remove, #bereich-update-geo {
      background: none;
      border: none;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      cursor: pointer;
      padding: 2px 6px;
      border-radius: 4px;
      transition: opacity 0.15s;
    }
    #bereich-remove { color: #e05252; }
    #bereich-remove:hover { opacity: 0.75; }
    #bereich-update-geo { color: var(--accent); display: none; }
    #bereich-update-geo.visible { display: inline-block; }
    #bereich-update-geo:hover { opacity: 0.75; }

    .bereich-option-row {
      display: flex;
      gap: 10px;
      align-items: center;
      width: 100%;
      background: none;
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
      cursor: pointer;
      color: var(--text-muted);
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      transition: background 0.12s, color 0.12s;
      margin-bottom: 0;
    }
    .bereich-option-row:hover { background: var(--surface2); color: var(--text); }

    .bereich-divider {
      height: 1px;
      background: var(--border);
      margin: 12px 0;
    }

    .bereich-geo-btn {
      width: 100%;
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: 10px;
      padding: 12px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      margin-bottom: 10px;
      transition: opacity 0.15s;
    }
    .bereich-geo-btn:hover { opacity: 0.85; }

    #bereich-geo-denied {
      display: none;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      color: #e05252;
      margin: 0 0 10px;
      line-height: 1.5;
    }
    #bereich-geo-denied.visible { display: block; }

    .bereich-search-row { margin-bottom: 4px; }
    .bereich-search-row input {
      width: 100%;
      box-sizing: border-box;
      background: var(--surface2);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 12px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      outline: none;
      transition: border-color 0.15s;
    }
    .bereich-search-row input:focus { border-color: var(--accent); }
    .bereich-search-row input::placeholder { color: var(--text-dim); }

    #bereich-not-found {
      display: none;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      color: #e05252;
      margin: 4px 0 0;
    }
    #bereich-not-found.visible { display: block; }

    .bereich-radius-section { margin-top: 14px; }
    .bereich-radius-label {
      display: block;
      font-family: 'Rajdhani', sans-serif;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--text-dim);
      margin-bottom: 6px;
    }
    .bereich-radius-pills {
      display: flex;
      gap: 6px;
    }
    .radius-pill {
      flex: 1;
      background: none;
      border: 1px solid var(--border);
      border-radius: 999px;
      padding: 6px 4px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      color: var(--text-muted);
      cursor: pointer;
      text-align: center;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }
    .radius-pill:hover { color: var(--text); }
    .radius-pill.active {
      color: var(--accent);
      border-color: var(--accent);
      background: var(--accent-dim);
    }

    /* ── brand ────────────────────────────────────────────────────────── */
    #brand { pointer-events: none; font-family: 'Rajdhani', sans-serif; font-weight: 700;
      font-size: 13px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-dim);
      text-align: center; padding: 2px 0 4px; user-select: none; }
    #brand .blue { color: var(--accent); }
    #brand .sweep span {
      display: inline-block;
      color: var(--text-dim);
    }
    .brand-hyphen { color: var(--text-dim); }
    #brand .sweep.blaulicht span {
      color: var(--accent);
      animation: letterSweepBlue 3s infinite;
    }
    #brand .sweep.blaulicht span:nth-child(1) { animation-delay: 0.0s; }
    #brand .sweep.blaulicht span:nth-child(2) { animation-delay: 0.15s; }
    #brand .sweep.blaulicht span:nth-child(3) { animation-delay: 0.3s; }
    #brand .sweep.blaulicht span:nth-child(4) { animation-delay: 0.45s; }
    #brand .sweep.blaulicht span:nth-child(5) { animation-delay: 0.6s; }
    #brand .sweep.blaulicht span:nth-child(6) { animation-delay: 0.75s; }
    #brand .sweep.blaulicht span:nth-child(7) { animation-delay: 0.9s; }
    #brand .sweep.blaulicht span:nth-child(8) { animation-delay: 1.05s; }
    #brand .sweep.blaulicht span:nth-child(9) { animation-delay: 1.2s; }
    #brand .sweep.karte span {
      animation: letterSweepWhite 3s infinite;
    }
    #brand .sweep.karte span:nth-child(1) { animation-delay: 0.6s; }
    #brand .sweep.karte span:nth-child(2) { animation-delay: 0.75s; }
    #brand .sweep.karte span:nth-child(3) { animation-delay: 0.9s; }
    #brand .sweep.karte span:nth-child(4) { animation-delay: 1.05s; }
    #brand .sweep.karte span:nth-child(5) { animation-delay: 1.2s; }
    @keyframes letterSweepBlue {
      0%, 40%, 100% { color: var(--text-dim); }
      20%            { color: var(--accent); text-shadow: 0 0 8px var(--accent); }
    }
    @keyframes letterSweepWhite {
      0%, 40%, 100% { color: var(--text-dim); }
      20%            { color: #ffffff; text-shadow: 0 0 8px #ffffffaa; }
    }

    /* ── MapLibre popup shell ─────────────────────────────────────────── */
    .maplibregl-popup-content {
      background: var(--surface) !important;
      color: var(--text) !important;
      border: 1px solid var(--border);
      border-radius: 10px !important;
      padding: 14px 16px !important;
      box-shadow: 0 4px 24px rgba(0,0,0,0.5) !important;
      font-family: 'IBM Plex Mono', monospace;
    }
    .maplibregl-popup-tip { background: var(--surface) !important; }
    .maplibregl-popup-close-button {
      font-size: 16px !important;
      color: var(--text-muted) !important;
      padding: 6px 10px !important;
    }

    /* ── popup content ────────────────────────────────────────────────── */
    .popup-incident { font-size: 13px; line-height: 1.5; min-width: 220px; max-width: 280px; }
    .popup-cat {
      font-family: 'Rajdhani', sans-serif;
      font-size: 11px; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.1em;
      color: var(--text-dim); margin-bottom: 4px;
    }
    .popup-summary  { font-size: 13px; color: var(--text); margin-bottom: 6px; line-height: 1.5; }
    .popup-date     { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
    .popup-location { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
    .popup-geo      { font-size: 10px; color: var(--text-dim); }
    .popup-witness-badge {
      font-family: 'Rajdhani', sans-serif;
      font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
      color: var(--warn); display: block; margin-bottom: 8px;
    }
    .popup-contact  { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
    .popup-toggle {
      background: none; border: none; font: inherit; font-size: 12px;
      color: var(--text-dim); cursor: pointer; padding: 0; margin-top: 4px;
      font-family: 'IBM Plex Mono', monospace;
    }
    .popup-details { margin-top: 8px; }
    .popup-details a { color: var(--accent); font-size: 12px; }

    /* ── pins ─────────────────────────────────────────────────────────── */
    .cat-pin {
      font-size: 18px;
      line-height: 1;
      pointer-events: none;
    }
    .cat-pin * { pointer-events: none; }

    @keyframes pin-pulse {
      0% { box-shadow: 0 0 0 0 currentColor; }
      50% { box-shadow: 0 0 0 8px transparent; }
      100% { box-shadow: 0 0 0 0 transparent; }
    }
    .pin-new {
      animation: pin-pulse 1.2s ease-out 1;
    }

    .cluster-pin {
      display: flex; align-items: center; justify-content: center;
      width: 36px; height: 36px; border-radius: 50%;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 13px; font-weight: 700; cursor: pointer;
      background: rgba(255,255,255,0.08);
      border: 1.5px solid rgba(255,255,255,0.5);
      backdrop-filter: blur(4px);
      color: var(--text);
    }

    .latest-pin { animation: latestPulse 2s infinite; }
    @keyframes latestPulse {
      0%, 100% { opacity: 1; }
      50%       { opacity: 0.3; }
    }

    /* ── count badge ──────────────────────────────────────────────────── */
    #count-badge {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      color: var(--text);
      text-align: center;
      padding: 2px 0;
      letter-spacing: 0.03em;
    }

    /* ── chip divider ──────────────────────────────────────────────────── */
    #chip-divider { display: none; }

    /* ── filter button ─────────────────────────────────────────────────── */
    #filter-btn {
      background: none; border: 1px solid transparent; border-radius: 999px;
      padding: 5px 10px; display: flex; align-items: center; gap: 5px;
      color: var(--text-muted); cursor: pointer;
      font-family: 'IBM Plex Mono', monospace; font-size: 12px;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }
    #filter-btn:hover { color: var(--text); }
    #filter-btn.active {
      color: var(--accent); border-color: var(--accent); background: var(--accent-dim);
    }
    #filter-count {
      display: none; background: var(--accent); color: #fff;
      font-size: 9px; font-weight: 700; padding: 1px 4px;
      border-radius: 999px; line-height: 1.4;
    }
    #filter-btn.active #filter-count { display: inline-block; }

    /* ── heatmap button ────────────────────────────────────────────────── */
    #heatmap-btn {
      background: none; border: 1px solid transparent; border-radius: 999px;
      padding: 5px 10px; display: flex; align-items: center; gap: 5px;
      color: var(--text-muted); cursor: pointer;
      font-family: 'IBM Plex Mono', monospace; font-size: 12px;
      transition: color 0.15s, border-color 0.15s, background 0.15s;
    }
    #heatmap-btn:hover { color: var(--text); }
    #heatmap-btn.active {
      color: #e05252;
      border-color: #e05252;
      background: #e0525222;
    }

    /* ── neu submenu ───────────────────────────────────────────────────── */
    #neu-submenu {
      display: none;
      position: fixed;
      left: 8px;
      bottom: 70px;
      pointer-events: all;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 4px;
      box-shadow: 0 4px 24px rgba(0,0,0,0.4);
      z-index: 15;
      min-width: 120px;
    }
    #neu-submenu.open { display: block; }
    .neu-sub-item {
      display: block;
      width: 100%;
      background: none;
      border: none;
      border-radius: 7px;
      padding: 7px 12px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      color: var(--text-muted);
      cursor: pointer;
      text-align: left;
      white-space: nowrap;
      transition: background 0.12s, color 0.12s;
    }
    .neu-sub-item:hover { background: var(--accent-dim); color: var(--accent); }
    .neu-sub-item.active { color: var(--accent); }

    /* ── von...bis panel ───────────────────────────────────────────────── */
    #vonbis-panel {
      display: none;
      position: fixed;
      left: 8px;
      right: 8px;
      bottom: 70px;
      pointer-events: all;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px;
      box-shadow: 0 4px 24px rgba(0,0,0,0.4);
      z-index: 15;
    }
    #vonbis-panel.open { display: block; }
    .vonbis-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 8px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      color: var(--text-muted);
    }
    .vonbis-row label { flex-shrink: 0; min-width: 28px; }
    .vonbis-row input[type=datetime-local] {
      background: var(--surface2);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 5px 8px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      flex: 1;
      width: 100%;
      min-width: 0;
    }
    #vonbis-apply {
      width: 100%;
      background: var(--accent);
      color: #fff;
      border: none;
      border-radius: 7px;
      padding: 7px 12px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: opacity 0.15s;
    }
    #vonbis-apply:hover { opacity: 0.85; }
    @keyframes inputShake {
      0%, 100% { transform: translateX(0); }
      20%, 60% { transform: translateX(-4px); }
      40%, 80% { transform: translateX(4px); }
    }
    .input-error {
      border-color: #e05252 !important;
      animation: inputShake 0.35s ease;
    }

    /* ── filter backdrop ───────────────────────────────────────────────── */
    #filter-backdrop {
      position: fixed; inset: 0; z-index: 20;
      background: rgba(0,0,0,0.5); opacity: 0; pointer-events: none;
      transition: opacity 0.25s;
    }
    #filter-backdrop.open { opacity: 1; pointer-events: all; }

    /* ── filter sheet ──────────────────────────────────────────────────── */
    #filter-sheet {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 21;
      background: var(--surface); border-radius: 24px 24px 0 0;
      padding: 0 16px 32px;
      transform: translateY(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      max-height: 70vh; overflow-y: auto;
    }
    #filter-sheet.open { transform: translateY(0); }

    /* ── drag handle ───────────────────────────────────────────────────── */
    #filter-drag-handle {
      width: 36px; height: 4px; border-radius: 2px;
      background: var(--border); margin: 12px auto 16px;
    }

    /* ── category grid ─────────────────────────────────────────────────── */
    #filter-grid {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    }
    .cat-filter-btn {
      display: flex; flex-direction: column; align-items: center; gap: 5px;
      padding: 10px 4px; border: 1px solid var(--border); border-radius: 10px;
      background: none; cursor: pointer; position: relative; overflow: hidden;
      transition: border-color 0.15s, background 0.15s;
      font-family: 'IBM Plex Mono', monospace; font-size: 10px;
      color: var(--text-muted); text-align: center;
    }
    .cat-filter-btn svg { flex-shrink: 0; }
    .cat-filter-btn.active {
      border-color: currentColor; color: currentColor;
      background: color-mix(in srgb, currentColor 12%, transparent);
    }
    @supports not (background: color-mix(in srgb, red 12%, transparent)) {
      .cat-filter-btn.active { background: rgba(128,128,128,0.1); }
    }

    /* ── nav bar ──────────────────────────────────────────────────────── */
    #nav-bar {
      pointer-events: all;
      display: flex;
      justify-content: space-around;
      width: 100%;
      max-width: 360px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 6px 4px;
      box-shadow: 0 2px 16px rgba(0,0,0,0.35);
    }
    .nav-btn {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      padding: 6px 8px;
      background: none;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      color: var(--text-dim);
      font-family: 'Rajdhani', sans-serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      transition: color 0.15s, background 0.15s;
      min-width: 0;
    }
    .nav-btn:hover { color: var(--text-muted); }
    .nav-btn.active {
      color: var(--accent);
      background: var(--accent-dim);
    }
    .nav-btn svg {
      width: 18px;
      height: 18px;
    }

    /* ── view panels (Liste + Stats) ──────────────────────────────────── */
    .view-panel {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 9;
      height: 80vh;
      background: var(--surface);
      border-radius: 20px 20px 0 0;
      border: 1px solid var(--border);
      border-bottom: none;
      box-shadow: 0 -4px 32px rgba(0,0,0,0.4);
      transform: translateY(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow-y: auto;
      overflow-x: hidden;
      padding-bottom: 180px;
    }
    .view-panel.open {
      transform: translateY(0);
    }
    .panel-drag-handle {
      width: 36px;
      height: 4px;
      border-radius: 2px;
      background: var(--border);
      margin: 10px auto 8px;
    }
    .panel-placeholder {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 12px;
      height: 200px;
      color: var(--text-dim);
      font-family: 'IBM Plex Mono', monospace;
      font-size: 13px;
    }

    /* ── liste panel ──────────────────────────────────────────────────── */
    #liste-search-bar {
      position: sticky;
      top: 0;
      z-index: 1;
      padding: 8px 14px 10px;
      background: var(--surface);
      border-bottom: 1px solid var(--border);
    }
    #liste-search {
      width: 100%;
      box-sizing: border-box;
      background: var(--surface2);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 8px 12px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      outline: none;
      transition: border-color 0.15s;
    }
    #liste-search:focus { border-color: var(--accent); }
    #liste-search::placeholder { color: var(--text-dim); }

    .liste-card {
      display: flex;
      gap: 10px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: background 0.12s;
    }
    .liste-card:hover { background: var(--surface2); }
    .liste-card:active { background: var(--accent-dim); }

    .liste-card-icon {
      flex-shrink: 0;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .liste-card-icon svg { width: 16px; height: 16px; }

    .liste-card-body {
      flex: 1;
      min-width: 0;
      overflow-wrap: break-word;
      word-wrap: break-word;
    }
    .liste-card-cat {
      font-family: 'Rajdhani', sans-serif;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      margin-bottom: 3px;
    }
    .liste-card-summary {
      font-size: 13px;
      color: var(--text);
      line-height: 1.45;
      margin-bottom: 4px;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
      overflow-wrap: break-word;
      word-break: break-word;
    }
    .liste-card-meta {
      font-size: 11px;
      color: var(--text-muted);
      margin-top: 4px;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      overflow-wrap: break-word;
      word-break: break-word;
    }
    .liste-card-badge {
      font-family: 'Rajdhani', sans-serif;
      font-size: 10px;
      font-weight: 700;
      color: var(--warn);
      letter-spacing: 0.06em;
    }
    .liste-empty {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 60px 20px;
      color: var(--text-dim);
      font-family: 'IBM Plex Mono', monospace;
      font-size: 13px;
      text-align: center;
    }
    .liste-load-more {
      display: block;
      width: calc(100% - 28px);
      margin: 12px 14px;
      padding: 10px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      color: var(--text-muted);
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      cursor: pointer;
      text-align: center;
      transition: background 0.12s, color 0.12s;
    }
    .liste-load-more:hover { background: var(--accent-dim); color: var(--accent); }

    /* ── stats panel ──────────────────────────────────────────────────── */
    .stats-section {
      padding: 16px 14px;
      border-bottom: 1px solid var(--border);
    }
    .stats-section:last-child { border-bottom: none; }

    .stats-section-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .stats-title {
      font-family: 'Rajdhani', sans-serif;
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--text-muted);
      margin: 0;
    }
    .stats-subtitle {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      color: var(--text-dim);
      margin: -8px 0 12px 0;
    }
    .stats-period-label {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      color: var(--text-dim);
    }

    .stats-big-number-row {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      margin-bottom: 16px;
    }
    .stats-big-number {
      display: flex;
      flex-direction: column;
    }
    .stats-big-value {
      font-family: 'Rajdhani', sans-serif;
      font-size: 42px;
      font-weight: 700;
      line-height: 1;
      color: var(--text);
    }
    .stats-big-label {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      color: var(--text-dim);
      margin-top: 2px;
    }

    .stats-trend {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 13px;
      text-align: right;
      line-height: 1.5;
    }
    .stats-trend-arrow {
      font-size: 16px;
      font-weight: 700;
    }
    .stats-trend-up { color: #e05252; }
    .stats-trend-down { color: #4dbb88; }
    .stats-trend-flat { color: var(--text-dim); }
    .stats-trend-label {
      font-size: 10px;
      color: var(--text-dim);
      display: block;
    }

    /* D3 chart containers */
    #stats-category-bars, #stats-timeline-chart, #stats-hourly-chart, #stats-category-donut {
      width: 100%;
      overflow: hidden;
    }
    #stats-category-bars svg, #stats-timeline-chart svg, #stats-hourly-chart svg, #stats-category-donut svg {
      display: block;
      width: 100%;
      height: auto;
    }

    /* Category bar labels */
    .cat-bar-label {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      fill: var(--text-muted);
    }
    .cat-bar-count {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      fill: var(--text-dim);
    }

    /* Donut legend */
    .donut-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 14px;
      margin-top: 10px;
    }
    .donut-legend-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      color: var(--text-muted);
    }
    .donut-legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    /* ── lageindex widget ─────────────────────────────────────────────── */
    #lageindex-widget {
      position: fixed;
      top: 56px;
      right: 12px;
      z-index: 10;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      min-width: 180px;
      max-width: 260px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.35);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      overflow: hidden;
      transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
      pointer-events: all;
      opacity: 0;
    }
    #lageindex-widget.visible { opacity: 1; }

    .lageindex-header {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      cursor: pointer;
      user-select: none;
      -webkit-user-select: none;
    }
    .lageindex-icon {
      font-size: 9px;
      color: var(--accent);
      transition: transform 0.3s;
    }
    .lageindex.collapsed .lageindex-icon { transform: rotate(180deg); }
    .lageindex-title {
      font-family: 'Rajdhani', sans-serif;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.15em;
      color: var(--text-dim);
      text-transform: uppercase;
    }
    .lageindex-score {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 16px;
      font-weight: 500;
      color: var(--text);
      margin-left: auto;
    }
    .lageindex-arrow {
      font-size: 14px;
      line-height: 1;
    }
    .lageindex-arrow.up { color: #e05252; }
    .lageindex-arrow.down { color: #4dbb6a; }
    .lageindex-arrow.flat { color: var(--text-muted); }
    .lageindex-change {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
      color: var(--text-muted);
    }

    .lageindex-body {
      padding: 0 12px 10px;
      display: none;
    }
    .lageindex:not(.collapsed) .lageindex-body { display: block; }

    .lageindex-detail-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 4px 0;
      border-bottom: 1px solid var(--border);
    }
    .lageindex-detail-row:last-of-type { border-bottom: none; }
    .lageindex-detail-label {
      font-size: 11px;
      color: var(--text-muted);
    }
    .lageindex-detail-value {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 12px;
      font-weight: 500;
      color: var(--text);
    }

    .lageindex-methodology {
      display: block;
      margin-top: 8px;
      font-size: 9px;
      color: var(--text-dim);
      text-decoration: none;
      cursor: pointer;
      transition: color 0.15s;
    }
    .lageindex-methodology:hover { color: var(--accent); }

    .lageindex-breakdown {
      margin-top: 6px;
      padding-top: 6px;
      border-top: 1px solid var(--border);
    }
    .lageindex-cat-row {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 2px 0;
    }
    .lageindex-cat-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .lageindex-cat-name {
      font-size: 10px;
      color: var(--text-muted);
      width: 52px;
      flex-shrink: 0;
    }
    .lageindex-cat-bar-bg {
      flex: 1;
      height: 4px;
      background: var(--border);
      border-radius: 2px;
      overflow: hidden;
    }
    .lageindex-cat-bar {
      height: 100%;
      border-radius: 2px;
      transition: width 0.4s ease;
    }
    .lageindex-cat-count {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 10px;
      color: var(--text-muted);
      width: 24px;
      text-align: right;
      flex-shrink: 0;
    }

    /* ── methodology modal ────────────────────────────────────────────── */
    .methodik-backdrop {
      position: fixed;
      inset: 0;
      z-index: 100;
      background: rgba(0,0,0,0.6);
      display: none;
    }
    .methodik-backdrop.open { display: block; }
    .methodik-modal {
      position: fixed;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      z-index: 101;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 20px;
      max-width: 380px;
      width: calc(100% - 40px);
      box-shadow: 0 8px 40px rgba(0,0,0,0.5);
      display: none;
    }
    .methodik-modal.open { display: block; }
    .methodik-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 14px;
    }
    .methodik-title {
      font-family: 'Rajdhani', sans-serif;
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
    }
    #methodik-close {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 16px;
      cursor: pointer;
      padding: 4px;
    }
    .methodik-body {
      font-size: 12px;
      color: var(--text-muted);
      line-height: 1.6;
    }
    .methodik-body p { margin-bottom: 10px; }
    .methodik-body strong { color: var(--text); }
    .methodik-body em { font-style: italic; }
    .methodik-weights {
      margin: 8px 0 12px;
    }
    .methodik-weight-row {
      display: flex;
      justify-content: space-between;
      padding: 3px 0;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 11px;
    }
    .methodik-weight-row span:last-child {
      color: var(--accent);
      font-weight: 500;
    }

    /* ── Section 5: Glass morphism consistency ─────────────────────────── */
    #legend-overlay,
    #filter-sheet,
    #bereich-panel,
    #neu-submenu,
    #vonbis-panel {
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    #filter-sheet {
      border: 1px solid var(--border);
      box-shadow: 0 4px 24px rgba(0,0,0,0.35);
    }
    #bereich-panel {
      box-shadow: 0 4px 24px rgba(0,0,0,0.35);
    }
    body.light #legend-overlay,
    body.light #filter-sheet,
    body.light #bereich-panel,
    body.light #lageindex-widget,
    body.light #neu-submenu,
    body.light #vonbis-panel {
      box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    }

    /* ── Section 7: Utility buttons visual distinction ──────────────────── */
    #heatmap-btn,
    #filter-btn {
      border-left: 1px solid var(--border);
      margin-left: 2px;
      padding-left: 10px;
      opacity: 0.6;
      transition: color 0.15s, border-color 0.15s, background 0.15s, opacity 0.15s;
    }
    #heatmap-btn:hover,
    #filter-btn:hover,
    #heatmap-btn.active,
    #filter-btn.active {
      opacity: 1;
    }

    /* ── Section 9: Light mode quality pass ────────────────────────────── */
    body.light .cat-pin {
      opacity: 0.9;
    }
    body.light .cluster-pin {
      background: rgba(255,255,255,0.85);
      border-color: rgba(0,0,0,0.15) !important;
      color: var(--text);
    }
    body.light #chip-bar {
      box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    }
    body.light #nav-bar {
      box-shadow: 0 -1px 8px rgba(0,0,0,0.06);
    }
    body.light .view-panel {
      box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
    }

    /* ── Section 10: Typography consistency ────────────────────────────── */
    .stats-title,
    .bereich-panel-title,
    .legend-title,
    .lageindex-title,
    .methodik-title,
    .popup-cat {
      font-family: 'Rajdhani', sans-serif;
      font-weight: 700;
    }
    .stats-big-value,
    .lageindex-score,
    .lageindex-detail-value,
    .liste-card-meta,
    .popup-date,
    .popup-location,
    #count-badge {
      font-family: 'IBM Plex Mono', monospace;
    }
