:root {
  --color-bg: #090d16;
  --color-panel: rgba(13, 19, 33, 0.86);
  --color-panel-border: rgba(255, 255, 255, 0.09);
  --color-text-main: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-accent: #38bdf8;
  --color-sirens: #ef4444;
  --color-sirens-glow: rgba(239, 68, 68, 0.35);
  --color-roadworks: #f97316;
  --color-roadworks-glow: rgba(249, 115, 22, 0.35);
  --color-events: #a855f7;
  --color-events-glow: rgba(168, 85, 247, 0.35);
  --color-environment: #10b981;
  --color-environment-glow: rgba(16, 185, 129, 0.35);
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--color-bg);
  font-family: var(--font-sans);
  color: var(--color-text-main);
}

/* Map Canvas */
#map {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background: #090d16;
}

.radar-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(9, 13, 22, 0.45) 100%);
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.65);
}

/* Leaflet Zoom control */
.leaflet-bar {
  border: 1px solid var(--color-panel-border) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  border-radius: 8px !important;
  overflow: hidden;
}
.leaflet-bar a {
  background-color: rgba(15, 23, 42, 0.88) !important;
  color: #f1f5f9 !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-panel-border) !important;
  transition: background 0.2s ease, color 0.2s ease;
}
.leaflet-bar a:hover {
  background-color: #1e293b !important;
  color: #38bdf8 !important;
}

/* Top Navigation & Compliance Bar */
.top-nav-bar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-glass-btn {
  background: var(--color-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-panel-border);
  color: var(--color-text-muted);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}
.nav-glass-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  color: var(--color-text-main);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Language Switcher Dropdown */
.lang-dropdown-wrapper {
  position: relative;
}
.lang-select-btn {
  background: var(--color-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-panel-border);
  color: var(--color-text-main);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}
.lang-select-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(13, 19, 33, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px;
  padding: 6px;
  width: 175px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}
.lang-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.lang-option {
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
}
.lang-option:hover, .lang-option.active {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

/* Timeframe Filter Dropdown (Top Nav) */
.timeframe-dropdown-wrapper {
  position: relative;
}
.timeframe-select-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.timeframe-select-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
}
.timeframe-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(13, 19, 33, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px;
  padding: 6px;
  width: 250px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}
