/* ==========================================================
   Town guide engine: shared styles.
   Big type, big photos, lots of air. Motion is progressive: everything is readable
   without it, and it switches off for reduced-motion users.
   ========================================================== */
:root {
  --bg: #fffdf7;
  --bg-2: #fff7dc;
  --surface: #ffffff;
  --ink: #1c2230;
  --on-panel: #1c2230;
  --ink-2: #4b5364;
  --ink-3: #697184;
  --line: #efe9da;
  --panel: #ffd21f;
  --panel-deep: #f7b500;
  --accent-ink: #7a5a00;
  --panel-soft: #fff1b8;
  --clay: #c0452a;
  --clay-soft: #fde8e1;
  --teal: #0a7299;
  --teal-soft: #dff1f8;
  --sage: #55713a;
  --sage-soft: #e9f1dd;
  --r-lg: 32px;
  --r-md: 22px;
  --shadow: 0 2px 6px rgba(28, 34, 48, .05), 0 18px 40px -12px rgba(28, 34, 48, .14);
  --bounce: cubic-bezier(.2, 1.25, .35, 1);
  --glide: cubic-bezier(.2, .8, .2, 1);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12151d; --bg-2: #1b1f2a; --surface: #1c212c; --ink: #f4f1e8; --ink-2: #c3c6d0; --ink-3: #979cab; --line: #2d3340;
  --accent-ink: var(--panel); --panel-soft: #2c3040; --clay: #f08f73; --clay-soft: #3a231c; --teal: #74cdea; --teal-soft: #15303b; --sage: #b0c78d; --sage-soft: #282f1e;
  --shadow: 0 18px 40px -12px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
.t-clay { --t: var(--clay); --ts: var(--clay-soft); }
.t-teal { --t: var(--teal); --ts: var(--teal-soft); }
.t-sage { --t: var(--sage); --ts: var(--sage-soft); }
.t-sulfur { --t: var(--accent-ink); --ts: var(--panel-soft); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 700; line-height: 1; letter-spacing: -.035em; margin: 0 0 .4em; text-wrap: balance; }
h1 em, h2 em, .tagline em, .foot-call em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.015em; }
h1 { font-size: clamp(3.2rem, 8vw, 6.4rem); }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.7rem); }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.3; margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 720px) { .wrap { padding: 0 40px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 100; background: var(--panel); color: var(--on-panel); padding: 10px 14px; font-weight: 600; border-radius: 10px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
.kicker { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--accent-ink); margin-bottom: 10px; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 58ch; }
.count { font-size: .86rem; color: var(--ink-3); margin: 12px 0; font-variant-numeric: tabular-nums; }
.note { font-size: .9rem; color: var(--ink-2); background: var(--bg-2); border-radius: 16px; padding: 14px 18px; margin-top: 32px; max-width: 76ch; }
.note a { text-decoration: underline; }
.mt { margin-top: 52px; }

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; translate: 0 26px; transition: opacity .7s var(--glide), translate .8s var(--glide); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .rv.in { opacity: 1; translate: none; }
}

/* ---------- Page transitions ---------- */
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(22px); } }
::view-transition-old(root) { animation: vt-out .18s ease-in both; }
::view-transition-new(root) { animation: vt-in .38s var(--glide) both; }
.topbar { view-transition-name: topbar; }
::view-transition-old(topbar), ::view-transition-new(topbar) { animation: none; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ---------- Top bar ---------- */
.topbar { position: fixed; z-index: 50; top: 12px; left: 0; right: 0; padding: 0 12px; pointer-events: none; }
.bar { pointer-events: auto; display: flex; align-items: center; gap: 6px; max-width: 1040px; margin: 0 auto; padding: 6px 6px 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: auto; min-height: 44px; }
.brand-mark { width: 30px; height: 30px; transition: rotate .7s var(--bounce); }
.brand:hover .brand-mark { rotate: 72deg; }
.brand-name { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.22rem; letter-spacing: -.03em; }
.links { display: none; position: relative; margin-right: auto; }
.links a { position: relative; z-index: 1; display: flex; align-items: center; min-height: 44px; padding: 0 14px; text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.links a:hover { color: var(--ink); }
.links a.active { color: var(--on-panel); }
.ind { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; background: var(--panel); border-radius: 999px; opacity: 0; transition: transform .45s var(--bounce), width .45s var(--bounce), opacity .2s; }
.bar-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; border-radius: 999px; background: var(--bg-2); transition: background .2s, scale .3s var(--bounce); }
.bar-btn:hover { background: var(--panel); color: var(--on-panel); scale: 1.05; }
.bar-btn svg { width: 19px; height: 19px; }
.search-trigger span, .search-trigger kbd { display: none; }
.search-trigger kbd { font: inherit; font-size: .74rem; padding: 0 6px; border-radius: 6px; background: rgba(28, 34, 48, .09); }
@media (min-width: 1040px) {
  .links { display: flex; }
  .brand { margin-right: 10px; }
  .menu-btn { display: none; }
  .search-trigger { padding: 0 14px; }
  .search-trigger span, .search-trigger kbd { display: inline; font-size: .9rem; }
  .search-trigger kbd { font-size: .74rem; }
}
.sheet { position: fixed; inset: 0; z-index: 45; background: var(--panel); color: var(--on-panel); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 90px 28px 40px; clip-path: circle(0 at calc(100% - 40px) 40px); visibility: hidden; transition: clip-path .55s var(--glide), visibility .55s; }
.sheet.open { clip-path: circle(150% at calc(100% - 40px) 40px); visibility: visible; }
.sheet a { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 10vw, 3.4rem); letter-spacing: -.035em; line-height: 1.16; text-decoration: none; }
@media (min-width: 1040px) { .sheet { display: none; } }

