:root {
  color-scheme: dark;
  --ink: #05090b;
  --ink-deep: #020405;
  --surface: #091014;
  --surface-high: #10191d;
  --surface-soft: rgba(13, 23, 27, 0.92);
  --line: rgba(207, 231, 227, 0.14);
  --line-strong: rgba(207, 231, 227, 0.3);
  --text: #f1f8f6;
  --muted: #98aaa7;
  --muted-2: #6d807d;
  --aqua: #32d5c4;
  --storm: #ff563f;
  --storm-soft: #ff8a73;
  --amber: #ffc552;
  --rain: #43a6ff;
  --pressure: #a887ff;
  --success: #58d68d;
  --danger: #ff725e;
  --font-display: "Barlow Condensed", "Arial Narrow", "PingFang SC", "Yu Gothic UI", "Malgun Gothic", sans-serif;
  --font-body: "Manrope", "PingFang SC", "Hiragino Sans GB", "Yu Gothic", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", "Cascadia Mono", Consolas, monospace;
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-move: cubic-bezier(0.25, 1, 0.5, 1);
  --z-map: 0;
  --z-map-ui: 500;
  --z-header: 700;
  --z-skip: 1000;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--ink);
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(166, 197, 191, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 197, 191, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(50, 213, 196, 0.16);
}

button {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: var(--z-skip);
  padding: 0.7rem 0.9rem;
  border-radius: 3px;
  background: var(--amber);
  color: #1a1200;
  font-weight: 700;
  transform: translateY(-5rem);
  transition: transform 160ms var(--ease-enter);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.screen-shell {
  min-height: 100dvh;
  padding:
    max(0.8rem, env(safe-area-inset-top))
    max(0.8rem, env(safe-area-inset-right))
    max(0.8rem, env(safe-area-inset-bottom))
    max(0.8rem, env(safe-area-inset-left));
}

.topbar {
  position: relative;
  z-index: var(--z-header);
  display: grid;
  grid-template-columns: minmax(20rem, 0.95fr) minmax(24rem, 1.35fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 5.6rem;
  padding: 0 0.25rem 0.85rem;
  border-bottom: 1px solid var(--line-strong);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  width: clamp(6rem, 18vw, 16rem);
  height: 2px;
  background: var(--storm);
}

.brand-lockup {
  display: flex;
  min-width: 0;
  gap: 0.9rem;
  align-items: center;
}

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

.storm-mark {
  position: relative;
  width: 3.45rem;
  height: 3.45rem;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 86, 63, 0.58);
  border-radius: 50%;
  background: #091014;
  box-shadow: inset 0 0 0 6px rgba(255, 86, 63, 0.05), 0 0 24px rgba(255, 86, 63, 0.18);
}

.storm-mark::before,
.storm-mark::after,
.storm-mark span {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.storm-mark::before {
  inset: 0.42rem;
  border: 2px solid transparent;
  border-top-color: var(--storm);
  border-left-color: var(--amber);
  animation: vortex-spin 5.8s linear infinite;
}

.storm-mark::after {
  inset: 0.86rem;
  border: 2px solid transparent;
  border-right-color: var(--aqua);
  border-bottom-color: var(--rain);
  animation: vortex-spin 3.8s linear infinite reverse;
}

.storm-mark span {
  inset: 1.37rem;
  background: var(--storm);
  box-shadow: 0 0 14px rgba(255, 86, 63, 0.9);
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  display: flex;
  gap: 0.42rem;
  align-items: baseline;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4vw, 4.15rem);
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  white-space: nowrap;
}

h1 .latin-name {
  color: var(--muted-2);
  font-size: 0.46em;
  font-weight: 600;
}

h1 sup {
  color: var(--storm-soft);
  font-family: var(--font-mono);
  font-size: 0.26em;
  font-weight: 600;
  vertical-align: top;
}

h2 {
  margin-top: 0.13rem;
  font-size: 1rem;
  font-weight: 700;
}

.brand-meta {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.32rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  font-size: 0.64rem;
}

.brand-meta span + span::before {
  content: "/";
  margin-right: 0.65rem;
  color: rgba(255, 255, 255, 0.18);
}

.live-brief {
  min-width: 0;
  padding: 0.72rem 0.9rem;
  border-left: 2px solid var(--storm);
  background: rgba(255, 86, 63, 0.055);
}

.brief-label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--storm-soft);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 600;
  text-transform: uppercase;
}

