/* casp-walk — page design after design/otake-walk-3a.dc.html (frame 3a).
   Fixed palette (the mock's), emitted as custom properties. No external fonts, no remote CSS. */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); }

:root {
  --bg: #fcfefd;                       /* page */
  --bg: oklch(0.995 0.003 170);
  --outer: #eef2f0; --outer: oklch(0.96 0.008 170);
  --tx: #1d2a2c; --tx: oklch(0.25 0.02 200);
  --mut: #4d5f61; --mut: oklch(0.42 0.02 200);
  --mut2: #6f8183; --mut2: oklch(0.52 0.02 200);
  --acc: #1f7a68; --acc: oklch(0.48 0.09 175);
  --acc-s: #1a9a82; --acc-s: oklch(0.58 0.11 172);
  --acc-d: #145a4c; --acc-d: oklch(0.38 0.07 178);
  --tint: #e6f7f1; --tint: oklch(0.96 0.03 170);
  --soft: #f3fbf8; --soft: oklch(0.98 0.012 170);
  --hl: #c6d9d6; --hl: oklch(0.88 0.02 180);
  --hl2: #dde9e6; --hl2: oklch(0.92 0.02 175);
  --btn-line: #bfd9d2; --btn-line: oklch(0.85 0.03 175);
  --glow: oklch(0.78 0.1 170 / .45);
  --shadow-card: 0 10px 30px rgba(22, 40, 38, .14);
  --warn-bg: oklch(0.97 0.03 80); --warn-line: oklch(0.85 0.08 80); --warn-tx: oklch(0.38 0.07 70);
  /* category colours (slot = categorySlots(): food 0, history 1, nature 2, stay 3, art 4) */
  --c-food: #1a9a82;    --c-food: oklch(0.58 0.11 172);
  --c-history: #1b4f52; --c-history: oklch(0.4 0.06 195);
  --c-nature: #3f8f55;  --c-nature: oklch(0.58 0.1 150);
  --c-stay: #4a5560;    --c-stay: oklch(0.45 0.02 220);
  --c-art: #a84a72;     --c-art: oklch(0.55 0.12 355);
  --font: "Inter", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.sheet-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--outer); color: var(--tx); font-family: var(--font); font-size: 15px; line-height: 1.6; overflow-x: hidden; }
h1, h2, h3 { font-weight: 500; line-height: 1.3; margin: 0; }
h2 { font-size: 24px; }
p { margin: 0 0 8px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--acc); text-underline-offset: 3px; }
a:hover { color: var(--acc-d); }
img { display: block; max-width: 100%; }
picture { display: contents; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--acc-s); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--acc-s) 28%, transparent); }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--mut); }
[hidden] { display: none !important; }

/* category colours */
.c0 { --cc: var(--c-food); } .c1 { --cc: var(--c-history); } .c2 { --cc: var(--c-nature); }
.c3 { --cc: var(--c-stay); } .c4 { --cc: var(--c-art); } .c5 { --cc: var(--acc-d); }
.cAll { --cc: var(--hl); }

