@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:wght@400;600;700&display=swap");

:root {
  --bg: #070b08;
  --panel: #0c1410;
  --panel-border: #1a3a28;
  --text: #c8e6c0;
  --muted: #6f9a78;
  --accent: #3dff8a;
  --accent-dim: #1a8f4a;
  --warn: #e6c35c;
  --danger: #ff6b4a;
  --scan: rgba(61, 255, 138, 0.04);
  --font-ui: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}
body.is-booting {
  overflow: hidden;
}

/* Hollywood COP boot splash */
.cop-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(18, 48, 28, 0.55) 0%, transparent 60%),
    linear-gradient(180deg, #020605 0%, #06100a 45%, #030806 100%);
  color: var(--text);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.cop-boot.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.cop-boot-scan {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.28) 0px,
      rgba(0, 0, 0, 0.28) 1px,
      transparent 1px,
      transparent 3px
    );
  opacity: 0.55;
  animation: cop-boot-flicker 2.8s ease-in-out infinite;
}
.cop-boot-frame {
  position: relative;
  width: min(520px, 100%);
  padding: 1.4rem 1.35rem 1.15rem;
  border: 1px solid var(--accent-dim);
  box-shadow:
    0 0 0 1px rgba(61, 255, 138, 0.12),
    inset 0 0 40px rgba(61, 255, 138, 0.04),
    0 0 60px rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, rgba(12, 24, 16, 0.92) 0%, rgba(6, 14, 10, 0.96) 100%);
}
.cop-boot-top {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.cop-boot-mark {
  color: var(--accent);
  font-size: 1.6rem;
  line-height: 1;
  text-shadow: 0 0 14px var(--accent-dim);
  animation: cop-boot-pulse 1.2s ease-in-out infinite;
}
.cop-boot-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.cop-boot-title {
  margin: 0.2rem 0 0.15rem;
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 18px rgba(61, 255, 138, 0.35);
}
.cop-boot-sub {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.cop-boot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.95rem;
}
.cop-boot-grid span {
  height: 3px;
  background: rgba(61, 255, 138, 0.12);
  box-shadow: inset 0 0 0 1px rgba(26, 58, 40, 0.8);
  transform-origin: left center;
  animation: cop-boot-seg 3s linear forwards;
}
.cop-boot-grid span:nth-child(1) { animation-delay: 0.15s; }
.cop-boot-grid span:nth-child(2) { animation-delay: 0.55s; }
.cop-boot-grid span:nth-child(3) { animation-delay: 1.1s; }
.cop-boot-grid span:nth-child(4) { animation-delay: 1.7s; }
.cop-boot-status {
  margin: 0 0 0.55rem;
  min-height: 1.2em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.cop-boot-bar {
  position: relative;
  height: 14px;
  border: 1px solid var(--accent-dim);
  background: #040a06;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.65);
}
.cop-boot-bar-fill {
  height: 100%;
  width: 0%;
  background:
    repeating-linear-gradient(
      -55deg,
      rgba(61, 255, 138, 0.95) 0 8px,
      rgba(26, 143, 74, 0.75) 8px 16px
    );
  box-shadow: 0 0 16px rgba(61, 255, 138, 0.45);
  transition: width 0.18s linear;
}
.cop-boot-bar-glow {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 28px;
  margin-left: -14px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  opacity: 0;
  mix-blend-mode: screen;
}
.cop-boot-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.45rem;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.cop-boot-meta #cop-boot-pct {
  color: var(--accent);
  min-width: 2.5em;
}
.cop-boot-log {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0.55rem 0 0;
  border-top: 1px solid var(--panel-border);
  max-height: 6.5rem;
  overflow: hidden;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.cop-boot-log li {
  padding: 0.12rem 0;
  opacity: 0;
  animation: cop-boot-log-in 0.35s ease forwards;
}
.cop-boot-log li::before {
  content: "> ";
  color: var(--accent-dim);
}

@keyframes cop-boot-seg {
  from { transform: scaleX(0); background: rgba(61, 255, 138, 0.12); }
  to { transform: scaleX(1); background: rgba(61, 255, 138, 0.65); }
}
@keyframes cop-boot-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 10px var(--accent-dim); }
  50% { opacity: 0.55; text-shadow: 0 0 22px var(--accent); }
}
@keyframes cop-boot-flicker {
  0%, 100% { opacity: 0.55; }
  92% { opacity: 0.55; }
  93% { opacity: 0.35; }
  94% { opacity: 0.6; }
}
@keyframes cop-boot-log-in {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cop-boot-scan,
  .cop-boot-mark,
  .cop-boot-grid span,
  .cop-boot-log li {
    animation: none !important;
  }
  .cop-boot-grid span { transform: scaleX(1); background: rgba(61, 255, 138, 0.65); }
  .cop-boot-log li { opacity: 1; }
  .cop-boot-bar-fill { transition: none; }
}

/* CRT-televisiefilter over de kaart — zichtbaar, maar leesbaar */
.crt-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  border-radius: 1.5rem;
  isolation: isolate;
}

.crt-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 60, 60, 0.035) 0px,
      rgba(60, 255, 100, 0.03) 1px,
      rgba(60, 140, 255, 0.035) 2px,
      transparent 3px
    );
  mix-blend-mode: soft-light;
  opacity: 0.7;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.38) 0px,
      rgba(0, 0, 0, 0.38) 1px,
      transparent 1px,
      transparent 3px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 5px,
      rgba(0, 0, 0, 0.12) 6px
    );
  mix-blend-mode: multiply;
  opacity: 0.78;
}

.crt-glow {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(
      ellipse 80% 65% at 50% 45%,
      rgba(61, 255, 138, 0.05) 0%,
      transparent 58%
    );
  mix-blend-mode: screen;
  animation: crt-flicker 5s ease-in-out infinite;
}

.crt-scanlines::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 16%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(61, 255, 138, 0.045) 45%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(61, 255, 138, 0.045) 55%,
    transparent 100%
  );
  animation: crt-sweep 6.5s linear infinite;
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

.crt-scanlines::before {
  content: none;
}

.crt-stripes {
  position: absolute;
  inset: -50% 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 48px,
      rgba(0, 0, 0, 0.14) 48px,
      rgba(0, 0, 0, 0.22) 56px,
      rgba(0, 0, 0, 0.1) 64px,
      transparent 72px,
      transparent 140px,
      rgba(61, 255, 138, 0.04) 140px,
      rgba(255, 255, 255, 0.035) 148px,
      transparent 160px,
      transparent 220px
    );
  mix-blend-mode: soft-light;
  opacity: 0.85;
  animation: crt-stripes-roll 9s linear infinite;
}

.crt-stripes::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 90px,
      rgba(0, 0, 0, 0.18) 90px,
      rgba(0, 0, 0, 0.28) 102px,
      transparent 118px,
      transparent 280px
    );
  opacity: 0.7;
  animation: crt-stripes-roll 14s linear infinite reverse;
}