.timeframe-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.timeframe-option {
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-main);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.timeframe-option .tf-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.timeframe-option .tf-title {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
}
.timeframe-option .tf-count {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}
.timeframe-option .tf-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
}
.timeframe-option:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}
.timeframe-option:hover .tf-title {
  color: #38bdf8;
}
.timeframe-option.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
}
.timeframe-option.active .tf-title {
  color: #38bdf8;
}
.timeframe-option.active .tf-count {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

/* Map Style Dropdown */
.mapstyle-dropdown-wrapper {
  position: relative;
}
.mapstyle-select-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.mapstyle-select-btn:hover {
  border-color: rgba(167, 139, 250, 0.4);
}
.mapstyle-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(13, 19, 33, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px;
  padding: 6px;
  width: 240px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 1002;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s ease;
}
.mapstyle-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.mapstyle-option {
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-main);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mapstyle-option:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.25);
}
.mapstyle-option.active {
  background: rgba(167, 139, 250, 0.18);
  border-color: rgba(167, 139, 250, 0.4);
}
.mapstyle-option .ms-preview {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.ms-preview-dark {
  background: radial-gradient(circle at 30% 30%, #334155, #0f172a);
  border-color: #38bdf8 !important;
}
.ms-preview-satellite {
  background: linear-gradient(135deg, #14532d, #065f46 45%, #1e3a8a);
  border-color: #10b981 !important;
}
.ms-preview-street {
  background: linear-gradient(135deg, #fef08a, #86efac 45%, #93c5fd);
  border-color: #eab308 !important;
}
.ms-preview-light {
  background: linear-gradient(135deg, #ffffff, #e2e8f0 70%, #cbd5e1);
  border-color: #94a3b8 !important;
}
.mapstyle-option .ms-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.mapstyle-option .ms-title {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
}
.mapstyle-option .ms-sub {
  font-size: 10px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mapstyle-option.active .ms-title {
  color: #a78bfa;
}

/* Floating Control Panel */
.control-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1000;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: var(--color-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

/* City-wide reports avoid putting non-geocoded incidents into one map cluster. */
.city-wide-updates {
  position: absolute;
  top: 92px;
  right: 16px;
  z-index: 900;
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100vh - 116px);
  overflow: hidden;
  color: var(--color-text-main);
  background: rgba(13, 19, 33, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-panel-border);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}
.city-wide-updates-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--color-panel-border);
}
.city-wide-updates-kicker {
  color: #38bdf8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.city-wide-updates h2 {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.3;
}
.city-wide-updates-count {
  min-width: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  color: #7dd3fc;
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}
.city-wide-updates-list {
  max-height: calc(100vh - 190px);
  overflow-y: auto;
}
.city-wide-updates.hidden { display: none; }
.city-wide-update {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.city-wide-update:last-child { border-bottom: 0; }
.city-wide-update-date {
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 10px;
}
.city-wide-update h3 {
  margin-top: 5px;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.4;
}
.city-wide-update p {
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 11px;
  line-height: 1.45;
}
.city-wide-update a {
  display: inline-block;
  margin-top: 8px;
  color: #38bdf8;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}
.city-wide-update a:hover { color: #bae6fd; }
.city-wide-updates-empty {
  padding: 18px 16px;
  color: #94a3b8;
  font-size: 11px;
}

.badge-court-events {
  background: rgba(192, 132, 252, 0.16);
  border: 1px solid rgba(192, 132, 252, 0.5);
  color: #d8b4fe;
}

.upcoming-hearings-panel {
  margin: 0 18px 14px;
  padding: 12px;
  border: 1px solid rgba(192, 132, 252, 0.32);
  border-radius: 12px;
  background: rgba(88, 28, 135, 0.14);
}
.upcoming-hearings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.upcoming-hearings-header .section-label {
  color: #c084fc;
  font-size: 9px;
}
.upcoming-hearings-header h2 {
  margin-top: 3px;
  color: #f3e8ff;
  font-size: 13px;
}
.upcoming-hearings-header h2 i { margin-right: 5px; color: #c084fc; }
.court-events-count {
  min-width: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(192, 132, 252, 0.45);
  border-radius: 999px;
  color: #e9d5ff;
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}
.upcoming-hearings-list { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.upcoming-hearing {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(192, 132, 252, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
}
.upcoming-hearing:hover { border-color: rgba(192, 132, 252, 0.65); background: rgba(192, 132, 252, 0.12); }
.upcoming-hearing-date { color: #c084fc; font: 10px var(--font-mono); }
.upcoming-hearing strong { font-size: 11px; line-height: 1.35; }
.upcoming-hearing span:last-child { color: #94a3b8; font-size: 10px; line-height: 1.3; }
.upcoming-hearings-empty { color: #94a3b8; font-size: 10px; line-height: 1.4; }

/* Brand Header */
.panel-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--color-panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  font-size: 17px;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.2);
}
.radar-pulse-ring {
  position: absolute;
  inset: -3px;
  border: 1px solid #38bdf8;
  border-radius: 12px;
  opacity: 0.6;
  animation: radarPing 2.4s infinite cubic-bezier(0, 0, 0.2, 1);
  pointer-events: none;
}
@keyframes radarPing {
  0% { transform: scale(0.95); opacity: 0.8; }
  70%, 100% { transform: scale(1.35); opacity: 0; }
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.brand-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #38bdf8;
  border-radius: 50%;
}
.brand-text p {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.live-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: liveBlink 1.5s infinite ease-in-out;
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Emergency 112 Notice (Compliance) */
.civic-alert-badge {
  margin: 10px 18px 0;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fca5a5;
  line-height: 1.3;
}
.civic-alert-badge strong {
  color: #fff;
  font-weight: 700;
}

/* Panel Body */
.panel-body {
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
}

/* Region Selector */
.region-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.section-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.region-selector {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.region-btn {
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-panel-border);
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s ease;
}
.region-btn:nth-child(1),
.region-btn:nth-child(2),
.region-btn:nth-child(3) {
  grid-column: span 2;
}
.region-btn:nth-child(4),
.region-btn:nth-child(5) {
  grid-column: span 3;
}
.region-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-main);
}
.region-btn.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.1);
}

/* Search Box */
.search-box {
  position: relative;
  width: 100%;
}
.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--color-text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--color-panel-border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--color-text-main);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input:focus {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}
.search-input::placeholder { color: #64748b; }

/* Panel Timeframe Select Row */
.panel-timeframe-row {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-panel-border);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-timeframe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-timeframe-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.panel-timeframe-sub {
  font-size: 10px;
  font-family: var(--font-mono);
  color: #38bdf8;
  font-weight: 600;
}
.panel-select-wrapper {
  position: relative;
  width: 100%;
}
.panel-timeframe-dropdown {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 7px 28px 7px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}
.panel-timeframe-dropdown:focus {
  border-color: #38bdf8;
}
.panel-timeframe-dropdown option {
  background: #0f172a;
  color: #f1f5f9;
}
.select-chevron-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Layers List */
.layers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.layer-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease, border-color 0.2s ease;
  user-select: none;
  cursor: pointer;
}
.layer-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}
.layer-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.layer-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.badge-sirens {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-sirens);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-roadworks {
  background: rgba(249, 115, 22, 0.15);
  color: var(--color-roadworks);
  border: 1px solid rgba(249, 115, 22, 0.3);
}
.badge-events {
  background: rgba(168, 85, 247, 0.15);
  color: var(--color-events);
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.badge-environment {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-environment);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-cameras {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.future-events-card {
  border: 1px dashed rgba(192, 132, 252, 0.45) !important;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0.04));
  box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.12);
}

.future-events-card .layer-icon-badge {
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, 0.45);
}

.future-events-card .layer-count-badge {
  background: rgba(168, 85, 247, 0.2);
  color: #f3e8ff;
}

.layer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.layer-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.layer-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-main);
}
.layer-count-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}
.layer-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.3;
}

