/* ==================================================================
   lily.zyli.cz: a resume laid out as a trail map.
   Difficulty markings follow the real North American convention:
   green circle, blue square, black diamond, double black diamond.
   ================================================================== */
:root {
  --cable-h: 46px;
  --topbar-h: 62px;
  --radius: 16px;
  --wrap: 1140px;

  --bg-1: #eef7ff;
  --bg-2: #c3ddf2;
  --bg-3: #a9cde9;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.6);
  --ink: #0e2637;
  --ink-2: #4a6a80;
  --ink-3: #7b98ac;
  --line: rgba(14, 38, 55, 0.14);
  --line-strong: rgba(14, 38, 55, 0.28);

  --pine: #14624a;
  --blue: #1f6fd0;
  --green: #2f9e57;
  --black: #16202a;
  --hot: #e8562a;
  --glow: rgba(255, 214, 150, 0);

  --map-peak-1: #e8f4ff;
  --map-peak-2: #b9d7ef;
  --map-ground: #a9cde9;

  --shadow: 0 20px 44px -26px rgba(10, 40, 60, 0.5);
  --shadow-soft: 0 10px 24px -18px rgba(10, 40, 60, 0.5);
  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body[data-theme="night"] {
  --bg-1: #061726;
  --bg-2: #0a2438;
  --bg-3: #0d2f49;
  --surface: rgba(13, 34, 53, 0.82);
  --surface-solid: #0e2537;
  --surface-2: rgba(18, 44, 66, 0.6);
  --ink: #e9f3fc;
  --ink-2: #9dbdd4;
  --ink-3: #6d8ea6;
  --line: rgba(233, 243, 252, 0.14);
  --line-strong: rgba(233, 243, 252, 0.3);
  --pine: #4fd1a5;
  --blue: #62a8f5;
  --green: #4fd18a;
  --black: #cfe3f2;
  --hot: #ff7a4d;
  --glow: rgba(255, 209, 138, 0.5);
  --map-peak-1: #123c5a;
  --map-peak-2: #0a2438;
  --map-ground: #0a2033;
  --shadow: 0 22px 48px -26px rgba(0, 0, 0, 0.8);
  --shadow-soft: 0 12px 26px -18px rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-top: var(--cable-h);
  color: var(--ink);
  font: 400 16.5px/1.65 var(--font-body);
  background:
    radial-gradient(1200px 700px at 50% -10%, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background 400ms ease, color 300ms ease;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

canvas#snowfall {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}

main, .topbar, .foot { position: relative; z-index: 2; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 120;
  background: var(--surface-solid); color: var(--ink); padding: 10px 14px;
  border: 2px solid var(--ink); font-weight: 600;
}
.skip:focus { left: 10px; top: calc(var(--cable-h) + 8px); }

/* ---------- placeholder guard ---------- */
.placeholder-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: #c81e1e; color: #fff; text-align: center;
  padding: 10px 18px; font-size: 14px; font-weight: 500;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.3);
}
.placeholder-banner b { font-weight: 800; }

/* ---------- the cable car (scroll progress) ---------- */
.cable {
  position: fixed; top: 0; left: 0; right: 0; height: var(--cable-h); z-index: 60;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
  backdrop-filter: blur(2px);
}
body[data-theme="night"] .cable {
  background: linear-gradient(180deg, rgba(6, 23, 38, 0.75), rgba(6, 23, 38, 0));
}
.cable-wire {
  position: absolute; top: 14px; left: 0; right: 0; height: 2px;
  background: var(--line-strong);
  box-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.4) inset;
}
.cabin {
  position: absolute; top: 2px; left: 0;
  width: 44px; height: 40px;
  transform: translateX(0);
  will-change: transform;
}
.cabin svg { width: 100%; height: 100%; }
.cabin-arm { stroke: var(--ink-2); fill: none; }
.cabin-body { fill: var(--hot); }
.cabin-window { fill: rgba(255, 255, 255, 0.85); }
body[data-theme="night"] .cabin-window { fill: var(--glow); }

/* ---------- elevation gauge ---------- */
.gauge {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 10px;
  pointer-events: none;
}
.gauge-track {
  width: 6px; height: 38vh; border-radius: 6px;
  background: var(--line); overflow: hidden; position: relative;
}
.gauge-track i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0%;
  background: linear-gradient(0deg, var(--blue), var(--pine));
  border-radius: 6px; transition: height 120ms linear;
}
.gauge-read {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.08em;
  color: var(--ink-2); text-transform: uppercase; writing-mode: vertical-rl;
}
.gauge-read b { color: var(--ink); font-size: 17px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: var(--cable-h); z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 24px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
}
.brand span { color: var(--hot); }
.brand:hover { text-decoration: none; }
.topnav { display: flex; gap: 20px; margin-left: auto; }
.topnav a {
  font-family: var(--font-display); font-size: 16px; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ink-2);
}
.topnav a:hover { color: var(--ink); text-decoration: none; }
.topbar-tools { display: flex; gap: 8px; margin-left: 8px; }
.tool {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-2);
}
.tool:hover { color: var(--ink); border-color: var(--ink-2); }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--surface-solid); border-color: var(--ink); }

