:root {
  --bg: #030405;
  --fg: #eef3ef;
  --muted: rgba(225, 236, 230, .6);
  --faint: rgba(225, 236, 230, .34);
  --line: rgba(255, 255, 255, .09);
  --mint: #6fffd2;
  --aqua: #7fe8ff;
  --flap: #f2e6c4;          /* warm split-flap letters */
  --paper: #ece6d6;         /* boarding pass stock */
  --ink: #15181a;
  --stamp: #c8432f;
  --panel: 380px;
  /* Same families as the portfolio (SF Pro Display / SF Pro Mono). Only the split-flap board keeps its own face. */
  --sans: "SF Pro Display", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --display: var(--sans);
  --mono: "SF Pro Mono", "SFMono-Regular", ui-monospace, Menlo, Monaco, monospace;
  --flapfont: "Martian Mono", "SFMono-Regular", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(55% 60% at calc((100% - var(--panel)) / 2) 52%, #06100e 0%, var(--bg) 70%);
  color: var(--fg); font-family: var(--sans); -webkit-font-smoothing: antialiased;
  overflow: hidden; overscroll-behavior: none;
}
.sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .8; }

/* ---------- Top left: way back + title ---------- */
.top { position: fixed; top: 0; left: 0; z-index: 30; padding: clamp(18px, 3vw, 36px) clamp(18px, 3.2vw, 44px) 0; pointer-events: none;
  transition: opacity .4s ease, transform .5s var(--ease); }
.top > * { pointer-events: auto; }
.back { position: fixed; z-index: 35; top: clamp(18px, 3vw, 36px); right: clamp(18px, 2.6vw, 36px); transition: opacity .4s ease, color .2s, border-color .2s;
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); background: rgba(255,255,255,.03); backdrop-filter: blur(10px); transition: color .2s, border-color .2s; }
.back:hover { color: var(--fg); border-color: rgba(111,255,210,.4); }
.brand { margin-top: 0; }
body.in-gallery .back { opacity: 0; pointer-events: none; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
/* Travel Diary mark (same as the Playground card), sized to the eyebrow. */
.eyebrow .mark { width: 26px; height: 18px; flex: none; margin-left: -3px; }
.live { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
h1 { margin: 0; font: 600 clamp(30px, 2.6vw, 40px)/1.1 var(--display); letter-spacing: -.025em; }
h1 span { color: var(--mint); text-shadow: 0 0 28px rgba(111,255,210,.35); }

/* ---------- Globe stage (centred in the space left of the panel) ---------- */
.stage { position: fixed; left: calc((100vw - var(--panel)) / 2); top: 57%; transform: translate(-50%, -50%); }
.globe, .beams, .pins { position: absolute; inset: 0; }
.globe { display: block; cursor: grab; touch-action: none; }
.beams { pointer-events: none; overflow: visible; }
.pins { pointer-events: none; }

.beam { stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(111,255,210,.7)); }
.beam-pulse { stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 5 120; animation: pulse-up 2.2s linear infinite; filter: drop-shadow(0 0 3px var(--mint)); }
@keyframes pulse-up { from { stroke-dashoffset: 5; } to { stroke-dashoffset: -110; } }
.foot { fill: #d9fff4; filter: drop-shadow(0 0 4px var(--mint)) drop-shadow(0 0 8px rgba(111,255,210,.6)); }
.foot-ring { fill: none; stroke: var(--mint); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: ring 2.6s ease-out infinite; }
@keyframes ring { 0% { transform: scale(.3); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; }
.pin:focus-visible { outline: none; }
/* A steady invisible hover zone, so moving photos never drop the hover. */
.pin::before { content: ""; position: absolute; left: -64px; top: -46px; width: 128px; height: 92px; border-radius: 50%; }
.orbit { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.core { position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%; z-index: 15;
  background: radial-gradient(circle, #fff 0 35%, var(--mint) 60%, transparent 72%); box-shadow: 0 0 14px 3px rgba(111,255,210,.55); }
.core::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid rgba(127,232,255,.35); animation: ring 3s ease-out infinite; }
.moon { position: absolute; left: -15px; top: -19px; width: 30px; height: 38px; padding: 1.5px; border-radius: 7px; corner-shape: squircle;
  background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(255,255,255,.12) 40%, rgba(255,255,255,.05) 62%, rgba(255,255,255,.45));
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.6), 0 6px 16px -4px rgba(0,0,0,.8), 0 0 18px -6px rgba(111,255,210,.5);
  will-change: transform, opacity; transition: box-shadow .3s; }
.moon img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 5.5px; corner-shape: squircle; user-select: none; -webkit-user-drag: none; }
.moon::after { content: ""; position: absolute; inset: 1.5px; border-radius: 5.5px; pointer-events: none; background: linear-gradient(155deg, rgba(255,255,255,.4), rgba(255,255,255,0) 40%); }
.pin.is-hot .moon { box-shadow: inset 0 0 0 .5px rgba(255,255,255,.8), 0 6px 16px -4px rgba(0,0,0,.8), 0 0 22px -4px rgba(111,255,210,.85); }

/* ---------- Boarding pass: paper stock, perforated stub, barcode, ink stamp on hover ---------- */
.ticket { position: absolute; top: var(--dy, 0px); left: 62px; display: flex; color: var(--ink); text-align: left; white-space: nowrap;
  transform: translateY(-50%) rotate(var(--tilt, -1.5deg)); transform-origin: left center; transition: transform .45s var(--ease);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)) drop-shadow(0 0 0.5px rgba(0,0,0,.6)); }