.data-age {
  margin-left: auto;
  color: var(--muted-2);
}

.live-dot {
  width: 0.48rem;
  height: 0.48rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--storm);
  box-shadow: 0 0 0 0 rgba(255, 86, 63, 0.82);
  animation: live-pulse 1.8s linear infinite;
}

.live-brief p {
  margin: 0.32rem 0 0;
  color: #e8f1ef;
  font-size: 0.86rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.command-deck {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: flex-end;
}

.locale-switch {
  display: grid;
  grid-template-columns: repeat(4, 2.55rem);
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  background: var(--ink-deep);
}

.locale-switch button,
.command-button,
.layer-buttons button,
.table-toggle {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    transform 120ms var(--ease-enter);
}

.locale-switch button {
  min-width: 2.55rem;
  padding: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.locale-switch button[aria-pressed="true"] {
  background: var(--text);
  color: var(--ink);
}

.command-button {
  display: inline-flex;
  gap: 0.42rem;
  align-items: center;
  justify-content: center;
  min-width: 4.8rem;
  padding: 0 0.78rem;
  border-color: var(--line-strong);
  background: rgba(9, 16, 20, 0.88);
  font-size: 0.76rem;
  font-weight: 600;
}

.command-button svg,
.layer-buttons svg,
.place-name-status svg,
.hero-readout-label svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 1.7;
}

.command-button.signal {
  border-color: rgba(255, 86, 63, 0.5);
  background: var(--storm);
  color: #fff;
}

.command-button.is-loading svg {
  animation: spin-clockwise 0.8s linear infinite;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(18rem, 0.9fr) minmax(35rem, 1.85fr) minmax(18rem, 0.95fr);
  grid-template-rows: minmax(34rem, 62vh) minmax(15rem, 25vh);
  gap: 0.7rem;
  min-height: calc(100dvh - 7.35rem);
  padding-top: 0.7rem;
}

.data-rail,
.chart-panel,
.map-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface-soft);
}

.data-rail,
.chart-panel {
  position: relative;
  padding: 0.95rem;
}

.data-rail::before,
.chart-panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 3.25rem;
  height: 2px;
  background: var(--aqua);
}

.event-panel::before {
  background: var(--storm);
}

.coverage-chart-panel::before {
  background: var(--amber);
}

.rain-chart-panel::before {
  background: var(--rain);
}

.section-heading,
.map-toolbar {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  justify-content: space-between;
}

.section-heading {
  margin-bottom: 0.8rem;
}

.section-heading.compact {
  margin-bottom: 0.25rem;
}

.status-chip {
  flex: 0 0 auto;
  padding: 0.24rem 0.48rem;
  border: 1px solid rgba(88, 214, 141, 0.36);
  border-radius: 999px;
  background: rgba(88, 214, 141, 0.08);
  color: #bff5d4;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 600;
}

.status-chip.warning,
.status-chip.hot {
  border-color: rgba(255, 86, 63, 0.42);
  background: rgba(255, 86, 63, 0.1);
  color: #ffc0b5;
}

.event-panel,
.metric-panel {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(152, 170, 167, 0.34) transparent;
  scrollbar-width: thin;
}

.latest-bulletin {
  position: relative;
  min-height: 8.4rem;
  margin: 0 0 0.8rem;
  padding: 0.9rem 0.9rem 0.9rem 1rem;
  border: 1px solid rgba(255, 86, 63, 0.25);
  border-left-width: 3px;
  background: rgba(255, 86, 63, 0.055);
}

