:root {
  color-scheme: light;
  --bg: #dfeaf3;
  --bg-accent: #f7fbff;
  --panel: rgba(247, 251, 255, 0.76);
  --panel-strong: rgba(252, 254, 255, 0.9);
  --surface: rgba(248, 252, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --line: rgba(33, 73, 109, 0.12);
  --line-strong: rgba(33, 73, 109, 0.18);
  --text: #10283f;
  --muted: #5f7a92;
  --muted-strong: #44627d;
  --shadow: 0 24px 70px rgba(15, 39, 64, 0.18);
  --shadow-soft: 0 14px 38px rgba(15, 39, 64, 0.13);
  --blue: #3e7fbb;
  --deep-blue: #1f4f7d;
  --cyan: #72c1d8;
  --teal: #6ac5c0;
  --green: #7eb765;
  --yellow: #edc867;
  --orange: #eb9051;
  --red: #d86153;
  --violet: #6a67c7;
  --heading-font: "Sora", "Manrope", sans-serif;
  --body-font: "Manrope", "Avenir Next", "Helvetica Neue", sans-serif;
  --panel-blur: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html,
body,
#app,
#map-shell,
#map {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--body-font);
  background:
    radial-gradient(circle at top left, rgba(145, 205, 239, 0.52), transparent 34%),
    radial-gradient(circle at top right, rgba(255, 220, 174, 0.58), transparent 26%),
    linear-gradient(180deg, #edf6fc 0%, #dbe8f1 100%);
  color: var(--text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

.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;
}

.material-symbols-rounded {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Material Symbols Rounded";
  font-style: normal;
  font-weight: 400;
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

#map-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.62), transparent 32%),
    linear-gradient(180deg, #dbe8f1 0%, #d2e0eb 100%);
}

#temp-overlay,
#wind-overlay,
#station-overlay,
#ui-shell,
.topbar,
.controls,
.inspector,
.banner {
  position: absolute;
}

#temp-overlay,
#wind-overlay,
#station-overlay {
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#temp-overlay {
  z-index: 4;
}

#wind-overlay {
  z-index: 5;
}

#station-overlay {
  z-index: 6;
}

#ui-shell {
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

#ui-shell::before,
#ui-shell::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}

#ui-shell::before {
  top: 0;
  height: 220px;
  background: linear-gradient(180deg, rgba(12, 27, 41, 0.24), rgba(12, 27, 41, 0));
}

#ui-shell::after {
  bottom: 0;
  height: 170px;
  background: linear-gradient(0deg, rgba(12, 27, 41, 0.18), rgba(12, 27, 41, 0));
}

