/* Montadito map. Layout and tokens follow the ride-map page: sidebar left, map right; stacks map-over-list on phones. */
:root {
  --bg: #edf1f2;
  --panel: #ffffff;
  --fg: #15232b;
  --muted: #5b6b73;
  --line: #d3dbde;
  --accent: #1f6f9c;
  --accent-soft: #dcecf5;
  --pine: #3c6e47;
  --climb: #c94f23;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --tile-filter: none;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f171b; --panel: #172228; --fg: #e6edf0; --muted: #94a5ad; --line: #2b3a42;
  --accent: #5fb0dc; --accent-soft: #1e3340; --pine: #7fc18e; --climb: #f0784a;
  --tile-filter: brightness(.78) contrast(1.05) saturate(.85);
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0f171b; --panel: #172228; --fg: #e6edf0; --muted: #94a5ad; --line: #2b3a42;
  --accent: #5fb0dc; --accent-soft: #1e3340; --pine: #7fc18e; --climb: #f0784a;
  --tile-filter: brightness(.78) contrast(1.05) saturate(.85);
  color-scheme: dark }

html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 14px; line-height: 1.45; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.app { display: grid; grid-template-columns: 380px 1fr; grid-template-rows: minmax(0, 1fr); height: 100%; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; }
.side-head { padding-block: 16px 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: 16px; border-bottom: 1px solid var(--line); }
h1 { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1; margin: 0 0 4px; letter-spacing: .01em; }
.sub { color: var(--muted); margin: 0; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--fg); border-radius: 999px; padding: 3px 10px; font: 500 12px var(--body); cursor: pointer; font-variant-numeric: tabular-nums; }
.chip.cat[aria-pressed="true"] { background: var(--cat); border-color: var(--cat); color: #fff; }
.chip:focus-visible, .eat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.list { overflow-y: auto; flex: 1; min-height: 0; padding-left: max(0px, env(safe-area-inset-left, 0px)); }
.section { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 16px 4px; }
.list-note { padding: 10px 16px 14px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.eat { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; padding: 7px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; width: 100%; text-align: left; cursor: pointer; font: inherit; }
.eat:hover, .eat.active { background: var(--accent-soft); }
.eat .ic { margin-top: 2px; margin-left: 4px; }
.eat .town { color: var(--muted); font-size: 12px; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.name { font-weight: 600; line-height: 1.25; }
.meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ic { width: 18px; height: 18px; flex: none; color: var(--fg); }
.ic-lg { width: 26px; height: 26px; }
.pop { display: grid; gap: 3px; min-width: 220px; max-width: 300px; }
.pop .pop-head { display: flex; align-items: center; gap: 8px; }
.pop .pop-head b { font-family: var(--display); font-size: 17px; font-weight: 600; line-height: 1.1; }
.pop .pop-cat { color: var(--muted); }
.pop .pop-links { margin-top: 2px; }
.pop a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pop a:hover { text-decoration: underline; }
.pin { position: absolute; display: grid; place-items: center; color: #fff; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.45); font: 700 14px var(--display); line-height: 1; cursor: pointer; }
.pin-eat { border-radius: 5px; transform: rotate(45deg); }
.pin-eat i { font-style: normal; transform: rotate(-45deg); }
.pin-s3 { width: 30px; height: 30px; left: -15px; top: -15px; font-size: 15px; }
.pin-s2 { width: 27px; height: 27px; left: -13.5px; top: -13.5px; font-size: 14px; }
.pin-s1 { width: 24px; height: 24px; left: -12px; top: -12px; font-size: 13px; }
.pin-s0 { width: 21px; height: 21px; left: -10.5px; top: -10.5px; font-size: 11px; }
.pin-wrap { width: 0; height: 0; }
.cluster { display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; border: 3px solid var(--panel); box-shadow: 0 1px 5px rgba(0,0,0,.45); font: 700 13px var(--display); font-variant-numeric: tabular-nums; width: 100%; height: 100%; }
.cluster-wrap { background: transparent; }
.lg { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 2px solid #fff; box-shadow: 0 0 2px rgba(0,0,0,.4); color: #fff; font: 700 9px var(--display); flex: none; }
.lg-diamond { border-radius: 3px; transform: rotate(45deg) scale(.85); }
.lg-diamond i { font-style: normal; transform: rotate(-45deg); }
.lg-cluster { border-radius: 50%; background: var(--accent); width: 18px; height: 18px; }
#map { height: 100%; min-height: 0; background: #c9dbe0; }
.leaflet-tile { filter: var(--tile-filter); }
.leaflet-container { font-family: var(--body); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--panel); color: var(--fg); }
.leaflet-popup-content { margin: 10px 14px; font-size: 13px; }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-attribution { font-size: 10px; }
.leaflet-bar a { background: var(--panel); color: var(--fg); border-bottom-color: var(--line); }
.expand-btn { display: none; position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); bottom: max(22px, env(safe-area-inset-bottom, 0px)); z-index: 510; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; font: 600 12px var(--body); box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; }
.app.mapfull .expand-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.legend-btn { position: absolute; right: max(10px, env(safe-area-inset-right, 0px)); top: 10px; z-index: 510; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font: 600 12px var(--body); box-shadow: 0 1px 3px rgba(0,0,0,.25); cursor: pointer; }
.legend-btn[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.legend { position: absolute; right: max(10px, env(safe-area-inset-right, 0px)); top: 46px; z-index: 500; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; display: grid; gap: 5px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-btn[aria-expanded="false"] ~ .legend { display: none; }
.status { position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 505; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.mapwrap { position: relative; min-width: 0; min-height: 0; height: 100%; }
/* Destinations list on the Iberia map */
.dests { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin-top: 10px; }
.dest-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dest { display: inline-flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; color: var(--fg); text-decoration: none; line-height: 1.2; }
.dest:hover { background: var(--accent-soft); border-color: var(--accent); }
.dest:focus-visible, .back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dest .name { font-size: 13px; }
.dest .meta { margin-top: 0; font-size: 11px; }
/* Areas list: compact entries (swatch + name; the route count is in the title), grouped Spain / Portugal, filterable */
.dest-bar { display: flex; align-items: center; gap: 8px; width: 100%; }
.dest-filter { flex: 1; min-width: 0; font: 400 13px var(--body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; height: 26px; }
.dest-filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
#dest-list { display: block; width: 100%; }
.dest-group + .dest-group { margin-top: 6px; }
.dest-country { font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 6px 0 3px; }
.dest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 6px; }
#dest-list .dest { flex-direction: row; align-items: center; gap: 6px; padding: 2px 6px; min-width: 0; border-radius: 6px; line-height: 1.15; }
#dest-list .dest .name { font: 600 14px var(--display); letter-spacing: .01em; min-width: 0; overflow-wrap: anywhere; }
#dest-list .dest:hover, #dest-list .dest.hot { border-color: var(--zone); background: color-mix(in srgb, var(--zone) 16%, transparent); }
.dest-none { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
/* Find a ride: two dual sliders (the destination page's .ctrl .dual), label and value on one line */
.find { display: grid; gap: 0; margin-bottom: 4px; }
.find-head { display: flex; align-items: center; gap: 8px; min-height: 16px; line-height: 16px; }
.find-n { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.find-reset { margin-left: auto; border: 0; background: none; padding: 0 2px; color: var(--accent); font: 600 12px var(--body); cursor: pointer; }
.find-reset:hover { text-decoration: underline; }
.find-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.find .ctrl { grid-template-columns: 138px 1fr; gap: 8px; }
.find .ctrl .lab b { display: inline; font-size: 13px; margin-left: 2px; }
/* fact strip under the Areas label: the hint, or the hovered / focused area's facts. Two lines are kept so the
   grid never moves; a season text past them lies over the grid's top edge without taking the pointer. */
.dest-facts { position: relative; min-height: calc(2 * 1.35 * 12px); font-size: 12px; line-height: 1.35; }
.dest-facts .hint { margin: 0; font-size: 12px; }
.dest-facts .facts { position: absolute; left: 0; right: 0; top: 0; z-index: 5; margin: 0; padding-bottom: 2px; background: var(--panel); color: var(--fg); font-variant-numeric: tabular-nums; pointer-events: none; }
.dest-facts .facts b { font-family: var(--display); font-weight: 600; font-size: 13px; }
.dest-facts .facts .m { color: var(--accent); font-weight: 600; }
.dest-facts .facts .season { display: block; color: var(--muted); }
/* areas without a route in the Find a ride ranges: dimmed, still clickable; matching ones show their count */
#dest-list .dest.dim:not(.hot):not(:focus-visible) { opacity: .38; }
/* the count sits on the entry's right edge, over its border, so it never takes width from the name (no reflow) */
#dest-list .dest { position: relative; padding-right: 9px; }
#dest-list .dest .n { position: absolute; right: -6px; top: 50%; transform: translateY(-50%); padding: 0 4px; min-width: 16px; border-radius: 999px; text-align: center; font: 700 11px/15px var(--display); font-variant-numeric: tabular-nums; color: #fff; background: var(--zone); box-shadow: 0 0 0 1.5px var(--panel); }
.zone-label-wrap.dim:not(.hot) > .zone-label { opacity: .35; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; background: color-mix(in srgb, var(--zone) 45%, transparent); border: 2px solid var(--zone); }
/* Zones on the map: clickable while zoomed out, outline only (no pointer) when zoomed in */
.leaflet-zones-pane path.zone { cursor: pointer; }
.leaflet-zones-pane.zones-passive path.zone { pointer-events: none; }
/* zone label: a pill "name · N routes" hanging below the zone (its south edge, or below the dot) */
.zone-label-wrap { background: none; border: 0; }
.zone-label { position: absolute; left: 0; top: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(4px + var(--dy, 0px))); display: inline-flex; align-items: baseline; gap: 6px; background: var(--panel); color: var(--fg); border: 2px solid var(--zone); border-radius: 999px; padding: 2px 9px; font: 600 13px var(--display); letter-spacing: .02em; box-shadow: 0 1px 4px rgba(0,0,0,.3); white-space: nowrap; cursor: pointer; }
.zone-label span { font: 500 11px var(--body); color: var(--muted); }
.small > .zone-label { transform: translate(calc(-50% + var(--dx, 0px)), calc(22px + var(--dy, 0px))); }
.hot > .zone-label { background: var(--zone); color: #fff; }
.hot > .zone-label span { color: #fff; }
/* label tiers, set by the layout pass in picker mode: name only, or a pin on the zone; hovering shows the full pill.
   A zone with no room for even a pin (phone) shows no label until hovered; its shape and Areas row still open it. */
.zone-label.short > span { display: none; }
.zone-label-wrap > .zone-label.pin { width: 14px; height: 14px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--zone); box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.4); transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))); }
.zone-label.pin > * { display: none; }
.zone-label-wrap.hot > .zone-label.pin { width: auto; height: auto; padding: 2px 9px; border: 2px solid var(--zone); border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.zone-label-wrap.hot > .zone-label.pin > *, .hot > .zone-label.short > span { display: inline; }
.zone-label-wrap.unplaced:not(.hot) { visibility: hidden; }
.zones-off .zone-label-wrap { pointer-events: none; }
.zones-off .zone-label { cursor: default; }
/* insets: island groups off the Iberia box, bottom-left over the main map (picker mode only) */
.insets { position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); bottom: max(22px, env(safe-area-inset-bottom, 0px)); z-index: 505; display: flex; flex-wrap: wrap-reverse; gap: 8px; pointer-events: none; }
.inset { position: relative; width: 220px; height: 160px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 5px rgba(0,0,0,.35); background: #c9dbe0; pointer-events: auto; }
.inset[hidden] { display: none; }
.inset-map { position: absolute; inset: 0; background: #c9dbe0; cursor: default; }
.inset-title { position: absolute; left: 6px; top: 5px; z-index: 1000; background: var(--panel); color: var(--fg); border-radius: 4px; padding: 1px 6px; font: 600 12px var(--display); letter-spacing: .03em; box-shadow: 0 1px 2px rgba(0,0,0,.25); pointer-events: none; }
.inset .zone-label { font-size: 11px; padding: 1px 6px; gap: 4px; border-width: 1.5px; }
.inset .zone-label span { font-size: 10px; }
.inset .zone-label-wrap > .zone-label.pin { width: 12px; height: 12px; }
.hint { margin: 6px 0 0; font-size: 13px; color: var(--fg); font-weight: 500; }
/* restaurant mode (zoom 8+): the same compact list, capped so the places list keeps the room below it */
.app:not(.picker) #dest-list { max-height: 30vh; overflow-y: auto; }
.app.picker .legend .lg-eat { display: none; }
.lg-zone { width: 16px; height: 12px; border-radius: 3px; background: rgba(29,112,184,.25); border: 2px solid #1d70b8; }
.lab2 { font-size: 12px; color: var(--muted); font-weight: 600; align-self: center; margin-right: 2px; min-width: 34px; }

/* Destination page, ported from the ride-map page */
.back { display: inline-block; color: var(--accent); font: 600 12px var(--body); text-decoration: none; margin-bottom: 6px; }
.back::before { content: "‹ "; }
.back:hover { text-decoration: underline; }
h1 { text-wrap: balance; }
.ctrls { display: grid; gap: 8px; margin-top: 10px; }
.ctrl { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px; font-size: 12px; }
.ctrl .lab { color: var(--muted); font-weight: 600; }
.ctrl .lab b { display: block; color: var(--fg); font-family: var(--display); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.dual, .single { position: relative; height: 22px; }
.dual .track, .single .track { position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: var(--line); }
.dual .fill, .single .fill { position: absolute; top: 9px; height: 4px; border-radius: 2px; background: var(--accent); }
.single .fill { left: 0; }
.dual input[type=range], .single input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; position: absolute; left: 0; top: 0; }
.dual input[type=range] { pointer-events: none; }
input[type=range]::-webkit-slider-runnable-track { height: 22px; background: transparent; }
input[type=range]::-moz-range-track { height: 22px; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; background: var(--panel); border: 3px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; }
input[type=range]::-moz-range-thumb { pointer-events: auto; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 3px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; }
input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chips .chip:not(.cat)[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.count { font-size: 12px; color: var(--muted); align-self: center; margin-left: auto; }
.gpxbtn { display: inline-block; font: 600 11px var(--body); color: var(--accent); border: 1px solid var(--accent); border-radius: 4px; padding: 2px 7px; cursor: pointer; background: transparent; white-space: nowrap; text-decoration: none; }
.gpxbtn:hover { background: var(--accent-soft); }
.stat .gpxbtn { margin-top: 4px; }
.starbtn { display: inline-grid; place-items: center; width: 26px; height: 24px; margin: 4px 4px 0 0; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; vertical-align: top; }
.starbtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.starbtn[aria-pressed="true"] { color: #c8961e; }
.starbtn[aria-pressed="true"] svg { fill: currentColor; }
.starbtn:hover { background: var(--accent-soft); }
.starbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.foot .gpxbtn { margin: 2px 0; }
.row { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: start; padding: 9px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.row:hover { background: var(--accent-soft); }
.row.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.row:focus-visible, .climb:focus-visible, .baserow:focus-visible, .gpxbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden-by-filter { display: none !important; }
.num { font-family: var(--display); font-weight: 700; font-size: 15px; color: #fff; border-radius: 6px; width: 28px; height: 24px; display: grid; place-items: center; margin-top: 1px; }
.steep { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--climb); border: 1px solid var(--climb); border-radius: 4px; padding: 0 5px; }
.stat { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.1; white-space: nowrap; }
.stat small { display: block; font-family: var(--body); font-weight: 400; font-size: 11px; color: var(--muted); }
.why { grid-column: 2 / 4; font-size: 13px; margin-top: 4px; display: none; }
.row.active .why { display: block; }
.rough { font-size: 11px; color: var(--climb); margin-top: 2px; }
.ridein { color: var(--accent); font-weight: 600; }
.onroute { font-size: 12px; margin-top: 3px; }
.onroute b { color: var(--muted); font-weight: 600; }
.climb, .baserow { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; color: inherit; width: 100%; text-align: left; cursor: pointer; font: inherit; }
.climb:hover, .baserow:hover { background: var(--accent-soft); }
.baserow.active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.climb .num { background: var(--climb); border-radius: 50%; width: 24px; height: 24px; font-size: 13px; }
.baserow .num { background: var(--panel); color: var(--accent); border: 2px solid var(--accent); border-radius: 50%; width: 24px; height: 24px; font-size: 13px; }
.foot { padding: 8px 16px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.pop .muted, .muted { color: var(--muted); }
.pop .warn { color: var(--climb); }
.pin-climb { left: -15px; top: -15px; width: 30px; height: 30px; border-radius: 50%; background: var(--climb); font-size: 15px; }
.pin-label { position: absolute; left: 18px; top: -11px; white-space: nowrap; font: 600 12px var(--body); background: var(--panel); color: var(--fg); border-radius: 4px; padding: 1px 6px; box-shadow: 0 1px 3px rgba(0,0,0,.3); pointer-events: none; }
.pin-label-climb { border: 1.5px solid var(--climb); }
.base-label { font: 600 12px var(--body); color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.lg-circle { border-radius: 50%; background: var(--climb); }
.sw { width: 18px; height: 4px; border-radius: 2px; display: inline-block; flex: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
/* weather for the selected base (weather.js) and route direction arrows */
.wx { padding: 0 16px 8px; font-size: 12px; }
.wx-t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.wx-t th, .wx-t td { padding: 3px 4px; text-align: left; white-space: nowrap; border-top: 1px solid var(--line); }
.wx-t th:first-child { padding-left: 0; }
.wx-t td:last-child, .wx-t th:last-child { padding-right: 0; }
.wx-t thead th { border-top: 0; color: var(--muted); font-weight: 600; font-size: 11px; }
.wx-t tbody th { font-weight: 600; }
.wx-t .n { text-align: right; }
.wx-arr { width: 11px; height: 11px; vertical-align: -1px; margin-right: 3px; fill: var(--accent); }
.wx-na { margin: 2px 0 4px; color: var(--muted); }
.wx-src { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.wx-src a { color: var(--muted); }
.route-arrow svg { display: block; width: 14px; height: 14px; overflow: visible; }
.lg-arrow { width: 14px; height: 14px; flex: none; fill: var(--fg); stroke: var(--panel); stroke-width: 1.3; stroke-linejoin: round; }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 52vh minmax(0, 1fr); height: 100dvh; }
  .side { order: 2; border-right: 0; border-top: 1px solid var(--line); overflow-y: auto; }
  .list { flex: none; overflow-y: visible; padding-right: max(0px, env(safe-area-inset-right, 0px)); }
  .mapwrap { order: 1; }
  .side-head { padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .legend { font-size: 11px; gap: 3px; padding: 6px 8px; }
  .expand-btn { display: block; }
  /* bottom-right over North Africa: at the phone's zoom any bottom-left spot covers the Algarve or Sierra Nevada */
  .insets { left: auto; right: max(10px, env(safe-area-inset-right, 0px)); justify-content: flex-end; }
  .inset { width: 150px; height: 80px; }
  .inset .zone-label span { display: none; }
  .zone-label-wrap > .zone-label.pin { width: 12px; height: 12px; }
  .status { bottom: 64px; }
  /* phone: one column of ~36 px rows; the sidebar scrolls */
  .dest-grid { grid-template-columns: 1fr; gap: 2px; }
  #dest-list .dest { min-height: 36px; padding: 4px 10px; }
  #dest-list .dest .name { font-size: 16px; }
  .dest-filter { height: 34px; font-size: 16px; }
  .find .ctrl { grid-template-columns: 150px 1fr; }
  .find .dual, .find .dual input[type=range] { height: 30px; }
  .find .dual .track, .find .dual .fill { top: 13px; }
  .find-reset { font-size: 14px; padding: 4px 6px; }
  .find-head { min-height: 30px; }
  #dest-list .dest .n { position: static; transform: none; margin-left: auto; box-shadow: none; font-size: 14px; line-height: 20px; min-width: 22px; }
  .app.mapfull { grid-template-rows: minmax(0, 1fr); }
  .app.mapfull .side { display: none; }
}
@media (prefers-reduced-motion: no-preference) { .eat, .chip, .row, .dest { transition: background .15s; } }
/* Repsol tables along a route: inline names when few, summary + disclosure when many */
.rt-name { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; text-decoration: underline dotted var(--muted); text-underline-offset: 2px; }
.rt-name:hover, .rt-name:focus-visible { color: var(--accent); }
.rt-cats { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; }
.rt-cat { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rt-cat .ic { width: 14px; height: 14px; }
.rt-cat b { font-variant-numeric: tabular-nums; }
.onroute .rt-cat b { color: inherit; }
.rt-towns { color: var(--muted); }
.rt-tables { font-size: 12px; margin-top: 3px; }
.rt-tables summary { cursor: pointer; color: var(--accent); font-weight: 600; width: max-content; }
.rt-town { margin-top: 3px; }
.rt-town b { font-weight: 600; }
.rt-filter { justify-self: start; margin-top: 4px; border: 1px solid var(--accent); background: transparent; color: var(--accent); border-radius: 999px; padding: 3px 10px; font: 600 12px var(--body); cursor: pointer; }
.rt-filter[aria-pressed="true"] { background: var(--accent); color: #fff; }
.rt-towns .nowrap { white-space: nowrap; }
/* Elevation profile of a route (destination.js profileSvg): filled area in the route colour, min/max on the right,
   a cursor with "km · m" under the pointer. touch-action pan-y: a horizontal drag scrubs, a vertical one scrolls. */
.elev-row { margin-top: 4px; }
.elev-note { font-size: 11px; }
.elev { display: block; max-width: 100%; height: auto; overflow: visible; touch-action: pan-y; cursor: crosshair; }
.elev-area { fill: var(--rc, var(--accent)); fill-opacity: .2; }
.elev-line { fill: none; stroke: var(--rc, var(--accent)); stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.elev-lab { font: 500 10px var(--body); fill: var(--muted); font-variant-numeric: tabular-nums; }
.elev-cur { stroke: var(--fg); stroke-width: 1; stroke-dasharray: 2 2; }
.elev-tip { font: 600 11px var(--body); fill: var(--fg); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }
.pop .elev-pop { margin: 2px 0; }
