:root {
  --paper: #f3eee3;
  --ink: #2b2b2b;
  --grey: #8c8a85;
  --chip: rgba(243, 238, 227, 0.88);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  /* Clears the dry-brush frame (2.5 percent of the short side plus its fray) with 14 px to spare, on every side. */
  --inset: calc(min(100vw, 100vh) * 0.045 + 14px);
  --iT: max(var(--inset), env(safe-area-inset-top));
  --iR: max(var(--inset), env(safe-area-inset-right));
  --iB: max(var(--inset), env(safe-area-inset-bottom));
  --iL: max(var(--inset), env(safe-area-inset-left));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #10141a; font-family: var(--font); color: var(--ink); -webkit-tap-highlight-color: transparent; }
body[data-style='painted'] { background: var(--paper); }
canvas#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
canvas#gl:active { cursor: grabbing; }

.brand { position: fixed; top: var(--iT); left: var(--iL); pointer-events: none; }
.wordmark { font-family: var(--cap-title-font, var(--font)); font-weight: 700; font-size: 13px; letter-spacing: 0.22em; color: #fff; text-shadow: 0 1px 6px rgba(20, 40, 80, 0.45); }
body[data-style='painted'] .wordmark, body[data-style='painted'] .sceneryName, body[data-style='painted'] .hintText { color: var(--ink); text-shadow: 0 0 5px var(--paper), 0 0 10px var(--paper), 0 0 14px var(--paper); }
.sceneryName { margin-top: 3px; font-size: 12px; color: #fff; opacity: 0.9; text-shadow: 0 1px 6px rgba(20, 40, 80, 0.45); }

.pills { position: fixed; top: calc(var(--iT) - 4px); right: var(--iR); display: flex; gap: 6px; }
.pill, .chip { font: 600 12px/1 var(--font); color: var(--ink); background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.12); border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.pill[aria-pressed='true'], .chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill:hover, .chip:hover { border-color: rgba(43, 43, 43, 0.4); }
.tools { position: fixed; top: calc(var(--iT) + 34px); right: var(--iR); display: flex; gap: 6px; z-index: 3; }
.menuWrap { position: relative; }
.menuWrap[hidden] { display: none; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 190px; background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.14); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; box-shadow: 0 6px 20px rgba(20, 30, 50, 0.22); }
.menu[hidden] { display: none; }
.menuItem { font: 500 13px/1.2 var(--font); text-align: left; color: var(--ink); background: none; border: 0; border-radius: 7px; padding: 7px 10px; cursor: pointer; white-space: nowrap; }
.menuItem:hover { background: rgba(43, 43, 43, 0.08); }
.menuItem[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.chip.round { width: 28px; height: 28px; padding: 0; font-family: var(--mono); font-weight: 400; }

.controls { position: fixed; right: var(--iR); bottom: calc(var(--iB) + 40px); display: flex; gap: 6px; align-items: center; }
.speeds { display: flex; gap: 4px; }
.speeds .chip { padding: 8px 10px; }

.hint { position: fixed; left: var(--iL); bottom: calc(var(--iB) + 40px); display: flex; align-items: center; gap: 10px; }
.hintText { font-size: 12px; color: #fff; text-shadow: 0 1px 6px rgba(20, 40, 80, 0.55); }

.credits { position: fixed; left: var(--iL); bottom: calc(var(--iB) + 86px); z-index: 6; max-width: min(420px, calc(100vw - 2 * var(--inset))); background: var(--chip); border-radius: 10px; padding: 12px 14px; font-size: 11px; line-height: 1.45; color: var(--ink); }
.credits p { margin: 0 0 6px; }
/* Style picker (desktop, play mode): a thumbnail button at the bottom right that opens a row of two cards upward. Motion is opacity and transform only. */
.stylePicker { position: fixed; right: var(--iR); bottom: var(--iB); z-index: 4; } /* on the bottom row; timeline.js keeps its show zone off it */
.stylePicker[hidden], body[data-mode='edit'] .stylePicker, body.shot .stylePicker { display: none; }
/* Speed boost (desktop, play mode): 1x / 2x / 5x on top of the chosen speed, left of the picker. */
.speedBoost { position: fixed; right: var(--iR); bottom: var(--iB); z-index: 4; display: flex; gap: 2px; padding: 3px; background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.14); border-radius: 999px; box-shadow: 0 2px 8px rgba(20, 30, 50, 0.22); }
.stylePicker:not([hidden]) ~ .speedBoost { right: calc(var(--iR) + 74px); bottom: calc(var(--iB) + 15px); } /* centred on the 64 px picker */
.speedBoost[hidden], body[data-mode='edit'] .speedBoost, body.shot .speedBoost { display: none; }
.sbBtn { min-width: 34px; padding: 6px 8px; font: 600 12px/1 var(--font); color: var(--ink); background: none; border: 0; border-radius: 999px; cursor: pointer; }
.sbBtn:hover { background: rgba(43, 43, 43, 0.08); }
.sbBtn[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.sbBtn:focus:not(:focus-visible) { outline: none; }
.sbBtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
/* Narrow windows: the speed control would sit on the caption card below 760 px, and the vertical timeline (body.tlv) owns the right edge. */
@media (max-width: 1000px) { .speedBoost { display: none; } } /* on the bottom row it would meet a long caption card */
body.tlv .stylePicker, body.tlv .speedBoost { display: none; }
/* Both hide while the route timeline shows or the aircraft picker is open (opacity only; hidden controls cannot take focus). */
.stylePicker, .speedBoost { transition: opacity 0.2s ease-out, visibility 0s linear 0s; }
body.tl-show .stylePicker, body.tl-show .speedBoost, body.srOpen .stylePicker, body.srOpen .speedBoost { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.2s ease-out, visibility 0s linear 0.2s; }
.spBtn { position: relative; display: block; width: 64px; height: 64px; padding: 0; overflow: hidden; border: 2px solid #fff; border-radius: 10px; background: #2b2b2b center / cover; box-shadow: 0 2px 8px rgba(20, 30, 50, 0.32); cursor: pointer; }
.spBtn:hover { border-color: var(--paper); }
.spBtn:focus:not(:focus-visible), .spItem:focus:not(:focus-visible) { outline: none; }
.spBtnLabel { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0 3px; font: 600 10px/1.1 var(--font); color: #fff; text-align: center; background: rgba(16, 20, 26, 0.6); }
.spMenu { position: absolute; right: 0; bottom: calc(100% + 8px); display: flex; gap: 6px; padding: 6px; background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.14); border-radius: 12px; box-shadow: 0 6px 20px rgba(20, 30, 50, 0.22); opacity: 0; transform: translateY(6px); visibility: hidden; pointer-events: none; transition: opacity 0.15s ease-out, transform 0.15s ease-out, visibility 0s linear 0.15s; }
.stylePicker.open .spMenu { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.spItem { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; padding: 3px 3px 5px; font: 600 11px/1.2 var(--font); color: var(--ink); background: none; border: 2px solid transparent; border-radius: 9px; cursor: pointer; }
.spItem:hover { background: rgba(43, 43, 43, 0.08); }
.spItem[aria-checked='true'] { border-color: #2f7fd1; }
.spThumb { display: block; width: 72px; height: 72px; border-radius: 6px; background: #2b2b2b center / cover; }
.spBtn[data-style='painted'], .spThumb[data-style='painted'] { background-image: url(data:image/jpeg;base64,/9j/2wBDAAYGBgYHBgcICAcKCwoLCg8ODAwODxYQERAREBYiFRkVFRkVIh4kHhweJB42KiYmKjY+NDI0PkxERExfWl98fKf/2wBDAQYGBgYHBgcICAcKCwoLCg8ODAwODxYQERAREBYiFRkVFRkVIh4kHhweJB42KiYmKjY+NDI0PkxERExfWl98fKf/wgARCACQAJADASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAABAUBAwYCBwD/xAAaAQACAwEBAAAAAAAAAAAAAAADBAECBQAG/9oADAMBAAIQAxAAAABpVyrb86QuaYOon3C6jLOXcvtBNpFHFesN1TYbzEdpyttCMKZfGObRYi559ygW+q8JqspXZktEcdcrz9ERPWXCG9O/1GbdZ3pSACZIbjgYnRXuKUpc3vLO5M0fOBOqrBWF+tbVtnyTCo4Vkupi+i2XkRRmPaxEDouswXgJUqvxrmBZ8Pfo9XHn6AH2OqcyniCLzLDQrWybmpVNrwiiWY1rXB7ntNSqx7SyVuqytdOYNuMulxysD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GotxiTXEXah2Bzl2TfOI7qjAdHsYFBs3VYIJXR5KsKaOEenWRsVAtyFP8AiReaX3M1xqbFWSBW0+pz/9k=); }
.spBtn[data-style='realistic'], .spThumb[data-style='realistic'] { background-image: url(data:image/jpeg;base64,/9j/2wBDAAYGBgYHBgcICAcKCwoLCg8ODAwODxYQERAREBYiFRkVFRkVIh4kHhweJB42KiYmKjY+NDI0PkxERExfWl98fKf/2wBDAQYGBgYHBgcICAcKCwoLCg8ODAwODxYQERAREBYiFRkVFRkVIh4kHhweJB42KiYmKjY+NDI0PkxERExfWl98fKf/wgARCACQAJADASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAwQBAgUABv/EABgBAQEBAQEAAAAAAAAAAAAAAAECAAME/9oADAMBAAIQAxAAAADxmKRafLHRZmazeOkXiZ1iUPsE+1OoQ9bPLvpomuuEUU7xtad18tq20+dIT6BOXOIYGOvR921WCbuWVWFznosscbIk8vYLTw70maaaJF6k9Uc7SyCWm3sMre7QE30cXTDMvSM+rwno8vTnz2vfKV5UtAKi6aBRle7rXoWqM0n1WWcjXBJmqGxj8CIH1e0mT1szJms4uGihM3ewDFHkF76GzNBLTRmlZySknngDWyWNrHDWnSSYqOmjQRjUKHVwpO4opGpQjLM4c2HXO3UWTUdwCa/SZ2W9tdpMhmFHA5njKzL12Mt6qXZsyBB1QlPtDRzWRil0Qkoyo0iRxlWOdns8QnRldvdFRlEYrPUCy1JysG/MTrZDurK7Qfd5+m8R2CaE2dDSxnJp+hXTp//EACgQAAMAAgICAgICAQUAAAAAAAECAxESAAQTISIxBTIUI0EQFTNDYv/aAAgBAQABDADs99x40HoPR3LEnH+ijbmFUjPvgT57MTw7bBj6GcZwOYHrH3j19cJ51qVnUELnncakzN1UBUF7lcqhHR6l5LbfC8OW0ZKeq7Th83D8h2FwU1batG+tjwnhySoHAVKn3wAZJyMqwyc/edh6GeD/ABg8yv8Ajk5Groqgnk/x0XkJvkuYaiYLksoM2bIJNuvpbMSwPUv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ahjvGOW5qd5FTJahlacVP71Mt0Sj1K0bly6x/pK3GY432x8K+SrCY0RVU+RD7DeDBsY6aph0vGN1DG35E3KmKF3e/kMbtJ//2Q==); }
@media (prefers-reduced-motion: reduce) { .spMenu { transition: none; } }
/* Controls stay out of sight until the painted reveal is over (body.revealing, src/main.js), then fade in (body.revealIn). Layout is unchanged. */
body.revealing .opBrandWrap, body.revealing .aircraftBtn, body.revealing .timeline, body.revealing .caption, body.revealing .copyright, body.revealing .byline,
body.revealing .stylePicker, body.revealing .speedBoost, body.revealing .loadPill { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes uiIn { from { opacity: 0; } }
body.revealIn .opBrandWrap, body.revealIn .aircraftBtn, body.revealIn .timeline, body.revealIn .caption, body.revealIn .copyright, body.revealIn .byline,
body.revealIn .stylePicker, body.revealIn .speedBoost, body.revealIn .loadPill { animation: uiIn 0.3s ease-out; }
@media (prefers-reduced-motion: reduce) { body.revealIn .opBrandWrap, body.revealIn .aircraftBtn, body.revealIn .timeline, body.revealIn .caption, body.revealIn .copyright, body.revealIn .byline, body.revealIn .stylePicker, body.revealIn .speedBoost, body.revealIn .loadPill { animation: none; } }
.credits a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.credits p:last-child { margin: 0; }

.caption { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: var(--iB); width: var(--capW, 260px); max-width: calc(100vw - 2 * var(--inset)); transform: translateY(0); transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.2s ease-out; text-align: center; padding: 9px 0 8px; pointer-events: none; font-variant-numeric: tabular-nums; }
/* The card's background is its own layer: only its width animates, the text above it is never scaled or reflowed. */
.capBg { position: absolute; left: 50%; top: 0; bottom: 0; width: var(--capW, 260px); max-width: calc(100vw - 2 * var(--inset)); transform: translateX(-50%); background: rgba(243, 238, 227, 0.82); border-radius: 10px; transition: width 0.26s cubic-bezier(0.2, 0, 0, 1); }
.capText { position: relative; transition: opacity 0.15s ease-out; }
/* Four rows that always take their height, even when a line is empty. */
.capTitle { font-family: var(--cap-title-font, var(--font)); font-weight: 700; font-size: 14px; line-height: 18px; min-height: 18px; color: var(--ink); white-space: nowrap; }
.capLocal { font: 600 13px/17px var(--cap-local-font, 'Annapurna SIL', 'Mukta', sans-serif); min-height: 17px; color: var(--ink); opacity: 0.85; white-space: nowrap; }
.capSub { font-family: var(--cap-sub-font, var(--font)); font-size: 11.5px; line-height: 15px; min-height: 15px; color: var(--grey); white-space: nowrap; }
.capMono { margin-top: 3px; font: 400 9.5px/12px var(--mono); min-height: 12px; color: var(--capMono, #5e5b55); letter-spacing: 0.02em; white-space: pre; font-variant-numeric: tabular-nums; }
.caption.dim { opacity: 0.2; }
.caption.fading .capText { opacity: 0; }
.caption.noanim .capBg, .caption.noanim .capText { transition: none; }
.capMeasure { left: -9999px; bottom: auto; top: 0; width: max-content; max-width: none; visibility: hidden; transform: none; transition: none; }
.capMeasure .capBg { display: none; }
@media (prefers-reduced-motion: reduce) { .capBg, .capText { transition: none; } }

.stats { position: fixed; top: calc(var(--iT) + 44px); left: var(--iL); font: 400 11px/1.4 var(--mono); color: #fff; background: rgba(0, 0, 0, 0.55); padding: 6px 9px; border-radius: 6px; white-space: pre; pointer-events: none; }

.loading { position: fixed; inset: 0; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; z-index: 10; transition: opacity 0.25s ease-out; }
/* The card is fully opaque: nothing of the world shows through. It lifts when the painterly reveal begins. */
.loading.soft { pointer-events: none; }
.loading.done { opacity: 0; pointer-events: none; }
body.shot .loading { transition: none; }
.loadWord { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 700; font-size: 15px; letter-spacing: 0.3em; }
.loadWord span { margin-right: -0.3em; } /* drop the trailing letter space so the lockup centres on what you see */
.loadLogo { width: 34px; height: 34px; flex: none; animation: ulFloat 3.2s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
/* The plane idles on the loading card: a slow 2 px rise and fall. */
@keyframes ulFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .loadLogo { animation: none; } }
.loadBar { --ld-track: color-mix(in srgb, var(--ink) 12%, var(--paper)); --bar-w: min(320px, 70vw); width: var(--bar-w); height: 20px; border-radius: 999px; background: var(--ld-track); overflow: hidden; }
/* A flat strip of colour swatches (the scenery's own palette, set from JS as --ld-strip) under a growing clip:
   the strip is as wide as the whole bar, so progress uncovers it left to right and a swatch shows partly while it fills. */
.loadCanvas { display: none; width: var(--bar-w); height: 100%; }
.loadFill.clips { background: none; }
.loadFill.clips .loadCanvas { display: block; }
.loadFill { position: relative; overflow: hidden; height: 100%; width: 100%; background: var(--ld-strip, none) 0 0 / var(--bar-w) 100% no-repeat; }
/* Progress is a cover in the track colour that shrinks from the right: transform only, on its own layer, so the glide
   (--p is the target, the transition bridges the gaps between updates) keeps running while the main thread is busy. */
.loadFill::after { content: ''; position: absolute; inset: 0; background: var(--ld-track); transform-origin: 100% 50%; transform: scaleX(calc(1 - var(--p, 0))); will-change: transform; transition: transform 0.45s linear; pointer-events: none; }
.loadRow { display: flex; align-items: baseline; gap: 10px; }
.loadPct { font: 500 11px/1 var(--mono); color: var(--ink); opacity: 0.7; min-width: 3ch; text-align: right; }
@media (prefers-reduced-motion: reduce) { .loadFill::after { transition: none; } .loading { transition-duration: 0.3s; } }
.loadMsg { font: 400 11px/1 var(--mono); color: var(--grey); }
.loadMsg.error { color: #b23a3a; }

/* Edit mode: the default view is a clean player. ?mode=edit shows every control. */
body[data-mode='play'] .edit-only { display: none !important; }
body[data-mode='edit'] .play-only { display: none !important; }
.copyright { position: fixed; left: var(--iL); bottom: var(--iB); z-index: 3; width: 20px; height: 20px; padding: 0; font: 500 11px/20px var(--font); text-align: center; color: var(--ink); background: var(--chip); border: 0; border-radius: 50%; opacity: 0.55; cursor: pointer; }
.copyright:hover { opacity: 1; }
/* The maker's byline: a faded pill just above the credits button and clear of the timeline bar, linking to the portfolio. Desktop only, out of shots and videos. */
.byline { position: fixed; left: var(--iL); bottom: calc(var(--iB) + 38px); z-index: 3; height: 20px; padding: 0 9px; font: 500 11px/20px var(--font); letter-spacing: 0.02em; color: var(--ink); text-decoration: none; white-space: nowrap; background: var(--chip); border-radius: 999px; opacity: 0.45; transition: opacity 0.2s ease-out; }
.byline:hover, .byline:focus-visible { opacity: 1; }
@media (max-width: 900px) { .byline { display: none; } }
body.shot .byline { display: none; }
/* Language switch (EN | FR, two links to / and /fr/): a small chip left of the aircraft button at the top right, clear of the brand card on the left (390 px wide: 85 px of gap). */
.langSwitch { position: fixed; top: calc(var(--iT) + 6px); right: calc(var(--iR) + 44px); z-index: 3; display: flex; gap: 1px; padding: 2px; font: 500 11px/20px var(--font); letter-spacing: 0.04em; background: var(--chip); border-radius: 999px; }
.langSwitch a { display: block; min-width: 26px; padding: 0 7px; text-align: center; color: var(--ink); text-decoration: none; border-radius: 999px; opacity: 0.5; transition: opacity 0.2s ease-out; }
.langSwitch a:hover, .langSwitch a:focus-visible { opacity: 1; }
.langSwitch a[aria-current='page'] { opacity: 1; font-weight: 700; background: rgba(43, 43, 43, 0.1); }
.langSwitch a:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
@media (pointer: coarse) { .langSwitch { right: calc(var(--iR) + 52px); } .langSwitch a { line-height: 28px; min-width: 34px; } }
body[data-mode='edit'] .langSwitch, body.shot .langSwitch, body.video .langSwitch, body.revealing .langSwitch { display: none; }

/* Route timeline (src/timeline.js): the closed loop from arc 0 to L, a thumb at the current position, a marker per waypoint. */
:root { --tl-bg: rgba(243, 238, 227, 0.78); --tl-track: rgba(43, 43, 43, 0.22); --tl-fill: #e4572e; --tl-thumb: #2b2b2b; --tl-thumb-ring: #f3eee3; --tl-mark: #2b2b2b; --tl-mark-ring: #f3eee3; --tl-tip-bg: #f3eee3; --tl-tip-ink: #2b2b2b; --tl-font: var(--font); --tl-radius: 999px; }
.timeline { position: fixed; left: var(--iL); right: var(--iR); bottom: var(--iB); height: 28px; z-index: 3; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.2s cubic-bezier(0.23, 1, 0.32, 1), transform 0.2s cubic-bezier(0.23, 1, 0.32, 1); background: var(--tl-bg); border-radius: var(--tl-radius); touch-action: none; cursor: pointer; outline: none; }
.timeline.show { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .timeline, .caption { transition: none; } .timeline { transform: none; } }
.timeline:focus-visible { box-shadow: 0 0 0 2px var(--tl-thumb); }
.tlTrack { position: absolute; left: 14px; right: 14px; top: 12px; height: 4px; background: var(--tl-track); border-radius: 2px; overflow: hidden; pointer-events: none; }
.tlFill { position: absolute; inset: 0; background: var(--tl-fill); transform-origin: 0 50%; transform: scaleX(0); will-change: transform; }
/* The current position is a tiny trike seen from above, pointing right, above the marker dots and a little above the track. */
.tlThumb { position: absolute; left: 14px; top: -7px; width: 26px; height: 18px; margin-left: -13px; z-index: 2; will-change: transform; pointer-events: none; }
/* A tiny sticker of the trike, side view, facing right: a white outline from stacked drop shadows, then a soft shadow. */
.tlThumb svg { display: block; width: 26px; height: 18px; overflow: visible; transform: rotate(var(--tilt, 0deg)); transform-origin: 50% 60%; filter: drop-shadow(1.5px 0 0 #fff) drop-shadow(-1.5px 0 0 #fff) drop-shadow(0 1.5px 0 #fff) drop-shadow(0 -1.5px 0 #fff) drop-shadow(0 2px 2.5px rgba(20, 30, 50, 0.35)); }
.tlProp { transform-box: fill-box; transform-origin: 50% 50%; }
.timeline.flying .tlThumb svg { animation: tlBob 1.6s ease-in-out infinite; }
.timeline.flying .tlProp { animation: tlSpin 0.12s linear infinite; }
@keyframes tlBob { 0%, 100% { translate: 0 -1px; } 50% { translate: 0 1px; } }
@keyframes tlSpin { 0% { transform: scaleY(1); } 50% { transform: scaleY(0.25); } 100% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .timeline.flying .tlThumb svg, .timeline.flying .tlProp { animation: none; } .tlThumb svg { transform: none; } }
.tlMarks { position: absolute; left: 14px; right: 14px; top: 0; bottom: 0; pointer-events: none; }
.tlMark { position: absolute; top: 8px; width: 12px; height: 12px; margin-left: -6px; padding: 0; border: 2px solid var(--tl-mark-ring); border-radius: 50%; background: var(--tl-mark); cursor: pointer; pointer-events: auto; box-sizing: border-box; }
.tlMark:hover, .tlMark:focus-visible { transform: scale(1.4); }
.tlTip { position: absolute; bottom: 36px; left: 0; z-index: 4; white-space: nowrap; font: 600 12px/1.2 var(--tl-font); color: var(--tl-tip-ink); background: var(--tl-tip-bg); padding: 6px 10px; border-radius: 8px; box-shadow: 0 4px 14px rgba(20, 30, 50, 0.25); pointer-events: none;
  opacity: 0; visibility: hidden; transform: translateX(var(--x, 0px)) translateY(6px) scale(0.96);
  transition: opacity 0.12s ease-in, transform 0.12s ease-in, visibility 0s linear 0.12s; }
.tlTip.on { opacity: 1; visibility: visible; transform: translateX(var(--x, 0px)) translateY(0) scale(1);
  transition: opacity 0.16s cubic-bezier(0.23, 1, 0.32, 1), transform 0.14s cubic-bezier(0.23, 1, 0.32, 1), visibility 0s; }
.tlMark { transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
@media (prefers-reduced-motion: reduce) { .tlTip, .tlTip.on, .tlMark { transition: none; } .tlTip { transform: translateX(var(--x, 0px)); } }
.tlTip { max-width: calc(100vw - 16px); }
.tlTip .tlBody { overflow: hidden; text-overflow: ellipsis; }
.tlTip .tlLocal { font-family: var(--cap-local-font, 'Annapurna SIL', 'Mukta', sans-serif); font-weight: 600; }
.tlTip .tlAlt { opacity: 0.7; font-weight: 500; }
canvas#gl { transition: opacity 0.125s; }
canvas#gl.cut { opacity: 0; }

/* Caption highlight (src/highlight.js). Colours and fonts come from variables so each style can theme it. */
:root { --hl: #ffffff; --hl-halo: rgba(20, 40, 80, 0.45); --hl-label-bg: rgba(243, 238, 227, 0.92); --hl-label-ink: #2b2b2b; --hl-label-sub: #6d6a64; --hl-font: var(--font); }
.hl { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; overflow: hidden; }
.hlRingUnused { fill: none; stroke: var(--hl); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hlRingHalo { fill: none; stroke: var(--hl-halo); stroke-width: 6; }
@keyframes hlDrop { 0% { transform: translateY(-8px); opacity: 0; } 55% { transform: translateY(1.5px); opacity: 1; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes hlRise { 0% { transform: translateY(6px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
.hlIn .hlDot, .hlIn .hlLeader { animation: hlDrop 0.34s cubic-bezier(0.23, 1, 0.32, 1) both; }
.hlIn .hlLabelIn { animation: hlRise 0.26s cubic-bezier(0.23, 1, 0.32, 1) 0.08s both; }
@media (prefers-reduced-motion: reduce) { .hlIn .hlDot, .hlIn .hlLeader, .hlIn .hlLabelIn { animation: none; } }
.hlLeader { stroke: var(--hl); stroke-width: 2; }
.hlDot { fill: var(--hl); stroke: var(--hl-halo); stroke-width: 2; }
.hlLabelBg { fill: var(--hl-label-bg); stroke: var(--hl-halo); stroke-width: 1; }
.hlTitle { font: 700 12.5px var(--hl-font); fill: var(--hl-label-ink); text-anchor: middle; }
.hlLocal { font: 500 12px var(--cap-local-font, 'Annapurna SIL', 'Mukta', sans-serif); fill: var(--hl-label-sub); text-anchor: middle; }
.hlArrowShape { fill: var(--hl); stroke: var(--hl-halo); stroke-width: 1.5; }
.hlArrowTitle { font: 700 11px var(--hl-font); fill: var(--hl); text-anchor: middle; paint-order: stroke; stroke: var(--hl-halo); stroke-width: 3px; }
body[data-style='painted'] { --hl: #fffdf6; --hl-halo: rgba(40, 70, 110, 0.55); }
body[data-style='ascii'] { --hl: #ffd400; --hl-halo: #0b0d10; --hl-label-bg: #0b0d10; --hl-label-ink: #eef2f6; --hl-label-sub: #9fb0c0; --hl-font: 'JetBrains Mono', monospace; }
body[data-style='retro'] { --hl: #feae34; --hl-halo: #181425; --hl-label-bg: #181425; --hl-label-ink: #fee761; --hl-label-sub: #c0cbdc; --hl-font: 'Departure Mono', monospace; }
body[data-style='brutalist'] { --hl: #ff3d8b; --hl-halo: #121212; --hl-label-bg: #ffd400; --hl-label-ink: #121212; --hl-label-sub: #3b3a37; --hl-font: 'Sporting Grotesque', sans-serif; }
body[data-style='semantic'] { --hl: #ffe14a; --hl-halo: rgba(0, 0, 0, 0.6); }

/* ---- Style themes. Each block sets variables first, then the few rules that variables cannot reach. */

/* ASCII: monospace, light on near-black. */
body[data-style='ascii'] {
  --paper: #0b0d10; --ink: #d7dde3; --grey: #8d98a3; --chip: rgba(14, 17, 21, 0.92);
  --font: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --capMono: #9fb0c0;
  background: #0b0d10;
}
body[data-style='ascii'] .pill, body[data-style='ascii'] .chip { border: 1px solid #3a424b; border-radius: 0; font-weight: 400; color: #d7dde3; }
body[data-style='ascii'] .pill[aria-pressed='true'], body[data-style='ascii'] .chip[aria-pressed='true'] { background: #d7dde3; color: #0b0d10; border-color: #d7dde3; }
body[data-style='ascii'] .chip.round { border-radius: 0; }
body[data-style='ascii'] .wordmark { font-weight: 400; color: #d7dde3; text-shadow: 0 0 6px #0b0d10; }
body[data-style='ascii'] .sceneryName, body[data-style='ascii'] .hintText { color: #b5c0ca; text-shadow: 0 0 6px #0b0d10; }
body[data-style='ascii'] .capBg, body[data-style='ascii'] .credits { background: rgba(11, 13, 16, 0.9); border: 1px solid #3a424b; border-radius: 0; }
body[data-style='ascii'] .capTitle { color: #eef2f6; font-weight: 700; }
body[data-style='ascii'] .capSub { color: #9aa6b2; }
body[data-style='ascii'] .loading { background: #0b0d10; }

body[data-style='ascii'] { --tl-bg: rgba(11, 13, 16, 0.9); --tl-track: #3a424b; --tl-fill: #e4572e; --tl-thumb: #ffd400; --tl-thumb-ring: #0b0d10; --tl-mark: #d7dde3; --tl-mark-ring: #0b0d10; --tl-tip-bg: #0b0d10; --tl-tip-ink: #eef2f6; --tl-font: 'JetBrains Mono', monospace; --tl-radius: 0; }
body[data-style='ascii'] .timeline, body[data-style='ascii'] .tlTip { border: 1px solid #3a424b; border-radius: 0; }
body[data-style='ascii'] .tlMark, body[data-style='ascii'] .tlTrack { border-radius: 0; }

/* Retro: Departure Mono, palette colours, square corners. Palette is Endesga 32. */
body[data-style='retro'] {
  --paper: #181425; --ink: #ffffff; --grey: #c0cbdc; --chip: #262b44;
  --font: 'Departure Mono', 'Courier New', monospace;
  --capMono: #8b9bb4;
  background: #181425;
}
body[data-style='retro'] .pill, body[data-style='retro'] .chip { font-family: 'Departure Mono', monospace; font-weight: 400; font-size: 11px; letter-spacing: 0.04em; border: 2px solid #ffffff; border-radius: 0; color: #ffffff; background: #262b44; box-shadow: 2px 2px 0 #181425; }
body[data-style='retro'] .pill[aria-pressed='true'], body[data-style='retro'] .chip[aria-pressed='true'] { background: #feae34; color: #181425; border-color: #181425; box-shadow: 2px 2px 0 #ffffff; }
body[data-style='retro'] .pill:hover, body[data-style='retro'] .chip:hover { border-color: #feae34; }
body[data-style='retro'] .chip.round { border-radius: 0; font-family: 'Departure Mono', monospace; }
body[data-style='retro'] .wordmark { font-family: 'Departure Mono', monospace; font-weight: 700; color: #ffffff; text-shadow: 2px 2px 0 #181425; }
body[data-style='retro'] .sceneryName, body[data-style='retro'] .hintText { font-family: 'Departure Mono', monospace; color: #ffffff; text-shadow: 1px 1px 0 #181425, -1px -1px 0 #181425, 1px -1px 0 #181425, -1px 1px 0 #181425; }
body[data-style='retro'] .capBg, body[data-style='retro'] .credits { background: #181425; border: 2px solid #ffffff; border-radius: 0; box-shadow: 3px 3px 0 #3a4466; }
body[data-style='retro'] .capTitle { font-family: 'Departure Mono', monospace; font-weight: 700; color: #fee761; font-size: 15px; }
body[data-style='retro'] .capSub { font-family: 'Departure Mono', monospace; color: #c0cbdc; font-size: 10px; }
body[data-style='retro'] .loading { background: #181425; color: #ffffff; }

body[data-style='retro'] { --tl-bg: #181425; --tl-track: #3a4466; --tl-fill: #feae34; --tl-thumb: #fee761; --tl-thumb-ring: #181425; --tl-mark: #ffffff; --tl-mark-ring: #181425; --tl-tip-bg: #181425; --tl-tip-ink: #fee761; --tl-font: 'Departure Mono', monospace; --tl-radius: 0; }
body[data-style='retro'] .timeline { border: 2px solid #ffffff; box-shadow: 3px 3px 0 #3a4466; }
body[data-style='retro'] .tlTip { border: 2px solid #ffffff; border-radius: 0; font-weight: 400; font-size: 10px; }
body[data-style='retro'] .tlMark, body[data-style='retro'] .tlTrack { border-radius: 0; }

/* Brutalist: Sporting Grotesque, uppercase, 2 px ink borders, 4 px hard shadows. */
body[data-style='brutalist'] {
  --paper: #f2efe8; --ink: #121212; --grey: #3b3a37; --chip: #f2efe8;
  --font: 'Sporting Grotesque', 'Inter', system-ui, sans-serif;
  --capMono: #3b3a37;
  background: #f2efe8;
}
body[data-style='brutalist'] .pill, body[data-style='brutalist'] .chip { font-family: 'Sporting Grotesque', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border: 2px solid #121212; border-radius: 0; color: #121212; background: #f2efe8; box-shadow: 4px 4px 0 #121212; }
body[data-style='brutalist'] .pill[aria-pressed='true'], body[data-style='brutalist'] .chip[aria-pressed='true'] { background: #ffd400; color: #121212; border-color: #121212; }
body[data-style='brutalist'] .pill:hover, body[data-style='brutalist'] .chip:hover { background: #ff6fae; border-color: #121212; }
body[data-style='brutalist'] .pill:active, body[data-style='brutalist'] .chip:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #121212; }
body[data-style='brutalist'] .chip.round { border-radius: 0; font-family: 'Sporting Grotesque', sans-serif; }
body[data-style='brutalist'] .wordmark { font-weight: 700; color: #121212; background: #f2efe8; border: 2px solid #121212; box-shadow: 4px 4px 0 #121212; padding: 4px 8px; display: inline-block; text-shadow: none; }
body[data-style='brutalist'] .sceneryName { margin-top: 10px; display: inline-block; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #121212; background: #ffd400; border: 2px solid #121212; padding: 2px 6px; text-shadow: none; }
body[data-style='brutalist'] .hintText { font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #121212; background: #f2efe8; border: 2px solid #121212; padding: 3px 6px; text-shadow: none; }
body[data-style='brutalist'] .capBg, body[data-style='brutalist'] .credits { background: #f2efe8; border: 2px solid #121212; border-radius: 0; box-shadow: 4px 4px 0 #121212; }
body[data-style='brutalist'] .capTitle { font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #121212; font-size: 15px; }
body[data-style='brutalist'] .capSub { text-transform: uppercase; letter-spacing: 0.04em; color: #3b3a37; font-weight: 500; font-size: 10.5px; }
body[data-style='brutalist'] .loading { background: #f2efe8; }

.joystick { position: fixed; left: var(--iL); bottom: calc(var(--iB) + 84px); z-index: 4; display: none; touch-action: none; }
@media (pointer: coarse) { body.flying .joystick { display: block; } }
.joyBase { width: 116px; height: 116px; border-radius: 50%; background: rgba(243, 238, 227, 0.35); border: 2px solid rgba(255, 255, 255, 0.7); touch-action: none; display: flex; align-items: center; justify-content: center; }
.joyKnob { width: 52px; height: 52px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 2px 8px rgba(20, 30, 50, 0.3); }
.loadPill { position: fixed; left: var(--iL); top: calc(var(--iT) + 38px); z-index: 5; font: 500 11px/1 var(--mono); color: var(--ink); background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.14); border-radius: 999px; padding: 6px 11px; pointer-events: none; }
.loadPill[hidden] { display: none; }
.loadPill.retry { pointer-events: auto; cursor: pointer; }
.reload { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; background: rgba(16, 20, 26, 0.72); color: #fff; font: 600 14px var(--font); letter-spacing: 0.08em; }
.reload[hidden] { display: none; }

body[data-style='brutalist'] { --tl-bg: #f2efe8; --tl-track: #bdb8ac; --tl-fill: #e4572e; --tl-thumb: #ffd400; --tl-thumb-ring: #121212; --tl-mark: #ff6fae; --tl-mark-ring: #121212; --tl-tip-bg: #ffd400; --tl-tip-ink: #121212; --tl-font: 'Sporting Grotesque', sans-serif; --tl-radius: 0; }
body[data-style='brutalist'] .timeline { border: 2px solid #121212; box-shadow: 4px 4px 0 #121212; }
body[data-style='brutalist'] .tlTip { border: 2px solid #121212; border-radius: 0; text-transform: uppercase; box-shadow: 3px 3px 0 #121212; }
body[data-style='brutalist'] .tlMark, body[data-style='brutalist'] .tlTrack { border-radius: 0; }

/* Compact menu (body.mmenu): style, time and speed chips collapse into one round button and a sheet. */
.menuBtn, .sheet { display: none; }
body.mmenu .menuBtn { display: flex; align-items: center; justify-content: center; position: fixed; top: var(--iT); right: var(--iR); z-index: 7; width: 36px; height: 36px; padding: 0; color: var(--ink); background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.14); border-radius: 50%; cursor: pointer; }
body.mmenu .sheet:not([hidden]) { display: block; position: fixed; top: calc(var(--iT) + 44px); right: var(--iR); z-index: 7; width: min(280px, calc(100vw - 2 * var(--inset))); max-height: 60vh; overflow: auto; background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.14); border-radius: 12px; padding: 10px 12px; box-shadow: 0 6px 20px rgba(20, 30, 50, 0.22); }
.sheetTitle { font: 600 10px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); opacity: 0.6; margin: 6px 0; }
.sheetRow { display: flex; flex-wrap: wrap; gap: 5px; }
body.mmenu .pills, body.mmenu .tools, body.mmenu .speeds { display: none; }
@media (max-width: 640px), (max-aspect-ratio: 1/1) {
  .joystick { bottom: calc(var(--iB) + 164px); }
  .tools { top: calc(var(--iT) + 72px); left: var(--iL); right: auto; }
  .menu { right: auto; left: 0; }
  .pills { left: var(--iL); right: var(--iR); top: calc(var(--iT) + 34px); flex-wrap: wrap; justify-content: flex-start; gap: 5px; }
  .pill { padding: 7px 10px; font-size: 11px; }
  .hintText { display: none; }
  .wordmark { font-size: 11px; }
  .sceneryName { font-size: 11px; }
  .controls { right: var(--iR); left: var(--iL); bottom: calc(var(--iB) + 112px); flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
  .chip { padding: 6px 9px; font-size: 11px; }
  .hint { left: var(--iL); bottom: calc(var(--iB) + 112px); }
  .credits { bottom: calc(var(--iB) + 86px); }
}

/* Fallback panel (src/fallback.js): shown instead of the 3D view when it cannot start. */
.fallback { position: fixed; inset: 0; z-index: 30; overflow: auto; background: var(--paper); color: var(--ink); display: flex; align-items: safe center; justify-content: center; padding: 20px; font-family: var(--font); }
.fbCard { max-width: 640px; width: 100%; text-align: center; }
.fbWord { font-weight: 700; font-size: 15px; letter-spacing: 0.22em; margin-bottom: 14px; }
.fbImg { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 6px 22px rgba(30, 30, 40, 0.22); }
.fbMsg { font-size: 15px; line-height: 1.45; margin: 16px 0 8px; }
.fbStops { font-size: 12px; line-height: 1.5; opacity: 0.7; margin: 0 0 14px; }
.fbBtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.reload { flex-direction: column; gap: 14px; }
.reload .chip { letter-spacing: 0; }
.toast { position: fixed; left: 50%; top: calc(var(--iT, 12px) + 8px); transform: translateX(-50%); z-index: 25; max-width: min(420px, 90vw); padding: 9px 16px; background: var(--chip); color: var(--ink); border-radius: 999px; font: 500 12px/1.3 var(--font); box-shadow: 0 6px 20px rgba(20, 30, 50, 0.22); text-align: center; }

/* Operator mode (?operator=...): the logo on a paper card in the wordmark slot, a credit line, a booking chip. */
body[data-operator] .wordmark, body[data-operator] .sceneryName { display: none; }
.opBrandWrap { position: fixed; top: var(--iT); left: var(--iL); z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: calc(100vw - var(--iL) - var(--iR) - 48px); }
.opBrand { display: block; padding: 7px 11px 6px; background: rgba(243, 238, 227, 0.92); border-radius: 10px; box-shadow: 0 4px 14px rgba(20, 30, 50, 0.18); text-decoration: none; color: #2b2b2b; }
.opBrand img { display: block; height: 32px; width: auto; }
.chip.bookChip { text-decoration: none; display: inline-block; background: #e8232e; border-color: #e8232e; color: #fff; padding: 9px 14px; box-shadow: 0 4px 14px rgba(20, 30, 50, 0.18); }
.chip.bookChip:hover { background: #cf1c27; border-color: #cf1c27; }
@media (pointer: coarse) { .chip.bookChip { padding: 12px 16px; } }
@media (max-width: 640px) { .opBrand img { height: 28px; } .opBrand { padding: 6px 9px 5px; } }
.loadOp { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: -6px; font: 600 10px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.7; }
.loadOp[hidden] { display: none; }
.loadMark { height: 14px; width: auto; }

/* ?diag=1 and ?bench=1 (src/diag.js): a monospace panel over the canvas. */
.diag { position: fixed; left: 8px; top: 8px; z-index: 40; margin: 0; max-width: calc(100vw - 16px); padding: 6px 8px; background: rgba(243, 238, 227, 0.92); color: #1c1c1c; font: 10px/1.35 ui-monospace, 'SF Mono', Menlo, monospace; white-space: pre; overflow: hidden; border-radius: 6px; pointer-events: none; }
.diag.bench { top: 8px; font-size: 11px; }
.diagCopy { position: fixed; right: 8px; bottom: 8px; z-index: 41; font: 600 11px/1 ui-monospace, Menlo, monospace; padding: 8px 10px; border-radius: 6px; border: 1px solid #1c1c1c; background: #f3eee3; color: #1c1c1c; }

/* Phones (body.tlv): the timeline is a vertical bar on the right edge, start at the top, end at the bottom. The pill is 30 px wide with a
   44 px hit target; the sticker stays upright on the track. Desktop keeps the bottom bar. */
body.tlv .timeline { left: auto; right: var(--iR); top: calc(var(--iT) + clamp(16px, 8vh, 60px)); bottom: calc(var(--iB) + clamp(24px, 13vh, 108px)); width: 44px; height: auto; border-radius: 0; background: none; border: 0; box-shadow: none; transform: translateX(14px); }
/* The box stays 44 px wide for touch and scrubbing; only the 30 px pill in its middle is drawn. */
body.tlv .timeline::before { content: ''; position: absolute; inset: 0 7px; background: var(--tl-bg); border-radius: 15px; pointer-events: none; }
body.tlv[data-style='ascii'] .timeline::before { border: 1px solid #3a424b; border-radius: 0; }
body.tlv[data-style='retro'] .timeline::before { border: 2px solid #ffffff; box-shadow: 3px 3px 0 #3a4466; border-radius: 0; }
body.tlv[data-style='brutalist'] .timeline::before { border: 2px solid #121212; box-shadow: 4px 4px 0 #121212; border-radius: 0; }
body.tlv .timeline.show { transform: none; }
body.tlv .tlTrack { left: 20px; right: auto; width: 4px; top: 14px; bottom: 14px; height: auto; }
body.tlv .tlFill { transform-origin: 50% 0; transform: scaleY(0); }
body.tlv .tlMarks { left: 0; right: 0; top: 14px; bottom: 14px; }
body.tlv .tlMark { left: 50%; top: 0; width: 8px; height: 8px; margin-left: -4px; margin-top: -4px; border-width: 1.5px; }
body.tlv .tlThumb { left: 50%; top: 14px; margin-left: -13px; margin-top: -9px; }
body.tlv .tlTip { bottom: auto; left: auto; right: calc(100% + 8px); top: 0; transform: translateY(var(--y, 0px)) translateX(6px) scale(0.96); }
body.tlv .tlTip.on { transform: translateY(var(--y, 0px)) translateX(0) scale(1); }
@media (prefers-reduced-motion: reduce) { body.tlv .tlTip { transform: translateY(var(--y, 0px)); } }

/* The app is not text: dragging and long-pressing never select or open a callout menu. Overlays with text to copy stay selectable. */
html, body, canvas, .caption, .timeline, .chip, .pill, .loading, .opBrandWrap, .controls, .tools, .pills, .brand, .menuBtn, .sheet, .fallback { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, svg { -webkit-user-drag: none; user-drag: none; }
.credits, .diag, .bench, .diagCopy { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; pointer-events: auto; }
.diag { pointer-events: none; }

/* Aircraft picker (operator mode, src/showroom.js): a chip at the top right and a paper dialog with two turntable cards. */
.aircraftBtn { position: fixed; top: var(--iT); right: var(--iR); z-index: 6; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; box-shadow: 0 4px 14px rgba(20, 30, 50, 0.18); }
.aircraftBtn svg { transform: rotate(90deg); }
body[data-mode='edit']:not(.mmenu) .aircraftBtn { top: calc(var(--iT) + 70px); }
body.mmenu .aircraftBtn { right: calc(var(--iR) + 44px); }
@media (pointer: coarse) { .aircraftBtn { width: 44px; height: 44px; } body.mmenu .aircraftBtn { right: calc(var(--iR) + 52px); } }
.showroom { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(16, 20, 26, 0.5); overflow-y: auto; }
.srPanel { width: min(880px, 100%); max-height: 100%; overflow-y: auto; background: var(--paper); color: var(--ink); border-radius: 14px; padding: 18px 20px 20px; box-shadow: 0 20px 60px rgba(10, 14, 20, 0.45); outline: none; }
.srHead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.srTitle { margin: 0; font: 700 13px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; }
.srClose { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font: 400 24px/1 var(--font); cursor: pointer; }
.srClose:hover { background: rgba(43, 43, 43, 0.08); }
.srCards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.srCard { cursor: pointer; transition: background 0.15s ease-out, border-color 0.15s ease-out; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid rgba(43, 43, 43, 0.14); border-radius: 12px; background: rgba(255, 255, 255, 0.35); }
.srStage { position: relative; aspect-ratio: 4 / 3.4; border-radius: 8px; background: radial-gradient(ellipse at 50% 70%, rgba(255, 255, 255, 0.7), rgba(243, 238, 227, 0) 70%); cursor: grab; touch-action: pan-y; }
.srStage.drag { cursor: grabbing; }
.srStage:focus-visible, .srClose:focus-visible, .srCard .chip:focus-visible, .aircraftBtn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.srCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.4s ease-out; }
.srStage.ready .srCanvas { opacity: 1; }
.srStatus { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.srStatus.err { width: auto; height: auto; clip-path: none; left: 0; right: 0; bottom: 8px; text-align: center; font: 500 11px/1 var(--mono); opacity: 0.6; }
/* The loading drawing (scripts/showroom-skeleton.mjs): silhouette fill, an outline that draws itself on, a light sweep. */
.srSkel { position: absolute; inset: 0; pointer-events: none; transition: opacity 0.3s ease-out; }
.srSkel[hidden] { display: none; }
.srStage.ready .srSkel { opacity: 0; }
.srStage.instant .srSkel { display: none; }
.srDraw { display: block; width: 100%; height: 100%; }
.srFill { fill: rgba(43, 43, 43, 0.075); }
.srOutline, .srDet { fill: none; stroke: rgba(43, 43, 43, 0.5); stroke-width: 1.1; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: srDraw 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
.srDet { stroke: rgba(43, 43, 43, 0.38); stroke-width: 0.9; animation-delay: calc(0.12s + var(--i) * 0.05s); }
@keyframes srDraw { to { stroke-dashoffset: 0; } }
.srSweepMask { position: absolute; inset: 0; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; overflow: hidden; }
.srSweep { position: absolute; top: 0; bottom: 0; left: 0; width: 42%; background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0)); transform: translateX(-100%); will-change: transform; animation: srSweep 1.4s linear infinite; }
@keyframes srSweep { to { transform: translateX(240%); } }
.srStage.failed .srSweep { animation: none; display: none; }
@media (prefers-reduced-motion: reduce) { .srOutline, .srDet { animation: none; stroke-dashoffset: 0; } .srSweep { animation: none; display: none; } }
.srName { margin: 4px 0 0; font: 700 16px/1.2 var(--font); }
.srReg { font: 500 11px/1 var(--mono); opacity: 0.6; margin-left: 4px; }
.srNow { position: absolute; top: 20px; left: 20px; z-index: 1; font: 600 9.5px/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: var(--ink); color: var(--paper); }
.srLine { margin: 0; font: 400 13px/1.4 var(--font); }
.srFacts { margin: 0; padding-left: 18px; font: 400 12px/1.5 var(--font); opacity: 0.75; }
.srActions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.srCard .chip { padding: 10px 16px; }
@media (pointer: coarse) { .srCard .chip { padding: 13px 18px; } }
@media (max-width: 640px) { .srCards { grid-template-columns: 1fr; } .srPanel { padding: 14px; } }
@media (prefers-reduced-motion: reduce) { .showroom { transition: none; } }

/* The whole card picks the aircraft: a real button (visually hidden) carries the keyboard, the card shows its focus and a hover state. */
.srPick { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; }
.srCard:has(.srPick:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (hover: hover) { .srCard:hover { background: rgba(255, 255, 255, 0.62); border-color: rgba(43, 43, 43, 0.34); } }
.srCard .srTake { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .srCard { transition: none; } }

/* Landmark stops (src/landmark-preview.js). The caption card morphs into this centred player while a clip plays. */
.lmStage { position: fixed; left: 0; top: 0; z-index: 5; transform-origin: 0 0; overflow: hidden; border-radius: 10px; background: var(--paper); color: var(--ink); box-shadow: 0 20px 60px rgba(10, 14, 20, 0.45); transition: opacity 0.15s ease-out; }
.lmStage[hidden], .lmScrim[hidden], .lmPlayIcon[hidden] { display: none; }
body.shot .lmStage, body.shot .lmScrim { display: none; }
.caption.lmHide { opacity: 0; }
.lmVid { position: relative; width: 100%; aspect-ratio: 16 / 9; background: color-mix(in srgb, var(--ink) 14%, var(--paper)); }
.lmVid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 1; transition: opacity 0.3s ease-in-out; }
.lmVid video.idle { opacity: 0; pointer-events: none; }
.lmPlayIcon { position: absolute; left: 50%; top: 50%; z-index: 1; width: 52px; height: 52px; margin: -26px 0 0 -26px; padding: 0; display: flex; align-items: center; justify-content: center; color: var(--ink); background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.2); border-radius: 50%; cursor: pointer; }
.lmText { position: relative; padding: 10px 14px 12px; transition: opacity 0.15s ease-out; }
.lmText.swap > :not(.lmToggle) { opacity: 0; }
.lmText > * { transition: opacity 0.15s ease-out; }
.lmTitle { font-family: var(--cap-title-font, var(--font)); font-weight: 700; font-size: 16px; line-height: 21px; }
.lmLocal { font: 600 14px/19px var(--cap-local-font, 'Annapurna SIL', 'Mukta', sans-serif); opacity: 0.85; }
.lmSub { margin-top: 3px; font: 500 13px/18px var(--font); opacity: 0.85; }
.lmSeen { margin-top: 6px; font: 500 11px/14px var(--mono); opacity: 0.7; font-variant-numeric: tabular-nums; }
.lmToggle { position: absolute; right: 12px; bottom: 11px; padding: 4px 10px; font: 600 11px/14px var(--font); color: var(--ink); background: var(--chip); border: 1px solid rgba(43, 43, 43, 0.18); border-radius: 999px; cursor: pointer; }
.lmToggle[aria-pressed='false'] { opacity: 0.6; }
.lmClose { position: absolute; right: 8px; top: 8px; z-index: 2; width: 36px; height: 36px; padding: 0; font: 400 24px/1 var(--font); color: var(--ink); background: var(--chip); border: 0; border-radius: 50%; cursor: pointer; }
.lmScrim { position: fixed; inset: 0; z-index: 2; background: rgba(14, 18, 24, 0.38); } /* below the timeline (3), so a scrub still reaches it */
.lmPlayIcon:focus-visible, .lmClose:focus-visible, .lmToggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-height: 499px) { .lmSub, .lmLocal { display: none; } .lmText { padding: 6px 12px 8px; } .lmTitle { font-size: 14px; line-height: 18px; } .lmToggle { bottom: 6px; } }
@media (prefers-reduced-motion: reduce) { .lmStage, .lmText, .lmVid video, .lmText > * { transition: none; } }
body[data-style='ascii'] .lmStage { border: 1px solid #3a424b; border-radius: 0; }
body[data-style='retro'] .lmStage { border: 2px solid #ffffff; border-radius: 0; box-shadow: 3px 3px 0 #3a4466; }
body[data-style='brutalist'] .lmStage { border: 2px solid #121212; border-radius: 0; box-shadow: 4px 4px 0 #121212; }
.lmOffChip { position: fixed; left: 50%; bottom: calc(var(--iB) + 96px); z-index: 4; transform: translateX(-50%); }
.lmOffChip[hidden] { display: none; }
.lmSeen { padding-right: 84px; } /* clear of the "Clips on" chip at the bottom right */
body.shot .lmOffChip { display: none; }
/* Timeline: the dot tooltip carries the clip at its full width; the caption card fades while the bar shows. */
.tlTip.clip { white-space: normal; }
.tlTip.clip .tlBody { width: min(260px, 70vw); white-space: normal; }
.tlTip .tlMedia { position: relative; width: min(260px, 70vw); aspect-ratio: 16 / 9; margin-bottom: 6px; overflow: hidden; border-radius: 5px; background: color-mix(in srgb, var(--tl-tip-ink) 15%, var(--tl-tip-bg)); }
.tlTip .tlMedia[hidden] { display: none; }
/* Two layers: the next landmark fades in over the last one, and its clip fades in over its poster once it plays. */
.tlLayer { position: absolute; inset: 0; opacity: 0; }
.tlLayer.front { z-index: 1; opacity: 1; transition: opacity 0.18s ease-out; }
.tlLayer.back { opacity: 1; }
.tlLayer.now { transition: none; }
.tlTip .tlPoster, .tlTip .tlVideo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.tlTip .tlVideo { opacity: 0; }
.tlTip .tlVideo.ready { opacity: 1; transition: opacity 0.12s ease-out; } /* fades in, goes at once when its source changes */
@media (prefers-reduced-motion: reduce) { .tlLayer.front, .tlTip .tlVideo.ready { transition: none; } }
/* Centred with auto margins and moved in px, set on the card itself: a percentage translate may keep the slide off the
   compositor, and a custom property on body made every element recalculate its style when the bar showed or hid. */
body.tl-show .caption { opacity: 0; transform: translateY(-40px); }
body.tlv.tl-show .caption { transform: translateY(0); }
/* End dialog (src/end-dialog.js) */
.endDlg { position: fixed; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(14, 18, 24, 0.5); }
.endDlg[hidden] { display: none; }
.endPanel { position: relative; width: min(880px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); color: var(--ink); border-radius: 14px; box-shadow: 0 24px 70px rgba(10, 14, 20, 0.5); outline: none; isolation: isolate; --endPad: 22px; padding: 0 var(--endPad) 22px; }
.endClose { position: sticky; top: 8px; float: right; z-index: 2; width: 44px; height: 44px; margin: 8px -8px -52px 0; padding: 0; font: 400 26px/1 var(--font); color: var(--ink); background: var(--chip); border: 0; border-radius: 50%; cursor: pointer; }
/* The hero: a band of real footage bleeding to the panel's edges, the logo in a paper pill on its lower edge, a two-line headline,
   three facts from the flight and two actions. Only transform and opacity animate. */
.endBand { position: relative; height: clamp(180px, 34vh, 340px); margin: 0 calc(-1 * var(--endPad)); overflow: hidden; background: #1a1f26; }
.endBandPoster, .endBandVideo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.endBandVideo { opacity: 0; }
.endBandVideo.ready { opacity: 1; transition: opacity 0.3s ease-out; } /* fades in over the poster */
.endBandChip { position: absolute; left: 12px; top: 12px; max-width: calc(100% - 84px); padding: 5px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 11px/14px var(--mono); color: #fff; background: rgba(14, 18, 24, 0.62); border-radius: 999px; font-variant-numeric: tabular-nums; }
.endBadge { --logoH: 40px; position: relative; z-index: 1; display: flex; width: fit-content; margin: calc(-0.5 * (var(--logoH) + 20px)) auto 0; padding: 10px 18px; background: var(--paper); border-radius: 999px; box-shadow: 0 1px 2px rgba(20, 24, 30, 0.06), 0 8px 24px rgba(20, 24, 30, 0.14); }
.endLogo { display: block; height: var(--logoH); width: auto; }
.endHero { text-align: center; padding: 22px 8px 26px; max-width: 640px; margin: 0 auto; }
.endHead { margin: 0; font-family: var(--cap-title-font, var(--font)); font-weight: 700; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.06; letter-spacing: -0.022em; font-kerning: normal; }
.endHeadPast, .endHeadNow { display: block; text-wrap: balance; }
.endHeadPast { color: color-mix(in srgb, var(--ink) 55%, transparent); }
.endSub { margin: 14px auto 0; max-width: 46ch; font: 500 15px/1.5 var(--font); text-wrap: pretty; opacity: 0.75; }
.endFacts { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 12px; margin: 22px 0 0; padding: 0; }
.endFact { padding: 0 22px; text-align: center; }
.endFact + .endFact { box-shadow: inset 1px 0 color-mix(in srgb, var(--ink) 12%, transparent); }
.endFactNum { display: block; font: 700 22px/1.2 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.endFactLabel { display: block; margin-top: 2px; font: 500 10.5px/14px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; white-space: nowrap; }
.endActions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.endBook, .endAgain { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 28px; font: 700 16px/1 var(--font); border-radius: 999px; text-decoration: none; cursor: pointer; transition: transform 0.12s ease-out; }
.endBook { gap: 8px; color: #fff; background: #e4262c; border: 0; }
.endBookArrow { display: block; transition: transform 0.16s ease-out; }
.endAgain { color: var(--ink); background: transparent; border: 0; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); font-weight: 600; }
.endBook:active, .endAgain:active { transform: scale(0.97); }
@media (hover: hover) {
  .endBook:hover { filter: brightness(1.08); }
  .endBook:hover .endBookArrow { transform: translateX(2px); }
  .endAgain:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 40%, transparent); }
}
.endGalleryTitle { margin: 6px calc(-1 * var(--endPad)) 14px; padding: 18px var(--endPad) 0; border-top: 1px solid rgba(43, 43, 43, 0.14); font: 700 11px/1 var(--font); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.endGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; align-items: start; }
.endTile { display: block; padding: 0; text-align: left; color: inherit; background: none; border: 0; cursor: pointer; font: inherit; }
.endMedia { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: color-mix(in srgb, var(--ink) 14%, var(--paper)); }
.endMedia img, .endMedia video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.endPlay { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; color: var(--ink); background: var(--chip); border-radius: 50%; }
.endTile.on .endPlay { display: none; }
.endCap { padding: 7px 2px 0; }
.endName { font: 700 13px/17px var(--font); }
.endLocal { min-height: 16px; font: 600 12.5px/16px var(--cap-local-font, 'Annapurna SIL', 'Mukta', sans-serif); opacity: 0.85; }
.endSeen { margin-top: 3px; font: 500 10.5px/14px var(--mono); opacity: 0.7; font-variant-numeric: tabular-nums; }
.endTile:focus-visible, .endBook:focus-visible, .endAgain:focus-visible, .endClose:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 520px) {
  .endPanel { --endPad: 14px; padding-bottom: 18px; }
  .endBand { height: clamp(170px, 30vh, 250px); }
  .endBadge { --logoH: 32px; }
  .endHero { padding-top: 18px; }
  .endFact { padding: 0 10px; }
  .endFactNum { font-size: 20px; }
  .endFactLabel { letter-spacing: 0.04em; }
  .endActions { flex-direction: column; width: 100%; max-width: 320px; margin-left: auto; margin-right: auto; }
  .endBook, .endAgain { width: 100%; }
  .endGrid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .endBandVideo.ready, .endBook, .endAgain, .endBookArrow { transition: none; } }
/* The clip viewer: inside .endDlg, over the panel. The stage scales in; the media box is the largest 16:9 that fits. */
.endViewer { position: fixed; inset: 0; z-index: 1; outline: none; touch-action: none; --vg: 72px; color: #fff; }
.endViewer[hidden] { display: none; }
.endVBack { position: absolute; inset: 0; background: rgba(6, 8, 12, 0.94); }
.endVStage { position: absolute; inset: 0; display: flex; flex-direction: column; }
.endVBar { display: flex; align-items: center; gap: 4px; height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) max(8px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); flex: none; }
.endVCount { flex: 1; font: 500 13px/1 var(--mono); font-variant-numeric: tabular-nums; opacity: 0.85; }
.endVBtn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; color: #fff; background: none; border: 0; border-radius: 50%; cursor: pointer; font: 400 28px/1 var(--font); }
.endVBtn:hover { background: rgba(255, 255, 255, 0.14); }
.endVBtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.endVBody { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 env(safe-area-inset-right, 0px) max(12px, env(safe-area-inset-bottom, 0px)) env(safe-area-inset-left, 0px); }
/* The clip as large as fits, inside the safe area; the caption takes the same width, so it starts under the clip's left edge. */
.endVMedia { position: relative; }
.endVMedia, .endVCap { width: min(calc(100vw - 2 * var(--vg) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), calc((100vh - 190px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 16 / 9)); width: min(calc(100vw - 2 * var(--vg) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), calc((100dvh - 190px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 16 / 9)); }
.endVBox { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #11151b; cursor: pointer; }
.endVLayer { position: absolute; inset: 0; opacity: 0; }
.endVLayer.front { z-index: 1; opacity: 1; transition: opacity 0.18s ease-out; }
.endVLayer.back { opacity: 1; }
.endVLayer.now { transition: none; }
.endVPoster, .endVVideo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.endVVideo { opacity: 0; }
.endVVideo.ready { opacity: 1; transition: opacity 0.12s ease-out; } /* fades in, goes at once when its source changes */
.endVPrev, .endVNext { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; background: rgba(255, 255, 255, 0.12); z-index: 2; }
.endVPrev { left: -58px; }
.endVNext { right: -58px; }
.endVCap { padding: 14px 0 0; text-align: left; }
.endVTitle { font: 700 18px/24px var(--font); }
.endVLocal { font: 600 15px/20px var(--cap-local-font, 'Annapurna SIL', 'Mukta', sans-serif); opacity: 0.85; }
.endVSeen { margin-top: 4px; font: 500 12px/16px var(--mono); opacity: 0.75; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .endViewer { --vg: 0px; }
  .endVBox { border-radius: 0; }
  .endVPrev, .endVNext { margin-top: -22px; background: rgba(6, 8, 12, 0.55); }
  .endVPrev { left: 8px; }
  .endVNext { right: 8px; }
  .endVCap { padding: 14px 16px 0; }
}
/* A landscape phone: the clip takes the full height, the bar and the caption lie over it. */
@media (max-height: 499px) {
  .endViewer { --vg: 0px; }
  .endVBar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; background: linear-gradient(to bottom, rgba(6, 8, 12, 0.6), rgba(6, 8, 12, 0)); }
  .endVBody { padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
  .endVMedia, .endVCap { width: min(calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), calc((100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 16 / 9)); width: min(calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)), calc((100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) * 16 / 9)); }
  .endVBox { border-radius: 0; }
  .endVPrev, .endVNext { margin-top: -22px; background: rgba(6, 8, 12, 0.55); }
  .endVPrev { left: 8px; }
  .endVNext { right: 8px; }
  .endVCap { position: absolute; left: 0; right: 0; bottom: env(safe-area-inset-bottom, 0px); margin: 0 auto; z-index: 2; padding: 32px 16px 10px; background: linear-gradient(to top, rgba(6, 8, 12, 0.75), rgba(6, 8, 12, 0)); pointer-events: none; }
  .endVLocal { display: none; }
}
@media (prefers-reduced-motion: reduce) { .endVLayer.front, .endVVideo.ready { transition: none; } }
body.shot .endDlg { display: none; }
body[data-style='ascii'] .endPanel { border: 1px solid #3a424b; border-radius: 0; }
body[data-style='retro'] .endPanel { border: 2px solid #ffffff; border-radius: 0; box-shadow: 4px 4px 0 #3a4466; }
body[data-style='brutalist'] .endPanel { border: 2px solid #121212; border-radius: 0; box-shadow: 5px 5px 0 #121212; }
/* Phones: the stop player is full screen (src/landmark-preview.js). Portrait contains the clip at full width over its own blurred
   poster; landscape covers the screen. */
.lmBackdrop { display: none; }
.lmStage.fs { z-index: 10; border-radius: 0; background: #05070a; color: #fff; box-shadow: none; cursor: default; }
.lmStage.fs .lmBackdrop { display: block; position: absolute; inset: -30px; width: calc(100% + 60px); height: calc(100% + 60px); object-fit: cover; filter: blur(24px) brightness(0.72); }
.lmStage.fs.fsL .lmBackdrop { display: none; }
.lmStage.fs .lmVid { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); background: transparent; }
.lmStage.fs.fsL .lmVid { top: 0; bottom: 0; transform: none; aspect-ratio: auto; height: 100%; }
.lmStage.fs.fsL .lmVid video { object-fit: cover; }
.lmStage.fs .lmVid video { object-fit: contain; }
.lmStage.fs .lmText { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 56px max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0)); color: #fff; pointer-events: none; }
.lmStage.fs .lmText > * { text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55); }
.lmStage.fs .lmSub { display: none; }
.lmStage.fs .lmSeen { padding-right: 0; opacity: 0.85; }
.lmStage.fs .lmClose { z-index: 3; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 48px; height: 48px; font-size: 30px; color: #fff; background: rgba(0, 0, 0, 0.5); }
.lmStage.fs .lmPlayIcon { width: 64px; height: 64px; margin: -32px 0 0 -32px; }

/* Video export (?video=reel|wide, src/video.js): only the logo and the place card are left on screen. The card changes on the frame it is
   set (no transitions), and the capture script reads the page at 540x960 (reel) or 1280x720 (wide) CSS pixels. */
body.video .timeline, body.video .controls, body.video .tools, body.video .pills, body.video .menuBtn, body.video .sheet, body.video .brand,
body.video .hint, body.video .copyright, body.video .credits, body.video .stylePicker, body.video .speedBoost, body.video #bookBtn, body.video .aircraftBtn, body.video .hl,
body.video .loading, body.video .loadPill, body.video .reload, body.video .stats, body.video .joystick, body.video .fallback, body.video .toast,
body.video .chip { display: none !important; }
body.video .caption, body.video .caption * { transition: none !important; animation: none !important; }
body.video .caption { opacity: var(--card-alpha, 1); }
body.video .caption.dim { opacity: calc(0.2 * var(--card-alpha, 1)); }
/* The logo sits top right. In the reel it stays below Instagram's top bar and clear of its right-hand buttons. */
body.video .opBrandWrap { left: auto; right: var(--iR); align-items: flex-end; }
body.video-reel .opBrandWrap { top: 14vh; right: 6vw; }
/* The card sits above the caption and music strip that Instagram lays over the bottom of a reel. */
body.video-reel .caption { bottom: 27vh; }
/* The Mapbox credit of a Realistic video (?style=realistic, off with ?credit=0): small, faint text. Reel: under the card, above Instagram's caption strip. Wide: bottom right. */
.videoCredit { display: none; }
body.video-credit .videoCredit { display: block; position: fixed; z-index: 3; right: var(--iR); bottom: var(--iB); font: 500 10px/1 var(--font); letter-spacing: 0.02em; color: #fff; opacity: 0.55; text-shadow: 0 0 3px rgba(0, 0, 0, 0.6); pointer-events: none; }
body.video-reel.video-credit .videoCredit { right: 0; left: 0; text-align: center; bottom: 23vh; }