.pin.left .ticket { left: auto; right: 62px; transform-origin: right center; --tilt: 1.5deg; }
.tk-main, .tk-stub { position: relative; background:
  radial-gradient(120% 90% at 0 0, rgba(255,255,255,.55), transparent 55%),
  repeating-linear-gradient(0deg, rgba(0,0,0,.018) 0 1px, transparent 1px 3px), var(--paper); }
.tk-main { padding: 9px 12px 9px 13px; border-radius: 6px 0 0 6px;
  -webkit-mask: radial-gradient(circle 5px at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 5px at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 5px at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 5px at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
.tk-stub { width: 42px; padding: 8px 7px; border-radius: 0 6px 6px 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 5px;
  border-left: 1.5px dotted rgba(21,24,26,.35);
  -webkit-mask: radial-gradient(circle 5px at 0 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 5px at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 5px at 0 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 5px at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat; }
.tk-top { display: flex; justify-content: space-between; gap: 18px; font: 600 7.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(21,24,26,.55); }
.tk-route { display: flex; align-items: center; gap: 8px; margin: 6px 0 6px; }
.tk-ap b { display: block; font: 700 24px/.9 var(--display); letter-spacing: -.02em; }
.tk-ap small { display: block; margin-top: 4px; font: 500 9px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: rgba(21,24,26,.6); }
.tk-path { position: relative; width: 42px; height: 12px; align-self: flex-start; margin-top: 7px; }
.tk-path::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px dashed rgba(21,24,26,.4); }
.tk-path svg { position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; transform: translate(-50%, -50%) rotate(90deg); fill: var(--ink); background: var(--paper); padding: 0 1px; }
.tk-fields { display: flex; gap: 12px; padding-top: 6px; border-top: 1px solid rgba(21,24,26,.14); }
.tk-fields span { display: flex; flex-direction: column; gap: 3px; font: 600 10px/1 var(--mono); }
.tk-fields small { font: 600 6.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(21,24,26,.5); }
.tk-bar { width: 100%; height: 38px; display: block; }
.tk-code { font: 700 11px/1 var(--display); letter-spacing: .04em; writing-mode: vertical-rl; transform: rotate(180deg); }
.tk-stamp { position: absolute; right: 28px; top: 50%; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--stamp); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--stamp);
  font: 700 10px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--stamp); mix-blend-mode: multiply; pointer-events: none;
  opacity: 0; transform: translateY(-50%) rotate(-18deg) scale(1.8); transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.pin.is-hot .ticket, .pin:focus-visible .ticket { transform: translateY(-50%) rotate(0deg) scale(1.05); }
