:root {
  /* Option 1: CivicSiren Radar Shield Official Palette */
  --bg-dark: #0b1120;
  --bg-panel: #111827;
  --bg-card: #1e293b;
  --bg-card-hover: #263449;
  --border: #283548;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --beacon: #ef4444;
  --beacon-hover: #dc2626;
  --violent: #ef4444;
  --theft: #f59e0b;
  --traffic: #38bdf8;
  --alert: #a855f7;
  --police: #10b981;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: max(12px, env(safe-area-inset-top)) 20px 12px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: block;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.28);
}

.brand h1 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-bar {
  display: flex;
  flex: 1;
  align-items: center;
  max-width: 680px;
  min-width: 260px;
  gap: 8px;
}

.search-bar input,
.search-bar select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 0.9rem;
  min-width: 0;
}

/* v3.3: ZIP  or  City + State */
.search-bar .zip-input { flex: 0 1 140px; }
.search-bar .city-input { flex: 1 1 170px; }
.search-bar .state-select { flex: 0 1 120px; padding-right: 8px; }
.search-or {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.search-bar input:focus,
.search-bar select:focus,
.filter-right input:focus,
.add-stream-form input:focus,
.add-stream-form select:focus,
.modal input:focus,
.modal textarea:focus,
.modal select:focus {
  outline: none;
  border-color: var(--primary);
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 13px;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, opacity 0.15s, border-color 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
}

.btn-scanner {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.48);
}

.btn-scanner:hover {
  background: rgba(239, 68, 68, 0.28);
}

.btn-live-play {
  background: var(--beacon);
  color: #fff;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.35);
}

.btn-live-play:hover:not(:disabled) {
  background: var(--beacon-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-main);
  background: var(--bg-card);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 8px #ff4d4d;
  animation: pulseGlow 1.6s infinite;
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.55; }
}

/* Locations Strip */
.locations-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: #0d1526;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.strip-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
}

.location-chips {
  display: flex;
  gap: 6px;
  align-items: center;
}

.chip {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--primary);
}

.chip.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: var(--primary);
  color: #93c5fd;
}

