:root {
  color-scheme: dark;
  --panel: rgba(15, 17, 18, 0.94);
  --panel-strong: rgba(20, 22, 23, 0.98);
  --line: rgba(244, 201, 93, 0.3);
  --text: #f7f4ec;
  --muted: #c7d1cc;
  --blue: #20d6b5;
  --green: #55d481;
  --aqua: #f4c95d;
  --orange: #ff884d;
  --magenta: #ff4f8b;
  --warn: #f7c948;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
.radar-shell,
.map {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #0d1110;
  color: var(--text);
}

button,
select,
input {
  font: inherit;
}

button {
  color: inherit;
}

.radar-shell {
  position: relative;
  isolation: isolate;
}

.map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0d1110;
}

.leaflet-container {
  overflow: hidden;
  outline-offset: 1px;
}

.leaflet-pane,
.leaflet-map-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

.leaflet-safari .leaflet-tile {
  image-rendering: -webkit-optimize-contrast;
}

.leaflet-zoom-animated {
  transform-origin: 0 0;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-shadow-pane {
  z-index: 500;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.leaflet-control {
  position: relative;
  z-index: 800;
  float: left;
  clear: both;
  pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-left .leaflet-control {
  margin-left: 10px;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: 10px;
}

.leaflet-control-zoom a {
  display: block;
  width: 30px;
  height: 30px;
  border-bottom: 1px solid rgba(244, 201, 93, 0.26);
  background: rgba(16, 18, 19, 0.92);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
  text-decoration: none;
}

.leaflet-control-zoom a:last-child {
  border-bottom: 0;
}

.leaflet-interactive {
  cursor: pointer;
  pointer-events: auto;
}

.leaflet-top .leaflet-control {
  margin-top: 10px;
}

.leaflet-right .leaflet-control {
  float: right;
  margin-right: 10px;
}

.leaflet-popup {
  position: absolute;
  margin-bottom: 20px;
  text-align: center;
}

.leaflet-popup-content-wrapper {
  padding: 1px;
  text-align: left;
}

.leaflet-popup-tip-container {
  position: absolute;
  left: 50%;
  width: 40px;
  height: 20px;
  margin-left: -20px;
  overflow: hidden;
  pointer-events: none;
}

.leaflet-popup-tip {
  width: 17px;
  height: 17px;
  margin: -10px auto 0;
  transform: rotate(45deg);
}

.leaflet-popup-close-button {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #cfe0f1;
  font-size: 20px;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
}

.leaflet-popup-close-button:hover {
  color: #ffffff;
}

.leaflet-tooltip {
  position: absolute;
  padding: 6px;
  border: 1px solid rgba(244, 201, 93, 0.36);
  border-radius: 4px;
  background: var(--panel-strong);
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
}

.leaflet-control-attribution {
  margin: 0;
  padding: 0 5px;
  font-size: 11px;
  line-height: 1.4;
}

.leaflet-control-attribution {
  background: rgba(15, 17, 18, 0.78) !important;
  color: #d8d0bd !important;
}

.leaflet-control-attribution a {
  color: #f4c95d !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid rgba(244, 201, 93, 0.36);
  box-shadow: var(--shadow);
}

.leaflet-popup-content {
  margin: 12px 14px;
}

.popup-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.popup-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.popup-copy {
  margin: 0;
  max-width: 320px;
  color: #ece7d9;
  font-size: 12px;
  line-height: 1.35;
}

.popup-link {
  display: inline-block;
  margin-top: 8px;
  color: #f4c95d;
  font-weight: 700;
}

.alert-popup-card {
  --alert-color: var(--warn);
}

.alert-popup-card .popup-title {
  color: var(--alert-color);
}

.popup-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 9px;
}

.popup-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--alert-color) 56%, white 16%);
  border-radius: 7px;
  background: color-mix(in srgb, var(--alert-color) 20%, #111313 80%);
  color: #fff6df;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.popup-details {
  margin-top: 9px;
}

.popup-details p {
  margin: 4px 0 0;
  color: #f1eadb;
  font-size: 12px;
  line-height: 1.3;
}

.popup-details strong {
  color: #fff6df;
}

.top-actions {
  position: absolute;
  z-index: 20;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.dialog-close,
.play-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(244, 201, 93, 0.42);
  border-radius: 8px;
  background: rgba(16, 18, 19, 0.92);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.icon-button:hover,
.dialog-close:hover,
.play-button:hover {
  border-color: rgba(32, 214, 181, 0.78);
  background: rgba(27, 31, 30, 0.96);
}

.icon-button svg,
.dialog-close svg,
.play-button svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.4;
}