.pin.is-hot .tk-stamp, .pin:focus-visible .tk-stamp { opacity: .85; transform: translateY(-50%) rotate(-14deg) scale(1); }

/* Resting state: a compact pass (destination + stub). Hover unfolds the full boarding pass. */
.tk-top, .tk-fields, .tk-ap.from, .tk-path { overflow: hidden; transition: max-width .45s var(--ease), max-height .45s var(--ease), opacity .3s ease, margin .45s var(--ease), padding .45s var(--ease); }
.tk-top, .tk-fields { max-height: 30px; max-width: 280px; }
.tk-ap.from, .tk-path { max-width: 70px; }
.pin:not(.is-hot):not(:focus-visible) .tk-top, .pin:not(.is-hot):not(:focus-visible) .tk-fields { max-height: 0; max-width: 0; opacity: 0; padding-top: 0; border-top-width: 0; }
.pin:not(.is-hot):not(:focus-visible) .tk-ap.from, .pin:not(.is-hot):not(:focus-visible) .tk-path { max-width: 0; opacity: 0; margin: 0; }
.pin:not(.is-hot):not(:focus-visible) .tk-route { margin: 0; gap: 0; }
.pin:not(.is-hot):not(:focus-visible) .tk-ap b { font-size: 18px; }
.pin:not(.is-hot):not(:focus-visible) .tk-bar { height: 22px; }
.pin:not(.is-hot):not(:focus-visible) .tk-code { display: none; }
.tk-ap b { transition: font-size .35s var(--ease); }
.pin.is-hot { z-index: 999 !important; }

/* ---------- Right panel: trip log + departures board ---------- */
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: var(--panel); z-index: 25; display: flex; flex-direction: column; gap: 22px;
  padding: calc(clamp(18px, 3vw, 36px) + 54px) clamp(18px, 2.6vw, 36px) clamp(18px, 3vh, 32px);
  background: linear-gradient(90deg, transparent, rgba(3,4,5,.55) 18%, rgba(3,4,5,.8));
  border-left: 1px solid var(--line); transition: opacity .4s ease, transform .5s var(--ease); }

