.snowmap { display: flex; flex-direction: column; height: 100dvh; }
.map-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.map-top h1 { margin: 0; }
.map-top a { white-space: nowrap; }
.banner { background: var(--sev2); color: #fff; padding: 8px 16px; font-size: 0.9rem; }
.map-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 310px; }
#snowmap { width: 100%; height: 100%; min-height: 0; }
.side { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; }
.side h2 { font-size: 0.95rem; margin: 0 0 6px; }
.key, #peak-list { list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.key { margin-bottom: 8px; }
.key li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.swatch { flex: none; width: 13px; height: 13px; border-radius: 3px; }
.side input[type="range"] { padding: 0; min-height: 24px; }
.toggles label { display: block; padding: 3px 0; font-size: 0.9rem; cursor: pointer; }
.peaks { flex: 1 0 220px; display: flex; flex-direction: column; min-height: 220px; }
.peaks input { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; }
#peak-list { flex: 1; overflow-y: auto; min-height: 0; }
#peak-list button { display: grid; grid-template-columns: 13px 1fr auto; gap: 8px; align-items: center; width: 100%; min-height: 34px; padding: 4px; text-align: left; font-weight: 400; background: none; color: var(--ink); border-radius: 6px; }
#peak-list button:hover { background: var(--bg); }
#peak-list .swatch { border-radius: 50%; }
.map-foot { padding: 6px 16px; font-size: 0.76rem; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); }

/* Map labels and popups sit on a light basemap in both themes. */
.peak-label { color: #1d2320; font: 600 11px/1.15 system-ui, sans-serif; white-space: nowrap; pointer-events: none; text-shadow: 0 0 2px #fff, 0 0 3px #fff, 0 0 4px #fff, 0 0 5px #fff; }
.snowmap .maplibregl-popup-content { color: #1d2320; font: 13px/1.4 system-ui, sans-serif; padding: 12px 26px 12px 14px; max-height: 340px; overflow-y: auto; }
.snowmap .maplibregl-popup-content a { color: #2f5d50; }
.snowmap .maplibregl-ctrl-group button.terrain-toggle { width: 44px; height: 44px; padding: 0; color: #fff; background: #2f5d50; border-radius: 4px; font: 700 16px/1 system-ui, sans-serif; }
.snowmap .maplibregl-ctrl-group button.terrain-toggle:hover { background: #244a40; }
.pop h3 { margin: 0 0 4px; font-size: 0.95rem; }
.pop p { margin: 4px 0; }
.pop .muted { color: #66706b; }
.pop ul { margin: 4px 0; padding-left: 16px; }
.pop-routes { margin: 4px 0; padding-left: 20px; }
.pop-routes li { padding: 2px 0; }
.pop-routes .muted { display: block; }
.pop .badge { display: inline-block; }

@media (max-width: 800px) {
  .snowmap { height: auto; min-height: 100dvh; }
  .map-layout { display: flex; flex-direction: column; }
  #snowmap { height: 62dvh; flex: none; }
  .side { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  #peak-list { max-height: 320px; }
  .map-top { align-items: flex-start; }
  .map-top .sub { display: block; margin: 2px 0 0; }
}
.map-foot .credit { margin: 4px 0 0; }