.control-panel {
  position: absolute;
  z-index: 18;
  top: 54px;
  left: 12px;
  width: min(224px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.control-panel.is-collapsed {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.panel-title {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
}

.panel-title-small {
  margin: 0 0 12px;
}

.panel-divider {
  height: 1px;
  margin: 12px -4px 10px;
  background: var(--line);
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
}

.control-row + .control-row {
  margin-top: 3px;
}

.control-row-stack {
  align-items: center;
}

select {
  min-width: 58px;
  height: 30px;
  padding: 0 30px 0 10px;
  border: 1px solid rgba(244, 201, 93, 0.52);
  border-radius: 8px;
  background: #23251d;
  color: var(--text);
  font-weight: 750;
}

.switch {
  appearance: none;
  width: 35px;
  height: 20px;
  margin: 0;
  border-radius: 999px;
  background: #3b4440;
  box-shadow: inset 0 0 0 1px rgba(133, 181, 221, 0.25);
  cursor: pointer;
  position: relative;
}

.switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff8e5;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.34);
  transition: transform 150ms ease;
}

.switch:checked {
  background: var(--blue);
}

.switch:checked::before {
  transform: translateX(15px);
}

.range,
.timeline-range {
  appearance: none;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 248, 229, 0.96) 0 14%, #3b4440 14% 100%);
  cursor: pointer;
}

.range {
  width: 96px;
}

.range::-webkit-slider-thumb,
.timeline-range::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(244, 201, 93, 0.18);
}

.range::-moz-range-thumb,
.timeline-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(244, 201, 93, 0.18);
}