.latest-bulletin::after {
  content: "LIVE";
  position: absolute;
  top: 0.65rem;
  right: 0.7rem;
  color: rgba(255, 138, 115, 0.55);
  font-family: var(--font-mono);
  font-size: 0.56rem;
}

.latest-bulletin time,
.event-item time {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.latest-bulletin strong {
  display: block;
  margin: 0.42rem 2.4rem 0.3rem 0;
  font-size: 1rem;
  line-height: 1.35;
}

.latest-bulletin p,
.event-item p {
  margin: 0;
  color: #cbd8d5;
  font-size: 0.78rem;
  line-height: 1.58;
  text-wrap: pretty;
}

.muted {
  color: var(--muted);
}

.event-feed {
  display: grid;
}

.event-item {
  position: relative;
  padding: 0.72rem 0 0.76rem 1rem;
  border-top: 1px solid var(--line);
}

.event-item::before {
  content: "";
  position: absolute;
  top: 1.02rem;
  left: -0.17rem;
  width: 0.44rem;
  height: 0.44rem;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 1px rgba(50, 213, 196, 0.28);
}

.event-item[data-type="official"]::before,
.event-item[data-type="position"]::before {
  background: var(--storm);
  box-shadow: 0 0 0 1px rgba(255, 86, 63, 0.28);
}

.event-item h3 {
  margin: 0.12rem 0 0.22rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.map-section {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
}

.map-section::before,
.map-section::after {
  content: "";
  position: absolute;
  z-index: calc(var(--z-map-ui) + 2);
  pointer-events: none;
}

.map-section::before {
  top: 0;
  right: 0;
  width: 5rem;
  height: 2px;
  background: var(--storm);
}

.map-section::after {
  right: 0;
  bottom: 0;
  width: 2px;
  height: 5rem;
  background: var(--aqua);
}

.map-toolbar {
  position: relative;
  z-index: calc(var(--z-map-ui) + 1);
  align-items: center;
  padding: 0.82rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 9, 11, 0.92);
}

.map-title-group {
  min-width: 13rem;
}

.place-name-status {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.35rem;
  color: var(--muted-2);
  font-size: 0.62rem;
}

.layer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  justify-content: flex-end;
}

.layer-buttons button {
  display: inline-flex;
  gap: 0.34rem;
  align-items: center;
  justify-content: center;
  min-width: 4.55rem;
  padding: 0 0.56rem;
  border-color: var(--line);
  background: rgba(16, 25, 29, 0.74);
  font-size: 0.68rem;
}

.layer-buttons button[aria-pressed="true"] {
  border-color: rgba(50, 213, 196, 0.52);
  background: rgba(50, 213, 196, 0.12);
  color: var(--text);
}

.map-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.map {
  position: absolute;
  inset: 0;
  z-index: var(--z-map);
  min-height: 100%;
  background: #071114;
}

.map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: calc(var(--z-map-ui) - 2);
  border: 12px solid transparent;
  border-top-color: rgba(50, 213, 196, 0.1);
  pointer-events: none;
}

.map-fix {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  z-index: var(--z-map-ui);
  display: grid;
  min-width: 9.7rem;
  padding: 0.55rem 0.68rem;
  border-left: 2px solid var(--aqua);
  background: rgba(5, 9, 11, 0.78);
  backdrop-filter: blur(9px);
}

.map-fix span,
.map-fix small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.56rem;
}

.map-fix strong {
  margin: 0.08rem 0;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.map-coordinate-rule {
  position: absolute;
  top: 0.5rem;
  right: 4.4rem;
  z-index: var(--z-map-ui);
  display: flex;
  gap: 1.6rem;
  color: rgba(232, 246, 243, 0.52);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  pointer-events: none;
}

.map-coordinate-rule span::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.55rem;
  margin-right: 0.25rem;
  background: rgba(232, 246, 243, 0.3);
  vertical-align: middle;
}