/* v3.3: City ZIP list + Trending ZIPs strips */
.city-zips-strip .icon-btn-sm { margin-left: auto; flex-shrink: 0; }
.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trend-rank {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}
.trend-zip { font-weight: 700; }
.trend-place { color: var(--text-muted); }
.trend-count {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border-radius: 999px;
  padding: 0 7px;
  font-size: 0.72rem;
  font-weight: 700;
}
.trend-arrow { font-size: 0.68rem; }
.trend-arrow.up { color: #f87171; }
.trend-arrow.down { color: #4ade80; }


/* Coverage & Jurisdiction Strip */
.coverage-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 20px;
  background: #0f192d;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.jurisdiction-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.79rem;
  min-width: 220px;
}

.jur-label {
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.4px;
}

.jur-value {
  color: #e2e8f0;
  font-weight: 600;
}

.coverage-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cov-pill {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.cov-pill.cov-yes {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.42);
  color: #6ee7b7;
}

.cov-pill.cov-no {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

.channel-card.channel-external {
  text-decoration: none;
}

.ch-ext-icon {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.map-wrap {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.map-zero-note {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 600;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #cbd5e1;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  pointer-events: none;
}

.tier-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.45px;
  padding: 2px 6px;
  border-radius: 4px;
}

.tier-badge.tier-official {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.tier-badge.tier-news {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.tier-badge.tier-community {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.tier-badge.tier-scanner_ai {
  background: rgba(168, 85, 247, 0.22);
  color: #e9d5ff;
  border: 1px solid rgba(168, 85, 247, 0.45);
}

/* Inline Radio Clip Player & AI Transcript */
.radio-clip-bar {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.radio-clip-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #cbd5e1;
  font-weight: 600;
}

.radio-dur {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #e2e8f0;
}

.radio-inline-audio {
  width: 100%;
  height: 32px;
}

.radio-transcript-box {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.25);
  font-size: 0.78rem;
}

.radio-transcript-box summary {
  cursor: pointer;
  color: #d8b4fe;
  font-weight: 600;
  user-select: none;
}

.radio-transcript-text {
  margin: 6px 0 4px;
  color: #e2e8f0;
  font-style: italic;
  line-height: 1.45;
}

.radio-disclaimer {
  margin: 4px 0 0;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.35;
}

.radio-digest-panel {
  border-left: 3px solid #a855f7;
}

.radio-digest-iframe {
  display: block;
  width: 100%;
  height: 620px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.dup-badge {
  font-size: 0.67rem;
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
  padding: 1px 6px;
  border-radius: 999px;
}

/* Live Scanner Notification Banner */
.scanner-notify {
  margin: 10px 20px 0;
  padding: 11px 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.16), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(239, 68, 68, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.scanner-notify-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pulse-ring-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.25);
  animation: pulseGlow 1.5s infinite;
  flex-shrink: 0;
}

.scanner-notify-left strong {
  font-size: 0.9rem;
  color: #fff;
  display: block;
}

.scanner-notify-left p {
  font-size: 0.79rem;
  color: #cbd5e1;
}

.scanner-notify-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn-sm {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}

.icon-btn-sm:hover {
  color: #fff;
}

/* Built-In Live Audio Scanner Console */
.scanner-console {
  margin: 10px 20px 2px;
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.45);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.scanner-console-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
}

.eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  width: 26px;
}

.eq-bars span {
  flex: 1;
  background: var(--beacon);
  border-radius: 2px;
  height: 6px;
  animation: eqBounce 0.85s ease-in-out infinite;
}

.eq-bars span:nth-child(2) { animation-delay: 0.15s; background: #60a5fa; }
.eq-bars span:nth-child(3) { animation-delay: 0.3s; }
.eq-bars span:nth-child(4) { animation-delay: 0.1s; background: #60a5fa; }
.eq-bars span:nth-child(5) { animation-delay: 0.25s; }

.eq-bars.paused span {
  animation: none;
  height: 5px;
  opacity: 0.35;
}

@keyframes eqBounce {
  0%, 100% { height: 5px; }
  50% { height: 21px; }
}

.np-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.agency-badge {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.agency-police { background: rgba(59, 130, 246, 0.24); color: #93c5fd; }
.agency-fire { background: rgba(239, 68, 68, 0.24); color: #fca5a5; }
.agency-ems { background: rgba(16, 185, 129, 0.24); color: #6ee7b7; }
.agency-multi { background: rgba(168, 85, 247, 0.24); color: #d8b4fe; }

.np-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.np-title {
  font-size: 0.94rem;
  color: #fff;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.vol-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
}

.vol-wrap input[type="range"] {
  width: 82px;
  accent-color: var(--primary);
  cursor: pointer;
}

.scanner-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 8px;
}

.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column; /* badge, full title, county, then the action underneath */
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  color: var(--text-main);
  transition: border-color 0.14s, background 0.14s;
}

.channel-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.channel-card.playing {
  border-color: var(--beacon);
  background: rgba(239, 68, 68, 0.12);
}

.ch-info {
  width: 100%;
  min-width: 0;
}

.ch-title {
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal; /* show the full feed name instead of cutting it off */
  overflow-wrap: anywhere;
  margin-top: 5px;
}

.ch-provider {
  font-size: 0.71rem;
  color: var(--text-muted);
}

.ch-play-icon {
  font-size: 0.8rem;
  font-weight: 700;
  color: #93c5fd;
  flex-shrink: 0;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  width: 100%;
}

.channel-card.playing .ch-play-icon {
  color: #fca5a5;
}

.add-stream-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.add-stream-form input,
.add-stream-form select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 0.81rem;
}

.add-stream-form input {
  flex: 1;
  min-width: 190px;
}

/* Status Banner */
.status-banner {
  margin: 10px 20px 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
}

.status-banner.warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.status-banner.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.hidden {
  display: none !important;
}

/* KPI Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 12px 20px 6px;
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-card.stat-danger {
  border-color: rgba(239, 68, 68, 0.35);
}

.stat-label {
  font-size: 0.73rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.stat-value {
  font-size: 1.14rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-danger .stat-value {
  color: #f87171;
}

/* v3.4.1: the jurisdiction card holds "City, ST (ZIP)", so it gets a wider first column on desktop
   instead of an equal 1/6 share that clipped the ZIP at 1280px. Long names wrap to a second line. */
@media (min-width: 961px) {
  .stats-row {
    grid-template-columns: minmax(240px, 1.7fr) repeat(5, minmax(120px, 1fr));
  }
}
.stat-card-wide .stat-value {
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}

/* Zero-Login Sources Strip */
.sources-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 20px 4px;
  /* v3.4.1: wrap onto a second line on desktop instead of a horizontal scrollbar across the page */
  flex-wrap: wrap;
}

.src-chip {
  background: var(--bg-panel);
  color: #cbd5e1;
  border: 1px solid var(--border);
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.src-chip:hover {
  border-color: var(--primary);
}

.src-chip.active {
  background: rgba(59, 130, 246, 0.22);
  border-color: var(--primary);
  color: #fff;
}

.src-chip .cnt {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
}

/* Filters Bar */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 20px 8px;
  flex-wrap: wrap;
}

.category-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  background: var(--bg-panel);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
}

.pill.active {
  background: var(--text-main);
  color: var(--bg-dark);
  border-color: var(--text-main);
}

.filter-right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.filter-right input,
.filter-right select {
  background: var(--bg-panel);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
}

.filter-right input {
  /* v3.4.1: wide enough for the whole placeholder ("Filter street, agency, or keyword...") */
  min-width: 17.5rem;
  flex: 1 1 17.5rem;
  max-width: 26rem;
}

.pr-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}

.pr-toggle input {
  min-width: auto;
  accent-color: var(--primary);
}

/* Main Split Workspace */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  padding: 4px 20px 18px;
  min-height: 540px;
}

.map-panel,
.feed-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.map-container {
  flex: 1;
  min-height: 460px;
  background: #0f172a;
}

.osm-dark-tiles {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.leaflet-control-layers {
  background: var(--bg-panel) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
}

.map-fallback {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}

.map-fallback p {
  font-size: 0.83rem;
  color: var(--text-muted);
}

#radarCanvas {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #09101d;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  font-size: 0.76rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 4px;
}

.dot-violent { background: var(--violent); }
.dot-theft { background: var(--theft); }
.dot-traffic { background: var(--traffic); }
.dot-alert { background: var(--alert); }
.dot-police { background: var(--police); }

/* Feed Panel */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.feed-header h2 {
  font-size: 0.98rem;
}

.badge-count {
  font-size: 0.76rem;
  background: var(--bg-card);
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--text-muted);
}

.feed-list {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 320px);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.incident-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--police);
  border-radius: 9px;
  padding: 11px 13px;
  cursor: pointer;
  transition: background 0.14s;
}