.timeline {
  position: absolute;
  z-index: 19;
  left: 50%;
  bottom: 24px;
  display: grid;
  grid-template-columns: 42px auto minmax(180px, 480px) minmax(122px, auto);
  align-items: center;
  gap: 12px;
  width: min(910px, calc(100vw - 48px));
  min-height: 62px;
  padding: 10px 14px;
  border: 1px solid rgba(244, 201, 93, 0.38);
  border-radius: 8px;
  background: rgba(16, 18, 19, 0.94);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.play-button {
  width: 40px;
  height: 40px;
  border-color: rgba(244, 201, 93, 0.58);
  background: #24281f;
}

.segment-control {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(244, 201, 93, 0.34);
  border-radius: 8px;
  background: #151a18;
}

.segment {
  min-width: 68px;
  border: 0;
  background: transparent;
  color: #efe8d7;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.segment.is-active {
  background: #3a321c;
}

.segment.is-live.is-active {
  background: rgba(32, 214, 181, 0.17);
  color: #9ff4e5;
}

.timeline-range {
  width: 100%;
  background:
    radial-gradient(circle at 8px 50%, var(--aqua) 0 2px, transparent 3px) 0 0 / 16px 16px repeat-x,
    linear-gradient(90deg, rgba(244, 201, 93, 0.18), rgba(32, 214, 181, 0.16));
}

.time-label {
  min-width: 122px;
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.legend {
  position: absolute;
  z-index: 17;
  right: 14px;
  bottom: 24px;
  width: 178px;
  min-height: 62px;
  padding: 10px 10px 8px;
  border: 1px solid rgba(244, 201, 93, 0.3);
  border-radius: 8px;
  background: rgba(16, 18, 19, 0.94);
  box-shadow: var(--shadow);
}

.legend-title {
  margin-bottom: 7px;
  color: #efe8d7;
  font-size: 10px;
  font-weight: 800;
}

.reflectivity-scale {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #99f58a 0%, #1fca3f 16%, #f1e600 34%, #f58220 52%, #e50014 68%, #9600c8 84%, #ff8eea 100%);
}

.legend-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #efe8d7;
  font-size: 10px;
  font-weight: 800;
}

.legend-temp {
  bottom: 96px;
  width: 304px;
}

.legend-temp img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.is-hidden {
  display: none !important;
}

.status-toast {
  position: absolute;
  z-index: 24;
  right: 16px;
  top: 16px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 13px;
  border: 1px solid rgba(244, 201, 93, 0.38);
  border-radius: 8px;
  background: rgba(16, 18, 19, 0.96);
  color: #f7f4ec;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.status-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.source-dialog {
  width: min(430px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid rgba(244, 201, 93, 0.5);
  border-radius: 12px;
  background: #111313;
  color: var(--text);
  box-shadow: var(--shadow);
}

.source-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
}

.source-dialog h1 {
  margin: 0 42px 10px 0;
  font-size: 18px;
  line-height: 1.2;
}

.source-dialog h2 {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-dialog ul {
  margin: 0;
  padding-left: 20px;
  color: #ece7d9;
  font-size: 12px;
  line-height: 1.6;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.dialog-close svg {
  width: 16px;
  height: 16px;
}

.notice {
  padding: 12px;
  border: 1px solid rgba(255, 139, 85, 0.58);
  border-radius: 8px;
  background: rgba(255, 139, 85, 0.11);
  color: #ffd7b1;
  font-size: 12px;
  line-height: 1.45;
}

.notice p {
  margin: 10px 0 0;
}

.alert-warning {
  color: var(--magenta);
}

.alert-watch {
  color: var(--orange);
}

.quake-marker {
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(46, 245, 172, 0.26);
  box-shadow: 0 0 0 8px rgba(46, 245, 172, 0.13), 0 0 26px rgba(46, 245, 172, 0.7);
  transform: translate(-50%, -50%);
}

.quake-marker::after {
  content: "";
  position: absolute;
  inset: 25%;
  border: 2px solid white;
  border-radius: 50%;
  background: var(--quake-color, #26f5ac);
}

@media (max-width: 760px) {
  .control-panel {
    top: 58px;
  }

  .timeline {
    grid-template-columns: 38px 1fr;
    gap: 10px;
    bottom: 12px;
    width: calc(100vw - 24px);
    padding: 10px;
  }

  .play-button {
    width: 38px;
    height: 38px;
  }

  .segment-control {
    height: 38px;
  }

  .segment {
    min-width: 0;
  }

  .timeline-range {
    grid-column: 1 / -1;
  }

  .time-label {
    grid-column: 1 / -1;
    min-width: 0;
    text-align: left;
    font-size: 13px;
  }

  .legend {
    right: 12px;
    bottom: 160px;
    width: 168px;
  }

  .legend-temp {
    bottom: 230px;
    width: min(304px, calc(100vw - 24px));
  }

  .status-toast {
    top: auto;
    right: 12px;
    bottom: 250px;
  }
}






/* Iowa Pulse mobile-app palette and status-bar layout */
:root {
  --panel: rgba(2, 10, 28, 0.94);
  --panel-strong: rgba(4, 15, 38, 0.98);
  --line: rgba(61, 169, 255, 0.34);
  --text: #f5fbff;
  --muted: #a9d4ff;
  --blue: #248cff;
  --green: #17d6ad;
  --aqua: #57d8ff;
  --orange: #ff9f36;
  --magenta: #f560d9;
  --warn: #ffd447;
  --shadow: 0 18px 52px rgba(0, 5, 18, 0.52);
}

body,
.map {
  background: #020817;
}

.leaflet-control-zoom a,
.icon-button,
.dialog-close,
.play-button {
  border-color: rgba(61, 169, 255, 0.52);
  background: rgba(4, 16, 38, 0.9);
  color: var(--text);
}

.icon-button:hover,
.dialog-close:hover,
.play-button:hover {
  border-color: rgba(87, 216, 255, 0.82);
  background: rgba(5, 33, 70, 0.96);
}

.top-actions {
  top: 36px;
}

.control-panel {
  top: 82px;
  border-color: rgba(61, 169, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(6, 31, 71, 0.92), rgba(2, 10, 28, 0.95)),
    var(--panel);
}

.panel-title {
  color: #ffffff;
}

.panel-divider {
  background: rgba(61, 169, 255, 0.26);
}

select {
  border-color: rgba(87, 216, 255, 0.5);
  background: #082b5b;
}

.switch {
  background: #243755;
  box-shadow: inset 0 0 0 1px rgba(169, 212, 255, 0.22);
}

.switch::before {
  background: #eaf8ff;
}

.switch:checked {
  background: linear-gradient(90deg, #248cff, #17d6ad);
}

.range,
.timeline-range {
  background: linear-gradient(90deg, rgba(234, 248, 255, 0.96) 0 14%, #243755 14% 100%);
}

.range::-webkit-slider-thumb,
.timeline-range::-webkit-slider-thumb,
.range::-moz-range-thumb,
.timeline-range::-moz-range-thumb {
  background: var(--aqua);
  box-shadow: 0 0 0 4px rgba(87, 216, 255, 0.18);
}

.timeline {
  border-color: rgba(61, 169, 255, 0.36);
  background: linear-gradient(180deg, rgba(6, 31, 71, 0.94), rgba(2, 10, 28, 0.96));
}

.play-button {
  background: #0a2f65;
}

.segment-control {
  border-color: rgba(61, 169, 255, 0.38);
  background: #05162f;
}

.segment {
  color: #d7ecff;
}

.segment.is-active {
  background: #0a336c;
}

.segment.is-live.is-active {
  background: rgba(23, 214, 173, 0.18);
  color: #96fff0;
}

.timeline-range {
  background:
    radial-gradient(circle at 8px 50%, #57d8ff 0 2px, transparent 3px) 0 0 / 16px 16px repeat-x,
    linear-gradient(90deg, rgba(36, 140, 255, 0.22), rgba(23, 214, 173, 0.18));
}

#radarLegend.legend {
  z-index: 23;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #020817;
  box-shadow: 0 8px 22px rgba(0, 5, 18, 0.38);
  pointer-events: none;
}

#radarLegend .reflectivity-scale {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: 0;
  background: linear-gradient(90deg,
    #3b0069 0%,
    #1e49e6 12%,
    #5fdcff 22%,
    #20c66a 35%,
    #00a000 46%,
    #ffe600 58%,
    #ff9e18 70%,
    #e30000 82%,
    #8b008c 93%,
    #ff9eea 100%);
}

#radarLegend::after {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(90deg, rgba(2, 8, 23, 0.58), transparent 18%, transparent 82%, rgba(2, 8, 23, 0.5));
}

#radarLegend .legend-title {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 50%;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(2, 8, 23, 0.72);
  color: #ffffff;
  font-size: 10px;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  transform: translateY(-50%);
}

#radarLegend .legend-ticks {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 12px;
  bottom: 0;
  left: 170px;
  display: grid;
  grid-template-columns: repeat(4, minmax(34px, 1fr));
  align-items: center;
  margin: 0;
  color: #fffdf2;
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
}

.legend-temp {
  top: auto;
  right: 14px;
  bottom: 96px;
  left: auto;
  width: 304px;
  min-height: 62px;
  height: auto;
  padding: 10px 10px 8px;
  border: 1px solid rgba(61, 169, 255, 0.32);
  border-radius: 8px;
  background: rgba(4, 15, 38, 0.94);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.status-toast {
  top: 36px;
  border-color: rgba(87, 216, 255, 0.4);
  background: rgba(4, 15, 38, 0.96);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-color: color-mix(in srgb, var(--alert-color, #57d8ff) 46%, #57d8ff 18%);
  background: rgba(3, 13, 34, 0.98);
}

.leaflet-popup-content {
  margin: 12px 14px;
}

.alert-popup-card {
  max-width: min(430px, calc(100vw - 56px));
  max-height: min(62vh, 520px);
  overflow: auto;
  padding-right: 3px;
  scrollbar-color: var(--alert-color) rgba(169, 212, 255, 0.12);
}

.alert-popup-card .popup-title {
  color: var(--alert-color);
  font-size: 15px;
}

.popup-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin: 8px 0 10px;
  padding: 8px;
  border: 1px solid rgba(169, 212, 255, 0.18);
  border-radius: 8px;
  background: rgba(6, 31, 71, 0.38);
}

.popup-meta-grid p,
.popup-instructions p {
  margin: 0;
}

.popup-meta-grid strong {
  display: block;
  color: #a9d4ff;
  font-size: 10px;
  text-transform: uppercase;
}

.popup-meta-grid span {
  display: block;
  color: #f5fbff;
  font-size: 12px;
  line-height: 1.25;
}

.popup-headline {
  margin: 0 0 9px;
  color: #f5fbff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.popup-full-text,
.popup-instructions {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(169, 212, 255, 0.15);
  border-radius: 8px;
  background: rgba(1, 8, 23, 0.52);
  color: #e9f6ff;
  font-size: 12px;
  line-height: 1.38;
  white-space: pre-wrap;
}

.popup-instructions strong {
  display: block;
  margin-bottom: 5px;
  color: #ffffff;
}

.popup-link {
  display: none;
}

.source-dialog {
  border-color: rgba(61, 169, 255, 0.5);
  background: #041026;
}

.notice {
  border-color: rgba(87, 216, 255, 0.38);
  background: rgba(36, 140, 255, 0.12);
  color: #d8f3ff;
}

@media (max-width: 760px) {
  .top-actions {
    top: 34px;
  }

  .control-panel {
    top: 80px;
  }

  #radarLegend .legend-title {
    left: 6px;
    padding: 2px 6px;
    font-size: 9px;
  }

  #radarLegend .legend-ticks {
    left: 128px;
    right: 6px;
    font-size: 10px;
  }

  .legend-temp {
    right: 12px;
    bottom: 230px;
    width: min(304px, calc(100vw - 24px));
  }

  .status-toast {
    top: auto;
  }

  .popup-meta-grid {
    grid-template-columns: 1fr;
  }
}

.alert-notice {
  position: absolute;
  z-index: 28;
  top: 36px;
  right: 16px;
  width: min(360px, calc(100vw - 32px));
  padding: 13px 42px 13px 14px;
  border: 1px solid rgba(87, 216, 255, 0.5);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(9, 45, 95, 0.96), rgba(3, 13, 34, 0.98));
  color: #f5fbff;
  box-shadow: 0 18px 52px rgba(0, 5, 18, 0.5);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.alert-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.alert-notice-kicker {
  color: #57d8ff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.alert-notice h2 {
  margin: 3px 0 5px;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
}

.alert-notice p {
  margin: 0;
  color: #d9efff;
  font-size: 12px;
  line-height: 1.35;
}

.alert-notice-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(169, 212, 255, 0.28);
  border-radius: 8px;
  background: rgba(2, 10, 28, 0.6);
  color: #f5fbff;
  cursor: pointer;
}

.alert-notice-close svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 760px) {
  .alert-notice {
    top: 34px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* Menu playback and single top product status strip */
.control-panel {
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  scrollbar-color: rgba(87, 216, 255, 0.48) rgba(169, 212, 255, 0.1);
}

.control-panel .timeline {
  position: static;
  z-index: auto;
  left: auto;
  bottom: auto;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  width: 100%;
  min-height: 0;
  margin-top: 10px;
  padding: 10px;
  gap: 10px;
  border: 1px solid rgba(61, 169, 255, 0.34);
  border-radius: 8px;
  background: rgba(2, 10, 28, 0.56);
  box-shadow: inset 0 0 0 1px rgba(169, 212, 255, 0.08);
  transform: none;
}

.control-panel .timeline .play-button {
  width: 38px;
  height: 38px;
}

.control-panel .timeline .segment-control {
  width: 100%;
  min-width: 0;
  height: 38px;
}

.control-panel .timeline .segment {
  min-width: 0;
  padding: 0 4px;
  font-size: 12px;
}

.control-panel .timeline .timeline-range,
.control-panel .timeline .time-label {
  grid-column: 1 / -1;
}

.control-panel .timeline .time-label {
  min-width: 0;
  font-size: 12px;
  text-align: left;
}

#radarLegend.legend,
#tempLegend.legend {
  z-index: 23;
  top: 0;
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #020817;
  box-shadow: 0 8px 22px rgba(0, 5, 18, 0.38);
  pointer-events: none;
}

#tempLegend .temp-scale {
  position: absolute;
  inset: 0;
  height: 100%;
  background: linear-gradient(90deg,
    #3d1a7a 0%,
    #2854d9 13%,
    #2ea7f2 24%,
    #20c5a8 37%,
    #43c95e 48%,
    #f1d84b 60%,
    #f89a31 72%,
    #e34830 84%,
    #b31558 100%);
}

#tempLegend::after {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(90deg, rgba(2, 8, 23, 0.58), transparent 18%, transparent 82%, rgba(2, 8, 23, 0.5));
}

#tempLegend .legend-title {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 50%;
  margin: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(2, 8, 23, 0.72);
  color: #ffffff;
  font-size: 10px;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  transform: translateY(-50%);
}

#tempLegend .legend-ticks {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 12px;
  bottom: 0;
  left: 150px;
  display: grid;
  grid-template-columns: repeat(5, minmax(30px, 1fr));
  align-items: center;
  margin: 0;
  color: #fffdf2;
  font-size: 11px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
}

