/* Steep3D – shared styles of the massif and the peak pages.
   Look taken from the zwizualizuj.pl portal (admin panel): Inter, black on white, hairlines, square corners,
   small lowercase labels. The terrain is the picture. */

/* Inter (variable 400-600), self-hosted. (c) The Inter Project Authors, SIL Open Font License 1.1: lib/fonts/OFL.txt */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../lib/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(../lib/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #fff;
  --paper-2: #f6f6f6;
  --paper-3: #ececec;
  --ink: #0a0a0a;
  --ink-2: #4d4d4d;
  --ink-3: #767676;
  --line: #e9e9e9;
  --line-2: #d4d4d4;
  --accent: #c0392b;
  --focus: #0a0a0a;
  --c-ski: #1463c9;
  --c-mixed: #b81f5e;
  --c-rock: #d97a00;
  --serif: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --topbar-h: 46px;
  --panel-w: 392px;
  --sheet-h: 46vh;
  --radius: 0px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { text-transform: lowercase; }
button { text-transform: inherit; }   /* browsers reset it to none on buttons */
.keepcase, input, textarea, select, option, pre, code { text-transform: none; }
.detail-title, .panel-title, .topo-name, .peak-label .name, .peak-pill .name, .plate .name, .ri-name, .tt-name { text-transform: none; }   /* proper names keep their capitals: the route name in its detail panel, mountain names (titles, sidebar, map labels) */
body {
  font: 14px/1.45 var(--sans); color: var(--ink); background: var(--paper);
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.icon { flex: none; display: block; }
.noscript { margin: 3rem auto; max-width: 30rem; padding: 0 1rem; font-size: 16px; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
canvas.gl:focus-visible { outline-offset: -3px; }

/* ------------------------------------------------------------------------------------------------- layout */
.app { position: fixed; inset: 0; display: grid; grid-template-rows: var(--topbar-h) minmax(0, 1fr); }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 0 10px 0 16px; min-width: 0;
  background: var(--paper); border-bottom: 1px solid var(--line); z-index: 5;
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right));
}
.brand {
  font: 600 17px/1 var(--serif); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  padding: 6px 0;
}
.brand:hover { color: var(--accent); }
.crumb {
  color: var(--ink-3); font-size: 13px; letter-spacing: .14em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; padding-left: 14px; border-left: 1px solid var(--line);
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.lang-btn {
  appearance: none; border: 0; background: transparent; padding: 6px 10px; min-width: 40px; min-height: 32px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--ink-3); cursor: pointer;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--line-2); }
.lang-btn:hover { color: var(--ink); background: var(--paper-2); }
.lang-btn.is-on { background: var(--ink); color: var(--paper); }
.lang-btn:focus-visible { outline-offset: -2px; }
.icon-btn {
  appearance: none; border: 0; background: transparent; width: 36px; height: 36px; border-radius: var(--radius);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }

.stage { position: relative; min-height: 0; overflow: hidden; }
.viewport { position: absolute; inset: 0; background: #c8d6e4; overflow: hidden; }
canvas.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
canvas.gl:active { cursor: grabbing; }
.no-webgl canvas.gl { display: none; }
.labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* ------------------------------------------------------------------------------------------------- labels */
.label {
  position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform;
  transition: opacity .16s linear, visibility 0s linear 0s;
}
.label.is-hidden { opacity: 0; visibility: hidden; transition: opacity .16s linear, visibility 0s linear .16s; }
.label.is-settled { transition: none; }               /* end state pinned by a timer: never left half-faded */
.label.is-detached::after { display: none; }          /* the box was moved away from its point: no tick */

.peak-label {
  display: flex; flex-direction: column; align-items: center; padding-bottom: 11px;
  font-size: 12px; line-height: 1.15; font-weight: 600; color: var(--ink);
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 5px rgba(255, 255, 255, .9);
}
.peak-label .elev { font-size: 10.5px; font-weight: 500; color: var(--ink-2); letter-spacing: .02em; }
.peak-label::after {
  content: ""; position: absolute; left: calc(50% + var(--tick, 0px)); bottom: 0; width: 1px; height: 9px; background: var(--ink);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .8);
}
.peak-label.is-place { font-weight: 500; font-style: italic; font-family: var(--serif); font-size: 12.5px; color: var(--ink-2); }
.peak-label.is-place .elev { display: none; }
.peak-label.is-place::after { height: 5px; width: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--ink-2); }

.peak-pill {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; margin-bottom: 12px;
  padding: 7px 10px 7px 13px; border-radius: 0; background: var(--ink); color: #fff;
  font-size: 13px; line-height: 1.1; text-decoration: none; cursor: pointer;
  border: 1.5px solid #fff; box-shadow: 0 1px 2px rgba(15, 25, 35, .35), 0 6px 16px rgba(15, 25, 35, .22);
  transition: background-color .12s;
}
.peak-pill.is-hidden, .peak-pill.is-settled { transition: background-color .12s; }      /* the button never fades */
.peak-pill .name { font: 600 14.5px/1.1 var(--serif); letter-spacing: .01em; }
.peak-pill .elev, .peak-pill .count { font-weight: 600; }
.peak-pill .elev { color: #bdbdbd; font-weight: 500; }
.peak-pill .sep { color: #8c8c8c; }
.peak-pill .icon { margin-left: 1px; transition: transform .12s; }
.peak-pill::after {
  content: ""; position: absolute; left: calc(50% + var(--tick, 0px)); bottom: -12px; margin-left: -1px; width: 2px; height: 12px; background: var(--ink);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .85);
}
.peak-pill:hover, .peak-pill:focus-visible, .peak-pill.is-hover { background: var(--accent); }
.peak-pill.is-dim:not(:hover):not(:focus-visible):not(.is-hover) { background: #6b6b6b; color: #e6e6e6; }
.peak-pill:hover .icon, .peak-pill:focus-visible .icon, .peak-pill.is-hover .icon { transform: translateX(3px); }
.peak-pill:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 0; }
.peak-pill:active { background: #333; }

.wp-label { padding-bottom: 8px; font-size: 11px; line-height: 1.1; color: var(--ink); }
.wp-label .plate {                                    /* a paper chip: legible where route lines cross behind */
  display: flex; align-items: baseline; gap: 5px; padding: 2px 6px 2.5px; border-radius: 3px;
  background: rgba(255, 255, 255, .93); box-shadow: 0 0 0 1px rgba(26, 35, 44, .16), 0 1px 2px rgba(15, 25, 35, .14);
}
.wp-label .elev { color: var(--ink-2); font-size: 10px; }
.wp-label .wp-kind { font-size: 10.5px; letter-spacing: .12em; color: var(--ink-2); }
.wp-label::after {
  content: ""; position: absolute; left: calc(50% + var(--tick, 0px)); bottom: 0; width: 5px; height: 5px; margin-left: -2.5px;
  background: #fff; border: 1.5px solid var(--ink); border-radius: 50%;
}
.wp-label.wp--hut::after, .wp-label.wp--lift::after, .wp-label.wp--access::after { border-radius: 1px; background: var(--ink); }
.wp-label.wp--summit { font-weight: 600; font-size: 12px; }

/* --------------------------------------------------------------------------------------- viewport overlays */
.tools {
  position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 0;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(20, 30, 40, .16);
  right: max(12px, env(safe-area-inset-right));
}
.tool-btn {
  appearance: none; border: 0; background: transparent; width: 38px; height: 38px; display: grid; place-items: center;
  cursor: pointer; color: var(--ink-2);
}
.tool-btn + .tool-btn, .tools > .sun-wrap { border-top: 1px solid var(--line); }
.tool-btn:hover { background: var(--paper-2); color: var(--ink); }
.tool-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.tool-btn:focus-visible { outline-offset: -2px; }
.sun-wrap { position: relative; }
.sun-pop {
  position: absolute; right: 46px; top: 0; width: 232px; padding: 10px 12px 12px; background: var(--paper);
  border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(20, 30, 40, .18);
}
.sun-pop label { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 6px; }
.sun-pop output { font-weight: 600; color: var(--ink); }
.sun-pop input[type=range] { width: 100%; margin: 0; accent-color: var(--ink); height: 24px; }

.corner {
  position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  pointer-events: none; right: max(12px, env(safe-area-inset-right));
}
.corner > * { pointer-events: auto; }
.legend {
  background: rgba(255, 255, 255, .95); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 9px 12px 10px; font-size: 12px; color: var(--ink-2); max-width: 270px;
}
.legend h3, .legend summary { font: 600 11.5px/1 var(--sans); letter-spacing: .14em; color: var(--ink-3); }
.legend h3 { margin-bottom: 7px; }
.legend summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 2px 0; }
.legend summary::-webkit-details-marker { display: none; }
.legend summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-135deg) translate(-2px, -2px); }
.legend[open] summary::after { transform: rotate(45deg) translate(-1px, -1px); }
.legend[open] summary { margin-bottom: 6px; }
.legend summary:hover { color: var(--ink); }
.legend-row { display: flex; align-items: center; gap: 9px; padding: 2px 0; line-height: 1.25; }
.legend-row + .legend-sep { margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--line); }
.sw { flex: none; width: 30px; height: 0; border-top: 3px solid var(--ink-2); border-radius: 2px; }
.sw--dashed { border-top-style: dashed; }
.sw--faint { opacity: .3; }
.sw--skitouring { border-top-color: var(--c-ski); }
.sw--snow_ice_mixed { border-top-color: var(--c-mixed); }
.sw--mountain_climbing { border-top-color: var(--c-rock); }
.sw-dot { flex: none; width: 30px; display: flex; justify-content: center; }
.sw-dot i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2px var(--line-2); }
.sw-dot--top i { background: #fff; box-shadow: 0 0 0 2.5px var(--ink-2); width: 7px; height: 7px; }
.sw-conf { flex: none; width: 30px; display: grid; gap: 2px; justify-items: center; }
.sw-conf .conf { margin: 0; }
.legend--panel { display: none; background: transparent; border: 0; padding: 0; max-width: none; }

.tooltip {
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; max-width: 260px;
  background: var(--ink); color: #fff; padding: 6px 9px; border-radius: 0; font-size: 12.5px; line-height: 1.25;
  box-shadow: 0 2px 8px rgba(10, 20, 30, .3);
}
.tooltip .tt-name { font: 600 13.5px/1.2 var(--serif); display: block; }
.tooltip .tt-meta { color: #bdbdbd; }

.loading {
  position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; gap: 0;
  pointer-events: none; transition: opacity .35s linear; padding-left: var(--free-left, 0px);
}
.loading.is-done { opacity: 0; }
.loading-bar { order: -1; align-self: stretch; height: 3px; background: rgba(26, 35, 44, .12); }
.loading-bar span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(.03); transition: transform .25s ease-out; }
.loading-text {
  margin-top: 12px; padding: 5px 11px; border-radius: 0; background: rgba(255, 255, 255, .95); border: 1px solid var(--line-2);
  font-size: 12px; color: var(--ink-2);
}
.loading-text:empty { display: none; }

.notice {
  position: absolute; left: calc(var(--free-left, 0px) + 16px); right: 16px; top: 22%; margin: 0 auto; max-width: 440px;
  background: var(--paper); border: 1px solid var(--line-2); border-left: 3px solid var(--ink); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: 0 4px 18px rgba(20, 30, 40, .16); z-index: 2;
}
.notice--warn { border-left-color: var(--accent); }
.notice strong { display: block; font: 600 16px/1.3 var(--serif); margin-bottom: 4px; }
.notice p { color: var(--ink-2); }
.notice p:empty { display: none; }
.toast {
  position: absolute; left: calc(var(--free-left, 0px) + 12px); bottom: calc(var(--free-bottom, 0px) + 12px); max-width: min(360px, calc(100% - 24px));
  background: rgba(255, 255, 255, .97); border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 8px 12px; font-size: 12.5px; color: var(--ink-2); z-index: 2;
}

/* -------------------------------------------------------------------------------------------------- panel */
.panel { position: absolute; z-index: 4; background: var(--paper); display: flex; flex-direction: column; min-height: 0; }
.panel-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1; -webkit-overflow-scrolling: touch; }
.panel-title { font: 600 27px/1.12 var(--serif); letter-spacing: -.005em; }
.panel-sub { color: var(--ink-2); margin-top: 5px; font-size: 13.5px; }
.section-title, .filter-label {
  font: 600 11.5px/1.2 var(--sans); letter-spacing: .14em; color: var(--ink-3);
}
.hint { color: var(--ink-3); font-size: 12.5px; }
.sheet-handle { display: none; }