.leaflet-container {
  font-family: var(--font-body);
  background: #071114;
}

.leaflet-control-attribution {
  background: rgba(5, 9, 11, 0.8) !important;
  color: var(--muted) !important;
  font-size: 0.58rem !important;
}

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

.leaflet-bar {
  border: 1px solid var(--line-strong) !important;
  border-radius: 2px !important;
  box-shadow: none !important;
}

.leaflet-bar a {
  border-color: var(--line) !important;
  background: rgba(5, 9, 11, 0.88) !important;
  color: var(--text) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(5, 9, 11, 0.96);
  color: var(--text);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
}

.leaflet-popup-content {
  line-height: 1.55;
}

.map-legend {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  left: 0.8rem;
  z-index: var(--z-map-ui);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.8rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  background: rgba(5, 9, 11, 0.8);
  color: #dce8e6;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  backdrop-filter: blur(9px);
}

.map-legend > span {
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.map-legend b {
  font-weight: 500;
}

.legend-line,
.legend-dot,
.legend-rotor {
  display: inline-block;
  flex: 0 0 auto;
}

.legend-line {
  width: 1.25rem;
  height: 0;
  border-top: 2px solid var(--aqua);
}

.legend-line.forecast {
  border-top: 2px dashed var(--amber);
}

.legend-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.legend-dot.wind7 {
  background: var(--storm);
}

.legend-dot.motion {
  background: var(--amber);
  box-shadow: 0 0 0 2px rgba(255, 197, 82, 0.16);
}

.legend-dot.rain {
  background: var(--rain);
}

.legend-dot.pressure {
  background: var(--pressure);
  box-shadow: 0 0 0 2px rgba(168, 135, 255, 0.16);
}

.legend-rotor {
  width: 0.68rem;
  height: 0.68rem;
  border: 2px solid transparent;
  border-top-color: var(--storm);
  border-left-color: var(--aqua);
  border-radius: 50%;
  animation: vortex-spin 3.2s linear infinite;
}

.rain-scale {
  margin-left: auto;
  color: var(--muted);
}

.rain-scale i {
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.28rem;
  border-radius: 1px;
}

.hero-readout {
  margin-bottom: 0.7rem;
  padding: 0.8rem 0 0.7rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-readout-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.68rem;
}

.hero-readout-label svg {
  color: var(--storm-soft);
}

.hero-value {
  display: flex;
  gap: 0.45rem;
  align-items: baseline;
  margin: 0.16rem 0 0.55rem;
}

.hero-value strong {
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 5.1vw, 5.8rem);
  font-weight: 600;
  line-height: 0.82;
}