.panel,
.maplibregl-popup-content {
  background: linear-gradient(180deg, var(--panel-strong), var(--panel));
  backdrop-filter: blur(var(--panel-blur)) saturate(1.08);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.topbar,
.controls,
.inspector,
.banner,
.maplibregl-popup-content {
  pointer-events: auto;
}

.topbar,
.controls,
.inspector,
.banner {
  z-index: 1;
}

.topbar {
  top: calc(20px + var(--safe-top));
  left: calc(20px + var(--safe-left));
  width: min(940px, calc(100% - 40px - var(--safe-left) - var(--safe-right)));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px 20px;
  border-radius: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: clamp(48px, 4vw, 58px);
  height: clamp(48px, 4vw, 58px);
  flex: 0 0 auto;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 246, 251, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  padding: 6px;
  overflow: hidden;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
.controls-title,
.station-popup h3,
.band-card h3 {
  font-family: var(--heading-font);
  letter-spacing: -0.03em;
}

h1,
h2 {
  margin: 0;
}

.brand h1 {
  margin-top: 4px;
  font-size: clamp(1.05rem, 1rem + 0.38vw, 1.32rem);
  line-height: 1.15;
}

.brand-subtitle {
  margin: 8px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.48;
}

.topbar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(19, 45, 70, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: var(--deep-blue);
  font-size: 0.82rem;
  font-weight: 800;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #33d17a, #1ea95c);
  box-shadow: 0 0 0 5px rgba(42, 192, 109, 0.14);
  animation: live-pulse 2.4s ease-in-out infinite;
}

.snapshot-meta {
  max-width: 340px;
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.45;
}

.controls {
  top: calc(118px + var(--safe-top));
  left: calc(20px + var(--safe-left));
  width: 344px;
  padding: 18px;
  overflow: visible;
  border-radius: 28px;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
  will-change: transform;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.controls.is-collapsed {
  transform: translateX(calc(-100% + 22px));
}

.controls-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.controls-head-copy {
  min-width: 0;
}

.controls-title {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.controls-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.controls-body {
  display: grid;
  gap: 14px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.controls-tab {
  position: absolute;
  top: 16px;
  right: -18px;
  width: 28px;
  min-height: 140px;
  padding: 0;
  border: 0;
  border-radius: 0 18px 18px 0;
  appearance: none;
  background: transparent;
  color: transparent;
  box-shadow: none;
  z-index: 2;
}

.controls-tab:focus-visible,
.controls-pin:focus-visible,
.icon-button:focus-visible,
.segmented button:focus-visible,
.ghost-button:focus-visible,
.toggle-pill:focus-within,
.popup-actions button:focus-visible {
  outline: 2px solid rgba(62, 127, 187, 0.26);
  outline-offset: 3px;
}

.controls-pin {
  flex: 0 0 auto;
}

.controls-pin .material-symbols-rounded {
  font-size: 1.16rem;
  transition: transform 0.16s ease, font-variation-settings 0.16s ease;
}

.controls-pin.is-active .material-symbols-rounded {
  font-variation-settings: "FILL" 1;
  transform: rotate(-18deg) scale(1.04);
}

.controls.is-collapsed .controls-head-copy,
.controls.is-collapsed .controls-pin,
.controls.is-collapsed .controls-body {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-16px);
}

.control-group,
.legend-card,
.coverage-note,
.inspector-summary,
.band-card {
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.control-label,
.legend-head,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.control-label,
.legend-head {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

button,
input,
label {
  font: inherit;
}

.segmented button,
.ghost-button,
.toggle-pill,
.icon-button,
.popup-actions button {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    opacity 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.segmented button,
.ghost-button,
.toggle-pill,
.icon-button {
  color: var(--deep-blue);
  background: rgba(226, 237, 246, 0.9);
  border-color: rgba(54, 101, 142, 0.08);
}

.segmented button:hover,
.ghost-button:hover,
.toggle-pill:hover,
.icon-button:hover,
.popup-actions button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.segmented button,
.ghost-button {
  min-height: 50px;
  padding: 10px 12px;
  border-radius: 16px;
  font-weight: 800;
}

.segmented button.is-active,
.controls-pin.is-active,
.icon-toggle.is-active,
.popup-actions button {
  background: linear-gradient(135deg, rgba(54, 118, 180, 0.96), rgba(94, 198, 219, 0.96));
  color: white;
  border-color: rgba(54, 118, 180, 0.08);
}

.mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px;
}

.mode-button .material-symbols-rounded {
  font-size: 1.26rem;
  transition: transform 0.16s ease, font-variation-settings 0.16s ease;
}

.mode-button.is-active .material-symbols-rounded,
.icon-toggle.is-active .material-symbols-rounded,
.controls-pin.is-active .material-symbols-rounded {
  font-variation-settings: "FILL" 1;
}

.mode-icon-pair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.mode-icon-pair .material-symbols-rounded:last-child {
  font-size: 1.12rem;
}

.toggle-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.toggle-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px;
  border-radius: 16px;
  user-select: none;
}

.toggle-pill input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.icon-toggle .material-symbols-rounded,
.icon-button-large .material-symbols-rounded {
  font-size: 1.26rem;
}

.icon-button-large {
  min-width: 56px;
  min-height: 50px;
  padding: 10px;
}

.ghost-button.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.legend-card {
  overflow: hidden;
}

.temp-legend,
.wind-speed-legend {
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.temp-legend {
  background: linear-gradient(
    90deg,
    var(--violet) 0%,
    #4867cf 18%,
    var(--cyan) 34%,
    var(--green) 52%,
    var(--yellow) 68%,
    var(--orange) 84%,
    var(--red) 100%
  );
}

.wind-speed-legend {
  background: linear-gradient(
    90deg,
    rgb(31, 78, 133) 0%,
    rgb(47, 127, 175) 16%,
    rgb(52, 185, 198) 32%,
    rgb(92, 211, 149) 48%,
    rgb(212, 219, 86) 62%,
    rgb(244, 161, 60) 74%,
    rgb(235, 95, 64) 86%,
    rgb(193, 58, 84) 100%
  );
}

.legend-scale,
.wind-legend,
.metric-row,
.point-meta {
  display: flex;
  align-items: center;
}

.legend-scale,
.wind-legend {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.79rem;
}

.legend-scale {
  justify-content: space-between;
}

.wind-scale span::after {
  content: " m/s";
  opacity: 0.78;
}

.wind-legend {
  display: grid;
  grid-template-columns: 12px 1fr 12px 1fr;
  gap: 10px;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.swatch.base {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(75, 146, 211, 0.35);
}

.swatch.gusty {
  background: linear-gradient(135deg, #f6c269, #de5d4d);
}

.coverage-note,
.inspector-summary,
.metric-row,
.point-meta,
.band-card,
.station-popup p,
.popup-grid strong {
  color: var(--muted);
}

.coverage-note,
.inspector-summary,
.metric-row,
.point-meta,
.band-card {
  font-size: 0.88rem;
  line-height: 1.5;
}

.inspector {
  top: calc(118px + var(--safe-top));
  right: calc(20px + var(--safe-right));
  width: min(392px, calc(100% - 40px - var(--safe-left) - var(--safe-right)));
  max-height: calc(100% - 150px);
  padding: 18px;
  border-radius: 28px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.inspector.is-hidden,
.banner.is-hidden {
  display: none;
}

.panel-head {
  margin-bottom: 14px;
}

.panel-head h2 {
  margin-top: 4px;
  font-size: 1rem;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 1.2rem;
}

.inspector-content {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.point-meta {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.band-card h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--text);
}

.metric-row {
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.metric-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.metric-row strong {
  color: var(--text);
}

.list-block {
  margin-top: 12px;
}

.list-block h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--text);
}

.list-block ul {
  margin: 0;
  padding-left: 18px;
}

.list-block li + li {
  margin-top: 6px;
}

.banner {
  left: 50%;
  bottom: calc(20px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(720px, calc(100% - 40px - var(--safe-left) - var(--safe-right)));
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.95), rgba(242, 248, 252, 0.92));
  color: var(--deep-blue);
}

.maplibregl-ctrl-bottom-right {
  right: calc(20px + var(--safe-right)) !important;
  bottom: calc(20px + var(--safe-bottom)) !important;
}

.maplibregl-ctrl-top-right {
  top: calc(20px + var(--safe-top)) !important;
  right: calc(20px + var(--safe-right)) !important;
}

.maplibregl-ctrl-group {
  border-radius: 18px !important;
  overflow: hidden;
  background: rgba(251, 253, 255, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(18px) !important;
}

.maplibregl-ctrl-group button {
  width: 40px;
  height: 40px;
}

.maplibregl-ctrl button:not(:disabled):hover {
  background: rgba(225, 237, 246, 0.92) !important;
}

.maplibregl-popup {
  z-index: 12;
}

.maplibregl-popup-content {
  min-width: 270px;
  padding: 18px;
  border-radius: 24px;
}

.maplibregl-popup-close-button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--deep-blue);
}

.maplibregl-popup-close-button:hover {
  background: rgba(225, 237, 246, 0.92);
}

.station-popup h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  color: var(--text);
}

.station-popup p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.48;
}

.station-popup .station-meta {
  color: var(--muted);
}

.station-popup .station-summary {
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(228, 239, 247, 0.82);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.station-popup .station-alert {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 243, 221, 0.9);
  color: #8a5b21;
}

.station-popup .popup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.station-popup .popup-grid > div {
  padding: 10px 11px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(248, 252, 255, 0.84);
}

.station-popup .popup-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.station-popup .popup-grid span {
  color: var(--text);
  font-weight: 800;
}

.popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.popup-actions button {
  flex: 1;
  padding: 11px 12px;
  border-radius: 16px;
  font-weight: 800;
}

.maplibregl-canvas-container.maplibregl-interactive.inspecting {
  cursor: crosshair;
}

@keyframes live-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(42, 192, 109, 0.14);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 7px rgba(42, 192, 109, 0.08);
  }
}

@media (max-width: 1100px) {
  .topbar {
    width: calc(100% - 40px - var(--safe-left) - var(--safe-right));
  }
}

@media (pointer: coarse) {
  :root {
    --panel-blur: 12px;
    --shadow: 0 16px 42px rgba(15, 39, 64, 0.15);
    --shadow-soft: 0 10px 24px rgba(15, 39, 64, 0.1);
  }
}

@media (max-width: 980px) and (orientation: portrait) {
  #ui-shell::before {
    height: 180px;
  }

  .topbar {
    top: calc(12px + var(--safe-top));
    left: calc(12px + var(--safe-left));
    width: calc(100% - 24px - var(--safe-left) - var(--safe-right));
    padding: 16px;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    padding: 5px;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .brand-subtitle {
    font-size: 0.86rem;
  }

  .topbar-meta {
    align-items: flex-start;
    text-align: left;
  }

  .snapshot-meta {
    max-width: none;
  }

  .controls,
  .inspector {
    left: calc(12px + var(--safe-left));
    right: calc(12px + var(--safe-right));
    width: auto;
  }

  .controls {
    top: auto;
    bottom: calc(12px + var(--safe-bottom));
    max-height: min(52vh, 420px);
    overflow: auto;
  }

  .controls.is-collapsed {
    transform: translateY(calc(100% - 52px));
  }

  .controls-tab {
    top: -14px;
    right: 18px;
    width: 120px;
    min-height: 34px;
    border-radius: 18px 18px 0 0;
  }

  .controls.is-collapsed .controls-head-copy,
  .controls.is-collapsed .controls-pin,
  .controls.is-collapsed .controls-body {
    transform: translateY(12px);
  }

  .inspector {
    top: calc(104px + var(--safe-top));
    bottom: calc(12px + var(--safe-bottom));
    max-height: none;
  }

  .maplibregl-ctrl-top-right {
    top: calc(104px + var(--safe-top)) !important;
    right: calc(12px + var(--safe-right)) !important;
  }

  .banner {
    bottom: calc(92px + var(--safe-bottom));
    width: calc(100% - 24px - var(--safe-left) - var(--safe-right));
  }
}

@media (max-width: 980px) and (orientation: landscape) {
  #ui-shell::before {
    height: 112px;
  }

  .topbar {
    top: calc(10px + var(--safe-top));
    left: calc(10px + var(--safe-left));
    width: min(430px, calc(100% - 20px - var(--safe-left) - var(--safe-right)));
    padding: 12px 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .brand {
    align-items: center;
  }

  .brand-subtitle {
    display: none;
  }

  .topbar-meta {
    align-items: flex-end;
    text-align: right;
    gap: 8px;
  }

  .controls {
    top: calc(82px + var(--safe-top));
    bottom: calc(10px + var(--safe-bottom));
    left: calc(10px + var(--safe-left));
    width: min(318px, calc(48% - 14px));
    max-height: none;
    padding: 14px;
  }

  .controls.is-collapsed {
    transform: translateX(calc(-100% + 20px));
  }

  .controls-tab {
    top: 14px;
    right: -18px;
    width: 28px;
    min-height: 108px;
    border-radius: 0 18px 18px 0;
  }

  .controls.is-collapsed .controls-head-copy,
  .controls.is-collapsed .controls-pin,
  .controls.is-collapsed .controls-body {
    transform: translateX(-12px);
  }

  .inspector {
    top: calc(82px + var(--safe-top));
    right: calc(10px + var(--safe-right));
    bottom: calc(10px + var(--safe-bottom));
    left: auto;
    width: min(344px, calc(50% - 14px));
    max-height: none;
    padding: 14px;
  }

  .maplibregl-ctrl-bottom-right {
    right: calc(10px + var(--safe-right)) !important;
    bottom: calc(10px + var(--safe-bottom)) !important;
  }

  .banner {
    bottom: calc(10px + var(--safe-bottom));
    width: min(460px, calc(100% - 24px - var(--safe-left) - var(--safe-right)));
  }
}

@media (max-width: 640px) {
  .topbar,
  .controls,
  .inspector,
  .banner {
    border-radius: 22px;
  }

  .topbar {
    padding: 14px;
  }

  .brand {
    gap: 12px;
  }

  .brand-subtitle {
    display: none;
  }

  .controls,
  .inspector {
    padding: 14px;
  }

  .live-pill {
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .toggle-row {
    gap: 8px;
  }

  .segmented {
    gap: 8px;
  }

  .control-group,
  .legend-card,
  .coverage-note,
  .inspector-summary,
  .band-card {
    padding: 12px;
    border-radius: 18px;
  }

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

  .legend-scale,
  .wind-legend {
    font-size: 0.74rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
