/* Whitney & Sierra High-Country Weather */
:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f1f4f8;
  --surface-3: #e3e8ef;
  --text: #121821;
  --muted: #4f5b6b;
  --border: #c9d1dc;
  --accent: #1c5bb8;
  --accent-fg: #ffffff;
  --warn-bg: #ffe2a8;
  --warn-fg: #5c3b00;
  --bad: #b42318;
  --ok: #1f7a3d;
  --summit: #1d3557;
  --summit-fg: #ffffff;
  --hl: #ff7a00;
  --camp: #1e7a3c;
  --shadow: 0 1px 2px rgba(10, 20, 35, .18), 0 4px 14px rgba(10, 20, 35, .14);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #161b23;
    --surface-2: #1d2430;
    --surface-3: #283141;
    --text: #e7ebf1;
    --muted: #a5afbe;
    --border: #334055;
    --accent: #8ab4ff;
    --accent-fg: #0b1220;
    --warn-bg: #4d3600;
    --warn-fg: #ffd98a;
    --bad: #ff8a80;
    --ok: #7fd49a;
    --summit: #e7ebf1;
    --summit-fg: #0d1117;
    --camp: #5fcf86;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.35 var(--font);
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
button, select { font: inherit; color: inherit; }
.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; }
.muted { color: var(--muted); font-weight: 400; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
  padding-top: max(6px, env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-short { display: none; }
@media (max-width: 560px) {
  .title-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .title-short { display: inline; }
}
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.btn {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 6px 10px;
  min-height: 36px;
  cursor: pointer;
}
.btn:hover { background: var(--surface-3); }
.btn-small { min-height: 30px; padding: 3px 10px; font-size: 13px; }
.btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.btn-status.is-warn { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.btn-status.is-warn .status-dot { background: var(--warn-fg); }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg-btn { border: 0; background: var(--surface-2); min-height: 36px; min-width: 40px; padding: 0 8px; cursor: pointer; font-weight: 600; }
.seg-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); }

.popover {
  position: absolute;
  right: 12px;
  top: calc(100% + 6px);
  width: min(360px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  z-index: 40;
}
.pop-h { margin: 0 0 6px; font-size: 14px; }
.pop-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.status-list { list-style: none; margin: 0; padding: 0; }
.status-list li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--border); font-size: 13px; }
.status-list li:first-child { border-top: 0; }
.status-list .st-err { display: block; color: var(--bad); font-size: 12px; }
.badge { display: inline-block; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 700; line-height: 18px; }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge-bad { background: var(--bad); color: #fff; }

/* ---------- map area ---------- */
.mapwrap { position: relative; flex: 1 1 auto; min-height: 0; }
#map { position: absolute; inset: 0; z-index: 0; background: var(--surface-3); }

.controls {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 56px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}
.ctl-group { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; pointer-events: auto; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 11px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.chip-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; padding: 0; }
.chip-icon svg { fill: currentColor; }
.chip-icon .ico-pause { display: none; }
.chip-icon.is-playing .ico-play { display: none; }
.chip-icon.is-playing .ico-pause { display: inline; }
.chip:disabled { opacity: .5; cursor: default; }
.layers-btn { display: none; align-items: center; gap: 5px; }
.layers-btn[aria-expanded="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.layers-pop { display: contents; }
@media (max-width: 600px) {
  .controls { right: 52px; flex-wrap: nowrap; }
  .controls > .ctl-group { flex-wrap: nowrap; }
  .layers-btn { display: inline-flex; }
  .rt-pre { display: none; }
  .layers-pop {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: min(260px, calc(100vw - 72px));
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    pointer-events: auto;
  }
  .layers-pop.is-open { display: flex; }
  .layers-pop .ctl-group { gap: 6px; }
  .layers-pop .chip { box-shadow: none; min-height: 40px; }
}
.sel { appearance: none; -webkit-appearance: none; padding-right: 12px; }
.sel-wrap { display: inline-flex; }
.radar-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.radar-time:empty { display: none; }
.radar-time.is-old { background: var(--warn-bg); color: var(--warn-fg); }

.card {
  position: absolute;
  z-index: 4;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 12px;
}
.legend-temp { left: 8px; bottom: 30px; padding: 5px 8px; width: 170px; }
.legend-bar { height: 8px; border-radius: 4px; }
.legend-labels { display: flex; justify-content: space-between; margin-top: 2px; font-variant-numeric: tabular-nums; color: var(--muted); }
.legend-cov { left: 8px; bottom: 80px; padding: 8px 10px; width: min(300px, calc(100% - 16px)); max-height: 55%; overflow: auto; }
.legend-h { font-weight: 700; margin-bottom: 4px; }
.legend-h em { font-weight: 400; color: var(--muted); }
.cov-swatches { list-style: none; margin: 0; padding: 0; }
.cov-swatches li { display: flex; align-items: center; gap: 6px; padding: 1px 0; }
.sw { width: 18px; height: 11px; border-radius: 2px; border: 1px solid var(--border); background-color: #e9e5da; }
/* same slate + alpha as the overlay PNG (40,44,58 @ 70/120/165), shown over a map-like base */
.sw1 { background-image: linear-gradient(rgba(40, 44, 58, .275), rgba(40, 44, 58, .275)); }
.sw2 { background-image: linear-gradient(rgba(40, 44, 58, .47), rgba(40, 44, 58, .47)); }
.sw3 { background-image: linear-gradient(rgba(40, 44, 58, .65), rgba(40, 44, 58, .65)); }
.tip summary { cursor: pointer; color: var(--accent); margin-top: 4px; min-height: 24px; }
.tip p { margin: 4px 0; }

.fc-banner {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  background: var(--summit);
  color: var(--summit-fg);
  box-shadow: var(--shadow);
  font-size: 13px;
  white-space: nowrap;
}
.fc-banner .btn { background: var(--surface); color: var(--text); border-color: transparent; }

/* ---------- markers ----------
   MapLibre positions each marker element with position:absolute + an inline
   transform. Never set `position`, `transform` or `animation: transform` on
   the marker element itself (.stn / .summit) or it lands in the wrong place;
   all visual effects go on the inner .stn-v / ::after instead. */
.stn {
  --bg: #9aa3ad; --fg: #111;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: 700 12px/1 var(--font);
}
.stn:focus-visible { outline: none; }
.stn:focus-visible .stn-v { outline: 3px solid var(--accent); outline-offset: 2px; }
.stn-v {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 5px;
  border-radius: 12px;
  border: 1.5px solid rgba(15, 20, 30, .75);
  background: var(--bg);
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  transition: transform .12s;
}
.stn:hover, .stn:focus-visible { z-index: 3; }
.stn:hover .stn-v, .stn:focus-visible .stn-v { transform: scale(1.15); }
.stn.is-stale .stn-v { opacity: .62; border-style: dashed; font-style: italic; font-weight: 600; }
.stn.is-stale .stn-v::after { content: "old"; position: absolute; top: -9px; right: -6px; font: 700 8px/10px var(--font); padding: 0 2px; border-radius: 3px; background: #4a5260; color: #fff; font-style: normal; }
.stn.is-suspect .stn-v { border-style: dotted; border-color: #000; background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, .0) 0 4px, rgba(0, 0, 0, .22) 4px 6px); }
.stn.is-suspect .stn-v::after { content: "?"; position: absolute; top: -9px; right: -6px; width: 13px; height: 13px; font: 800 10px/13px var(--font); text-align: center; border-radius: 50%; background: #b42318; color: #fff; }
.stn.is-none .stn-v { opacity: .55; }
.stn.is-fc .stn-v { border: 2px double rgba(15, 20, 30, .9); }
.stn.is-used .stn-v { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--summit); }
.stn.is-hl { z-index: 4; }
.stn.is-hl .stn-v { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--hl); animation: pulse 1.2s ease-in-out 3; }
.stn.is-active .stn-v { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); }
@keyframes pulse { 50% { transform: scale(1.35); } }
.stn.is-culled { display: none; }
.zoom-low .stn-v { min-width: 28px; height: 20px; font-size: 10.5px; padding: 0 3px; }
.stn-e, .summit .sm-e { display: none; font: 600 8.5px/1 var(--font); opacity: .85; letter-spacing: .01em; }
.zoom-hi .stn-v { flex-direction: column; height: 32px; gap: 2px; justify-content: center; }
.zoom-hi .stn-e { display: block; }
.summit .sm-row { display: inline-flex; align-items: center; gap: 3px; }
.zoom-hi .summit:not(.is-open) { flex-direction: column; height: 32px; gap: 2px; justify-content: center; }
.zoom-hi .summit:not(.is-open) .sm-e { display: block; }

/* Summit marker. Collapsed = a station-sized pill; .is-open = the full card.
   Both states keep the 2px border and the same ::after tail, whose tip sits
   exactly 8px below the border box (bottom:-10px from the padding edge, minus
   the 2px border, plus the 8px triangle). The marker uses anchor:'bottom' with
   offset [0,-8], so the tip lands on the peak in either state. */
.summit {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 7px 0 5px;
  border-radius: 12px;
  border: 2px solid var(--summit);
  background: var(--sm-bg, #9aa3ad);
  color: var(--sm-fg, #111);
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .45);
  cursor: pointer;
  font: 800 12px/1 var(--font);
  font-variant-numeric: tabular-nums;
}
.summit .sm-peak { flex: 0 0 auto; }
.summit .sm-est { font-size: 8.5px; font-weight: 700; opacity: .8; letter-spacing: .02em; }
.summit.is-open {
  flex-direction: column;
  height: auto;
  gap: 1px;
  padding: 5px 9px 6px;
  border-radius: 10px;
  border-color: #fff;
  background: var(--summit);
  color: var(--summit-fg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
  line-height: 1.1;
  font-weight: 600;
}
.summit::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  margin-left: -6px;
  border: 8px solid transparent;
  border-left-width: 6px;
  border-right-width: 6px;
  border-bottom: 0;
  border-top-color: var(--summit);
}
.summit:hover, .summit:focus-visible { filter: brightness(1.1); }

/* Place pins (campgrounds, ...): same pin geometry as the collapsed summit pill,
   green "campground" outline + tent icon. */
.place {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 24px;
  padding: 0 7px 0 5px;
  border-radius: 7px;
  border: 2px solid var(--camp);
  background: var(--pl-bg, #9aa3ad);
  color: var(--pl-fg, #111);
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0, 0, 0, .45);
  cursor: pointer;
  font: 800 12px/1 var(--font);
  font-variant-numeric: tabular-nums;
}
.place::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  margin-left: -6px;
  border: 8px solid transparent;
  border-left-width: 6px;
  border-right-width: 6px;
  border-bottom: 0;
  border-top-color: var(--camp);
}
.place .pl-row { display: inline-flex; align-items: center; gap: 3px; }
.place .pl-icon { color: currentColor; flex: 0 0 auto; }
.place .pl-est { font-size: 8.5px; font-weight: 700; opacity: .8; }
.place .pl-e { display: none; font: 600 8.5px/1 var(--font); opacity: .85; }
.zoom-hi .place { height: 32px; }
.zoom-hi .place .pl-e { display: block; }
.place.is-fc { outline: 2px dashed var(--hl); outline-offset: 3px; }
.place.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--accent); }
.place:hover, .place:focus-visible { filter: brightness(1.1); }
.loc-pill.loc-place { border-color: var(--camp); }
.ext-link { font-weight: 600; }
.summit .sm-name { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.summit .sm-temp { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 5px; }
.summit .sm-chip { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .7); }
.summit .sm-band, .summit .sm-wind { font-size: 11px; font-weight: 600; white-space: nowrap; }
.summit .sm-wind { display: flex; align-items: center; gap: 3px; }
.summit.is-fc { outline: 2px dashed var(--hl); outline-offset: 3px; }

.radar-site { font: 700 10px/1 var(--font); padding: 3px 5px; border-radius: 4px; background: #282c3a; color: #fff; border: 1px solid #fff; white-space: nowrap; }

.arrow { display: inline-block; vertical-align: -2px; flex: 0 0 auto; }

/* trail popup (MapLibre popup, themed) */
.maplibregl-popup-content { background: var(--surface); color: var(--text); border-radius: 8px; box-shadow: var(--shadow); padding: 8px 26px 8px 10px; font: 13px/1.3 var(--font); }
.maplibregl-popup-close-button { color: var(--text); font-size: 18px; width: 26px; height: 26px; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--surface); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip, .maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
.trail-item { display: flex; flex-direction: column; margin-bottom: 4px; }
.trail-sub { color: var(--muted); font-size: 12px; }
.trail-src { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }

/* ---------- side panel / bottom sheet ---------- */
.panel {
  position: absolute;
  z-index: 10;
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: 380px;
  max-width: calc(100% - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px 16px;
}
.panel:focus { outline: none; }
@media (max-width: 700px) {
  /* Bottom sheet inside the map area, so the forecast strip (which follows the
     selection) stays visible below it. */
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 64%; border-radius: 14px 14px 0 0; border-bottom: 0; }
}
.panel-close {
  position: sticky;
  top: 0;
  float: right;
  width: 36px;
  height: 36px;
  margin: -4px -6px 0 8px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.p-title { margin: 0; font-size: 18px; line-height: 1.2; }
.p-sub { margin: 2px 0 8px; color: var(--muted); font-size: 13px; }
.p-flag { margin: 6px 0; padding: 6px 8px; border-radius: 6px; font-size: 13px; background: var(--warn-bg); color: var(--warn-fg); }
.p-flag.bad { background: #fde4e1; color: #7a1b10; }
@media (prefers-color-scheme: dark) { .p-flag.bad { background: #4a1712; color: #ffc4bc; } }
.p-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.p-big .v { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.p-big .band { font-size: 14px; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 8px 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 4px; }
.p-sec { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.chart-wrap { margin: 2px 0 6px; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; cursor: crosshair; overflow: visible; }
.chart:focus { outline: none; }
.chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-vgrid { stroke-dasharray: 2 3; }
.ch-ax { fill: var(--muted); font: 10px var(--font); }
.ch-part { fill: var(--muted); font: 600 9.5px var(--font); letter-spacing: .03em; }
.ch-now { stroke: var(--muted); stroke-width: 1.25; }
.ch-ref { stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1; }
.ch-mark { stroke: var(--hl); stroke-width: 2; }
.ch-obs, .ch-fc { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-fc { stroke-dasharray: 5 4; }
.ch-nowdot { fill: var(--accent); }
.ch-hover { display: none; }
.chart.is-hover .ch-hover { display: inline; }
.chart.is-hover .ch-nowdot { display: none; }
.ch-cross { stroke: var(--text); stroke-width: 1; opacity: .5; }
.ch-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.ch-tipbg { fill: var(--text); opacity: .92; }
.ch-tiptx { fill: var(--surface); font: 600 10.5px var(--font); }

.methods { width: 100%; border-collapse: collapse; font-size: 13px; margin: 4px 0; }
.methods th, .methods td { text-align: left; padding: 5px 4px; border-top: 1px solid var(--border); vertical-align: top; }
.methods th { font-weight: 600; color: var(--muted); border-top: 0; font-size: 12px; }
.methods td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.methods .detail { display: block; color: var(--muted); font-size: 12px; }
.wbar { display: block; height: 4px; margin-top: 3px; border-radius: 2px; background: var(--accent); }
.used-list { list-style: none; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 5px; }
.used-list button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; min-height: 30px; font-size: 13px; cursor: pointer; }
.used-list button:hover { background: var(--surface-3); }
.used-list button[aria-pressed="true"] { border-color: var(--hl); box-shadow: 0 0 0 2px var(--hl); }
.method-text p, .method-text li { margin: 6px 0; font-size: 13.5px; }
.method-text h4 { margin: 12px 0 2px; font-size: 13.5px; }
.method-text ul { margin: 4px 0; padding-left: 18px; }
.inv { font-weight: 700; }
.inv.yes { color: var(--bad); }

/* ---------- forecast strip ---------- */
.strip { flex: 0 0 auto; background: var(--surface); border-top: 1px solid var(--border); position: relative; z-index: 15; }
.strip-head { display: flex; align-items: center; gap: 8px; padding: 4px 10px; }
.loc-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 700; border: 2px solid var(--accent); background: var(--surface); color: var(--text); max-width: 55vw; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.loc-pill.loc-summit { border-color: var(--summit); background: var(--summit); color: var(--summit-fg); }
.strip-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.strip-body { display: flex; position: relative; }
.strip-labels, .col {
  display: flex;
  flex-direction: column;
  font-variant-numeric: tabular-nums;
}
/* Row heights are set per row class so labels and hour columns stay aligned
   when optional rows are hidden. */
.strip-labels > span, .col > span { display: flex; align-items: center; flex: 0 0 auto; height: 17px; }
.col > span { justify-content: center; }
.strip .k-time { height: 30px; }
.strip .k-temp { height: 26px; }
.strip .k-wind { height: 20px; }
.strip .k-wx { height: 28px; }
.strip.no-wc .k-wc, .strip.no-pop .k-pop, .strip.no-pcp .k-pcp, .strip.no-snow .k-snow,
.strip.no-cld .k-cld, .strip.no-fl .k-fl, .strip.no-wx .k-wx { display: none; }
.strip-labels > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-labels { flex: 0 0 auto; width: 70px; padding: 0 6px 6px 10px; font-size: 11px; color: var(--muted); border-right: 1px solid var(--border); background: var(--surface); }
.strip-scroll {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.strip-scroll.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.strip-scroll:focus-visible { outline-offset: -3px; }
.col {
  flex: 0 0 58px;
  scroll-snap-align: start;
  text-align: center;
  font-size: 12px;
  white-space: nowrap;
  border-left: 1px solid transparent;
  cursor: pointer;
  padding: 0 2px;
  border-radius: 6px;
}
.col.day-start { border-left: 2px solid var(--muted); border-radius: 0 6px 6px 0; }
.col:hover { background: var(--surface-2); }
.col[aria-selected="true"] { background: var(--accent); color: var(--accent-fg); }
.col[aria-selected="true"] .c-sub, .col[aria-selected="true"] .c-wx { color: var(--accent-fg); }
.col:focus-visible { outline-offset: -3px; }
.col > .c-time { flex-direction: column; line-height: 1.05; font-weight: 600; }
.c-tz { font-size: 9px; font-weight: 700; }
.c-day { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; min-height: 11px; }
.col > .c-temp { align-self: center; height: 22px; margin: 2px 0; min-width: 44px; padding: 2px 4px; border-radius: 6px; font-weight: 800; font-size: 14px; background: var(--chip-bg); color: var(--chip-fg); }
.c-sub { color: var(--muted); }
.c-wind { display: flex; align-items: center; justify-content: center; gap: 2px; white-space: nowrap; }
.c-wind .g { font-size: 10px; }
.c-snow.has { font-weight: 700; color: var(--accent); }
.col[aria-selected="true"] .c-snow.has { color: var(--accent-fg); }
.c-cld { display: flex; align-items: center; gap: 3px; padding: 0 3px; }
.c-cld .bar { flex: 1 1 auto; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.c-cld .bar i { display: block; height: 100%; background: var(--muted); }
.c-cld .pct { font-size: 10px; min-width: 18px; }
.col > .c-wx { white-space: normal; font-size: 10px; line-height: 1.1; color: var(--muted); overflow: hidden; text-align: center; }
.strip.is-collapsed .x { display: none; }
.strip-empty { padding: 16px; color: var(--muted); font-size: 13px; }

.foot {
  flex: 0 0 auto;
  padding: 4px 12px;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
  font-size: 11px;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
  white-space: nowrap;
  overflow-x: auto;
}

/* ---------- MapLibre theme tweaks ---------- */
.maplibregl-ctrl-attrib { font-size: 10px; }
@media (prefers-color-scheme: dark) {
  .maplibregl-ctrl-group { background: var(--surface); }
  .maplibregl-ctrl-group button + button { border-top-color: var(--border); }
  .maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(1); }
  .maplibregl-ctrl-attrib.maplibregl-compact, .maplibregl-ctrl.maplibregl-ctrl-attrib { background: rgba(22, 27, 35, .85); color: var(--text); }
  .maplibregl-ctrl-attrib a { color: var(--text); }
  .maplibregl-ctrl-attrib-button { filter: invert(1); }
}

@media (max-width: 560px) {
  .strip-labels { width: 64px; padding: 0 3px 6px 8px; font-size: 10px; }
  .mapwrap.fc-mode .legend-temp { display: none; }
  .col { flex-basis: 54px; }
  .legend-temp { width: 140px; bottom: 26px; }
  .legend-cov { bottom: 72px; font-size: 11.5px; width: min(260px, calc(100% - 16px)); }
  .c-sub, .c-wind { font-size: 11px; }
  .strip-tz { display: none; }
  .controls { right: 50px; }
  .chip { padding: 3px 9px; min-height: 32px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .stn-v, .stn.is-hl .stn-v { transition: none; animation: none; }
}