.hero-value span {
  color: var(--storm-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.intensity-scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}

.intensity-scale i {
  height: 3px;
  background: #5d786f;
}

.intensity-scale i:nth-child(2) { background: var(--success); }
.intensity-scale i:nth-child(3) { background: var(--amber); }
.intensity-scale i:nth-child(4) { background: #ff9856; }
.intensity-scale i:nth-child(5) { background: var(--storm); }
.intensity-scale i:nth-child(6) { background: var(--pressure); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.readout {
  min-width: 0;
  min-height: 5.2rem;
  padding: 0.65rem 0.45rem 0.65rem 0;
}

.readout + .readout {
  padding-left: 0.6rem;
  border-left: 1px solid var(--line);
}

.readout .label,
.readout .unit {
  display: block;
  color: var(--muted);
  font-size: 0.61rem;
}

.readout strong {
  display: block;
  min-width: 0;
  margin: 0.22rem 0 0.08rem;
  color: #fff;
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 1.9vw, 2rem);
  font-weight: 500;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.readout .unit {
  color: var(--muted-2);
  font-family: var(--font-mono);
}

.position-strip {
  display: grid;
  gap: 0.5rem;
  margin: 0.72rem 0 0;
  padding: 0 0 0.72rem;
  border-bottom: 1px solid var(--line);
}

.position-strip div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: baseline;
}

.position-strip dt,
.position-strip dd {
  margin: 0;
}

.position-strip dt {
  color: var(--muted);
  font-size: 0.64rem;
}

.position-strip dd {
  color: #f3ead1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.wind-table-wrap {
  margin-top: 0.72rem;
}

.micro-heading {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.micro-heading span:last-child {
  color: var(--amber);
  text-align: right;
}

.wind-circle-list {
  display: grid;
}

.wind-circle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}

.wind-ring {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 10px rgba(50, 213, 196, 0.45);
}

.wind-circle:nth-child(1) .wind-ring {
  background: var(--storm);
  box-shadow: 0 0 10px rgba(255, 86, 63, 0.45);
}

.wind-circle:nth-child(2) .wind-ring {
  background: var(--amber);
}

.wind-circle:nth-child(3) .wind-ring {
  background: var(--rain);
}

.wind-circle strong,
.wind-circle span {
  display: block;
}

.wind-circle strong {
  font-size: 0.72rem;
}

.wind-circle span {
  color: var(--muted);
  font-size: 0.58rem;
}

.wind-circle code {
  color: #e9f4f2;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-align: right;
}

.source-list {
  display: grid;
  margin-top: 0.65rem;
}

.source-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.36rem 0;
  border-top: 1px solid rgba(207, 231, 227, 0.08);
}

.source-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 0.6rem;
}

.source-row strong {
  flex: 0 0 auto;
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.source-row[data-ok="false"] strong {
  color: var(--danger);
}

.chart-panel {
  min-height: 0;
  overflow: hidden;
}

.chart {
  width: 100%;
  height: calc(100% - 2.4rem);
  min-height: 11.8rem;
}

.table-toggle {
  min-width: 4.3rem;
  padding: 0 0.68rem;
  border-color: var(--line);
  background: transparent;
  font-size: 0.68rem;
}

.track-table {
  max-height: calc(100% - 2.5rem);
  overflow: auto;
  scrollbar-color: rgba(152, 170, 167, 0.34) transparent;
  scrollbar-width: thin;
}

.track-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.68rem;
}

.track-table th,
.track-table td {
  padding: 0.42rem 0.46rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.track-table th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}

.track-table td {
  color: #dbe8e5;
  font-family: var(--font-mono);
}

.vortex-div-icon,
.wind-vector-icon,
.track-runner-icon,
.pressure-core-icon,
.pressure-label-icon {
  border: 0;
  background: transparent;
}

.pressure-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 2px solid rgba(168, 135, 255, 0.82);
  border-radius: 50%;
  background: rgba(5, 9, 11, 0.82);
  box-shadow: 0 0 28px rgba(168, 135, 255, 0.42), inset 0 0 18px rgba(168, 135, 255, 0.16);
}

.pressure-core::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 1px solid rgba(168, 135, 255, 0.42);
  border-radius: 50%;
  animation: pressure-pulse 1.9s var(--ease-enter) infinite;
}

.pressure-core strong,
.pressure-core em {
  font-family: var(--font-mono);
}

.pressure-core strong {
  color: #fff;
  font-size: 1.02rem;
  line-height: 1;
}

.pressure-core em {
  margin-top: -0.58rem;
  color: #dfd2ff;
  font-size: 0.58rem;
  font-style: normal;
}

.pressure-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.2rem;
  padding: 0.1rem 0.3rem;
  border: 1px solid rgba(168, 135, 255, 0.5);
  border-radius: 999px;
  background: rgba(5, 9, 11, 0.78);
  color: #ede7ff;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  box-shadow: 0 0 12px rgba(168, 135, 255, 0.22);
  backdrop-filter: blur(8px);
}