.quake-popup-card {
  --alert-color: var(--quake-accent, #38d996);
}

.quake-popup-card .popup-title {
  color: var(--quake-accent, #38d996);
}

@media (max-width: 760px) {
  #radarLegend .legend-ticks,
  #tempLegend .legend-ticks {
    left: 126px;
    right: 6px;
    font-size: 10px;
  }

  #tempLegend .legend-title {
    left: 6px;
    padding: 2px 6px;
    font-size: 9px;
  }

  .control-panel .timeline {
    grid-template-columns: 38px minmax(0, 1fr);
    width: 100%;
    margin-top: 10px;
    padding: 10px;
  }
}

.quake-marker {
  display: block;
  position: relative;
}

/* Calm near-black UI pass */
:root {
  --panel: rgba(8, 8, 8, 0.95);
  --panel-strong: #080808;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f6f7f8;
  --muted: #aeb7c2;
  --blue: #3a8cff;
  --green: #24c09a;
  --aqua: #7ccfff;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

body,
.map {
  background: #080808;
}

.leaflet-control-zoom a,
.icon-button,
.dialog-close,
.play-button,
.alert-notice-close {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(8, 8, 8, 0.92);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.icon-button:hover,
.dialog-close:hover,
.play-button:hover,
.alert-notice-close:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: #111111;
}

.control-panel,
.source-dialog,
.status-toast,
.alert-notice {
  border-color: rgba(255, 255, 255, 0.16);
  background: #080808;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.control-panel {
  background: rgba(8, 8, 8, 0.95);
  scrollbar-color: rgba(255, 255, 255, 0.28) rgba(255, 255, 255, 0.06);
}

.panel-divider {
  background: rgba(255, 255, 255, 0.12);
}

select,
.segment-control,
.control-panel .timeline,
.popup-full-text,
.popup-instructions {
  border-color: rgba(255, 255, 255, 0.14);
  background: #101010;
}

select {
  color: #f6f7f8;
}

.switch {
  background: #2b2b2b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.switch:checked {
  background: #2364d8;
}

.range,
.timeline-range {
  background: linear-gradient(90deg, rgba(246, 247, 248, 0.92) 0 14%, #2b2b2b 14% 100%);
}

.range::-webkit-slider-thumb,
.timeline-range::-webkit-slider-thumb,
.range::-moz-range-thumb,
.timeline-range::-moz-range-thumb {
  background: #f6f7f8;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.segment {
  color: #d8dde3;
}

.segment.is-active {
  background: rgba(255, 255, 255, 0.12);
}

.segment.is-live.is-active {
  background: rgba(36, 192, 154, 0.16);
  color: #aef1dd;
}

#radarLegend.legend,
#tempLegend.legend {
  min-height: 14px;
  height: 14px;
  background: #080808;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.34);
}

#radarLegend .reflectivity-scale,
#tempLegend .temp-scale {
  opacity: 0.84;
}