/* ---------- typography ---------- */
.section-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(30px, 5vw, 46px); line-height: 1;
  letter-spacing: 0.01em; text-transform: uppercase;
  margin: 0 0 10px;
}
.section-sub { margin: 0 0 26px; color: var(--ink-2); max-width: 62ch; }
.kicker {
  font-family: var(--font-display); font-size: 16px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--hot); margin: 0 0 8px;
}

section {
  position: relative;
  max-width: calc(var(--wrap) + 48px);
  margin: 0 auto;
  padding: 76px 24px;
}

/* ---------- hero ---------- */
/* ---------- the full page map story ---------- */
.story {
  position: relative; max-width: none; padding: 0;
  height: calc(var(--steps, 11) * 74vh);
  background: #d8ecfb;
}
.stage {
  position: sticky; top: var(--topbar-h);
  height: calc(100svh - var(--topbar-h));
  overflow: hidden; background: #d8ecfb;
}
.map-viewport { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: pan-y; }
/* print surface: fine paper grain over the sheet, generated by the browser */
.map-viewport::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: multiply; opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.map-viewport.is-grabbing { cursor: grabbing; }
.trailmap-svg { width: 100%; height: 100%; display: block; }

.story-ui { position: absolute; inset: 0; pointer-events: none; }

.story-card {
  position: absolute; left: 20px; bottom: 20px; width: min(440px, calc(100% - 40px));
  pointer-events: auto; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 15px; padding: 20px 22px 22px;
  box-shadow: 0 30px 60px -34px rgba(8, 34, 52, 0.8);
  opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease, transform 0.45s ease;
}
.story-card.is-active { opacity: 1; transform: none; }
body:not(.js) .story-card:first-of-type { opacity: 1; transform: none; }
body[data-theme="night"] .story-card { background: rgba(9, 24, 38, 0.94); }

.story-num {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 0 8px;
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--hot);
}
.story-num .chip {
  width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: 14px; letter-spacing: 0;
}
.story-num .chip.life { background: var(--pine); }
.story-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 4px;
  font-family: var(--font-display); font-size: clamp(24px, 2.5vw, 32px);
  text-transform: uppercase; line-height: 1.03; letter-spacing: 0.01em;
}
.story-org { margin: 0; color: var(--ink-2); font-size: 15px; }
.story-period {
  margin: 2px 0 12px; font-family: var(--font-display); font-size: 13.5px;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3);
}
.story-body { margin: 0; color: var(--ink-2); font-size: 14.6px; line-height: 1.5; }
.story-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; }
.story-tags li {
  font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2);
}
.story-cta { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.story-cta a, .story-cta button {
  cursor: pointer; font-family: var(--font-display); font-size: 14px; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 9px 15px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink);
}
.story-cta a:hover, .story-cta button:hover { text-decoration: none; border-color: var(--ink); }

.story-rail {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 7px; pointer-events: auto;
}
.story-dot {
  cursor: pointer; width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center; padding: 0;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  color: var(--ink); background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--line-strong); transition: transform 0.2s, background 0.2s, color 0.2s;
}
.story-dot:hover { transform: translateX(-3px); }
.story-dot.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.story-dot.is-life { border-color: var(--pine); }
.story-dot.is-life.is-active { background: var(--pine); border-color: var(--pine); }

.map-tools { position: absolute; right: 18px; bottom: 20px; display: flex; gap: 8px; pointer-events: auto; }
.map-btn {
  cursor: pointer; min-width: 44px; height: 44px; padding: 0 13px;
  font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, 0.95); border: 1.5px solid var(--line-strong);
  border-radius: 10px; box-shadow: 0 10px 24px -14px rgba(8, 34, 52, 0.8);
}
.map-btn--wide { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; }
.map-btn:hover { transform: translateY(-1px); }
.map-hint {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  margin: 0; padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; letter-spacing: 0.05em; color: #22445e;
  background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(8px); border: 1px solid var(--line);
  transition: opacity 0.4s;
}
.map-hint.is-hidden { opacity: 0; }

