/* Snowflud. Layout: full-screen map, a floating control card (top-left), a legend (bottom-left),
   a detail panel (right; bottom sheet on phones). Cool glacier neutrals, rescue-orange accent. */
:root {
  --bg: #edf1f4;
  --surface: #f8fafb;
  --ink: #0e1b26;
  --muted: #4d5f70;
  --line: #cbd5dd;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --focus: #1d4ed8;
  --warn-bg: #fff4e5;
  --warn-ink: #7a3a00;
  --bar-track: #dde5ec;
  --rose-off: #dfe6ec;
  --shadow: 0 6px 24px rgba(14, 27, 38, 0.18);
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-data: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1620; --surface: #122230; --ink: #e7eef4; --muted: #9bb0c2; --line: #27394a;
    --accent: #ff8a4c; --accent-ink: #1b0b00; --focus: #8ab4ff; --warn-bg: #3a2610; --warn-ink: #ffd9b0;
    --bar-track: #1d3042; --rose-off: #24384b; --shadow: 0 6px 24px rgba(0, 0, 0, 0.5); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1620; --surface: #122230; --ink: #e7eef4; --muted: #9bb0c2; --line: #27394a;
  --accent: #ff8a4c; --accent-ink: #1b0b00; --focus: #8ab4ff; --warn-bg: #3a2610; --warn-ink: #ffd9b0;
  --bar-track: #1d3042; --rose-off: #24384b; --shadow: 0 6px 24px rgba(0, 0, 0, 0.5); color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font-body);
  overflow: hidden;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: 0.02em; text-wrap: balance; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: var(--accent); }
.mono { font-family: var(--font-data); font-size: 0.92em; }
.muted { color: var(--muted); }

#map { position: fixed; inset: 0; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 8px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase; }
.pill {
  font-family: var(--font-display); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px;
}
.bar .spacer { flex: 1; }
.bar .logo { width: 30px; height: 30px; border-radius: 7px; flex: none; margin-right: -4px; }
.linkbtn { background: none; border: 0; padding: 4px 6px; text-decoration: underline; cursor: pointer; color: var(--ink); }