#radarLegend::after,
#tempLegend::after {
  border-bottom-color: rgba(255, 255, 255, 0.12);
  background: transparent;
}

#radarLegend .legend-title,
#tempLegend .legend-title {
  display: none;
}

#radarLegend .legend-ticks,
#tempLegend .legend-ticks {
  left: auto;
  right: 8px;
  width: 38px;
  grid-template-columns: 1fr;
  justify-items: end;
  color: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

#radarLegend .legend-ticks span:not(:last-child),
#tempLegend .legend-ticks span:not(:last-child) {
  display: none;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-color: color-mix(in srgb, var(--alert-color, #f6f7f8) 58%, #ffffff 4%);
  background: #080808;
}

.alert-popup-card {
  max-width: min(430px, calc(100vw - 56px));
  max-height: min(58vh, 500px);
  scrollbar-color: var(--alert-color) rgba(255, 255, 255, 0.08);
}

.alert-popup-card .popup-title {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.25;
}

.popup-badges {
  gap: 5px;
  margin: 7px 0 10px;
}

.popup-badge {
  min-height: 20px;
  padding: 2px 7px;
  border-color: color-mix(in srgb, var(--alert-color) 58%, white 10%);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #f6f7f8;
  font-size: 11px;
}

.popup-meta-grid {
  gap: 8px 14px;
  margin: 8px 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.popup-meta-grid strong {
  color: #9ea8b4;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.popup-meta-grid span,
.popup-headline,
.popup-details p {
  color: #f0f2f4;
}

.popup-headline {
  font-size: 12px;
  font-weight: 750;
}

.popup-details {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-full-text,
.popup-instructions {
  background: #0d0d0d;
  color: #e7ebee;
}

.popup-raw-details {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
}

.popup-raw-details summary {
  color: var(--alert-color);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style-position: inside;
}

.popup-raw-details .popup-full-text {
  margin-top: 8px;
}

.alert-notice {
  width: min(340px, calc(100vw - 32px));
  padding: 11px 40px 11px 13px;
  border-left: 3px solid var(--notice-accent, #f4c95d);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.94);
}

.alert-notice-kicker {
  color: var(--notice-accent, #f4c95d);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.alert-notice h2 {
  margin: 2px 0 4px;
  font-size: 14px;
}

.alert-notice p {
  color: #d9dde2;
  font-size: 12px;
}

.notice {
  border-color: rgba(255, 255, 255, 0.14);
  background: #101010;
  color: #e6e9ec;
}

.filter-badge {
  position: absolute;
  z-index: 22;
  top: 24px;
  right: 16px;
  max-width: min(260px, calc(100vw - 32px));
  padding: 5px 9px 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid #20d58f;
  border-radius: 7px;
  background: rgba(8, 8, 8, 0.9);
  color: #dce2e8;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
}

@media (max-width: 760px) {
  .filter-badge {
    top: 22px;
    right: 12px;
    font-size: 10px;
  }
}

.storm-motion-line {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.78));
}

.storm-motion-head-icon,
.storm-motion-label-icon {
  background: transparent;
  border: 0;
  pointer-events: none;
}

.storm-motion-head {
  display: block;
  width: 0;
  height: 0;
  margin: 2px 0 0 5px;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;
  border-bottom: 15px solid var(--storm-motion-color, #f8b51f);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.86));
  transform: rotate(var(--storm-motion-rotation, 0deg));
  transform-origin: 50% 58%;
}

.storm-motion-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 74px;
  min-height: 18px;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--storm-motion-color, #f8b51f) 64%, white 8%);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.82);
  color: #f6f7f8;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.36);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.report-marker {
  display: grid;
  place-items: center;
  width: var(--report-size, 26px);
  height: var(--report-size, 26px);
  border: 1px solid color-mix(in srgb, var(--report-color, #aeb7c2) 72%, white 10%);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.82);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--report-color, #aeb7c2) 24%, transparent), 0 8px 20px rgba(0, 0, 0, 0.38);
  color: #f6f7f8;
}

.report-marker span {
  color: var(--report-color, #aeb7c2);
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.report-tornado {
  border-radius: 8px;
}

.report-hail span,
.report-rain span {
  color: #f6f7f8;
}

.report-popup-card {
  --alert-color: var(--report-color, #aeb7c2);
  max-width: min(380px, calc(100vw - 56px));
  color: #f6f7f8;
}

.report-popup-card .popup-title {
  color: var(--report-color, #aeb7c2);
  font-size: 14px;
  line-height: 1.25;
}

.report-popup-card .popup-full-text {
  border-color: rgba(255, 255, 255, 0.12);
}


.account-status {
  margin: 0 0 10px;
  color: #dce2e8;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.account-form {
  display: grid;
  gap: 7px;
}

.account-form label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.account-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: #101010;
  color: var(--text);
  padding: 0 9px;
  font-size: 12px;
}

.account-actions {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.account-button,
.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(244, 201, 93, 0.4);
  border-radius: 7px;
  background: #161616;
  color: #fff7dc;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.account-button:disabled,
.text-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.account-actions .text-button {
  justify-self: start;
}

.spc-popup-card {
  --alert-color: var(--spc-color, #f4c95d);
  max-width: min(380px, calc(100vw - 56px));
  color: #f6f7f8;
}

.spc-popup-card .popup-title {
  color: var(--spc-color, #f4c95d);
}

.playback-dock {
  position: absolute;
  z-index: 19;
  left: 50%;
  bottom: 18px;
  display: grid;
  gap: 8px;
  width: min(760px, calc(100vw - 28px));
  padding: 9px;
  border: 1px solid rgba(244, 201, 93, 0.32);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.9);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  transform: translateX(-50%);
}

.playback-dock-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 24px;
  padding: 0 2px;
  color: #f7f4ec;
  font-size: 12px;
  font-weight: 900;
}

.playback-dock .timeline {
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: 40px minmax(186px, auto) minmax(82px, 110px);
  grid-template-areas:
    "play segments speed"
    "range range time"
    "opacity opacity opacity";
  align-items: center;
  gap: 8px 10px;
  width: 100%;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: #101010;
  box-shadow: none;
  transform: none;
}

.playback-dock .play-button {
  grid-area: play;
}

.playback-dock .segment-control {
  grid-area: segments;
}

.playback-speed {
  grid-area: speed;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.playback-speed select {
  width: 100%;
}

.playback-dock .timeline-range {
  grid-area: range;
}

.playback-dock .time-label {
  grid-area: time;
  min-width: auto;
  font-size: 12px;
}

.playback-opacity {
  grid-area: opacity;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.spc-risk-card {
  position: absolute;
  z-index: 22;
  right: 16px;
  top: 58px;
  width: 178px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(8, 8, 8, 0.9);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  color: #f7f4ec;
}

.spc-risk-title {
  margin-bottom: 5px;
  color: #f7f4ec;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.spc-risk-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  color: #f7f4ec;
  font-size: 11px;
  font-weight: 850;
}

.spc-risk-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  color: #080808;
  font-weight: 950;
  line-height: 1;
}

.spc-high .spc-risk-number {
  background: #ff66cc;
}

.spc-moderate .spc-risk-number {
  background: #ff6666;
}

.spc-enhanced .spc-risk-number {
  background: #ffa366;
}

.spc-slight .spc-risk-number {
  background: #ffe066;
}

.spc-marginal .spc-risk-number {
  background: #66a366;
}

.spc-thunder .spc-risk-number {
  background: #c1e9c1;
}

@media (max-width: 760px) {
  .playback-dock {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    transform: none;
  }

  .playback-dock .timeline {
    grid-template-columns: 38px 1fr;
    grid-template-areas:
      "play segments"
      "speed time"
      "range range"
      "opacity opacity";
  }

  .spc-risk-card {
    top: auto;
    right: 10px;
    bottom: 96px;
  }
}

/* Compact playback and Iowa Pulse account accents */
.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;
}

.icon-button.is-active {
  border-color: rgba(66, 161, 255, 0.78);
  background: #0b1d2d;
  color: #e7f4ff;
  box-shadow: 0 0 0 1px rgba(66, 161, 255, 0.22), 0 10px 24px rgba(0, 0, 0, 0.34);
}

.account-section {
  display: grid;
  gap: 9px;
}

.account-button,
.account-link {
  border-color: rgba(66, 161, 255, 0.62);
  background: #0a2034;
  color: #e9f5ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.account-button:hover,
.account-link:hover {
  border-color: rgba(91, 180, 255, 0.92);
  background: #0d2b48;
}

.playback-dock {
  bottom: 14px;
  width: min(520px, calc(100vw - 28px));
  gap: 5px;
  padding: 6px;
  border-color: rgba(66, 161, 255, 0.28);
}

.playback-dock-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  padding: 0 2px 0 4px;
  color: #f7f4ec;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.mini-icon-button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: #101010;
  color: #d8e6f4;
  cursor: pointer;
}

.mini-icon-button:hover {
  border-color: rgba(66, 161, 255, 0.58);
  color: #ffffff;
}

.mini-icon-button svg {
  width: 14px;
  height: 14px;
}

.playback-dock .timeline {
  grid-template-columns: 34px minmax(156px, 1fr) 70px;
  grid-template-areas:
    "play segments speed"
    "range range time"
    "opacity opacity opacity";
  gap: 5px 7px;
  padding: 6px;
  border-color: rgba(255, 255, 255, 0.1);
}

.playback-dock .play-button {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.playback-dock .play-button svg {
  width: 16px;
  height: 16px;
}

.playback-dock .segment-control {
  min-height: 32px;
  height: 32px;
}

.playback-dock .segment {
  min-width: 46px;
  padding: 0 8px;
  font-size: 11px;
}

.playback-dock .playback-speed span {
  display: none;
}

.playback-dock .playback-speed select {
  height: 30px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.playback-dock .timeline-range {
  min-width: 0;
}

.playback-dock .time-label {
  justify-self: end;
  font-size: 11px;
  line-height: 1.1;
}

.playback-dock .playback-opacity {
  gap: 7px;
  font-size: 10px;
}

.county-temp-icon {
  background: transparent;
  border: 0;
}

.county-temp-label {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.82);
  color: #f7fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.34);
}

.county-temp-label.is-hot {
  border-color: rgba(255, 103, 64, 0.82);
  background: rgba(79, 20, 10, 0.9);
}

.county-temp-label.is-warm {
  border-color: rgba(255, 195, 77, 0.82);
  background: rgba(76, 53, 8, 0.9);
}

.county-temp-label.is-mild {
  border-color: rgba(66, 161, 255, 0.72);
  background: rgba(8, 30, 50, 0.9);
}

.county-temp-label.is-cool,
.county-temp-label.is-freezing {
  border-color: rgba(123, 223, 242, 0.82);
  background: rgba(8, 39, 54, 0.9);
}

.county-temp-popup h3 {
  margin: 0 0 8px;
  color: #f7f4ec;
  font-size: 15px;
  font-weight: 950;
}

.county-temp-note {
  margin: 9px 0 0;
  color: #b7c6d5;
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .playback-dock {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    transform: none;
  }

  .playback-dock .timeline {
    grid-template-columns: 32px minmax(0, 1fr) 64px;
    grid-template-areas:
      "play segments speed"
      "range range range"
      "time opacity opacity";
  }

  .playback-dock .segment {
    min-width: 0;
    padding: 0 6px;
  }
}

/* Keep the opened playback dock tight on desktop. */
@media (min-width: 761px) {
  .playback-dock .timeline {
    grid-template-columns: 34px minmax(144px, 1fr) 62px 88px;
    grid-template-areas:
      "play segments speed opacity"
      "range range range time";
  }

  .playback-dock .playback-opacity {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .playback-dock .playback-opacity span {
    display: none;
  }
}

/* Mini playback: options in menu, neutral player on the map. */
.icon-button.is-active,
.icon-button.is-active:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: #101010;
  color: #f7f4ec;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.playback-menu-controls {
  display: grid;
  gap: 9px;
}

.playback-menu-controls .segment-control {
  width: 100%;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.16);
  background: #101010;
}

.playback-menu-controls .segment {
  min-width: 0;
  padding: 0 8px;
  font-size: 11px;
}

.playback-menu-controls .segment.is-disabled {
  color: #6f7378;
  cursor: not-allowed;
  opacity: 0.58;
}

.control-panel .playback-speed,
.control-panel .playback-opacity {
  grid-area: auto;
  display: flex;
  min-height: 34px;
  gap: 10px;
}

.control-panel .playback-speed select {
  width: 82px;
}

.control-panel .playback-opacity input {
  width: 96px;
}

.playback-dock {
  left: 12px;
  right: auto;
  bottom: 12px;
  width: min(360px, calc(100vw - 24px));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.playback-dock .timeline {
  position: static;
  display: grid;
  grid-template-columns: minmax(108px, 1fr) minmax(82px, 132px) 34px;
  grid-template-areas: "summary range play";
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 6px 7px 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 8, 8, 0.88);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  transform: none;
}

.playback-summary {
  grid-area: summary;
  display: grid;
  gap: 2px;
  min-width: 0;
}

.playback-summary strong {
  overflow: hidden;
  color: #f7f4ec;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playback-summary span {
  overflow: hidden;
  color: #b9c2ca;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playback-dock .time-label {
  display: inline;
  min-width: 0;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  text-align: left;
}

.playback-dock .timeline-range {
  grid-area: range;
  min-width: 0;
  height: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.36));
}

.playback-dock .timeline-range::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border-color: #080808;
  background: #f7f4ec;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.playback-dock .timeline-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-color: #080808;
  background: #f7f4ec;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.playback-dock .play-button {
  grid-area: play;
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #151515;
  color: #f7f4ec;
}

.playback-dock .play-button:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: #1d1d1d;
}

.playback-dock .play-button svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 760px) {
  .playback-dock {
    left: 10px;
    right: auto;
    bottom: 10px;
    width: min(338px, calc(100vw - 20px));
    transform: none;
  }

  .playback-dock .timeline {
    grid-template-columns: minmax(96px, 1fr) minmax(74px, 1fr) 34px;
    grid-template-areas: "summary range play";
  }
}

/* Final playback simplification: no bottom player, settings only in menu. */
.playback-scrub-control {
  display: grid;
  gap: 6px;
  color: #b9c2ca;
  font-size: 11px;
  font-weight: 850;
}

.playback-menu-controls .timeline-range {
  width: 100%;
  min-width: 0;
  height: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.36));
}

.playback-menu-controls .time-label {
  display: inline;
  min-width: 0;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.county-temp-label.is-estimate {
  border-style: dashed;
  opacity: 0.86;
}
.state-toggle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.state-toggle {
  display: grid;
  min-width: 0;
  cursor: pointer;
}

.state-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.state-toggle span {
  display: grid;
  min-height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background: #101010;
  color: #b9c2ca;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.state-toggle input:checked + span {
  border-color: rgba(60, 160, 255, 0.62);
  background: rgba(24, 88, 148, 0.54);
  color: #f7fbff;
}

.state-toggle input:focus-visible + span {
  outline: 2px solid rgba(82, 170, 255, 0.72);
  outline-offset: 2px;
}
.alert-notice.is-clickable {
  cursor: pointer;
}

.alert-notice.is-clickable:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.auth-gate {
  position: absolute;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #080808;
  color: #f6f7f8;
}

.auth-gate.is-hidden {
  display: none;
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(66, 161, 255, 0.34);
  border-radius: 8px;
  background: #080808;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
}

.auth-kicker {
  color: #5bb4ff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: -4px 0 0;
  color: #ffffff;
  font-size: 27px;
  line-height: 1.05;
  letter-spacing: 0;
}

.auth-copy,
.auth-disclaimer {
  margin: 0;
  color: #b9c2ca;
  font-size: 13px;
  line-height: 1.45;
}

.auth-disclaimer {
  color: #8d99a6;
  font-size: 11px;
}

.auth-gate-form {
  gap: 8px;
}

body.auth-locked .top-actions,
body.auth-locked .control-panel,
body.auth-locked .legend,
body.auth-locked .spc-risk-card,
body.auth-locked .filter-badge,
body.auth-locked .alert-notice,
body.auth-locked .status-toast {
  display: none;
}
