/* Visitor map: base styles shared by every site. Site-specific looks live in themes/<name>/theme.css. */

@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/schibsted-grotesk-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/schibsted-grotesk-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-ext-wght-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url(fonts/newsreader-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  /* Everything a theme is expected to change lives in this block.
     A theme's theme.css is loaded after this file and overrides any of these. */
  --paper: #F4F6F7;            /* page background behind panels */
  --surface: #FFFFFF;          /* panels, popups, dialogs */
  --wash: #EAEEF1;             /* hover and placeholder fills */
  --line: #DCE2E7;             /* hairlines */
  --ink: #17222C;              /* main text */
  --ink-2: #51606D;            /* secondary text */
  --ink-3: #7B8894;            /* tertiary text, input borders */
  --accent: #14586B;           /* links, primary buttons, focus */
  --accent-deep: #0E4352;      /* primary button hover */
  --on-accent: #FFFFFF;        /* text on the accent colour */
  --link: var(--accent);       /* text links */
  --focus: var(--accent);      /* keyboard focus ring */
  --mark: #C8372D;             /* personal list (heart, badge) and default route colour */
  --danger: #A3261E;           /* error text */
  --chip-bg: #17222C;          /* cluster bubbles */
  --chip-fg: #FFFFFF;
  --toast-bg: #17222C;
  --toast-fg: #FFFFFF;
  --pin-ring: #FFFFFF;         /* outline around pins */
  --player-bg: #17222C;        /* media player before it is started */
  --player-fg: #FFFFFF;
  --map-bg: #E4E9EC;           /* shown while map tiles load */
  --tile-filter: saturate(.55) contrast(.97) brightness(1.03);   /* tone of the base map */
  --shadow: 0 8px 28px rgba(23, 34, 44, .18);
  --shadow-sm: 0 2px 8px rgba(23, 34, 44, .16);
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;   /* interface */
  --display: var(--sans);      /* titles */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;                        /* long descriptions */
  --display-weight: 750;
  --display-tracking: -.03em;
  --r-panel: 18px;             /* corner radii: panel, cards/popups, buttons */
  --r-card: 14px;
  --r-btn: 10px;
  --logo-h: 22px;              /* logo height in the panel header */

  --peek: 108px;               /* collapsed sheet height on phones (PEEK in app.js) */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.45 var(--sans); -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body.view-map { overflow: hidden; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: var(--link); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--ink-2); }