.crt-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 88% 82% at 50% 48%,
      transparent 55%,
      rgba(0, 0, 0, 0.22) 82%,
      rgba(0, 0, 0, 0.48) 100%
    );
  box-shadow:
    inset 0 0 48px rgba(0, 0, 0, 0.28),
    inset 0 0 90px rgba(0, 8, 4, 0.18);
}

.crt-bezel {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 2px rgba(26, 58, 40, 0.75),
    inset 0 0 0 7px rgba(0, 0, 0, 0.4),
    inset 0 0 24px rgba(0, 0, 0, 0.3);
  background:
    linear-gradient(
      118deg,
      transparent 0%,
      rgba(61, 255, 138, 0.05) 40%,
      rgba(255, 255, 255, 0.03) 45%,
      transparent 52%,
      transparent 100%
    );
}

@keyframes crt-flicker {
  0%, 94%, 100% { opacity: 1; }
  95% { opacity: 0.88; }
  96% { opacity: 1; }
  98% { opacity: 0.92; }
  99% { opacity: 1; }
}

@keyframes crt-sweep {
  0% { transform: translateY(-130%); }
  100% { transform: translateY(650%); }
}

@keyframes crt-stripes-roll {
  0% { transform: translateY(0); }
  100% { transform: translateY(25%); }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #0f1a12 0%, #0a100c 100%);
  z-index: 20;
}

.brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.brand-mark {
  color: var(--accent);
  font-size: 1.4rem;
  text-shadow: 0 0 12px var(--accent-dim);
}

.brand h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.topbar-meta {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.nctv-strip {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--panel-border);
  background:
    linear-gradient(180deg, #0e1812 0%, #0a100c 100%);
  z-index: 19;
}
.nctv-strip-inner {
  width: 100%;
  padding: 0.45rem 1.25rem 0.55rem;
}
.nctv-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1rem;
  margin-bottom: 0.4rem;
}
.nctv-strip-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.nctv-strip-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.nctv-strip-link:hover { text-decoration: underline; }
.nctv-strip-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.nctv-levels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
  width: 100%;
}
.nctv-level {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.15rem;
  padding: 0.4rem 0.55rem 0.45rem;
  border: 1px solid #1a2e22;
  background: #070c09;
  min-width: 0;
}
.nctv-level-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}
.nctv-level-soort {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8aaa90;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nctv-level-bar {
  height: 3px;
  background: #152018;
  margin-top: 0.15rem;
}
.nctv-level-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: currentColor;
}
.nctv-level.is-active {
  border-color: var(--nctv-color, var(--accent));
  background: rgba(61, 255, 138, 0.04);
  box-shadow: inset 0 0 0 1px rgba(61, 255, 138, 0.06);
}
.nctv-level.is-active .nctv-level-num {
  color: var(--nctv-color, var(--accent));
}
.nctv-level.is-active .nctv-level-soort {
  color: var(--nctv-color, var(--accent));
}
.nctv-level.is-active .nctv-level-bar > i {
  width: 100%;
  background: var(--nctv-color, var(--accent));
  box-shadow: 0 0 8px rgba(255, 138, 74, 0.35);
}
.nctv-level.is-reached:not(.is-active) .nctv-level-bar > i {
  width: 100%;
  background: #2a4a34;
  opacity: 0.7;
}
.nctv-level.level-1 { --nctv-color: #6f9a78; }
.nctv-level.level-2 { --nctv-color: #9ec26a; }
.nctv-level.level-3 { --nctv-color: #e6c35c; }
.nctv-level.level-4 { --nctv-color: #ff8a4a; }
.nctv-level.level-5 { --nctv-color: #ff4a4a; }
.nctv-strip.is-loading .nctv-levels { opacity: 0.65; }
.nctv-strip.is-error .nctv-strip-meta { color: var(--danger); }

@media (max-width: 720px) {
  .nctv-levels {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
  .nctv-level {
    grid-template-columns: 3.5rem 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 0.5rem;
  }
  .nctv-level-bar {
    width: 2.5rem;
    margin-top: 0;
  }
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--accent-dim);
  color: var(--accent);
  background: rgba(61, 255, 138, 0.08);
}
.pill.is-updated {
  color: #f4fff8;
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(61, 255, 138, 0.55);
}

.admin-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
}
.admin-link:hover { color: var(--accent); }

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  min-height: 0;
}

.panel {
  background: var(--panel);
  border-right: 1px solid var(--panel-border);
  padding: 1rem;
  overflow: hidden;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-mono);
}

.panel-filters {
  flex: 0 0 auto;
  margin-bottom: 0.65rem;
}

.filter-summary {
  width: 100%;
  display: grid;
  gap: 0.25rem;
  padding: 0.55rem 0.65rem;
  text-align: left;
  cursor: pointer;
  background: rgba(61, 255, 138, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text);
  font: inherit;
}
.filter-summary:hover,
.filter-summary:focus-visible {
  border-color: var(--accent-dim);
  background: rgba(61, 255, 138, 0.08);
  outline: none;
}
.filter-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.filter-summary-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.filter-summary-action {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.filter-summary:hover .filter-summary-action,
.filter-summary:focus-visible .filter-summary-action {
  color: var(--accent);
}
.filter-summary-body {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-modal {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  max-width: min(420px, calc(100vw - 2rem));
  width: 100%;
}
.filter-modal::backdrop {
  background: rgba(2, 8, 4, 0.78);
}
.filter-modal-panel {
  background: linear-gradient(180deg, #101a14 0%, #0a120e 100%);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 0 1px rgba(61, 255, 138, 0.08), 0 18px 48px rgba(0, 0, 0, 0.55);
  max-height: min(86vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.filter-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--panel-border);
  flex: 0 0 auto;
}
.filter-modal-head h2 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 650;
}
.filter-modal-close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--panel-border);
  background: #0c1410;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.filter-modal-close:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}
.filter-modal-body {
  padding: 1rem;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.filter-modal-foot {
  flex: 0 0 auto;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.2);
}

.type-filters {
  border: 1px solid var(--panel-border);
  padding: 0.75rem;
  margin: 0 0 1rem;
  display: grid;
  gap: 0.35rem;
}

.type-filters legend {
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.type-filters label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.92rem;
  cursor: pointer;
}

.date-filter {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0;
}

.date-filter input[type="date"],
.date-filter input[type="range"] {
  width: 100%;
  background: #061008;
  color: var(--text);
  border: 1px solid var(--panel-border);
  padding: 0.35rem;
  font-family: var(--font-mono);
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.btn {
  width: 100%;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.55rem 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover {
  background: rgba(61, 255, 138, 0.1);
}

.news-feed {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.news-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex: 0 0 auto;
}
.news-feed-head h2 {
  margin: 0;
}
.news-feed-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}
.feed-list-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--panel-border);
  padding: 0.15rem 0.45rem;
  cursor: pointer;
}
.feed-list-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.feed-live-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 0.15rem 0.4rem;
  animation: feed-tag-pulse 2.4s ease-in-out infinite;
}
.feed-live-tag.is-paused {
  color: var(--muted);
  border-color: var(--panel-border);
  animation: none;
}
@keyframes feed-tag-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 rgba(61, 255, 138, 0); }
  50% { opacity: 0.75; box-shadow: 0 0 10px rgba(61, 255, 138, 0.25); }
}