.vortex-marker {
  position: relative;
  width: 132px;
  height: 132px;
  pointer-events: auto;
  transform: translateZ(0);
}

.vortex-spinner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  animation: vortex-spin var(--vortex-speed, 8s) linear infinite;
  transform-origin: center;
}

.vortex-spinner span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 18px;
  border-top: 3px solid rgba(255, 86, 63, 0.92);
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(255, 86, 63, 0.42));
  transform-origin: 0 50%;
}

.vortex-spinner span:nth-child(1) { transform: rotate(18deg) translateX(14px); }
.vortex-spinner span:nth-child(2) { border-top-color: rgba(50, 213, 196, 0.92); transform: rotate(138deg) translateX(14px); }
.vortex-spinner span:nth-child(3) { border-top-color: rgba(255, 197, 82, 0.9); transform: rotate(258deg) translateX(14px); }

.vortex-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: var(--storm);
  box-shadow: 0 0 26px rgba(255, 86, 63, 0.72);
  transform: translate(-50%, -50%);
}

.vortex-core::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(255, 86, 63, 0.42);
  border-radius: 50%;
  animation: vortex-core-pulse 1.7s var(--ease-enter) infinite;
}

.vortex-label {
  position: absolute;
  bottom: -6px;
  left: 50%;
  min-width: 6.3rem;
  padding: 0.2rem 0.38rem;
  border: 1px solid rgba(255, 197, 82, 0.4);
  border-radius: 999px;
  background: rgba(5, 9, 11, 0.82);
  color: #fff0c7;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.wind-vector {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  animation: wind-vector-pulse 1.45s var(--ease-enter) infinite;
  animation-delay: var(--delay, 0s);
  transform: rotate(var(--angle));
}

.wind-vector::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 15px;
  width: 3px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(50, 213, 196, 0.18));
  box-shadow: 0 0 9px rgba(50, 213, 196, 0.54);
}

.wind-vector::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10px;
  border-right: 6px solid transparent;
  border-bottom: 9px solid #effffb;
  border-left: 6px solid transparent;
  filter: drop-shadow(0 0 5px rgba(50, 213, 196, 0.7));
}

.track-runner {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, var(--amber) 19% 42%, transparent 44%);
  box-shadow: 0 0 16px rgba(255, 197, 82, 0.8);
}

.track-runner::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid rgba(255, 197, 82, 0.58);
  border-radius: 50%;
  animation: track-runner-pulse 1.2s var(--ease-enter) infinite;
}

.motion-paused .legend-rotor,
.motion-paused .vortex-spinner,
.motion-paused .vortex-core::after,
.motion-paused .wind-vector,
.motion-paused .pressure-core::after,
.motion-paused .track-runner::after {
  animation-play-state: paused;
}

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

@media (hover: hover) and (pointer: fine) {
  .locale-switch button:hover,
  .command-button:hover,
  .layer-buttons button:hover,
  .table-toggle:hover {
    border-color: var(--amber);
    color: var(--text);
  }
}

.locale-switch button:active,
.command-button:active,
.layer-buttons button:active,
.table-toggle:active {
  transform: scale(0.97);
}

@keyframes live-pulse {
  70% { box-shadow: 0 0 0 0.45rem rgba(255, 86, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 86, 63, 0); }
}

@keyframes vortex-spin {
  to { transform: rotate(-360deg); }
}

@keyframes spin-clockwise {
  to { transform: rotate(360deg); }
}

@keyframes vortex-core-pulse {
  0% { opacity: 0.78; transform: scale(0.88); }
  50% { opacity: 0.08; transform: scale(1.65); }
  100% { opacity: 0; transform: scale(1.85); }
}

@keyframes wind-vector-pulse {
  0%, 100% { opacity: 0.36; scale: 0.9; }
  45% { opacity: 1; scale: 1.06; }
}

@keyframes track-runner-pulse {
  0% { opacity: 0.8; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.75); }
}

