/* v25 t124u: Explore: a timeline over a big free globe, with the lives of the chosen year pinned where they lived */
.explore-screen { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; overflow: hidden; height: 100vh; height: 100dvh;
  color: #efe6d2; font-family: "EB Garamond", "Libre Baskerville", Georgia, serif;
  /* v26 t127u: black museum backdrop: near-black stone with a fine grain tile, a faint warm pool of light under the globe */
  /* t140u: the b05 mockup's ground, rebuilt (app-test/v28-bg): warm near-black leather (a neutral grey grain tile
     multiplied over the base colour), the mockup's measured vignette, and its gold drawings lifted from the mockup itself */
  --os: max(0.5px, min(100vw, 177.78vh) / 1280);   /* 1 mockup px (the mockup is a 1280x720 frame) */
  background-color: #25231f;
  background-image: url("../assets/explore/orn-tl.webp"), url("../assets/explore/orn-tr.webp"), url("../assets/explore/orn-l.webp"),
    url("../assets/explore/orn-bl.webp"), url("../assets/explore/orn-r.webp"),
    url("../assets/explore/vignette.webp"),
    url("../assets/paper/explore-leather-512.webp");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-position: left top, right top, left 0 top calc(255 * var(--os)), left bottom, right 0 bottom calc(95 * var(--os)), center, 0 0;
  background-size: calc(430 * var(--os)) auto, calc(280 * var(--os)) auto, calc(282 * var(--os)) auto, calc(215 * var(--os)) auto,
    calc(292 * var(--os)) auto, 100% 100%, 512px 512px;
  background-blend-mode: normal, normal, normal, normal, normal, normal, multiply;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 420ms ease, visibility 0s linear 420ms; }
/* v37: Explore's ground and ornaments (7 images, ~330 KB) wait until the first screen is live (body.ll-warm, js/game.js; Explore adds it when it opens) */
body:not(.ll-warm) .explore-screen { background-image: none; }
body.is-explore .explore-screen { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 420ms ease; }
/* t140u: the old grain overlay and SVG ornaments gave way to the mockup-matched ground above */
.explore-screen::before { display: none;
  }