.hud-card h1 { font-size: clamp(38px, 5.4vw, 62px); margin: 0 0 6px; }
.hud-card .tagline { font-size: 17px; margin-bottom: 14px; }
.hud-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.map-btn {
  cursor: pointer; min-width: 46px; height: 46px; padding: 0 14px;
  font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink);
  background: rgba(255, 255, 255, 0.95); border: 1.5px solid var(--line-strong);
  border-radius: 10px; box-shadow: 0 8px 20px -12px rgba(10, 40, 60, 0.7);
}
.map-btn--wide { font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase; }
.map-btn:hover { transform: translateY(-1px); }
.map-hint {
  position: absolute; left: calc(minmax(320px, 372px)); bottom: 18px;
  margin: 0; padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  font-size: 12.5px; letter-spacing: 0.06em; color: #24455e;
  background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(8px);
  border: 1px solid var(--line);
}
.hud-detail {
  position: absolute; top: 22px; right: 22px; width: min(400px, calc(100% - 44px));
  max-height: calc(100% - 110px); overflow: auto;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px 24px; box-shadow: 0 24px 50px -28px rgba(10, 40, 60, 0.7);
  animation: detailIn 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
body[data-theme="night"] .hud-detail { background: rgba(10, 26, 42, 0.96); }
@keyframes detailIn { from { opacity: 0; transform: translateY(-10px); } }
.detail-close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 50%; background: transparent;
  color: var(--ink-2); font-size: 19px; line-height: 1;
}
.detail-kicker {
  margin: 0 0 6px; font-family: var(--font-display); font-size: 13px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--hot);
}
.detail-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 6px;
  font-family: var(--font-display); font-size: 30px; text-transform: uppercase; line-height: 1.05;
}
.di { display: inline-block; width: 15px; height: 15px; flex: none; }
.di--green { background: var(--green); border-radius: 50%; }
.di--blue { background: var(--blue); border-radius: 2px; }
.di--black { background: var(--ink); border-radius: 2px; transform: rotate(45deg); }
.detail-org { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.detail-period {
  margin: 2px 0 14px; font-family: var(--font-display); font-size: 14px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.detail-body { margin: 0; color: var(--ink-2); font-size: 15px; }
.detail-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 0; padding: 0; }
.detail-tags li {
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2);
}
.detail-all {
  margin-top: 18px; cursor: pointer; width: 100%;
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 11px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--ink);
}

/* ---------- the WebGL band behind the about section ---------- */
.band { position: relative; max-width: none; padding: 0; overflow: hidden; }
#terrain { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0.2) 36%, rgba(233,244,253,0.88) 100%);
}
body[data-theme="night"] .hero-scrim {
  background: linear-gradient(180deg, rgba(6,23,38,0.68) 0%, rgba(6,23,38,0.3) 38%, rgba(6,23,38,0.92) 100%);
}
.band-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center;
  padding-top: 96px; padding-bottom: 96px;
}
.hud-card h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(52px, 11vw, 104px); line-height: 0.92;
  letter-spacing: -0.005em; text-transform: uppercase; margin: 0 0 12px;
}
.tagline { font-size: 20px; color: var(--ink-2); margin: 0 0 20px; max-width: 30ch; }
.hero-conditions {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 15px; color: var(--ink-2); margin: 0 0 22px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2);
}
.dot-live {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 22%, transparent);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); color: var(--ink);
  font-size: 14.5px; font-weight: 500; background: var(--surface-2);
}
.pill:hover { text-decoration: none; border-color: var(--ink-2); transform: translateY(-1px); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.pill[data-icon="instagram"] .pill-dot { background: var(--hot); }
.pill[data-icon="gondola"] .pill-dot { background: var(--pine); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 0; }
.button {
  display: inline-block; cursor: pointer;
  font-family: var(--font-display); font-size: 17px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
  padding: 13px 24px; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: var(--surface-solid);
}
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button--ghost { background: transparent; color: var(--ink); }
.button:focus-visible, .tool:focus-visible, .filter:focus-visible, .swatch:focus-visible,
.graphic-btn:focus-visible, .pill:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; }