.news-feed > .hint {
  flex: 0 0 auto;
  margin-top: 0.35rem;
}

.feed-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  background: #070c09;
}
.feed-viewport::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  opacity: 0.55;
  z-index: 2;
  pointer-events: none;
}

.feed-stage {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
}

.feed-card {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--panel-border);
  background: rgba(10, 18, 14, 0.92);
  overflow: hidden;
  animation: feed-card-in 0.35s ease-out;
}
.feed-card.feed-on-map {
  border-color: #3a5a28;
}
@keyframes feed-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.feed-media {
  flex: 0 0 auto;
  height: 130px;
  background: #050805;
  border-bottom: 1px solid var(--panel-border);
  overflow: hidden;
  position: relative;
}
.feed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feed-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, #0a1610 25%, #122018 25%, #122018 50%, #0a1610 50%, #0a1610 75%, #122018 75%);
  background-size: 16px 16px;
}

.feed-head {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "meta chevron"
    "title chevron"
    "summary chevron";
  gap: 0.25rem 0.5rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  padding: 0.55rem 0.65rem;
  cursor: pointer;
  align-content: start;
}
.feed-head:hover {
  background: rgba(61, 255, 138, 0.06);
}
.feed-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
}
.feed-head .feed-meta {
  grid-area: meta;
}
.feed-when {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.feed-title {
  grid-area: title;
  font-size: 0.9rem;
  line-height: 1.35;
  font-weight: 600;
}
.feed-summary {
  grid-area: summary;
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  white-space: pre-wrap;
}
.feed-chevron {
  grid-area: chevron;
  align-self: start;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.feed-source {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-decoration: none;
}
.feed-source:hover {
  text-decoration: underline;
}

.feed-modal {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  color-scheme: dark;
  max-width: min(520px, calc(100vw - 2rem));
  width: 100%;
  height: min(86vh, 760px);
  max-height: min(86vh, 760px);
}
.feed-modal::backdrop {
  background: rgba(2, 8, 4, 0.78);
}
.feed-modal-panel {
  background: linear-gradient(180deg, #101a14 0%, #0a120e 100%);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 0 1px rgba(61, 255, 138, 0.08), 0 18px 48px rgba(0, 0, 0, 0.55);
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.headlines-modal {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  color-scheme: dark;
  max-width: min(480px, calc(100vw - 2rem));
  width: 100%;
  height: min(82vh, 640px);
  max-height: min(82vh, 640px);
}
.headlines-modal::backdrop {
  background: rgba(2, 8, 4, 0.78);
}
.headlines-modal-panel {
  background: linear-gradient(180deg, #101a14 0%, #0a120e 100%);
  border: 1px solid var(--panel-border);
  box-shadow: 0 0 0 1px rgba(61, 255, 138, 0.08), 0 18px 48px rgba(0, 0, 0, 0.55);
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.headlines-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--panel-border);
  flex: 0 0 auto;
}
.headlines-modal-head h2 {
  margin: 0;
  font-size: 1rem;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.headlines-modal-close {
  flex: 0 0 auto;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.15rem;
}
.headlines-modal-close:hover { color: var(--accent); }
.headlines-search {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  padding: 0.7rem 1rem 0.15rem;
}
.headlines-search-input,
.headlines-search-clear {
  grid-area: 1 / 1;
}
.headlines-search-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-color: #061008;
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 0;
  padding: 0.48rem 2rem 0.48rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  caret-color: var(--accent);
}
.headlines-search-input::placeholder {
  color: var(--muted);
  opacity: 1;
}
.headlines-search-input:hover {
  border-color: var(--accent-dim);
}
.headlines-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(61, 255, 138, 0.22), inset 0 0 14px rgba(61, 255, 138, 0.06);
}
.headlines-search-input::-webkit-search-cancel-button,
.headlines-search-input::-webkit-search-decoration,
.headlines-search-input::-webkit-search-results-button,
.headlines-search-input::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
.headlines-search-input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--accent);
  box-shadow: 0 0 0 1000px #061008 inset;
}
.headlines-search-clear {
  justify-self: end;
  align-self: center;
  margin-right: 0.35rem;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.headlines-search-clear:hover { color: var(--accent); }
.headlines-modal-hint {
  margin: 0;
  padding: 0.55rem 1rem 0.35rem;
  flex: 0 0 auto;
}
.headlines-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.25rem 0.5rem 0.75rem;
}
.headlines-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.65rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(26, 58, 40, 0.55);
  color: inherit;
  font: inherit;
  padding: 0.55rem 0.5rem;
  cursor: pointer;
}
.headlines-item:hover,
.headlines-item.is-current {
  background: rgba(61, 255, 138, 0.07);
}
.headlines-item.is-current .headlines-item-title {
  color: var(--accent);
}
.headlines-item-idx {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  padding-top: 0.15rem;
}
.headlines-item-title {
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 0;
}
.headlines-item-meta {
  grid-column: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin: 0;
}
.headlines-empty {
  padding: 1rem 0.5rem;
  margin: 0;
}
.feed-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--panel-border);
  flex: 0 0 auto;
}
.feed-modal-head h2 {
  margin: 0;
  min-height: calc(1.05rem * 1.35 * 2);
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 650;
}
.feed-modal-close {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--panel-border);
  background: #0c1410;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.feed-modal-close:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}
.feed-modal-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}
.feed-modal-hero {
  display: block;
  flex: 0 0 180px;
  width: 100%;
  height: 180px;
  background: #050805;
  border-bottom: 1px solid var(--panel-border);
  overflow: hidden;
  position: relative;
}
.feed-modal-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.feed-modal-hero-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, #0a1610 25%, #122018 25%, #122018 50%, #0a1610 50%, #0a1610 75%, #122018 75%);
  background-size: 16px 16px;
}
.feed-modal-hero-empty span {
  position: relative;
  z-index: 3;
}
.feed-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.feed-modal-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 1rem 0;
}
.feed-modal-toolbar .feed-badge,
.feed-modal-toolbar .demo-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  line-height: 1.2;
}
.feed-modal-copy {
  display: block;
  padding: 0.55rem 1rem 1rem;
}
.feed-modal-meta {
  margin: 0 0 0.65rem;
  font-size: 0.8rem;
  line-height: 1.35;
}
.feed-modal-summary {
  margin: 0 0 0.65rem;
  line-height: 1.55;
  font-size: 0.95rem;
  white-space: pre-wrap;
}
.feed-modal-quote {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.7rem;
  border-left: 2px solid var(--accent-dim);
  background: rgba(61, 255, 138, 0.05);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.feed-modal-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.feed-modal-actions .btn {
  width: auto;
}
.feed-modal-map {
  font-size: 0.78rem;
  padding: 0.25rem 0.55rem;
}
.feed-modal-nav {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.2);
}
.feed-modal-nav .btn {
  width: auto;
  flex: 0 0 auto;
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}
.feed-modal-pos {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-align: center;
  flex: 1 1 auto;
}
.feed-modal .feed-related {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
}