/* ---------- Views ---------- */
.view { display: none; }
.view.active { display: block; }
.section { padding-top: 88px; padding-bottom: 88px; }
.section.no-top { padding-top: 0; }
.head { padding-top: 132px; padding-bottom: 28px; position: relative; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.sec-head h2 { margin: 0; }
.more { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--panel); padding: 6px 0; }
.two { display: grid; gap: 52px; margin-top: 28px; }
.two > * { min-width: 0; }
@media (min-width: 1000px) { .two { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 72px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 22px; border-radius: 999px; font-size: .97rem; font-weight: 600; text-decoration: none; transition: scale .35s var(--bounce), background .2s, color .2s, box-shadow .2s; }
.btn:hover { scale: 1.04; }
.btn:active { scale: .97; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-ink { background: var(--on-panel); color: #fff; }
.btn-ink:hover { background: var(--teal); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-line-ink { box-shadow: inset 0 0 0 1.5px var(--on-panel); color: var(--on-panel); }
.btn-line-ink:hover { background: var(--on-panel); color: #fff; }
.btn-call { background: var(--panel); color: var(--on-panel); }
.btn-call:hover { background: var(--panel-deep); }
.btn-soft { background: var(--bg-2); }
.btn-soft:hover { background: var(--panel-soft); }
.round { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); transition: scale .3s var(--bounce), background .2s; }
.round:hover { scale: 1.08; background: var(--panel); color: var(--on-panel); }
.round svg { width: 18px; height: 18px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 6px 15px; border-radius: 999px; background: var(--bg-2); font-size: .9rem; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background .2s, color .2s, scale .3s var(--bounce); white-space: nowrap; }
.pill:hover { background: var(--panel-soft); color: var(--ink); scale: 1.03; }
.pill.active, .pill[aria-pressed="true"] { background: var(--on-panel); color: #fff; }
:root[data-theme="dark"] .pill.active, :root[data-theme="dark"] .pill[aria-pressed="true"] { background: var(--panel); color: var(--on-panel); }
.pill em { font-style: normal; opacity: .6; font-size: .82rem; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.pills:empty { display: none; }
.tag { display: inline-block; font-size: .76rem; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); line-height: 1.5; }
.tag.tone { background: var(--ts); color: var(--t); font-weight: 600; }
.tag.warn { background: var(--clay-soft); color: var(--clay); }
.switch { display: inline-flex; gap: 2px; background: var(--bg-2); border-radius: 999px; padding: 4px; margin-bottom: 18px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.switch button { min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600; font-size: .95rem; white-space: nowrap; color: var(--ink-2); transition: background .25s, color .25s; }
.switch button.active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(28, 34, 48, .12); }
.field { display: flex; align-items: center; gap: 10px; flex: 1; background: var(--surface); border-radius: 999px; padding: 0 18px; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s; min-height: 52px; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.field svg { width: 19px; height: 19px; color: var(--ink-3); flex: none; }
.field input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; padding: 10px 0; outline: none; }
.field input::placeholder { color: var(--ink-3); }
.head .field { max-width: 620px; }

/* ---------- Photos ---------- */
.ph { margin: 0; position: relative; height: 100%; overflow: hidden; background: var(--bg-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--glide); }
.ph-zoom { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.ph figcaption { position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px); background: rgba(28, 34, 48, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: #fff; font-size: .68rem; padding: 2px 9px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph figcaption a { text-decoration: none; }
.ph figcaption a:hover { text-decoration: underline; }
.banner { aspect-ratio: 16 / 6; border-radius: var(--r-lg); overflow: hidden; margin-bottom: 30px; }
.banner-tall { aspect-ratio: 16 / 7; }
.banner-tall img { object-position: 50% 22%; }
@media (max-width: 719px) { .banner, .banner-tall { aspect-ratio: 4 / 3; border-radius: var(--r-md); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--panel); color: var(--on-panel); margin-top: 56px; padding: 15px 0; rotate: -1.2deg; scale: 1.03; }
.marquee-track { display: flex; width: max-content; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 2.2vw, 1.7rem); letter-spacing: -.02em; white-space: nowrap; }
.marquee-track span { padding-right: 34px; }
.marquee-track span::after { content: "✦"; margin-left: 34px; font-size: .75em; }
@media (prefers-reduced-motion: no-preference) { .marquee-track { animation: slide 44s linear infinite; } .marquee:hover .marquee-track { animation-play-state: paused; } }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 20px; margin: 72px 0 0; }
.stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dd { margin: 0; font-family: var(--font-display); font-size: clamp(2.8rem, 5.6vw, 4.6rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats dd small { font-size: .42em; letter-spacing: -.01em; margin-left: 3px; font-weight: 600; }
.stats dt { font-size: .88rem; color: var(--ink-3); margin-top: 6px; line-height: 1.3; }
@media (min-width: 880px) { .stats { grid-template-columns: repeat(5, 1fr); } }

/* ---------- When ---------- */
.when { position: relative; overflow: hidden; display: grid; gap: 22px 40px; padding: 28px 22px; border-radius: var(--r-lg); background: #fff0b3; color: var(--on-panel); transition: background .7s ease; }
.when-sun { position: absolute; top: -70px; right: -70px; width: 320px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, var(--panel-soft), var(--panel) 70%); transition: transform .8s var(--bounce); pointer-events: none; }
.when-main, .when-on, .when-range { position: relative; z-index: 1; min-width: 0; }
.when-month { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 8vw, 6rem); letter-spacing: -.05em; line-height: 1; }
.when-note { font-size: 1.14rem; max-width: 40ch; margin: 12px 0 20px; min-height: 3.1em; }
.when-stats { display: flex; flex-wrap: wrap; gap: 14px 34px; }
.when-stats b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.when-stats span { font-size: .84rem; }
.when-on h4 { margin: 0 0 8px; font-size: .86rem; font-weight: 600; }
.when-ev { display: block; padding: 11px 15px; margin-bottom: 7px; border-radius: 16px; background: rgba(255, 255, 255, .72); color: var(--on-panel); text-decoration: none; transition: background .2s, translate .3s var(--bounce); }
.when-ev:hover { background: #fff; translate: 4px 0; }
.when-ev b { display: block; font-weight: 600; line-height: 1.25; }
.when-ev small { font-size: .82rem; color: #4b5364; }
.when-range { grid-column: 1 / -1; }
.when-range input { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: grab; margin: 0; display: block; }
.when-range input::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: rgba(28, 34, 48, .16); }
.when-range input::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(28, 34, 48, .16); }
.when-range input::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -14px; border-radius: 50%; background: var(--on-panel); border: 5px solid #fff; box-shadow: 0 4px 12px rgba(28, 34, 48, .3); transition: scale .25s var(--bounce); }
.when-range input::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--on-panel); border: 5px solid #fff; }
.when-range input:active { cursor: grabbing; }
.when-range input:active::-webkit-slider-thumb { scale: 1.15; }
.when-ticks { display: flex; justify-content: space-between; padding: 0 12px; font-size: .78rem; font-weight: 500; }
.when-ticks button { min-width: 20px; min-height: 28px; color: #4b5364; }
.when-ticks button.on { color: var(--on-panel); font-weight: 700; }
@media (max-width: 559px) { .when-ticks button:nth-child(even) { visibility: hidden; } }
@media (min-width: 880px) { .when { grid-template-columns: 1.3fr 1fr; padding: 44px 48px 30px; } }

/* ---------- Postcards ---------- */
.day { padding-top: 0; overflow: clip; }
.track-nav { display: none; gap: 8px; }
@media (min-width: 880px) { .track-nav { display: flex; } }
.track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 14px max(20px, calc((100vw - 1240px) / 2 + 40px)) 34px; cursor: grab; }
.track::-webkit-scrollbar { display: none; }
.track.dragging { cursor: grabbing; scroll-snap-type: none; }
.track.dragging a { pointer-events: none; }
.card-post { flex: 0 0 min(330px, 80vw); scroll-snap-align: center; background: var(--surface); padding: 10px 10px 18px; border-radius: 20px; box-shadow: var(--shadow); text-decoration: none; rotate: var(--tilt); transition: rotate .5s var(--bounce), translate .5s var(--bounce); user-select: none; }
.card-post:nth-child(odd) { --tilt: -1.6deg; }
.card-post:nth-child(even) { --tilt: 1.4deg; }
.card-post:hover { rotate: 0deg; translate: 0 -8px; }
.card-post:hover img { transform: scale(1.05); }
.card-post .pic { aspect-ratio: 5 / 4; border-radius: 13px; overflow: hidden; }
.card-post img { -webkit-user-drag: none; }
.card-post .ph figcaption { font-size: .62rem; }
.card-post small { display: block; margin: 12px 8px 0; font-family: var(--font-serif); font-style: italic; font-size: 1.14rem; color: var(--accent-ink); }
.card-post h3 { margin: 0 8px; font-family: var(--font-display); font-size: 1.42rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.card-post p { margin: 6px 8px 0; font-size: .95rem; color: var(--ink-2); }

/* ---------- Next events ---------- */
.next { display: grid; gap: 12px; }
@media (min-width: 880px) { .next { grid-template-columns: repeat(3, 1fr); } }
.next-card { position: relative; background: var(--bg-2); padding: 24px; border-radius: var(--r-md); text-decoration: none; display: flex; flex-direction: column; gap: 8px; transition: background .25s, translate .4s var(--bounce); min-height: 210px; }
.next-card:hover { background: var(--panel-soft); translate: 0 -4px; }
.next-when { align-self: flex-start; background: var(--panel); color: var(--on-panel); font-weight: 600; font-size: .82rem; padding: 3px 12px; border-radius: 999px; }
.next-card h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.08; }
.next-card p { margin: 0; color: var(--ink-2); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.next-card .tag { align-self: flex-start; margin-top: auto; background: var(--clay-soft); color: var(--clay); }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tiles a { display: flex; flex-direction: column; gap: 22px; padding: 18px; border-radius: var(--r-md); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; transition: background .25s, box-shadow .25s, translate .4s var(--bounce); min-height: 128px; }
.tiles a:hover { background: var(--panel); color: var(--on-panel); box-shadow: none; translate: 0 -4px; }
.tiles svg { width: 25px; height: 25px; }
.tiles b { font-family: var(--font-display); font-size: 1.16rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: auto; }
@media (min-width: 880px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Rows ---------- */
.dir-tools { display: flex; gap: 8px; align-items: center; }
.rows { display: grid; gap: 8px; }
.rows.play > *:nth-child(-n+10) { animation: rowin .5s var(--glide) both; animation-delay: calc(var(--n, 0) * 32ms); }
@media (prefers-reduced-motion: reduce) { .rows.play > * { animation: none !important; } }
@keyframes rowin { from { opacity: 0; transform: translateY(14px); } }
.row { display: grid; gap: 8px 22px; padding: 18px 20px; background: var(--surface); border-radius: 20px; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s, translate .35s var(--bounce); }
.row[data-open] { cursor: pointer; }
.row[data-open]:hover { box-shadow: var(--shadow); translate: 0 -2px; }
.row-main { min-width: 0; }
.row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row .sub { font-size: .84rem; font-weight: 500; color: var(--t, var(--ink-3)); margin-top: 1px; }
.row p { margin: 6px 0 0; font-size: .95rem; color: var(--ink-2); }
.row-meta { font-size: .86rem; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.row-meta div + div { margin-top: 3px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.row .btn, .card .btn, .feature .btn { min-height: 44px; font-size: .86rem; padding: 6px 15px; }
.fav { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-2); color: var(--ink-3); font-size: 1.08rem; transition: background .2s, color .2s, scale .4s var(--bounce); }
.fav:hover { color: var(--ink); scale: 1.1; }
.fav.on { background: var(--panel); color: var(--on-panel); scale: 1.05; }
@media (min-width: 1160px) {
  .row.listing { grid-template-columns: minmax(0, 1fr) 190px 290px; }
  .row.listing .row-actions { justify-content: flex-end; }
}
.empty { padding: 40px 20px; color: var(--ink-2); text-align: center; }
.empty a { text-decoration: underline; }
.src { font-size: .8rem; color: var(--ink-3); }

/* ---------- Almanac ---------- */
.jump { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px 0; }
.jump button { flex: 1 0 54px; min-height: 58px; border-radius: 16px; background: var(--bg-2); font-weight: 600; font-size: .95rem; line-height: 1.1; transition: background .2s, translate .3s var(--bounce); }
.jump button span { display: block; font-size: .72rem; font-weight: 400; color: var(--ink-3); }
.jump button:hover { background: var(--panel-soft); translate: 0 -2px; }
.jump button.now { background: var(--panel); color: var(--on-panel); }
.jump button.now span { color: var(--on-panel); }
.month { display: grid; gap: 6px 32px; padding: 28px 0; border-top: 1.5px solid var(--line); scroll-margin-top: 84px; }
.month h2 { margin: 0; font-size: 2.5rem; }
.month.now h2 mark { background: linear-gradient(transparent 58%, var(--panel) 58%); color: inherit; }
.month .blank { color: var(--ink-3); padding: 6px 0; margin: 0; }
@media (min-width: 880px) {
  .month { grid-template-columns: 200px minmax(0, 1fr); }
  .month h2 { position: sticky; top: 96px; align-self: start; }
}
.ev { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 4px 16px; padding: 12px 0; }
.ev-date { width: 62px; height: 66px; border-radius: 18px; background: var(--ts); color: var(--t); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.03em; line-height: 1; }
.ev-date small { font-family: var(--font-body); font-size: .68rem; font-weight: 600; letter-spacing: 0; margin-top: 3px; }
.ev-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.ev h3 { font-size: 1.16rem; }
.ev p { margin: 5px 0 0; font-size: .96rem; color: var(--ink-2); }
.ev-where { font-size: .86rem; font-weight: 500; color: var(--ink-2); margin-top: 6px; }
.ev .src { display: inline-block; margin-top: 6px; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 10px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--surface); border-radius: var(--r-md); box-shadow: inset 0 0 0 1.5px var(--line); min-width: 0; transition: box-shadow .2s, translate .4s var(--bounce); }
.card[data-open] { cursor: pointer; }
.card[data-open]:hover { box-shadow: var(--shadow); translate: 0 -4px; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card h3 { font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.12; }
.card p { margin: 0; font-size: .96rem; color: var(--ink-2); }
.card .where { font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.card .tags { display: flex; flex-wrap: wrap; gap: 5px; }
.card .row-actions { margin-top: auto; padding-top: 6px; }
.card .glyph { width: 34px; height: 34px; color: var(--t); }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1160px) { .cards.c3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Sights ---------- */
.features { display: grid; gap: 40px 24px; margin: 8px 0 48px; }
.feature { display: flex; flex-direction: column; min-width: 0; }
.feature .pic { aspect-ratio: 4 / 3; margin-bottom: 14px; border-radius: var(--r-md); overflow: hidden; }
.feature:hover .pic img { transform: scale(1.06); }
.feature p { margin: 7px 0 12px; font-size: .97rem; color: var(--ink-2); }
.feature h3 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.08; margin-top: 8px; }
.feature .row-actions { margin-top: auto; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .features { grid-template-columns: repeat(3, 1fr); } }
.sub-h { font-size: 2.2rem; margin-top: 8px; }

/* ---------- Trips ---------- */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; height: clamp(150px, 26vw, 320px); margin: 6px 0 24px; }
.pair > * { border-radius: var(--r-md); overflow: hidden; }
.map { height: 460px; border-radius: var(--r-md); background: var(--bg-2); z-index: 0; }
.trip { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; min-height: 44px; border-radius: 14px; transition: background .2s; }
.trip:hover { background: var(--bg-2); }
.trip.active { background: var(--panel); color: var(--on-panel); }
.trip.active small, .trip.active .time { color: var(--on-panel); }
.trip b { font-weight: 600; display: block; line-height: 1.25; }
.trip small { color: var(--ink-3); font-size: .86rem; }
.trip .time { font-size: .9rem; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
@media (min-width: 1000px) { .map { position: sticky; top: 92px; height: calc(100vh - 120px); max-height: 640px; } }

/* ---------- Moving ---------- */
.meter { height: 12px; border-radius: 999px; background: var(--bg-2); margin-top: 8px; overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--panel); border-radius: 999px; transition: width .5s var(--bounce); }
.step { display: grid; grid-template-columns: 46px minmax(0, 1fr) 30px; gap: 12px; padding: 18px 0; border-top: 1.5px solid var(--line); cursor: pointer; }
.step .n { font-family: var(--font-display); font-size: 2.3rem; font-weight: 800; letter-spacing: -.04em; line-height: .95; color: var(--panel-deep); }
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; font-size: .96rem; color: var(--ink-2); }
.step input { width: 26px; height: 26px; accent-color: var(--on-panel); margin: 2px 0 0; cursor: pointer; }
.step.done .n, .step.done h3 { text-decoration: line-through; color: var(--ink-3); }
.topic { border-top: 1.5px solid var(--line); }
.topic summary { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 2px; cursor: pointer; font-family: var(--font-display); font-size: 1.32rem; font-weight: 700; letter-spacing: -.025em; list-style: none; }
.topic summary::-webkit-details-marker { display: none; }
.topic summary::after { content: "+"; margin-left: auto; font-size: 1.5rem; font-weight: 500; transition: rotate .35s var(--bounce); }
.topic[open] summary::after { rotate: 45deg; }
.topic summary svg { width: 24px; height: 24px; color: var(--t); flex: none; }
.topic ul { margin: 0 0 18px; padding-left: 20px; color: var(--ink-2); font-size: .97rem; }
.topic li { margin-bottom: 7px; }
.topic a { text-decoration: underline; }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .topic::details-content { height: 0; overflow: clip; transition: height .4s var(--glide), content-visibility .4s allow-discrete; }
  .topic[open]::details-content { height: auto; }
}

/* ---------- Climate charts ---------- */
.chart-title { margin-top: 36px; }
.chart-rain { margin-top: 8px; }
.chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 12px; position: relative; }
.bar-col { position: relative; display: flex; flex-direction: column; align-items: center; outline-offset: 0; }
.plot { position: relative; width: 100%; border-bottom: 1px solid var(--ink-3); border-radius: 6px 6px 0 0; }
.temp .plot { height: 170px; }
.rain .plot { height: 84px; }
.mark { position: absolute; left: 50%; width: min(16px, 70%); transform: translateX(-50%); border-radius: 4px; }
.temp .mark { background: var(--clay); }
.rain .mark { background: var(--teal); border-radius: 4px 4px 0 0; bottom: 0; }
.mark-val { position: absolute; left: 0; right: 0; text-align: center; font-size: .68rem; color: var(--ink-2); }
.bar-col small { font-size: .72rem; color: var(--ink-3); margin-top: 4px; }
.bar-col:hover .plot, .bar-col:focus .plot { background: var(--bg-2); }
.tip { position: absolute; bottom: calc(100% - 26px); left: 50%; transform: translateX(-50%); z-index: 5; background: var(--ink); color: var(--bg); font-size: .74rem; line-height: 1.35; padding: 5px 9px; border-radius: 8px; white-space: nowrap; pointer-events: none; display: none; }
.bar-col:hover .tip, .bar-col:focus .tip { display: block; }
.bar-col:nth-child(-n+2) .tip { left: 0; transform: none; }
.bar-col:nth-last-child(-n+2) .tip { left: auto; right: 0; transform: none; }
.table-view { margin-top: 8px; font-size: .9rem; }
.table-view summary { cursor: pointer; font-size: .86rem; min-height: 32px; }
.table-view table { width: 100%; border-collapse: collapse; font-size: .84rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.table-view th:first-child, .table-view td:first-child { text-align: left; }

/* ---------- Town ---------- */
.tl { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 15px 0; border-top: 1.5px solid var(--line); }
.tl b { font-family: var(--font-display); font-size: 1.42rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.tl p { margin: 0; color: var(--ink-2); }
.link-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; text-decoration: none; min-height: 44px; transition: background .2s; }
.link-row:hover { background: var(--bg-2); }
.link-row svg { width: 21px; height: 21px; flex: none; color: var(--accent-ink); }
.link-row b { display: block; font-weight: 600; line-height: 1.25; }
.link-row small { color: var(--ink-3); font-size: .86rem; }
.credit { font-size: .84rem; color: var(--ink-2); padding: 7px 0; border-bottom: 1px solid var(--line); }
.credit a { text-decoration: underline; }

/* ---------- Footer ---------- */
.foot { margin-top: 90px; background: var(--panel); color: var(--on-panel); padding: 72px 0 0; border-radius: 48px 48px 0 0; overflow: hidden; }
.foot .foot-call { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 5.4rem); letter-spacing: -.04em; line-height: 1; margin: 0 0 24px; max-width: 13ch; }
.foot-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 60px; }
.foot-grid { display: grid; gap: 24px; }
.foot p { font-size: .95rem; max-width: 44ch; }
.foot h4 { font-size: .86rem; font-weight: 700; margin: 0 0 6px; }
.foot-grid a { display: block; padding: 5px 0; text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.foot-note { margin-top: 26px; font-size: .84rem; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.theme-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }
.theme-btn svg { width: 16px; height: 16px; }
[data-contact] { display: none; }
.has-contact [data-contact] { display: inline; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* ---------- Drawer ---------- */
.drawer-back { position: fixed; inset: 0; z-index: 60; background: rgba(28, 34, 48, 0); visibility: hidden; transition: background .25s, visibility .25s; }
.drawer-back.open { background: rgba(28, 34, 48, .38); visibility: visible; }
.drawer { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(470px, calc(100% - 20px)); background: var(--bg); padding: 24px; overflow-y: auto; border-radius: var(--r-lg); transform: translateX(110%); transition: transform .42s var(--bounce); }
.drawer-back.open .drawer { transform: none; }
.drawer-close { float: right; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-2); }
.drawer-close svg { width: 18px; height: 18px; }
.drawer h2 { font-size: 2.3rem; margin: 26px 0 8px; clear: both; }
.drawer p { color: var(--ink-2); }
.dl { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 4px 12px; padding: 10px 0; border-top: 1.5px solid var(--line); font-size: .96rem; }
.dl b { font-size: .84rem; font-weight: 600; color: var(--ink-3); padding-top: 2px; }
.dl span { overflow-wrap: anywhere; }
.dl a { text-decoration: underline; }
.drawer .row-actions { padding-top: 14px; }
@media (prefers-reduced-motion: reduce) { .drawer, .sheet { transition: none; } }

/* ---------- Search palette ---------- */
dialog { color: inherit; }
.palette { width: min(640px, calc(100% - 24px)); margin: 11vh auto auto; padding: 0; border: 0; background: transparent; overflow: visible; }
.palette::backdrop { background: rgba(28, 34, 48, .34); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.palette-box { background: var(--bg); border-radius: 28px; padding: 10px; box-shadow: var(--shadow); max-height: 76vh; display: flex; flex-direction: column; }
.palette[open] .palette-box { animation: pop .3s var(--bounce); }
@keyframes pop { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
.palette-field { flex: none; box-shadow: none; background: var(--bg-2); }
.palette-field:focus-within { box-shadow: none; }
.palette-list { overflow-y: auto; padding: 6px 0 0; }
.pal-item { display: block; width: 100%; text-align: left; padding: 10px 14px; border-radius: 16px; text-decoration: none; }
.pal-item:hover, .pal-item:focus-visible, .pal-item.sel { background: var(--panel-soft); outline: none; }
.pal-item small { display: block; font-size: .78rem; color: var(--ink-3); }
.pal-item b { font-weight: 600; display: block; line-height: 1.25; }
.pal-try { padding: 12px 8px 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pal-try span { width: 100%; font-size: .86rem; color: var(--ink-3); padding: 0 6px; }
.pal-all { display: block; text-align: center; padding: 12px; font-weight: 600; text-decoration: none; font-size: .92rem; }
.pal-empty { padding: 26px 14px; text-align: center; color: var(--ink-2); }

/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(16, 19, 27, .94); }
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100dvh - 90px); object-fit: contain; border-radius: 14px; }
.lightbox[open] img { animation: pop .35s var(--bounce); }
.lb-close { position: fixed; top: 14px; right: 14px; z-index: 2; }
.lb-prev, .lb-next { position: fixed; top: 50%; translate: 0 -50%; z-index: 2; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-prev:hover, .lb-next:hover { scale: 1.08; }
.lb-cap { color: #fff; font-size: .86rem; margin: 0; padding: 10px 16px 16px; text-align: center; max-width: 80ch; }
.lb-cap a { color: var(--panel); }

/* ---------- Toast & map ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 90px); z-index: 80; background: var(--on-panel); color: #fff; font-size: .9rem; font-weight: 500; padding: 11px 20px; border-radius: 999px; transition: transform .4s var(--bounce); }
.toast.show { transform: translate(-50%, 0); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper { border-radius: 14px; }

/* ==========================================================
   Cartolina: the home page as a stack of postcards.
   Colours and fonts come from each town's skin in town.json.
   ========================================================== */
[hidden] { display: none !important; }
h1, h2 { font-weight: var(--display-weight); }
.banner:empty, .features:empty { display: none; }
.t-terra { --t: var(--clay); --ts: var(--clay-soft); }
.t-blue { --t: var(--teal); --ts: var(--teal-soft); }
.t-olive { --t: var(--sage); --ts: var(--sage-soft); }
.t-gold { --t: var(--accent-ink); --ts: var(--panel-soft); }

/* Hero */
.tagline { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.15; letter-spacing: -.015em; max-width: 34ch; text-wrap: balance; }
.tagline em { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.08em; }
.word, .word-fit { display: flex; width: max-content; font-family: var(--font-display); font-weight: var(--display-weight); line-height: .94; letter-spacing: -.045em; white-space: nowrap; margin: 0; font-size: 15vw; }
.word .l { display: inline-block; overflow: clip; overflow-clip-margin: 8px; padding-bottom: .07em; }
.word .l i { display: inline-block; font-style: normal; }
@media (prefers-reduced-motion: no-preference) { .word .l i { animation: letter .95s var(--glide) both; animation-delay: calc(120ms + var(--i) * 48ms); } }
@keyframes letter { from { transform: translateY(112%) rotate(7deg); } }

@keyframes deal { from { opacity: 0; transform: translateY(46%) rotate(9deg); } }

/* Marquee sits against the hero */
.marquee { margin-top: 0; rotate: none; scale: 1; background: var(--on-panel); color: var(--panel); }

/* Back of the postcard */
.back { display: grid; background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }
.back-msg, .back-addr { padding: clamp(22px, 3.4vw, 48px); min-width: 0; }
.message { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.45rem, 2.7vw, 2.3rem); line-height: 1.22; letter-spacing: -.02em; max-width: 26ch; }
.back-addr { display: flex; flex-direction: column; gap: 18px; border-top: 2px dashed var(--ink); }
@media (min-width: 880px) { .back { grid-template-columns: 1.15fr 1fr; } .back-addr { border-top: 0; border-left: 2px dashed var(--ink); } }
.franking { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.postmark { width: 130px; height: 130px; rotate: -11deg; flex: none; overflow: visible; }
.postmark circle { fill: none; stroke: var(--ink); stroke-width: 3; }
.postmark text { fill: var(--ink); font-family: var(--font-body); font-weight: 700; }
.pm-ring { font-size: 13.5px; }
.pm-day { font-size: 17px; }
.pm-year { font-size: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .js .back .postmark { opacity: 0; }
  .js .back.in .postmark { animation: thud .42s .45s cubic-bezier(.3, 1.5, .5, 1) both; }
}
@keyframes thud { from { opacity: 0; transform: scale(1.7); } to { opacity: 1; transform: none; } }
.stamp-alt { width: 106px; height: 134px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--panel); color: var(--on-panel); border: 8px dotted var(--surface); outline: 2px solid var(--panel); outline-offset: -2px; }
.stamp-alt b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 2.3rem; letter-spacing: -.04em; line-height: 1; }
.stamp-alt span { font-size: .72rem; font-weight: 600; }
.doors a { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; padding: 13px 0; border-bottom: 2px solid var(--ink); text-decoration: none; transition: padding .35s var(--bounce); }
.doors a:hover { padding-left: 12px; }
.doors b { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2.3vw, 1.95rem); letter-spacing: -.025em; line-height: 1.1; }
.doors span { font-size: .95rem; color: var(--ink-2); }

/* Reasons */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; }

/* Story stamps: the dotted border in the page colour reads as perforation */
.stamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.stamp { background: var(--panel-soft); border: 9px dotted var(--bg); padding: 22px; }
.stamp-year { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(2.3rem, 3.4vw, 3rem); letter-spacing: -.04em; line-height: 1; margin-bottom: 14px; color: var(--accent-ink); }
.stamp h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.02em; }
.stamp p { margin: 6px 0 0; font-size: .97rem; color: var(--ink-2); }

/* Stats adapt to the number of facts a town has */
@media (min-width: 880px) { .stats { grid-template-columns: repeat(var(--facts, 5), 1fr); } }

/* Next events + address book */
.split-home { display: grid; gap: 56px; }
.split-home > * { min-width: 0; }
@media (min-width: 1000px) { .split-home { grid-template-columns: 1.1fr 1fr; gap: 72px; } }
.next { display: block; }
.next-row { display: block; padding: 18px 0; border-top: 1.5px solid var(--line); text-decoration: none; transition: padding .35s var(--bounce); }
.next-row:hover { padding-left: 10px; }
.next-row .next-when { display: inline-block; background: var(--panel); color: var(--on-panel); font-weight: 600; font-size: .82rem; padding: 2px 12px; border-radius: 999px; }
.next-row h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.03em; line-height: 1.1; margin-top: 8px; }
.next-row p { margin: 5px 0 0; font-size: .95rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.address a { display: flex; align-items: center; gap: 12px; min-height: 54px; border-top: 1.5px solid var(--line); text-decoration: none; transition: padding .35s var(--bounce); }
.address a:hover { padding-left: 10px; }
.address svg { width: 21px; height: 21px; flex: none; color: var(--accent-ink); }
.address b { font-weight: 600; flex: 1; }
.address em { font-style: normal; font-size: .9rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Inner page header: postmark in place of the sun */
.head > .postmark { position: absolute; z-index: -1; top: 92px; right: 40px; width: clamp(104px, 15vw, 190px); height: auto; opacity: .85; }
.head > .postmark circle { stroke: var(--panel-deep); }
.head > .postmark text { fill: var(--accent-ink); }
@media (max-width: 719px) { .head > .postmark { right: 14px; top: 78px; opacity: .3; } }

/* Footer word */
.foot-word-box { padding: 0 12px; }
.word-fit { line-height: .78; margin: 28px auto -.09em; }

/* A town with few photos: spacing and a lone feature still have to look deliberate */
.when-note[hidden] + .when-stats { margin-top: 18px; }
@media (min-width: 880px) {
  .feature:only-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-content: start; }
  .feature:only-child .pic { grid-row: 1 / span 5; margin-bottom: 0; }
}

/* ==========================================================
   The landing flight and map stage
   ========================================================== */
.topbar { transition: opacity .8s var(--glide); }
html.flying .topbar { opacity: 0; pointer-events: none; }

.stage { --gut: clamp(18px, 3.4vw, 56px); --dock-h: 214px; position: relative; height: 100svh; min-height: 640px; overflow: hidden; background: #a8d8e4; color: var(--ink); isolation: isolate; touch-action: pan-y pinch-zoom; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.stage.dragging canvas { cursor: grabbing; }

/* everything that arrives with the landing */
.stage-wash, .stage-title, .rail, .dock, .pins, .map-tools { opacity: 0; pointer-events: none; transition: opacity .9s var(--glide), transform 1.1s var(--glide); }
.stage.open .stage-wash, .stage.open .stage-title, .stage.open .rail, .stage.open .dock, .stage.open .pins, .stage.open .map-tools { opacity: 1; }
.stage.open .rail, .stage.open .dock, .stage.open .map-tools { pointer-events: auto; }

.stage-wash { position: absolute; inset: 0; z-index: 1; background: linear-gradient(96deg, var(--bg) 0, color-mix(in srgb, var(--bg) 94%, transparent) 28%, color-mix(in srgb, var(--bg) 40%, transparent) 44%, transparent 58%); transform: translateX(-16%); }
.stage.open .stage-wash { transform: none; }

/* in flight */
.hud-to { position: absolute; z-index: 3; left: var(--gut); bottom: 74px; margin: 0; font-family: var(--font-serif); font-style: italic; font-size: clamp(1.15rem, 2vw, 1.6rem); color: #fff; text-shadow: 0 1px 2px rgba(10, 30, 35, .35), 0 2px 26px rgba(10, 30, 35, .6); pointer-events: none; animation: hud 1s var(--glide) both; transition: opacity .5s; }
.hud-to b { display: block; font-family: var(--font-display); font-style: normal; font-weight: var(--display-weight); font-size: clamp(2.2rem, 5.4vw, 4.6rem); letter-spacing: -.035em; line-height: 1.02; }
@keyframes hud { from { opacity: 0; transform: translateY(14px); } }
.stage.open .hud-to { opacity: 0; }
.skip-flight { position: absolute; z-index: 5; right: var(--gut); bottom: 28px; height: 44px; padding: 0 20px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 84%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-weight: 700; font-size: .92rem; color: var(--ink); transition: opacity .4s; }
.stage.open .skip-flight { opacity: 0; pointer-events: none; }

.readout { position: absolute; z-index: 3; left: var(--gut); bottom: 28px; display: flex; align-items: center; gap: 16px; font-size: .76rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); text-shadow: 0 0 6px rgba(255, 255, 255, .9); pointer-events: none; transition: bottom .9s var(--glide); }
.stage.open .readout { bottom: calc(var(--dock-h) + 6px); }
.scale { display: inline-flex; flex-direction: column; gap: 3px; }
.scale i { display: block; height: 5px; border: 1.5px solid currentColor; border-top: 0; }
.readout a { pointer-events: auto; color: inherit; opacity: .72; font-weight: 500; }

/* title */
.stage-title { position: absolute; z-index: 3; left: var(--gut); top: clamp(88px, 13vh, 132px); width: min(36vw, 620px); }
.stage-title .hero-region { margin: 0 0 10px; font-weight: 600; font-size: .95rem; }
.stage-title .word { color: var(--ink); }
.stage:not(.open) .word .l i { animation: none; transform: translateY(112%); }
.stage-title .tagline { margin-top: 16px; }
.stage-title .tagline { font-size: clamp(1.1rem, 1.7vw, 1.5rem); max-width: 26ch; }

/* pins */
.pins { position: absolute; inset: 0; z-index: 2; overflow: hidden; }
.pin { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; display: grid; place-items: center; pointer-events: auto; will-change: transform; }
.pin.off { visibility: hidden; }
.pin.home { pointer-events: none; }
.pin-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--panel-deep); border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--ink), 0 3px 10px rgba(0, 0, 0, .4); transition: scale .35s var(--bounce), background .2s; }
@media (prefers-reduced-motion: no-preference) { .stage.open .pin-dot { animation: pinIn .55s var(--bounce) both; animation-delay: calc(var(--i, 0) * 55ms + 140ms); } }
@keyframes pinIn { from { scale: 0; } }
.pin:hover .pin-dot, .pin.hot .pin-dot { scale: 1.35; }
.pin.on { z-index: 3; }
.pin.on .pin-dot { scale: 1.5; background: var(--ink); border-color: #fff; }
.pin-tag { position: absolute; left: calc(50% + 16px); top: 50%; translate: 0 -50%; padding: 4px 10px; background: var(--ink); color: var(--bg); font-size: .8rem; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.pin:hover, .pin.hot { z-index: 4; }
.pin:hover .pin-tag, .pin.hot .pin-tag, .pin.on .pin-tag { opacity: 1; }
.pin.home .pin-dot { width: 22px; height: 22px; background: var(--panel-deep); }
.pin.home .pin-tag { opacity: 1; background: var(--panel); color: var(--on-panel); }

/* altimeter */
.rail { position: absolute; z-index: 4; right: var(--gut); top: clamp(92px, 13vh, 132px); bottom: calc(var(--dock-h) + 66px); width: 14px; transform: translateX(26px); }
.stage.open .rail { transform: none; }
.rail::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .35; }
.rail-stops { position: absolute; inset: 0; }
.rail-stops button { position: absolute; right: -8px; top: calc(var(--p) * 100%); translate: 0 -50%; display: flex; align-items: center; height: 44px; padding: 0 22px 0 0; font-size: .84rem; font-weight: 700; color: var(--ink); }
.rail-stops button::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px; background: var(--ink); }
.rail-stops span { padding: 5px 11px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); white-space: nowrap; transition: background .2s, color .2s; }
.rail-stops button:hover span { background: var(--panel); }
.rail-stops button.on span { background: var(--ink); color: var(--bg); }
.rail-mark { position: absolute; left: 0; top: calc(var(--p, 1) * 100%); width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--panel); border: 2.5px solid var(--ink); pointer-events: none; }