/* Switches */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--color-panel-border);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 9999px;
}
.slider:before {
  position: absolute;
  content: '';
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: #94a3b8;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}
input:checked + .slider.slider-sirens { background-color: rgba(239, 68, 68, 0.3); border-color: var(--color-sirens); }
input:checked + .slider.slider-sirens:before { background-color: var(--color-sirens); box-shadow: 0 0 10px var(--color-sirens-glow); transform: translateX(18px); }
input:checked + .slider.slider-roadworks { background-color: rgba(249, 115, 22, 0.3); border-color: var(--color-roadworks); }
input:checked + .slider.slider-roadworks:before { background-color: var(--color-roadworks); box-shadow: 0 0 10px var(--color-roadworks-glow); transform: translateX(18px); }
input:checked + .slider.slider-events { background-color: rgba(168, 85, 247, 0.3); border-color: var(--color-events); }
input:checked + .slider.slider-events:before { background-color: var(--color-events); box-shadow: 0 0 10px var(--color-events-glow); transform: translateX(18px); }
input:checked + .slider.slider-environment { background-color: rgba(16, 185, 129, 0.3); border-color: var(--color-environment); }
input:checked + .slider.slider-environment:before { background-color: var(--color-environment); box-shadow: 0 0 10px var(--color-environment-glow); transform: translateX(18px); }
input:checked + .slider.slider-cameras { background-color: rgba(14, 165, 233, 0.3); border-color: #38bdf8; }
input:checked + .slider.slider-cameras:before { background-color: #38bdf8; box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); transform: translateX(18px); }

/* Primary Crime Card & Filters */
.layer-card.primary-crime-card {
  background: rgba(239, 68, 68, 0.09);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.12);
  padding: 8px 10px;
}
.layer-card.primary-crime-card .layer-icon-badge {
  width: 28px;
  height: 28px;
  font-size: 13px;
  border-radius: 8px;
}
.layer-card.primary-crime-card .layer-name {
  font-size: 12.5px;
}
.layer-card.primary-crime-card .layer-desc {
  font-size: 10.5px;
  line-height: 1.25;
}
.layer-card.primary-crime-card:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.55);
}
.primary-tag-pill {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 4px;
  padding: 1px 5px;
}