.log { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.log-title { grid-column: 1 / -1; margin: 0 0 12px; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.log b { display: block; font: 600 30px/1 var(--display); letter-spacing: -.025em; color: var(--fg); font-variant-numeric: tabular-nums; }
.log span { display: block; margin-top: 6px; font: 600 9px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.log .origin { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 0; font: 600 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.log .origin i { width: 7px; height: 7px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 10px var(--aqua); flex: none; }
.log .origin b { display: inline; font: 600 14px/1 var(--display); letter-spacing: -.01em; text-transform: none; color: var(--fg); }

.board { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.board-head { margin-bottom: 22px; }
.board-title { margin: 0; font: 600 20px/1.2 var(--display); letter-spacing: -.02em; color: var(--fg); }
.board-from { color: inherit; }
.board-cols, .flight button { display: grid; grid-template-columns: 42px 1fr 44px 62px; gap: 6px; align-items: center; }
.board-cols { padding: 0 0 8px; font: 400 7.5px/1 var(--flapfont); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.flights { list-style: none; margin: 0 -8px; padding: 0 8px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.flight + .flight { margin-top: 4px; }
.flight button { width: calc(100% + 16px); margin-left: -8px; padding: 8px; border-radius: 8px; cursor: pointer; text-align: left; color: var(--flap);
  background: rgba(255,255,255,.025); border: 1px solid transparent; transition: background .2s, border-color .2s; }
.flight button:hover, .flight.on button, .flight button:focus-visible { background: rgba(111,255,210,.06); border-color: rgba(111,255,210,.25); outline: none; }
/* Split-flap cells */
.flaps { display: inline-flex; gap: 1.5px; }
.flap { position: relative; display: inline-grid; place-items: center; width: .74em; height: 1.28em; border-radius: 2px; overflow: hidden;
  background: linear-gradient(#15191a 0 50%, #0e1112 50% 100%); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.05);
  font: 600 13px/1 var(--flapfont); font-stretch: 87.5%; text-transform: uppercase; }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,.75); }
.flap.flip { animation: flip .09s linear; }
@keyframes flip { 0% { transform: scaleY(1); } 50% { transform: scaleY(.15); } 100% { transform: scaleY(1); } }
.f-dest .flap { font-size: 11px; }
.f-km { font: 500 10px/1 var(--flapfont); font-stretch: 87.5%; color: var(--muted); font-variant-numeric: tabular-nums; }
.f-status { font: 600 8px/1 var(--flapfont); letter-spacing: .06em; justify-self: end; text-transform: uppercase; color: var(--mint); display: inline-flex; align-items: center; gap: 6px; }
.f-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }

.hint { position: fixed; left: 0; width: calc(100vw - var(--panel)); bottom: 16px; margin: 0; text-align: center; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); pointer-events: none; transition: opacity .4s; }

body.in-gallery .top, body.in-gallery .hint { opacity: 0; pointer-events: none; }
body.in-gallery .top { transform: translateY(-10px); }
body.in-gallery .panel { opacity: 0; transform: translateX(24px); pointer-events: none; }
.pins, .beams { transition: opacity .35s ease; }
body.in-gallery .pins, body.in-gallery .beams { opacity: 0; }

/* ---------- Photo tornado ---------- */
.tornado { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 40; display: block; touch-action: none;
  /* Soft fade at the screen edges, so the wall seems to come out of the dark */
  -webkit-mask: linear-gradient(90deg, transparent 0, rgba(0,0,0,.35) 6%, #000 18%, #000 82%, rgba(0,0,0,.35) 94%, transparent 100%), linear-gradient(180deg, transparent 0, rgba(0,0,0,.35) 7%, #000 22%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent 0, rgba(0,0,0,.35) 6%, #000 18%, #000 82%, rgba(0,0,0,.35) 94%, transparent 100%), linear-gradient(180deg, transparent 0, rgba(0,0,0,.35) 7%, #000 22%, #000 90%, transparent 100%);
  mask-composite: intersect; }
.g-layer { position: fixed; inset: 0; z-index: 45; pointer-events: none; background: linear-gradient(180deg, rgba(3,4,5,.85), rgba(3,4,5,0) 22%); }
.g-layer > * { pointer-events: auto; }
/* Soft floor light under the globe, like the reference */
.g-layer::after { content: ""; position: absolute; left: 50%; top: 74%; width: 70vmin; height: 24vmin; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(70,170,255,.22), rgba(111,255,210,.08) 55%, transparent); pointer-events: none; z-index: -1; }
.g-head { position: absolute; left: 0; right: 0; top: clamp(22px, 4vh, 40px); text-align: center; pointer-events: none; animation: fade-down .6s .3s var(--ease) both; }
.g-route { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.g-route i { display: inline-block; width: 40px; border-top: 1px dashed var(--faint); }
.g-head h2 { margin: 0; font: 600 clamp(36px, 3.6vw, 52px)/1.05 var(--display); letter-spacing: -.025em; color: var(--fg); text-shadow: 0 2px 30px rgba(0,0,0,.8); }
.g-back { position: absolute; top: clamp(18px, 3vw, 36px); right: clamp(18px, 3.5vw, 48px); padding: 9px 15px; border-radius: 999px; cursor: pointer;
  font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg);
  background: rgba(3,4,5,.5); border: 1px solid var(--line); backdrop-filter: blur(10px); animation: fade-down .5s .4s var(--ease) both; }
.g-back:hover { border-color: rgba(111,255,210,.45); }
.g-hint { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); pointer-events: none; animation: fade-down .5s 1.2s var(--ease) both; }
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } }

/* Lightbox: the clicked screen grows into a big photo */
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lb-fig { margin: 0; padding: 6px; border-radius: 40px; overflow: hidden; transform-origin: center;
  background: linear-gradient(145deg, rgba(255,255,255,.45), rgba(255,255,255,.08) 40%, rgba(255,255,255,.04) 65%, rgba(255,255,255,.3));
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.5), 0 0 0 1px rgba(255,255,255,.22), 0 0 80px -20px rgba(255,255,255,.32), 0 40px 90px -30px rgba(0,0,0,.95); }
.lb-fig img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 34px; }
.lb-nav { position: fixed; top: 50%; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; cursor: pointer; font: 400 18px/1 var(--sans); color: var(--fg);
  background: rgba(3,4,5,.55); border: 1px solid var(--line); backdrop-filter: blur(10px); transition: border-color .2s, transform .2s; }