/* ---- frame ---- */
.walk { max-width: 1280px; margin: 0 auto; background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
@media (min-width: 1321px) {
  body { padding: 40px 0; }
  .walk { border-radius: 12px; box-shadow: 0 0 0 1px var(--hl), 0 16px 40px rgba(22, 40, 38, .10); overflow: hidden; min-height: 0; }
}
.section { padding: 40px; scroll-margin-top: 8px; }
.section > h2 { margin-bottom: 16px; }

/* ---- hero ---- */
.hero { position: relative; }
.hero-grid { height: 620px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-rows: 1fr 1fr; gap: 6px; background: var(--bg); }
.hero-img { position: relative; overflow: hidden; background: var(--soft); min-height: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-1 { grid-row: 1 / 3; }
.hero-n1 .hero-grid, .hero-n2 .hero-grid { grid-template-columns: 1fr; }
.hero-n2 .hero-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.hero-n2 .hero-img-2 { grid-row: 1 / 3; }
.nav { position: absolute; left: 40px; right: 40px; top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; pointer-events: none; z-index: 2; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; padding: 8px 14px; border-radius: 8px; background: var(--bg); color: var(--tx); text-decoration: none; pointer-events: auto; }
.nav-brand:hover { color: var(--tx); }
.brand-sq { width: 22px; height: 22px; border-radius: 6px; background: var(--acc-s); flex: none; }
.nav-links { display: flex; gap: 4px; padding: 4px; border-radius: 8px; background: var(--bg); font-size: 13px; pointer-events: auto; }
.nav-links a { padding: 6px 10px; border-radius: 6px; color: var(--tx); text-decoration: none; white-space: nowrap; }
.nav-links a:first-child { color: var(--acc); }
.nav-links a:hover { background: var(--tint); color: var(--acc-d); }
.hero-card { position: absolute; left: 40px; bottom: 40px; max-width: 520px; display: flex; flex-direction: column; gap: 14px; padding: 28px 32px; border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-card); z-index: 2; }
.kicker { font-size: 12px; letter-spacing: .2em; color: var(--acc); }
.hero-card h1 { font-size: 44px; line-height: 1.2; letter-spacing: .02em; }
.hero-card p { margin: 0; font-size: 15px; line-height: 1.8; color: var(--mut); }

.badge { position: absolute; left: 6px; top: 6px; z-index: 1; font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 4px; background: oklch(0.995 0.003 170 / .78); color: var(--mut); box-shadow: 0 0 0 1px var(--hl); pointer-events: none; }
.hero-img .badge { left: auto; right: 12px; top: auto; bottom: 12px; }

/* ---- finder ---- */
.finder { display: flex; flex-direction: column; gap: 20px; }
.finder > *, .sec-head > * { min-width: 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sec-head h2 { font-size: 26px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 12px 7px 8px; border: 0; border-radius: 8px; cursor: pointer; background: var(--bg); color: var(--tx); box-shadow: 0 0 0 1px var(--hl2); white-space: nowrap; flex: none; }
.chip:hover { background: var(--tint); }
.chip.is-on { background: var(--tint); box-shadow: 0 0 0 1.5px var(--acc-s); }
.chip-sw { width: 14px; height: 14px; border-radius: 4px; background: var(--cc); }

.mapwrap { position: relative; height: 560px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--hl); background: #eef2f2; isolation: isolate; }
.map { height: 100%; }
.map-attr { position: absolute; right: 8px; bottom: 6px; z-index: 5; font-size: 10px; line-height: 1.3; padding: 2px 6px; border-radius: 4px; background: oklch(0.995 0.003 170 / .82); color: var(--mut); max-width: calc(100% - 16px); }
.map-attr a { color: inherit; }
.map-ctl { position: absolute; right: 16px; top: 16px; display: flex; flex-direction: column; border-radius: 8px; background: var(--bg); box-shadow: 0 0 0 1px var(--hl); z-index: 6; overflow: hidden; }
.map-ctl button { width: 36px; height: 36px; border: 0; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; color: var(--tx); padding: 0; }
.map-ctl button + button { border-top: 1px solid var(--hl2); }
.map-ctl button:hover { background: var(--tint); }
.map-ctl button:focus-visible { outline-offset: -2px; }

/* floating spot card */
.mapcard { position: absolute; left: 16px; top: 16px; bottom: 16px; width: 360px; display: flex; flex-direction: column; border-radius: 12px; background: var(--bg); box-shadow: var(--shadow-card); overflow: hidden; z-index: 6; }
.mc { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.mc-photo { position: relative; height: 210px; flex: none; overflow: hidden; background: var(--soft); }
.mc-photo img { width: 100%; height: 100%; object-fit: cover; }
.ph { display: grid; place-items: center; background: var(--soft); }
.ph-label { font-size: 12px; color: var(--mut2); }
.mc-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; overflow: auto; min-height: 0; flex: 1; }
.mc-cat { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--mut); }
.sw { width: 10px; height: 10px; border-radius: 3px; background: var(--cc); flex: none; }
.mc-name { font-size: 20px; line-height: 1.4; }
.mc-desc { margin: 0; font-size: 14px; line-height: 1.75; color: oklch(0.38 0.02 200); }
.nomap, .nomap-s { font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: 6px; background: var(--soft); color: var(--mut); box-shadow: 0 0 0 1px var(--hl2); align-self: flex-start; }
.nomap-s { display: block; margin-top: 4px; width: fit-content; font-size: 10px; padding: 3px 6px; }
.mc-actions { display: flex; gap: 8px; padding: 0 20px 18px; flex: none; }
.mc-nav { flex: none; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--btn-line); background: transparent; cursor: pointer; color: var(--tx); }
.mc-nav:hover { background: var(--tint); }
.mc-more { flex: 1; height: 40px; border-radius: 8px; border: 1px solid var(--acc-s); background: var(--tint); font-size: 14px; cursor: pointer; color: var(--acc-d); }
.mc-more:hover { background: oklch(0.93 0.05 170); }

/* pins — HTML markers positioned/scaled by src/map/svg-map.js */
.marker { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; z-index: 1; pointer-events: none; }
.marker.is-hidden { display: none; }
.pin { pointer-events: auto; flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 500; background: var(--cc); color: var(--bg);
  box-shadow: 0 3px 0 rgba(22, 40, 38, .18), 0 0 0 0 var(--glow); transition: width .3s, height .3s, box-shadow .3s; }