/* Quick Crime Type Filter Bar */
.crime-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 4px 0 8px;
  width: 100%;
}
.crime-filter-btn {
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.crime-filter-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}
.crime-filter-btn.active {
  background: rgba(239, 68, 68, 0.28);
  border-color: #ef4444;
  color: #fee2e2;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Bonus Layers (Civic Extras) Accordion / Container */
.bonus-layers-container {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}
.bonus-layers-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 4px 2px 8px;
  transition: color 0.15s ease;
}
.bonus-layers-toggle:hover {
  color: #38bdf8;
}
.bonus-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #64748b;
  font-weight: 600;
}
.bonus-layers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}
.bonus-layers-list.collapsed {
  display: none;
}

/* Publisher & Company Information Card (Kattegat Studio) */
.company-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.company-name {
  font-size: 15px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: -0.01em;
}
.company-detail {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.45;
}
.company-detail strong {
  color: #f1f5f9;
}
.colophon-bar {
  padding: 7px 18px 9px;
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 10px;
  color: #64748b;
  text-align: center;
  line-height: 1.4;
}
.colophon-bar span {
  display: inline-block;
}
.colophon-bar strong {
  color: #94a3b8;
  font-weight: 600;
}

/* Panel Footer & Transparency Links */
.panel-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--color-panel-border);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 4px;
}
.footer-stat {
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-stat strong {
  color: var(--color-text-main);
  font-family: var(--font-mono);
}
.panel-action-btn {
  background: none;
  border: none;
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.panel-action-btn:hover { background: rgba(56, 189, 248, 0.1); }

/* Transparency Subfooter Links */
.compliance-links-row {
  padding: 8px 18px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 10px;
  color: var(--color-text-muted);
}
.compliance-link {
  color: #94a3b8;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}
.compliance-link:hover { color: #38bdf8; }

/* Custom Map Pins & Clusters */
.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.custom-map-pin:hover {
  transform: scale(1.25) translateY(-4px);
  z-index: 9999 !important;
}
.pin-body {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 2;
  border-width: 2px;
  border-style: solid;
}
.pin-body i { font-size: 14px; }
.pin-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  opacity: 0.5;
  z-index: 1;
  animation: markerPulse 2.2s infinite ease-out;
}
@keyframes markerPulse {
  0% { transform: scale(0.85); opacity: 0.8; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}

/* Marker Cluster Overrides */
.marker-cluster,
.marker-cluster-custom {
  background-clip: padding-box;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.marker-cluster div,
.marker-cluster-custom .cluster-inner {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  line-height: 1 !important;
  color: #fff !important;
  font-family: var(--font-mono);
  font-weight: 800;
}
.marker-cluster-sirens { background-color: rgba(239, 68, 68, 0.28) !important; border: 1.5px solid rgba(239, 68, 68, 0.55); }
.marker-cluster-sirens div { background-color: rgba(220, 38, 38, 0.92) !important; color: #fff !important; font-family: var(--font-mono); font-weight: 800; }
.marker-cluster-roadworks { background-color: rgba(249, 115, 22, 0.28) !important; border: 1.5px solid rgba(249, 115, 22, 0.55); }
.marker-cluster-roadworks div { background-color: rgba(234, 88, 12, 0.92) !important; color: #fff !important; font-family: var(--font-mono); font-weight: 800; }
.marker-cluster-events { background-color: rgba(168, 85, 247, 0.28) !important; border: 1.5px solid rgba(168, 85, 247, 0.55); }
.marker-cluster-events div { background-color: rgba(147, 51, 234, 0.92) !important; color: #fff !important; font-family: var(--font-mono); font-weight: 800; }
.marker-cluster-court { background-color: rgba(168, 85, 247, 0.28) !important; border: 1.5px solid rgba(168, 85, 247, 0.55); }
.marker-cluster-court div { background-color: rgba(126, 34, 206, 0.92) !important; color: #fff !important; font-family: var(--font-mono); font-weight: 800; }
.marker-cluster-environment { background-color: rgba(16, 185, 129, 0.28) !important; border: 1.5px solid rgba(16, 185, 129, 0.55); }
.marker-cluster-environment div { background-color: rgba(5, 150, 105, 0.92) !important; color: #fff !important; font-family: var(--font-mono); font-weight: 800; }

/* Custom Leaflet Popup */
.leaflet-popup-content-wrapper {
  background: rgba(13, 19, 33, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--color-panel-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75) !important;
  padding: 0 !important;
  overflow: hidden;
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
  width: 290px !important;
  color: var(--color-text-main) !important;
}
.leaflet-popup-tip-container { display: none !important; }
.leaflet-popup-close-button {
  color: #94a3b8 !important;
  padding: 8px 10px !important;
  font-size: 16px !important;
}
.leaflet-popup-close-button:hover { color: #f1f5f9 !important; }

.popup-box {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-right: 18px;
}
.popup-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.popup-timestamp {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
}
.popup-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-main);
  line-height: 1.3;
}
.popup-desc {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
}
.popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--color-panel-border);
  font-size: 10px;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}
.popup-coords { display: flex; align-items: center; gap: 4px; }

/* Live Feed Drawer */
.feed-drawer {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  width: 340px;
  max-height: calc(100vh - 32px);
  background: var(--color-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-panel-border);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.feed-drawer.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(30px);
}
.feed-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feed-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.close-feed-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  border-radius: 6px;
}
.close-feed-btn:hover { color: #fff; }
.feed-list {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
}
.feed-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-panel-border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.feed-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}
.feed-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.feed-item-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.feed-item-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
}
.feed-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 3px;
}
.feed-item-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modals System (Legal, About, Contact, Privacy) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4, 7, 14, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-window {
  background: #0d1321;
  border: 1px solid var(--color-panel-border);
  border-radius: 18px;
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-window {
  transform: translateY(0) scale(1);
}
.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-title-group i {
  color: #38bdf8;
  font-size: 18px;
}
.modal-title-group h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-main);
}
.modal-close-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.modal-body {
  padding: 22px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.65;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-top: 6px;
}
.modal-body ul {
  padding-left: 20px;
}
.modal-body li {
  margin-bottom: 6px;
}
.modal-body .highlight-box {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  color: #bae6fd;
}

/* Contact Form within Modal */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.form-control {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--color-panel-border);
  border-radius: 8px;
  padding: 9px 12px;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease;
}
.form-control:focus {
  border-color: #38bdf8;
}
.form-submit-btn {
  background: #38bdf8;
  color: #090d16;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 6px;
}
.form-submit-btn:hover { background: #7dd3fc; }

/* Cookie Consent Banner (GDPR / Google Ads Approval Requirement) */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2500;
  width: calc(100% - 40px);
  max-width: 680px;
  background: rgba(13, 19, 33, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 1;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(30px);
}
.cookie-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cookie-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f1f5f9;
}
.cookie-desc {
  font-size: 12px;
  line-height: 1.55;
  color: #94a3b8;
}
.cookie-desc a {
  color: #38bdf8;
  text-decoration: underline;
  cursor: pointer;
}
.cookie-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cookie-btn-primary {
  background: #38bdf8;
  color: #090d16;
  border: none;
}
.cookie-btn-primary:hover { background: #7dd3fc; }
.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--color-panel-border);
  color: #f1f5f9;
}
.cookie-btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }
.cookie-btn-link {
  background: none;
  border: none;
  color: #94a3b8;
  text-decoration: underline;
  cursor: pointer;
  padding: 8px;
}
.cookie-btn-link:hover { color: #f1f5f9; }

/* Mobile Hamburger & Media Queries */
.mobile-toggle-btn {
  display: none;
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  background: rgba(13, 19, 33, 0.9);
  border: 1px solid var(--color-panel-border);
  border-radius: 12px;
  color: var(--color-text-main);
  font-size: 18px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
  .mobile-toggle-btn { display: flex; }
  .top-nav-bar { top: 16px; right: 16px; }
  .control-panel {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    max-height: 78vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    transform: translateY(calc(100% - 62px));
  }
  .control-panel.mobile-expanded { transform: translateY(0); }
  .panel-header { cursor: pointer; }
  .feed-drawer {
    top: 70px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 140px);
  }
  .city-wide-updates {
    top: 70px;
    right: 10px;
    width: min(340px, calc(100vw - 20px));
    max-height: 38vh;
  }
  .city-wide-updates-list { max-height: calc(38vh - 74px); }
  .cookie-banner {
    bottom: 10px;
    width: calc(100% - 20px);
    padding: 14px 16px;
  }
}