.lb-nav:hover { border-color: rgba(111,255,210,.5); transform: scale(1.06); }
.lb-prev { left: clamp(14px, 4vw, 56px); }
.lb-next { right: clamp(14px, 4vw, 56px); }
.lb-cap { position: fixed; left: 0; right: 0; bottom: clamp(16px, 4vh, 36px); margin: 0; text-align: center; font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lb-close { position: fixed; top: clamp(18px, 3vw, 36px); right: clamp(18px, 3.5vw, 48px); padding: 9px 15px; border-radius: 999px; cursor: pointer;
  font: 600 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg); background: rgba(3,4,5,.55); border: 1px solid var(--line); backdrop-filter: blur(10px); }

/* ---------- Small screens: panel becomes a bottom sheet; tickets shrink to name tags ---------- */
@media (max-width: 900px) {
  :root { --panel: 0px; --peek: 172px; --sheet: 74dvh; }
  html, body { height: 100dvh; }
  .top { padding-top: 18px; }
  .back { top: 14px; right: 14px; }
  .eyebrow { margin-bottom: 10px; }
  h1 { font-size: 28px; }
  /* Stage centre is set in app.js, between the title and the sheet. */
  .stage { left: 50%; top: 45%; }
  .hint { display: none; }

  /* Bottom sheet: peeks with the trip log and board title; tap or swipe up for every departure. */
  .panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: var(--sheet); gap: 12px;
    padding: 22px 18px calc(14px + env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0;
    background: rgba(6,8,9,.9); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 -18px 40px -20px rgba(0,0,0,.9);
    transform: translateY(calc(var(--sheet) - var(--peek))); transition: transform .5s var(--ease), opacity .4s ease; touch-action: none; }
  .panel::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: rgba(255,255,255,.22); }
  .panel.open { transform: none; }
  .panel:not(.open) .flights { pointer-events: none; }
  .flights { touch-action: pan-y; }
  body.in-gallery .panel { transform: translateY(100%); }
  .log { gap: 2px 10px; padding-bottom: 10px; cursor: pointer; }
  .log-title { margin-bottom: 8px; }
  .log b { font-size: 22px; }
  .log span { margin-top: 4px; font-size: 8px; }
  .log .origin { margin-top: 8px; }
  .board-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; cursor: pointer; }
  .board-head::after { content: ""; width: 8px; height: 8px; border: solid var(--muted); border-width: 1.5px 1.5px 0 0; transform: translateY(2px) rotate(-45deg); transition: transform .35s var(--ease); }
  .panel.open .board-head::after { transform: translateY(-2px) rotate(135deg); }
  .board-title { font-size: 17px; }

  /* Place tags shrink to a small code chip under each orbit. */
  .ticket, .pin.left .ticket { left: 0; right: auto; top: calc(24px + var(--dy, 0px)); transform: translateX(calc(-50% + var(--dx, 0px))); }
  .pin.is-hot .ticket { transform: translateX(calc(-50% + var(--dx, 0px))) scale(1.05); }
  .tk-stub, .tk-top, .tk-fields, .tk-stamp, .tk-ap:first-child, .tk-path, .tk-ap small { display: none; }
  .tk-main { padding: 3px 7px; border-radius: 5px; -webkit-mask: none; mask: none; }
  .tk-route { margin: 0; }
  .pin .tk-ap b, .pin:not(.is-hot):not(:focus-visible) .tk-ap b { font-size: 11px; letter-spacing: .04em; }
  .orbit { transform: scale(.62); }
  /* Photo view: the place name sits under the back button, not beside it. */
  .g-back { top: 12px; right: 12px; }
  .g-head { top: 58px; }
  .g-head h2 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .beam-pulse, .foot-ring, .core::after, .live, .flap.flip { animation: none; }
}

