/* Approved Alpine field report design. Base styles retain charts, notices and danger scales. */
:root {
  --paper: #fff;
  --paper-raised: #f7fafc;
  --ink: #08182e;
  --ink-soft: #496584;
  --rule: #dce5ed;
  --accent: #b12e3b;
  --action: #087f8c;
  --action-ink: #fff;
  --station: #087f8c;
  --model: #55748a;
  --great-bg: #d8f2f2;
  --great-ink: #00616d;
  --good-bg: #e8f4f5;
  --good-ink: #07566a;
  --fair-bg: #f8efda;
  --fair-ink: #745313;
  --radius: 4px;
}
body { background-image: none; font-weight: 400; }
.page { max-width: 1320px; padding: 0 40px 48px; }
.masthead { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 36px; min-height: 94px; margin: 0; border-bottom: 1px solid var(--rule); }
.wordmark { font-size: 32px; letter-spacing: -1.3px; line-height: 1; }
.wordmark img { display: block; width: 210px; height: auto; max-width: 100%; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 48px; font-size: 15px; text-decoration: none; border-bottom: 2px solid transparent; }
.main-nav a[aria-current] { border-color: var(--action); font-weight: 700; }
.lang-switch { gap: 4px; font-size: 13px; flex-wrap: nowrap; }
.lang-switch a { justify-content: center; padding: 0 6px; text-decoration: none; border-bottom: 2px solid transparent; }
.lang-switch a[aria-current] { border-color: var(--action); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 12px 20px; background: var(--paper); color: var(--ink); border: 2px solid var(--action); }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 4px; }
#view { padding-top: 32px; min-height: 50vh; }
#view:focus { outline: none; }
#view[data-page="report"], #view[data-page="where"] { padding-top: 0; }
.page-hero { position: relative; display: flex; align-items: center; min-height: 285px; margin-bottom: 28px; background: #ecf3f8; }
/* The photo is an <img> (pageHero in snow-report.js) so each screen gets its own crop and width; it
   fills the hero behind the copy, under the same fade the background used to carry. */
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.page-hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(245,249,252,.96), rgba(245,249,252,.82) 36%, rgba(245,249,252,0) 72%); }
.hero-credit { position: absolute; z-index: 2; right: 8px; bottom: 8px; padding: 4px 8px; border-radius: 3px; background: rgba(255,255,255,.92); color: #08182e; font-size: 10px; line-height: 1.5; }
.hero-credit a { color: inherit; }
.hero-copy { position: relative; z-index: 2; padding: 36px 32px; max-width: 720px; }
.page-hero h1 { margin: 0 0 14px; max-width: 12ch; font-size: clamp(40px, 5.2vw, 68px); letter-spacing: -.045em; line-height: .98; font-weight: 800; text-wrap: balance; }
.page-hero p { font-size: 20px; line-height: 1.45; color: #385a79; margin: 0; max-width: 42ch; }
.page-hero .hero-note { font-size: 12px; font-weight: 600; letter-spacing: .08em; margin-bottom: 16px; }
.where-link { width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding: 14px 20px; margin-bottom: 24px; background: var(--good-bg); color: var(--good-ink); border: 0; border-radius: var(--radius); text-decoration: none; }
.where-link b { font-size: 18px; }
.where-link span { font-size: 14px; }
.controls { gap: 16px; align-items: end; margin-bottom: 30px; }
.picker { flex: 0 1 220px; }
.picker select { padding: 0 12px; background: var(--paper); }
.controls .picker:last-child { margin-left: auto; }
.control-label, .depth-label, .source-tag { font-family: var(--font-display); text-transform: none; letter-spacing: 0; }
.control-label { font-size: 13px; line-height: 1.3; font-weight: 500; }
.region-tabs { display: flex; min-width: 250px; background: var(--paper-raised); border-radius: var(--radius); }
.region-tabs a { display: flex; justify-content: center; align-items: center; min-height: 48px; padding: 10px 24px; flex: 1; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.region-tabs a[aria-current] { background: var(--action); color: var(--action-ink); }
.report-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 22px; }
.report-heading h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.report-heading p { font-size: 13px; color: var(--ink-soft); margin: 0; }
.board-columns, .board-link { display: grid; grid-template-columns: minmax(180px, 1.6fr) repeat(4, minmax(85px, 1fr)) minmax(170px, 1.5fr); gap: 16px; }
.board-columns { padding: 0 12px 12px; font-size: 12px; color: var(--ink-soft); }
.board { border-top: 1px solid var(--rule); }
.board-row { opacity: 1; transform: none; animation: none; }
.board-link { grid-template-areas: none; align-items: center; padding: 24px 12px; }
.board-resort { display: grid; gap: 7px; min-width: 0; }
.resort-name, .board-verdict, .board-link .resort-meta { grid-area: auto; }
.resort-name { font-size: 23px; line-height: 1.2; }
.board-link .resort-meta { font-size: 13px; }
.elevation { white-space: nowrap; }
.board-verdict { gap: 6px; }
.board-verdict .facts, .board-verdict .outlook { font-family: var(--font-display); font-size: 12px; line-height: 1.5; }
.board-verdict .verdict-label { font-size: 14px; }
.chip { font: 500 12px/1.5 var(--font-display); text-transform: none; letter-spacing: 0; padding: 3px 8px; }
.snow-metric { display: grid; gap: 5px; min-width: 0; align-content: start; }
.metric-label { font-size: 12px; color: var(--ink-soft); }
.metric-value { font: 500 23px/1.2 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -.02em; }
.metric-value small { font-size: 14px; }
.metric-source { font-size: 10px; color: var(--ink-soft); line-height: 1.45; overflow-wrap: anywhere; }
.snow-metric.missing .metric-value { color: var(--model); }
.board-link > .snow-metric:nth-of-type(4) .metric-value { color: var(--action); font-weight: 700; }
.board-link > .snow-metric > .metric-label { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.detail-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title title' 'verdict depth'; align-items: start; border-bottom: 1px solid var(--rule); }
.detail-title { grid-area: title; }
.detail-head h1 { font-size: clamp(42px, 6vw, 64px); }
.detail-head .verdict { grid-area: verdict; }
.detail-depth { grid-area: depth; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; text-align: left; justify-items: start; }
.detail-depth .metric-value { font-size: 36px; font-weight: 700; }
.detail-depth .metric-source { font-size: 12px; }
.detail-depth .metric-label { font-size: 13px; }
.detail-nav { margin-bottom: 18px; }
.follow { flex-wrap: wrap; gap: 12px; }
.feed-link { border: 1px solid var(--rule); padding: 0 16px; border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.feed-link:first-child { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.verdict .verdict-label { font-size: 20px; }
.verdict .facts { font-family: var(--font-display); font-size: 14px; }
.conditions { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0; padding: 16px 0; border: 1px solid var(--rule); border-radius: var(--radius); }
.conditions div { border: 0; border-radius: 0; padding: 8px 16px; }
.conditions dd { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.detail-panels { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; }
.detail-charts, .detail-context { min-width: 0; }
.detail-context .cameras { grid-template-columns: 1fr; }
.section-title { font: 700 22px/1.3 var(--font-display); color: var(--ink); text-transform: none; letter-spacing: -.02em; margin-top: 30px; }
.source-card.used { border-color: var(--station); box-shadow: none; }
.source-card dl, .source-provider, .camera figcaption { font-family: var(--font-display); }
.source-provider { font-size: 17px; color: var(--ink); font-weight: 700; }
.source-note { font-size: 14px; line-height: 1.6; }
.sources .source-note { font-size: 13px; }
.chart-wrap { background: var(--paper); }
.chart .tick { font-family: var(--font-display); }
.page-title { font-size: clamp(32px, 5vw, 46px); line-height: 1.1; }
.lede { line-height: 1.65; }
.where-controls { margin-bottom: 20px; }
.where-controls .region-tabs { max-width: 340px; }
.day-tabs { max-width: 600px; gap: 0; background: var(--paper-raised); border-radius: var(--radius); margin-bottom: 22px; }
.day-tab { border: 0; border-radius: var(--radius); padding: 12px 16px; min-height: 48px; font-family: var(--font-display); font-weight: 400; }
.day-tab[aria-current] { background: var(--action); color: var(--action-ink); }
.where-card-link { padding: 28px 12px; grid-template-columns: 56px minmax(0, 1fr); gap: 24px; }
.where-rank { font: 600 42px/1 var(--font-display); color: var(--ink-soft); opacity: .6; }
.where-body { grid-template-columns: minmax(220px, 1fr) minmax(0, 1.3fr); grid-template-areas: 'name reasons' 'verdict reasons' 'meta reasons'; }
.reasons { font-family: var(--font-display); font-size: 16px; }
.show-all { width: 100%; background: var(--good-bg); color: var(--good-ink); border: 0; min-height: 52px; border-radius: var(--radius); }
.where-method { max-width: 85ch; }
.alert-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 40px; }
.alert-form { max-width: none; gap: 28px; min-width: 0; }
.alert-form fieldset { border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: none; padding: 20px 0 0; gap: 16px; }
.alert-form legend { font: 700 22px/1.2 var(--font-display); color: var(--ink); padding: 0 20px 0 0; letter-spacing: -.02em; text-transform: none; }
.alert-form .alert-resorts { grid-template-columns: 1fr; gap: 0; }
.resort-group, .resort-group:last-child { border: 1px solid var(--rule); border-bottom: 0; padding: 0 16px; }
.resort-group:first-of-type { border-radius: 4px 4px 0 0; }
.resort-group:last-child { border-bottom: 1px solid var(--rule); border-radius: 0 0 4px 4px; }
.resort-group summary { border: 0; min-height: 54px; }
.resort-group summary .control-label { font-size: 16px; font-weight: 600; }
.resort-group summary::after { font-family: var(--font-display); font-weight: 500; text-transform: none; letter-spacing: 0; }
.group-count { font: 400 12px var(--font-display); }
.group-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.alert-form input[type='checkbox'], .alert-form input[type='radio'] { flex-shrink: 0; width: 20px; height: 20px; accent-color: var(--action); }
.radio-pill { padding: 0 16px; font-size: 14px; background: var(--paper-raised); border-color: transparent; position: relative; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill:has(input:focus-visible) { outline: 3px solid var(--action); outline-offset: 3px; }
.radio-pill:has(input:checked) { background: var(--action); color: var(--action-ink); border-color: var(--action); font-weight: 500; }
.alert-form select, .alert-form input[type='email'], .alert-form input[type='url'] { font-family: var(--font-display); background: var(--paper); max-width: 100%; }
.rule { grid-template-columns: auto minmax(0, 1fr) auto; border-bottom: 1px solid var(--rule); padding: 12px 0; gap: 10px; }
.rule .rule-levels { grid-column: 3; }
.rule .hint { grid-column: 2 / -1; }
.hint { font-size: 13px; line-height: 1.6; }
.alert-summary { padding: 24px; border-radius: var(--radius); background: var(--paper-raised); border: 1px solid var(--rule); }
.alert-summary h2 { margin: 0 0 24px; font-size: 24px; line-height: 1.2; }
.alert-summary h3 { margin: 24px 0 10px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 15px; }
.alert-summary ul { margin: 0; padding: 0; list-style: none; }
.alert-summary li { margin: 6px 0; overflow-wrap: anywhere; font-size: 14px; }
.alert-summary p { overflow-wrap: anywhere; }
.alert-summary .hint { margin-top: 28px; }
button.primary { background: var(--action); border-color: var(--action); color: var(--action-ink); font-weight: 600; }
button.danger { font-weight: 500; }
.notice, .site-notice { padding: 20px; line-height: 1.6; }
.site-notice { margin-top: 20px; background: var(--good-bg); border-color: var(--good-bg); color: var(--good-ink); }
.state { padding: 32px; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius); font-size: 17px; }
.colophon { font-size: 12px; line-height: 1.75; }
.colophon .lang-switch { margin-top: 20px; }
@media (max-width: 1099px) {
  .page { padding-inline: 24px; }
  .masthead { gap: 20px; }
  .main-nav { gap: 18px; }
  .board-columns, .board-link { grid-template-columns: minmax(150px, 1.4fr) repeat(4, minmax(65px, 1fr)) minmax(135px, 1.4fr); gap: 12px; }
  .board-link .resort-name { font-size: 20px; }
  .metric-value { font-size: 20px; }
  .alert-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; }
  .rule { grid-template-columns: auto minmax(0, 1fr); }
  .rule .rule-levels { grid-column: 2; }
}
@media (max-width: 759px) {
  .page { padding: 0 16px 32px; }
  .masthead { min-height: 0; grid-template-columns: 1fr auto; gap: 0 12px; padding-top: 16px; }
  .wordmark { font-size: 27px; }
  .wordmark img { width: 165px; }
  .masthead .lang-switch { grid-column: 2; grid-row: 1; }
  .main-nav { grid-column: 1 / -1; justify-content: space-between; gap: 8px; margin-top: 8px; }
  .main-nav a { font-size: 14px; }
  /* The photo is a 150 px strip under the copy, with no fade. */
  .page-hero { min-height: 0; background-color: var(--paper); padding-bottom: 150px; margin-inline: -16px; }
  .page-hero::before { display: none; }
  .hero-photo { top: auto; height: 150px; }
  .hero-photo img { object-position: center bottom; }
  .hero-copy { width: 100%; padding: 28px 20px 24px; background: var(--paper); }
  .page-hero h1 { font-size: 42px; max-width: 15ch; }
  .page-hero p { font-size: 17px; }
  .controls { gap: 12px; }
  .region-tabs { width: 100%; min-width: 0; }
  .picker { flex: 1 1 120px; }
  .controls .picker:last-child { margin-left: 0; }
  .where-link { padding: 16px; }
  .report-heading h2 { font-size: 27px; }
  .report-heading p { font-size: 12px; }
  .board-columns { display: none; }
  .board { border: 0; display: grid; gap: 14px; }
  .board-row { border: 1px solid var(--rule); border-radius: var(--radius); }
  .board-link { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 16px 12px; gap: 18px 8px; }
  .board-resort { grid-column: 1 / -1; }
  .board-link .resort-name { font-size: 24px; }
  .board-link .resort-meta { font-size: 13px; }
  .board-verdict { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--rule); }
  .board-verdict .facts { font-size: 12px; }
  .board-verdict .outlook { font-size: 13px; }
  .board-link > .snow-metric > .metric-label { position: static; width: auto; height: auto; clip-path: none; overflow: visible; font-size: 11px; }
  .metric-value { font-size: 20px; }
  .metric-value small { font-size: 11px; }
  .metric-source { font-size: 10px; }
  .detail-head { grid-template-columns: 1fr; grid-template-areas: 'title' 'verdict' 'depth'; gap: 20px; }
  .detail-depth { width: 100%; gap: 20px; justify-items: start; }
  .detail-depth .metric-value { font-size: 32px; }
  .detail-panels { grid-template-columns: 1fr; gap: 0; }
  .section-title { font-size: 21px; }
  .where-card-link { grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding: 24px 0; }
  .where-rank { font-size: 30px; }
  .where-body { grid-template-columns: 1fr; grid-template-areas: 'name' 'verdict' 'reasons' 'meta'; gap: 10px; }
  .where-body .resort-name { grid-area: name; }
  .where-body .verdict-line { grid-area: verdict; }
  .where-body .reasons { grid-area: reasons; }
  .where-body .resort-meta { grid-area: meta; }
  .day-tab { font-size: 14px; padding: 12px 8px; }
  .reasons { font-size: 14px; }
  .alert-layout { grid-template-columns: 1fr; gap: 28px; }
  .alert-summary { padding: 20px; }
  .group-list { grid-template-columns: 1fr; }
  .radio-pill { padding-inline: 14px; }
  .rule { grid-template-columns: auto minmax(0, 1fr); }
  .rule .rule-levels { grid-column: 2; }
  .actions > button, .alert-form > button.primary { width: 100%; }
  .colophon { margin-top: 40px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1826; --paper-raised: #142236; --ink: #edf4fc;
    --ink-soft: #abc0d6; --rule: #2a3d54; --action: #8ddcde;
    --action-ink: #0a2530; --station: #80d0d4; --model: #a7bccf;
    --accent: #ff9ca7; --great-bg: #123e47; --great-ink: #c4f4f3;
    --good-bg: #183441; --good-ink: #d0f0f1;
    --fair-bg: #43391e; --fair-ink: #f8e2b0;
  }
  .page-hero { background-color: #dbe8f2; color: #08182e; }
  .hero-copy { background: rgba(235, 244, 250, .92); }
  .page-hero p { color: #385a79; }
  .wordmark img { filter: brightness(0) invert(1); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; transition: none !important; } }

/* Confirmation, signup results and unavailable management links use a quiet reading column. */
#view[data-page="alerts"]:not(:has(.alert-form)) { max-width: 720px; margin-inline: auto; padding-block: 56px; }

/* Keep chart colours in the same measured/model palette as their legends. */
.chart .series-this { stroke: var(--action); }
.chart .point-this { fill: var(--action); }
.chart .series-resort { stroke: var(--ink); }
.chart .point-resort { fill: var(--ink); }
.source-tag.resort { color: var(--ink); }

/* Preserve the newer data-quality page's report behavior in the shared visual system. */
.quality-how { background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 20px; }
.quality-how summary::after, .quality-figure dt, .run-state { font-family: var(--font-display); text-transform: none; letter-spacing: 0; }
.quality-figure dt { font-size: 13px; }
.quality-runs { border-top: 0; gap: 16px; }
.quality-run { padding: 20px; background: var(--paper-raised); border: 1px solid var(--rule); border-radius: var(--radius); }
.quality-run-facts, .quality-run-error, .quality-source, .quality-value { font-family: var(--font-display); }
.quality-run-facts, .quality-source { font-size: 13px; }
.quality-run-error { margin-top: 8px; font-size: 13px; }
.quality-list { border-top: 1px solid var(--rule); }
.quality-resort { padding-block: 28px; }
.quality-value { font-variant-numeric: tabular-nums; font-size: 24px; }
.quality-resort-name { font-size: 23px; }
.quality-flag { font-size: 13px; line-height: 1.5; }
.quality-link { margin-bottom: 20px; }
@media (max-width: 759px) {
  .quality-figure { padding-top: 16px; }
  .quality-figure + .quality-figure { margin-top: 12px; }
}

/* Resort photos (image on the resort endpoints): a thumbnail at the start of each board row, a header
   photo on the resort page. Narrow screens first. */
.board-resort { grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 12px; }
.board-resort-text { display: grid; gap: 7px; min-width: 0; }
.board-thumb { display: block; width: 80px; height: 45px; object-fit: cover; border-radius: var(--radius); background: var(--paper-raised); box-shadow: inset 0 0 0 1px var(--rule); }
.detail-head:has(.detail-photo) { grid-template-areas: 'photo' 'title' 'verdict' 'depth'; }
.detail-photo { grid-area: photo; margin: 0 -16px; }
/* Capped so the verdict under it stays on the first screen of a phone. */
.detail-photo img { display: block; width: 100%; height: auto; max-height: 26vh; object-fit: cover; background: var(--paper-raised); }
/* The credit's links are its only way to the author and licence, so 14 px with room to tap between lines. */
.detail-photo figcaption { padding: 6px 16px 0; font-size: 14px; line-height: 1.8; color: var(--ink-soft); overflow-wrap: anywhere; }
.detail-photo figcaption a { color: inherit; }
/* Alert and feed links (renderResort): on phones after the verdict and depth, from 760 px at the
   top right beside the back link, where they always were. */
.detail-top > .follow { margin-top: 16px; }
@media (max-width: 759px) {
  /* The resort page's first screen is for the verdict: less space above the back link, and a long
     name ("Ski Juwel Alpbachtal Wildschönau") at 35 px rather than 42 px on a 320 px phone. */
  #view[data-page="resort"] { padding-top: 16px; }
  .detail-head h1 { font-size: clamp(34px, 11vw, 42px); }
}
/* The Finnish labels fill a 320 px row to within a pixel at 14 px, so any wider rendering would wrap
   the main navigation onto a second line. */
@media (max-width: 359px) {
  .main-nav a { font-size: 13px; }
}
@media (min-width: 760px) {
  .detail-top { position: relative; }
  .detail-top > .follow { position: absolute; top: 0; right: 0; margin: 0; }
}
@media (min-width: 760px) {
  /* 760 px leaves 688 px for the row (page gutters, row padding): 220 + 4 × 65 + 135 + 5 × 12 gaps = 675. */
  .board-columns, .board-link { grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(65px, 1fr)) minmax(135px, 1.4fr); }
  .detail-head:has(.detail-photo) { grid-template-areas: 'photo photo' 'title title' 'verdict depth'; }
  .detail-photo { margin: 0; }
  .detail-photo img { max-height: min(340px, 38vh); border-radius: var(--radius); }
  .detail-photo figcaption { padding-inline: 0; }
}
@media (min-width: 1100px) {
  .board-columns, .board-link { grid-template-columns: minmax(270px, 1.6fr) repeat(4, minmax(85px, 1fr)) minmax(170px, 1.5fr); }
}

/* Levi: a quiet field-map panel in the existing ice/ink palette. */
.terrain-section { margin: 32px 0; border-top: 1px solid var(--rule); padding-top: 24px; }
.terrain-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.terrain-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.025em; }
.terrain-heading p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.terrain-section > p { max-width: 78ch; }
.terrain-section button { min-height: 44px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--radius); font: inherit; color: var(--ink); background: var(--paper); cursor: pointer; }
.terrain-launch > button { background: var(--action); color: var(--action-ink); border-color: var(--action); }
.terrain-section button:disabled { cursor: wait; opacity: .65; }
.terrain-section button[aria-pressed="true"] { border-color: var(--action); color: var(--good-ink); background: var(--good-bg); }
.terrain-display { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.terrain-display[hidden], .terrain-launch[hidden] { display: none; }
.terrain-canvas { position: relative; height: 400px; width: 100%; background: #eaf2f6; }
.terrain-canvas canvas { display: block; width: 100%; height: 100%; }
.terrain-canvas canvas:focus-visible { outline-offset: -4px; }
.terrain-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; }
.terrain-tools button { flex: 1 1 auto; font-size: 14px; }
.terrain-instructions { margin: 0; padding: 0 12px 12px; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.terrain-layers { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 12px; border-top: 1px solid var(--rule); }
.terrain-layers label { display: grid; gap: 6px; flex: 1 1 100%; min-width: 0; font-size: 14px; }
.terrain-route { width: 100%; min-width: 0; min-height: 44px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px; }
.terrain-legend { display: flex; flex-wrap: wrap; gap: 10px 20px; list-style: none; padding: 0; margin: 16px 0; font-size: 14px; }
.terrain-legend li { display: inline-flex; align-items: center; gap: 8px; }
.terrain-legend span { background: var(--terrain-swatch); width: 20px; height: 5px; flex-shrink: 0; }
.terrain-note, .terrain-credit { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.terrain-route-list summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
.terrain-route-list ul { padding: 0; list-style: none; columns: 1; }
.terrain-route-list li { break-inside: avoid; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.terrain-route-list li span { color: var(--ink-soft); }
@media (min-width: 760px) {
  .terrain-canvas { height: 560px; }
  .terrain-tools { justify-content: flex-end; }
  .terrain-tools button { flex: 0 1 auto; }
  .terrain-layers label { flex-basis: 280px; margin-left: auto; }
  .terrain-route-list ul { columns: 3; }
}

.terrain-labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.terrain-map-label { position: absolute; top: 0; left: 0; padding: 3px 6px; border-left: 3px solid var(--route-color); border-radius: 3px; background: rgba(255,255,255,.94); color: #16303d; font: 600 12px/1.3 sans-serif; white-space: nowrap; box-shadow: 0 1px 4px #16303d25; }
.terrain-map-label[hidden] { display: none; }
.terrain-map-label--lift { font-weight: 700; }
.terrain-map-label.is-selected { border-color: #ff8500; background: #fff3db; }