/* ==========================================================================
   Live Police Pipeline & Feed Sync Controls (High-contrast solid dark glass)
   ========================================================================== */

.live-pipeline-pill {
  background: rgba(13, 19, 33, 0.94) !important;
  border: 1px solid rgba(16, 185, 129, 0.6) !important;
  color: #10b981 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
}
.live-pipeline-pill:hover {
  background: rgba(22, 30, 49, 0.98) !important;
  border-color: rgba(16, 185, 129, 0.9) !important;
  color: #34d399 !important;
}
.pulse-emerald {
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
}

.sync-feeds-btn {
  background: rgba(13, 19, 33, 0.94) !important;
  border: 1px solid rgba(56, 189, 248, 0.6) !important;
  color: #38bdf8 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35) !important;
}
.sync-feeds-btn:hover {
  background: rgba(22, 30, 49, 0.98) !important;
  border-color: rgba(56, 189, 248, 0.9) !important;
  color: #7dd3fc !important;
}

/* Light Map Style Optimizations */
body.map-style-light #map {
  background: #f8fafc;
}
body.map-style-light .radar-overlay {
  background: transparent;
  box-shadow: none;
}
body.map-style-light .control-panel {
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
body.map-style-light .nav-glass-btn {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  color: #f8fafc;
}
body.map-style-light .leaflet-control-zoom a {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3) !important;
}
body.map-style-light .leaflet-control-zoom a:hover {
  background-color: #1e293b !important;
  color: #38bdf8 !important;
}
body.map-style-light .leaflet-container .leaflet-control-attribution {
  background: rgba(15, 23, 42, 0.88) !important;
  color: #94a3b8 !important;
  border-radius: 4px;
}
body.map-style-light .leaflet-container .leaflet-control-attribution a {
  color: #38bdf8 !important;
}
body.map-style-light .feed-drawer {
  background: rgba(15, 23, 42, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.4);
}