.pin:hover { filter: brightness(1.12); }
.is-active .pin { width: 38px; height: 38px; font-size: 14px; box-shadow: 0 3px 0 rgba(22, 40, 38, .18), 0 0 0 8px var(--glow); }
.hub-pin { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 2px oklch(0.45 0.02 220 / .55), 0 0 0 5px oklch(0.995 0.003 170 / .55); }
.marker-hub { z-index: 0; }
.marker-hub { display: grid; place-items: center; }
.hub-label { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 11px; line-height: 1; font-weight: 500; letter-spacing: .02em; color: oklch(0.38 0.03 220); text-shadow: 0 0 2px var(--bg), 0 0 3px var(--bg), 0 0 4px var(--bg); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .pin { transition: none; } .marker { transition: none !important; } .map > div { transition: none !important; } }

/* strip */
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 12px; margin: 0 -4px; scrollbar-width: thin; scrollbar-color: var(--hl) transparent; }
.strip li { flex: none; }
.sc { display: flex; flex-direction: column; gap: 8px; width: 180px; color: var(--tx); text-decoration: none; }
.sc:hover { color: var(--tx); }
.sc-thumb { position: relative; display: block; width: 180px; height: 120px; border-radius: 10px; overflow: hidden; background: var(--soft); box-shadow: 0 0 0 1px var(--hl2); }
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sc-thumb .badge { left: 4px; top: 4px; font-size: 9px; padding: 2px 4px; }
.sc.is-sel .sc-thumb { box-shadow: 0 0 0 3px var(--acc-s); }
.sc:hover .sc-thumb { box-shadow: 0 0 0 2px var(--hl); }
.sc.is-sel:hover .sc-thumb { box-shadow: 0 0 0 3px var(--acc-s); }
.sc-cap { display: flex; gap: 8px; align-items: baseline; }
.sc-n { font-size: 12px; font-weight: 500; color: var(--cc); }
.sc-name { font-size: 13px; line-height: 1.4; }

/* ---- shared section bits (events / heritage / access, after mock v4) ---- */
#events, #heritage, #access { display: flex; flex-direction: column; gap: 24px; padding: 56px 40px; }
#heritage { background: var(--soft); }
.section > h2 { margin-bottom: 0; }
.sec-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.sec-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sec-title h2 { font-size: 30px; }
.sec-lead { margin: 0; font-size: 14px; line-height: 1.7; color: var(--mut); }
.sec-note { font-size: 13px; color: oklch(0.48 0.02 200); white-space: nowrap; }
.ev-flat { background: var(--tint); }
.ev-photo .badge, .fi-photo .badge, .hf-photo .badge { left: auto; right: 8px; top: auto; bottom: 8px; }

/* event cards */
.ev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ev { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ev.is-past { opacity: .55; }
.ev.is-past .ev-pill { display: none; }
.ev-photo { position: relative; height: 180px; border-radius: 12px; overflow: hidden; }
.ev-photo img, .fi-photo img, .hf-photo img { width: 100%; height: 100%; object-fit: cover; }
.ev-date { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--bg); pointer-events: none; }
.ev-md { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.ev-m { font-size: 11px; color: var(--acc); }
.ev-d { font-size: 24px; font-weight: 500; }
.ev-w { font-size: 12px; color: oklch(0.48 0.02 200); }
.ev-date-run { font-size: 14px; font-weight: 500; padding: 10px 12px; }
.ev-pill { position: absolute; right: 12px; top: 12px; font-size: 12px; line-height: 1.5; padding: 4px 10px; border-radius: 999px; background: var(--bg); color: oklch(0.38 0.02 200); pointer-events: none; }
.ev-pill.is-soon, .ev-pill.is-run { background: var(--acc-s); color: var(--bg); }
.ev-body { display: flex; flex-direction: column; gap: 4px; }
.ev-name { font-size: 16px; line-height: 1.5; }
.ev-name a { color: var(--tx); text-decoration: none; }
.ev-name a:hover { color: var(--acc); text-decoration: underline; }
.ev-place { margin: 0; font-size: 13px; line-height: 1.5; color: oklch(0.48 0.02 200); }
.ev-map { margin-left: 8px; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--btn-line); color: var(--acc-d); text-decoration: none; white-space: nowrap; }
.ev-map:hover { background: var(--tint); }

/* feature block */
.feature { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; margin-top: 24px; padding: 32px; border-radius: 16px; background: var(--tint); }
.feature-text { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.feature-text h3 { font-size: 26px; line-height: 1.4; }
.feature-text p { margin: 0; font-size: 14px; line-height: 1.8; color: oklch(0.38 0.02 200); }
.feature-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fi { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--bg); color: var(--tx); text-decoration: none; min-width: 0; }
.fi:hover { color: var(--tx); box-shadow: 0 0 0 2px var(--acc-s); }
.fi-photo { position: relative; display: block; height: 140px; background: var(--soft); overflow: hidden; }
.fi-photo.ev-flat { background: var(--tint); }
.fi-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.fi-when { font-size: 12px; font-weight: 500; color: var(--acc); }
.fi-title { font-size: 16px; font-weight: 500; }
.fi-where { font-size: 13px; line-height: 1.6; color: var(--mut); }