/* ---------- cards ---------- */
.card {
  position: fixed; z-index: 4; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow);
}
#controls { top: calc(58px + env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); width: min(340px, calc(100vw - 24px)); padding: 10px 12px; display: grid; gap: 8px;  max-height: calc(100vh - 58px - 44px - env(safe-area-inset-top, 0px)); max-height: calc(100dvh - 58px - 44px - env(safe-area-inset-top, 0px)); overflow: auto; }
#controls[hidden], #panel[hidden] { display: none; }
#ctrlBody { display: grid; gap: 10px; }
#controls.collapsed #ctrlBody { display: none; }
.grow { flex: 1; }
.mobile-only { display: none; }
.pill { white-space: nowrap; }
.replay { display: grid; gap: 6px; margin-top: 6px; }
input[type="date"] { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); min-width: 0; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 8px; }
label.check input { margin-top: 3px; accent-color: var(--accent); }
#legend { border-top: 1px solid var(--line); padding-top: 8px; }
#panel {
  top: calc(58px + env(safe-area-inset-top, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  bottom: calc(30px + env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100vw - 24px)); overflow: auto; padding: 14px 16px 18px; z-index: 7;
}
.panel-close { float: right; margin: 0 0 6px 8px; }
label.field { display: grid; gap: 4px; font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.seg .w3 { grid-column: span 3; }
.seg .w2 { grid-column: span 2; }
.seg .w6 { grid-column: span 6; }
.seg button {
  min-width: 0; padding: 7px 4px; border: 1px solid var(--line); background: var(--bg); border-radius: 6px; cursor: pointer;
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.03em; line-height: 1.1;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { min-width: 0; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.btn { padding: 7px 12px; border-radius: 6px; border: 1px solid var(--ink); background: var(--bg); cursor: pointer; font-family: var(--font-display); font-size: 15px; letter-spacing: 0.04em; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
#status { font-size: 13px; color: var(--muted); min-height: 1.2em; }
#status.err { color: var(--accent); }
.summary { font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 8px; }
.tag { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* ---------- legend ---------- */
.legend-row { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font-size: 13px; }
.legend-row span { display: inline-flex; align-items: center; gap: 5px; }
.sw { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.3); display: inline-block; }
.legend-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.quiet-note { border-left: 3px solid currentColor; padding-left: 8px; }
.quiet-note strong { color: var(--ink); }

/* ---------- panel ---------- */
#panel h2 { font-size: 22px; text-transform: uppercase; }
#panel h3 { font-size: 16px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 16px 0 6px; }
.empty { color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.kv div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.kv b { display: block; font-family: var(--font-data); font-weight: 600; font-size: 15px; }
.kv small { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-size: 12.5px; }
.problem { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 8px 0; background: var(--bg); }
.problem header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.problem h4 { margin: 0; font-family: var(--font-display); font-size: 19px; text-transform: uppercase; letter-spacing: 0.03em; }
.lvl { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.meter { height: 8px; background: var(--bar-track); border-radius: 4px; margin: 6px 0; overflow: hidden; }
.meter i { display: block; height: 100%; }
.meta { font-size: 13.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 14px; }
details { margin-top: 6px; }
summary { cursor: pointer; font-weight: 600; }
.driver { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; margin: 6px 0; font-size: 14px; }
.driver .ar { font-family: var(--font-data); font-weight: 700; }
.driver .up { color: var(--accent); }
.driver .down { color: var(--muted); }
.note { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; margin: 8px 0; }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font-data); font-size: 9px; fill: var(--muted); }
.chart .bars { fill: #3d7fc4; }
.chart .depth { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.chart .cursor { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .axis { stroke: var(--line); }
ul.tight { margin: 6px 0; padding-left: 18px; }
ul.tight li { margin: 3px 0; }
.attr { font-size: 12px; color: var(--muted); }

/* ---------- footer strip ---------- */
#strip {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; text-align: center; font-size: 12.5px; padding: 4px 10px calc(4px + env(safe-area-inset-bottom, 0px));
  background: var(--warn-bg); color: var(--warn-ink); border-top: 1px solid var(--accent);
}

/* ---------- gate and dialogs ---------- */
.overlay { position: fixed; inset: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, #000 18%); display: grid; place-items: center; padding: 16px; overflow: auto; }
.overlay[hidden] { display: none; }
.dialog { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); width: min(600px, 100%); padding: 22px 22px 18px; max-height: 100%; overflow: auto; }
.dialog h1 { font-size: 34px; text-transform: uppercase; line-height: 1; margin-bottom: 8px; }
.dialog ul { padding-left: 20px; margin: 10px 0; }
.dialog li { margin: 7px 0; }
.ack { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.ack input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); }
.links { font-size: 14px; margin-top: 12px; }
.links a { margin-right: 12px; }

.maplibregl-ctrl-attrib { font-size: 11px; }

@media (max-width: 760px) {
  body { overflow: hidden; }
  #controls { width: calc(100vw - 24px); padding: 10px; gap: 8px; }
  #panel { top: auto; left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); width: auto; height: 62dvh; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
  .pill { font-size: 12px; }
  .wordmark { font-size: 22px; }
  .hide-sm { display: none; }
  .mobile-only { display: inline-block; }
  #controls { max-height: 70dvh; top: calc(52px + env(safe-area-inset-top, 0px)); left: 8px; width: calc(100vw - 16px); }
  #strip { font-size: 11.5px; }
  /* compact first-run notice so the buttons are reachable without a long scroll */
  .overlay { padding: 8px; place-items: start center; }
  .dialog { padding: 14px 14px 10px; }
  .dialog h1 { font-size: 26px; }
  .dialog p, .dialog li { font-size: 14px; line-height: 1.35; }
  .dialog li { margin: 4px 0; }
  .ack { margin: 10px 0; padding: 8px; font-size: 14px; }
  #gate .row { position: sticky; bottom: -10px; background: var(--surface); padding: 8px 0 4px; }
  #gate .btn.primary { width: 100%; padding: 10px 12px; }
}
/* ---------- season weather chart under the time slider ---------- */
#wxChart { touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; margin-top: 6px; }
#wxChart svg { display: block; }
.wx .snow { fill: #3d7fc4; }
.wx .snow.fc { opacity: 0.4; }
.wx .nowline { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 2; }
.wx .cursor { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: none; }
.wxread { font-size: 12.5px; margin-top: 4px; }
.wxhelp summary { font-weight: 400; font-size: 12.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

.peaklbl { font: 600 11px/1 system-ui, sans-serif; color: #fff; background: rgba(20,48,79,.82); padding: 3px 6px 3px; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.peaklbl::after { content: ""; position: absolute; left: 50%; bottom: -4px; margin-left: -4px; border: 4px solid transparent; border-bottom: 0; border-top-color: rgba(20,48,79,.82); }
@media (max-width: 760px) { .peaklbl { font-size: 10px; padding: 2px 4px; } }

/* ---------- map-first card (Nov 2026) ---------- */
.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; }
.briefhead { display: flex; gap: 6px; align-items: center; }
.areasel {
  flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0.02em;
  padding: 4px 6px; background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer; text-overflow: ellipsis;
}
.areasel:hover { border-color: var(--line); background: var(--bg); }
.iconbtn { flex: none; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 18px; line-height: 1; }
#ctrlToggle .when-closed, #controls.collapsed #ctrlToggle .when-open { display: none; }
#controls.collapsed #ctrlToggle .when-closed { display: inline; }
.mini { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; cursor: pointer; padding: 2px 2px 0; }
.mini[hidden] { display: none; }
.btn.sm { padding: 4px 10px; font-size: 14px; }
.chip { width: 34px; height: 34px; border-radius: 8px; flex: none; display: inline-block; border: 1px solid rgba(0, 0, 0, 0.25); }
.chip.sm { width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; }
.brief { display: grid; gap: 8px; }
.brief .when { font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.headline { display: flex; gap: 10px; align-items: center; }
.hl-label { font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1; text-transform: uppercase; letter-spacing: 0.02em; }
.hl-sub { font-size: 13px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.lead { margin: 0; font-size: 14.5px; }
.prob { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.prob:first-of-type { border-top: 0; }
.rose { width: 64px; height: auto; display: block; }
.rose text { font: 600 9px var(--font-data); fill: var(--muted); }
.prob-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.1; }
.lvl-chip { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 12.5px; padding: 1px 7px; border-radius: 999px; background: var(--c); color: #1b1b1b; vertical-align: 2px; white-space: nowrap; }
.prob-where { font-weight: 600; font-size: 14.5px; }
.prob-what { font-size: 13px; color: var(--muted); line-height: 1.3; }
.trend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tile { display: grid; justify-items: center; gap: 3px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); cursor: pointer; }
.tile.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tile .chip { width: 100%; height: 10px; border-radius: 3px; }
.t-day { font-family: var(--font-display); font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: 0.04em; }
.t-lvl { font-size: 12.5px; color: var(--muted); }
.trend-why { margin: 0; font-size: 13.5px; }
.official { margin: 0; font-size: 13.5px; }
.legend { border-top: 1px solid var(--line); padding-top: 8px; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; margin-top: 5px; }
.scale span { font-size: 11.5px; text-align: center; color: var(--muted); line-height: 1.15; }
.scale span::before { content: ""; display: block; height: 10px; border-radius: 2px; background: var(--c); margin-bottom: 3px; border: 1px solid rgba(0, 0, 0, 0.15); }
.drawer { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 0; }
.drawer > summary { font-family: var(--font-display); font-size: 16px; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 0; }
.drawer[open] > summary { margin-bottom: 6px; }
.advanced > summary { font-weight: 400; font-size: 13.5px; color: var(--muted); }
.wxkey { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; margin-top: 8px; }
.wxkey span { display: inline-flex; align-items: center; gap: 5px; }
.wxkey i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; }
.wxkey .k-snow { background: #3d7fc4; }
.wxkey .k-depth { height: 2px; background: var(--accent); }
.wxkey .k-fc { background: #3d7fc4; opacity: 0.4; }
.chart text.ylab { font-size: 8.5px; fill: var(--ink); }
.spotpop .maplibregl-popup-content { background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 28px 10px 12px; box-shadow: var(--shadow); font-size: 14px; }
.spotpop .maplibregl-popup-close-button { font-size: 20px; width: 28px; height: 28px; color: var(--muted); }
.spotpop.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--surface); }
.spotpop.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--surface); }
.spotpop.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--surface); }
.spotpop.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--surface); }
.pop-terrain { font-family: var(--font-data); font-size: 13px; color: var(--muted); }
.pop-terrain b { color: var(--ink); font-size: 15px; }
.pop-line { margin-top: 4px; }
.pop-line .chip, .mini .chip { margin-right: 6px; }
.pop-why { padding: 4px 0 0; color: var(--accent); }
@media (max-width: 760px) {
  .hl-label { font-size: 24px; }
  .chip { width: 28px; height: 28px; }
}
/* Top 10 list (gate and header dialog) */
.rankbox { margin: 12px 0 4px; }
.rankbox:empty { display: none; }
.rank-lead { font-size: 14px; margin-bottom: 6px; }
.rank-none { font-size: 13px; color: var(--muted); margin: 6px 0; }
.ranklist { list-style: none; padding: 0 !important; margin: 6px 0 !important; border-top: 1px solid var(--line); }
.ranklist li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; margin: 0; border-bottom: 1px solid var(--line); }
.rank-n { font-family: 'IBM Plex Mono', monospace; font-weight: 600; min-width: 1.6em; text-align: right; }
.rank-body { display: flex; flex-direction: column; min-width: 0; }
.rank-body small { color: var(--muted); font-size: 12.5px; }
.rank-body .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.rank-name, .rank-go { font-weight: 600; text-align: left; padding: 0; }

/* ---------- polish pass (Nov 2026): softer cards, landing page, tighter phone layout ---------- */
.card { border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bar { gap: 10px; }
.bar .linkbtn, .chipbtn { white-space: nowrap; }
.chipbtn { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; }
.chipbtn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn, .seg button, .tile { transition: background-color 0.12s, border-color 0.12s, transform 0.12s; }
.btn:hover:not(:disabled), .seg button:hover, .tile:hover { border-color: var(--accent); }
.btn.primary { font-size: 18px; padding: 10px 18px; border-radius: 10px; font-weight: 600; }
.btn.primary:hover:not(:disabled) { transform: translateY(-1px); }
.hl-label { font-size: 30px; }
.brief .when, .tag { font-size: 12.5px; }

/* landing (the gate): what the site is and the live top 10 beside the notice */
.dialog.landing { width: min(1000px, 100%); padding: 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); border-radius: 16px; overflow: auto; }
.land-main { padding: 26px 26px 20px; }
.land-side { padding: 26px 26px 20px; border-left: 1px solid var(--line); background: var(--bg); }
.land-hero { display: flex; gap: 14px; align-items: center; }
.land-logo { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.land-kicker { margin: 0 0 2px; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.dialog.landing h1 { font-size: 36px; line-height: 1.02; margin: 0; }
.land-sub { margin: 12px 0 4px; font-size: 16px; color: var(--muted); }
.land-side h2 { font-size: 20px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.land-side p, .land-side li { font-size: 14px; line-height: 1.4; }
.land-side ul { margin: 8px 0; }
.land-side li { margin: 5px 0; }
.land-enter { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 12px; display: grid; gap: 10px; border-top: 1px solid var(--line); margin-top: 10px; }
.land-enter .ack { margin: 0; background: var(--surface); }
.land-enter .btn.primary { width: 100%; }

/* top 10 rows */
.rank-title { font-size: 20px; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 16px; }
.rank-lead { font-size: 13.5px; color: var(--muted); margin: 2px 0 8px; }
.ranklist li { align-items: center; padding: 7px 0; }
.rank-n { color: var(--muted); font-size: 15px; }
.rank-body { flex: 1; }
.rank-name, .rank-go { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.02em; line-height: 1.15; text-decoration: none; }
.rank-go:hover { text-decoration: underline; color: var(--accent); }
.ranklist .lvl-chip { flex: none; }

@media (max-width: 860px) {
  .dialog.landing { grid-template-columns: minmax(0, 1fr); }
  .land-side { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .bar { gap: 8px; }
  .chipbtn { font-size: 13.5px; padding: 3px 10px; }
  #controls { top: calc(56px + env(safe-area-inset-top, 0px)); }
  .land-main, .land-side { padding: 16px 14px 12px; }
  .dialog.landing h1 { font-size: 27px; }
  .land-logo { width: 44px; height: 44px; }
  .land-sub { font-size: 15px; }
  #gate .btn.primary { padding: 12px; }
  .hl-label { font-size: 26px; }
}
@media (max-width: 760px) {
  /* keep the notice and the Open button within a short scroll on phones: show the top 5 here, all 10 inside */
  #gate .ranklist li:nth-child(n+6), #gate .rankbox .attr { display: none; }
}

/* ---------- weak-layer watch ---------- */
.wlw { border: 1px solid var(--accent); border-radius: 10px; padding: 8px 10px; background: var(--warn-bg); color: var(--warn-ink); display: grid; gap: 6px; }
.wlw.loading { border-width: 2px; border-color: #dc2626; }
.wlw-badge { font-family: var(--font-display); font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.1; }
.wlw.loading .wlw-badge::before { content: "\26A0\FE0E  "; }
.wlw p { margin: 0; font-size: 13.5px; line-height: 1.35; }
.wlw-lead { font-weight: 600; }
.wlw a { color: inherit; font-weight: 600; }
.wlw-cake { margin: 0; }
.wlw-cake > summary { font-size: 13.5px; }
.wlw .attr { color: inherit; opacity: 0.85; font-size: 12px; }
.cake { width: 100%; height: auto; display: block; margin: 6px 0 4px; }
.cake .ck-snow { fill: #cfe3f5; stroke: #7fa8cc; stroke-width: 0.6; }
.cake .ck-weak { fill: #ea580c; }
.cake .ck-ground { fill: #6b5a4a; }
.cake .ck-lead { stroke: currentColor; stroke-width: 0.7; opacity: 0.7; }
.cake text { font-family: var(--font-body); font-size: 10.5px; fill: currentColor; }
.cake .ck-in { fill: #14304f; font-weight: 600; }
.wlw-mini { color: var(--accent); font-weight: 600; }
.rank-sub { font-family: var(--font-display); font-size: 17px; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 14px; }
.wl-line, .wl-ico { color: var(--accent); }
.rank-body .wl-line { font-weight: 600; }
.ranklist li.wl-loading { background: var(--warn-bg); }
.ranklist li.wl-loading .wl-line { color: var(--warn-ink); }
@media (max-width: 760px) { #gate .watchlist li:nth-child(n+4) { display: none; } }
.wlw-where { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; align-items: center; }
.wlw-where .rose { width: 56px; }
.wlw-where .rose text { fill: currentColor; }

/* ---------- where am I ---------- */
.chipbtn.ghost { background: transparent; color: var(--ink); }
.show-sm { display: none; }
@media (max-width: 760px) { .show-sm { display: inline; } .pill { display: none; } }
.mepop .maplibregl-popup-content { background: var(--surface); color: var(--ink); border-radius: 10px; padding: 10px 28px 10px 12px; box-shadow: var(--shadow); font-size: 14px; border: 2px solid var(--accent); }
.mepop .maplibregl-popup-close-button { font-size: 20px; width: 28px; height: 28px; color: var(--muted); }
.mepop .me-head { font-family: var(--font-display); font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.15; margin-bottom: 4px; }
.mepop p { margin: 4px 0 0; font-size: 13px; line-height: 1.35; }
.mepop .attr { color: var(--muted); font-size: 12px; }

/* ---------- measured snow (stations) ---------- */
.stations { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 0; }
.stations > summary { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 400; }
.stations ul { font-size: 13.5px; }
.st-note { margin: 4px 0; font-size: 13px; background: var(--warn-bg); color: var(--warn-ink); border-radius: 6px; padding: 5px 8px; }

/* ---------- choosing an area ---------- */
.pick .lead { margin: 6px 0 4px; }
.areatip .maplibregl-popup-content { background: var(--ink); color: var(--bg); padding: 4px 8px; border-radius: 6px; font-size: 13px; font-weight: 600; pointer-events: none; }
.areatip .maplibregl-popup-tip { display: none; }
.areatip { pointer-events: none; }