/* ---------- Motion pass: arrival, landing, launch ---------- */
/* Arrival: everything rises out of a soft blur, in reading order. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(8px); } }
.back { animation: rise .8s .15s var(--ease) backwards; }
.eyebrow { animation: rise .8s .3s var(--ease) backwards; }
h1 { animation: rise .9s .42s var(--ease) backwards; }
h1 span { display: inline-block; animation: rise .9s .62s var(--ease) backwards; }
.log { animation: rise .8s .55s var(--ease) backwards; }
.board-head, .board-cols { animation: rise .8s .7s var(--ease) backwards; }
.hint { animation: rise .8s 2.6s var(--ease) backwards; }

/* A pass lands only once its beam has grown out of the globe. */
.ticket { transition: transform .45s var(--ease), opacity .5s ease, translate .7s var(--ease), scale .7s var(--ease); }
.pin:not(.landed) .ticket { opacity: 0; translate: -14px 6px; scale: .86; }
.pin.left:not(.landed) .ticket { translate: 14px 6px; }

/* Launch: as the globe lands at the bottom, rings roll out from its rim, behind the photo rings. */
.ripple { position: fixed; z-index: 38; width: 0; height: 0; pointer-events: none; }
.ripple i { position: absolute; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55);
  box-shadow: 0 0 30px rgba(111,255,210,.35), inset 0 0 30px rgba(111,255,210,.18); }
.ripple i + i { border-color: rgba(111,255,210,.45); }

/* The place name settles in letter by letter; the route draws and a plane keeps flying it. */
.g-head h2 .ch { display: inline-block; animation: letter .8s calc(.4s + var(--i) * 45ms) var(--ease) both; }
@keyframes letter { from { opacity: 0; transform: translateY(.45em) rotate(4deg); filter: blur(10px); } }
.g-route i { position: relative; animation: draw .7s .45s var(--ease) both; }
.g-route i::after { content: ""; position: absolute; top: -3px; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px #fff, 0 0 14px var(--mint); animation: fly 2.6s 1.2s ease-in-out infinite both; }
@keyframes draw { from { width: 0; } }
@keyframes fly { 0% { left: 0; opacity: 0; } 15%, 85% { opacity: 1; } 100% { left: calc(100% - 5px); opacity: 0; } }

/* Photo viewer: controls arrive after the photo, the photo can be swiped. */
.lb-nav, .lb-cap, .lb-close { animation: rise .6s .35s var(--ease) backwards; }
.lb-fig { touch-action: pan-y; cursor: grab; }
.lb-fig.dragging { cursor: grabbing; }
.lb-fig img { transform-origin: 50% 60%; }

@media (prefers-reduced-motion: reduce) {
  .back, .eyebrow, h1, h1 span, .log, .board-head, .board-cols, .hint, .lb-nav, .lb-cap, .lb-close,
  .g-head h2 .ch, .g-route i, .g-route i::after { animation: none; }
  .pin:not(.landed) .ticket { opacity: 1; translate: none; scale: none; }
}
