/* Кайт-атлас — styles. Laptop first; phone layout at the bottom. */

@font-face { font-family: 'Unbounded'; font-weight: 500; font-display: swap; src: url(../fonts/unbounded-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 500; font-display: swap; src: url(../fonts/unbounded-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url(../fonts/unbounded-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url(../fonts/unbounded-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 400; font-display: swap; src: url(../fonts/onest-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 400; font-display: swap; src: url(../fonts/onest-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 500; font-display: swap; src: url(../fonts/onest-cyrillic-500-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 500; font-display: swap; src: url(../fonts/onest-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 600; font-display: swap; src: url(../fonts/onest-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 600; font-display: swap; src: url(../fonts/onest-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #12303f;
  --ink-2: #4f6874;
  --ink-3: #5f747e;
  --paper: #ffffff;
  --mist: #f2f6f6;
  --line: #dbe4e7;
  --sea: #145d78;
  --sea-2: #0e4a61;
  --sea-wash: #e3eff3;
  --peak: #79c99a;
  --shoulder: #f3d36b;
  --snow: #ffffff;
  --snow-ink: #2b7bb0;
  --off: #ee9a90;
  --good: #1a7448;  --good-bg: #e2f3ea;
  --easy: #145d78;  --easy-bg: #e2eff4;
  --warn: #8a6100;  --warn-bg: #fbf0d0;
  --bad: #a8372b;   --bad-bg: #f8e2df;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --side: 296px;
  --panel: 460px;
  --r-s: 6px;
  --r-m: 10px;
  --shadow: 0 10px 30px rgba(18, 48, 63, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 400 14px/1.45 var(--text); color: var(--ink); background: var(--mist); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--sea); text-underline-offset: 2px; }
a:hover { color: var(--sea-2); }
:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-2); }

.app { position: relative; height: 100vh; height: 100dvh; overflow: hidden; overflow: clip; --li: calc(var(--side) + 16px); --ri: 0px; }
.app.side-collapsed { --li: 0px; }
.app.has-panel { --ri: calc(var(--panel) + 16px); }
#map { position: absolute; inset: 0; background: #dfe9ec; }

/* floating surfaces share one look with the month strip */
.side, .timeline, .panel, .bm-toggle, .side-open { background: rgba(255, 255, 255, 0.96); box-shadow: var(--shadow); border-radius: 16px; }

/* ------------------------------------------------------------------ left panel */
.side { position: absolute; top: 12px; left: 12px; bottom: 12px; width: var(--side); z-index: 3; display: flex; flex-direction: column; min-height: 0;
  transition: transform 0.28s cubic-bezier(.2, .8, .2, 1), opacity 0.2s; }
.app.side-collapsed .side { transform: translateX(calc(-100% - 24px)); opacity: 0; pointer-events: none; }
.side-open { position: absolute; top: 12px; left: 12px; z-index: 3; padding: 8px 12px; border: 0; font-size: 13px; font-weight: 500; display: none; }
.app.side-collapsed .side-open { display: block; }

.brand { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 16px; }
.brand h1 { margin: 0; font: 700 16px/1.1 var(--display); letter-spacing: -0.01em; white-space: nowrap; }
.dd-host { margin-left: auto; }
.side-toggle { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; }
.side-toggle:hover { background: var(--mist); color: var(--ink); }

.seasons { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px 8px 6px; }
.sc { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 7px; padding: 5px 8px; border: 0; border-radius: 9px; background: none; text-align: left; font-size: 13px; }
.sc:hover { background: var(--mist); }
.sc-label { font-weight: 500; white-space: nowrap; }
.sc-count { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 12px; }
.sc .flag-ico { width: 13px; height: 18px; }
.sc:not(.is-on) { color: var(--ink-3); }
.sc:not(.is-on) .flag-ico { opacity: 0.28; filter: grayscale(1); }

.flag-ico { display: inline-block; width: 15px; height: 20px; background: no-repeat center / contain; flex: none; }

.filters { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 12px 10px; border-bottom: 1px solid var(--line); }
.dropdowns, .toggles { display: contents; }
.qf, .dd-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.qf:hover:not(:disabled), .dd-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.qf:disabled { opacity: 0.45; }
.qf[aria-pressed='true'], .dd-btn.is-active { background: var(--sea-wash); border-color: #a9cad7; color: var(--sea-2); font-weight: 500; }
.dd { position: relative; }
.dd-btn .caret { font-size: 10px; color: var(--ink-3); }
.dd-activity { border-color: transparent; background: var(--mist); color: var(--ink); font-weight: 500; }
.dd-menu { position: absolute; left: 0; top: calc(100% + 6px); z-index: 10; min-width: 210px; padding: 6px; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); display: grid; gap: 1px; }
.dd-host .dd-menu { left: auto; right: 0; }
.dd-menu[hidden] { display: none; }
.dd-title { margin: 2px 8px 6px; font-size: 12px; color: var(--ink-3); }
.dd-opt { padding: 7px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 13px; white-space: nowrap; }
.dd-opt:hover:not(:disabled) { background: var(--mist); }
.dd-opt[aria-checked='true'] { background: var(--sea-wash); color: var(--sea-2); font-weight: 500; }
.dd-opt:disabled { color: var(--ink-3); }

.search-row { display: flex; align-items: center; gap: 6px; padding: 10px 12px 4px; }
.search { flex: 1; display: block; }
.search input { width: 100%; padding: 7px 11px; border: 1px solid transparent; border-radius: 9px; font: inherit; font-size: 13px; color: var(--ink); background: var(--mist); }
.search input:focus { outline: none; border-color: var(--sea); background: var(--paper); }
.reset { border: 0; background: none; padding: 4px 2px; font-size: 12.5px; color: var(--sea); text-decoration: underline; text-underline-offset: 2px; }

.list-head { margin: 8px 16px 2px; font: 600 12px/1.3 var(--text); color: var(--ink-3); }
.spot-list { list-style: none; margin: 0; padding: 0 6px 8px; overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.spot-list .empty { padding: 14px 10px; color: var(--ink-2); font-size: 13px; }
.spot-list .list-sub { margin: 10px 10px 2px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.row { display: grid; grid-template-columns: 14px 1fr auto; gap: 9px; align-items: center; width: 100%; padding: 6px 8px; border: 0; border-radius: 9px; background: none; text-align: left; }
.row .flag-ico { width: 13px; height: 18px; }
.row:hover { background: var(--mist); }
.row.is-selected { background: var(--sea-wash); }
.row-off { color: var(--ink-2); }
.row-off .flag-ico { opacity: 0.6; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-name { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-place { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { display: grid; grid-template-columns: auto auto; gap: 0 7px; justify-items: end; font-variant-numeric: tabular-nums; }
.row-rating { font-weight: 600; font-size: 12.5px; }
.row-wind { grid-column: 1; font-size: 11.5px; color: var(--ink-2); }
.row-visa { grid-row: 1 / span 2; grid-column: 2; align-self: center; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; }

.side-foot { padding: 8px 12px 10px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.side-foot.no-unit .unit, .side-foot.no-unit .foot-label { display: none; }
.qf[hidden], .dd[hidden] { display: none !important; }
.foot-label { font-size: 12px; color: var(--ink-3); }
.lang { margin-right: auto; }
.lang select { border: 0; background: var(--mist); border-radius: 999px; padding: 4px 8px; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; max-width: 110px; }
.lang select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.unit { display: inline-flex; background: var(--mist); border-radius: 999px; padding: 2px; }
.unit button { border: 0; background: none; padding: 3px 9px; border-radius: 999px; font-size: 12px; color: var(--ink-2); }
.unit button[aria-pressed='true'] { background: var(--paper); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(18, 48, 63, 0.15); }

/* tones (visa etc.) */
.tone-good { color: var(--good); background: var(--good-bg); }
.tone-easy { color: var(--easy); background: var(--easy-bg); }
.tone-warn { color: var(--warn); background: var(--warn-bg); }
.tone-bad { color: var(--bad); background: var(--bad-bg); }
.tone-neutral { color: var(--ink-2); background: var(--mist); }

/* ------------------------------------------------------------- over the map */
.month-head { position: absolute; top: 14px; left: calc(var(--li) + 22px); pointer-events: none; z-index: 2; transition: left 0.28s cubic-bezier(.2, .8, .2, 1); }
.app.side-collapsed .month-head { left: 22px; top: 58px; }
.month-title { margin: 0; font: 700 clamp(36px, 4.2vw, 56px)/0.95 var(--display); letter-spacing: -0.02em; color: var(--ink);
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.95), 0 0 3px rgba(255, 255, 255, 0.9); }
.month-sub { margin: 8px 0 0 3px; font-weight: 500; color: var(--ink); text-shadow: 0 0 8px #fff, 0 0 2px #fff; }
[data-basemap='dark'] .month-title, [data-basemap='dark'] .month-sub { color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7); }

.basemaps { position: absolute; top: 12px; right: calc(var(--ri) + 12px); z-index: 3; transition: right 0.28s cubic-bezier(.2, .8, .2, 1); }
.bm-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 0; border-radius: 12px; font-size: 13px; font-weight: 500; }
.bm-toggle .caret { color: var(--ink-3); font-size: 10px; }
.bm-menu { position: absolute; right: 0; top: calc(100% + 6px); width: 280px; padding: 6px; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); display: grid; gap: 2px; }
.bm-menu[hidden] { display: none; }
.bm-menu button { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; }
.bm-menu button:hover { background: var(--mist); }
.bm-menu button[aria-checked='true'] { background: var(--sea-wash); }
.bm-menu .bm-swatch { width: 20px; height: 20px; border-radius: 5px; margin-top: 1px; }
.bm-text { display: flex; flex-direction: column; }
.bm-text small { color: var(--ink-2); font-size: 12px; line-height: 1.35; }
.bm-swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(18, 48, 63, 0.25); }
.bm-sea { background: linear-gradient(135deg, #f4f6f4 50%, #c9dfe6 50%); }
.bm-liberty { background: linear-gradient(135deg, #e9efd8 50%, #a3cce3 50%); }
.bm-satellite { background: linear-gradient(135deg, #5b6b45 50%, #1f4a63 50%); }
.bm-night { background: linear-gradient(135deg, #45516e 50%, #38435c 50%); }

/* timeline — the year at a glance, centred in the free map area */
.timeline { position: absolute; bottom: 16px; left: calc(var(--li) + (100% - var(--li) - var(--ri)) / 2); transform: translateX(-50%); z-index: 2; display: flex; align-items: stretch; gap: 2px; padding: 5px; max-width: calc(100% - var(--li) - var(--ri) - 24px);
  transition: left 0.28s cubic-bezier(.2, .8, .2, 1); }
.months { display: grid; grid-template-columns: repeat(12, minmax(28px, 44px)); gap: 2px; }
.m { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 5px; border: 0; border-radius: 10px; background: none; }
.m:hover { background: var(--mist); }
.m-bars { display: flex; flex-direction: column-reverse; justify-content: flex-start; width: 16px; height: 32px; gap: 1px; }
.m-bars i { display: block; width: 100%; border-radius: 2px; min-height: 0; }
.m-bars i[style*='height:0%'] { display: none; }
.b-peak { background: var(--peak); }
.b-shoulder { background: var(--shoulder); }
.b-snow { background: #fff; box-shadow: inset 0 0 0 1px #8fb0c4; }
.m:not(.is-current) .m-bars { opacity: 0.55; }
.m-name { font-size: 12px; color: var(--ink-2); }
.m.is-current { background: var(--ink); }
.m.is-current .m-name { color: #fff; font-weight: 600; }
.m.is-current .m-bars { opacity: 1; }
.tl-btn { width: 30px; border: 0; border-radius: 10px; background: none; font-size: 20px; color: var(--ink-2); }
.tl-btn:hover { background: var(--mist); color: var(--ink); }
.app.has-panel .tl-btn { display: none; }

/* map tooltip */
.spot-tip .maplibregl-popup-content { padding: 10px 12px; border-radius: var(--r-m); box-shadow: var(--shadow); font: 13px/1.4 var(--text); color: var(--ink); }
.spot-tip .maplibregl-popup-tip { display: none; }
.tip-name { font: 600 14.5px/1.25 var(--text); }
.tip-place { color: var(--ink-2); margin-bottom: 6px; }
.tip-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tip-row + .tip-row { margin-top: 4px; }
.tip-rating { font-weight: 600; }
.tip-season { padding: 1px 7px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.tip-peak { background: var(--good-bg); color: var(--good); }
.tip-shoulder { background: var(--warn-bg); color: var(--warn); }
.tip-snow { background: var(--easy-bg); color: var(--snow-ink); }
.tip-muted { color: var(--ink-2); font-size: 12.5px; }
.tip-visa { padding: 1px 7px; border-radius: 999px; font-size: 12px; }

.maplibregl-ctrl-bottom-right { bottom: 16px; right: var(--ri); transition: right 0.28s; }
.maplibregl-ctrl-bottom-left { left: var(--li); }
.maplibregl-ctrl-group { border-radius: var(--r-m); box-shadow: var(--shadow); }

/* -------------------------------------------------------------------- panel */
.panel { position: absolute; top: 12px; right: 12px; bottom: 12px; width: var(--panel); background: #fff; max-width: calc(100% - 24px); z-index: 4; overflow: hidden; transform: translateX(calc(100% + 24px)); transition: transform 0.28s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.panel.is-open { transform: none; }
.panel.is-loading .panel-body { opacity: 0.45; }
.panel-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 8px rgba(18, 48, 63, 0.2); font-size: 22px; line-height: 1; }
.panel-body { overflow-y: auto; flex: 1; padding-bottom: 40px; transition: opacity 0.15s; }
@media (prefers-reduced-motion: reduce) { .panel { transition: none; } }

.gallery-host { background: var(--mist); }
.gallery { display: flex; gap: 2px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.gallery figure { position: relative; flex: 0 0 86%; margin: 0; scroll-snap-align: start; aspect-ratio: 3 / 2; background: #cfdde2; }
.gallery figure:only-child { flex-basis: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery figcaption a { color: #fff; text-decoration: none; }
.gallery-empty { display: flex; flex-direction: column; gap: 4px; justify-content: center; align-items: flex-start; height: 120px; padding: 0 24px; color: var(--ink-2); }

.p-head { padding: 18px 24px 4px; }
.p-place { margin: 0 0 6px; color: var(--ink-2); }
.p-head h2 { margin: 0; font: 700 25px/1.12 var(--display); letter-spacing: -0.015em; }
.p-latin { margin: 4px 0 0; color: var(--ink-2); }
.p-scores { display: flex; gap: 28px; margin-top: 12px; }
.p-score { display: flex; flex-direction: column; gap: 2px; }
.p-score-label { font-size: 12px; color: var(--ink-3); }
.p-basis { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; }
.vibe-head { display: flex; align-items: center; gap: 10px; }
.vibe-counts { margin: 6px 0 0; color: var(--ink-2); }
.vibe-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--paper-2, #f3f6f7); color: var(--ink); }
.vibe-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.vibe-photos figure { margin: 0; aspect-ratio: 3 / 2; border-radius: var(--r-s); overflow: hidden; background: var(--mist); }
.vibe-photos img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.stars b { font: 700 22px/1 var(--display); margin-right: 2px; }
.stars { color: var(--ink-2); }
.p-rating .muted { font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 500; }
.chip-sm { padding: 0 6px; font-size: 11px; margin-left: 6px; }
.season-chip .sw { width: 9px; height: 9px; border-radius: 2px; }
.season-peak { background: var(--good-bg); color: var(--good); } .season-peak .sw { background: var(--peak); }
.season-shoulder { background: var(--warn-bg); color: var(--warn); } .season-shoulder .sw { background: var(--shoulder); }
.season-snow { background: var(--easy-bg); color: var(--snow-ink); } .season-snow .sw { background: #fff; box-shadow: inset 0 0 0 1px var(--snow-ink); }
.season-off { background: var(--mist); color: var(--ink-2); } .season-off .sw { background: var(--off); }
.p-desc { margin: 14px 24px 0; font-size: 14.5px; line-height: 1.55; max-width: 64ch; }

.p-sec { padding: 18px 24px 4px; border-top: 1px solid var(--line); margin-top: 18px; }
.p-sec h3 { margin: 0 0 12px; font: 600 15px/1.3 var(--text); }
.facts { display: grid; grid-template-columns: 1fr; margin: 0; }
.fact { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid #edf2f3; }
.fact:last-child { border-bottom: 0; }
.fact dt { color: var(--ink-2); }
.fact dd { margin: 0; }
.fact small { color: var(--ink-2); font-size: 12.5px; }
.fact small.block { display: block; margin-top: 2px; }
.facts-3, .facts-2 { grid-template-columns: repeat(3, 1fr); gap: 0 16px; margin-top: 8px; }
.facts-2 { grid-template-columns: repeat(2, 1fr); }
.facts-3 .fact, .facts-2 .fact { grid-template-columns: 1fr; gap: 2px; border-bottom: 0; }
.facts-3 .fact dd, .facts-2 .fact dd { font: 600 17px/1.2 var(--text); }
.meter { display: inline-flex; gap: 3px; vertical-align: -1px; }
.meter i { width: 14px; height: 8px; border-radius: 2px; background: #e3eaec; }
.meter i.on { background: var(--sea); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tag { padding: 1px 8px; border-radius: 999px; background: var(--mist); border: 1px solid var(--line); font-size: 12.5px; }
.water-flat { background: var(--sea-wash); border-color: #c6dde6; }
.water-waves, .water-big_waves { background: #e6eefb; border-color: #cbd9f3; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 10px; height: 12px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--peak) 50%, var(--shoulder) 50%); }
.lg-line { width: 16px; height: 2px; background: var(--ink); position: relative; }
.lg-line::after { content: ''; position: absolute; left: 5px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: inherit; box-shadow: 0 0 0 1.5px #fff; }
.lg-line.air { background: #d0632f; }
.lg-line.water { background: #2b7bb0; }
.lg-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 1.5px #fff; }

.chart-host { position: relative; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: #e9eff1; stroke-width: 1; fill: none; }
.chart .axis { stroke: #c9d5da; stroke-width: 1; }
.chart .tick { font: 10.5px var(--text); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .tick.month.is-current { fill: var(--ink); font-weight: 700; }
.chart .threshold { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 0; opacity: 0.45; }
.chart .threshold-label { fill: var(--ink-2); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.chart .bar { opacity: 0.9; }
.chart .bar.is-current { opacity: 1; stroke: var(--ink); stroke-width: 1.5; }
.chart .value { font: 600 12px var(--text); fill: var(--ink); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.era5 { stroke: var(--ink); }
.chart .dot.era5 { fill: var(--ink); stroke: #fff; stroke-width: 2; }
.chart .line.air { stroke: #d0632f; }
.chart .line.water { stroke: #2b7bb0; }
.chart .dot.air { fill: #d0632f; stroke: #fff; stroke-width: 2; }
.chart .dot.water { fill: #2b7bb0; stroke: #fff; stroke-width: 2; }
.chart .end-label { font: 11px var(--text); fill: var(--ink-2); }
.chart .cursor { stroke: var(--ink-3); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover { fill: rgba(20, 93, 120, 0.06); }
.chart-tip { position: absolute; display: none; z-index: 5; padding: 8px 10px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.45; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow); }
.chart-tip .muted { color: #b9cad2; }
.rose-host { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
.rose { max-width: 200px; }
.rose .petal { fill: var(--sea); fill-opacity: 0.85; stroke: #fff; stroke-width: 1; }
.rose .center { fill: var(--ink); }
.source { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; }

.fc { display: grid; gap: 2px; }
.fc-row { display: grid; grid-template-columns: 54px 18px 1fr 150px; gap: 10px; align-items: center; padding: 5px 0; }
.fc-day { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fc-dir { display: inline-block; text-align: center; font-weight: 700; color: var(--ink); }
.fc-bar { position: relative; height: 10px; border-radius: 3px; background: #edf2f3; }
.fc-w { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #d5dde1; }
.fc-row.is-good .fc-w { background: var(--peak); }
.fc-g { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); border-radius: 1px; }
.fc-val { font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-val small { font-weight: 400; color: var(--ink-2); }

.videos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.video { position: relative; padding: 0; border: 0; border-radius: var(--r-s); overflow: hidden; background: #000; aspect-ratio: 16 / 10; text-align: left; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: 0.88; display: block; }
.video .v-play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #fff; display: grid; place-items: center; font-size: 14px; }
.v-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px; color: #fff; font-size: 12px; line-height: 1.25; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-frame { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.video-frame iframe { width: 100%; height: 100%; border: 0; border-radius: var(--r-s); }
.more-link { grid-column: 1 / -1; font-weight: 500; }
.video-link { grid-column: 1 / -1; }

.schools { list-style: none; padding: 0; margin: 8px 0 0; }
.schools li { padding: 5px 0; border-bottom: 1px solid #edf2f3; }
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.proscons ul { margin: 0; padding-left: 18px; }
.proscons li { margin-bottom: 4px; }
.pros li::marker { content: '+  '; color: var(--good); font-weight: 700; }
.cons li::marker { content: '–  '; color: var(--bad); font-weight: 700; }
.hazards { margin: 12px 0 0; padding: 8px 12px; border-radius: var(--r-s); background: var(--warn-bg); }
.links { margin: 0; padding-left: 18px; }
.links li { margin-bottom: 4px; }
.sources { margin-top: 10px; font-size: 12.5px; }
.sources ul { padding-left: 18px; word-break: break-all; }
.error { color: var(--bad); padding: 24px; }

.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(8, 20, 27, 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; }
.lightbox p { color: #cbd8de; font-size: 12.5px; margin: 0; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; }
.lb-prev { left: 20px; top: 50%; } .lb-next { right: 20px; top: 50%; } .lb-close { top: 18px; right: 18px; }

/* ------------------------------------------------------------- narrow screens */
@media (max-width: 1280px) { :root { --panel: 420px; --side: 276px; } }
/* ------------------------------------------------------------ phones and small tablets
   Map first. At the bottom: the month strip and a bar that opens the list as a bottom sheet;
   filters fold away inside the sheet; the spot card is a tall sheet over everything. */
.so-sum, .so-label-phone, .filters-toggle { display: none; }
@media (max-width: 900px) and (orientation: portrait), (max-width: 560px) {
  .app { --li: 0px; --ri: 0px; --peek: 50px; --sheet: min(70dvh, 640px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px); }

  .month-head, .app.side-collapsed .month-head { top: calc(10px + var(--safe-t)); left: 14px; right: 60px; }
  .month-title { font-size: 30px; }
  .month-sub { margin-top: 4px; font-size: 13px; }

  .basemaps { top: calc(8px + var(--safe-t)); right: 8px; }
  .bm-toggle { width: 42px; height: 42px; padding: 0; justify-content: center; gap: 0; font-size: 0; }
  .bm-toggle .bm-swatch { display: none; }
  .bm-toggle::before { content: ''; width: 22px; height: 22px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312303f' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M12 3 2.5 8 12 13l9.5-5z'/%3E%3Cpath d='m2.5 12 9.5 5 9.5-5'/%3E%3Cpath d='m2.5 16 9.5 5 9.5-5'/%3E%3C/svg%3E"); }
  .bm-toggle .caret { display: none; }
  .bm-menu { position: fixed; top: auto; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); width: auto; max-height: 70dvh; overflow-y: auto; z-index: 20; }

  /* month strip: full width, scrolls sideways, sits above the bar (or above the open sheet) */
  .timeline { left: 8px; right: 8px; transform: none; max-width: none; padding: 4px; bottom: calc(var(--peek) + 16px + var(--safe-b)); transition: bottom 0.28s cubic-bezier(.2, .8, .2, 1); }
  .app:not(.side-collapsed) .timeline { bottom: calc(var(--sheet) + 8px + var(--safe-b)); }
  .tl-btn, .app.has-panel .tl-btn { display: none; }
  .months { display: flex; width: 100%; gap: 2px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
  .months::-webkit-scrollbar { display: none; }
  .m { flex: 1 0 46px; scroll-snap-align: center; padding: 5px 0 4px; }
  .m-bars { height: 22px; }
  .m-name { font-size: 12.5px; }

  /* the bar that opens the sheet */
  .side-open, .app.side-collapsed .side-open { display: none; }
  .app.side-collapsed .side-open { display: flex; top: auto; left: 8px; right: 8px; bottom: calc(8px + var(--safe-b)); height: var(--peek);
    align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; font-size: 14px; }
  .side-open .so-label { display: none; }
  .side-open .so-sum { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-open .so-label-phone { display: block; flex: none; color: var(--sea); font-weight: 600; }
  .side-open .so-label-phone::after { content: ' ▴'; }

  /* bottom sheet with the list */
  .side { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: calc(var(--sheet) + var(--safe-b)); padding-bottom: var(--safe-b); border-radius: 18px 18px 0 0; }
  .app.side-collapsed .side { transform: translateY(calc(100% + 16px)); opacity: 1; }
  .brand { position: relative; padding: 14px 6px 4px 16px; }
  .brand::before { content: ''; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line); }
  .side-toggle { width: 42px; height: 42px; font-size: 22px; transform: rotate(-90deg); }
  .seasons { display: flex; gap: 6px; padding: 4px 12px 6px; overflow-x: auto; scrollbar-width: none; }
  .seasons::-webkit-scrollbar { display: none; }
  .sc { flex: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; }
  .filters { display: none; padding: 2px 12px 10px; gap: 6px; }
  .side.filters-open .filters { display: flex; }
  .filters-toggle { display: inline-flex; align-items: center; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: none; font-size: 13.5px; font-weight: 500; white-space: nowrap; color: var(--ink); }
  .filters-toggle[aria-expanded='true'] { background: var(--sea-wash); border-color: #a9cad7; color: var(--sea-2); }
  .qf, .dd-btn { padding: 8px 12px; font-size: 13.5px; }
  .dd-menu, .dd-host .dd-menu { position: fixed; left: 8px; right: 8px; top: auto; bottom: calc(8px + var(--safe-b)); min-width: 0; max-height: 70dvh; overflow-y: auto; z-index: 20; }
  .dd-opt { padding: 12px; font-size: 15px; white-space: normal; }
  .search-row { padding: 6px 12px 4px; }
  .search input { height: 40px; font-size: 16px; }   /* 16px: iOS does not zoom into the field */
  .reset { padding: 8px 4px; font-size: 13.5px; }
  .list-head { margin: 8px 16px 2px; }
  .row { padding: 10px 8px; }
  .row-name { font-size: 15px; }
  .row-place { font-size: 12.5px; }
  .side-foot { padding: 8px 12px; }
  .lang select { padding: 8px 10px; font-size: 14px; }
  .unit button { padding: 7px 12px; font-size: 13px; }

  /* spot card: a tall sheet over everything, a strip of map stays visible on top */
  .panel { top: calc(44px + var(--safe-t)); left: 0; right: 0; bottom: 0; width: auto; max-width: none; border-radius: 18px 18px 0 0; transform: translateY(calc(100% + 24px)); z-index: 6; }
  .panel-body { padding-bottom: calc(40px + var(--safe-b)); }
  .panel-close { width: 42px; height: 42px; }
  .gallery figure { flex-basis: min(86%, 420px); max-height: 34dvh; aspect-ratio: auto; height: min(57vw, 34dvh); }
  .panel-body > :not(.gallery-host) { max-width: 720px; }

  .maplibregl-ctrl-bottom-right { display: none; }
  .maplibregl-ctrl-bottom-left { left: 0; bottom: calc(var(--peek) + 92px + var(--safe-b)); }
  .rose-host { grid-template-columns: 1fr; }
  .fact { grid-template-columns: 120px 1fr; }
  .fc-row { grid-template-columns: 48px 16px 1fr 120px; }
}
}
.tip-off { background: var(--bad-bg); color: var(--bad); }
.tip-vibe { padding: 1px 7px; border-radius: 999px; font-size: 12px; background: var(--mist); color: var(--ink-2); }
.dd-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.lg-threshold { width: 16px; height: 0; border-top: 1px solid var(--ink-2); opacity: 0.6; }
.facts-1 { grid-template-columns: 1fr; margin-top: 8px; }
.facts-1 .fact { grid-template-columns: 1fr; gap: 2px; border-bottom: 0; }
.facts-1 .fact dd { font: 600 17px/1.2 var(--text); }

/* layout helpers */
.stage { display: contents; }
.month-title { font-weight: 700; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; }
.skip:focus { top: 12px; }

/* hidden panels must not be reachable: visibility flips after the slide-out */
.app.side-collapsed .side { visibility: hidden; transition: transform 0.28s cubic-bezier(.2, .8, .2, 1), opacity 0.2s, visibility 0s 0.28s; }
.panel:not(.is-open) { visibility: hidden; transition: transform 0.28s cubic-bezier(.2, .8, .2, 1), visibility 0s 0.28s; }

/* keep the timeline clear of the zoom buttons on the right (laptop layout) */
@media (min-width: 901px) { .timeline { max-width: calc(100% - var(--li) - var(--ri) - 120px); } }

/* focus details */
.spot-list .row:focus-visible { outline-offset: -2px; }
.search input:focus-visible { box-shadow: 0 0 0 2px var(--sea); }
.unit button { padding: 4px 10px; min-height: 24px; }

/* pressed quick filters read as switched on, not just tinted */
.qf[aria-pressed='true']::before { content: '✓'; margin-right: 4px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
.photo-btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.photo-btn:focus-visible { outline-offset: -3px; }
#panel-title:focus { outline: none; }
#panel-title:focus-visible { outline: 2px solid var(--sea); outline-offset: 4px; }
.p-error { padding: 28px 24px; }
.p-error h2 { margin: 0 0 8px; font: 700 20px/1.2 var(--display); }
.toast { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 60; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 13px; }
/* the ‹ › month buttons hide with a card open only when space is tight */
@media (min-width: 1600px) { .app.has-panel .tl-btn { display: block; } }

/* phones held sideways: keep the laptop layout, just tighter */
@media (max-height: 520px) and (orientation: landscape) {
  :root { --side: 268px; --panel: min(420px, 54vw); }
  .side { top: 8px; bottom: 8px; left: 8px; }
  .panel { top: 8px; bottom: 8px; right: 8px; }
  .brand { padding: 8px 8px 4px 12px; }
  .seasons { padding: 0 6px 4px; }
  .sc { padding: 3px 8px; }
  .filters { display: none; padding: 2px 10px 6px; }
  .side.filters-open .filters { display: flex; }
  .filters-toggle { display: inline-flex; align-items: center; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: none; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
  .filters-toggle[aria-expanded='true'] { background: var(--sea-wash); border-color: #a9cad7; color: var(--sea-2); }
  .search-row { padding: 6px 10px 2px; }
  .foot-label { display: none; }
  .month-head { top: 10px; }
  .app.side-collapsed .month-head { top: 50px; }
  .month-title { font-size: 28px; }
  .month-sub { margin-top: 3px; font-size: 12.5px; }
  .timeline { bottom: 8px; padding: 3px; }
  .m { padding: 3px 0; gap: 2px; }
  .m-bars { height: 18px; }
  .maplibregl-ctrl-bottom-right { display: none; }
}