.incident-card:hover {
  background: var(--bg-card-hover);
}

.incident-card.cat-violent { border-left-color: var(--violent); }
.incident-card.cat-theft { border-left-color: var(--theft); }
.incident-card.cat-traffic { border-left-color: var(--traffic); }
.incident-card.cat-alert { border-left-color: var(--alert); }
.incident-card.cat-police { border-left-color: var(--police); }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.source-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.source-badge.src-crime_wire {
  background: rgba(244, 63, 94, 0.22);
  color: #fda4af;
}

.source-badge.src-live_dispatch {
  background: rgba(239, 68, 68, 0.28);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.45);
}

.source-badge.src-reddit {
  background: rgba(249, 115, 22, 0.22);
  color: #fdba74;
}

.source-badge.src-blotter {
  background: rgba(20, 184, 166, 0.22);
  color: #5eead4;
}

.source-badge.src-police_data {
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
}

.source-badge.src-agency_social {
  background: rgba(14, 165, 233, 0.24);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.source-badge.src-federal {
  background: rgba(234, 179, 8, 0.22);
  color: #fde047;
}

.source-badge.src-official_alert {
  background: rgba(168, 85, 247, 0.22);
  color: #d8b4fe;
}

.source-badge.src-crimeradar {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.source-badge.src-nextdoor,
.source-badge.src-community {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.cat-tag {
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.card-time {
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 5px;
}

.card-summary {
  font-size: 0.81rem;
  color: #cbd5e1;
  line-height: 1.42;
  margin-bottom: 8px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  gap: 8px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-link {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 600;
}

.card-link:hover {
  text-decoration: underline;
}

.delete-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.delete-btn:hover {
  color: var(--violent);
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text-main);
  margin-bottom: 8px;
  font-size: 1rem;
}

.empty-state p {
  font-size: 0.85rem;
  line-height: 1.5;
}

.empty-state .empty-widen-btn {
  margin-top: 14px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.76);
  display: grid;
  place-items: center;
  z-index: 2000;
  padding: 16px;
}

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  padding: 20px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.modal-header h2 {
  font-size: 1.06rem;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-help {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 14px;
}

#tipForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#tipForm label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

#tipForm input,
#tipForm select,
#tipForm textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-family: inherit;
  width: 100%;
  min-width: 0;
}

#tipForm label {
  position: relative;
  min-width: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
  .map-container {
    min-height: 340px;
  }
  .feed-list {
    max-height: 560px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar,
  .locations-strip,
  .stats-row,
  .sources-strip,
  .filters-bar,
  .workspace {
    padding-left: 12px;
    padding-right: 12px;
  }
  .scanner-notify,
  .scanner-console,
  .status-banner {
    margin-left: 12px;
    margin-right: 12px;
  }
  /* v3.3: ZIP on its own row-part, City + State + Search below it */
  .search-bar {
    flex-wrap: wrap;
    max-width: none;
    width: 100%;
  }
  .search-bar .zip-input { flex: 1 1 110px; }
  .search-bar .city-input { flex: 1 1 100%; order: 3; }
  .search-bar .state-select { flex: 1 1 auto; order: 4; }
  .search-bar #searchBtn { order: 5; }
  .search-bar .search-or { order: 2; }
  /* Prevent iOS Safari auto-zoom on input focus */
  .search-bar select,
  .search-bar input,
  .filter-right input,
  .filter-right select,
  .add-stream-form input,
  #tipForm input,
  #tipForm select,
  #tipForm textarea {
    font-size: 16px;
  }
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-card-wide {
    grid-column: 1 / -1;
  }
  /* Phones: one swipeable row of source chips (wrapping would push the map far down) */
  .sources-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .sources-strip::-webkit-scrollbar {
    display: none;
  }
  .filter-right {
    justify-content: flex-start;
  }
  .filter-right select {
    flex: 1 1 45%;
  }
  .filter-right input {
    min-width: 0;
    max-width: none;
    flex-basis: 100%;
  }
}


/* ---- Agency Facebook panel (click-to-load third-party content) ---- */
.fb-panel {
  margin: 0 0 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.fb-panel h3 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.third-party-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 10px;
}
.third-party-notice strong {
  color: var(--text-main);
}
.fb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.fb-frame-wrap {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  max-width: 500px;
}
.fb-frame-wrap iframe {
  /* Width is set inline by app.js to match the plugin's own width= parameter */
  display: block;
  max-width: 100%;
  height: 600px;
  margin: 0 auto;
  border: 0;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

/* ---- Privacy modal ---- */
.privacy-modal {
  max-width: 640px;
  max-height: 86vh;
  overflow-y: auto;
}
.privacy-body {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-main);
}
.privacy-body h3 {
  font-size: 0.92rem;
  margin: 14px 0 4px;
  color: #93c5fd;
}
.privacy-body p,
.privacy-body ul {
  margin-bottom: 6px;
}
.privacy-body ul {
  padding-left: 18px;
}
.privacy-body a {
  color: var(--primary);
}
.privacy-body a.btn-primary {
  color: #fff;
  text-decoration: none;
}

/* ---- Agency social panel sections (Facebook / X) ---- */
.social-section {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}
.social-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.fb-frame-wrap.x-wrap {
  background: transparent;
  max-width: 600px;
  max-height: none;
  overflow: visible;
}
.x-feed-loading,
.x-feed-empty {
  padding: 14px 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.x-feed-empty a {
  color: var(--primary);
  margin-left: 4px;
}
.x-feed-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-panel);
  overflow: hidden;
}
.x-feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}
.x-feed-avatar,
.x-feed-avatar-fallback {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--border);
}
.x-feed-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.16);
  color: var(--text-main);
  font-weight: 800;
  font-size: 1rem;
}
.x-feed-title-col {
  min-width: 0;
  flex: 1;
}
.x-feed-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
}
.x-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
}
.x-feed-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.x-feed-open {
  font-size: 0.76rem;
  padding: 5px 10px;
}
.x-handle-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
}
.x-handle-tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.x-handle-tab.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: var(--primary);
  color: var(--text-main);
}
.x-feed-list {
  max-height: 540px;
  overflow-y: auto;
}
.x-post-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.x-post-item:last-child {
  border-bottom: 0;
}
.x-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 0.8rem;
}
.x-post-author {
  font-weight: 700;
  color: var(--text-main);
}
.x-post-handle,
.x-post-time {
  color: var(--text-muted);
  font-size: 0.76rem;
}
.x-post-text {
  font-size: 0.86rem;
  line-height: 1.48;
  color: var(--text-main);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}