/* seasons */
.annual { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.annual h3 { font-size: 20px; }
.seasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.seasons-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.season { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: 12px; box-shadow: 0 0 0 1px oklch(0.9 0.02 180); min-width: 0; }
.season-h { display: flex; align-items: baseline; gap: 8px; padding-bottom: 8px; }
.season-n { font-size: 20px; font-weight: 500; }
.sn-spring { color: oklch(0.55 0.12 355); } .sn-summer { color: oklch(0.5 0.1 230); }
.sn-autumn { color: oklch(0.55 0.11 60); } .sn-winter { color: oklch(0.5 0.05 250); }
.season-m { font-size: 12px; color: oklch(0.48 0.02 200); }
.season-it { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid oklch(0.93 0.015 175); }
.season-name { font-size: 15px; }
.season-name a { color: var(--tx); text-decoration: none; }
.season-name a:hover { color: var(--acc); text-decoration: underline; }
.season-w { font-size: 12px; line-height: 1.6; color: oklch(0.48 0.02 200); }

/* ---- heritage ---- */
.hf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hf { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 0 0 1px oklch(0.9 0.02 180); color: var(--tx); text-decoration: none; min-width: 0; }
a.hf:hover { color: var(--tx); box-shadow: 0 0 0 2px var(--acc-s); }
.hf-photo { position: relative; display: block; height: 200px; background: var(--soft); overflow: hidden; }
.hf-photo.ev-flat { background: var(--tint); }
.hf-rank { position: absolute; left: 12px; top: 12px; font-size: 12px; padding: 4px 10px; border-radius: 6px; background: var(--bg); color: oklch(0.32 0.06 178); pointer-events: none; }
.hf-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.hf-name { font-size: 17px; font-weight: 500; line-height: 1.5; }
.hf-meta { font-size: 13px; line-height: 1.6; color: var(--mut); }
.hf-visit { font-size: 13px; color: oklch(0.32 0.06 178); }
.h-controls { display: none; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.js .h-controls { display: flex; }
.h-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 1px oklch(0.9 0.02 180); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.h-tabs::-webkit-scrollbar { display: none; }
.h-tab { flex: none; display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 14px; border: 0; border-radius: 8px; cursor: pointer; background: transparent; color: var(--tx); white-space: nowrap; }
.h-tab:hover { background: var(--tint); }
.h-tab[aria-pressed="true"] { background: var(--acc-s); color: var(--bg); }
.h-count { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: oklch(0.95 0.01 200); color: var(--tx); }
.h-tab[aria-pressed="true"] .h-count { background: oklch(0.995 0.003 170 / .25); color: var(--bg); }
.h-toggle { font-size: 13px; padding: 8px 14px; border-radius: 8px; cursor: pointer; background: transparent; border: 1px solid var(--acc-s); color: oklch(0.32 0.06 178); }
.h-toggle:hover { background: var(--tint); }
.hc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hc { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 10px; background: var(--bg); box-shadow: 0 0 0 1px oklch(0.92 0.015 175); color: var(--tx); text-decoration: none; min-width: 0; }
a.hc:hover { color: var(--tx); box-shadow: 0 0 0 2px var(--acc-s); }
.hc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.hc-rank, .hc-kind { font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.hc-rank { background: var(--tint); color: oklch(0.32 0.06 178); }
.hc-kind { background: oklch(0.95 0.01 200); color: oklch(0.38 0.02 200); }
.hc-name { font-size: 15px; font-weight: 500; line-height: 1.5; }
.hc-yomi { font-size: 11px; color: oklch(0.5 0.02 200); margin-top: -4px; }
.hc-loc { font-size: 12px; line-height: 1.6; color: oklch(0.45 0.02 200); }
.table-wrap { overflow-x: auto; border-radius: 12px; background: var(--bg); box-shadow: 0 0 0 1px oklch(0.9 0.02 180); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 680px; }
.table th, .table td { text-align: left; padding: 10px 16px; vertical-align: top; line-height: 1.6; border-top: 1px solid oklch(0.94 0.012 175); }
.table thead th { font-weight: 400; font-size: 12px; color: var(--acc); background: oklch(0.97 0.02 170); border-top: 0; padding: 12px 16px; }
.table .grp th { background: var(--soft); font-weight: 500; color: oklch(0.32 0.06 178); font-size: 13px; border-top-color: oklch(0.93 0.015 175); }
.table td a { color: var(--tx); text-decoration-color: var(--btn-line); }
.table td a:hover { color: var(--acc-d); }
.t-visit { color: var(--mut); }

/* ---- access ---- */
.routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.route { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 14px; box-shadow: 0 0 0 1px oklch(0.9 0.02 180); min-width: 0; }
.route-h { display: flex; align-items: center; gap: 10px; }
.route-mode { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: oklch(0.32 0.06 178); white-space: nowrap; }
.route-title { font-size: 17px; font-weight: 500; }
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; }
.step-rail { display: flex; flex-direction: column; align-items: center; }
.step-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; margin-top: 5px; background: var(--bg); box-shadow: 0 0 0 2px var(--acc-s); }
.step.is-last .step-dot { background: var(--acc-s); }
.step-line { flex: 1; width: 2px; min-height: 12px; background: oklch(0.85 0.06 172); }
.step.is-last .step-line { background: transparent; }
.step-body { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; min-width: 0; }
.step.is-last .step-body { padding-bottom: 0; }
.step-place { font-size: 15px; font-weight: 500; }
.step-leg { font-size: 12px; color: var(--acc); }
.route-note { font-size: 12px; line-height: 1.7; color: oklch(0.45 0.02 200); }
.a-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.a-note { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: 12px; }
.a-note-h { font-size: 13px; font-weight: 500; }
.a-note-t { font-size: 13px; line-height: 1.7; }
.a-note-warn { background: oklch(0.97 0.04 85); }
.a-note-warn .a-note-h { color: oklch(0.4 0.07 70); }
.a-note-warn .a-note-t { color: oklch(0.35 0.03 70); }
.a-note-info { background: var(--soft); }
.a-note-info .a-note-h { color: oklch(0.32 0.06 178); }
.a-note-info .a-note-t { color: oklch(0.38 0.02 200); }
.a-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 8px; }
.a-lg { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.a-lg-h { font-size: 12px; color: oklch(0.48 0.02 200); }
.a-lg a { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

/* ---- footer ---- */
.foot { margin-top: auto; padding: 24px 40px 40px; border-top: 1px solid var(--hl2); font-size: 12px; color: var(--mut); background: var(--soft); }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--mut); }
.foot-h { cursor: pointer; font-size: 13px; color: var(--tx); padding: 4px 0; }
.credits-box { margin-bottom: 14px; }
.credits { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; }
.cr-name { font-weight: 500; color: var(--tx); margin-right: 6px; }
.foot-brand { display: inline-block; margin-top: 8px; font-size: 13px; }
.foot-brand a { color: var(--acc); text-decoration: none; }