.hero-board { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-board .board-art { width: 138px; height: 230px; }
.portrait-frame {
  width: 168px; height: 168px; border-radius: 50%; padding: 6px;
  background: var(--surface-solid);
  box-shadow: 0 16px 34px -16px rgba(10, 40, 60, 0.65), 0 0 0 2px var(--line-strong);
}
.portrait { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.board-art { width: 190px; height: 320px; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-1.2deg); } }
.board-deck { fill: var(--deck, #2f7fd1); transition: fill 300ms ease; }
.board-outline { fill: none; stroke: var(--ink); stroke-width: 2.4; opacity: 0.9; }
.board-bindings rect { fill: var(--ink); opacity: 0.7; }
.board-name {
  font-family: var(--font-display); font-size: 19px; letter-spacing: 0.18em;
  text-transform: uppercase; margin: 0; color: var(--ink-2);
}
.customizer {
  text-align: center; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.customizer-label {
  font-family: var(--font-display); font-size: 13px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px;
}
.swatches { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  background: var(--swatch); border: 2px solid transparent;
  box-shadow: 0 0 0 1px var(--line-strong);
}
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.graphics { display: flex; gap: 8px; justify-content: center; }
.graphic-btn {
  cursor: pointer; font-size: 12.5px; padding: 6px 11px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink-2);
}
.graphic-btn[aria-pressed="true"] { background: var(--ink); color: var(--surface-solid); border-color: var(--ink); }

/* ---------- about ---------- */
.about-lede { font-size: 21px; line-height: 1.55; color: var(--ink); max-width: 46ch; margin: 0 0 18px; }
.about-body { color: var(--ink-2); max-width: 68ch; margin: 0 0 14px; }

/* ---------- snow report ---------- */
.snow-status {
  display: inline-block; font-size: 14px; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 15px;
  background: var(--surface-2); margin-bottom: 24px;
}
.snow-status.is-live { color: var(--pine); border-color: color-mix(in srgb, var(--pine) 40%, transparent); }
.snow-status.is-error { color: var(--hot); border-color: color-mix(in srgb, var(--hot) 45%, transparent); }
.region + .region { margin-top: 40px; }
.region-title {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.mountain-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: 18px;
}
.mountain {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 18px; box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.mountain:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mountain.is-home { border-color: var(--hot); }
.mtn-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.mtn-head h3 {
  font-family: var(--font-display); font-size: 23px; letter-spacing: 0.02em;
  text-transform: uppercase; margin: 0; line-height: 1.06;
}
.mtn-town { margin: 0; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.mtn-live { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 12px; }
.mtn-temp { font-family: var(--font-display); font-size: 42px; line-height: 1; font-weight: 700; }
.mtn-desc { font-size: 13.5px; color: var(--ink-2); text-transform: lowercase; }
.mtn-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 14px; }
.mtn-stats div { display: flex; flex-direction: column; gap: 2px; }
.mtn-stats dt {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3);
}
.mtn-stats dd { margin: 0; font-family: var(--font-display); font-size: 17px; letter-spacing: 0.02em; }
.powder { display: flex; gap: 4px; margin-bottom: 12px; }
.powder i {
  width: 14px; height: 14px; opacity: 0.25;
  background: var(--blue);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.powder i.on { opacity: 1; }
.forecast { display: flex; align-items: flex-end; gap: 6px; height: 44px; margin-bottom: 12px; }
.fc-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: flex-end; height: 100%; }
.fc-bar { width: 100%; border-radius: 3px 3px 0 0; background: var(--blue); min-height: 2px; opacity: 0.85; }
.fc-label { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.mtn-character { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.mtn-flags {
  margin: 0; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------- trail map ---------- */
.map-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-soft);
}
.map-art { width: 100%; height: auto; display: block; }
.map-ground { fill: var(--map-ground); }
.map-snowcap { fill: var(--map-peak-1); }
.map-snowcap, .map-ground { transition: fill 300ms ease; }
.trail { fill: none; stroke-width: 5; stroke-linecap: round; opacity: 0.9; transition: stroke-width 140ms ease; }
.trail--green { stroke: var(--green); }
.trail--blue { stroke: var(--blue); }
.trail--black { stroke: var(--ink); }
.trail--double { stroke: var(--hot); }
.map-runs a:hover .trail { stroke-width: 9; }
.trail-label {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.16em;
  fill: var(--ink); text-transform: uppercase; pointer-events: none;
}
.lift { stroke: var(--line-strong); stroke-width: 2; stroke-dasharray: 6 7; fill: none; }
.map-summit, .map-base {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 0.22em;
  fill: var(--ink-3); text-transform: uppercase; text-anchor: middle;
}
.map-legend {
  list-style: none; display: flex; flex-wrap: wrap; gap: 18px;
  margin: 14px 0 0; padding: 14px 4px 2px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2);
}
.map-legend li { display: flex; align-items: center; gap: 8px; }

/* ---------- difficulty badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.badge i { display: block; width: 15px; height: 15px; }
.badge--green i { background: var(--green); border-radius: 50%; }
.badge--blue i { background: var(--blue); border-radius: 2px; }
.badge--black i { background: var(--black); transform: rotate(45deg); border-radius: 2px; }
.badge--double i { background: var(--ink); transform: rotate(45deg); border-radius: 2px; width: 13px; height: 13px; }

/* ---------- runs ---------- */
.runs-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; }
.filter {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 42px; height: 38px; padding: 0 12px; cursor: pointer;
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: transparent; color: var(--ink-2);
}
.filter:hover { color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--surface-solid); border-color: var(--ink); }
.filter.is-active .badge--black i, .filter.is-active .badge--double i { background: var(--surface-solid); }
.filter.is-active .badge--green i { background: var(--green); }

