﻿:root {
  --ink: #070b12; --ink-2: #0e1520;
  --glass: rgba(10, 15, 24, .78); --glass-2: rgba(16, 23, 34, .9);
  --line: rgba(255, 244, 224, .14); --line-2: rgba(255, 244, 224, .26);
  --cream: #f6eddc; --dim: rgba(246, 237, 220, .64); --amber: #e8b46a; --green: #8fd6a4;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --dock-h: 128px; --gp-w: 344px; --pl-w: 316px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body, .pl-list, .gp-grid, .ab-card { scrollbar-width: thin; scrollbar-color: rgba(246,237,220,.28) transparent; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--cream); font-family: var(--sans); overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
svg.flag { width: 24px; height: 16px; display: block; border-radius: 2.4px; flex: none; }
#map { position: fixed; inset: 0; }
.vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(4, 7, 12, .45) 100%), linear-gradient(to bottom, rgba(4, 7, 12, .4), transparent 14%); }
.maplibregl-ctrl-attrib { background: rgba(7, 11, 18, .55) !important; color: var(--dim) !important; font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--dim) !important; }
body.started .maplibregl-ctrl-bottom-right { bottom: calc(var(--dock-h) + 2px); z-index: 11; }

/* ---------- intro ---------- */
.intro { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; text-align: center; padding: 24px; overflow-y: auto;
  background: radial-gradient(ellipse at 50% 50%, rgba(5, 8, 14, .68) 0%, rgba(5, 8, 14, .4) 60%, rgba(5, 8, 14, .62) 100%); transition: opacity .8s ease, visibility .8s; }
.intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-inner { max-width: 880px; display: flex; flex-direction: column; align-items: center; gap: 14px; animation: rise 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.eyebrow { font: 500 12px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--amber); }
h1 { font: 300 clamp(2.6rem, 9vw, 5.6rem)/1.02 var(--serif); letter-spacing: -.02em; margin: 6px 0 0; text-wrap: balance; text-shadow: 0 2px 40px rgba(0, 0, 0, .6); }
.sub { font: italic 300 clamp(1.05rem, 2.6vw, 1.4rem)/1.4 var(--serif); color: var(--dim); margin: 0; max-width: 36ch; text-wrap: balance; }
.route { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 10px; margin: 8px 0 14px; font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.route span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 9px; border-radius: 99px; background: rgba(10, 15, 24, .55); border: 1px solid var(--line); }
.route i { width: 18px; height: 1px; background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.big-play { position: relative; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: rgba(246, 237, 220, .96); color: var(--ink); box-shadow: 0 10px 50px rgba(232, 180, 106, .35); transition: transform .25s, opacity .4s; opacity: .5; }
.big-play svg { width: 34px; height: 34px; margin-left: 4px; }
.big-play.ready { opacity: 1; }
.big-play.ready:hover { transform: scale(1.06); }
.big-play:disabled { cursor: progress; }
.big-play .ring { position: absolute; inset: -10px; border-radius: 50%; border: 1px solid rgba(232, 180, 106, .7); animation: pulse 2.6s ease-out infinite; }
.play-label { font: 600 13px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.linkbtn { font: 500 14px/1 var(--sans); color: var(--cream); padding: 12px 18px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(10, 15, 24, .5); backdrop-filter: blur(8px); }
.linkbtn:hover { background: rgba(246, 237, 220, .14); }
.hint { font: 400 13px/1.5 var(--sans); color: var(--dim); margin: 0; max-width: 44ch; }
.stats { font: 400 12px/1 var(--sans); letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes pulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }

/* ---------- outro (trip in numbers) ---------- */
.outro { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--dock-h) + 8px); z-index: 15; display: grid; place-items: start center; padding: calc(64px + var(--safe-t)) 16px 0; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .9s, visibility .9s; }
.outro.show { opacity: 1; visibility: visible; }
.outro-inner { text-align: center; padding: 22px 26px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); max-width: 640px; width: 100%; }
.outro.show .btn { pointer-events: auto; }
.outro h2 { font: 300 clamp(1.8rem, 6vw, 3rem)/1.1 var(--serif); margin: 10px 0 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px 10px; margin: 6px 0 4px; }
.stat b { display: block; font: 400 1.7rem/1 var(--serif); color: var(--cream); }
.stat span { display: block; margin-top: 6px; font: 500 10.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.outro-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.btn { padding: 12px 22px; border-radius: 99px; background: var(--cream); color: var(--ink); font-weight: 600; font-size: 14px; }
.btn.ghost { background: var(--glass-2); color: var(--cream); border: 1px solid var(--line-2); }

/* ---------- top bar ---------- */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 12; display: flex; justify-content: space-between; align-items: flex-start; padding: calc(12px + var(--safe-t)) 14px 0; pointer-events: none; opacity: 0; transition: opacity .6s; }
body.started .topbar { opacity: 1; }
.topbar > * { pointer-events: auto; }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px 9px 12px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font: 600 12px/1 var(--sans); letter-spacing: .06em; max-width: 56vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.chip.playing i { background: var(--green); box-shadow: 0 0 0 4px rgba(143, 214, 164, .22); animation: blink 2s ease-in-out infinite; }
.chip.paused i { background: var(--amber); }
.chip.exploring i { background: #8ec9ff; }
.chip .l-short { display: none; }
.gpanel.compact { bottom: auto; }
.chip em { font-style: normal; font-weight: 400; color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
@keyframes blink { 50% { box-shadow: 0 0 0 7px rgba(143, 214, 164, 0); } }
.topbtns { display: flex; gap: 8px; align-items: center; }
.pillbtn { white-space: nowrap; font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 11px 13px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.roundbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.roundbtn svg { width: 20px; height: 20px; }
.leg-pill { position: fixed; z-index: 11; top: calc(12px + var(--safe-t)); left: 50%; transform: translate(-50%, -12px); display: flex; align-items: center; gap: 12px; padding: 8px 16px 8px 11px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; pointer-events: none; transition: opacity .5s, transform .5s; max-width: min(460px, calc(100vw - 32px)); }
.leg-pill.show { opacity: 1; transform: translate(-50%, 0); }
.leg-pill .ico { width: 26px; height: 26px; flex: none; }
.leg-pill .ico svg { width: 100%; height: 100%; }
.leg-pill b { display: block; font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.leg-pill em { display: block; font: italic 300 15px/1.2 var(--serif); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-pill em i { opacity: .5; font-size: 13px; padding: 0 3px; }
.country-title { position: fixed; z-index: 11; left: 0; right: 0; top: 24%; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity 1s, transform 1.2s; text-align: center; }
.country-title.show { opacity: 1; transform: none; }
.country-title svg.flag { width: 54px; height: 36px; border-radius: 5px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.country-title span { font: 300 clamp(2rem, 7vw, 3.6rem)/1 var(--serif); letter-spacing: -.01em; text-shadow: 0 2px 30px rgba(0, 0, 0, .8); }
.toast { position: fixed; z-index: 60; left: 50%; top: calc(66px + var(--safe-t)); transform: translate(-50%, -10px); background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: blur(12px); padding: 10px 16px; border-radius: 12px; font-size: 13px; opacity: 0; pointer-events: none; transition: .4s; max-width: 86vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.lm-card { position: fixed; z-index: 13; left: 50%; bottom: calc(var(--dock-h) + 20px); transform: translateX(-50%); max-width: min(380px, calc(100vw - 28px)); padding: 12px 16px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--line-2); backdrop-filter: blur(14px); font: 300 15px/1.45 var(--serif); }
.lm-card { z-index: 16; }
.lm-go { display: block; margin-top: 10px; padding: 9px 14px; border-radius: 99px; background: var(--cream); color: var(--ink); font: 600 12.5px/1 var(--sans); }
.lm-card b { display: block; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 6px; }
.lm-label { font: 500 11.5px/1.2 var(--sans); letter-spacing: .04em; color: var(--cream); background: rgba(7, 11, 18, .7); border: 1px solid var(--line); padding: 4px 8px; border-radius: 99px; white-space: nowrap; cursor: pointer; transition: opacity .5s; }

/* ---------- dock ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 14; display: flex; flex-direction: column; gap: 8px; align-items: stretch; padding: 8px 14px calc(10px + var(--safe-b)); background: linear-gradient(to top, rgba(5, 8, 14, .94) 55%, rgba(5, 8, 14, 0)); opacity: 0; visibility: hidden; transition: opacity .7s; }
body.started .dock { opacity: 1; visibility: visible; }
.progress { width: 100%; max-width: 760px; margin: 0 auto; height: 3px; background: rgba(246, 237, 220, .14); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .5s linear; }
.tabs-row { display: flex; align-items: center; gap: 10px; justify-content: center; min-width: 0; }
.tabs-lbl { font: 600 10px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); flex: none; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 40px; padding: 0 13px 0 10px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); font: 600 12.5px/1 var(--sans); transition: background .15s, border-color .15s; }
.tab:hover { background: rgba(30, 40, 56, .9); }
.tab:active { transform: scale(.97); }
.tab.here { border-color: rgba(232, 180, 106, .7); }
.tab.open { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.controls { display: flex; gap: 10px; align-items: center; justify-content: center; position: relative; }
.ctl { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); transition: transform .15s, background .15s; flex: none; }
.ctl:hover { background: rgba(30, 40, 56, .9); }
.ctl:active { transform: scale(.94); }
.ctl svg { width: 20px; height: 20px; }
.ctl.txt { width: auto; padding: 0 14px; border-radius: 22px; font: 600 12.5px/1 var(--sans); min-width: 72px; }
.ctl.main { width: auto; min-width: 118px; height: 52px; padding: 0 22px 0 16px; border-radius: 26px; background: var(--cream); color: var(--ink); border: 0; display: inline-flex; gap: 9px; align-items: center; justify-content: center; font: 700 15px/1 var(--sans); box-shadow: 0 6px 24px rgba(232, 180, 106, .28); }
.ctl.main:hover { background: #fff; }
.ctl.main .ico { display: grid; place-items: center; }
.ctl.main svg { width: 22px; height: 22px; }
.timeleft { font: 500 11px/1 var(--sans); color: var(--dim); letter-spacing: .05em; min-width: 78px; white-space: nowrap; }

/* ---------- gallery panel (right on laptops, bottom sheet on phones) ---------- */
.gpanel { position: fixed; z-index: 13; right: 14px; top: calc(64px + var(--safe-t)); bottom: calc(var(--dock-h) + 34px); width: var(--gp-w); display: flex; flex-direction: column; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); box-shadow: 0 20px 60px rgba(0, 0, 0, .45); overflow: hidden; animation: panelIn .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes panelIn { from { opacity: 0; transform: translateX(20px); } }
@keyframes gpFade { from { opacity: 0; } }
@keyframes gpGhost { to { opacity: 0; } }
.gpanel.xin > * { animation: gpFade .42s ease both; }
.gpanel.ghost { pointer-events: none; z-index: 14; animation: gpGhost .42s ease forwards; }
.gpanel.ghost.xin > * { animation: none; }
.gp-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px 10px 16px; flex: none; }
.gp-flag { padding-top: 5px; }
.gp-tt { flex: 1; min-width: 0; }
.gp-eyebrow { font: 600 10px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--amber); }
.gp-title { font: 400 1.5rem/1.1 var(--serif); margin: 6px 0 4px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.gp-when { font: 500 12px/1.4 var(--sans); color: var(--dim); }
.gp-min { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); flex: none; }
.gp-min:hover { background: rgba(255, 255, 255, .16); }
.gp-min svg { width: 20px; height: 20px; transform: rotate(-90deg); }
.gp-blurb { font: 300 14.5px/1.5 var(--serif); color: rgba(246, 237, 220, .86); margin: 0; padding: 0 16px 10px; flex: none; max-height: 25%; overflow-y: auto; }
.gp-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 0 12px 10px; align-content: start; overscroll-behavior: contain; contain: content; }
.gp-cell, .gp-sk { position: relative; width: 100%; height: 0; padding-bottom: 100%; border-radius: 8px; overflow: hidden; background: #141b26; display: block; }
.gp-cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.gp-cell:hover img { transform: scale(1.05); }
.gp-v { position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; padding: 5px; border-radius: 50%; background: #000a; display: grid; place-items: center; }
.gp-v svg { width: 100%; height: 100%; }
.gp-sk { animation: sk 1.3s ease-in-out infinite; }
@keyframes sk { 50% { background: #1d2635; } }
.gp-empty { padding: 26px 20px; color: var(--dim); font: italic 300 15px/1.5 var(--serif); }
.gp-count { flex: none; padding: 8px 16px 12px; font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); border-top: 1px solid var(--line); }
.gtab { position: fixed; z-index: 13; right: 14px; bottom: calc(var(--dock-h) + 34px); display: inline-flex; align-items: center; gap: 9px; min-height: 44px; max-width: min(300px, calc(100vw - 28px)); padding: 0 8px 0 14px; border-radius: 99px; background: var(--glass-2); border: 1px solid var(--line-2); backdrop-filter: blur(14px); font: 600 13px/1 var(--sans); box-shadow: 0 8px 28px rgba(0, 0, 0, .4); }
.gtab svg { width: 20px; height: 20px; flex: none; }
.gtab .gt-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gtab .gt-n { flex: none; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--amber); color: var(--ink); font: 700 12.5px/28px var(--sans); text-align: center; }
.gtab .gt-n:empty { display: none; }

/* ---------- places drawer ---------- */
.places { position: fixed; z-index: 15; left: 14px; top: calc(64px + var(--safe-t)); bottom: calc(var(--dock-h) + 40px); width: var(--pl-w); display: flex; flex-direction: column; border-radius: 18px; background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); overflow: hidden; opacity: 0; transform: translateX(-16px); transition: opacity .25s, transform .25s; }
.places.in { opacity: 1; transform: none; }
.pl-head { display: flex; align-items: center; gap: 12px; padding: 14px 10px 10px 16px; border-bottom: 1px solid var(--line); flex: none; }
.pl-tt { flex: 1; min-width: 0; }
.pl-title { font: 400 1.35rem/1.1 var(--serif); margin: 0; }
.pl-sub { font: 500 11.5px/1.2 var(--sans); color: var(--dim); margin-top: 4px; }
.pl-close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); flex: none; }
.pl-close svg { width: 20px; height: 20px; }
.pl-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 12px; overscroll-behavior: contain; }
.pl-day { font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin: 16px 8px 6px; }
.pl-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; min-height: 48px; padding: 7px 10px; border-radius: 11px; transition: background .12s; }
.pl-row:hover { background: rgba(246, 237, 220, .09); }
.pl-row:active { background: rgba(246, 237, 220, .16); }
.pl-row.on { background: rgba(232, 180, 106, .2); }
.pl-t { font: 500 11.5px/1 var(--sans); color: var(--dim); width: 38px; flex: none; font-variant-numeric: tabular-nums; }
.pl-n { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pl-n b { font: 500 14px/1.2 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-n i { font: italic 300 12.5px/1.2 var(--serif); color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-c { min-width: 26px; text-align: center; font: 600 11px/20px var(--sans); border-radius: 10px; background: rgba(246, 237, 220, .12); height: 20px; padding: 0 6px; flex: none; }
.pl-c:empty { display: none; }

/* ---------- about ---------- */
.about { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: rgba(3, 5, 9, .7); backdrop-filter: blur(6px); }
.ab-card { position: relative; width: min(560px, 100%); max-height: 86dvh; overflow-y: auto; padding: 26px 26px 22px; border-radius: 20px; background: var(--ink-2); border: 1px solid var(--line-2); }
.ab-card h2 { font: 400 1.7rem/1.1 var(--serif); margin: 0 0 12px; }
.ab-card h3 { font: 600 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--amber); margin: 22px 0 8px; }
.ab-p { font: 300 15px/1.55 var(--serif); margin: 0 0 6px; } .ab-p.dim { color: var(--dim); }
.ab-list { margin: 0; padding-left: 18px; font: 400 13px/1.55 var(--sans); color: rgba(246, 237, 220, .82); }
.ab-list li { margin-bottom: 6px; }
.ab-list a { color: inherit; text-decoration: underline; text-decoration-color: rgba(232, 180, 106, .6); }
.ab-close { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.ab-close svg { width: 20px; height: 20px; }

/* ---------- vehicle & markers ---------- */
.vehicle { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink); background: var(--c, #fff); border-radius: 50%; box-shadow: 0 0 0 5px rgba(255, 255, 255, .22), 0 6px 22px rgba(0, 0, 0, .6); }
.vehicle svg { width: 22px; height: 22px; }
.vehicle.flight { background: none; box-shadow: none; width: 46px; height: 46px; color: #fff; filter: drop-shadow(0 0 8px rgba(255, 226, 168, .9)) drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.vehicle.flight svg { width: 100%; height: 100%; }
.pm { width: 52px; height: 52px; border-radius: 14px; border: 2.5px solid var(--cream); background: #1b2433 center / cover; box-shadow: 0 6px 18px rgba(0, 0, 0, .55); position: relative; animation: pin .6s cubic-bezier(.3, 1.5, .5, 1) both; transition: transform .2s; display: grid; place-items: center; }
.pm:hover { transform: scale(1.12); z-index: 3; }
.pm b { position: absolute; right: -9px; top: -9px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--amber); color: var(--ink); font: 700 12px/22px var(--sans); text-align: center; }
.pm .pv { width: 20px; height: 20px; color: var(--cream); display: block; }
.pm .pv svg { width: 100%; height: 100%; }
@keyframes pin { from { transform: scale(.2); opacity: 0; } }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(3, 5, 9, .94); display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: 56px 1fr 56px; animation: fade .3s; touch-action: none; }
.lightbox[hidden] { display: none; }
.lb-top { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: calc(12px + var(--safe-t)) 16px 8px; font: 500 12px var(--sans); letter-spacing: .14em; color: var(--dim); }
.lb-close { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.lb-close svg { width: 20px; height: 20px; }
.lb-stage { grid-column: 2; grid-row: 2; position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; }
/* the whole picture or video is always shown, never cropped: it fills the stage box and is fitted inside it (a tall photo gets bars at the sides) */
.lb-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: center / contain no-repeat; transition: transform .2s; animation: fade .35s; }
.lb-media.from-r { animation: inr .3s; } .lb-media.from-l { animation: inl .3s; }
.lb-nav { grid-row: 2; width: 44px; height: 44px; align-self: center; justify-self: center; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { grid-column: 1; } .lb-next { grid-column: 3; }
.lightbox.single .lb-nav { visibility: hidden; }
.lb-cap { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; justify-content: center; padding: 12px 16px calc(18px + var(--safe-b)); font-size: 13px; color: var(--dim); }
.lb-cap b { font: 400 20px var(--serif); color: var(--cream); } .lb-cap em { font: italic 300 15px var(--serif); } .lb-cap span { letter-spacing: .06em; color: var(--amber); }
@keyframes fade { from { opacity: 0; } } @keyframes inr { from { opacity: 0; transform: translateX(40px); } } @keyframes inl { from { opacity: 0; transform: translateX(-40px); } }
.lb-media { -webkit-user-drag: none; user-select: none; }

.cz-markers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cz-markers .pm { pointer-events: auto; }
body.engine-cesium .cesium-viewer-bottom { display: none; }


/* ---------- mid-size ---------- */
@media (max-width: 900px) and (min-width: 641px) { :root { --gp-w: 300px; --pl-w: 280px; } }

/* ---------- phones: thumb-friendly bottom sheet ---------- */
@media (max-width: 640px) {
  :root { --gp-w: 100vw; --pl-w: 100vw; }
  .chip { max-width: calc(100vw - 200px); margin-left: 38px; font-size: 11.5px; padding: 8px 12px 8px 10px; }
  .chip .l-long, .chip em { display: none; } .chip .l-short { display: inline; }
  .gpanel.compact { height: auto; bottom: var(--dock-h); }
  .leg-pill { top: calc(50px + var(--safe-t)); padding: 6px 14px 6px 10px; }
  .leg-pill em { font-size: 14px; }
  .tabs-lbl { display: none; }
  .tabs { justify-content: center; gap: 6px; }
  .tab { min-height: 44px; padding: 0 9px; }
  .tabs { gap: 4px; }
  .tab span { display: none; }
  .tab.here, .tab.open { padding: 0 9px; } .tab.here span, .tab.open span { display: none; }
  .tab.here { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber) inset; }
  @media (min-width: 400px) { .tab.here, .tab.open { padding: 0 12px 0 10px; } .tab.here span, .tab.open span { display: inline; } }
  .controls { gap: 8px; }
  .ctl.txt { min-width: 64px; padding: 0 11px; }
  .timeleft { display: none; }
  .gpanel { left: 0; right: 0; top: auto; bottom: var(--dock-h); width: auto; height: 40dvh; border-radius: 22px 22px 0 0; border-bottom: 0; animation: sheetIn .35s cubic-bezier(.2, .7, .2, 1); }
  @keyframes sheetIn { from { transform: translateY(30px); opacity: 0; } }
  .gp-head { padding: 12px 10px 6px 14px; }
  .gp-title { font-size: 1.3rem; margin: 4px 0 2px; }
  .gp-min svg { transform: none; }
  .gp-blurb { display: none; }
  .gp-grid { grid-template-columns: repeat(4, 1fr); padding: 0 10px 8px; }
  .gtab { right: 10px; bottom: calc(var(--dock-h) + 8px); }
  .places { left: 0; right: 0; top: auto; bottom: var(--dock-h); width: auto; max-height: 58dvh; border-radius: 22px 22px 0 0; border-bottom: 0; transform: translateY(24px); }
  body.pl-open .gpanel, body.pl-open .gtab { display: none; }
  .maplibregl-ctrl-bottom-right, body.started .maplibregl-ctrl-bottom-right { top: calc(10px + var(--safe-t)); bottom: auto !important; left: 10px; right: auto; }
  .toast { top: calc(146px + var(--safe-t)); }
  .lightbox { grid-template-columns: 0 1fr 0; }
  .lb-nav { position: absolute; z-index: 2; bottom: 80px; } .lb-prev { left: 12px; } .lb-next { right: 12px; }
  .outro { bottom: calc(var(--dock-h) + 8px); padding-top: calc(60px + var(--safe-t)); }
  .lm-card { bottom: auto; top: calc(150px + var(--safe-t)); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .gpanel { top: calc(54px + var(--safe-t)); }
}
/* a phone held sideways: the pictures panel sits on the right, so the journey label keeps to the left of it */
@media (max-height: 520px) and (orientation: landscape) and (min-width: 641px) {
  .leg-pill { left: calc(190px + (100vw - var(--gp-w) - 204px) / 2); max-width: calc(100vw - var(--gp-w) - 220px); }
  .leg-pill b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .leg-pill > span:last-child { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