/* Future / Scheduled Event Tag */
.future-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #c084fc;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
}
.future-badge.work {
  background: rgba(249, 115, 22, 0.18);
  border-color: rgba(249, 115, 22, 0.5);
  color: #fb923c;
}

/* ==========================================================================
   Rankings & Safety Ledger Page
   ========================================================================== */
.rankings-view-container {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: #090d16;
  color: #f1f5f9;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}
.rankings-view-container.active {
  display: flex;
}
body.map-style-light .rankings-view-container {
  background: #f1f5f9;
  color: #0f172a;
}
.rankings-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 19, 33, 0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
body.map-style-light .rankings-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}
.rankings-title-group h1 {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.02em;
}
.rankings-title-group p {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 3px;
}
body.map-style-light .rankings-title-group p {
  color: #64748b;
}
.rankings-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rankings-back-btn {
  background: #38bdf8;
  color: #090d16;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}
.rankings-back-btn:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
}
.rankings-content {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.rankings-category-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.rankings-cat-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}
body.map-style-light .rankings-cat-btn {
  background: #e2e8f0;
  border-color: #cbd5e1;
  color: #334155;
}
.rankings-cat-btn.active {
  background: #38bdf8;
  color: #090d16;
  border-color: #38bdf8;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}
.rankings-filters-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px 18px;
  border-radius: 12px;
}
body.map-style-light .rankings-filters-bar {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.rank-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rank-filter-group label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
body.map-style-light .rank-filter-group label {
  color: #64748b;
}
.rank-select, .rank-search-input {
  background: rgba(13, 19, 33, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 140px;
}
body.map-style-light .rank-select, body.map-style-light .rank-search-input {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
.rankings-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.rank-kpi-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.map-style-light .rank-kpi-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.rank-kpi-label {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}
body.map-style-light .rank-kpi-label {
  color: #64748b;
}
.rank-kpi-val {
  font-size: 24px;
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-mono);
}
.rank-kpi-sub {
  font-size: 11px;
  color: #64748b;
}
.rankings-table-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
}
body.map-style-light .rankings-table-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.rank-table-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
body.map-style-light .rank-table-header {
  border-bottom-color: #e2e8f0;
}
.rank-table-header h2 {
  font-size: 16px;
  font-weight: 800;
}
.rankings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.rankings-table th {
  padding: 12px 18px;
  background: rgba(30, 41, 59, 0.5);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body.map-style-light .rankings-table th {
  background: #f8fafc;
  color: #64748b;
  border-bottom-color: #e2e8f0;
}
.rankings-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
body.map-style-light .rankings-table td {
  border-bottom-color: #f1f5f9;
}
.rankings-table tr:hover td {
  background: rgba(56, 189, 248, 0.04);
}
body.map-style-light .rankings-table tr:hover td {
  background: #f8fafc;
}
.rank-city-cell {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rank-badge-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-family: var(--font-mono);
}
.rank-btn-map {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}
.rank-btn-map:hover {
  background: #38bdf8;
  color: #090d16;
}

/* Toast Notification */
.sync-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--color-text-main);
  padding: 10px 22px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.2);
  z-index: 2000;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sync-toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  visibility: hidden;
}