.map-tools { position: absolute; z-index: 4; right: var(--gut); bottom: calc(var(--dock-h) + 8px); display: flex; gap: 6px; }
.map-tools button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow); color: var(--ink); transition: background .2s, scale .3s var(--bounce); }
.map-tools button:hover { background: var(--panel); scale: 1.06; }
.map-tools svg { width: 18px; height: 18px; }

/* the cards */
.dock { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; height: var(--dock-h); display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 12px; }
.dock-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gut); min-height: 40px; }
.chips { display: flex; gap: 6px; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-weight: 700; font-size: .86rem; color: var(--ink); transition: background .2s; }
.chip em { font-style: normal; opacity: .6; font-weight: 600; margin-left: 2px; }
.chip:hover { background: var(--panel); }
.chip.on { background: var(--ink); color: var(--bg); }
.to-guide { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--panel); color: var(--on-panel); font-weight: 700; font-size: .86rem; white-space: nowrap; }
.to-guide i { display: inline-block; font-style: normal; }
@media (prefers-reduced-motion: no-preference) { .to-guide i { animation: nudge 1.8s ease-in-out infinite; } }
@keyframes nudge { 50% { transform: translateY(3px); } }

.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding: 10px var(--gut) 8px; scroll-padding-inline: var(--gut); }
.strip::-webkit-scrollbar { display: none; }
.spot { flex: 0 0 344px; height: 146px; display: flex; gap: 12px; padding: 8px; background: #fff; color: var(--ink); scroll-snap-align: center; cursor: pointer; box-shadow: 0 2px 6px rgba(20, 24, 30, .12), 0 14px 28px -12px rgba(20, 24, 30, .36); transition: translate .4s var(--bounce), box-shadow .3s; }
.spot.no-pic { background: var(--panel-soft); }
@media (prefers-reduced-motion: no-preference) { .stage.open .spot { animation: deal .7s var(--glide) both; animation-delay: calc(var(--i, 0) * 60ms + 120ms); } }
.spot:hover { translate: 0 -4px; }
.spot.on { translate: 0 -6px; box-shadow: 0 0 0 2.5px var(--ink), 0 18px 30px -12px rgba(20, 24, 30, .4); }
.spot-pic { flex: 0 0 112px; overflow: hidden; background: var(--panel); }
.spot-pic img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.spot-txt { min-width: 0; flex: 1; display: flex; flex-direction: column; padding: 2px 4px 0 2px; }
.spot.no-pic .spot-txt { padding-left: 8px; }
.spot-txt small { font-size: .7rem; font-weight: 700; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-txt h3 { margin: 1px 0 3px; font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; line-height: 1.12; letter-spacing: -.02em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; overflow: hidden; }
.spot-txt p { margin: 0; font-size: .82rem; line-height: 1.32; color: var(--ink-2); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.spot-links { margin-top: auto; display: flex; gap: 14px; font-size: .78rem; font-weight: 700; }
.spot-links a { padding: 3px 0; color: var(--ink); text-underline-offset: 2px; }
.spot-all { flex: 0 0 150px; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 14px; background: var(--ink); color: var(--bg); text-decoration: none; }
.spot-all b { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.02em; }
.spot-all span { font-size: .8rem; }

@media (max-width: 859px) {
  .stage { --dock-h: 244px; min-height: 620px; }
  .stage-wash { background: linear-gradient(180deg, var(--bg) 0, color-mix(in srgb, var(--bg) 92%, transparent) 210px, transparent 330px); transform: translateY(-10%); }
  .stage-title { top: 76px; right: var(--gut); width: auto; }
  .stage-title .hero-region { margin-bottom: 4px; font-size: .84rem; }
  .stage-title .tagline { margin-top: 8px; font-size: 1.02rem; max-width: 34ch; }
  .rail { top: auto; right: var(--gut); left: var(--gut); bottom: calc(var(--dock-h) - 2px); width: auto; height: 44px; transform: none; }
  .rail::before, .rail-mark { display: none; }
  .rail-stops { display: flex; gap: 4px; justify-content: flex-start; }
  .rail-stops button { position: static; translate: none; padding: 0; font-size: .8rem; }
  .rail-stops button::after { display: none; }
  .rail-stops span { border-radius: 999px; }
  .map-tools { bottom: auto; top: calc(100% - var(--dock-h) - 96px); flex-direction: column; }
  .map-tools #replay { display: none; }
  .readout { bottom: 22px; }
  .stage.open .readout { bottom: calc(var(--dock-h) + 48px); }
  .readout #coords, .stage.open .readout a { display: none; }
  .to-guide { display: none; }
  .spot { flex-basis: min(82vw, 344px); }
  .dock { padding-bottom: 10px; }
  .hud-to { bottom: 68px; }
}