.x-post-media-link {
  display: block;
  margin-bottom: 8px;
}
.x-post-media {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.x-post-foot {
  font-size: 0.76rem;
}
.x-post-foot a {
  color: var(--primary);
  text-decoration: none;
}
.x-post-foot a:hover {
  text-decoration: underline;
}

/* ---- Footer & support ---- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 14px 16px 18px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 8px;
}
.site-footer a {
  color: var(--primary);
}
.footer-sep {
  opacity: 0.5;
}
.tux {
  white-space: nowrap;
}
.support-actions {
  margin: 12px 0;
}

/* ---- Community tips (public form + owner review) ---- */
.tip-modal,
.review-modal {
  max-height: 90vh;
  overflow-y: auto;
}
.review-modal {
  max-width: 720px;
}
.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -6px;
}
.char-counter {
  position: absolute;
  top: 0;
  right: 0;
  font-weight: 400;
  opacity: 0.8;
}
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.tip-rules {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.tip-rules strong {
  color: var(--text-main);
}
.tip-rules ul {
  margin: 6px 0 6px 18px;
}
#tipForm .agree-row {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--text-main);
  font-weight: 600;
}
#tipForm .agree-row input {
  width: auto;
  position: static;
}
.tip-error {
  color: var(--beacon);
  font-size: 0.82rem;
  font-weight: 600;
}
.tip-thanks p {
  margin-bottom: 10px;
  line-height: 1.45;
}
.count-badge {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 0.72rem;
  line-height: 18px;
  text-align: center;
}
.count-badge.has-items {
  background: var(--beacon);
  color: #fff;
}
.review-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.review-tab {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
.review-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: 10px;
  padding: 12px;
}
.review-card h3 {
  font-size: 0.95rem;
  margin: 4px 0 6px;
}
.review-card p {
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  margin-bottom: 6px;
}
.review-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-word;
}
.review-meta a {
  color: var(--primary);
}
.review-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* =====================================================================
   LIGHT THEME
   Applied with <html data-theme="light">. Follows the system setting by default;
   the header toggle remembers a choice per browser.
   ===================================================================== */