/* --- buttons --------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-btn); background: var(--surface); color: var(--ink); font-weight: 560; font-size: 15px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn--ghost { border-color: transparent; background: transparent; padding: 0 8px; }
.btn--ghost:hover { background: var(--wash); border-color: transparent; }
.btn--wide { width: 100%; }
.btn--fav.is-on { color: var(--mark); border-color: color-mix(in srgb, var(--mark) 45%, var(--line)); }
.btn--fav.is-on .ic { fill: var(--mark); }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--wash); color: var(--ink); }
.link { color: var(--link); font-weight: 560; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 2px; }
.link:disabled { color: var(--ink-3); text-decoration: none; cursor: default; }

/* --- map ------------------------------------------------------------------- */
#map { position: fixed; inset: 0; background: var(--map-bg); z-index: 0; }
.leaflet-container { font: inherit; }
/* Quieter base map, so the pins carry the colour. */
.leaflet-tile-pane { filter: var(--tile-filter); }
.leaflet-control-attribution { font-size: 11px; background: color-mix(in srgb, var(--surface) 82%, transparent) !important; color: var(--ink-2); }
.leaflet-control-attribution a { color: var(--ink-2); }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow-sm) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-bar a { background: var(--surface) !important; border-color: var(--line) !important; color: var(--ink) !important; width: 36px !important; height: 36px !important; line-height: 36px !important; }
.leaflet-bar a.leaflet-disabled { background: var(--wash) !important; color: var(--ink-3) !important; }
.leaflet-tooltip { background: var(--surface); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.leaflet-tooltip-top::before { border-top-color: var(--surface); }
.leaflet-tooltip-bottom::before { border-bottom-color: var(--surface); }
.leaflet-tooltip-left::before { border-left-color: var(--surface); }
.leaflet-tooltip-right::before { border-right-color: var(--surface); }
#map .leaflet-control-zoom { display: none; }
#map .leaflet-bottom { bottom: calc(var(--peek) + var(--safe-b)); }

.pin-wrap, .cluster-wrap { background: none; border: 0; }
.pin { display: block; width: 30px; height: 30px; border-radius: 50% 50% 50% 3px; transform: rotate(-45deg); background: var(--c); box-shadow: 0 0 0 2px var(--pin-ring), 0 3px 8px rgba(23, 34, 44, .45); }
.pin-in { display: grid; place-items: center; width: 100%; height: 100%; transform: rotate(45deg); color: #fff; }
.pin-in svg { width: 16px; height: 16px; }
.pin-num { font: 700 13px/1 var(--sans); letter-spacing: -.02em; }
.pin--hidden { opacity: .55; }
.pin-fav { position: absolute; top: -5px; right: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--mark); box-shadow: 0 0 0 2px var(--pin-ring); }
.pin-wrap:focus-visible { outline: none; }
.pin-wrap:focus-visible .pin { box-shadow: 0 0 0 2px var(--pin-ring), 0 0 0 5px var(--ink); }
.cluster { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--chip-bg); color: var(--chip-fg); font: 700 14px/1 var(--sans); box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 3px 8px rgba(23, 34, 44, .4); }
.me-dot { fill: #1F6FEB; fill-opacity: 1; stroke: #fff; stroke-width: 3; }
.me-acc { fill: #1F6FEB; fill-opacity: .12; stroke: none; }

/* --- popup ----------------------------------------------------------------- */
.pop-wrap .leaflet-popup-content-wrapper { padding: 0; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); color: var(--ink); }
.pop-wrap .leaflet-popup-content { margin: 0; line-height: 1.4; font-size: 15px; }
.pop-wrap .leaflet-popup-tip { box-shadow: none; background: var(--surface); }
.pop-wrap a.leaflet-popup-close-button { top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface); color: var(--ink); font: 400 20px/30px var(--sans); box-shadow: var(--shadow-sm); }
.pop-img { display: block; aspect-ratio: 16 / 9; background: var(--wash); }
.pop-img img { width: 100%; height: 100%; object-fit: cover; }
.pop-body { padding: 14px 14px 12px; display: grid; gap: 6px; }
.pop:not(:has(.pop-img)) .pop-body { padding-right: 44px; }
.pop h3 { font-family: var(--display); font-size: 18px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.pop h3 a { color: inherit; text-decoration: none; }
.pop-wrap a.pop-short { color: var(--ink-2); text-decoration: none; }
.pop-wrap a.pop-short:hover, .pop-wrap .pop h3 a:hover { color: var(--link); }
.pop-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.pop:not(:has(.pop-img)) .pop-actions { margin-right: -30px; }
.pop-actions .btn { min-height: 40px; padding: 0 10px; font-size: 14.5px; }
.pop-wrap .pop-actions a.btn--primary { color: var(--on-accent); }
.pop-route { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px -30px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.pop:has(.pop-img) .pop-route { margin-right: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 560; color: var(--ink-2); }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chips:empty { display: none; }

.pop-wrap .leaflet-popup-content p { margin: 0; }   /* Leaflet spaces paragraphs for its own default popups */
.pop-text { font-size: 14.5px; line-height: 1.45; }
.pop-wrap .pop-text p + p, .pop-wrap .pop-text ul + p, .pop-wrap .pop-text p + ul { margin-top: .6em; }
.pop-wrap .media-cap p + p { margin-top: .5em; }
.pop-wrap a.media-link { color: var(--ink); }
.pop-text h3 { font-size: 15px; margin: .8em 0 .2em; }
.pop-text ul { list-style: disc; padding-left: 1.2em; }
.pop-wrap .pop-text a { color: var(--link); }
.pop .media { margin: 4px 0 2px; }
.pop .media-cap { font-size: 13.5px; }
.pop-wrap .leaflet-popup-scrolled { border: 0; }

/* --- media player ----------------------------------------------------------- */
.media { margin: 24px 0 0; max-width: 34em; }
.media--text { margin-top: 18px; }
.player { position: relative; width: 100%; border-radius: var(--r-card); overflow: hidden; background: var(--player-bg); }
.player iframe { display: block; width: 100%; height: 100%; border: 0; }
.player.is-playing { background: var(--wash); }
.player-start { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; height: 100%; padding: 0 18px; color: var(--player-fg); }
.player-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--on-accent); flex: none; }
.player-ic .ic { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
.player-text { display: grid; text-align: left; line-height: 1.25; }
.player-text strong { font-size: 16px; font-weight: 650; }
.player-text span { font-size: 13.5px; opacity: .78; }
.player-start:hover .player-ic { background: var(--accent-deep); }
.player-start:focus-visible { outline: 2px solid var(--focus); outline-offset: -4px; border-radius: var(--r-card); }
.player--audio .player-start { justify-content: flex-start; }
.player--audio .player-ic { width: 46px; height: 46px; }
.player-native { display: block; width: 100%; border-radius: var(--r-card); }
video.player-native { aspect-ratio: 16 / 9; background: #000; }
.media-cap { margin-top: 10px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.media-cap p + p { margin-top: .5em; }
.media-cap a { color: var(--link); }
.pop .player-ic { width: 44px; height: 44px; }
.pop .player-ic .ic { width: 19px; height: 19px; }
/* Sound players wait as a slim bar and take their real height once started. */
.player--audio:not(.is-playing) { height: 84px !important; }
.pop .player--audio:not(.is-playing) { height: 72px !important; }

/* --- search and floating controls ------------------------------------------ */
.search { position: fixed; z-index: 30; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; }
.search-field { display: flex; align-items: center; gap: 4px; height: 48px; padding: 0 4px 0 14px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-sm); }
.search-field:focus-within { box-shadow: var(--shadow-sm), 0 0 0 2px var(--focus); }
.search-ic { display: grid; color: var(--ink-3); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; padding: 0 6px; font-size: 16px; }
.search input::-webkit-search-cancel-button { display: none; }
.results { margin-top: 6px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); max-height: 56dvh; overflow: auto; padding: 6px; }
.results .empty { padding: 12px; }

.fab { position: fixed; z-index: 15; right: 12px; bottom: calc(var(--peek) + var(--safe-b) + 34px); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.fab .ic { width: 21px; height: 21px; }

/* --- panel: bottom sheet on phones, side panel on wide screens -------------- */
.panel { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: min(66dvh, 620px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-panel) var(--r-panel) 0 0; box-shadow: 0 -4px 24px rgba(23, 34, 44, .16); transform: translateY(calc(100% - var(--peek) - var(--safe-b))); transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
.sheet-open .panel { transform: none; }
.panel-head { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 20px 16px 8px; flex: none; }
.grab { position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
.site-title { font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.site-logo { height: var(--logo-h); width: auto; flex: none; }
.shown-count { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); flex: none; padding: 0 8px; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; height: 48px; font-size: 14.5px; font-weight: 560; color: var(--ink-2); white-space: nowrap; }
.tabs button > span:first-child { display: grid; }
.tabs button[aria-selected="true"] { color: var(--ink); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--ink); }
.badge { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--mark); color: #fff; font-size: 12px; font-weight: 700; line-height: 19px; text-align: center; }
.panes { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pane { padding: 14px 16px calc(24px + var(--safe-b)); }

.pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 6px; }
.pane > .pane-head:first-child, .banner + .pane-head, .intro + .pane-head { margin-top: 2px; }
.pane-head h2 { font-size: 15px; font-weight: 700; }
.pane-tools { display: flex; gap: 14px; font-size: 14px; }
.intro { color: var(--ink-2); margin-bottom: 14px; font-size: 15px; }
.banner { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--mark); background: var(--paper); font-size: 14.5px; }
.empty { color: var(--ink-2); font-size: 15px; padding: 6px 0 4px; }
.stack { display: grid; gap: 8px; margin-top: 12px; }

/* legend: reads like the key of a printed map */
.legend li { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.legend li:last-child { border-bottom: 0; }
.legend-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 4px 0; }
.key { position: relative; display: grid; place-items: start center; width: 30px; height: 36px; flex: none; }
.key .pin { width: 26px; height: 26px; box-shadow: none; }
.key .pin-in svg { width: 14px; height: 14px; }
.legend-name { flex: 1; min-width: 0; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-n { color: var(--ink-3); font-size: 14px; font-variant-numeric: tabular-nums; padding-right: 6px; }
.legend .is-off .pin { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.legend .is-off .pin-in { color: var(--ink-3); }
.legend .is-off .legend-name { color: var(--ink-3); font-weight: 400; }
.solo { height: 50px; padding: 0 2px 0 12px; font-size: 14px; color: var(--link); font-weight: 560; white-space: nowrap; }

.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 8px 0; }
.row:hover .row-name { color: var(--link); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: none; margin: 0 4px 0 6px; }
.row-name { min-width: 0; font-weight: 500; }
.row-sub { display: block; font-size: 13.5px; font-weight: 400; color: var(--ink-2); }
.num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.stops .row { align-items: flex-start; }
.stops .num { margin-top: 1px; }

.route-list { display: grid; }
.route-list li + li { border-top: 1px solid var(--line); }
.route-card { display: flex; gap: 14px; padding: 14px 0; color: inherit; text-decoration: none; }
.route-line { flex: none; width: 5px; border-radius: 3px; background: var(--c); }
.route-text { display: grid; gap: 2px; min-width: 0; }
.route-text strong { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.route-card:hover strong { color: var(--link); }
.route-text .muted { font-size: 14px; }
.route-desc { font-size: 15px; margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 2px; margin: -4px 0 10px -6px; padding: 6px 8px 6px 2px; font-size: 14.5px; font-weight: 560; text-decoration: none; }
.route-title { font-family: var(--display); font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px; }
.route-about { margin-top: 10px; }
.route-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }

.switch-row { display: flex; align-items: center; gap: 10px; padding: 8px 0 12px; font-size: 15px; cursor: pointer; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.fav-item { display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--line); }
.fav-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 0; color: inherit; text-decoration: none; }
.fav-main img, .fav-ph { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex: none; }
.fav-ph { display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--c); }
.fav-text { display: grid; min-width: 0; }
.fav-text strong { font-weight: 650; }
.fav-text .muted { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.account { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14.5px; }
.account .muted { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; }

/* --- object page ----------------------------------------------------------- */
.page { position: fixed; inset: 0; z-index: 40; background: var(--surface); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.view-page .search, .view-page .fab, .view-page .panel { visibility: hidden; }
.page-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: calc(8px + var(--safe-t)) 10px 8px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.obj-hero { background: var(--wash); }
.obj-hero button { display: block; width: 100%; }
.obj-hero img { width: 100%; height: auto; max-height: 62dvh; object-fit: cover; }
.obj-hero figcaption { max-width: 720px; margin: 0 auto; padding: 8px 18px; font-size: 13.5px; color: var(--ink-2); background: var(--surface); }
.obj-col { max-width: 720px; margin: 0 auto; padding: 26px 18px calc(56px + var(--safe-b)); }
.obj h1, .obj-col > h1 { font-family: var(--display); font-size: clamp(32px, 8.4vw, 50px); line-height: 1.04; font-weight: var(--display-weight); letter-spacing: var(--display-tracking); margin: 10px 0 0; text-wrap: balance; }
.lead { font-size: 19px; line-height: 1.4; color: var(--ink-2); margin-top: 14px; max-width: 34em; }
.prose { margin-top: 24px; font: 400 19px/1.62 var(--serif); max-width: 34em; }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: .9em; }
.prose h3 { font: 700 19px/1.3 var(--sans); letter-spacing: -.01em; margin: 1.5em 0 .4em; }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose li + li { margin-top: .25em; }
.prose a { text-underline-offset: 3px; }
.obj-col h2 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; margin: 40px 0 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; margin-top: 28px; }
.gallery button { aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--wash); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.obj-map { height: min(52dvh, 380px); border-radius: var(--r-card); overflow: hidden; background: var(--map-bg); z-index: 0; }
.near-dot { cursor: pointer; }
.obj-where { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.obj-where .btn--ghost { font-weight: 500; color: var(--ink-2); }

/* --- dialog, lightbox, toast ------------------------------------------------ */
.dialog { width: min(400px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: var(--r-panel); box-shadow: var(--shadow); background: var(--surface); color: var(--ink); }
.dialog::backdrop { background: rgba(23, 34, 44, .45); }
.dialog form { position: relative; display: grid; gap: 14px; padding: 24px 22px 22px; }
.dialog h2 { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -.02em; padding-right: 40px; }
.dialog-close { position: absolute; top: 14px; right: 12px; }
.dialog label { display: grid; gap: 6px; font-size: 14.5px; font-weight: 560; }
.dialog input { height: 46px; padding: 0 12px; border: 1px solid var(--ink-3); border-radius: 10px; background: var(--surface); font-size: 16px; }
.dialog input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.hint { font-size: 13.5px; color: var(--ink-2); margin-top: -6px; }
.error { color: var(--danger); font-size: 14.5px; font-weight: 560; }
.switch { font-size: 14.5px; color: var(--ink-2); }

/* --- sign-in screen of a members-only site ---------------------------------- */
.view-gate #map, .view-gate .search, .view-gate .fab, .view-gate .panel { display: none; }
.gate { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 12px; padding: calc(24px + var(--safe-t)) 12px calc(24px + var(--safe-b)); }
.gate-brand { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 100%; }
.gate-brand h1 { font-family: var(--display); font-size: clamp(28px, 8vw, 38px); line-height: 1.05; font-weight: var(--display-weight); letter-spacing: var(--display-tracking); text-align: center; text-wrap: balance; }
.gate-logo { height: calc(var(--logo-h) * 1.5); width: auto; flex: none; }
.gate-intro { max-width: 34em; color: var(--ink-2); text-align: center; }
.gate-card { margin-top: 10px; }

.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; background: rgba(13, 20, 26, .97); }
.lightbox figure { grid-column: 2; display: grid; justify-items: center; gap: 10px; min-width: 0; }
.lightbox img { max-width: 100%; max-height: 84dvh; object-fit: contain; }
.lightbox figcaption { color: #D5DCE2; font-size: 14.5px; text-align: center; }
.lightbox .icon-btn { color: #fff; justify-self: center; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.lb-close { position: absolute; top: calc(10px + var(--safe-t)); right: 10px; }
.lightbox.single .lb-prev, .lightbox.single .lb-next { visibility: hidden; }

#toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--peek) + var(--safe-b) + 20px); max-width: min(420px, calc(100vw - 24px)); padding: 11px 16px; border-radius: var(--r-btn); background: var(--toast-bg); color: var(--toast-fg); font-size: 14.5px; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.warn { background: #7A2A22; color: #fff; }
.fatal { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; gap: 14px; justify-items: center; padding: 24px; background: var(--paper); text-align: center; }

/* --- wide screens ----------------------------------------------------------- */
@media (min-width: 900px) {
  .search { top: 16px; left: 16px; right: auto; width: 384px; }
  .panel { top: 76px; left: 16px; right: auto; bottom: 16px; width: 384px; height: auto; border-radius: var(--r-panel); box-shadow: var(--shadow); transform: none; transition: none; }
  .panel-head { padding-top: 18px; cursor: default; pointer-events: none; }
  .grab { display: none; }
  #map .leaflet-control-zoom { display: block; }
  #map .leaflet-bottom { bottom: 0; }
  .fab { right: 14px; bottom: 122px; width: 40px; height: 40px; border-radius: 10px; }
  #toast { bottom: 28px; }
  .page-bar { padding-left: max(10px, calc((100vw - 720px) / 2 - 8px)); padding-right: max(10px, calc((100vw - 720px) / 2)); }
  .obj-hero { max-width: 1040px; margin: 24px auto 0; border-radius: 14px; overflow: hidden; }
  .obj-hero img { max-height: 54dvh; }
  .obj-col { padding-top: 32px; }
}

@media (max-width: 379px) {
  .tabs button > span:first-child { display: none; }
  .tabs button { font-size: 14px; }
  .site-title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, #toast { transition: none; }
}