/* ---- buttons / detail sheet ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; font-weight: 500; font-size: 14px; line-height: 1.2; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; }
.btn-primary { color: var(--acc-d); border-color: var(--acc-s); background: var(--tint); }
.btn-primary:hover { background: oklch(0.93 0.05 170); color: var(--acc-d); }
.btn-secondary { border-color: var(--btn-line); color: var(--tx); }
.btn-secondary:hover { background: var(--tint); color: var(--tx); }

.sheet { margin: 0 0 0 auto; padding: 0; border: 0; width: min(560px, 100%); max-width: 100%; height: 100dvh; max-height: none; background: var(--bg); color: var(--tx);
  box-shadow: -10px 0 40px rgba(22, 40, 38, .18); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in .25s cubic-bezier(.2, .7, .2, 1); }
.sheet::backdrop { background: rgba(22, 40, 38, .38); }
@keyframes sheet-in { from { transform: translateX(32px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.sheet-close { position: absolute; right: 12px; top: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 8px; background: var(--bg); color: var(--tx); font-size: 13px; cursor: pointer; box-shadow: 0 0 0 1px var(--hl), 0 2px 8px rgba(22, 40, 38, .15); }
.sheet-close:hover { background: var(--tint); }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-photo { position: relative; margin: 0; background: var(--soft); }
.sheet-photo img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.sheet-photo.ph { aspect-ratio: 16 / 9; }
.sheet-photo figcaption { padding: 8px 20px; font-size: 11px; line-height: 1.5; color: var(--mut2); background: var(--soft); }
.sheet-photo figcaption a { color: inherit; }
.detail-main { display: flex; flex-direction: column; gap: 12px; padding: 20px 24px 40px; }
.detail-name { font-size: 26px; line-height: 1.35; }
.detail-desc { margin: 0; font-size: 15px; line-height: 1.85; color: oklch(0.34 0.02 200); }
.info { margin: 4px 0 0; display: flex; flex-direction: column; border-radius: 12px; box-shadow: 0 0 0 1px var(--hl2); overflow: hidden; }
.info-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--hl2); font-size: 13px; line-height: 1.7; }
.info-row:first-child { border-top: 0; }
.info dt { color: var(--acc); font-weight: 500; }
.info dd { margin: 0; overflow-wrap: anywhere; }
.info-row.is-caution { background: var(--warn-bg); box-shadow: inset 3px 0 0 var(--warn-line); }
.info-row.is-caution dt { color: var(--warn-tx); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.label { display: block; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--acc); margin-bottom: 6px; }
.nearby { display: flex; flex-direction: column; gap: 6px; }
.nearby .label { margin-bottom: 2px; }
.nearby-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 10px; background: var(--soft); color: var(--tx); text-decoration: none; font-size: 14px; }
.nearby-item:hover { background: var(--tint); color: var(--tx); }
.sq { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--cc); color: var(--bg); font-size: 12px; font-weight: 500; }
.nearby-dist { font-size: 12px; color: var(--mut); white-space: nowrap; }
.sources { font-size: 12px; color: var(--mut); }
.sources ul { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; }
.sources p { margin: 0; line-height: 1.7; }

/* ---- index ---- */
.idx-head { padding: 40px 40px 8px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.idx-head .nav-brand { padding: 0; background: none; margin-bottom: 24px; }
.idx-head h1 { font-size: 44px; line-height: 1.2; letter-spacing: .02em; }
.idx-head p { margin: 0; color: var(--mut); }
.town-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.town-card { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--bg); color: var(--tx); text-decoration: none; box-shadow: 0 0 0 1px var(--hl), 0 6px 20px rgba(22, 40, 38, .08); transition: box-shadow .2s; }
.town-card:hover { color: var(--tx); box-shadow: 0 0 0 1.5px var(--acc-s), 0 10px 30px rgba(22, 40, 38, .14); }
.town-hero { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--soft); overflow: hidden; }
.town-hero img { width: 100%; height: 100%; object-fit: cover; }
.town-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px 22px; }
.town-name { font-size: 22px; font-weight: 500; }
.town-catch { font-size: 14px; color: var(--mut); line-height: 1.7; }
.town-count { font-size: 12px; color: var(--acc); }