/* massif: the same full-height column as the peak page (rule below); the map sits to its right */
.app--massif .viewport { left: var(--panel-w); }
.app--massif .panel-scroll { padding: 16px 20px 14px; display: flex; flex-direction: column; }
.app--massif .panel-scroll > * { flex: none; }
.app--massif .gestures { margin-top: auto; padding-top: 12px; }
.app--massif .panel-scroll .finder-results { max-height: none; overflow: visible; }
.app--massif .panel-title { font-size: 23px; }
.app--massif .section-title { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.app--massif .section-title + .hint { margin-top: 5px; }
.topo-list { margin-top: 10px; display: grid; gap: 6px; }
.topo-link {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--ink); border-radius: var(--radius); text-decoration: none;
  background: var(--ink); color: #fff;
}
.topo-link .topo-name { font: 600 16.5px/1.2 var(--serif); }
.topo-link .topo-meta { grid-row: 2; font-size: 12.5px; color: #bdbdbd; }
.topo-link .icon { grid-row: 1 / 3; grid-column: 2; transition: transform .12s; }
.topo-link:hover, .topo-link:focus-visible, .topo-link.is-hover { background: var(--accent); border-color: var(--accent); }
.topo-link.is-dim:not(:hover):not(:focus-visible):not(.is-hover) { background: transparent; border-color: var(--line-2); color: var(--ink-3); }
.topo-link.is-dim:not(:hover):not(:focus-visible):not(.is-hover) .topo-meta { color: var(--ink-3); }
.topo-link:hover .icon { transform: translateX(3px); }

/* massif: route finder */
.finder { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.finder[hidden] { display: none; }
.finder-title { margin: 0; padding: 0; border: 0; }
.app--massif .finder-title { margin-top: 0; padding-top: 0; border-top: 0; }
.finder-toggle { display: none; }
.finder .filters { margin-top: 10px; padding: 12px 0 2px; border-top: 0; gap: 12px; }
.chip--expo { padding: 5px 11px; min-width: 40px; justify-content: center; }
.chip--expo[aria-pressed="true"] { --chip-c: var(--ink); }
.finder-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.finder-results { margin-top: 6px; max-height: clamp(160px, 38vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.finder-results[hidden] { display: none; }
.finder-group {
  display: block; position: sticky; top: 0; z-index: 1; padding: 8px 0 4px; background: var(--paper); text-decoration: none; color: var(--ink-3);
  font: 600 11.5px/1.2 var(--sans); letter-spacing: .14em;
}
.finder-group:hover, .finder-group:focus-visible { color: var(--ink); }
.finder-results .route-list { margin: 0 -8px 0 -4px; }
a.route-item { display: grid; text-decoration: none; color: inherit; }
a.route-item:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.gestures { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* peak: a full-height column */
.app--peak .panel, .app--massif .panel { left: 0; top: 0; bottom: 0; width: var(--panel-w); border-right: 1px solid var(--line-2); }
.app--peak .tools, .app--peak .corner { z-index: 1; }
.view { padding: 16px 20px 22px; }
.back-link, .back-btn {
  display: inline-flex; align-items: center; gap: 4px; margin: -4px 0 12px -7px; padding: 5px 9px 5px 4px; min-height: 32px;
  font-size: 12.5px; color: var(--ink-2); text-decoration: none; border: 0; background: transparent; border-radius: var(--radius); cursor: pointer;
}
.back-link:hover, .back-btn:hover { background: var(--paper-2); color: var(--ink); }
.peak-meta { margin-top: 6px; color: var(--ink-2); font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 0 8px; }
.peak-meta b { color: var(--ink); font-weight: 600; }

.filters { margin-top: 16px; padding: 14px 0 4px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.filter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.filter-value { font-size: 13px; font-weight: 600; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 11px 5px 8px;
  border: 1px solid var(--line-2); border-radius: 0; background: transparent; cursor: pointer; font-size: 13px; color: var(--ink-2);
  transition: background-color .1s, border-color .1s, color .1s;
}
.chip .icon { color: var(--chip-c, var(--ink-2)); }
.chip .n { color: var(--ink-3); font-size: 11.5px; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--chip-c, var(--ink)); border-color: var(--chip-c, var(--ink)); color: #fff; }
.chip[aria-pressed="true"] .icon, .chip[aria-pressed="true"] .n { color: #fff; }
.chip--skitouring { --chip-c: var(--c-ski); }
.chip--snow_ice_mixed { --chip-c: var(--c-mixed); }
.chip--mountain_climbing { --chip-c: #b56400; }

.range { padding: 2px 11px 0; touch-action: pan-y; }
.range-track { position: relative; height: 30px; cursor: pointer; touch-action: none; }
.range-track::before { content: ""; position: absolute; left: -11px; right: -11px; top: 14px; height: 2px; background: var(--line-2); border-radius: 1px; }
.range-fill { position: absolute; top: 13px; height: 4px; background: var(--ink); border-radius: 2px; }
.range-ticks i { position: absolute; top: 11px; width: 1px; height: 8px; margin-left: -.5px; background: var(--line-2); }
.range-thumb {
  position: absolute; top: 4px; width: 22px; height: 22px; margin-left: -11px; padding: 0; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); cursor: grab; touch-action: none;
}
.range-thumb::after { content: ""; position: absolute; inset: -9px; }                 /* 40 px touch target */
.range-thumb:hover, .range-thumb:focus-visible { background: var(--ink); }
.range-thumb:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 50%; }
.range-ends { display: flex; justify-content: space-between; margin: 1px -11px 0; font-size: 11px; color: var(--ink-3); }
.filter-note { margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }

.list-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.list-count { font-size: 13px; font-weight: 600; }
.route-list { margin: 8px -8px 0; }
.route-item {
  appearance: none; width: 100%; text-align: left; display: grid; grid-template-columns: 4px 1fr; column-gap: 10px;
  padding: 9px 8px 9px 4px; border: 0; border-radius: var(--radius); background: transparent; cursor: pointer;
}
.route-item::before { content: ""; grid-row: 1 / 3; border-radius: 2px; background: var(--route-c, var(--ink-3)); }
.route-item.is-approx::before { background: repeating-linear-gradient(to bottom, var(--route-c, var(--ink-3)) 0 5px, transparent 5px 8px); }
.route-item:hover, .route-item.is-hover { background: var(--paper-2); }
.route-item:focus-visible { outline-offset: -2px; }
.route-list li + li { border-top: 1px solid var(--line); }
.ri-name { font: 600 15.5px/1.25 var(--serif); }
.ri-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; margin-top: 5px; }
.gchip {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 3px; font-size: 11.5px; font-weight: 600;
  line-height: 1.5; color: var(--ink); background: #f6f6f6; white-space: nowrap;
}
.gchip--minor { font-weight: 500; color: var(--ink-2); background: transparent; }
.acts { display: inline-flex; gap: 3px; margin-left: auto; }
.act { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--ink-3); }
.act--skitouring { background: var(--c-ski); }
.act--snow_ice_mixed { background: var(--c-mixed); }
.act--mountain_climbing { background: var(--c-rock); }
.badge {
  display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 11.5px; font-weight: 600; letter-spacing: .12em;
  line-height: 1.55; white-space: nowrap;
}
.badge--published { background: var(--ink); color: #fff; }
.badge--approximate { border: 1px dashed var(--ink-2); color: var(--ink-2); padding: 0 5px; }
.badge--conf { border: 1px solid var(--line-2); color: var(--ink-2); padding: 0 5px; }
.badge--conf .conf { margin: 0 5px 0 0; }
.conf { display: inline-flex; gap: 2px; margin-left: 5px; vertical-align: 1px; }
.conf i { width: 5px; height: 5px; border-radius: 50%; border: 1px solid currentColor; }
.conf i.on { background: currentColor; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.empty { margin-top: 14px; color: var(--ink-2); }
.link-btn { appearance: none; border: 0; background: none; padding: 4px 0; color: var(--focus); text-decoration: underline; cursor: pointer; }
.panel-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink); text-decoration: none;
  font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }

/* route detail */
.detail-title { font: 600 23px/1.18 var(--serif); }
.detail-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.detail-chips .acts { margin-left: 0; }
.lead { margin-top: 12px; font: 400 15.5px/1.5 var(--serif); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.stats { margin-top: 16px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }
.stat { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.stat--wide { grid-column: 1 / 3; }
.stat dt { font: 600 11px/1.3 var(--sans); letter-spacing: .12em; color: var(--ink-3); }
.stat dd { margin-top: 2px; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.stat--wide dd { font-weight: 500; }
.detail-section { margin-top: 20px; }
.detail-section > h3 { font: 600 11.5px/1.2 var(--sans); letter-spacing: .14em; color: var(--ink-3); margin-bottom: 8px; }
.prose { font: 400 15px/1.58 var(--serif); overflow-wrap: anywhere; }
.prose p + p { margin-top: .7em; }
.prose h4 { font: 600 13px/1.3 var(--sans); margin-top: 1.35em; letter-spacing: .01em; }
.prose h4.sub { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 1em; }
.prose h4 + p, .prose h4 + h4 { margin-top: .3em; }
.prose h4:first-child { margin-top: 0; }
.translated { margin: 0 0 12px; padding: 7px 10px; border-left: 2px solid var(--line-2); background: var(--paper-2); font-size: 12.5px; color: var(--ink-2); }
.line-note { font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.line-kind { font-weight: 600; color: var(--ink); }
.sources { display: grid; gap: 7px; font-size: 13px; }
.sources li { color: var(--ink-2); }
.sources a, .attr-list a, .dialog a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.sources a:hover, .attr-list a:hover { text-decoration-color: var(--ink); }
.sources .src-main { font-weight: 600; }
.gpx-note { margin-top: 8px; font-size: 11.5px; line-height: 1.45; color: var(--ink-3); }
.support-text { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin-bottom: 8px; }
.topo-list { gap: 0; }
.topo-row { padding: 8px 0; border-top: 1px solid var(--line); }
.topo-row:first-child { border-top: 0; padding-top: 0; }
.topo-name { display: flex; align-items: center; gap: 6px; }
.topo-name .icon, .topo-list .icon { flex: none; color: var(--ink-3); }
.topo-sub { margin-top: 2px; font-size: 12px; line-height: 1.45; color: var(--ink-3); overflow-wrap: anywhere; }
.topo-list li:not(.topo-row) { padding: 6px 0; display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); }
.credit { margin-top: 10px; font-size: 11.5px; line-height: 1.45; color: var(--ink-3); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------------------------------------- dialog */
.dialog {
  border: 1px solid var(--line-2); border-radius: 0; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 720px);
  background: var(--paper); color: var(--ink); box-shadow: 0 12px 40px rgba(10, 20, 30, .3);
}
.dialog[open] { display: flex; flex-direction: column; }
.dialog::backdrop { background: rgba(20, 28, 36, .45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 10px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font: 600 19px/1.2 var(--serif); }
.dialog-body { padding: 16px 20px 20px; overflow-y: auto; display: grid; gap: 18px; font-size: 13.5px; }
.dialog-body h3 { font: 600 11.5px/1.2 var(--sans); letter-spacing: .14em; color: var(--ink-3); margin-bottom: 7px; }
.attr-list { display: grid; gap: 6px; }
.attr-list .lic { color: var(--ink-2); }
.safety { padding: 12px 14px; border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--radius); background: #f6f6f6; }
.safety p { font: 400 14.5px/1.5 var(--serif); }

/* ------------------------------------------------------------------------------------------------- phones */
@media (max-width: 760px) {
  :root { --topbar-h: 44px; }
  .crumb { display: none; }
  .tools { right: 8px; top: 8px; }
  /* phones: the route legend lives in the sheet; only the slope legend stays on the map, above the sheet */
  .corner { right: 8px; bottom: calc(var(--free-bottom, 0px) + 8px); }
  .corner > :not(.slope-legend) { display: none; }
  .legend--panel { display: block; }

  .app--massif .viewport { left: 0; }
  .app--massif .panel {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 42%; border-right: 0; border-top: 1px solid var(--line-2);
    box-shadow: 0 -4px 18px rgba(20, 30, 40, .16);
  }
  .app--massif .panel-scroll { padding: 12px 14px; padding-bottom: max(12px, env(safe-area-inset-bottom)); display: block; }
  .app--massif .panel-scroll .finder-results { max-height: 26vh; overflow-y: auto; }
  .app--massif .panel-title { font-size: 19px; }
  .app--massif .panel-sub, .app--massif .gestures, .app--massif .section-title + .hint { display: none; }
  .app--massif .section-title { margin-top: 10px; padding-top: 10px; }
  .app--massif .finder-title { display: none; }
  .finder { margin-top: 10px; padding-top: 0; }
  .finder-toggle {
    appearance: none; display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 40px; padding: 0 12px;
    border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink); cursor: pointer;
    font: 600 11.5px/1.2 var(--sans); letter-spacing: .14em;
  }
  .finder-toggle::after { content: "+"; font-size: 16px; }
  .finder.is-open .finder-toggle::after { content: "\2212"; }
  .finder-body { display: none; }
  .finder.is-open .finder-body { display: block; }

  .app--peak .panel {
    left: 0; right: 0; top: auto; bottom: 0; width: auto; height: var(--sheet-h); max-height: calc(100% - 8px);
    border-right: 0; border-top: 1px solid var(--line-2); border-radius: 0;
    box-shadow: 0 -4px 18px rgba(20, 30, 40, .16); transition: height .22s ease;
  }
  .app--peak .panel.is-dragging { transition: none; }
  .sheet-handle {
    display: grid; place-items: center; flex: none; width: 100%; height: 26px; border: 0; background: transparent; cursor: grab;
    touch-action: none; border-radius: 0;
  }
  .sheet-handle .grip { width: 38px; height: 4px; border-radius: 2px; background: var(--line-2); }
  .sheet-handle:focus-visible { outline-offset: -3px; }
  .view { padding: 2px 16px 22px; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .panel-title { font-size: 22px; }
  .detail-title { font-size: 20px; }
  .sun-pop { width: 200px; }
  .loading { padding-left: 0; }
  .notice { left: 12px; top: 12%; }
}
@media (max-width: 380px) {
  .view { padding-left: 13px; padding-right: 13px; }
  .brand { font-size: 16px; }
  .peak-pill { font-size: 12px; padding: 6px 8px 6px 11px; gap: 5px; }
  .peak-pill .name { font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
@media (forced-colors: active) {
  .chip[aria-pressed="true"], .lang-btn.is-on { outline: 2px solid CanvasText; outline-offset: -2px; }
}

/* ------------------------------------------------------------------- zwizualizuj.pl portal look (overrides) */
body { font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
.brand { font: 600 16px/1 var(--sans); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); opacity: .7; }
.panel-title, .detail-title, .dialog-head h2 { font-weight: 500; letter-spacing: .015em; }
.ri-name, .topo-link .topo-name, .peak-pill .name, .tooltip .tt-name, .notice strong { font-weight: 500; letter-spacing: -.01em; }
.crumb, .legend h3, .legend summary, .stat dt, .detail-section > h3, .dialog-body h3, .section-title, .filter-label { font-weight: 500; letter-spacing: .15em; }
.lead, .prose, .safety p { line-height: 1.6; }
.prose h4 { font-weight: 500; }
.peak-label.is-place { font-style: normal; font-weight: 400; color: var(--ink-3); }
.lang-btn { font-weight: 500; }
.btn { letter-spacing: .01em; }
:focus-visible { border-radius: 0; }

/* slope-angle overlay */
.tool-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.slope-legend[hidden] { display: none; }
.slope-scale { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.slope-step { display: inline-flex; align-items: center; gap: 5px; }
.slope-step i { width: 12px; height: 12px; display: inline-block; opacity: .8; }

/* elevation profile */
.profile { position: relative; margin: 0 -2px; touch-action: none; }
.profile svg { display: block; width: 100%; height: 110px; overflow: visible; cursor: crosshair; }
.profile .p-grid { stroke: var(--line); stroke-width: 1; }
.profile .p-fill { fill: var(--paper-2); }
.profile .p-cursor { stroke: var(--ink); stroke-width: 1; }
.profile .p-lab { font: 500 10.5px var(--sans); fill: var(--ink-3); }
.profile .p-read { font: 600 10.5px var(--sans); fill: var(--ink); }
.profile-slopes { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.profile-slopes i { display: inline-block; width: 10px; height: 3px; margin-right: 4px; vertical-align: middle; }

/* feedback dialog */
.fb-form { display: grid; gap: 14px; }
.fb-field { display: grid; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.fb-field legend, .fb-label { font: 600 11.5px/1.2 var(--sans); letter-spacing: .14em; color: var(--ink-3); padding: 0; margin-bottom: 5px; }
.fb-radio { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 13.5px; cursor: pointer; }
.fb-radio input { margin: 3px 0 0; accent-color: var(--ink); flex: none; }
.fb-form input[type=date], .fb-form input[type=text], .fb-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-radius: 0; padding: 8px 10px;
}
.fb-form textarea { resize: vertical; min-height: 110px; }
.fb-form input:focus-visible, .fb-form textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.fb-error { color: #b3261e; font-size: 12.5px; }
.fb-status:empty { display: none; }
.fb-actions { margin-top: 14px; }
.fb-source { line-height: 1.5; }

/* ------------------------------------------------------------------- artsy mode (dots on near-black, artsy.js) */
.tool-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.app.artsy { --art-ink: #ece8df; --art-dim: #8f8a80; --art-bg: #0d0d0d; --art-line: #34322e; }
.app.artsy .viewport { background: var(--art-bg); }
.app.artsy .tools, .app.artsy .sun-pop { background: #141414; border-color: var(--art-line); box-shadow: none; }
.app.artsy .tool-btn { color: #c9c4ba; }
.app.artsy .tool-btn + .tool-btn, .app.artsy .tools > .sun-wrap { border-top-color: var(--art-line); }
.app.artsy .tool-btn:hover:not(:disabled) { background: #222; color: var(--art-ink); }
.app.artsy .tool-btn[aria-pressed="true"], .app.artsy .tool-btn[aria-expanded="true"] { background: var(--art-ink); color: var(--art-bg); }
.app.artsy .sun-pop label { color: var(--art-dim); }
.app.artsy .sun-pop output { color: var(--art-ink); }
.app.artsy .sun-pop input[type=range] { accent-color: var(--art-ink); }
.app.artsy .corner .legend { display: none; }              /* activity colours do not apply: red is the only colour */
.app.artsy .loading-text { color: var(--art-dim); background: rgba(13, 13, 13, .9); border-color: var(--art-line); }
.app.artsy .loading-bar span { background: var(--art-ink); }
/* map labels: light text straight on the dark, thin leaders, no plates */
.app.artsy .peak-label { color: var(--art-ink); text-shadow: 0 0 2px var(--art-bg), 0 0 4px var(--art-bg); font-weight: 500; }
.app.artsy .peak-label .elev { color: var(--art-dim); }
.app.artsy .peak-label::after { background: var(--art-dim); box-shadow: none; }
.app.artsy .peak-label.is-place { color: var(--art-dim); }
.app.artsy .peak-label.is-place::after { background: var(--art-dim); }
.app.artsy .peak-pill { background: transparent; color: var(--art-ink); border: 1px solid var(--art-ink); box-shadow: none; padding: 5px 9px 5px 11px; }
.app.artsy .peak-pill .elev, .app.artsy .peak-pill .sep { color: var(--art-dim); }
.app.artsy .peak-pill::after { width: 1px; margin-left: -.5px; background: var(--art-ink); box-shadow: none; }
.app.artsy .peak-pill:hover, .app.artsy .peak-pill:focus-visible, .app.artsy .peak-pill.is-hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.app.artsy .peak-pill:hover .elev, .app.artsy .peak-pill.is-hover .elev, .app.artsy .peak-pill:hover .sep { color: #f3d6d2; }
.app.artsy .peak-pill.is-dim:not(:hover):not(:focus-visible):not(.is-hover) { background: transparent; color: var(--art-dim); border-color: var(--art-line); }
.app.artsy .peak-pill:focus-visible { outline-color: var(--art-ink); }
.app.artsy .wp-label { color: var(--art-ink); }
.app.artsy .wp-label .plate { background: transparent; box-shadow: none; padding: 0 2px; text-shadow: 0 0 2px var(--art-bg), 0 0 4px var(--art-bg); }
.app.artsy .wp-label .elev, .app.artsy .wp-label .wp-kind { color: var(--art-dim); }
.app.artsy .wp-label::after { background: var(--art-bg); border: 1px solid var(--art-ink); width: 4px; height: 4px; margin-left: -2px; }
.app.artsy .wp-label.wp--hut::after, .app.artsy .wp-label.wp--lift::after, .app.artsy .wp-label.wp--access::after { background: var(--art-ink); }
.app.artsy .notice { background: #141414; color: var(--art-ink); border-top-color: var(--art-line); border-right-color: var(--art-line); border-bottom-color: var(--art-line); }

/* ------------------------------------------------- massif: rollout plan pins + sidebar rows (rollout.js, rollout.json) */
/* model ready, routes soon: the button outlined instead of filled */
.peak-pill.is-model { background: #fff; color: var(--ink); border-color: var(--ink); }
.peak-pill.is-model .elev { color: var(--ink-2); }
.peak-pill.is-model .sep { color: var(--ink-3); }
.peak-pill.is-model .count { font-weight: 500; color: var(--ink-2); }
.peak-pill.is-model:hover, .peak-pill.is-model:focus-visible, .peak-pill.is-model.is-hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.peak-pill.is-model:hover .elev, .peak-pill.is-model:hover .count, .peak-pill.is-model.is-hover .elev, .peak-pill.is-model.is-hover .count,
.peak-pill.is-model:focus-visible .elev, .peak-pill.is-model:focus-visible .count { color: #f3d6d2; }
.peak-pill.is-model:active { background: #333; color: #fff; }
/* buttons stacked by the label layer (stackPinned): the tick becomes a leader line down to the summit */
.peak-pill.is-raised::after { height: calc(12px + var(--lead, 0px)); bottom: calc(-12px - var(--lead, 0px)); }

/* planned page: no plate, a short stem with a ring head, the name as text with a soft halo */
.rollout-pin {
  pointer-events: auto; appearance: none; display: inline-flex; align-items: flex-start; gap: 3px;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; cursor: pointer; text-align: left;
  font: 500 11.5px/1 var(--sans); color: #5a5a5a;
  text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff, 0 0 5px rgba(255, 255, 255, .9);
}
.rollout-pin .rp-mark { position: relative; flex: none; width: 12px; height: 21px; }     /* the point = bottom of the stem, 6 px from the left (anchorX) */
.rollout-pin .rp-mark::before {
  content: ""; position: absolute; left: 2px; top: 0; width: 8px; height: 8px; border: 1.5px solid #707070; border-radius: 50%;
  background: rgba(255, 255, 255, .85);
}
.rollout-pin .rp-mark::after { content: ""; position: absolute; left: 5.5px; top: 8px; width: 1px; height: 13px; background: #707070; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .7); }
.rollout-pin .rp-text { display: inline-flex; align-items: baseline; gap: 3px; margin-top: -1px; white-space: nowrap; }
.rollout-pin .rp-n { font-size: 9.5px; font-weight: 500; color: #8c8c8c; font-variant-numeric: tabular-nums; }
.rollout-pin.is-compact .rp-text { display: none; }                  /* crowded (zoomed out): the pin without its text */
.rollout-pin:hover, .rollout-pin:focus-visible, .rollout-pin.is-hover, .rollout-pin.is-selected { color: var(--ink); }
.rollout-pin:hover .rp-mark::before, .rollout-pin:focus-visible .rp-mark::before, .rollout-pin.is-hover .rp-mark::before,
.rollout-pin.is-selected .rp-mark::before { border-color: var(--accent); }
.rollout-pin:hover .rp-mark::after, .rollout-pin:focus-visible .rp-mark::after, .rollout-pin.is-hover .rp-mark::after,
.rollout-pin.is-selected .rp-mark::after { background: var(--accent); }
.rollout-pin:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

/* artsy mode: light marks on near-black, red only on hover / focus */
.app.artsy .peak-pill.is-model { background: transparent; color: var(--art-ink); border-color: var(--art-ink); }
.app.artsy .peak-pill.is-model .elev, .app.artsy .peak-pill.is-model .sep, .app.artsy .peak-pill.is-model .count { color: var(--art-dim); }
.app.artsy .peak-pill.is-model:hover, .app.artsy .peak-pill.is-model:focus-visible, .app.artsy .peak-pill.is-model.is-hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.app.artsy .peak-pill.is-model:hover .elev, .app.artsy .peak-pill.is-model:hover .count, .app.artsy .peak-pill.is-model.is-hover .elev,
.app.artsy .peak-pill.is-model.is-hover .count, .app.artsy .peak-pill.is-model:focus-visible .count { color: #f3d6d2; }
.app.artsy .rollout-pin { color: var(--art-ink); text-shadow: 0 0 2px var(--art-bg), 0 0 4px var(--art-bg); }
.app.artsy .rollout-pin .rp-n { color: var(--art-dim); }
.app.artsy .rollout-pin .rp-mark::before { background: transparent; border: 1px solid var(--art-ink); }
.app.artsy .rollout-pin .rp-mark::after { background: var(--art-dim); box-shadow: none; }
.app.artsy .rollout-pin:hover, .app.artsy .rollout-pin:focus-visible, .app.artsy .rollout-pin.is-hover, .app.artsy .rollout-pin.is-selected { color: #fff; }
.app.artsy .rollout-pin:hover .rp-mark::before, .app.artsy .rollout-pin:focus-visible .rp-mark::before, .app.artsy .rollout-pin.is-hover .rp-mark::before,
.app.artsy .rollout-pin.is-selected .rp-mark::before { border-color: var(--accent); }
.app.artsy .rollout-pin:hover .rp-mark::after, .app.artsy .rollout-pin:focus-visible .rp-mark::after, .app.artsy .rollout-pin.is-hover .rp-mark::after,
.app.artsy .rollout-pin.is-selected .rp-mark::after { background: var(--accent); }
.app.artsy .rollout-pin:focus-visible { outline-color: var(--art-ink); }

/* sidebar: one compact line per page, grouped live / 3d model ready / planned */
/* (beats the peak page's `.topo-list li:not(.topo-row)` rule) */
.topo-list li.rollout-group:not(.topo-row), .topo-list .rollout-rows > li:not(.topo-row) { display: block; padding: 0; border-top: 0; }
.rollout-head { font: 600 10.5px/1.2 var(--sans); letter-spacing: .14em; color: var(--ink-3); margin: 4px 0 2px; }
.rollout-group:first-child .rollout-head { margin-top: 0; }
.rollout-rows { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.rollout-row {
  appearance: none; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto 15px; align-items: center; column-gap: 7px;
  width: 100%; min-height: 21px; margin: 0; padding: 2px 4px; border: 0; border-radius: 0; background: none; box-shadow: none;
  font: 500 12.5px/1.25 var(--sans); color: var(--ink-2); text-align: left; text-decoration: none; cursor: pointer;
}
.rollout-row .rr-n {
  display: block; height: 16px; font-size: 10px; line-height: 14px; font-weight: 600; text-align: center; color: var(--ink-3);
  border: 1px solid transparent; font-variant-numeric: tabular-nums;
}
.rollout-row .topo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rollout-row .rr-meta { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.rollout-row .icon { justify-self: end; transition: transform .12s; }
.rollout-row:hover, .rollout-row:focus-visible, .rollout-row.is-hover { background: var(--paper-2); color: var(--ink); }
.rollout-row:hover .icon, .rollout-row:focus-visible .icon, .rollout-row.is-hover .icon { transform: translateX(2px); }
.rollout-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
.rollout-row.is-live, .rollout-row.is-model { min-height: 26px; padding: 4px; color: var(--ink); }
.rollout-row.is-live .topo-name, .rollout-row.is-model .topo-name { font: 600 14px/1.2 var(--serif); }
.rollout-row.is-live .rr-n { background: var(--ink); border-color: var(--ink); color: #fff; }
.rollout-row.is-model .rr-n { border-color: var(--ink); color: var(--ink); }
.rollout-row.is-live:hover, .rollout-row.is-live:focus-visible, .rollout-row.is-live.is-hover { background: var(--accent); color: #fff; }
.rollout-row.is-live:hover .rr-meta, .rollout-row.is-live:focus-visible .rr-meta, .rollout-row.is-live.is-hover .rr-meta { color: #f3d6d2; }
.rollout-row.is-live:hover .rr-n, .rollout-row.is-live.is-hover .rr-n { border-color: #fff; }
.rollout-row.is-live.is-dim:not(:hover):not(:focus-visible):not(.is-hover) { color: var(--ink-3); }
.rollout-row.is-live.is-dim:not(:hover):not(:focus-visible):not(.is-hover) .rr-n { background: var(--ink-3); border-color: var(--ink-3); }
.rollout-row.is-planned { min-height: 19px; padding: 1px 4px; font-size: 12px; }    /* 17 one-line rows: the finder stays in view at 800 px */
.rollout-row.is-selected { background: var(--paper-3); color: var(--ink); }
.rollout-row.is-selected .rr-n { color: var(--accent); }
/* live rows keep the class of the former big buttons (topo-link): neutralise that look */
.rollout-row.topo-link { grid-template-rows: auto; border: 0; background: none; color: var(--ink); }
.rollout-row.topo-link .icon { grid-row: auto; grid-column: auto; }
.rollout-row.topo-link:hover, .rollout-row.topo-link:focus-visible, .rollout-row.topo-link.is-hover { background: var(--accent); color: #fff; }
.rollout-row.topo-link.is-dim:not(:hover):not(:focus-visible):not(.is-hover) { background: none; }

/* the "peaks" menu: a disclosure (header = toggle) with a nested "planned (n)" disclosure, both remembered */
.app--massif .section-title.rollout-title { padding-top: 6px; }
.rollout-toggle, .rollout-sub {
  appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; border: 0; border-radius: 0;
  background: none; cursor: pointer; text-align: left; color: inherit; font: inherit; letter-spacing: inherit;
}
.rollout-toggle { padding: 8px 4px; }
.rollout-toggle .rollout-menu-label { color: var(--ink); }
.rollout-toggle .rollout-menu-sum { color: var(--ink-3); font-weight: 500; letter-spacing: .06em; }
.rollout-toggle .icon, .rollout-sub .icon { margin-left: auto; flex: none; transition: transform .15s; }
.rollout-toggle[aria-expanded="true"] .icon, .rollout-sub[aria-expanded="true"] .icon { transform: rotate(180deg); }
.rollout-toggle:hover, .rollout-sub:hover { background: var(--paper-2); }
.rollout-toggle:focus-visible, .rollout-sub:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 0; }
.topo-list.rollout-menu { margin-top: 2px; gap: 4px; }
.topo-list.rollout-menu[hidden], .rollout-rows[hidden] { display: none; }
.rollout-sub { padding: 4px 4px; font: 600 10.5px/1.2 var(--sans); letter-spacing: .14em; color: var(--ink-3); border-top: 1px solid var(--line); }
.rollout-sub:hover { color: var(--ink); }
.rollout-group--planned .rollout-rows { margin-top: 2px; }
@media (max-width: 760px) {
  /* phones: the open menu floats over the map just above the bottom sheet, so the sheet (and the map) stay put */
  .app--massif .topo-list.rollout-menu {
    position: fixed; left: 8px; right: 8px; bottom: calc(var(--rollout-sheet-h, 40vh) + 6px); z-index: 6;
    max-height: calc(100vh - var(--rollout-sheet-h, 40vh) - var(--topbar-h, 44px) - 20px); overflow-y: auto; overscroll-behavior: contain;
    margin: 0; padding: 8px 10px; background: var(--paper); border: 1px solid var(--line-2); box-shadow: 0 4px 18px rgba(20, 30, 40, .18);
  }
  .rollout-row, .rollout-row.is-planned { min-height: 32px; }                                  /* finger-sized */
  .rollout-sub { min-height: 32px; }
}

/* ---------------------------------------------- activity glyphs: monochrome; colour only as a 6 x 6 swatch */
/* filter chips: ink glyph, black when pressed; the line colour of the activity as a small square */
.chip--skitouring { --chip-c: var(--ink); --sw-c: var(--c-ski); }
.chip--snow_ice_mixed { --chip-c: var(--ink); --sw-c: var(--c-mixed); }
.chip--mountain_climbing { --chip-c: var(--ink); --sw-c: var(--c-rock); }
.chip .icon { color: currentColor; }
.chip--skitouring::before, .chip--snow_ice_mixed::before, .chip--mountain_climbing::before, .sw-act::before {
  content: ""; flex: none; width: 6px; height: 6px; background: var(--sw-c, var(--ink-3));
}
.chip[aria-pressed="true"]::before { box-shadow: 0 0 0 1px #fff; }
/* route rows: a small outlined square with the ink glyph (was a coloured disc) */
.act, .act--skitouring, .act--snow_ice_mixed, .act--mountain_climbing {
  width: 20px; height: 20px; border-radius: 0; background: transparent; color: var(--ink); border: 1px solid var(--line-2);
}
.route-item:hover .act, .route-item.is-hover .act { border-color: var(--ink-3); }
/* the bar left of a route row: ink (solid = published track, dashed = approximate), no activity colour */
.route-item::before { background: var(--ink); }
.route-item.is-approx::before { background: repeating-linear-gradient(to bottom, var(--ink-3) 0 5px, transparent 5px 8px); }
/* legend: colour square + glyph, in the 30 px swatch column */
.sw-act { flex: none; width: 30px; display: inline-flex; align-items: center; gap: 5px; color: var(--ink); }
.sw-act.sw--skitouring { --sw-c: var(--c-ski); }
.sw-act.sw--snow_ice_mixed { --sw-c: var(--c-mixed); }
.sw-act.sw--mountain_climbing { --sw-c: var(--c-rock); }
.app.artsy .sw-act { color: var(--art-ink); }
/* massif page: no activity colours at all (they only mean something next to the coloured lines of a peak page) */
.app--massif .chip--skitouring::before, .app--massif .chip--snow_ice_mixed::before, .app--massif .chip--mountain_climbing::before, .app--massif .sw-act::before { display: none; }

/* ------------------------------------------------- artsy labels v2: black plates, thin off-white outline, over the dots (massif, artsy.js) */
html.look-negative .app--massif .viewport { background: #0b0b0b; }          /* dark before the first frame: no flash */
html.look-negative .app--massif .loading-text { background: rgba(13, 13, 13, .9); border-color: #34322e; color: #8f8a80; }
/* summits: name + elevation on a plate (drawn by ::before, so the tick space below stays clear) */
html .app.artsy .peak-label {
  flex-direction: row; align-items: baseline; gap: 5px; padding: 3px 6px 12px; color: var(--art-ink); text-shadow: none; font-weight: 500;
}
html .app.artsy .peak-label::before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 9px; background: #0d0d0d; box-shadow: inset 0 0 0 1px rgba(236, 232, 223, .45); z-index: -1; }
html .app.artsy .peak-label .elev { color: rgba(236, 232, 223, .6); }
html .app.artsy .peak-label::after { height: 9px; background: var(--art-ink); box-shadow: none; }
html .app.artsy .peak-label.is-place { font-size: 11px; color: rgba(236, 232, 223, .6); padding: 2px 5px 11px; }
html .app.artsy .peak-label.is-place::before { bottom: 9px; box-shadow: none; }   /* towns: no outline */
html .app.artsy .peak-label.is-place::after { height: 5px; width: 5px; margin-left: -2.5px; bottom: 1px; border-radius: 50%; background: var(--art-ink); }
/* live / model buttons: the classic pill inverted to white */
html .app.artsy .peak-pill, html .app.artsy .peak-pill.is-model { background: #0d0d0d; color: var(--art-ink); border: 1px solid var(--art-ink); box-shadow: none; padding: 6px 10px 6px 12px; }
html .app.artsy .peak-pill .elev, html .app.artsy .peak-pill.is-model .elev { color: rgba(236, 232, 223, .6); }
html .app.artsy .peak-pill .sep, html .app.artsy .peak-pill.is-model .sep { color: rgba(236, 232, 223, .6); }
html .app.artsy .peak-pill .count, html .app.artsy .peak-pill.is-model .count { color: var(--art-ink); }
html .app.artsy .peak-pill::after { width: 1px; margin-left: -.5px; background: var(--art-ink); box-shadow: none; }
html .app.artsy .peak-pill:hover, html .app.artsy .peak-pill:focus-visible, html .app.artsy .peak-pill.is-hover,
html .app.artsy .peak-pill.is-model:hover, html .app.artsy .peak-pill.is-model:focus-visible, html .app.artsy .peak-pill.is-model.is-hover {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
html .app.artsy .peak-pill:hover .elev, html .app.artsy .peak-pill:hover .sep, html .app.artsy .peak-pill:hover .count,
html .app.artsy .peak-pill.is-hover .elev, html .app.artsy .peak-pill.is-hover .sep, html .app.artsy .peak-pill.is-hover .count,
html .app.artsy .peak-pill:focus-visible .elev, html .app.artsy .peak-pill:focus-visible .count { color: #f6dedb; }
html .app.artsy .peak-pill.is-dim:not(:hover):not(:focus-visible):not(.is-hover) { background: #0d0d0d; border-color: rgba(236, 232, 223, .45); color: rgba(236, 232, 223, .6); }
html .app.artsy .peak-pill:focus-visible { outline: 2px solid var(--art-ink); outline-offset: 2px; }
/* model-ready buttons (planned): thinner-looking outline */
html .app.artsy .peak-pill.is-model { border-color: rgba(236, 232, 223, .45); }
html .app.artsy .peak-pill.is-model:hover, html .app.artsy .peak-pill.is-model:focus-visible, html .app.artsy .peak-pill.is-model.is-hover { border-color: var(--accent); }
/* planned pins: number + name on a plate; ring and stem off-white */
html .app.artsy .rollout-pin { color: var(--art-ink); text-shadow: none; }
html .app.artsy .rollout-pin .rp-text { background: #0d0d0d; box-shadow: inset 0 0 0 1px rgba(236, 232, 223, .45); padding: 2px 5px 2.5px; margin-top: -3px; gap: 4px; }
html .app.artsy .rollout-pin .rp-n { color: rgba(236, 232, 223, .6); }
html .app.artsy .rollout-pin .rp-mark::before { background: var(--art-bg); border-color: var(--art-ink); }
html .app.artsy .rollout-pin .rp-mark::after { background: var(--art-ink); box-shadow: none; }
html .app.artsy .rollout-pin:hover .rp-text, html .app.artsy .rollout-pin:focus-visible .rp-text,
html .app.artsy .rollout-pin.is-hover .rp-text, html .app.artsy .rollout-pin.is-selected .rp-text { background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: #fff; }
html .app.artsy .rollout-pin:focus-visible { outline: 2px solid var(--art-ink); outline-offset: 2px; }
html .app.artsy .rollout-pin:hover .rp-n, html .app.artsy .rollout-pin:focus-visible .rp-n,
html .app.artsy .rollout-pin.is-hover .rp-n, html .app.artsy .rollout-pin.is-selected .rp-n { color: #f6dedb; }
html .app.artsy .rollout-pin:hover .rp-mark::before, html .app.artsy .rollout-pin.is-hover .rp-mark::before,
html .app.artsy .rollout-pin.is-selected .rp-mark::before, html .app.artsy .rollout-pin:focus-visible .rp-mark::before { border-color: var(--accent); }
html .app.artsy .rollout-pin:hover .rp-mark::after, html .app.artsy .rollout-pin.is-hover .rp-mark::after,
html .app.artsy .rollout-pin.is-selected .rp-mark::after, html .app.artsy .rollout-pin:focus-visible .rp-mark::after { background: var(--accent); }

/* ------------------------------------------------- accent touches: the logo's orange-red, a few restrained uses on the home page (massif) */
.app--massif { --accent-dk: #d6453a; }               /* on the near-black plates of the artsy look (the logo's colour on dark) */
.app--massif:not(.artsy) { --accent-dk: #e0553f; }   /* classic: black pills, slightly lighter for contrast (about 5:1) */
/* live peak pills (not the 3D-model / planned ones): count + arrow, leader tick, and a small "/" before the name (drawn in the left padding: the box does not change) */
html .app--massif .peak-pill:not(.is-model):not(.is-dim):not(:hover):not(:focus-visible):not(.is-hover) .count,
html .app--massif .peak-pill:not(.is-model):not(.is-dim):not(:hover):not(:focus-visible):not(.is-hover) .icon { color: var(--accent-dk); }
html .app.artsy .peak-pill:not(.is-model)::after { background: var(--accent-dk); }
html .app.artsy .peak-pill:not(.is-model)::before {
  content: ""; position: absolute; left: 5px; top: 50%; width: 2px; height: 11px; margin-top: -5.5px; background: var(--accent-dk); transform: rotate(37deg); pointer-events: none;
}
html .app.artsy .peak-pill:not(.is-model):hover::before, html .app.artsy .peak-pill:not(.is-model):focus-visible::before, html .app.artsy .peak-pill:not(.is-model).is-hover::before { background: #fff; }
html .app.artsy .peak-pill.is-dim:not(:hover):not(:focus-visible):not(.is-hover)::before { background: rgba(236, 232, 223, .45); }
/* sidebar "peaks" menu: "3 live" in the page accent, arrows of the live rows; the number squares stay black */
.app--massif .rollout-toggle .rollout-menu-sum .rs-live { color: #c0392b; }
.app--massif .rollout-row.is-live:not(.is-dim):not(:hover):not(:focus-visible):not(.is-hover) .icon { color: #c0392b; }
/* route finder: only the result count */
.app--massif .list-count .lc-n { color: #c0392b; }

/* ------------------------------------------------- dot map (massif, peak-dots.js): every page a dot; its label only on hover / focus */
/* the element is the hit area (round, 28 px; 40 px on touch; never wider than the gap to the nearest dot: --near,
   labels.js); the mark is drawn in its centre, the label (.pd-label) hangs above it down to the centre, so the
   pointer can travel from the dot to the plate without leaving the element */
.app--massif { --dot-ink: #ece8df; --dot-bg: #0d0d0d; --dot-acc: #d6453a; }
.app--massif .peak-dot {
  --hit: 28px; --hit-w: min(var(--hit), max(16px, var(--near, 999px)));
  pointer-events: auto; appearance: none; display: block; width: var(--hit-w); height: var(--hit-w);
  margin: 0; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; cursor: pointer;
  color: var(--dot-ink); text-decoration: none; font: 500 13px/1.1 var(--sans); text-align: left; z-index: 2;
}
.app--massif .peak-dot.is-live { z-index: 3; }
.app--massif .peak-dot.is-hover, .app--massif .peak-dot.is-selected, .app--massif .peak-dot:focus-visible { z-index: 6; }
.app--massif .peak-dot:focus-visible { outline: none; }
@media (pointer: coarse) { .app--massif .peak-dot { --hit: 40px; } }
/* marks: live = the accent, ringed; planned = a small hollow ring; model = a small solid dot */
.app--massif .pd-mark {
  position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: var(--dot-bg); box-shadow: inset 0 0 0 1.5px var(--dot-ink), 0 0 0 1.5px rgba(13, 13, 13, .85);
  transition: transform .16s cubic-bezier(.2, .7, .2, 1), background-color .12s, box-shadow .12s;
}
.app--massif .peak-dot.is-live .pd-mark { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; background: var(--dot-acc); box-shadow: 0 0 0 2px var(--dot-bg), 0 0 0 3px var(--dot-ink); }
.app--massif .peak-dot.is-model .pd-mark { background: var(--dot-ink); box-shadow: 0 0 0 1.5px rgba(13, 13, 13, .85); }
.app--massif .peak-dot.is-planned:is(.is-hover, .is-selected, :focus-visible) .pd-mark { background: var(--dot-ink); transform: scale(1.3); }
.app--massif .peak-dot.is-live:is(.is-hover, :focus-visible) .pd-mark { transform: scale(1.2); box-shadow: 0 0 0 2px var(--dot-bg), 0 0 0 3.5px #fff; }
.app--massif .peak-dot.is-live.is-dim:not(.is-hover):not(:focus-visible) .pd-mark { background: #6b6762; box-shadow: 0 0 0 2px var(--dot-bg), 0 0 0 3px rgba(236, 232, 223, .4); }
.app--massif .peak-dot:focus-visible .pd-mark { outline: 1.5px solid var(--dot-ink); outline-offset: 5px; }
/* the label: hidden at rest; on open a hairline grows up from the dot, then the plate is scanned in from the left */
.app--massif .pd-label {
  position: absolute; left: 50%; bottom: 50%; padding-bottom: 13px; pointer-events: none; visibility: hidden; opacity: 0;
  transform: translateX(calc(-50% + var(--shift, 0px))); white-space: nowrap;
  transition: opacity .1s linear, visibility 0s linear .1s;
}
.app--massif .pd-label::after {
  content: ""; position: absolute; left: calc(50% - var(--shift, 0px)); bottom: 5px; width: 1px; height: 8px; margin-left: -.5px;
  background: var(--dot-ink); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .08s ease-out;
}
.app--massif .peak-dot.is-live .pd-label::after { background: var(--dot-acc); }
.app--massif .peak-dot.is-below .pd-label { bottom: auto; top: 50%; padding: 13px 0 0; }
.app--massif .peak-dot.is-below .pd-label::after { bottom: auto; top: 5px; transform-origin: 50% 0; }
.app--massif .pd-plate {
  position: relative; display: flex; align-items: baseline; gap: 6px; padding: 6px 10px 6px 12px;
  background: var(--dot-bg); color: var(--dot-ink); box-shadow: inset 0 0 0 1px rgba(236, 232, 223, .55);
  clip-path: inset(0 100% 0 0); transform: translateY(3px);
  transition: clip-path .1s linear, transform .1s linear, background-color .12s;
}
.app--massif .peak-dot:is(.is-hover, .is-selected, :focus-visible) .pd-label { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .12s ease-out; }
.app--massif .peak-dot:is(.is-hover, .is-selected, :focus-visible) .pd-label::after { transform: scaleY(1); }
.app--massif .peak-dot:is(.is-hover, .is-selected, :focus-visible) .pd-plate {
  clip-path: inset(0 0 0 0); transform: none;
  transition: clip-path .2s cubic-bezier(.2, .7, .2, 1) .06s, transform .2s cubic-bezier(.2, .7, .2, 1) .06s, background-color .12s;
}
.app--massif .pd-plate .name { font: 500 14px/1.1 var(--sans); letter-spacing: -.01em; text-transform: none; }
.app--massif .pd-plate .elev, .app--massif .pd-plate .sep { color: rgba(236, 232, 223, .6); }
.app--massif .pd-plate .icon { align-self: center; margin-left: 1px; transition: transform .12s; }
/* live: the "/" of the logo before the name, count + arrow in the accent; the plate itself is the link's face */
.app--massif .peak-dot.is-live .pd-plate { padding-left: 17px; }
.app--massif .peak-dot.is-live .pd-plate::before {
  content: ""; position: absolute; left: 7px; top: 50%; width: 2px; height: 11px; margin-top: -5.5px; background: var(--dot-acc); transform: rotate(37deg);
}
.app--massif .peak-dot.is-live .pd-plate .count, .app--massif .peak-dot.is-live .pd-plate .icon { color: var(--dot-acc); }
.app--massif .peak-dot.is-live.is-dim .pd-plate .count, .app--massif .peak-dot.is-live.is-dim .pd-plate .icon { color: rgba(236, 232, 223, .6); }
.app--massif .peak-dot:is(.is-live, .is-model) .pd-plate:hover { background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: #fff; }
.app--massif .peak-dot:is(.is-live, .is-model) .pd-plate:hover :is(.elev, .sep, .count, .icon) { color: #f6dedb; }
.app--massif .peak-dot:is(.is-live, .is-model) .pd-plate:hover::before { background: #fff; }
.app--massif .peak-dot:is(.is-live, .is-model) .pd-plate:hover .icon { transform: translateX(3px); }
/* planned: number + name, smaller */
.app--massif .peak-dot.is-planned .pd-plate { gap: 5px; padding: 3px 7px 3.5px; font-size: 12px; }
.app--massif .peak-dot.is-planned .pd-plate .rp-n { font-size: 10px; color: rgba(236, 232, 223, .6); font-variant-numeric: tabular-nums; }
.app--massif .peak-dot.is-planned .pd-plate .topo-name { font: 500 12.5px/1.1 var(--sans); }
.app--massif .peak-dot.is-planned.is-selected .pd-plate .rp-n { color: var(--dot-acc); }
/* classic look: the same dots and plates, ringed for the light snow */
.app--massif:not(.artsy) .pd-mark { background: #fff; box-shadow: inset 0 0 0 1.5px #0a0a0a, 0 0 0 1.5px rgba(255, 255, 255, .85); }
.app--massif:not(.artsy) .peak-dot.is-live .pd-mark { background: var(--dot-acc); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(10, 10, 10, .8); }
.app--massif:not(.artsy) .peak-dot.is-live:is(.is-hover, :focus-visible) .pd-mark { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #0a0a0a; }
.app--massif:not(.artsy) .peak-dot.is-live.is-dim:not(.is-hover):not(:focus-visible) .pd-mark { background: #8a8580; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(10, 10, 10, .45); }
.app--massif:not(.artsy) .peak-dot.is-planned:is(.is-hover, .is-selected, :focus-visible) .pd-mark { background: #0a0a0a; box-shadow: 0 0 0 1.5px #fff; }
.app--massif:not(.artsy) .peak-dot:focus-visible .pd-mark { outline-color: #0a0a0a; }
.app--massif:not(.artsy) .pd-plate { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 2px 10px rgba(10, 10, 10, .25); }
.app--massif:not(.artsy) .pd-label::after { background: #0a0a0a; box-shadow: 0 0 0 .5px rgba(255, 255, 255, .8); }
/* other labels: summits without a page are not drawn; towns and glaciers stay as quiet small text (orientation) */
html .app--massif .peak-label.is-place {
  flex-direction: column; padding: 0; font: 400 10.5px/1.1 var(--sans); letter-spacing: .04em; color: rgba(236, 232, 223, .5);
  text-shadow: 0 0 3px #0d0d0d, 0 0 6px #0d0d0d;
}
html .app--massif .peak-label.is-place::before, html .app--massif .peak-label.is-place::after { display: none; }
html .app--massif:not(.artsy) .peak-label.is-place { color: rgba(10, 10, 10, .6); text-shadow: 0 0 2px #fff, 0 0 4px #fff, 0 0 6px rgba(255, 255, 255, .9); }
.app--massif .labels { z-index: 0; }                  /* the dots stack among themselves, under the toolbar and the overlays */

/* ------------------------------------------------- map looks (massif, artsy.js): the look control + the negative's grain */
/* the toolbar's last block: two compact buttons, classic / negative (the pressed one inverted, as other toggles) */
.tools > .look-group { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.tools .look-btn { height: 34px; }
.app.artsy .tools > .look-group { border-top-color: var(--art-line); }
/* a very fine grain over the negative (screen blend: the blacks stay deep) */
.map-grain { position: absolute; inset: 0; width: 100%; height: 100%; display: none; pointer-events: none; mix-blend-mode: screen; }
html.look-negative .app--massif .map-grain { display: block; }

/* ------------------------------------------------- jump-turn skier: loading / transition overlay (skier-loader.js) */
/* black over the map / viewer (the panel, z-index 4, stays above it); the figure centred in the free area */
.skier-loader {
  position: absolute; inset: 0; z-index: 3; background: #000; pointer-events: none;
  opacity: 1; transition: opacity .25s linear;
}
.skier-loader.is-out { opacity: 0; }
.skier-box {
  position: absolute; left: var(--free-left, 0px); right: 0; top: 0; bottom: var(--free-bottom, 0px);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.app--massif .skier-box { left: 0; bottom: 0; }
@media (max-width: 760px) { .app--massif .skier-box { bottom: 40%; } }       /* above the bottom sheet */
.skier-canvas { display: block; flex: none; }
.skier-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* one loader at a time: the progress bar and its text wait under the skier */
html.has-skier .loading { visibility: hidden; }

/* ------------------------------------------------- massif: peak pulse → skier overlay (footprint.js, massif.js openPeak) */
/* the pulse runs ~320 ms first; the black overlay then fades in quickly instead of cutting it off */
@keyframes skier-in { from { opacity: 0; } }
.app--massif .skier-loader { animation: skier-in .14s ease-out backwards; }
@media (prefers-reduced-motion: reduce) { .app--massif .skier-loader { animation: none; } }

/* ------------------------------------------------- mobile pass fixes (2026-12): phones and touch screens only; desktop unchanged */
/* (1) a dot's label plate never wider than a phone screen: a long name ("Mont Buet – Aiguille de Loriaz · 62 routes")
   was cut off at the left edge at 320-375 px. The name gives way with an ellipsis, the rest keeps its size. */
@media (max-width: 760px) {
  .app--massif .pd-plate { max-width: min(calc(100vw - 16px), var(--pmax, 100vw)); }   /* --pmax: beside the toolbar (labels.js) */
  .app--massif .pd-plate > * { flex: none; }
  .app--massif .pd-plate > :is(.name, .topo-name) { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .app--massif .peak-dot.is-narrow .pd-plate :is(.elev, .sep) { display: none; }       /* narrowed beside the toolbar: the name first */
}
/* (2) "peaks" menu rows: the name was clipped mid-letter (the cell is a flex box, so its text-overflow never applied;
   at 320 px most planned names lost their end). Phones: the elevation / route count goes under the name, which keeps
   its full width and may wrap. Touch screens in the wide layout (a phone in landscape): the intended ellipsis. */
@media (max-width: 760px) {
  .rollout-row { grid-template-columns: 20px minmax(0, 1fr) 15px; row-gap: 1px; padding-top: 4px; padding-bottom: 4px; }
  .rollout-row .rr-n { grid-row: 1 / 3; align-self: center; }
  .rollout-row .topo-name { display: block; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .rollout-row .rr-meta { grid-row: 2; grid-column: 2; white-space: normal; }
  .rollout-row > :last-child { grid-row: 1 / 3; grid-column: 3; align-self: center; }
}
@media (min-width: 761px) and (pointer: coarse) {
  .rollout-row .topo-name { display: block; }
}
/* (3) heights from 100vh are taller than the visible area on mobile browsers whose toolbars come and go (iOS Safari):
   the floating peaks menu could run under the header, a dialog under the bottom toolbar. dvh where supported. */
@supports (height: 100dvh) {
  @media (max-width: 760px) {
    .app--massif .topo-list.rollout-menu { max-height: calc(100dvh - var(--rollout-sheet-h, 40vh) - var(--topbar-h, 44px) - 20px); }
  }
  .dialog { max-height: min(80dvh, 720px); }
}
/* (4) phone in landscape (wide layout, viewport-fit=cover): keep the side panel's text clear of the notch and the
   home indicator. env() is 0 on other screens, so nothing changes there. */
@media (min-width: 761px) {
  .app--massif .panel-scroll { padding-left: max(20px, env(safe-area-inset-left)); padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .app--peak .view { padding-left: max(20px, env(safe-area-inset-left)); padding-bottom: max(22px, env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------- map looks, one system (massif, 2026-12): classic = ink on paper, negative = paper on ink */
/* the same shapes on both looks; only ink and paper swap. Classic plates: off-white paper, a precise ink hairline,
   no drop shadow; the accent a shade deeper on paper. Towns: quiet, small and tracked on both (proper names keep their case). */
.app--massif:not(.artsy) { --dot-acc: #c63c31; }
.app--massif:not(.artsy) .pd-plate { background: #f4f1ea; color: #141414; box-shadow: inset 0 0 0 1px rgba(20, 20, 20, .82); }
.app--massif:not(.artsy) .pd-plate :is(.elev, .sep) { color: rgba(20, 20, 20, .55); }
.app--massif:not(.artsy) .peak-dot.is-planned .pd-plate .rp-n { color: rgba(20, 20, 20, .5); }
.app--massif:not(.artsy) .peak-dot.is-live.is-dim .pd-plate :is(.count, .icon) { color: rgba(20, 20, 20, .5); }
.app--massif:not(.artsy) .pd-label::after { background: #141414; box-shadow: 0 0 0 .5px rgba(244, 241, 234, .8); }
.app--massif:not(.artsy) .peak-dot.is-live .pd-label::after { background: var(--dot-acc); }
.app--massif:not(.artsy) .pd-mark { background: #f4f1ea; box-shadow: inset 0 0 0 1.5px #141414, 0 0 0 1.5px rgba(244, 241, 234, .9); }
.app--massif:not(.artsy) .peak-dot.is-live .pd-mark { background: var(--dot-acc); box-shadow: 0 0 0 2px #f4f1ea, 0 0 0 3px #141414; }
.app--massif:not(.artsy) .peak-dot.is-planned:is(.is-hover, .is-selected, :focus-visible) .pd-mark { background: #141414; box-shadow: 0 0 0 1.5px #f4f1ea; }
html .app--massif .peak-label.is-place { letter-spacing: .08em; font-size: 10.5px; }      /* names keep their case */
html .app--massif:not(.artsy) .peak-label.is-place { color: rgba(20, 20, 20, .62); text-shadow: 0 0 1px rgba(244, 241, 234, .9), 0 0 3px rgba(244, 241, 234, .8), 0 0 6px rgba(244, 241, 234, .55); }
html .app--massif.artsy .peak-label.is-place { color: rgba(236, 232, 223, .7); text-shadow: 0 0 1px #0b0b0b, 0 0 2px #0b0b0b, 0 0 4px #0b0b0b, 0 0 8px rgba(11, 11, 11, .9), 0 0 14px rgba(11, 11, 11, .7); }
/* negative: the page around the terrain matches the image's black */
.app--massif.artsy { --art-bg: #0b0b0b; --dot-bg: #0b0b0b; }