html[data-theme="light"] {
  --bg-dark: #eef2f7;
  --bg-panel: #ffffff;
  --bg-card: #f8fafc;
  --bg-card-hover: #eef4ff;
  --border: #d5dde8;
  --text-main: #0f172a;
  --text-muted: #526075;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  color-scheme: light;
}
html[data-theme="light"] body { background: var(--bg-dark); color: var(--text-main); }

/* page bands that were hard-coded dark */
html[data-theme="light"] .locations-strip { background: #f6f8fb; }
html[data-theme="light"] .coverage-strip { background: #f3f6fa; }
html[data-theme="light"] .jur-value { color: #1e293b; }
html[data-theme="light"] .map-container { background: #e5e9ef; }
html[data-theme="light"] #radarCanvas { background: #e8edf3; }
html[data-theme="light"] .modal-backdrop { background: rgba(15, 23, 42, 0.45); }

/* map: plain OpenStreetMap colors instead of the inverted "dark" look */
html[data-theme="light"] .osm-dark-tiles { filter: none; }
html[data-theme="light"] .map-zero-note { background: rgba(255, 255, 255, 0.94); color: #334155; }

/* buttons, chips, source filters */
html[data-theme="light"] .btn-scanner { color: #b91c1c; background: rgba(239, 68, 68, 0.1); }
html[data-theme="light"] .chip.active { color: #1d4ed8; background: rgba(37, 99, 235, 0.12); }
html[data-theme="light"] .trend-count { color: #b91c1c; background: rgba(239, 68, 68, 0.12); }
html[data-theme="light"] .trend-arrow.up { color: #dc2626; }
html[data-theme="light"] .trend-arrow.down { color: #15803d; }
html[data-theme="light"] .src-chip { color: #334155; }
html[data-theme="light"] .src-chip.active { color: #1d4ed8; background: rgba(37, 99, 235, 0.12); }
html[data-theme="light"] .src-chip .cnt { background: rgba(15, 23, 42, 0.08); }
html[data-theme="light"] .icon-btn-sm:hover { color: #0f172a; }

/* coverage pills */
html[data-theme="light"] .cov-pill.cov-yes { color: #047857; background: rgba(16, 185, 129, 0.12); }
html[data-theme="light"] .cov-pill.cov-no { color: #64748b; }

/* status banners */
html[data-theme="light"] .status-banner { color: #1e3a8a; background: rgba(37, 99, 235, 0.08); }
html[data-theme="light"] .status-banner.warn { color: #92400e; background: rgba(245, 158, 11, 0.12); }
html[data-theme="light"] .status-banner.error { color: #991b1b; background: rgba(239, 68, 68, 0.1); }
html[data-theme="light"] .stat-danger .stat-value { color: #dc2626; }

/* timeline cards & badges: same colors, darker text for contrast */
html[data-theme="light"] .card-summary { color: #334155; }
html[data-theme="light"] .card-link { color: #1d4ed8; }
html[data-theme="light"] .dup-badge { color: #475569; }
html[data-theme="light"] .tier-badge.tier-official { color: #047857; }
html[data-theme="light"] .tier-badge.tier-news { color: #1d4ed8; }
html[data-theme="light"] .tier-badge.tier-community { color: #b45309; }
html[data-theme="light"] .tier-badge.tier-scanner_ai { color: #7e22ce; }
html[data-theme="light"] .radio-clip-bar { background: #f8fafc; border-color: #cbd5e1; }
html[data-theme="light"] .radio-clip-meta { color: #334155; }
html[data-theme="light"] .radio-dur { background: #e2e8f0; color: #1e293b; }
html[data-theme="light"] .radio-transcript-box { background: #faf5ff; border-color: #d8b4fe; }
html[data-theme="light"] .radio-transcript-box summary { color: #7e22ce; }
html[data-theme="light"] .radio-transcript-text { color: #1e293b; }
html[data-theme="light"] .radio-disclaimer { color: #64748b; }
html[data-theme="light"] .source-badge { color: #1d4ed8; }
html[data-theme="light"] .source-badge.src-crime_wire { color: #be123c; }
html[data-theme="light"] .source-badge.src-live_dispatch { color: #b91c1c; }
html[data-theme="light"] .source-badge.src-reddit { color: #c2410c; }
html[data-theme="light"] .source-badge.src-blotter { color: #0f766e; }
html[data-theme="light"] .source-badge.src-police_data { color: #0369a1; }
html[data-theme="light"] .source-badge.src-agency_social { color: #0369a1; }
html[data-theme="light"] .source-badge.src-federal { color: #a16207; }
html[data-theme="light"] .source-badge.src-official_alert { color: #7e22ce; }
html[data-theme="light"] .source-badge.src-crimeradar { color: #b91c1c; }
html[data-theme="light"] .source-badge.src-community { color: #047857; }

/* scanner area */
html[data-theme="light"] .scanner-notify-left strong { color: #0f172a; }
html[data-theme="light"] .scanner-notify-left p { color: #475569; }
html[data-theme="light"] .scanner-console { background: #ffffff; box-shadow: 0 6px 22px rgba(15, 23, 42, 0.12); }
html[data-theme="light"] .np-title { color: #0f172a; }
html[data-theme="light"] .ch-ext-icon,
html[data-theme="light"] .ch-play-icon { color: #1d4ed8; }
html[data-theme="light"] .channel-card.playing .ch-play-icon { color: #b91c1c; }
html[data-theme="light"] .agency-police { color: #1d4ed8; }
html[data-theme="light"] .agency-fire { color: #b91c1c; }
html[data-theme="light"] .agency-ems { color: #047857; }
html[data-theme="light"] .agency-multi { color: #7e22ce; }

/* privacy / support text */
html[data-theme="light"] .privacy-body h3 { color: #1d4ed8; }

/* theme toggle button */
.theme-toggle {
  min-width: 40px;
  font-size: 1rem;
  line-height: 1;
}

/* ------------------------------------------------------------------ */
/* v3.2 Weather strip + active NWS alerts                              */
/* ------------------------------------------------------------------ */
.weather-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  padding: 8px 20px;
  background: #0d1628;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.wx-now,
.wx-side {
  display: flex;
  align-items: baseline;
  gap: 6px 10px;
  flex-wrap: wrap;
}
.wx-icon { font-size: 1.25rem; line-height: 1; align-self: center; }
.wx-temp { font-size: 1.15rem; font-weight: 800; color: var(--text-main); }
.wx-cond { font-weight: 600; color: var(--text-main); }
.wx-detail,
.wx-next { color: var(--text-muted); }
.wx-meta { color: var(--text-muted); font-size: 0.74rem; }
.wx-stale { color: #fbbf24; }
.wx-link { color: var(--primary); font-size: 0.76rem; font-weight: 600; text-decoration: none; }
.wx-link:hover { text-decoration: underline; }

.wx-alerts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-dark);
}
.wx-alert {
  border-radius: 8px;
  border: 1px solid;
  border-left-width: 5px;
  font-size: 0.82rem;
  overflow: hidden;
}
.wx-alert-sum {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  flex-wrap: wrap;
}
.wx-alert-sum::-webkit-details-marker { display: none; }
.wx-alert-event { font-size: 0.9rem; }
.wx-alert-until { color: var(--text-muted); }
.wx-alert-more { margin-left: auto; font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; opacity: 0.85; }
.wx-alert[open] .wx-alert-more { opacity: 0.5; }
.wx-alert-body { padding: 0 14px 10px 14px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.wx-alert-headline { font-weight: 600; }
.wx-alert-area,
.wx-alert-src { color: var(--text-muted); font-size: 0.76rem; }
.wx-alert-desc,
.wx-alert-instr { white-space: pre-line; }

.wx-warning { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.55); border-left-color: #ef4444; }
.wx-warning .wx-alert-event { color: #fca5a5; }
.wx-watch { background: rgba(249, 115, 22, 0.11); border-color: rgba(249, 115, 22, 0.5); border-left-color: #f97316; }
.wx-watch .wx-alert-event { color: #fdba74; }
.wx-advisory { background: rgba(234, 179, 8, 0.1); border-color: rgba(234, 179, 8, 0.45); border-left-color: #eab308; }
.wx-advisory .wx-alert-event { color: #fde047; }
.wx-statement { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.4); border-left-color: #3b82f6; }
.wx-statement .wx-alert-event { color: #93c5fd; }

@media (max-width: 640px) {
  .weather-strip,
  .wx-alerts { padding-left: 12px; padding-right: 12px; }
  .wx-side { width: 100%; }
}

html[data-theme="light"] .weather-strip { background: #f5f8fc; }
html[data-theme="light"] .wx-warning .wx-alert-event { color: #b91c1c; }
html[data-theme="light"] .wx-watch .wx-alert-event { color: #c2410c; }
html[data-theme="light"] .wx-advisory .wx-alert-event { color: #854d0e; }
html[data-theme="light"] .wx-statement .wx-alert-event { color: #1d4ed8; }
html[data-theme="light"] .wx-stale { color: #b45309; }