/* Pipeline Status Dashboard in Modal */
.pipeline-overview-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--color-panel-border);
  margin-bottom: 20px;
}
.pipeline-authority-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.pipeline-authority-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.pipeline-authority-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}
.auth-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.auth-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-endpoint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
}
.auth-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.auth-count-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.pipeline-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

/* ==========================================================================
   Phase 2, 3 & 5 UI Wiring, Custom Markers, Category Bars & Adsterra Units
   ========================================================================== */

#map {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1;
}

/* 2-Column Nordic Hubs Grid (6 buttons: 5 capitals + Pan-Nordic overview) */
.region-selector {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 6px !important;
}
.region-selector .region-btn {
  grid-column: span 1 !important;
  padding: 7px 8px !important;
  font-size: 11.5px !important;
}

/* Search Input Clear (x) Button */
.search-input {
  padding-right: 32px !important;
}
.search-clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
}
.search-clear-btn.hidden {
  display: none !important;
}

/* Courts & Civic Extras Accordion Enhancements */
.badge-courts {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}
input:checked + .slider.slider-courts {
  background-color: rgba(168, 85, 247, 0.32);
  border-color: #a855f7;
}
input:checked + .slider.slider-courts:before {
  background-color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.45);
  transform: translateX(18px);
}
.bonus-layers-list .upcoming-hearings-panel {
  margin: 2px 0 6px !important;
}
.civic-sublist {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 2px 0 6px;
}
.civic-sublist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #cbd5e1;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.civic-sublist-item:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.1);
  color: #f8fafc;
}
.civic-sublist-item .sub-city {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #38bdf8;
  text-transform: uppercase;
}