.ex-orn { display: none; }
.ex-orn * { fill: none; stroke: #d8c08a; vector-effect: non-scaling-stroke; }
/* the globe's soft glow against the black (the atmosphere adds the rim; this is the light it sits in) */
.ex-stage::before { content: ""; position: absolute; left: 50%; top: calc(50% + var(--ex-top, 0px) / 2); width: min(96vw, 112vh); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(232,214,170,.13) 0%, rgba(232,214,170,.06) 36%, rgba(232,214,170,0) 62%); }
/* back button: dark glass with a gold hairline, ivory type */
.explore-screen .parch { background: rgba(24,21,17,.72); background-image: none; color: #efe6d2; text-shadow: none; clip-path: none; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(216,192,138,.55), 0 4px 14px rgba(0,0,0,.5); }
.explore-screen .parch:hover { --pl: 0px; background: rgba(40,35,27,.85); transform: translateY(-1px); }
.explore-screen .parch::after { display: none; }
.ex-zoom { position: absolute; right: clamp(14px, 2.4vw, 34px); bottom: clamp(16px, 3vh, 34px); z-index: 4; display: flex; flex-direction: column; gap: 8px; }
.ex-zoom button { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; font: 400 22px/1 "EB Garamond", serif;
  color: #efe6d2; background: rgba(24,21,17,.72); box-shadow: inset 0 0 0 1px rgba(216,192,138,.55), 0 3px 10px rgba(0,0,0,.5); }
.ex-zoom button:hover { background: rgba(48,42,32,.9); }
.ex-zoom button:disabled { opacity: .35; cursor: default; }
/* the timeline placeholder, light on black (theme variables only) */
.ex-time { position: relative; z-index: 3; }   /* its padding, type and halo are shared with the map view's timeline (css/timeline.css) */
.ex-head { margin-bottom: -8px; }
.ex-head { position: relative; z-index: 3; display: flex; align-items: center; min-height: 64px; padding: 12px clamp(16px, 3vw, 44px) 0; }
.ex-head .parch svg { transform: scaleX(-1); }
.ex-head .parch:hover svg { transform: scaleX(-1) translateX(3px); }
.ex-stage { position: relative; flex: 1 1 auto; min-height: 0; z-index: 1; }
/* t138u: globe and pins start below the timeline's big year (--ex-top, set by explore.js), so the time hovers above the globe */
#ex-globe { position: absolute; inset: var(--ex-top, 0px) 0 0 0; cursor: grab; touch-action: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
#ex-globe:active { cursor: grabbing; }
/* v40 t159u: map names are DOM text (js/explore.js drawNames): crisp at any zoom, never pixels in a texture. Layer 1 = region
   names (with the pins), layer 2 = country names; whole-px translate only (no scale), so glyphs stay on the pixel grid */
#ex-names { position: absolute; inset: var(--ex-top, 0px) 0 0 0; pointer-events: none; overflow: hidden; z-index: 1; contain: strict; }
.nm { position: absolute; left: 0; top: 0; white-space: nowrap; line-height: 1; padding: 1px 2px; color: #3d2a16; font-weight: 500;
  text-shadow: 0 0 2px rgba(244,234,214,.95), 0 0 5px rgba(244,234,214,.7); visibility: hidden; contain: layout style;
  transition: opacity .2s linear, visibility 0s linear .2s; }
.nm:not(.on) { opacity: 0 !important; }
.nm.on { visibility: visible; transition: opacity .2s linear; will-change: transform; }
.nm.rL1 { font-style: italic; font-size: 19px; letter-spacing: .01em; }
.nm.rL2 { font-style: italic; font-size: 16.5px; }
.nm.rL3 { font-style: italic; font-size: 14.5px; }
.nm.rS1, .nm.rS2, .nm.rS3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .2em; color: #44403a; }
.nm.rS3 { font-size: 10.5px; letter-spacing: .16em; }
.nm.rO1 { font-size: 15px; text-transform: uppercase; letter-spacing: .34em; color: #44403a; }
.nm.c1, .nm.c2, .nm.c3 { text-transform: uppercase; font-weight: 600; color: #34230f; }
.nm.c1 { font-size: 13.5px; letter-spacing: .14em; }
.nm.c2 { font-size: 12px; letter-spacing: .12em; }
.nm.c3 { font-size: 10.5px; letter-spacing: .1em; }
/* v41: zoomed-in names that replace the painted lettering: oceans, seas, rivers, land features */
.nm.fO, .nm.fS, .nm.fR { color: #1f2f3a; font-weight: 600; text-shadow: 0 0 2px rgba(214,226,230,.9), 0 0 5px rgba(214,226,230,.55); }
.nm.fO { font-size: 15px; text-transform: uppercase; letter-spacing: .3em; }
.nm.fS { font-style: italic; font-size: 14.5px; letter-spacing: .02em; }
.nm.fR { font-style: italic; font-size: 13px; color: #1d3e52; }
.nm.fL { font-style: italic; font-size: 14px; letter-spacing: .04em; color: #4a3218; }
@media (max-width: 740px) {
  .nm.rL1 { font-size: 16px; } .nm.rL2 { font-size: 14px; } .nm.rL3 { font-size: 12.5px; }
  .nm.rS1, .nm.rS2 { font-size: 10px; } .nm.rS3 { font-size: 9.5px; } .nm.rO1 { font-size: 12.5px; }
  .nm.fO { font-size: 12px; } .nm.fS, .nm.fL { font-size: 12px; } .nm.fR { font-size: 11px; }
  .nm.c1 { font-size: 12px; } .nm.c2 { font-size: 11px; } .nm.c3 { font-size: 10px; letter-spacing: .08em; }
}
#ex-pins { position: absolute; inset: var(--ex-top, 0px) 0 0 0; pointer-events: none; overflow: hidden; z-index: 2; contain: strict; }
/* a pin is a zero-size anchor at the exact spot; its face (or name chip) stands on a short stem above it */
.ex-pin { --s: 48px; font: inherit; color: inherit; position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; border: 0; background: none; pointer-events: none; cursor: pointer; will-change: transform, opacity; contain: layout style; touch-action: none; }
/* pins-B: explore.js owns transform, opacity, visibility and pointer-events (inline, written per frame only on change) */
.ex-in { position: absolute; left: 0; bottom: 6px; translate: -50% 0; display: block; transform-origin: 50% calc(100% + 6px);
  transform: scale(.25); opacity: 0; transition: transform 340ms cubic-bezier(.3,1.5,.5,1), opacity 240ms ease; }
.ex-pin.in .ex-in { transform: none; opacity: 1; }
.ex-pin.out .ex-in { transform: scale(.35); opacity: 0; transition-duration: 220ms; transition-delay: 0ms; }
/* the exact spot: a small gold seed; name chips stand on a short stem, faces float just above it */
.ex-pin::before { content: ""; position: absolute; left: -2.5px; top: -2.5px; width: 5px; height: 5px; border-radius: 50%; background: #e2c88e; box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 0 6px rgba(226,200,142,.6); }
.ex-pin.chip .ex-in::after { content: ""; position: absolute; left: 50%; top: 100%; translate: -50% -1px; border: 4px solid transparent; border-bottom: 0; border-top: 6px solid rgba(216,192,138,.75); }
/* v26 t132u: a face is its own alpha-faded sprite (no disc, no border): crisp face, feathered edge. Two light layers
   make it a glass bubble: a specular arc at the top left and a faint lit rim where the fade ends. */
.ex-pin.pic .ex-in { width: var(--s); height: var(--s); bottom: 4px; }
.ex-pin.pic img { display: block; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 3px 5px rgba(0,0,0,.55)); }
.ex-pin.pic .ex-in::before, .ex-pin.pic .ex-in::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; }
.ex-pin.pic .ex-in::before { background: radial-gradient(ellipse 30% 17% at 33% 19%, rgba(255,255,255,.42), rgba(255,255,255,0) 72%); z-index: 1; }
.ex-pin.pic .ex-in::after { background: radial-gradient(ellipse 52% 55% at 50% 47%, rgba(255,246,224,0) 74%, rgba(255,246,224,.12) 86%, rgba(255,246,224,0) 97%); }
.ex-pin.chip .ex-in { white-space: nowrap; font-style: italic; font-weight: 500; font-size: 14px; line-height: 1; color: #f1e8d4;
  padding: 5px 9px 5px; border-radius: 11px; background: rgba(20,18,14,.86); box-shadow: 0 0 0 1px rgba(216,192,138,.55), 0 3px 8px rgba(0,0,0,.55); }
.ex-t { display: block; max-width: 10em; overflow: hidden; text-overflow: ellipsis; }
.ex-pin:hover, .ex-pin:focus-visible { z-index: 5; }
.ex-pin.in:hover .ex-in, .ex-pin.in:focus-visible .ex-in, .ex-pin.picked .ex-in { transform: scale(1.14); }
.ex-pin:focus-visible { outline: none; } .ex-pin:focus-visible .ex-in { outline: 1.5px solid #f2b85a; outline-offset: 3px; border-radius: 50%; }
/* the story page's way back */
@media (max-width: 740px) {
  .ex-head { min-height: 56px; padding: 10px 12px 0; }
  .ex-pin { --s: 40px; }
  .ex-zoom { bottom: 14px; right: 12px; }
  .ex-pin.chip .ex-in { font-size: 12.5px; padding: 4px 7px; }
  .ex-t { max-width: 8.5em; }
  .spin-wrap .cta { padding: .85em 1.25em .8em 1.4em; letter-spacing: .18em; }
  .zoom-ctl { bottom: 84px; flex-direction: column; }   /* two buttons now share the bottom row */
}