/* ---- ≤ 900px ---- */
@media (max-width: 900px) {
  body { font-size: 15px; }
  .section { padding: 28px var(--gutter); }
  .hero-grid { height: 56vh; min-height: 300px; grid-template-columns: 1fr !important; grid-template-rows: 1fr; }
  .hero-img-1 { grid-row: 1; }
  .hero-img-2, .hero-img-3 { display: none; }
  .hero-img:not(.is-mobile) { display: none; }
  .hero-img.is-mobile { display: block; grid-row: 1; }
  .nav { left: var(--gutter); right: var(--gutter); top: 12px; flex-wrap: wrap; justify-content: flex-start; }
  .nav-links { width: 100%; justify-content: space-between; }
  .nav-links a { padding: 7px 8px; }
  .hero-card { position: relative; left: auto; bottom: auto; max-width: none; margin: -64px var(--gutter) 16px; padding: 22px 20px; gap: 10px; }
  .hero-card h1 { font-size: 30px; }
  .hero-card p { font-size: 14px; line-height: 1.75; }
  .sec-head { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
  .sec-head h2 { font-size: 24px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .mapwrap { height: auto; overflow: visible; background: none; box-shadow: none; display: flex; flex-direction: column; gap: 12px; }
  .map { height: 60vh; min-height: 340px; border-radius: 12px; box-shadow: 0 0 0 1px var(--hl); background: #eef2f2; }
  .map-ctl { top: 12px; right: 12px; }
  .mapcard { position: static; width: auto; border-radius: 12px; }
  .mc-photo { height: 210px; }
  .mc-body { overflow: visible; }
  #events, #heritage, #access { padding: 36px var(--gutter); gap: 20px; }
  .sec-title h2 { font-size: 24px; }
  .sec-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .ev-grid, .hf-grid, .hc-grid, .routes, .a-notes, .seasons, .seasons-4 { grid-template-columns: 1fr; }
  .a-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature { grid-template-columns: 1fr; padding: 22px 18px; gap: 20px; }
  .feature-items { grid-template-columns: 1fr; }
  .feature-text h3 { font-size: 22px; }
  .h-controls { flex-direction: column; align-items: stretch; }
  .h-toggle { align-self: flex-start; }
  .foot { padding: 24px var(--gutter) 32px; }
  .sheet { width: 100%; max-width: 100%; height: 100dvh; box-shadow: none; }
  .sheet-photo img { aspect-ratio: 16 / 10; }
  .detail-main { padding: 18px var(--gutter) 40px; }
  .detail-name { font-size: 24px; }
  .idx-head { padding: 24px var(--gutter) 8px; }
  .idx-head h1 { font-size: 32px; }
  .town-grid { grid-template-columns: 1fr; }
}

/* hero highlights: plain-language "why visit" list under the lead */
.hero-points { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hero-points a { display: flex; gap: 10px; align-items: baseline; font-size: 14px; line-height: 1.6; color: var(--tx); text-decoration: none; }
.hero-points a:hover { color: var(--acc); }
.hp-sq { width: 8px; height: 8px; flex: none; border-radius: 2px; background: var(--acc-s); transform: translateY(-1px); }

.hero-card { max-width: 580px; }
.hero-card h1 { font-size: 42px; }
@media (max-width: 900px) { .hero-card h1 { font-size: 30px; } }
@media (max-width: 480px) { .hero-card h1 { font-size: clamp(20px, 6.6vw, 27px); line-height: 1.35; } }

/* genre icons (Phosphor light, inlined) */
.nw { white-space: nowrap; }
.gi { width: 16px; height: 16px; flex: none; vertical-align: -0.17em; color: var(--acc-d); opacity: .8; }
.gi-w { margin-left: 6px; }
.route-mode, .a-lg-h { display: inline-flex; align-items: center; gap: 5px; }
.route-mode .gi, .a-lg-h .gi { vertical-align: 0; opacity: .85; width: 14px; height: 14px; }
.a-lg-h .gi { color: inherit; }
.illust-note { margin: 2px 0 0; text-align: right; font-size: 11px; line-height: 1.5; color: var(--mut2); }

/* ---- inlined basemap: keep lines and labels at a readable SCREEN size at every zoom (--inv = 1 / zoom, set by svg-map.js).
   clamp(min-on-screen, natural, max-on-screen): between the bounds a line scales with the map like a printed map. */
.map-base svg .r-minor     { stroke-width: clamp(calc(0.9px * var(--inv, 1)), 1.3px, calc(3.5px * var(--inv, 1))); }
.map-base svg .r-tertiary  { stroke-width: clamp(calc(1.4px * var(--inv, 1)), 2.2px, calc(4.5px * var(--inv, 1))); }
.map-base svg .r-secondary { stroke-width: clamp(calc(1.8px * var(--inv, 1)), 3px, calc(5.5px * var(--inv, 1))); }
.map-base svg .r-primary   { stroke-width: clamp(calc(2.2px * var(--inv, 1)), 4px, calc(6.5px * var(--inv, 1))); }
.map-base svg .r-trunk,
.map-base svg .r-motorway  { stroke-width: clamp(calc(2.6px * var(--inv, 1)), 4.8px, calc(7.5px * var(--inv, 1))); }
.map-base svg .m-river     { stroke-width: clamp(calc(1.2px * var(--inv, 1)), 3px, calc(6px * var(--inv, 1))); }
.map-base svg .m-rail-c    { stroke-width: calc(3.4px * var(--inv, 1)); }
.map-base svg .m-rail-d    { stroke-width: calc(1.8px * var(--inv, 1)); stroke-dasharray: calc(7px * var(--inv, 1)) calc(7px * var(--inv, 1)); }
.map-base svg .m-tram      { stroke-width: calc(2.2px * var(--inv, 1)); }
.map-base svg .m-ferry     { stroke-width: calc(1.4px * var(--inv, 1)); stroke-dasharray: calc(2px * var(--inv, 1)) calc(5px * var(--inv, 1)); }
.map-base svg .m-bnd       { stroke-width: calc(2px * var(--inv, 1)); stroke-dasharray: calc(8px * var(--inv, 1)) calc(5px * var(--inv, 1)); }
.map-base svg .m-lbl       { font-size: clamp(calc(10.5px * var(--inv, 1)), 22px, calc(14px * var(--inv, 1))); letter-spacing: calc(2px * var(--inv, 1)); }
.map-base svg .m-lbl-sea   { font-size: clamp(calc(11px * var(--inv, 1)), 24px, calc(15px * var(--inv, 1))); letter-spacing: calc(4px * var(--inv, 1)); }
.map-base svg .m-lbl-town  { font-size: clamp(calc(13px * var(--inv, 1)), 26px, calc(17px * var(--inv, 1))); font-weight: 600; }
.map-base svg .m-lbl       { paint-order: stroke; stroke: oklch(0.985 0.006 150 / .85); stroke-width: calc(3px * var(--inv, 1)); stroke-linejoin: round; }

/* heritage cards / table names that open the heritage sheet */
button.hc { border: 0; font: inherit; text-align: left; cursor: pointer; width: 100%; color: inherit; }
.h-open:not(.hc) { font: inherit; color: var(--acc-d); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--btn-line); text-underline-offset: 3px; }
.hsheet .detail-main { padding-top: 64px; }
.detail-src { margin-top: 16px; font-size: 12px; color: var(--mut); display: flex; flex-wrap: wrap; gap: 6px 10px; }

/* ---- spot pages (/walk/<town>/<spot>/): the detail sheet as a standalone page */
.walk-spot { max-width: 820px; }
.sp-head { padding: 28px 40px 0; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.sp-head .nav-brand { padding: 0; background: none; }
.crumbs { font-size: 12px; color: var(--mut); }
.crumbs a { color: var(--mut); }
.sp-main { padding: 16px 40px 40px; }
.sp-article { border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--hl); }
.sp-article .label { font-size: 13px; }
.sp-ev { margin: 0; font-size: 14px; }
.sp-back { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 640px) { .sp-head { padding: 20px var(--gutter) 0; } .sp-main { padding: 12px var(--gutter) 32px; } }

/* map: road casings, rail tunnels, facility + road labels (by zoom tier, data-z set by svg-map.js) */
.map-base svg .rc-primary  { stroke-width: clamp(calc(3.4px * var(--inv, 1)), 6px, calc(8.5px * var(--inv, 1))); }
.map-base svg .rc-trunk,
.map-base svg .rc-motorway { stroke-width: clamp(calc(4px * var(--inv, 1)), 6.8px, calc(9.5px * var(--inv, 1))); }
.map-base svg .m-rail-t    { stroke-width: calc(2px * var(--inv, 1)); stroke-dasharray: calc(4px * var(--inv, 1)) calc(4px * var(--inv, 1)); }
.map-base svg .m-pois      { display: none; }
.map-base[data-z="2"] svg .m-pois, .map-base[data-z="3"] svg .m-pois { display: inline; }
.map-base[data-z="2"] svg .m-poi:not(.m-poi-sta), .map-base[data-z="2"] svg .m-road { display: none; }
.map-base svg .m-poi circle { r: calc(2.6px * var(--inv, 1)); fill: currentColor; stroke: #fff; stroke-width: calc(1px * var(--inv, 1)); }
.map-base svg .m-poi text,
.map-base svg .m-road      { font-size: calc(11px * var(--inv, 1)); paint-order: stroke; stroke: oklch(0.985 0.006 150 / .9); stroke-width: calc(3px * var(--inv, 1)); stroke-linejoin: round; }
.map-base svg .m-poi text  { transform: translate(calc(3px * var(--inv, 1) - 5px), 0); }
.map-base svg .m-poi-sta text { font-weight: 600; }
.map-base svg .m-road      { fill: oklch(0.45 0.03 60); font-weight: 500; }

/* Connected transport: continuous overview, detail only when zoomed in. */
.map-base svg .m-rail-c { stroke-width: calc(1.35px * var(--inv, 1)); }
.map-base svg .m-rail-d { display: none; stroke-width: calc(.85px * var(--inv, 1)); stroke-dasharray: calc(5px * var(--inv, 1)) calc(5px * var(--inv, 1)); }
.map-base[data-z="2"] svg .m-rail-c,
.map-base[data-z="3"] svg .m-rail-c { stroke-width: calc(2.2px * var(--inv, 1)); }
.map-base[data-z="2"] svg .m-rail-d,
.map-base[data-z="3"] svg .m-rail-d { display: inline; }
.map-base svg .m-rail-tunnel { stroke-opacity: .72; stroke-dasharray: none; }
.map-base svg .m-road-tunnel { stroke-opacity: .72; }
.map-base svg .m-detail { display: none; }
.map-base[data-z="3"] svg .m-detail { display: inline; }
.map-base svg .r-minor { stroke-width: calc(.85px * var(--inv, 1)); }
.map-base svg .rc-minor { stroke-width: calc(1.35px * var(--inv, 1)); stroke-opacity: .38; }
.map-base svg .rc-tertiary { stroke-width: clamp(calc(2px * var(--inv, 1)), 3px, calc(5.1px * var(--inv, 1))); stroke-opacity: .5; }
.map-base svg .rc-secondary { stroke-width: clamp(calc(2.4px * var(--inv, 1)), 3.8px, calc(6.1px * var(--inv, 1))); stroke-opacity: .55; }
.map-base svg .r-service, .map-base svg .r-track, .map-base svg .r-path { stroke-width: calc(.9px * var(--inv, 1)); }
.map-base svg .rc-service, .map-base svg .rc-track, .map-base svg .rc-path { stroke-width: calc(1.5px * var(--inv, 1)); stroke-opacity: .45; }

.map-base svg .m-rail-halo { stroke-width: calc(3.5px * var(--inv, 1)); }
.map-base[data-z="2"] svg .m-rail-halo,
.map-base[data-z="3"] svg .m-rail-halo { stroke-width: calc(4.2px * var(--inv, 1)); }
.map-base svg .m-transport-bridge [class^="rc-"] { stroke-opacity: 1; }
.map-base:not([data-z="3"]) svg .m-detail { display: none; }