.feed-chrome {
  flex: 0 0 auto;
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem 0.55rem 0.55rem;
  border-top: 1px solid var(--panel-border);
}
.feed-counter {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.feed-counter.is-updated {
  color: var(--accent);
}
.feed-progress {
  height: 2px;
  background: #152018;
  overflow: hidden;
}
.feed-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(61, 255, 138, 0.45);
}

.feed-empty,
.error-feed {
  margin: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.error-feed {
  color: var(--danger, #ff6b4a);
}

.demo-badge {
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.feed-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--panel-border);
  color: var(--muted);
}
.feed-badge.incident {
  color: var(--accent);
  border-color: var(--accent-dim);
}
.feed-badge.news {
  color: #6bb6ff;
  border-color: #2a4a6a;
}
.feed-badge.map {
  color: var(--warn);
  border-color: #5a4a20;
}
.feed-badge.merged {
  color: #c9a0ff;
  border-color: #4a2a6a;
}

.feed-related {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--panel-border);
}
.feed-related ul {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
}
.feed-related li {
  margin: 0.2rem 0;
}

@media (prefers-reduced-motion: reduce) {
  .feed-live-tag { animation: none; }
  .feed-card { animation: none; }
}

.related-sources {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--panel-border);
}
.related-sources h4 {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--font-mono);
}
.related-sources ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
}
.related-sources a { color: var(--accent); }

.map-wrap {
  position: relative;
  min-height: 50vh;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #050805;
}

#map {
  position: absolute;
  inset: 0;
  background: #050805;
  filter:
    contrast(1.08)
    saturate(1.05)
    brightness(1.02)
    hue-rotate(6deg);
}

.popup-panel {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: min(360px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
  background: rgba(8, 16, 12, 0.95);
  border: 1px solid var(--accent-dim);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.45);
}

.popup-panel[hidden] { display: none; }

.popup-sticky {
  flex: 0 0 auto;
  padding: 1rem 1rem 0;
  background: rgba(8, 16, 12, 0.98);
  border-bottom: 1px solid var(--panel-border);
}

.popup-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.75rem 1rem 1rem;
}

.popup-panel h3 {
  margin: 0 0 0.5rem;
  padding-right: 1.5rem;
  font-size: 1.05rem;
  font-family: var(--font-mono);
}

.popup-panel .meta {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.popup-panel img,
.popup-panel .img-placeholder,
.popup-panel .crt-media {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  margin-bottom: 0.75rem;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(135deg, #0a1610 25%, #122018 25%, #122018 50%, #0a1610 50%, #0a1610 75%, #122018 75%);
  background-size: 16px 16px;
}

.popup-panel .crt-media {
  position: relative;
  overflow: hidden;
  object-fit: unset;
}
.popup-panel .crt-media img {
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  object-fit: cover;
  display: block;
}

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

/* Groene CRT-look op alle nieuwsfoto's */
.feed-media img,
.feed-modal-hero img,
.popup-panel .crt-media img,
.popup-panel > img {
  filter:
    grayscale(0.35)
    sepia(0.55)
    hue-rotate(70deg)
    saturate(2.4)
    contrast(1.2)
    brightness(0.88);
}

.feed-media::after,
.feed-modal-hero::after,
.popup-panel .crt-media::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.32) 0px,
      rgba(0, 0, 0, 0.32) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(
      ellipse 78% 70% at 50% 45%,
      transparent 40%,
      rgba(0, 12, 6, 0.35) 78%,
      rgba(0, 0, 0, 0.55) 100%
    ),
    linear-gradient(
      115deg,
      transparent 0%,
      rgba(61, 255, 138, 0.08) 42%,
      transparent 50%
    );
  mix-blend-mode: multiply;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.45);
}

.feed-media::before,
.feed-modal-hero::before,
.popup-panel .crt-media::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(61, 255, 138, 0.06);
  mix-blend-mode: color;
}

.popup-panel a {
  color: var(--accent);
}

.popup-close {
  float: right;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin: -0.15rem 0 0;
}

.maplibregl-popup-content {
  background: #0c1410;
  color: var(--text);
  border: 1px solid var(--accent-dim);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.maplibregl-popup-tip {
  border-top-color: #0c1410 !important;
}

/* Marker wrapper: geen transform-animaties hier (MapLibre positioneert via transform) */
.marker {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: visible;
}
.maplibregl-marker {
  overflow: visible !important;
}

.marker-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent), 0 0 2px #fff;
  border: 1px solid #063;
  position: relative;
  display: block;
  pointer-events: none;
}

.marker-dot.demo {
  background: var(--warn);
  box-shadow: 0 0 8px var(--warn);
}