.run-list { list-style: none; margin: 0; padding: 0; }
.run { display: grid; grid-template-columns: 44px 1fr; gap: 18px; }
.run + .run { margin-top: 8px; }
.run-rail { position: relative; display: flex; justify-content: center; }
.rail-line {
  width: 3px; border-radius: 3px; background: var(--line-strong);
  margin-top: 26px; margin-bottom: -8px;
}
.run:last-child .rail-line { background: linear-gradient(180deg, var(--line-strong), transparent); }
.run.is-hidden { display: none; }
.run-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-soft); margin-bottom: 18px;
  flex: 1; transition: transform 160ms ease, box-shadow 160ms ease;
}
.run-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.run-head { display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: start; }
.run-head h3 {
  font-family: var(--font-display); font-size: 26px; letter-spacing: 0.01em;
  text-transform: uppercase; margin: 0 0 3px; line-height: 1.06;
}
.run-head .badge { margin-top: 4px; }
.run-org { margin: 0; color: var(--ink-2); font-size: 15px; }
.dot-sep { color: var(--ink-3); }
.run-period {
  margin: 4px 0 0; font-family: var(--font-display); font-size: 15px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}
.run-body { margin: 14px 0 0; color: var(--ink-2); max-width: 72ch; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; padding: 0; }
.tags li {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.empty-note { color: var(--ink-3); font-style: italic; margin-top: 18px; }

/* ---------- training ---------- */
.lesson-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;
}
.lesson {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-soft);
}
.lesson-top { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.lesson-top h3 {
  font-family: var(--font-display); font-size: 22px; text-transform: uppercase;
  letter-spacing: 0.01em; margin: 0; line-height: 1.1;
}
.lesson-org { margin: 0; color: var(--ink-2); }
.lesson-period {
  margin: 2px 0 10px; font-family: var(--font-display); font-size: 14px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.lesson-notes { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- gear ---------- */
.gear-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.gear-group {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-soft);
}
.gear-title {
  font-family: var(--font-display); font-size: 15px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 16px;
}
.gear-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.gear-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.gear-name { font-weight: 600; font-size: 15.5px; }
.gear-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.gear-bar i {
  display: block; height: 100%; width: var(--level, 0%);
  background: linear-gradient(90deg, var(--blue), var(--pine));
  border-radius: 999px;
  animation: grow 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes grow { from { width: 0; } }
.gear-detail { margin: 7px 0 0; font-size: 14px; color: var(--ink-3); }

/* ---------- après ---------- */
.apres-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow); text-align: center;
}
.apres-headline { font-size: 22px; margin: 0 0 8px; color: var(--ink); }
.apres-note { color: var(--ink-2); margin: 0 auto 22px; max-width: 52ch; }
.apres-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.apres-links { justify-content: center; }

/* ---------- footer ---------- */
.foot {
  text-align: center; padding: 44px 24px 60px; color: var(--ink-3);
  border-top: 1px solid var(--line); font-size: 14px;
}
.foot p { margin: 0 0 6px; }
.foot-note { color: var(--ink-3); }
.foot-hint b { color: var(--ink-2); letter-spacing: 0.1em; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  z-index: 150; margin: 0; padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--surface-solid);
  font-family: var(--font-display); font-size: 16px; letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0; transition: opacity 220ms ease, transform 220ms ease;
  box-shadow: var(--shadow);
}
.toast[hidden] { display: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .gauge { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-board { order: -1; }
  .board-art { width: 140px; height: 236px; }
}

@media (max-width: 780px) {
  :root { --cable-h: 34px; --topbar-h: 56px; }
  section { padding: 54px 18px; }
  /* the page is long on a phone, so keep the section nav reachable as a
     scrollable strip under the brand row */
  .topbar { height: auto; flex-wrap: wrap; gap: 10px; padding: 8px 14px; row-gap: 6px; }
  .topnav {
    order: 3; width: 100%; margin-left: 0; gap: 16px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 3px;
    scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { font-size: 15px; white-space: nowrap; }
  .topbar-tools { margin-left: auto; }
  .run { grid-template-columns: 22px 1fr; gap: 10px; }
  .run-head { grid-template-columns: 20px 1fr; }
  .run-period { grid-column: 2; margin-top: 6px; }
  .run-card { padding: 18px; }
  .apres-card { padding: 26px 20px; }
  .mtn-stats { grid-template-columns: repeat(2, 1fr); }
  .map-legend { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .board-art { animation: none; }
  .dot-live { animation: none; }
  .gear-bar i { animation: none; }
  * { transition: none !important; }
}

/* the paper grain over the map viewport must stay still */
@media (prefers-reduced-motion: reduce) {
  .map-viewport::after { animation: none; }
}

/* ---------- print: the actual resume ---------- */
@media print {
  body { background: #fff; color: #000; padding: 0; }
  canvas#snowfall, .cable, .gauge, .topbar, .map-wrap, .placeholder-banner, .toast, .customizer,
  .foot-hint, .hero-cta, .snow-report, .hero-board { display: none !important; }
  section { padding: 14px 0; break-inside: avoid; }
  .section-title { font-size: 24px; }
  a { color: #000; text-decoration: none; }
  .run-card, .lesson, .gear-group, .apres-card { border: 0; box-shadow: none; padding: 0; }
  .run-list, .lesson-list, .gear-groups { display: block; }
  .run { grid-template-columns: 1fr; }
  .run-rail { display: none; }
}

/* ---------- season history ---------- */
.history {
  margin-top: 34px; padding: 24px 24px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-soft);
}
.history-title {
  font-family: var(--font-display); font-size: 26px; letter-spacing: 0.02em;
  text-transform: uppercase; margin: 0 0 6px;
}
.history-chart {
  display: flex; align-items: stretch; gap: 16px;
  height: 240px; margin: 22px 0 10px; padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
/* the fill is a percentage of the 1fr plot row, so the value and the labels
   sit outside the bar instead of stealing its height */
.hbar {
  flex: 1; height: 100%; display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 7px; justify-items: center;
}
.hbar-value { font-family: var(--font-display); font-size: 18px; color: var(--ink); }
.hbar-fill {
  width: 100%; align-self: end; border-radius: 8px 8px 0 0; min-height: 4px;
  background: linear-gradient(180deg, var(--blue), var(--pine));
  transition: height 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hbar-fill.is-best { background: linear-gradient(180deg, var(--hot), #b8340f); }
.hbar-label {
  font-family: var(--font-display); font-size: 14px; letter-spacing: 0.1em; color: var(--ink-2);
}
.hbar-days { font-size: 11.5px; color: var(--ink-3); }
.history-note { margin: 12px 0 0; color: var(--ink-2); font-size: 15px; }

@media (max-width: 780px) {
  .history-chart { height: 190px; gap: 10px; }
  .hbar-value { font-size: 14px; }
  .hbar-days { display: none; }
}

/* ---------- the work ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow-soft);
}
.stat b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 6vw, 64px); line-height: 0.95; color: var(--ink);
}
.stat span { font-family: var(--font-display); font-size: 13.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3); }
.work-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.work-card {
  position: relative; overflow: hidden; border-radius: 14px;
  background: var(--surface-solid); box-shadow: var(--shadow-soft);
}
.work-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; display: block; transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
.work-card:hover img { transform: scale(1.07); }
.work-card span {
  position: absolute; inset: auto 0 0 0; padding: 22px 12px 10px;
  font-size: 12.5px; line-height: 1.3; color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
}
.work-credit { margin: 18px 0 0; color: var(--ink-2); font-size: 14.5px; }
.collab-row { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; }
.collab-row li {
  font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2);
}

@media (max-width: 1080px) { .work-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px) {
  .work-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-row { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-grid { padding-top: 60px; padding-bottom: 60px; }
  .portrait-frame { width: 132px; height: 132px; }
}

/* ---------- trail map artwork: printed resort map conventions ---------- */
.trailmap-svg .massif-outline { fill: none; stroke: #b3d0e8; stroke-width: 2; }
/* the hillshade is a lit fractal surface multiplied over the snow ramp */
.massif-shade { mix-blend-mode: multiply; opacity: 0.2; }
.massif-forms { mix-blend-mode: multiply; opacity: 0.32; }
.forest-floor { fill: #173d2e; }
.hatch-edge { fill: none; stroke: #cfa945; stroke-width: 3; stroke-dasharray: 14 12; opacity: 0.75; }
.hatch-label {
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 24px;
  letter-spacing: 0.12em; fill: #8a6520; text-anchor: middle;
  paint-order: stroke; stroke: #ffffff; stroke-width: 8; stroke-linejoin: round;
}
.boundary { fill: none; stroke-width: 6; stroke-dasharray: 26 16; stroke-linecap: round; opacity: 0.9; }
.boundary--red { stroke: #b3221c; }
.boundary--yellow { stroke: #e0b02c; }
.elevation circle { fill: #ffffff; stroke: #35566f; stroke-width: 3; }
.elev-label {
  font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.16em;
  fill: #2f5570; paint-order: stroke; stroke: #ffffff; stroke-width: 7;
}
.elev-value {
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 25px;
  fill: #14314b; paint-order: stroke; stroke: #ffffff; stroke-width: 7;
}
/* ink weight: nothing on a printed sheet is perfectly straight */
.piste-edge { fill: none; stroke: #9fbdd6; stroke-width: 58; stroke-linecap: round; stroke-linejoin: round; opacity: 0.9; filter: url(#softEdge); }
.massif-outline { filter: url(#wobble); }
.canopy { isolation: isolate; }
.trailmap-svg .range { opacity: 0.92; }
.trailmap-svg .sky, .trailmap-svg .sun, .trailmap-svg .valley { pointer-events: none; }
#tree .tree-lit { fill: #ffffff; opacity: 0.2; }
#tree .tree-dark { fill: #06180f; opacity: 0.22; }

/* --- pistes --- */
.trail-group { cursor: pointer; }
.trail-group .hit { fill: none; stroke: rgba(0, 0, 0, 0); stroke-width: 70; stroke-linecap: round; }
/* the run is the gap in the canopy: the piste is only a whisper of groomed
   surface, so the massif hillshade reads straight through the corridor */
.piste-edge { fill: none; stroke: #c9dcec; opacity: 0; stroke-width: 54; stroke-linecap: round; stroke-linejoin: round; opacity: 0.5; }
.piste { fill: none; stroke: #ffffff; stroke-width: 48; stroke-linecap: round; stroke-linejoin: round; opacity: 1; }
/* the difficulty centreline is the one crisp thing on the run */
.trail-line { fill: none; stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.trail-line.green { stroke: #1f9d55; }
.trail-line.blue { stroke: #1a72cf; }
.trail-line.black { stroke: #141d26; }
.trail-group.is-hover .piste { stroke: #fffdf2; }
.trail-group.is-active .piste-edge { opacity: 1; stroke: #e8a33d; filter: none; }
.trail-group.is-active .piste { stroke: #fffaf0; }
.trail-group.is-dim { opacity: 0.62; }
.trail-group.is-life .piste-edge { stroke: #bfe3cf; }
.trail-group.is-life .trail-line { stroke-dasharray: 26 14; }

/* --- dirt bands at the foot of the massif --- */
/* fill comes from the inline attribute on each path; these are hooks only */
.dirt-band { }
.dirt-band-group { }
.dirt-edge { fill: none; stroke: #7d5c3c; stroke-width: 4; opacity: 0.45; filter: url(#softEdge); }

.trail-name {
  font-family: var(--font-display); font-style: italic; font-weight: 700;
  font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase;
  fill: #14314b; paint-order: stroke; stroke: #ffffff; stroke-width: 8; stroke-linejoin: round;
}
.trail-meta {
  font-family: var(--font-display); font-style: italic; font-weight: 600;
  font-size: 17.5px; letter-spacing: 0.07em; fill: #54748d;
  paint-order: stroke; stroke: #ffffff; stroke-width: 7; stroke-linejoin: round;
}
/* lettering that follows the run, sized for reading at print scale */
.trail-name--curve { font-size: 30px; letter-spacing: 0.035em; stroke-width: 10; }
.trail-group:has(.trail-name--curve) .trail-name:not(.trail-name--curve) { display: none; }
.trail-number text {
  font-family: var(--font-display); font-size: 25px; font-weight: 700; fill: #ffffff; text-anchor: middle;
}

/* --- lifts --- */
.lift-casing { fill: none; stroke: #ffffff; stroke-width: 17; stroke-linecap: round; }
.lift-line { fill: none; stroke: #b3221c; stroke-width: 9; stroke-linecap: round; }
.lift-group.gondola .lift-line { stroke-width: 11; }
.lift-group.surface .lift-line { stroke-dasharray: 10 14; }
.lift-tower circle { fill: #8f1d18; stroke: #ffffff; stroke-width: 2.5; }
.lift-tower text { font-family: var(--font-display); font-size: 14px; fill: #ffffff; text-anchor: middle; }
.lift-banner rect { fill: #b3221c; stroke: #ffffff; stroke-width: 2.5; }
.lift-banner text {
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 23px;
  letter-spacing: 0.07em; text-transform: uppercase; fill: #ffffff; text-anchor: middle;
}
.lift-cabin rect { fill: #b3221c; stroke: #ffffff; stroke-width: 2.5; }
.lift-window { fill: #dff0fb; }

/* --- ground furniture --- */
.catwalks path { fill: none; stroke: #1f9d55; stroke-width: 6; stroke-dasharray: 22 16; stroke-linecap: round; }
.roads path { fill: none; stroke: #e2b878; stroke-width: 15; stroke-linecap: round; }
.roads path { stroke: #d8ab63; }
.glade-outline { fill: none; stroke: #3f8f68; stroke-width: 4; stroke-dasharray: 18 14; }
.facility rect { }
.facility-label {
  font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: 0.1em;
  fill: #1f3d55; paint-order: stroke; stroke: #ffffff; stroke-width: 7; stroke-linejoin: round;
}
.place rect { fill: #2f6fb5; stroke: #ffffff; stroke-width: 3; }
.place text {
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 26px;
  letter-spacing: 0.09em; fill: #ffffff; text-anchor: middle;
}
.route-line { fill: none; stroke: #e8a33d; stroke-width: 8; stroke-dasharray: 24 18; stroke-linecap: round; opacity: 0.96; }

/* --- callouts and headers --- */
.callout rect { stroke: #ffffff; stroke-width: 3; }
.callout--info rect { fill: #1b7fc4; }
.callout--warn rect { fill: #cf3b2f; }
.callout text {
  font-family: var(--font-display); font-weight: 700; font-size: 25px; letter-spacing: 0.09em;
  fill: #ffffff;
}
.home-mountains .hm-title {
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 34px;
  letter-spacing: 0.12em; fill: #2b5878; paint-order: stroke; stroke: #ffffff; stroke-width: 9;
}
.home-mountains .hm-line {
  font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: 0.1em;
  fill: #4d7791; paint-order: stroke; stroke: #ffffff; stroke-width: 7;
}
.map-title-main {
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 96px;
  letter-spacing: 0.02em; fill: #10314c; paint-order: stroke; stroke: #ffffff; stroke-width: 16; stroke-linejoin: round;
}
.map-title-sub {
  font-family: var(--font-display); font-weight: 700; font-size: 27px; letter-spacing: 0.22em;
  fill: #3a6f92; paint-order: stroke; stroke: #ffffff; stroke-width: 9;
}

/* --- legend --- */
.legend-box { fill: rgba(255, 255, 255, 0.97); stroke: #35566f; stroke-width: 4; }
.legend-title {
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 40px;
  letter-spacing: 0.14em; fill: #10314c;
}
.legend-col {
  font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.16em; fill: #6b8ba3;
}
.legend-row text { font-family: var(--font-display); font-weight: 700; font-size: 22px; fill: #16324a; }
.gullies path { fill: none; stroke: #cfe3f3; stroke-width: 13; stroke-linecap: round; opacity: 0.55; }
.legend-note { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: 0.05em; fill: #7090a8; }
.s-lift { fill: none; stroke: #b3221c; stroke-width: 9; }
.s-lift-tick { fill: none; stroke: #ffffff; stroke-width: 9; stroke-dasharray: 4 12; }
.s-lift.s-surface { stroke-dasharray: 9 12; }
.s-cabin { fill: #b3221c; stroke: #ffffff; stroke-width: 2; }
.s-road { fill: none; stroke: #d8ab63; stroke-width: 13; stroke-linecap: round; }
.s-catwalk { fill: none; stroke: #1f9d55; stroke-width: 6; stroke-dasharray: 18 13; stroke-linecap: round; }
.s-line { fill: none; stroke-width: 5; stroke-linecap: round; }
.s-route { fill: none; stroke: #e8a33d; stroke-width: 8; stroke-dasharray: 20 15; stroke-linecap: round; }
.s-glade { fill: none; stroke: #3f8f68; stroke-width: 4; stroke-dasharray: 16 12; }
.s-life { fill: none; stroke: #1f9d55; stroke-width: 6; stroke-dasharray: 22 14; }
.s-num { font-family: var(--font-display); font-size: 17px; font-weight: 700; fill: #ffffff; text-anchor: middle; }

.compass-ring { fill: rgba(255, 255, 255, 0.94); stroke: #35566f; stroke-width: 4; }
.compass-needle { fill: #b3221c; }
.compass-n { font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 40px; fill: #35566f; text-anchor: middle; }

.trail-group:focus-visible { outline: none; }
.trail-group:focus-visible .piste-edge { stroke: #e8a33d; }

@media (max-width: 900px) {
  .story { height: calc(var(--steps, 11) * 82vh); }
  .story-card { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 15px 16px 16px; }
  .story-title { font-size: 22px; }
  .story-org { font-size: 13.5px; }
  .story-body { font-size: 13.6px; line-height: 1.45; }
  .story-period { margin-bottom: 9px; }
  .story-tags { margin-top: 10px; }
  .story-cta { margin-top: 12px; }
  .story-rail {
    top: 10px; right: 50%; transform: translateX(50%);
    flex-direction: row; flex-wrap: nowrap; gap: 4px; justify-content: center;
    max-width: calc(100% - 16px);
  }
  .story-dot { width: 26px; height: 26px; font-size: 12px; border-radius: 6px; }
  .map-tools { bottom: auto; top: 46px; right: 10px; }
  .map-btn { min-width: 38px; height: 38px; font-size: 16px; padding: 0 10px; }
  .map-btn--wide { font-size: 12px; }
  .map-hint { display: none; }
}

/* night mode: the map is a printed sheet, so it stays lit, but the paper
   and the controls have to keep enough contrast against a dark page */
body[data-theme="night"] .trailmap-svg { filter: brightness(0.92) saturate(0.95); }
body[data-theme="night"] .story-dot { background: rgba(255, 255, 255, 0.92); color: #0f2231; }
body[data-theme="night"] .story-dot.is-active { background: #0f2231; color: #ffffff; }
body[data-theme="night"] .story-dot.is-life.is-active { background: var(--pine); color: #ffffff; }
body[data-theme="night"] .map-btn { background: rgba(255, 255, 255, 0.92); color: #0f2231; }
body[data-theme="night"] .map-hint { background: rgba(255, 255, 255, 0.86); color: #17364c; }