@keyframes pressure-pulse {
  0% { opacity: 0.7; transform: scale(0.86); }
  100% { opacity: 0; transform: scale(1.45); }
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: minmax(19rem, 1fr) auto;
  }

  .live-brief {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .dashboard {
    grid-template-columns: minmax(18rem, 0.72fr) minmax(34rem, 1.45fr);
    grid-template-rows: minmax(29rem, 53vh) auto auto auto;
  }

  .map-section {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .metric-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .intensity-chart-panel {
    grid-column: 1 / -1;
  }

  .coverage-chart-panel {
    grid-column: 1;
  }

  .rain-chart-panel {
    grid-column: 2;
  }
}

@media (max-width: 920px) {
  .screen-shell {
    padding:
      max(0.65rem, env(safe-area-inset-top))
      max(0.65rem, env(safe-area-inset-right))
      max(0.8rem, env(safe-area-inset-bottom))
      max(0.65rem, env(safe-area-inset-left));
  }

  .topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

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

  .command-deck {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .locale-switch {
    grid-template-columns: repeat(4, minmax(2.5rem, 1fr));
  }

  .dashboard {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .map-section { order: 1; min-height: 74dvh; }
  .metric-panel { order: 2; }
  .event-panel { order: 3; }
  .intensity-chart-panel { order: 4; }
  .coverage-chart-panel { order: 5; }
  .rain-chart-panel { order: 6; }

  .map-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .layer-buttons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .layer-buttons button {
    min-width: 0;
  }

  .map-stage {
    display: grid;
    grid-template-rows: minmax(56dvh, 1fr) auto;
    overflow: visible;
  }

  .map {
    position: relative;
    inset: auto;
    min-height: 56dvh;
  }

  .map-legend {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    border-width: 1px 0 0;
    background: rgba(5, 9, 11, 0.96);
  }

  .chart {
    height: 16rem;
  }
}

@media (max-width: 560px) {
  .screen-shell {
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
  }

  .topbar {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .storm-mark {
    width: 2.8rem;
    height: 2.8rem;
  }

  .storm-mark span {
    inset: 1.08rem;
  }

  h1 {
    font-size: clamp(2.25rem, 13vw, 3.4rem);
  }

  .brand-meta {
    gap: 0.4rem;
    font-size: 0.58rem;
  }

  .brand-meta span + span::before {
    margin-right: 0.4rem;
  }

  .command-deck {
    grid-template-columns: 1fr 1fr;
  }

  .locale-switch {
    grid-column: 1 / -1;
  }

  .command-button {
    width: 100%;
  }

  .dashboard {
    gap: 0.55rem;
    padding-top: 0.55rem;
  }

  .data-rail,
  .chart-panel {
    padding: 0.82rem 0.75rem;
  }

  .data-rail,
  .chart-panel,
  .map-section {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .map-toolbar {
    padding: 0.8rem 0.75rem;
  }

  .layer-buttons {
    gap: 0.3rem;
  }

  .layer-buttons button {
    padding: 0 0.3rem;
    font-size: 0.64rem;
  }

  .map-fix {
    top: 0.55rem;
    left: 0.55rem;
  }

  .map-coordinate-rule {
    display: none;
  }

  .map-legend {
    gap: 0.52rem 0.68rem;
    padding: 0.62rem 0.7rem;
  }

  .rain-scale {
    width: 100%;
    margin-left: 0;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .readout strong {
    font-size: 1.2rem;
  }

  .readout .label,
  .readout .unit {
    font-size: 0.56rem;
  }

  .wind-circle {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .wind-circle code {
    grid-column: 2;
    text-align: left;
  }
}

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

  .storm-mark::before,
  .storm-mark::after,
  .live-dot,
  .legend-rotor,
  .vortex-spinner,
  .vortex-core::after,
  .wind-vector,
  .pressure-core::after,
  .track-runner::after {
    animation: none !important;
  }
}
