:root {
  color-scheme: light;
  --ink: #183632;
  --muted: #526964;
  --line: #d1dfd8;
  --paper: #edf3ef;
  --surface: #fbfdf9;
  --mint: #98efca;
  --dark: #0d2625;
  --sans: "Instrument Sans", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { background: transparent; border: 0; }
button:disabled { cursor: default; opacity: .53; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #aa681c;
  outline-offset: 3px;
}
h1, h2, p { margin: 0; }
small { font-size: .77rem; }
.shell { width: min(1380px, calc(100% - 64px)); margin: auto; }
.station-nav { color: #e5f1eb; background: var(--dark); }
.station-nav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 12px; }
.station-brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 730; letter-spacing: .14em; font-size: 1.03rem; }
.station-nav nav { display: flex; align-items: stretch; align-self: stretch; gap: 24px; }
.station-nav nav a { display: grid; align-items: center; padding: 0 8px; border-bottom: 2px solid transparent; color: #b4cbc2; font-size: .88rem; white-space: nowrap; }
.station-nav nav a:hover, .station-nav nav a[aria-current] { color: #effcf3; }
.station-nav nav a[aria-current] { border-color: #82cead; }
.station-main { padding: 28px 0 54px; }
.station-intro { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.station-intro h1 { font-weight: 750; font-size: clamp(2rem, 4.1vw, 3.05rem); letter-spacing: -.05em; line-height: 1.12; }
.station-intro p { color: var(--muted); margin-top: 7px; font-size: .94rem; }
.station-actions { display: flex; gap: 8px; flex: none; }
.solid, .outline { display: inline-block; border: 1px solid transparent; padding: 7px 14px; min-height: 36px; border-radius: 7px; font-size: .82rem; white-space: nowrap; font-weight: 650; }
.solid { background: #184d3d; color: #fafffb; }
.solid:hover { background: #246952; }
.outline { border-color: #bbcec2; background: #f7fcf7; }
.outline:hover { border-color: #477d69; }
.station-status { min-height: 22px; margin: 3px 0 12px; color: var(--muted); }
.station-status:empty { display: none; }
.storm-strip { display: flex; align-items: stretch; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.storm-name, .storm-metric { min-width: 0; padding: 11px 19px 12px; border-right: 1px solid var(--line); flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: center; align-items: baseline; gap: 0 8px; }
.storm-name { grid-column: 1; }
.storm-metric:last-of-type { border: 0; }
.storm-strip small { grid-column: 1 / -1; color: var(--muted); }
.storm-strip strong { font-size: .98rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.storm-metric strong { font-family: var(--mono); font-size: .91rem; }
.storm-strip span { color: var(--muted); font: .74rem var(--mono); }
.storm-strip button { margin: 12px; align-self: center; }
.station-grid { display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(285px, 1fr); gap: 16px; align-items: start; }
.station-side { display: grid; gap: 16px; }
.station-card { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); min-width: 0; overflow: hidden; }
.card-head { padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-head h2 { font-size: 1.02rem; line-height: 1.25; }
.card-head p { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.camera-control { display: flex; background: #e9f1eb; border: 1px solid #d7e4dc; padding: 3px; border-radius: 7px; flex: none; }
.camera-control button { padding: 4px 9px; border-radius: 4px; font-size: .77rem; }
.camera-control [aria-pressed="true"] { color: #123f35; background: #fff; font-weight: 700; }
.map-stage { background: #102e33; color: #c4ddd6; aspect-ratio: 900 / 484; }
.map-stage svg, .error-stage svg { width: 100%; display: block; }
.map-stage text { font-family: var(--sans); }
.map-stage .coord-text, .map-stage .selection-time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.map-stage .plot-keyline { paint-order: stroke fill; stroke: #112e32; stroke-width: 3.5; stroke-linejoin: round; }
.map-stage .lead-target, .error-stage .lead-target { cursor: pointer; }
.map-stage .lead-target:focus-visible, .error-stage .lead-target:focus-visible { outline: none; stroke: #fff; stroke-width: 2; }
.map-key { display: flex; flex-wrap: wrap; padding: 7px 12px; gap: 5px; border-bottom: 1px solid var(--line); }
.key-toggle { display: flex; gap: 6px; align-items: center; padding: 4px 6px; border: 1px solid transparent; border-radius: 5px; color: #29423a; font-size: .75rem; }
.key-toggle [class="swatch"] { color: var(--track); display: inline-block; border-top: 2px solid; width: 15px; }
.key-toggle[data-path="observed"] .swatch { border-top-style: dashed; color: #273d3a; }
.key-toggle[aria-pressed="false"] { color: #667872; }
.key-toggle[aria-pressed="false"] .swatch { opacity: .3; }
.key-toggle:hover { border-color: var(--line); }
.time-controls { padding: 10px 15px 13px; }
.time-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.time-head div { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.time-head small, .time-head time { color: var(--muted); }
.time-head strong, .time-head time { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.time-head time { font-size: .76rem; }
#lead-slider { display: block; width: 100%; margin: 10px 0 7px; accent-color: #206650; }
.hour-list { display: grid; grid-template-columns: repeat(var(--hours), minmax(0, 1fr)); gap: 3px; }
.hour-list button { min-width: 0; padding: 3px 0; font-family: var(--mono); font-size: .68rem; font-weight: 630; border-radius: 5px; color: var(--muted); }
.hour-list button[aria-pressed="true"] { color: #173b32; background: #d5ebe0; }
.hour-list button:hover { color: #14372b; text-decoration: underline; }
.detail-coords { min-height: 67px; padding: 10px 15px; background: #e9f3ec; display: flex; gap: 13px; align-items: center; flex-wrap: wrap; }
.detail-coords strong { font: 650 clamp(.93rem, 1.4vw, 1.26rem) var(--mono); }
.detail-coords span { font-size: .82rem; color: var(--muted); }
.detail-rows { padding: 2px 15px 8px; }
.detail-row { display: flex; align-items: baseline; justify-content: space-between; gap: 9px; padding: 8px 0; border-bottom: 1px solid #e5ece6; font-size: .8rem; }
.detail-row:last-child { border-bottom: 0; }
.detail-row span:last-child { font: .74rem var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.detail-row .row-title { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.row-title i { width: 7px; height: 7px; border-radius: 50%; background: var(--track); flex: none; }
.detail-row[data-kind="fusion"] { font-weight: 700; }
.coast-content { padding: 0 15px 13px; }
.coast-content dl { display: grid; gap: 9px; margin: 0; }
.coast-content dl div { padding-top: 8px; border-top: 1px solid #e5ece6; }
.coast-content dt { color: var(--muted); font-size: .74rem; }
.coast-content dd { margin: 3px 0 0; font-size: .85rem; font-weight: 660; }
.coast-content time { display: block; margin-top: 2px; color: var(--muted); font: .73rem var(--mono); }
.coast-content p, .source-panel { font-size: .81rem; color: var(--muted); }
.error-stage { padding: 0 9px 9px; }
.plot-unit { font: .79rem var(--mono); color: var(--muted); }
.error-stage text { font: 14px var(--mono); fill: #4e6760; }
.source-panel { padding: 0 15px 14px; }
.source-panel p { margin: 0 0 7px; }
.source-panel .source-link + .source-link { margin-left: 9px; }
.source-link { color: #166154; font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; }
.import-dialog { width: min(470px, calc(100% - 28px)); padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.import-dialog::backdrop { background: #091d20b8; }
.import-dialog form { display: grid; gap: 9px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-head h2 { font-size: 1.2rem; }
.import-dialog p { color: var(--muted); font-size: .85rem; }
.import-dialog label { font-size: .81rem; font-weight: 660; }
.import-dialog input, .import-dialog select { width: 100%; min-height: 36px; padding: 6px; border: 1px solid var(--line); border-radius: 5px; background: #f6faf6; font-size: .82rem; }
.import-error:not(:empty) { color: #9b362e; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) {
  .shell { width: min(100% - 30px, 760px); }
  .station-grid { grid-template-columns: 1fr; }
  .station-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .map-stage { aspect-ratio: 540 / 484; }
  .station-nav-inner { min-height: 57px; }
  .station-brand { font-size: .92rem; gap: 5px; letter-spacing: .05em; }
  .station-brand img { width: 24px; height: 24px; }
  .station-nav nav { gap: 0; }
  .station-nav nav a { padding: 0 5px; font-size: .73rem; }
  .station-main { padding-top: 22px; }
  .station-intro, .time-head { align-items: start; }
  .station-intro { display: grid; margin-bottom: 16px; }
  .station-intro h1 { font-size: 2rem; }
  .station-intro p { font-size: .84rem; }
  .storm-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .storm-name, .storm-metric { padding: 7px 9px; border-bottom: 1px solid var(--line); }
  .storm-name, .storm-metric:nth-child(3) { border-right: 1px solid var(--line); }
  .storm-metric:nth-child(2) { border-right: 0; }
  .storm-metric:nth-child(3) { border-bottom: 0; }
  .storm-strip button { justify-self: start; }
  .storm-strip small { font-size: .67rem; }
  .storm-strip strong { font-size: .76rem; }
  .station-side { grid-template-columns: 1fr; }
  .hour-list { display: flex; flex-wrap: wrap; }
  .hour-list button { padding: 4px 5px; flex: 1 0 10%; }
  .time-head time { flex-basis: 100%; }
}