/* Custom CategoryKey Markers (Phase 3) */
.pin-body.marker-severe {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: radial-gradient(circle at 30% 30%, #1e1b2e, #0f172a) !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.55), 0 4px 12px rgba(0, 0, 0, 0.75) !important;
}
.pin-pulse.pulse-severe {
  background: rgba(239, 68, 68, 0.45) !important;
  border: 1px solid rgba(239, 68, 68, 0.85) !important;
  animation: markerPulse 1.6s infinite ease-out !important;
}
.pin-body.marker-amber {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
  background: #0f172a !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35), 0 4px 12px rgba(0, 0, 0, 0.7) !important;
}
.pin-pulse.pulse-amber {
  background: rgba(245, 158, 11, 0.32) !important;
}
.pin-body.marker-court {
  border-color: #a855f7 !important;
  color: #d8b4fe !important;
  background: linear-gradient(135deg, #2e1065, #0f172a) !important;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.5), 0 4px 12px rgba(0, 0, 0, 0.75) !important;
}
.pin-pulse.pulse-court {
  background: rgba(168, 85, 247, 0.38) !important;
}
.pin-body.marker-camera {
  border-color: #06b6d4 !important;
  color: #22d3ee !important;
  background: linear-gradient(135deg, #083344, #0f172a) !important;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.45), 0 4px 12px rgba(0, 0, 0, 0.75) !important;
}
.pin-pulse.pulse-camera {
  background: rgba(6, 182, 212, 0.35) !important;
}

/* Rankings Category Distribution Bars */
.rankings-category-bars-body {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.cat-bar-item {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.map-style-light .cat-bar-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.cat-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
.cat-bar-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
}
.cat-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
body.map-style-light .cat-bar-track {
  background: #e2e8f0;
}
.cat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Adsterra Monetization Placements (Phase 5) */
.ad-slot-collapsed {
  display: none !important;
}
.ad-slot-sidebar {
  margin-top: 8px;
}
.ad-card-sidebar {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.85));
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.ad-card-header,
.ad-infeed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.ad-badge-sponsored {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.ad-badge-network {
  font-size: 8.5px;
  font-family: var(--font-mono);
  color: #64748b;
  letter-spacing: 0.06em;
}
.ad-card-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ad-card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ad-card-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.3;
}
.ad-card-desc {
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 2px;
}
.ad-card-footer {
  display: flex;
  justify-content: flex-end;
}
.ad-card-cta {
  font-size: 10.5px;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
}
.ad-card-cta:hover {
  color: #bae6fd;
  text-decoration: underline;
}

/* Slot 2: Bottom Map Leaderboard Overlay */
.ad-slot-leaderboard {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  width: min(728px, calc(100vw - 410px));
  min-width: 320px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.ad-leaderboard-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ad-leaderboard-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ad-leaderboard-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ad-leaderboard-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ad-leaderboard-cta {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  text-decoration: none;
}
.ad-leaderboard-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-leaderboard-close:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
}

/* Slot 3: In-Feed Native Ad Item */
.ad-infeed-item {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
  border: 1px dashed rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ad-infeed-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #e2e8f0;
}
.ad-infeed-desc {
  font-size: 10.5px;
  color: #94a3b8;
}
.ad-ledger-row td {
  background: rgba(56, 189, 248, 0.05) !important;
  padding: 8px 18px !important;
}
.ad-ledger-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: #cbd5e1;
}

@media (max-width: 900px) {
  .ad-slot-leaderboard {
    width: calc(100vw - 24px);
    bottom: 70px;
  }
}

/* Traffic Accidents Quick-Toggle Sub-Card & Map Pin Legend */
.traffic-subtoggle-card {
  margin-top: 6px;
  padding: 9px 11px !important;
  background: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(245, 158, 11, 0.28) !important;
}
.badge-traffic-accidents {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #f59e0b !important;
  border: 1px solid rgba(245, 158, 11, 0.4) !important;
}
.map-pin-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding: 7px 9px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
}
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: #cbd5e1;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.65);
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot-violent {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}
.legend-dot-property {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
}
.legend-dot-court {
  background: #a855f7;
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.7);
}
.legend-dot-camera {
  background: #06b6d4;
  box-shadow: 0 0 6px rgba(6, 182, 212, 0.7);
}

/* ==========================================================================
   Crawlable Links, Docked Feed Drawer & Consent-Aware Adsterra Slot Styling
   ========================================================================== */
a.region-btn,
a.lang-option {
  text-decoration: none;
}

.feed-drawer {
  top: 66px !important;
  right: 16px !important;
  z-index: 980 !important;
  max-height: calc(100vh - 185px) !important;
}

@media (max-width: 900px) {
  .feed-drawer {
    top: 68px !important;
    right: 10px !important;
    left: 10px !important;
    max-height: 44vh !important;
  }
}

.adsterra-slot-shell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ad-cookie-link-btn,
.ad-card-cta {
  background: none;
  border: none;
  padding: 0;
  color: #38bdf8;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.ad-cookie-link-btn:hover,
.ad-card-cta:hover {
  color: #bae6fd;
}

.ad-slot-leaderboard {
  width: min(756px, calc(100vw - 410px));
  padding: 6px 12px;
}

@media (max-width: 1100px) {
  .ad-slot-leaderboard {
    width: min(350px, calc(100vw - 24px));
    bottom: 68px;
  }
}