.marker-dot.cyber { background: #3dff8a; --pulse-color: #3dff8a; }
.marker-dot.sabotage { background: #e6c35c; --pulse-color: #e6c35c; }
.marker-dot.violence { background: #ff6b4a; --pulse-color: #ff6b4a; }
.marker-dot.drone {
  width: 18px;
  height: 18px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #ff8f3c;
  --pulse-color: #ff8f3c;
}
.marker-dot.drone .marker-drone-icon {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 5px rgba(255, 143, 60, 0.95)) drop-shadow(0 0 1px #fff);
}
.marker-dot.espionage { background: #6bb6ff; --pulse-color: #6bb6ff; }
.marker-dot.other { background: #9aa89c; --pulse-color: #9aa89c; }
.marker-dot.brandweer { background: #ff4d2e; --pulse-color: #ff4d2e; }
.marker-dot.ambulance { background: #ffe14a; --pulse-color: #ffe14a; border-color: #5c4e10; }
.marker-dot.politie { background: #4c8dff; --pulse-color: #4c8dff; }
.marker-dot.lifeliner {
  background: #ff9a1f;
  --pulse-color: #ff9a1f;
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.marker-p2000 {
  z-index: 4;
}
.marker-p2000 .marker-dot {
  width: 14px;
  height: 14px;
  border-width: 2px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85), 0 0 12px var(--pulse-color, #fff);
}
.marker-p2000-live {
  z-index: 5;
}
.marker-p2000-live .marker-dot {
  animation: p2000-live-glow 2.2s ease-in-out infinite;
}
.marker-p2000-live::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 1.5px solid var(--pulse-color, #fff);
  box-shadow: 0 0 8px var(--pulse-color, #fff);
  opacity: 0;
  pointer-events: none;
  animation: p2000-live-ring 2.2s ease-out infinite;
}
@keyframes p2000-live-glow {
  0%, 100% {
    filter: brightness(1);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.75), 0 0 8px var(--pulse-color, #fff);
  }
  50% {
    filter: brightness(1.45);
    box-shadow:
      0 0 0 3px rgba(255, 255, 255, 0.95),
      0 0 14px var(--pulse-color, #fff),
      0 0 22px var(--pulse-color, #fff);
  }
}
@keyframes p2000-live-ring {
  0% {
    transform: scale(0.9);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}

.p2000-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 6px currentColor;
}
.p2000-swatch.brandweer { background: #ff4d2e; color: #ff4d2e; }
.p2000-swatch.ambulance { background: #ffe14a; color: #ffe14a; }
.p2000-swatch.politie { background: #4c8dff; color: #4c8dff; }
.p2000-swatch.lifeliner {
  background: #ff9a1f;
  color: #ff9a1f;
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* Radar/COP-pulse: vandaag + gisteren — animatie op inner .marker-dot */
.marker-pulse {
  z-index: 3;
}
.marker-pulse .marker-dot {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 2px rgba(255, 107, 74, 0.35),
    0 0 12px var(--pulse-color, var(--accent)),
    0 0 28px var(--pulse-color, var(--accent));
  animation: marker-core-glow 1.6s ease-in-out infinite;
}
.marker-pulse .marker-dot.drone {
  width: 18px;
  height: 18px;
  border: 0;
  box-shadow: none;
  background: transparent;
  animation: marker-drone-glow 1.6s ease-in-out infinite;
}
.marker-pulse-today .marker-dot {
  width: 16px;
  height: 16px;
  animation-duration: 1.25s;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.25),
    0 0 16px var(--pulse-color, var(--accent)),
    0 0 36px var(--pulse-color, var(--accent)),
    0 0 2px #fff;
}
.marker-pulse-today .marker-dot.drone {
  width: 20px;
  height: 20px;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.marker-pulse .marker-dot::before,
.marker-pulse .marker-dot::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  border: 2px solid var(--pulse-color, var(--accent));
  box-shadow: 0 0 10px var(--pulse-color, var(--accent));
  opacity: 0.95;
  pointer-events: none;
  animation: marker-pulse 2s cubic-bezier(0.15, 0.7, 0.3, 1) infinite;
}
.marker-pulse-today .marker-dot::before,
.marker-pulse-today .marker-dot::after {
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  animation-duration: 1.55s;
}
.marker-pulse .marker-dot::after {
  animation-delay: 1s;
}
.marker-pulse-today .marker-dot::after {
  animation-delay: 0.75s;
}

@keyframes marker-core-glow {
  0%, 100% {
    filter: brightness(1);
    opacity: 1;
  }
  50% {
    filter: brightness(1.4);
    opacity: 0.92;
  }
}

@keyframes marker-drone-glow {
  0%, 100% {
    filter: brightness(1) drop-shadow(0 0 5px rgba(255, 143, 60, 0.95));
    opacity: 1;
  }
  50% {
    filter: brightness(1.35) drop-shadow(0 0 10px rgba(255, 143, 60, 1));
    opacity: 0.95;
  }
}

@keyframes marker-pulse {
  0% {
    transform: scale(1);
    opacity: 0.95;
  }
  60% {
    opacity: 0.35;
  }
  100% {
    transform: scale(5.5);
    opacity: 0;
  }
}

.marker-arrive .marker-dot {
  animation: marker-arrive 0.9s ease-out 4;
}
@keyframes marker-arrive {
  0% { transform: scale(0.35); filter: brightness(2.2); }
  55% { transform: scale(1.45); filter: brightness(1.4); }
  100% { transform: scale(1); filter: brightness(1); }
}

@media (prefers-reduced-motion: reduce) {
  .marker-pulse .marker-dot {
    animation: none;
  }
  .marker-pulse .marker-dot::before,
  .marker-pulse .marker-dot::after {
    animation: none;
    transform: scale(2.4);
    opacity: 0.4;
  }
  .marker-p2000-live .marker-dot,
  .marker-p2000-live::before {
    animation: none;
  }
  .marker-p2000-live .marker-dot {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95), 0 0 14px var(--pulse-color, #fff);
  }
  .marker-arrive .marker-dot {
    animation: none;
  }
  .crt-glow,
  .crt-scanlines::after,
  .crt-stripes,
  .crt-stripes::after {
    animation: none;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .panel {
    border-right: none;
    border-bottom: 1px solid var(--panel-border);
    max-height: 40vh;
  }
  .map-wrap {
    min-height: 55vh;
  }
}

/* Live vlieg- en scheepvaartlagen */
.traffic-hud {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 16;
  width: min(268px, calc(100% - 5.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
}
.traffic-hud > * { pointer-events: auto; }

.map-hud {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 16;
  width: min(268px, calc(100% - 5.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
}
.map-hud > * { pointer-events: auto; }

.layer-dock,
.traffic-card {
  background: rgba(8, 16, 12, 0.94);
  border: 1px solid var(--accent-dim);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
}
.layer-dock { padding: 0.5rem 0.65rem 0.45rem; }
.layer-dock-kicker {
  margin: 0 0 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.layer-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.12rem 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
}
.layer-toggle input { accent-color: var(--accent); }
.p2000-master,
.ship-master {
  margin-bottom: 0.28rem;
  padding-bottom: 0.28rem;
  border-bottom: 1px solid var(--accent-dim);
  font-weight: 600;
}
.ship-type { padding-left: 0.2rem; }
#p2000-legend.is-master-off .layer-toggle:not(.p2000-master),
#traffic-layer-dock.is-ship-off .layer-toggle.ship-type {
  opacity: 0.4;
}
.ship-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.ship-swatch.mil { background: #e6c35c; }
.ship-swatch.law { background: #5aa7ff; }
.layer-count {
  margin-left: auto;
  color: var(--accent);
  font-size: 0.72rem;
}
.layer-note {
  margin: 0.28rem 0 0;
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  line-height: 1.35;
}
.layer-note[hidden] { display: none; }
.layer-src {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.02em;
}
.traffic-card {
  position: relative;
  padding: 0.55rem 0.7rem 0.6rem;
}
.traffic-card[hidden] { display: none; }
.traffic-card-kind {
  margin: 0 1.4rem 0.35rem 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-dim);
}
.traffic-card-shot {
  position: relative;
  height: 78px;
  margin: 0 0 0.45rem;
  overflow: hidden;
  border: 1px solid var(--accent-dim);
  background:
    radial-gradient(ellipse 80% 70% at 50% 58%, rgba(61, 255, 138, 0.1) 0%, rgba(2, 10, 6, 0.2) 46%, rgba(0, 0, 0, 0.45) 100%),
    #03140c;
  box-shadow:
    inset 0 0 18px rgba(61, 255, 138, 0.14),
    inset 0 0 0 1px rgba(61, 255, 138, 0.08);
}
.traffic-card-shot svg {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--accent);
  filter: drop-shadow(0 0 3px rgba(61, 255, 138, 0.85));
}
.traffic-card-shot.has-photo {
  height: 126px;
}
.traffic-card-shot img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  filter:
    grayscale(0.35)
    sepia(0.55)
    hue-rotate(70deg)
    saturate(2.4)
    contrast(1.2)
    brightness(0.88);
}
.traffic-card-shot.has-photo svg {
  display: none;
}
.traffic-card-shot.has-photo .traffic-card-caption {
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.15rem 0.4rem 0.28rem;
  background: linear-gradient(to top, rgba(0, 8, 4, 0.9), transparent);
}
.traffic-card-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.42) 0px,
      rgba(0, 0, 0, 0.42) 1px,
      transparent 1px,
      transparent 3px
    );
  opacity: 0.72;
}
.traffic-card-shot::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  height: 28%;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(61, 255, 138, 0.16) 50%,
    transparent 100%
  );
  animation: crt-sweep 4.8s linear infinite;
}
.traffic-card-caption {
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  bottom: 0.22rem;
  z-index: 2;
  overflow: hidden;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 8px var(--accent-dim);
}
.traffic-card h3 {
  margin: 0 1.4rem 0.35rem 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.traffic-card .meta {
  display: grid;
  gap: 0.12rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.traffic-card .is-alert { color: var(--danger); }
.traffic-card .is-mil { color: var(--warn); }
.traffic-card .is-law { color: #7eb6ff; }
.traffic-card .is-fire { color: #ff7a18; }
.fire-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}
.fire-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.fire-swatch {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}
.fire-swatch.high { background: #ff3b1f; color: #ff3b1f; }
.fire-swatch.nominal { background: #ff7a18; color: #ff7a18; }
.fire-swatch.low { background: #e6c84a; color: #e6c84a; }
.fires-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}
.fires-hud {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 16;
  width: min(268px, calc(100% - 5.5rem));
  pointer-events: none;
}
.fires-hud > * { pointer-events: auto; }
.traffic-card-close {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

/* Film-callout: gehoekte lijn + roepnaamvak bij vliegtuig en schip */
.craft-tags {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
  border-radius: 1.5rem;
}
.craft-tag {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  color: #7ecbff;
  pointer-events: none;
}
.craft-tag.is-mil { color: #ffb03a; }
.craft-tag.is-law { color: #5aa7ff; }
.craft-tag.is-alert { color: #ff5d45; }
.craft-tag.is-ship { color: #3ec6ff; }
.craft-tag.is-selected { z-index: 2; }
.craft-tag-lead {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
}
.craft-tag-lead path {
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.craft-tag-lead .halo {
  stroke: rgba(0, 0, 0, 0.88);
  stroke-width: 3px;
}
.craft-tag-lead .line {
  stroke: currentColor;
  stroke-width: 1.25px;
}
.craft-tag-box {
  position: absolute;
  margin: 0;
  padding: 0.06rem 0.34rem 0.08rem;
  border: 1px solid currentColor;
  border-radius: 0;
  background: rgba(3, 10, 7, 0.86);
  color: currentColor;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 0 10px rgba(0, 0, 0, 0.45);
  text-shadow: 0 0 6px currentColor;
}
.craft-tag-box:hover,
.craft-tag.is-selected .craft-tag-box {
  background: rgba(8, 24, 16, 0.94);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.7),
    0 0 8px currentColor;
}
.craft-tag.is-alert .craft-tag-box {
  animation: craft-tag-alert 1.5s ease-in-out infinite;
}
@keyframes craft-tag-alert {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
  .craft-tag.is-alert .craft-tag-box { animation: none; }
}

/* East dock: pipeline above radio, clears popup (top-right) + pulse (bottom-center) */
.cop-east-dock {
  position: absolute;
  right: 0.75rem;
  bottom: 4.6rem;
  z-index: 16;
  width: min(312px, calc(100% - 1.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  pointer-events: none;
}
.cop-east-dock > * {
  pointer-events: auto;
  width: 100%;
}

/* Pipeline SIGINT HUD — stacked in east dock */
.pipeline-hud {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: auto;
  pointer-events: auto;
}
.pipeline-panel {
  background: rgba(8, 16, 12, 0.94);
  border: 1px solid var(--accent-dim);
  box-shadow:
    0 0 18px rgba(0, 0, 0, 0.45),
    inset 0 0 28px rgba(61, 255, 138, 0.03);
  padding: 0.5rem 0.65rem 0.45rem;
}
.pipeline-hud.is-down .pipeline-panel {
  opacity: 0.72;
  border-color: #5a2a2a;
}
.pipeline-head {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}
.pipeline-mark {
  color: var(--accent);
  font-size: 0.9rem;
  line-height: 1.2;
  text-shadow: 0 0 10px var(--accent-dim);
}
.pipeline-hud.is-busy .pipeline-mark {
  animation: pipeline-pulse 1.1s ease-in-out infinite;
}
.pipeline-head-text { flex: 1; min-width: 0; }
.pipeline-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.pipeline-sub {
  margin: 0.12rem 0 0;
  color: var(--accent);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pipeline-pill {
  flex: 0 0 auto;
  margin-top: 0.05rem;
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--accent-dim);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.pipeline-pill.is-ok {
  color: var(--accent);
  border-color: var(--accent-dim);
  box-shadow: 0 0 8px rgba(61, 255, 138, 0.25);
}
.pipeline-pill.is-ai {
  color: #ffe14a;
  border-color: rgba(255, 225, 74, 0.45);
  animation: pipeline-pulse 1.1s ease-in-out infinite;
}
.pipeline-pill.is-err {
  color: var(--danger);
  border-color: #5a2a2a;
}
.pipeline-sweep {
  position: relative;
  height: 2px;
  margin: 0.4rem 0 0.45rem;
  overflow: hidden;
  background: rgba(61, 255, 138, 0.12);
}
.pipeline-sweep i {
  display: block;
  height: 100%;
  width: 42%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: pipeline-sweep 2.8s linear infinite;
}
.pipeline-hud.is-idle .pipeline-sweep i {
  animation-duration: 4.6s;
  opacity: 0.55;
}
.pipeline-hud.is-down .pipeline-sweep i {
  animation: none;
  width: 100%;
  background: rgba(255, 107, 74, 0.35);
}
.pipeline-nodes {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  flex: 0 0 auto;
}
.pipeline-node-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 1px;
  border: 1px solid rgba(61, 255, 138, 0.35);
  background: rgba(61, 255, 138, 0.12);
  transform: rotate(45deg);
}
.pipeline-node-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.pipeline-node.is-soft .pipeline-node-dot {
  background: rgba(61, 255, 138, 0.35);
  box-shadow: 0 0 8px rgba(61, 255, 138, 0.3);
}
.pipeline-node.is-soft .pipeline-node-label { color: var(--accent); }
.pipeline-node.is-active .pipeline-node-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(61, 255, 138, 0.65);
  animation: pipeline-pulse 0.9s ease-in-out infinite;
}
.pipeline-node.is-active .pipeline-node-label {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-dim);
}
.pipeline-edge {
  flex: 1 1 auto;
  align-self: center;
  height: 1px;
  margin: 0 0.1rem 0.85rem;
  min-width: 0.35rem;
  background: linear-gradient(90deg, rgba(61, 255, 138, 0.15), rgba(61, 255, 138, 0.45), rgba(61, 255, 138, 0.15));
}
.pipeline-hud.is-busy .pipeline-edge {
  background: linear-gradient(90deg, rgba(61, 255, 138, 0.2), rgba(61, 255, 138, 0.75), rgba(61, 255, 138, 0.2));
}
.pipeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(61, 255, 138, 0.14);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.pipeline-meta .is-warn { color: var(--warn, #ffe14a); }
@keyframes pipeline-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
@keyframes pipeline-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
@media (max-width: 1100px) {
  .cop-east-dock {
    width: min(280px, calc(100% - 1.2rem));
    right: 0.55rem;
  }
  .pipeline-node-label { font-size: 0.48rem; }
}
@media (max-width: 900px) {
  .cop-east-dock {
    bottom: 0.75rem;
    right: 0.55rem;
    width: min(280px, calc(100% - 1.1rem));
  }
}
@media (max-width: 700px) {
  .cop-east-dock {
    width: min(240px, calc(100% - 1.1rem));
  }
}
@media (prefers-reduced-motion: reduce) {
  .pipeline-sweep i,
  .pipeline-hud.is-busy .pipeline-mark,
  .pipeline-pill.is-ai,
  .pipeline-node.is-active .pipeline-node-dot {
    animation: none;
  }
}

/* Radio scanner — bottom-right COP HUD (positioned via .cop-east-dock when present) */
.radio-hud {
  position: absolute;
  right: 0.75rem;
  bottom: 4.6rem;
  z-index: 16;
  width: min(312px, calc(100% - 1.5rem));
  pointer-events: none;
}
.radio-hud > * { pointer-events: auto; }
.cop-east-dock .radio-hud {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: auto;
  width: auto;
  pointer-events: auto;
}
.radio-panel {
  background: rgba(8, 16, 12, 0.94);
  border: 1px solid var(--accent-dim);
  box-shadow:
    0 0 18px rgba(0, 0, 0, 0.45),
    inset 0 0 28px rgba(61, 255, 138, 0.03);
  padding: 0.5rem 0.65rem 0.45rem;
}
.radio-hud.is-off .radio-panel {
  opacity: 0.55;
  filter: saturate(0.55);
}
.radio-head {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}
.radio-mark {
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1.2;
  text-shadow: 0 0 10px var(--accent-dim);
}
.radio-head-text { flex: 1; min-width: 0; }
.radio-kicker {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.radio-region {
  margin: 0.12rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 10px rgba(61, 255, 138, 0.25);
}
.radio-power {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.radio-power input { accent-color: var(--accent); }
.radio-sweep {
  position: relative;
  height: 3px;
  margin: 0.45rem 0 0.35rem;
  overflow: hidden;
  background: rgba(26, 58, 40, 0.65);
  border: 1px solid rgba(61, 255, 138, 0.18);
}
.radio-sweep i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 8px var(--accent-dim);
  animation: radio-sweep 4.2s linear infinite;
}
.radio-hud.is-off .radio-sweep i { animation: none; width: 0; }
@keyframes radio-sweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
.radio-status {
  margin: 0 0 0.28rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.radio-status.is-error { color: var(--danger); }
.radio-hud.is-playing .radio-status {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-dim);
}
.radio-now {
  margin: 0 0 0.4rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid rgba(26, 58, 40, 0.85);
  background: rgba(2, 10, 6, 0.55);
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radio-ext {
  color: var(--accent);
  text-decoration: none;
  margin-left: 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.58rem;
}
.radio-ext:hover { text-decoration: underline; }
.radio-transport {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.45rem;
}
.radio-btn {
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid var(--accent-dim);
  background: rgba(61, 255, 138, 0.08);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 10px rgba(61, 255, 138, 0.05);
}
.radio-btn:hover:not(:disabled) {
  background: rgba(61, 255, 138, 0.18);
}
.radio-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.radio-vol {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.radio-vol input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
  height: 0.35rem;
}
.radio-channels {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 11.5rem;
  overflow: auto;
  border: 1px solid rgba(26, 58, 40, 0.85);
  background: rgba(2, 10, 6, 0.55);
}
.radio-empty {
  padding: 0.55rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  line-height: 1.4;
  color: var(--muted);
}
.radio-ch {
  display: grid;
  grid-template-columns: 2.8rem 1fr auto;
  gap: 0.35rem;
  align-items: start;
  padding: 0.36rem 0.4rem;
  border-bottom: 1px solid rgba(26, 58, 40, 0.45);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text);
}
.radio-ch:last-child { border-bottom: none; }
.radio-ch:hover {
  background: rgba(61, 255, 138, 0.05);
}
.radio-ch.is-active {
  background: rgba(61, 255, 138, 0.1);
  box-shadow: inset 2px 0 0 var(--accent);
}
.radio-ch.is-playing {
  background: rgba(61, 255, 138, 0.14);
  box-shadow: inset 2px 0 0 var(--accent);
}
.radio-ch.is-playing .radio-ch-listen {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-dim);
  animation: radio-onair 1.4s ease-in-out infinite;
}
.radio-ch.is-near {
  opacity: 0.88;
}
.radio-ch.is-near .radio-ch-listen {
  color: var(--muted);
}
.radio-ch.is-near .radio-ch-detail {
  color: var(--muted);
}
.radio-ch.is-nood .radio-ch-tag { color: var(--danger); }
.radio-ch-tag {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.06em;
  padding-top: 0.08rem;
}
.radio-ch-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}
.radio-ch-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.radio-ch-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.02em;
}
.radio-ch-listen {
  color: var(--accent-dim);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  padding-top: 0.12rem;
}
@keyframes radio-onair {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.radio-src {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
}
.radio-hud.is-playing .radio-sweep i {
  animation-duration: 1.6s;
}
@media (max-width: 900px) {
  .radio-hud {
    bottom: 0.75rem;
    right: 0.55rem;
    width: min(280px, calc(100% - 1.1rem));
  }
  .cop-east-dock .radio-hud {
    bottom: auto;
    right: auto;
    width: auto;
  }
  .radio-channels { max-height: 8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .radio-sweep i { animation: none; width: 38%; }
  .radio-ch.is-playing .radio-ch-listen { animation: none; }
}

/* Map tools — basemap + watch sector */
.map-tools {
  position: absolute;
  top: 0.75rem;
  left: min(292px, calc(100% - 11rem));
  z-index: 14;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: min(168px, 42vw);
  pointer-events: none;
}
.map-tools > * { pointer-events: auto; }
.basemap-dock,
.watch-dock {
  padding: 0.45rem 0.55rem 0.4rem;
}
.basemap-actions,
.watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}
.map-tool-btn {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0.28rem 0.35rem;
  border: 1px solid var(--accent-dim);
  background: rgba(6, 18, 12, 0.85);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.map-tool-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.map-tool-btn.is-active {
  color: #04140c;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(61, 255, 138, 0.35);
}
.watch-status {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
  word-break: break-word;
}
.watch-status.is-live { color: var(--accent); }
.watch-status.is-alert {
  color: var(--danger);
  animation: watch-alert-blink 0.7s ease-in-out infinite;
}
.map-wrap.is-drawing-sector #map {
  cursor: crosshair !important;
}
.map-wrap.is-drawing-sector .maplibregl-canvas-container,
.map-wrap.is-drawing-sector .maplibregl-canvas {
  cursor: crosshair !important;
}
.map-wrap.is-drawing-sector .craft-tag {
  pointer-events: none !important;
}

/* Watch-sector hit attention beacon (30s) */
.watch-attention {
  position: relative;
  width: 72px;
  height: 72px;
  pointer-events: none;
}
.watch-attention-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #ff4d3a;
  box-shadow:
    0 0 0 2px rgba(4, 20, 12, 0.85),
    0 0 16px rgba(255, 77, 58, 0.9);
  z-index: 2;
}
.watch-attention.is-p2000 .watch-attention-core {
  background: #3dff8a;
  box-shadow:
    0 0 0 2px rgba(4, 20, 12, 0.85),
    0 0 16px rgba(61, 255, 138, 0.85);
}
.watch-attention.is-hit .watch-attention-core {
  background: #ffe14a;
  box-shadow:
    0 0 0 2px rgba(4, 20, 12, 0.85),
    0 0 16px rgba(255, 225, 74, 0.85);
}
.watch-attention-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid #ff4d3a;
  border-radius: 50%;
  opacity: 0.95;
  animation: watch-attention-ring 1.6s ease-out infinite;
  box-shadow: 0 0 12px rgba(255, 77, 58, 0.45);
}
.watch-attention.is-p2000 .watch-attention-ring {
  border-color: #3dff8a;
  box-shadow: 0 0 12px rgba(61, 255, 138, 0.45);
}
.watch-attention.is-hit .watch-attention-ring {
  border-color: #ffe14a;
  box-shadow: 0 0 12px rgba(255, 225, 74, 0.45);
}
.watch-attention-ring-delay {
  animation-delay: 0.8s;
}
.watch-attention-label {
  position: absolute;
  left: 50%;
  top: calc(50% + 22px);
  transform: translateX(-50%);
  padding: 0.12rem 0.35rem;
  border: 1px solid rgba(255, 77, 58, 0.55);
  background: rgba(8, 16, 12, 0.92);
  color: #ffb4a8;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  white-space: nowrap;
  z-index: 3;
}
.watch-attention.is-p2000 .watch-attention-label {
  border-color: rgba(61, 255, 138, 0.55);
  color: var(--accent);
}
.watch-attention.is-hit .watch-attention-label {
  border-color: rgba(255, 225, 74, 0.55);
  color: #ffe14a;
}
@keyframes watch-attention-ring {
  0% {
    transform: scale(0.55);
    opacity: 0.95;
  }
  70% {
    opacity: 0.35;
  }
  100% {
    transform: scale(3.4);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .watch-attention-ring {
    animation: none;
    transform: scale(2.2);
    opacity: 0.55;
  }
}
@keyframes watch-alert-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
#status-pill.is-watch-alert {
  background: rgba(255, 77, 46, 0.25);
  border-color: var(--danger);
  color: #ffb4a8;
  animation: watch-alert-blink 0.55s ease-in-out infinite;
}

/* Pulse timeline */
.pulse-hud {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  z-index: 15;
  width: min(540px, calc(100% - 20rem));
  padding: 0.45rem 0.65rem 0.4rem;
  background: rgba(8, 16, 12, 0.94);
  border: 1px solid var(--accent-dim);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}
.pulse-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.28rem;
}
.pulse-kicker {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.pulse-count {
  color: var(--accent);
  font-size: 0.72rem;
}
.pulse-rail {
  position: relative;
  height: 1.55rem;
  margin: 0.1rem 0 0.15rem;
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(61, 255, 138, 0.05), rgba(61, 255, 138, 0.14) 70%, rgba(61, 255, 138, 0.28));
  border: 1px solid rgba(61, 255, 138, 0.18);
  overflow: hidden;
}
.pulse-empty {
  margin: 0;
  padding: 0.28rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
}
.pulse-tick {
  position: absolute;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(4, 20, 12, 0.85);
  border-radius: 1px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 8px rgba(61, 255, 138, 0.45);
  cursor: pointer;
  z-index: 1;
}
.pulse-tick:hover,
.pulse-tick:focus-visible {
  transform: translate(-50%, -50%) rotate(45deg) scale(1.35);
  z-index: 2;
  outline: none;
}
.pulse-tick.pulse-p2000.tone-brandweer { background: #ff4d2e; box-shadow: 0 0 8px rgba(255, 77, 46, 0.5); }
.pulse-tick.pulse-p2000.tone-ambulance { background: #ffe14a; box-shadow: 0 0 8px rgba(255, 225, 74, 0.45); }
.pulse-tick.pulse-p2000.tone-politie { background: #4c8dff; box-shadow: 0 0 8px rgba(76, 141, 255, 0.5); }
.pulse-tick.pulse-p2000.tone-lifeliner { background: #ff9a1f; box-shadow: 0 0 8px rgba(255, 154, 31, 0.5); }
.pulse-tick.pulse-news { background: #b8ffd0; }
.pulse-tick.pulse-alert,
.pulse-tick.tone-alert {
  background: #ff4d3a;
  box-shadow: 0 0 10px rgba(255, 77, 58, 0.65);
  animation: pulse-tick-flash 1.1s ease-in-out infinite;
}
@keyframes pulse-tick-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.pulse-axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.map-wrap.basemap-night #map,
.map-wrap.basemap-sat #map {
  filter:
    contrast(1.05)
    saturate(1.08)
    brightness(1.04);
}
@media (max-width: 1100px) {
  .pulse-hud {
    width: min(420px, calc(100% - 2rem));
    bottom: 0.55rem;
  }
  .map-tools {
    left: 0.75rem;
    top: auto;
    bottom: auto;
    /* stack under traffic card area on narrower screens */
    top: 0.75rem;
    width: min(148px, 38vw);
  }
}
@media (max-width: 900px) {
  .pulse-hud {
    left: 0.55rem;
    right: 0.55rem;
    width: auto;
    transform: none;
    bottom: 0.55rem;
  }
  .map-tools {
    left: auto;
    right: 0.55rem;
    top: 0.55rem;
    width: min(140px, 46vw);
  }
}
@media (prefers-reduced-motion: reduce) {
  .watch-status.is-alert,
  #status-pill.is-watch-alert,
  .pulse-tick.pulse-alert {
    animation: none;
  }
}
