/* JC's Inner Space: the HTML layer. Palette and type from his own site; white pills like the GLY game. */
@font-face { font-family: "Bricolage"; src: url("fonts/bricolage-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dmsans.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
:root { --display: "Arial Black", system-ui, sans-serif; --text: system-ui, -apple-system, "Segoe UI", sans-serif; --ink: #0d1a3f; --cream: #fff8ea; --orange: #ff8a1f; --yellow: #ffd23f; --lilac: #b9a5ff; --sky: #a8dcff; --mint: #8de3c4; --pink: #ffb8d9; --muted: #4f5a78;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); }
html.fonts { --display: "Bricolage", "Arial Black", system-ui, sans-serif; --text: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
/* no transitions until the styled page has painted: WebKit otherwise animates the entrance from unstyled positions
   (James and JC, 26 Nov: on a phone the heart flew in "on the side") */
html.preload *, html.preload *::before, html.preload *::after { transition: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.55 var(--text); }
h1, h2, h3, .name { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; line-height: 1.08; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- with scripts on, the world is the page; Read opens the same text on top */
.js body { overflow: hidden; height: 100%; overscroll-behavior: none; }
.js #world { position: fixed; inset: 0; background: #9fd486; }
.js #world canvas { display: block; width: 100%; height: 100%; }
#entrance, #hud, #bubble, #panel, #ring, #ghost, #iris { display: none; }
.js #entrance, .js #hud, .js #bubble, .js #panel, .js #ring, .js #ghost, .js #iris { display: block; }
.js #read { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 30; background: var(--cream); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s; }
.js body.reading #read { opacity: 1; visibility: visible; transition: opacity .25s; }
/* Read's pictures stay unfetched until Read opens (they cost the world's first frame 200 KB on a phone link) */
.js body:not(.reading):not(.no-world) #read { content-visibility: hidden; }
.js body.no-world #read { opacity: 1; visibility: visible; }

/* ---------- the entrance: plain HTML, painted at once */
#entrance { position: fixed; inset: 0; z-index: 40; background: var(--cream); overflow: hidden;
  --who-w: min(44vw, 236px); --who-top: 55%; --head-pivot: 21%; --mind-y: calc(var(--who-top) - var(--who-w) * .8624); --through-time: .7s; }
/* short phone screens (Safari's bars take ~180px): a smaller JC a little higher, so the intro card never covers him */
@media (max-height: 760px) { #entrance { --who-w: min(44vw, 25vh); --who-top: 50%; } #entrance .name { top: calc(var(--safe-t) + 7vh); } #entrance .intro { font-size: 16px; padding: 12px 16px; } }
.js #entrance.gone { display: none; }
.skip-entrance #entrance { display: none; }
#entrance .rings { position: absolute; left: 50%; top: var(--who-top); width: 0; height: 0; }
#entrance .rings i { position: absolute; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); animation: breathe 8s ease-in-out infinite; }
#entrance .rings i:nth-child(1) { width: min(96vw, 520px); height: min(96vw, 520px); background: #efe7ff; }
#entrance .rings i:nth-child(2) { width: min(76vw, 410px); height: min(76vw, 410px); background: #e3d8ff; animation-delay: .25s; }
#entrance .rings i:nth-child(3) { width: min(56vw, 300px); height: min(56vw, 300px); background: #d7c9ff; animation-delay: .5s; }
@keyframes breathe { 0%, 100% { transform: translate(-50%, -50%) scale(.9); } 50% { transform: translate(-50%, -50%) scale(1.06); } }
#entrance .who { position: absolute; left: 50%; top: var(--who-top); width: var(--who-w); aspect-ratio: 407 / 780; transform: translate(-50%, -66%); transform-origin: 50% var(--head-pivot); transition: transform 1.1s cubic-bezier(.6, 0, .8, .4); }
#entrance .who img { width: 100%; height: 100%; display: block; }
#entrance .name { position: absolute; left: 0; right: 0; top: calc(var(--safe-t) + 11vh); margin: 0; text-align: center; font-size: clamp(40px, 11vw, 64px); }
#entrance .intro { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 6vh); width: min(88vw, 460px); transform: translateX(-50%); margin: 0; padding: 14px 18px; background: rgba(255, 255, 255, .92);
  border-radius: 18px; text-align: center; font-size: 17px; opacity: 0; transition: opacity .8s; box-shadow: 0 6px 20px rgba(13, 26, 63, .08); }
#entrance.words .intro { opacity: 1; }
#entrance .intro:empty { display: none; } /* R7: no intro words unless JC writes some (his editor) */
/* The mind and iris share the portrait's zoom pivot: top + (pivot - .66) × portrait height. */
#entrance.heart { --head-pivot: 60%; --mind-y: calc(var(--who-top) - var(--who-w) * .115); }
#entrance.into .who { transform: translate(-50%, -66%) scale(6.5); transition: transform 1.6s cubic-bezier(.55, 0, .75, .35); }
#entrance.into .name, #entrance.into .intro { opacity: 0; transition: opacity .4s; }
#entrance .mind { position: absolute; left: 50%; top: var(--mind-y); width: min(84vw, 440px); aspect-ratio: 769 / 670; transform: translate(-50%, -50%) scale(.3);
  opacity: 0; pointer-events: none; transition: transform 1s cubic-bezier(.2, .7, .3, 1) 1.05s, opacity .7s ease 1.05s; }
#entrance.heart .mind { aspect-ratio: 2 / 3; }
#entrance .mind img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
#entrance .mind .m-heart {
  -webkit-mask-image: radial-gradient(ellipse 46% 34% at 50% 53%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 46% 34% at 50% 53%, #000 62%, transparent 100%); }
#entrance .mind .m-heart, #entrance.heart .mind .m-brain { display: none; }
#entrance.heart .mind .m-heart { display: block; }
#entrance .mind .ph { position: absolute; inset: 22% 8%; border-radius: 48% 52% 46% 54% / 55% 52% 48% 45%;
  background: radial-gradient(circle at 35% 40%, #f6d9ff 0, #d9c8ff 38%, #b9a5ff 70%, rgba(185, 165, 255, 0) 72%),
    radial-gradient(circle at 68% 48%, #ffd9ec 0, #ffb8d9 40%, rgba(255, 184, 217, 0) 70%); filter: blur(1px); }
#entrance.into .mind { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#entrance.through { opacity: 0; transition: opacity var(--through-time) ease; }
#entrance.fast { --through-time: .5s; }
#entrance.iris-ready { --entrance-hole: 0px; }
/* Apply the mask at the cut. Safari can hide the whole layer when both stops are non-positive. */
#entrance.iris-ready.through { --entrance-hole: 120vmax; opacity: 1;
  mask-image: radial-gradient(circle at 50% var(--mind-y), transparent var(--entrance-hole), black calc(var(--entrance-hole) + 40px));
  transition: --entrance-hole var(--through-time) ease-in; }
#entrance.through:not(.fast) .who { transform: translate(-50%, -66%) scale(9); transition: transform var(--through-time) ease-in; }
#entrance.through:not(.fast) .mind { transform: translate(-50%, -50%) scale(5); transition: transform var(--through-time) ease-in; }
#entrance.through .name, #entrance.through .intro { opacity: 0; transition: opacity .3s; }
/* R6 (James, 30 Nov: bring back the intro, JC in meditation, into his heart, out into the world; no white light, JC
   27 Nov): a small warm heart breathes on his chest; the camera goes into it and the world opens from it */
#entrance .who .heart-glow { position: absolute; left: 50%; top: 52%; width: 16%; aspect-ratio: 1; opacity: 0; transform: translate(-50%, -50%) scale(.9);
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff7d9e' d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E"); filter: drop-shadow(0 0 5px rgba(255, 110, 150, .6));
  transition: opacity .9s ease .4s; animation: heart-breath 8s ease-in-out infinite; }
#entrance.words .who .heart-glow { opacity: .95; }
@keyframes heart-breath { 0%, 100% { transform: translate(-50%, -50%) scale(.86); } 50% { transform: translate(-50%, -50%) scale(1.06); } }
#entrance.heart { --head-pivot: 52%; --mind-y: calc(var(--who-top) - var(--who-w) * .2683); --through-time: 1.1s; }
#entrance.heart .mind { display: none; }
#entrance.heart.fast { --through-time: .5s; }
/* R7 (James and JC, 1 Dec call: the heart opening read cheesy): straight into JC's head, about his head, with nothing
   in between (no brain picture, no light); the iris opens from his head onto the world */
#entrance.head .mind, #entrance.head .who .heart-glow { display: none; }
#entrance.head.into .who { transform: translate(-50%, -66%) scale(7.5); transition: transform 1.3s cubic-bezier(.5, 0, .7, .3); }
#entrance.head { --through-time: .8s; }
#entrance.head.fast { --through-time: .5s; }
#skip { position: absolute; right: calc(var(--safe-r) + 14px); top: calc(var(--safe-t) + 14px); background: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; box-shadow: 0 3px 12px rgba(13, 26, 63, .12); }
/* r7n (item 13, JC 2 Dec: "a spacey background instead of beige, JC floating in space, revisiting my inner space"):
   the entrance is deep space (a nebula glow, two layers of twinkling stars) and JC floats, breathing, in the middle */
#entrance { background: radial-gradient(ellipse 70% 50% at 50% 48%, #3b2a7a 0%, rgba(59, 42, 122, 0) 70%),
  radial-gradient(ellipse 60% 40% at 18% 20%, rgba(255, 122, 182, .22) 0%, rgba(255, 122, 182, 0) 70%),
  radial-gradient(ellipse 55% 45% at 85% 78%, rgba(90, 170, 255, .2) 0%, rgba(90, 170, 255, 0) 70%),
  linear-gradient(180deg, #070b24 0%, #121a4a 55%, #0a0f2e 100%); color: var(--cream); }
#entrance::before, #entrance::after { content: ""; position: absolute; inset: -10%; pointer-events: none;
  background-image: radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 27% 62%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 41% 9%, #ffe9a8 50%, transparent 51%), radial-gradient(1px 1px at 55% 33%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 71%, #cfe3ff 50%, transparent 51%), radial-gradient(1px 1px at 79% 14%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 90% 45%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 6% 82%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 35% 88%, #ffd9f0 50%, transparent 51%), radial-gradient(1px 1px at 62% 95%, #fff 50%, transparent 51%);
  background-size: 340px 300px; animation: stars-twinkle 4.5s ease-in-out infinite alternate; }
#entrance::after { background-size: 210px 230px; background-position: 70px 40px; opacity: .55; animation-duration: 6.5s; animation-delay: -2s; }
@keyframes stars-twinkle { 0% { opacity: .35; transform: translateY(0); } 100% { opacity: 1; transform: translateY(-14px); } }
#entrance .rings i:nth-child(1) { background: rgba(185, 165, 255, .08); }
#entrance .rings i:nth-child(2) { background: rgba(185, 165, 255, .12); }
#entrance .rings i:nth-child(3) { background: rgba(200, 180, 255, .18); box-shadow: 0 0 60px rgba(185, 165, 255, .35); }
#entrance .who img { animation: jc-float 7s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(185, 165, 255, .45)); }
@keyframes jc-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
#entrance .name { color: var(--cream); text-shadow: 0 2px 18px rgba(185, 165, 255, .6); }
#entrance .intro { color: var(--ink); }
/* r7p (J1, call 3 Dec: "no zoom into the head"): JC meditates in space, a few sparks orbit him and a comet crosses now
   and then; "Enter JC's Inner Space" fills while he breathes and goes in by itself when full; the world fades in */
#entrance .mind, #entrance .who .heart-glow { display: none; }
#entrance.through { opacity: 0; transition: opacity var(--fade-ms, 1.4s) ease; }
#entrance.through.fast { transition-duration: var(--fast-fade-ms, .65s); }
#entrance.through:not(.fast) .who, #entrance.through .who { transform: translate(-50%, -66%); }
#entrance .intro { bottom: calc(var(--safe-b) + 5vh + 72px); }
#entrance .intro.same { display: none; }
#entrance .orbit { position: absolute; left: 50%; top: calc(var(--who-top) - var(--who-w) * .31); width: 0; height: 0; transform: scaleY(.38) rotate(-8deg); pointer-events: none; }
#entrance .orbit i { position: absolute; left: 0; top: 0; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%; background: #fff6d8;
  box-shadow: 0 0 10px 3px rgba(255, 233, 168, .75); animation: jc-orbit var(--d, 9s) linear infinite; animation-delay: var(--at, 0s); --r: min(40vw, 230px); }
#entrance .orbit i:nth-child(2) { --d: 12s; --at: -4s; --r: min(34vw, 190px); width: 6px; height: 6px; margin: -3px; background: #ffd9f0; box-shadow: 0 0 9px 3px rgba(255, 150, 210, .7); }
#entrance .orbit i:nth-child(3) { --d: 15s; --at: -9s; --r: min(46vw, 268px); width: 7px; height: 7px; margin: -3.5px; background: #d9ecff; box-shadow: 0 0 10px 3px rgba(140, 200, 255, .7); }
#entrance .orbit i:nth-child(4) { --d: 10.5s; --at: -7s; --r: min(38vw, 214px); width: 5px; height: 5px; margin: -2.5px; }
#entrance .orbit i:nth-child(5) { --d: 18s; --at: -2s; --r: min(44vw, 250px); width: 8px; height: 8px; margin: -4px; background: #e9e0ff; box-shadow: 0 0 12px 4px rgba(185, 165, 255, .75); }
@keyframes jc-orbit { from { transform: rotate(0deg) translateX(var(--r)); } to { transform: rotate(360deg) translateX(var(--r)); } }
#entrance .comet { position: absolute; left: 0; top: 0; width: 140px; height: 2px; border-radius: 2px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff); filter: drop-shadow(0 0 6px #fff); animation: jc-comet 7s ease-in 1.2s infinite; }
@keyframes jc-comet { 0% { opacity: 0; transform: translate(-20vw, 12vh) rotate(18deg); } 4% { opacity: 1; } 16% { opacity: 0; transform: translate(80vw, 42vh) rotate(18deg); } 100% { opacity: 0; transform: translate(80vw, 42vh) rotate(18deg); } }
#skip.enter { left: 50%; right: auto; top: auto; bottom: calc(var(--safe-b) + 5vh); transform: translateX(-50%); overflow: hidden; isolation: isolate; white-space: nowrap;
  padding: 15px 28px; font-size: 18px; font-weight: 800; color: var(--ink); background: #fff; border-radius: 999px; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(185, 165, 255, .45), 0 0 34px rgba(185, 165, 255, .6); animation: enter-glow 3s ease-in-out infinite; }
#skip.enter span { position: relative; z-index: 1; }
#skip.enter .enter-fill { position: absolute; inset: 0; z-index: 0; background: linear-gradient(90deg, #e9e0ff, #ffe3f2); transform: scaleX(0); transform-origin: 0 50%; }
#entrance.counting #skip.enter .enter-fill { transform: scaleX(1); transition: transform var(--auto-ms, 6.5s) linear; }
#skip.enter:hover, #skip.enter:focus-visible { box-shadow: 0 0 0 4px rgba(255, 233, 168, .8), 0 0 40px rgba(255, 233, 168, .7); }
@keyframes enter-glow { 0%, 100% { box-shadow: 0 0 0 3px rgba(185, 165, 255, .45), 0 0 26px rgba(185, 165, 255, .45); } 50% { box-shadow: 0 0 0 3px rgba(185, 165, 255, .7), 0 0 44px rgba(185, 165, 255, .8); } }
#entrance.through #skip.enter { opacity: 0; transition: opacity .3s; }
@media (max-height: 760px) { #entrance .intro { bottom: calc(var(--safe-b) + 3vh + 64px); } #skip.enter { bottom: calc(var(--safe-b) + 3vh); padding: 13px 24px; font-size: 17px; } }

/* ---------- HUD: the only things on screen */
#hud { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: 0; transition: opacity .5s; }
body.hud-on #hud { opacity: 1; }
#hud > * { pointer-events: auto; position: absolute; }
.pill { background: #fff; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: 15px; box-shadow: 0 3px 0 rgba(13, 26, 63, .10), 0 6px 18px rgba(13, 26, 63, .10); }
.pill:active, .round:active { transform: translateY(1px); }
#b-read { left: calc(var(--safe-l) + 12px); top: calc(var(--safe-t) + 12px); }
#b-menu { left: 50%; top: calc(var(--safe-t) + 12px); transform: translateX(-50%); font-family: var(--display); font-weight: 800; padding: 9px 20px; }
#b-menu:active { transform: translateX(-50%) translateY(1px); }
#b-sound { right: calc(var(--safe-r) + 12px); top: calc(var(--safe-t) + 12px); display: flex; gap: 6px; align-items: center; }
#b-sound span { font-size: 0; }
@media (min-width: 560px) { #b-sound span { font-size: 15px; } }
#b-sound b { display: inline-block; width: 18px; text-align: center; position: relative; }
#b-sound:not(.on) b::after { content: ""; position: absolute; left: 1px; right: 1px; top: 50%; height: 2px; background: var(--ink); transform: rotate(-40deg); }
#b-sound.on { background: var(--yellow); }
.round { right: calc(var(--safe-r) + 16px); bottom: calc(var(--safe-b) + 74px); width: 66px; height: 66px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 4px 0 rgba(13, 26, 63, .12), 0 8px 22px rgba(13, 26, 63, .14); }
.round i { display: block; width: 40px; height: 12px; margin: 4px auto 0; border-radius: 8px; background: var(--orange); box-shadow: inset 0 3px 0 #fff8ea, 0 5px 0 -1px var(--ink), 0 9px 0 -3px var(--sky); }
.round.on { background: var(--orange); }
.round span { display: block; margin-top: 8px; font-size: 12px; font-weight: 800; }
#studio-actions { position: fixed; z-index: 19; inset: 0; pointer-events: none; }
/* ---------- the bottom bar (James, 26 Nov): always a way to learn more and to get in touch */
#dock { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: none; justify-content: center; align-items: center; gap: 8px;
  padding: 0 12px calc(var(--safe-b) + 14px); pointer-events: none; }
#dock > * { pointer-events: auto; }
.js body.hud-on #dock { display: flex; }
body.reading #dock, body.panel-open #dock { display: none !important; }
#dock .pill { font-weight: 800; white-space: nowrap; padding: 11px 16px; }
#dock .pill.primary { background: var(--orange); color: #fff; }
#dock .pill.jc { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; }
#dock .pill.jc[hidden] { display: none; }
#dock .pill.jc img { width: 36px; height: 36px; border-radius: 50%; background: var(--cream); }
@media (max-width: 480px) { #dock { gap: 6px; padding-left: 8px; padding-right: 8px; } #dock .pill { font-size: 14px; padding: 10px 12px; } #dock .pill.jc span { display: none; } #dock .pill.jc { padding: 3px; } }
/* ---------- rooms (DIRECTION-2 A2): the room's own colour round it, deepening toward the corners */
/* B6: a very light vignette outdoors (CSS, no post-processing) */
body.w3d:not(.in-room) #world::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 75% at 50% 46%, transparent 62%, rgba(74, 58, 120, .13) 100%); }
body.in-room #world::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 45%, var(--room-edge, #e2b580) 100%); }
#studio-actions button[hidden] { display: none; }
/* the Temple's ten breaths: a soft ring on JC's chest, the words, the count, Stop */
#breath { position: fixed; inset: 0; z-index: 22; pointer-events: none; }
#breath[hidden] { display: none; }
#breath .ring { position: absolute; left: var(--bx, 50%); top: var(--by, 50%); width: 150px; height: 150px; margin: -75px 0 0 -75px; }
#breath .ring i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 3px solid rgba(255, 248, 234, .95);
  background: radial-gradient(circle, rgba(255, 214, 107, .28), rgba(255, 184, 217, .12) 60%, transparent 70%); box-shadow: 0 0 24px rgba(255, 214, 107, .55); }
#breath .line { position: absolute; left: 0; right: 0; bottom: calc(var(--safe-b) + 138px); margin: 0; text-align: center; color: var(--ink);
  font: 800 20px var(--display); text-shadow: 0 1px 0 rgba(255, 248, 234, .8); }
#breath button { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 84px); transform: translateX(-50%); pointer-events: auto; }
/* short phones (390 x 664): 10 px more air between the room's front rim and the words */
@media (max-height: 700px) { #breath .line { bottom: calc(var(--safe-b) + 127px); font-size: 18px; } #breath button { bottom: calc(var(--safe-b) + 79px); } }
body.breathing #studio-actions { display: none; }
.pop-heart { position: fixed; z-index: 23; width: 22px; height: 20px; margin: -10px 0 0 -11px; pointer-events: none; animation: pop-heart 1.2s ease-out forwards;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath fill='%23ff6f91' d='M12 21 2.6 11.6a5.6 5.6 0 0 1 9.4-6 5.6 5.6 0 0 1 9.4 6z'/%3E%3C/svg%3E"); }
@keyframes pop-heart { 0% { transform: translateY(0) scale(.4); opacity: 0; } 20% { transform: translateY(-10px) scale(1.15); opacity: 1; } 100% { transform: translateY(-46px) scale(.9); opacity: 0; } }
/* r7n (item 10): notes float up from the studio's keyboard and turntable while JC plays */
.pop-note { position: fixed; z-index: 23; margin: -12px 0 0 -8px; font: 800 20px/1 var(--text); color: var(--ink); text-shadow: 0 1px 0 #fff, 0 0 6px rgba(255, 255, 255, .8); pointer-events: none; animation: pop-note 1.4s ease-out forwards; }
@keyframes pop-note { 0% { transform: translate(0, 0) scale(.5); opacity: 0; } 20% { transform: translate(calc(var(--dx, 0px) * .2), -12px) scale(1.1); opacity: 1; } 100% { transform: translate(var(--dx, 0px), -56px) scale(.9); opacity: 0; } }
/* ---------- the 3D world: a sky behind the floating island, and the markers as HTML over the canvas */
.js body.w3d #world { background: linear-gradient(180deg, #fff2d8 0%, #ffe8cc 28%, #dcefff 70%, #cbe6f8 100%); }
#markers { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
#markers[hidden], body.reading #markers { display: none; }
#markers .mk { position: absolute; left: -13px; top: -13px; height: 26px; display: flex; align-items: center; border-radius: 13px; background: #fff; box-shadow: 0 2px 0 rgba(13, 26, 63, .08); transform-origin: 13px 13px; }
#markers .mk i { width: 26px; height: 26px; display: grid; place-items: center; }
#markers .mk svg { width: 17px; height: 17px; }
#markers .mk span { display: none; padding-right: 10px; font: 700 11px/1 var(--text); color: var(--ink); white-space: nowrap; }
#markers .mk.open span { display: inline; }
#studio-actions button { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; }
#desk-action { background: var(--yellow); }
#studio-actions .frame-hit { transform: translate(-50%, -50%); padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; }
#studio-actions .frame-hit:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
body.reading #studio-actions, body.panel-open #studio-actions { display: none; } /* R7: Ride shows in rooms too (it takes JC out) */
.round.on i { background: #fff; box-shadow: inset 0 3px 0 var(--orange), 0 5px 0 -1px var(--ink), 0 9px 0 -3px var(--sky); }

/* ---------- caption bubble */
#bubble { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 150px); width: min(92vw, 440px); transform: translate(-50%, 16px); z-index: 21; background: #fff; border-radius: 20px; padding: 12px 16px;
  font-size: 15px; text-align: center; box-shadow: 0 8px 26px rgba(13, 26, 63, .16); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
#bubble.on { opacity: 1; transform: translate(-50%, 0); }
body.card-on #bubble { bottom: calc(var(--safe-b) + 84px + var(--card-h, 92px)); } /* r7n: above a find's card, never under it */
#bubble.on.actions { pointer-events: auto; }
#bubble.on a { pointer-events: auto; } /* J3: links JC adds in his editor */
#bubble .acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
/* ---------- A4: collect and reveal (shards, the card, the chip, the collection) */
#mem-card { position: fixed; z-index: 21; left: 50%; bottom: calc(var(--safe-b) + 74px); width: min(94vw, 420px); transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(13, 26, 63, .2); }
#mem-card[hidden] { display: none; }
#mem-card.in { animation: mem-in .45s cubic-bezier(.2, .8, .3, 1.2); }
@keyframes mem-in { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
#mem-card img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; animation: mem-develop 1.2s ease-out; }
@keyframes mem-develop { from { filter: blur(6px) saturate(.6); } to { filter: none; } }
#mem-card div { flex: 1; min-width: 0; line-height: 1.25; }
#mem-card b { display: block; font: 800 15px var(--display); }
#mem-card span { font-size: 13px; color: var(--muted); }
#mem-card .pill { flex: none; padding: 9px 14px; font-weight: 800; }
#mem-card .pill.primary { background: var(--orange); color: #fff; }
#mem-chip { left: calc(var(--safe-l) + 12px); top: calc(var(--safe-t) + 58px); padding: 6px 12px; font: 800 14px var(--text); }
#mem-chip[hidden] { display: none; }
.mem-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 6px; }
.mem-slot { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 14px; border: 2px dashed #e2c592; background: #fffaf0; min-height: 104px; text-align: center; }
.mem-slot span { width: 48px; height: 52px; border-radius: 8px; background: #fff1dc; }
.mem-slot small { font-size: 11px; color: var(--muted); line-height: 1.2; }
.mem-slot.found { border: 0; background: #fff; box-shadow: 0 2px 8px rgba(13, 26, 63, .1); }
.mem-slot.found img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.mem-slot.found b { font-size: 11px; line-height: 1.2; }
.mem-reset { border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: 13px; padding: 8px 0; }
.spark { position: fixed; z-index: 23; width: 8px; height: 8px; margin: -4px; border-radius: 50%; pointer-events: none; background: #ffd23f;
  box-shadow: 0 0 8px #ffd23f; animation: spark .9s ease-out forwards; }
@keyframes spark { from { transform: rotate(var(--a)) translateY(0) scale(1); opacity: 1; } to { transform: rotate(var(--a)) translateY(-40px) scale(.3); opacity: 0; } }
#markers .mk.beacon::after { content: ""; position: absolute; right: -6px; top: -6px; width: 14px; height: 13px; animation: beacon 1.2s ease-in-out infinite;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 22'%3E%3Cpath fill='%23ff6f91' d='M12 21 2.6 11.6a5.6 5.6 0 0 1 9.4-6 5.6 5.6 0 0 1 9.4 6z'/%3E%3C/svg%3E"); }
@keyframes beacon { 0%, 100% { transform: scale(.85); } 50% { transform: scale(1.2); } }
#bubble b { font-family: var(--display); font-size: 17px; }

/* ---------- panels */
#panel { position: fixed; inset: 0; z-index: 25; background: rgba(13, 26, 63, .18); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
#panel.on { opacity: 1; visibility: visible; transition: opacity .2s; }
#panel:not(.on) { pointer-events: none; }
#panel[data-kind="track"] { background: transparent; pointer-events: none; }
#panel[data-kind="track"] .sheet { pointer-events: auto; }
.sheet { position: absolute; left: 50%; bottom: 0; width: min(100vw, 520px); max-height: 88vh; overflow-y: auto; transform: translateX(-50%); background: var(--cream); border-radius: 26px 26px 0 0;
  padding: 22px 20px calc(var(--safe-b) + 22px); box-shadow: 0 -8px 30px rgba(13, 26, 63, .18); }
@media (min-width: 700px) { .sheet { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 26px; } }
.sheet h2 { font-size: 28px; margin: 0 0 6px; }
.sheet h3 { font-size: 19px; margin: 18px 0 4px; }
.sheet .sub { margin: 0 0 12px; color: var(--muted); }
.sheet .fine { font-size: 13px; color: var(--muted); margin: 8px 0; }
.sheet .eyebrow { margin: 0; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); }
.sheet .x { position: absolute; right: 12px; top: 10px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 24px; line-height: 1; box-shadow: 0 2px 8px rgba(13, 26, 63, .1); }
.sheet label { display: block; font-weight: 700; font-size: 14px; margin: 10px 0 0; }
.sheet input, .sheet textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; border: 2px solid #efdcb8; border-radius: 14px; background: #fff; font: 16px var(--text); color: var(--ink); }
.sheet input:focus, .sheet textarea:focus { outline: none; border-color: var(--orange); }
.sheet .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sheet button.primary, .sheet form button { margin-top: 12px; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 800; background: var(--orange); color: #fff; font-size: 16px; }
.sheet .status { min-height: 1.4em; font-size: 14px; margin: 8px 0 0; }
.sheet .news { margin-top: 10px; padding-top: 6px; border-top: 2px dashed #efdcb8; }
.sheet .news form { display: flex; gap: 8px; align-items: flex-end; }
.sheet .news label { flex: 1; margin: 0; }
.sheet .quick { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet .quick button { border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 800; background: #fff; box-shadow: 0 2px 8px rgba(13, 26, 63, .1); }
.map { position: relative; margin: 10px 0 4px; border-radius: 18px; overflow: hidden; }
.map svg { display: block; width: 100%; height: auto; }
.map .pin { position: absolute; transform: translate(-50%, -50%); border: 0; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 800; background: #fff; white-space: nowrap; box-shadow: 0 2px 8px rgba(13, 26, 63, .16); line-height: 1.15; }
.map .pin small { display: block; font-weight: 600; font-size: 10px; color: var(--muted); }
.map .pin.soon { background: rgba(255, 255, 255, .8); color: var(--muted); cursor: default; }
.map .pin.built { background: var(--yellow); }
/* narrow maps: labels lean away from their neighbours so none overlap (James, 26 Nov: "everything mobile aligned") */
.map .pin[data-place="studio"] { transform: translate(-82%, -50%); }
.map .pin[data-place="glypark"] { transform: translate(-18%, -50%); }
.map .pin[data-place="mailbox"] { transform: translate(-50%, -120%); }
.map .pin[data-place="stage"] { transform: translate(-74%, -50%); }
.map .pin[data-place="park"] { transform: translate(-22%, -50%); }
.map .pin[data-place="trail"] { transform: translate(-50%, -78%); }
@media (max-width: 480px) { .map .pin { font-size: 11px; padding: 4px 8px; } .map .pin small { font-size: 9px; } }
.map .you { position: absolute; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px #fff; }
/* a photo of JC's, big (tap a frame in the world) */
.sheet.photo { padding-top: 58px; }
@media (min-width: 700px) { .sheet.photo { width: min(92vw, 760px); } }
.sheet.photo figure { margin: 0; }
.sheet.photo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 60vh; margin: 0 auto; border-radius: 16px; box-shadow: 0 8px 24px rgba(13, 26, 63, .16); }
.sheet.photo figcaption { padding: 14px 2px 0; }
.sheet.photo h2 { font-size: 24px; margin: 4px 0; }
.sheet.photo figcaption p:last-child { margin: 0; }
.ph-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.ph-nav button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; font: 800 26px/1 var(--display); box-shadow: 0 2px 8px rgba(13, 26, 63, .12); }
.ph-nav button:disabled { opacity: .35; }
.ph-nav span { font: 700 14px var(--text); color: var(--muted); min-width: 48px; text-align: center; }
/* which JC to play */
.outfit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 700px) { .outfit-grid { grid-template-columns: repeat(4, 1fr); } }
.outfit { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border: 3px solid transparent; border-radius: 20px; background: #fff; box-shadow: 0 2px 8px rgba(13, 26, 63, .08); }
.outfit img { width: 72px; height: 72px; border-radius: 50%; background: var(--cream); }
.outfit b { font-family: var(--display); font-size: 16px; }
.outfit small { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.3; }
.outfit.on { border-color: var(--orange); }
.outfit:disabled { cursor: default; }
.outfit:disabled img { filter: grayscale(1) opacity(.55); }
.player { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.player .play { margin: 0; min-width: 96px; }
.player .bar { flex: 1; height: 8px; border-radius: 4px; background: #efdcb8; overflow: hidden; }
.player .bar i { display: block; height: 100%; width: 0; background: var(--orange); }
.player span { font-variant-numeric: tabular-nums; font-size: 14px; min-width: 38px; }
.sheet.track { padding-top: 18px; }

/* ---------- drag ring, ghost finger, iris */
#ring { position: fixed; left: -42px; top: -42px; width: 84px; height: 84px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .85); z-index: 19; opacity: 0; pointer-events: none; transition: opacity .15s; }
#ring.on { opacity: 1; }
#ring i { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(13, 26, 63, .2); }
#ghost { position: fixed; left: 50%; top: 58%; z-index: 19; pointer-events: none; opacity: 0; }
#ghost.on { animation: ghost 2.1s ease-in-out 2; }
#ghost i { display: block; width: 44px; height: 44px; margin: -22px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 10px rgba(255, 255, 255, .3); }
@keyframes ghost { 0% { opacity: 0; transform: translate(0, 0); } 15% { opacity: 1; transform: translate(0, 0); } 75% { opacity: 1; transform: translate(70px, -90px); } 100% { opacity: 0; transform: translate(70px, -90px); } }
#iris { position: fixed; inset: 0; z-index: 24; pointer-events: none; background: radial-gradient(circle at 50% 55%, rgba(13, 26, 63, 0) 0, rgba(13, 26, 63, 0) 30%, #0d1a3f 31%); opacity: 0; transition: opacity .25s; }
#iris.on { opacity: 1; }

/* ---------- Read: JC's world as an editorial page (real HTML; the page itself without scripts) */
#read { background: var(--cream); }
.rd { --pad: clamp(16px, 5vw, 56px); padding-bottom: calc(var(--safe-b) + 84px); }
.rd-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 10px) var(--pad) 10px;
  background: rgba(255, 248, 234, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid #f1e3c4; }
.rd-back { flex: none; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 800; background: var(--ink); color: #fff; }
.rd-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.rd-nav::-webkit-scrollbar { display: none; }
.rd-nav a { flex: none; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; padding: 7px 12px; border-radius: 999px; background: #fff; box-shadow: 0 1px 6px rgba(13, 26, 63, .07); }
html:not(.js) .rd-back, html:not(.js) .rd-foot [data-back] { display: none; }
.rd-hero { position: relative; margin: 0 0 8px; }
.rd-hero-img { display: block; width: 100%; height: min(58vh, 560px); object-fit: cover; object-position: 50% 40%; }
.rd-hero-text { position: relative; margin: -72px var(--pad) 0; padding: 22px 22px 24px; background: #fff; border-radius: 28px; box-shadow: 0 14px 40px rgba(13, 26, 63, .12); max-width: 760px; }
@media (min-width: 900px) { .rd-hero-text { margin-left: auto; margin-right: auto; } }
.rd-eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.rd h1 { font-family: var(--display); font-weight: 800; font-size: clamp(48px, 12vw, 92px); line-height: .95; letter-spacing: -.02em; margin: 0 0 10px; }
.rd h2 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 7vw, 46px); line-height: 1.02; letter-spacing: -.01em; margin: 0 0 12px; }
.rd p { font-size: 18px; line-height: 1.6; margin: 0 0 12px; }
.rd-lede { font-size: clamp(19px, 2.4vw, 22px) !important; }
.rd-fine { font-size: 15px !important; color: var(--muted); }
.rd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.rd-btn { display: inline-flex; align-items: center; border: 0; border-radius: 999px; padding: 12px 20px; font: 800 16px var(--text); text-decoration: none; color: var(--ink); background: #fff; box-shadow: 0 2px 0 rgba(13, 26, 63, .08), 0 4px 14px rgba(13, 26, 63, .1); }
.rd-btn.primary { background: var(--orange); color: #fff; }
.rd-sec { display: grid; gap: 18px; align-items: center; margin: 26px var(--pad) 0; padding: 18px; border-radius: 32px; background: var(--tint, #fff); }
@media (min-width: 900px) { .rd-sec { grid-template-columns: 1.05fr 1fr; gap: 40px; padding: 30px; max-width: 1200px; margin-left: auto; margin-right: auto; }
  .rd-sec.flip .rd-art { order: 2; } .rd-sec:not(:has(.rd-art)) { grid-template-columns: 1fr; } }
.rd-art { position: relative; }
.rd-art img { display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: 0 10px 30px rgba(13, 26, 63, .14); }
.rd-art .rd-second { width: 58%; position: relative; margin: -60px 0 0 auto; border: 6px solid #fff; }
.rd-copy { padding: 4px 4px 8px; }
.rd blockquote { margin: 0 0 14px; font-family: var(--display); font-weight: 800; font-size: clamp(24px, 5vw, 34px); line-height: 1.15; }
.rd blockquote cite { display: block; margin-top: 8px; font: 700 15px var(--text); font-style: normal; color: var(--muted); }
.rd-ideas, .rd-topics, .rd-links, .rd-beats { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 8px; }
.rd-ideas li { background: #fff; border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px; }
.rd-ideas b { font-family: var(--display); font-size: 19px; }
.rd-ideas span { font-size: 16px; color: #2c3554; }
.rd-topics li { background: #fff; border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.rd-links a { display: block; background: #fff; border-radius: 14px; padding: 11px 14px; font-weight: 700; color: var(--ink); text-decoration: none; }
.rd-links a::after { content: " →"; color: var(--orange); }
.rd-beats li { background: #fff; border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; }
.rd-beats b { font-family: var(--display); font-size: 20px; margin-right: 8px; }
.rd-beats span { color: var(--muted); font-size: 14px; }
.rd-beats audio { width: 100%; }
.soon { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: #fff; color: var(--muted); font-size: 11px; letter-spacing: .04em; vertical-align: 1px; }
.rd-story { margin: 34px var(--pad) 0; max-width: 860px; }
@media (min-width: 900px) { .rd-story { margin-left: auto; margin-right: auto; } }
.rd-story-head { display: flex; gap: 16px; align-items: flex-end; margin-bottom: 14px; }
.rd-portrait { flex: none; width: 34%; max-width: 220px; height: auto; border-radius: 24px; box-shadow: 0 10px 30px rgba(13, 26, 63, .14); }
.rd-chapters { list-style: none; margin: 0; padding: 0; position: relative; }
.rd-chapters::before { content: ""; position: absolute; left: 21px; top: 6px; bottom: 6px; width: 3px; border-radius: 2px; background: linear-gradient(var(--orange), var(--lilac), var(--mint)); }
.rd-chapters li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 10px 0; }
.rd-chapters .n { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; font: 800 15px var(--display); box-shadow: 0 2px 10px rgba(13, 26, 63, .1); }
.rd-chapters b { font-family: var(--display); font-size: 21px; display: block; margin: 8px 0 2px; }
.rd-chapters p { font-size: 17px; margin: 0; }
.rd-dream { display: block; width: 100%; height: auto; border-radius: 24px; margin-top: 16px; box-shadow: 0 10px 30px rgba(13, 26, 63, .14); }
.rd-foot { margin: 40px var(--pad) 0; text-align: center; color: var(--muted); }
.rd-foot .rd-actions { justify-content: center; margin-bottom: 16px; }
.rd-foot p { font-size: 14px !important; }
.rd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; gap: 8px; justify-content: center; padding: 10px 12px calc(var(--safe-b) + 10px);
  background: linear-gradient(rgba(255, 248, 234, 0), rgba(255, 248, 234, .96) 35%); }
.js body:not(.reading):not(.no-world) .rd-bar { display: none; }
@media (min-width: 900px) { .rd-bar { display: none; } }
/* phones held sideways: pictures fit the short screen, and the footer carries the actions */
@media (orientation: landscape) and (max-height: 500px) {
  .rd-hero-img { height: 74vh; }
  .rd-art img { width: auto; max-width: 100%; max-height: 72vh; margin: 0 auto; }
  .rd-bar { display: none; }
  .sheet.photo img { max-height: 52vh; }
}
/* DIRECTION-3 E1.3: the Stage's screen card and invitation, the Toy Lab's quiet link (placed on the room's layout) */
#room-extras { position: fixed; z-index: 19; inset: 0; pointer-events: none; }
#room-extras [hidden] { display: none !important; }
#room-extras .stage-card { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  box-sizing: border-box; padding: 6px; text-align: center; color: var(--ink); border-radius: 6px;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 248, 234, .0), rgba(255, 214, 107, .18)); }
#room-extras .stage-card b { font: 800 clamp(13px, 3.6vw, 20px) var(--display); line-height: 1.1; }
#room-extras .stage-card span { font: 700 clamp(11px, 2.8vw, 15px) var(--display); opacity: .7; letter-spacing: .02em; }
#room-extras .stage-book { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; white-space: nowrap; }
#room-extras .toylab-link { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; white-space: nowrap;
  font: 700 13px var(--display); color: var(--ink); opacity: .78; text-decoration: underline; text-underline-offset: 3px; }
body.breathing #room-extras, body.panel-open #room-extras .stage-book { display: none; }
/* ---------- R4: the sun and moon chip (earned by finding all eight; plug/finale.ts) */
.eve-chip { right: calc(var(--safe-r) + 12px); top: calc(var(--safe-t) + 62px); width: 44px; height: 44px; padding: 0; display: grid; place-items: center; color: var(--ink);
  opacity: 0; transform: scale(.5); transition: opacity .4s, transform .5s cubic-bezier(.34, 1.56, .64, 1), background .3s, color .3s; }
.eve-chip.in { opacity: 1; transform: none; }
.eve-chip[aria-pressed="true"] { background: #2b3a67; color: #ffd66b; }
body.in-room .eve-chip, body.reading .eve-chip { display: none; }
/* ---------- R4 the interface pass (DIRECTION-4 U1): the buttons are felt and clay too, at a size a desktop screen
   deserves, and they move the way the toys do (a soft drop in, a lift under the pointer, a press under the thumb).
   Everything here moves with `translate` and `scale`, so it never fights a button's own `transform`. */
.js #world { background: linear-gradient(#c4e2fb 0%, #dff0ff 42%, #ffe9d2 78%, #ffd8b4 100%); }
/* before the first frame: three felt beads breathing, never an empty page */
.js body:not(.ready):not(.no-world) #world::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--orange); box-shadow: -30px 0 0 var(--lilac), 30px 0 0 var(--mint); animation: beads 1.2s ease-in-out infinite; }
@keyframes beads { 0%, 100% { scale: .8; opacity: .55; } 50% { scale: 1.15; opacity: 1; } }
.pill, .round { transition: translate .32s cubic-bezier(.34, 1.56, .64, 1), scale .32s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s, background .25s, color .25s; -webkit-tap-highlight-color: transparent; }
.pill { box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .95), inset 0 -3px 0 rgba(13, 26, 63, .055), 0 3px 0 rgba(13, 26, 63, .10), 0 8px 20px rgba(13, 26, 63, .12); }
.pill.primary, #dock .pill.primary, #mem-card .pill.primary { box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(160, 70, 0, .22), 0 3px 0 rgba(160, 70, 0, .28), 0 8px 20px rgba(255, 138, 31, .28); }
.round { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .95), inset 0 -4px 0 rgba(13, 26, 63, .06), 0 4px 0 rgba(13, 26, 63, .12), 0 10px 24px rgba(13, 26, 63, .16); }
@media (hover: hover) and (pointer: fine) {
  .pill:hover, .round:hover { translate: 0 -2px; scale: 1.035; }
  .pill:hover { box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .95), inset 0 -3px 0 rgba(13, 26, 63, .055), 0 5px 0 rgba(13, 26, 63, .10), 0 14px 28px rgba(13, 26, 63, .16); }
}
.pill:active, .round:active { translate: 0 2px; scale: .965; transition-duration: .08s; }
.pill:focus-visible, .round:focus-visible, #panel button:focus-visible, #panel a:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
/* the HUD and the dock arrive like the kit does: a small drop and a bounce, one after another */
@keyframes hud-drop { from { opacity: 0; translate: 0 -18px; scale: .86; } 60% { opacity: 1; translate: 0 3px; scale: 1.03; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes hud-rise { from { opacity: 0; translate: 0 22px; scale: .86; } 60% { opacity: 1; translate: 0 -3px; scale: 1.03; } to { opacity: 1; translate: 0 0; scale: 1; } }
body.hud-on #hud > .pill { animation: hud-drop .55s cubic-bezier(.3, .7, .3, 1) backwards; }
body.hud-on #hud > #b-menu { animation-delay: .07s; }
body.hud-on #hud > #b-sound { animation-delay: .14s; }
body.hud-on #hud > .round { animation: hud-rise .55s cubic-bezier(.3, .7, .3, 1) .3s backwards; }
body.hud-on #dock > * { animation: hud-rise .55s cubic-bezier(.3, .7, .3, 1) backwards; }
body.hud-on #dock > :nth-child(1) { animation-delay: .16s; }
body.hud-on #dock > :nth-child(2) { animation-delay: .23s; }
body.hud-on #dock > :nth-child(3) { animation-delay: .3s; }
@keyframes sheet-in { from { opacity: 0; translate: 0 22px; scale: .965; } }
#panel.on .sheet { animation: sheet-in .42s cubic-bezier(.2, .9, .3, 1.12); }
#bubble { box-shadow: inset 0 1.5px 0 #fff, 0 4px 0 rgba(13, 26, 63, .08), 0 14px 30px rgba(13, 26, 63, .14); }
/* a desktop screen: the same interface, one size up, with more air */
@media (min-width: 1000px) and (min-height: 640px) and (pointer: fine) {
  .pill { font-size: 17px; padding: 11px 22px; }
  #b-read { left: calc(var(--safe-l) + 22px); top: calc(var(--safe-t) + 20px); }
  #b-menu { top: calc(var(--safe-t) + 20px); padding: 11px 26px; }
  #b-sound { right: calc(var(--safe-r) + 22px); top: calc(var(--safe-t) + 20px); }
  #b-sound span { font-size: 17px; }
  #mem-chip { left: calc(var(--safe-l) + 22px); top: calc(var(--safe-t) + 80px); font-size: 15px; padding: 7px 14px; }
  .eve-chip { right: calc(var(--safe-r) + 22px); top: calc(var(--safe-t) + 80px); width: 48px; height: 48px; padding: 0; }
  .round { right: calc(var(--safe-r) + 24px); bottom: calc(var(--safe-b) + 92px); width: 78px; height: 78px; }
  .round i { width: 46px; margin-top: 6px; }
  .round span { font-size: 13px; }
  #dock { gap: 10px; padding-bottom: calc(var(--safe-b) + 22px); }
  #dock .pill { font-size: 17px; padding: 13px 22px; }
  #dock .pill.jc { padding: 5px 16px 5px 5px; }
  #dock .pill.jc img { width: 40px; height: 40px; }
  #bubble { width: min(92vw, 520px); bottom: calc(var(--safe-b) + 170px); padding: 15px 20px; font-size: 17px; }
  #bubble b { font-size: 19px; }
  #mem-card { bottom: calc(var(--safe-b) + 92px); width: min(94vw, 460px); }
  body.card-on #bubble { bottom: calc(var(--safe-b) + 102px + var(--card-h, 92px)); }
}

/* ---------------------------------------------------------------- R5 (DIRECTION-5 section 8): two corners and one dock */
body.r5 #b-brand { left: calc(var(--safe-l) + 12px); top: calc(var(--safe-t) + 12px); font-family: var(--display); font-weight: 800; font-size: 17px; padding: 9px 18px; }
body.r5 #sparks { left: calc(var(--safe-l) + 16px); top: calc(var(--safe-t) + 60px); display: flex; gap: 5px; padding: 6px 10px; border-radius: 99px; background: rgba(255, 246, 230, .88); border: 0; box-shadow: 0 2px 0 #e8c99a; cursor: pointer; }
body.r5 #sparks i { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 3px; background: transparent; box-shadow: inset 0 0 0 2px #b79a6a; transition: background .3s, box-shadow .3s, transform .3s; }
body.r5 #sparks i.on { background: #ffd23f; box-shadow: inset 0 0 0 2px #e0a020, 0 0 8px rgba(255, 210, 63, .7); transform: rotate(45deg) scale(1.12); }
body.r5 #capsule { right: calc(var(--safe-r) + 12px); top: calc(var(--safe-t) + 12px); display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(255, 246, 230, .9); box-shadow: 0 3px 0 #e8c99a, 0 6px 18px rgba(29, 37, 80, .12); }
body.r5 #capsule > * { position: static; transform: none; margin: 0; min-width: 44px; height: 44px; border-radius: 99px; box-shadow: none; }
body.r5 #capsule #b-menu { left: auto; top: auto; padding: 0 16px; }
body.r5 #capsule #b-menu:active { transform: translateY(1px); }
body.r5 #capsule #b-sound { right: auto; top: auto; padding: 0 12px; }
body.r5 #capsule .cap { display: grid; place-items: center; border: 0; background: #fff6e6; color: var(--ink); cursor: pointer; font: 800 18px var(--display); }
body.r5 #capsule .cap svg { width: 22px; height: 22px; }
body.r5 #capsule .cap:active { transform: translateY(1px); }
body.r5 #mem-chip { display: none !important; }
body.r5 #markers .mk { width: 18px; height: 18px; left: -9px; top: -9px; border-radius: 50%; background: #fff6e6; box-shadow: 0 0 0 2px rgba(29, 37, 80, .18), 0 2px 0 rgba(13, 26, 63, .1); transform-origin: 9px 9px; }
body.r5 #markers .mk i { width: 18px; height: 18px; }
body.r5 #markers .mk svg { width: 12px; height: 12px; }
body.r5 #markers .mk span { display: none !important; }
#prompt { position: fixed; left: 0; top: 0; z-index: 19; pointer-events: none; opacity: 0; transition: opacity .18s; display: flex; align-items: center; gap: 8px;
  margin-left: -10px; padding: 8px 14px; border-radius: 14px; background: #ffd23f; color: #1d2550; font: 800 15px var(--text); white-space: nowrap; box-shadow: 0 3px 0 #e0a020, 0 8px 18px rgba(29, 37, 80, .18); translate: -50% calc(-100% - 12px); }
#prompt::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: #ffd23f; }
#prompt.on { opacity: 1; }
#prompt kbd { font: 800 12px var(--text); padding: 2px 6px; border-radius: 6px; background: #fff6e6; box-shadow: 0 2px 0 #e0a020; }
#place-title { position: fixed; left: calc(var(--safe-l) + 24px); bottom: 104px; z-index: 18; pointer-events: none; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s;
  display: flex; flex-direction: column; color: #fff; text-shadow: 0 2px 0 rgba(29, 37, 80, .35), 0 0 18px rgba(29, 37, 80, .35); }
#place-title.on { opacity: 1; transform: none; }
#place-title b { font: 800 30px/1.05 var(--display); }
#place-title span { font: 700 15px var(--text); opacity: .92; }
dl.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 12px 0 0; }
dl.keys dt { font-weight: 800; } dl.keys dd { margin: 0; color: var(--muted, #5d6488); }
@media (max-width: 480px) { body.r5 #b-brand { font-size: 15px; padding: 8px 14px; } body.r5 #capsule > * { min-width: 44px; } body.r5 #capsule #b-menu { padding: 0 12px; } #place-title b { font-size: 24px; } }
/* R5: the place title sits above the Spark card and the dock */
#place-title { bottom: 168px; }
@media (max-width: 480px) { #place-title { bottom: 190px; left: calc(var(--safe-l) + 16px); } }
.sheet.world-map { width: min(100vw, 544px); overflow-y: auto; }
.world-map .atlas { margin: 12px 0; background: #acd39c; }
.world-map .atlas svg { max-height: min(27vh, 202px); width: 100%; }
.world-map .atlas { aspect-ratio: 4 / 3; width: min(100%, 33vh, 270px); margin-inline: auto; }
.world-map .atlas .pin { width: 26px; height: 26px; padding: 0; border-radius: 50%; color: #172747; background: #fff9e6; border: 1px solid #8a8964; transform: translate(-50%, -50%); line-height: 1; }
.world-map .atlas .you { z-index: 1; width: 8px; height: 8px; margin: 2px 0 0 7px; pointer-events: none; }
.destinations { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0 14px; }
.destinations button, .exhibit-nav button { border: 1px solid #e6d7bd; border-radius: 12px; background: white; color: var(--ink); padding: 8px 10px; font: 700 14px var(--text); }
.destinations button { display: flex; align-items: center; gap: 8px; text-align: left; min-height: 42px; }
.destinations b { font: 800 15px var(--display); color: #80551f; }
.exhibit h2 { padding-right: 38px; }
.exhibit-image, .exhibit video { display: block; width: 100%; height: min(35vh, 300px); object-fit: contain; background: #eee8db; border-radius: 14px; margin: 10px 0; }
.exhibit-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.exhibit-nav button { min-height: 44px; }
.exhibit-nav button:disabled { opacity: .45; }
#room-extras .workshop-link { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; white-space: nowrap; }
#room-extras button.stage-card { border: 0; pointer-events: auto; cursor: pointer; color: #fff; text-decoration: none; justify-content: center; align-items: center; padding: 0;
  background: url("img/talk-300-kids.webp") center / cover no-repeat; }
/* R7 (call 1 Dec): no caption on the screen, only a play button over the film's picture */
#room-extras .stage-card .play { width: clamp(34px, 9vw, 54px); aspect-ratio: 1; border-radius: 50%; background: rgba(13, 26, 63, .55); box-shadow: 0 0 0 3px rgba(255, 255, 255, .85);
  display: grid; place-items: center; }
#room-extras .stage-card .play::before { content: ""; margin-left: 12%; border-style: solid; border-width: .5em 0 .5em .85em; border-color: transparent transparent transparent #fff; font-size: clamp(11px, 2.6vw, 17px); }
#room-extras button.stage-card[hidden] { display: none; }
#room-extras button.stage-card b { font-size: clamp(12px, 1.5vw, 17px); }
#room-extras button.stage-card span { color: #fff; opacity: 1; font-size: 12px; }
/* R6 (30 Nov call): About me, the films (the talk's thumbnail, the Dream), one compact bar at the bottom */
#dock #b-board { position: static; width: auto; height: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 999px; }
#dock #b-board i { width: 26px; height: 8px; margin: 0; box-shadow: inset 0 2px 0 #fff8ea, 0 3px 0 -1px var(--ink), 0 6px 0 -2px var(--sky); }
#dock #b-board span { margin: 0; font-size: 15px; }
#dock #b-board.on i { box-shadow: inset 0 2px 0 var(--orange), 0 3px 0 -1px var(--ink), 0 6px 0 -2px var(--sky); }
.sheet.film iframe.talk-frame { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 14px; background: #0d1a3f; }
.sheet.film video, .sheet.film .talk-film img { display: block; width: 100%; height: auto; border-radius: 14px; background: #0d1a3f; }
.sheet.film .talk-film { position: relative; display: block; color: #fff; text-decoration: none; margin: 10px 0 4px; }
.sheet.film .talk-film span { position: absolute; left: 12px; bottom: 12px; padding: 8px 14px; border-radius: 999px; background: #ff2a2acc; font-weight: 800; }
@media (min-width: 700px) { .sheet.film { width: min(92vw, 760px); } }
.ab-hero { display: grid; gap: 20px; align-items: center; margin: 22px var(--pad) 0; max-width: 1100px; }
@media (min-width: 900px) { .ab-hero { grid-template-columns: minmax(220px, 360px) 1fr; gap: 44px; margin-left: auto; margin-right: auto; } }
.ab-portrait { display: block; width: min(100%, 360px); height: auto; border-radius: 28px; box-shadow: 0 14px 40px rgba(13, 26, 63, .14); }
.ab-path { margin: 34px var(--pad) 0; max-width: 860px; }
@media (min-width: 900px) { .ab-path { margin-left: auto; margin-right: auto; } }
.ab-steps { list-style: none; margin: 8px 0 18px; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.ab-steps li { position: relative; padding: 16px 18px 14px 64px; border-radius: 22px; background: #fff; box-shadow: 0 2px 12px rgba(13, 26, 63, .07); counter-increment: step; }
.ab-steps li::before { content: counter(step); position: absolute; left: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; font: 800 16px var(--display); }
.ab-steps b { display: block; font-family: var(--display); font-size: 22px; margin-bottom: 4px; }
.ab-steps p { font-size: 17px; margin: 0; }
.ab-film { position: relative; display: block; color: #fff; text-decoration: none; }
.ab-film img { display: block; width: 100%; height: auto; border-radius: 22px; box-shadow: 0 10px 30px rgba(13, 26, 63, .14); }
.ab-film span { position: absolute; left: 14px; right: 14px; bottom: 14px; display: grid; gap: 2px; }
.ab-film b { font: 800 18px var(--display); text-shadow: 0 2px 8px rgba(0, 0, 0, .55); }
.ab-film i { justify-self: start; font-style: normal; font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; background: #ff2a2acc; }
body.panel-open #room-extras, body.reading #room-extras { display: none; }
#field-action { position: fixed; z-index: 18; left: var(--fx, 50%); top: var(--fy, 50%); transform: translate(-50%, -100%); width: max-content; max-width: min(480px, 68vw); padding: 11px 17px; border: 1px solid #e3d5bc; border-radius: 18px; background: #fff9ee; color: var(--ink); text-align: left; box-shadow: 0 3px 14px #24344f30; }
#field-action strong { display: block; font: 800 16px var(--display); }
#field-action span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 400 14px/1.35 var(--text); margin-top: 3px; }
#field-action img { float: left; width: 44px; height: 50px; object-fit: cover; border-radius: 8px; margin-right: 10px; }
#field-action[hidden], body.panel-open #field-action, body.g1-flying #field-action, body.in-room #field-action, .rd-beats [hidden] { display: none; }
#field-action:focus-visible { outline: 3px solid #9b5616; outline-offset: 3px; }
button#g1-skip.on { pointer-events: auto; }
body.panel-open #mem-card, body.panel-open #bubble { visibility: hidden; }
body.g1-flying #bubble, body.g1-flying #mem-card, body.g1-flying #markers { display: none; }
body:has(#field-action.chapter:not([hidden])) #bubble { visibility: hidden; }
/* R7: the pop-up floats over JC now, so the card keeps its place above the bottom bar */

.media-catalog { list-style: none; padding: 0; margin: 8px 0 16px; }
.media-catalog li { display: grid; gap: 7px; padding: 12px 0; border-bottom: 1px solid #25355026; }
.media-catalog b { font: 700 16px/1.35 var(--display); }
.media-catalog audio, .featured-beat audio { width: 100%; min-width: 0; }
.media-catalog iframe { width: 100%; aspect-ratio: 16 / 9; border: none; border-radius: 10px; }
.film-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.film-actions a, .film-actions button { min-height: 44px; align-items: center; font: 700 14px var(--text); }
.film-actions a { display: inline-flex; color: #244a66; }
.film-actions button { display: none; padding: 6px 16px; border: 1px solid #526984; border-radius: 22px; color: var(--ink); background: #fffcf6; }
.catalog-ready .film-actions button:not([hidden]) { display: inline-flex; }
html:not(.catalog-ready) .featured-beat { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 899px) { .ab-portrait { width: 100%; max-width: none; max-height: 46vh; object-fit: cover; object-position: 50% 30%; } }

/* ---------- R7 (James and JC, 1 Dec call): Sparks, Acronyms and Quotes, each a list JC keeps in his editor */
#mem-card .mem-icon { display: none; flex: none; width: 56px; height: 64px; border-radius: 10px; }
#mem-card[data-kind="acronyms"] .mem-icon { display: block; background: #fff6df; box-shadow: inset 0 0 0 2px #ecd9b0;
  background-image: linear-gradient(#0d1a3f, #0d1a3f), linear-gradient(#0d1a3f88, #0d1a3f88), linear-gradient(#0d1a3f88, #0d1a3f88);
  background-size: 34px 5px, 30px 3px, 22px 3px; background-position: 11px 22px, 11px 34px, 11px 43px; background-repeat: no-repeat; }
#mem-card[data-kind="quotes"] .mem-icon { display: grid; place-items: center; background: #fff; box-shadow: inset 0 0 0 2px #0d1a3f22; }
#mem-card[data-kind="quotes"] .mem-icon::before { content: "\201C"; font: 900 54px/1 Georgia, serif; color: var(--orange); margin-top: 18px; }
#mem-card img[hidden] { display: none; }
.finds-sec { margin: 14px 0 4px; }
.finds-sec h3 { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; font: 800 18px var(--display); }
.finds-sec h3 span { font: 800 13px var(--text); color: var(--muted); }
.finds-bar { height: 8px; border-radius: 99px; background: #f1e4cc; overflow: hidden; }
.finds-bar i { display: block; height: 100%; border-radius: 99px; background: var(--orange); transition: width .4s; }
.mem-slot.found.acronyms, .mem-slot.found.quotes { justify-content: center; gap: 2px; }
.mem-slot .mem-word { font: 800 15px var(--display); font-style: normal; letter-spacing: .04em; color: var(--ink); }
.mem-slot .mem-quote { font: 900 34px/0.8 Georgia, serif; font-style: normal; color: var(--orange); height: 22px; }
.mem-slot.found.acronyms b, .mem-slot.found.quotes b { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sheet.find { padding-bottom: calc(var(--safe-b) + 28px); }
.find-note { margin: 6px 4px 4px; padding: 22px 20px 26px; background: #fff6df; border-radius: 6px; box-shadow: 0 10px 24px rgba(60, 40, 20, .16); transform: rotate(-1.2deg); }
.find-note .find-word { font-size: clamp(40px, 13vw, 60px); letter-spacing: .08em; margin: 4px 0 8px; }
.find-note .find-meaning { margin: 0; font-size: 21px; line-height: 1.35; }
.find-note .find-meaning b { color: var(--orange); font-weight: 800; font-size: 1.15em; }
.find-quote { margin: 6px 4px 4px; }
.find-quote blockquote { margin: 8px 0 10px; font: 800 clamp(22px, 6vw, 30px)/1.25 var(--display); color: var(--ink); }
.find-quote figcaption { font-weight: 800; color: var(--muted); }
.find-quote figcaption::before { content: "— "; }

/* ---------- R7 (call 1 Dec): the Time Machine, the big button in the middle of the bottom bar */
#dock .time-machine { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 10px 8px; border-radius: 24px; background: var(--ink); color: var(--cream);
  box-shadow: 0 4px 0 rgba(13, 26, 63, .35), 0 10px 24px rgba(13, 26, 63, .28); }
#dock .time-machine[hidden] { display: none; }
#dock .tm-label { font: 800 10.5px/1 var(--text); letter-spacing: .09em; text-transform: uppercase; color: var(--yellow); }
#dock .tm-faces { display: flex; gap: 5px; align-items: center; }
#dock .tm-face { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--cream); transition: transform .2s, opacity .2s, box-shadow .2s; cursor: pointer; }
#dock .tm-face img { display: block; width: 100%; height: 100%; border-radius: 50%; }
/* r7o (item 1, James + JC 3 Dec; instead of r7n's four at once): one face, the JC you play (orange ring); it and the
   label round it are one button, and the other faces pop out above it */
#dock .time-machine { position: relative; }
#dock .tm-now { box-shadow: 0 0 0 3px var(--orange), 0 0 0 5px var(--ink); }
#dock .tm-now::after { content: ""; position: absolute; inset: 0; border-radius: 24px; }
#dock .tm-pop { position: absolute; z-index: 2; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); display: flex; gap: 10px; padding: 9px 12px; border-radius: 999px; background: var(--ink);
  box-shadow: 0 4px 0 rgba(13, 26, 63, .35), 0 10px 24px rgba(13, 26, 63, .28); }
#dock .tm-pop::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 3px; background: var(--ink); transform: rotate(45deg); }
#dock .tm-pop[hidden], #dock .tm-face[hidden] { display: none; }
#dock .tm-pop .tm-face { width: 50px; height: 50px; animation: tm-pop .28s cubic-bezier(.3, 1.5, .5, 1) backwards; }
#dock .tm-pop .tm-face:nth-child(2) { animation-delay: .04s; }
#dock .tm-pop .tm-face:nth-child(3) { animation-delay: .08s; }
#dock .tm-pop .tm-face:nth-child(4) { animation-delay: .12s; }
#dock .tm-pop .tm-face:hover { transform: scale(1.06); }
@keyframes tm-pop { from { transform: translateY(26px) scale(.3); opacity: 0; } }
#dock .tm-face:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
#dock .tm-face:active { transform: scale(.94); }
#dock .tm-now:active { transform: none; } /* a transform would shrink its ::after hit area mid-click */
#dock .tm-now:active img { transform: scale(.94); }
@media (max-width: 420px) { #dock .tm-face { width: 34px; height: 34px; } #dock .time-machine { padding: 5px 8px 7px; } #dock .tm-faces { gap: 4px; } }
@media (max-width: 360px) { #dock .tm-face { width: 30px; height: 30px; } #dock .pill { padding: 10px 10px; } }
@media (min-width: 1000px) and (min-height: 640px) { #dock .tm-face { width: 44px; height: 44px; } #dock .tm-label { font-size: 12px; } #dock .time-machine { padding: 7px 14px 9px; gap: 5px; } }

/* R7 (call 1 Dec): a friend's hello, over their head */
#say { position: fixed; z-index: 17; left: 0; top: 0; transform: translate(-50%, -100%); max-width: min(260px, 70vw); padding: 8px 13px 9px; border-radius: 16px;
  background: #fff; color: var(--ink); font: 600 14px/1.3 var(--text); box-shadow: 0 4px 14px rgba(13, 26, 63, .16); pointer-events: none; text-align: center;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: visible; }
#say b { display: block; font: 800 12px var(--display); color: var(--orange); letter-spacing: .02em; }
#say::after { content: ""; position: absolute; left: calc(50% + var(--tail, 0px)); bottom: -7px; width: 14px; height: 14px; margin-left: -7px; background: #fff; transform: rotate(45deg); border-radius: 0 0 3px 0; }
#say[hidden], body.in-room #say, body.panel-open #say, body.reading #say { display: none; }
#say.in { animation: say-in .3s cubic-bezier(.2, .9, .3, 1.3); }
@keyframes say-in { from { opacity: 0; transform: translate(-50%, calc(-100% + 8px)) scale(.9); } to { opacity: 1; transform: translate(-50%, -100%) scale(1); } }

/* R7: GLY Park, open once everything is found */
.sheet.park .quick { margin-top: 14px; }
.sheet.park .park-app { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 22px; border-radius: 999px; background: var(--orange); color: #fff; font-weight: 800; text-decoration: none;
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .45), 0 3px 0 rgba(160, 70, 0, .28); }
.mk.park-open i { background: var(--yellow); }

/* ---------- R7 (James and JC, 1 Dec call): About me in jcdas.com's own look: near-black, gold, Playfair Display + Inter
   (both SIL Open Font License 1.1, shipped as files; fetched only when About me opens) */
@font-face { font-family: "Playfair Display"; src: url("fonts/playfair.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
#read, .js #read { background: #0b0a09; }
.rd.jd { --jd-gold: #c2a267; --jd-gold2: #d9bb82; --jd-text: #ece7dd; --jd-dim: #b8b1a4; --jd-muted: #918b7f; --jd-line: #e8decd1f; --jd-line2: #e8decd38;
  min-height: 100%; padding-bottom: 0; background: #0b0a09; color: var(--jd-text); font-family: "Inter", system-ui, -apple-system, sans-serif; }
.jd .rd-top { background: rgba(11, 10, 9, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--jd-line); box-shadow: none; }
.jd .rd-back { background: transparent; color: var(--jd-text); border: 1px solid var(--jd-line2); font: 600 14px "Inter", system-ui, sans-serif; }
.jd-hero { display: grid; gap: 22px; margin: 22px var(--pad) 0; max-width: 1000px; }
@media (min-width: 900px) { .jd-hero { grid-template-columns: 340px 1fr; align-items: end; gap: 52px; margin: 52px auto 0; } }
.jd-portrait { display: block; width: 100%; height: auto; max-height: 50vh; object-fit: cover; object-position: 50% 28%; border-radius: 4px; filter: saturate(.88) contrast(1.04); }
@media (min-width: 900px) { .jd-portrait { max-height: 460px; } }
.jd-eyebrow { margin: 0 0 10px !important; font: 600 12px/1.2 "Inter", system-ui, sans-serif !important; letter-spacing: .22em; text-transform: uppercase; color: var(--jd-gold) !important; }
.rd.jd h1 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(50px, 13vw, 96px); line-height: .95; letter-spacing: -.01em; margin: 0 0 14px; color: var(--jd-text); }
.rd.jd h2 { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: clamp(28px, 7vw, 40px); line-height: 1.06; margin: 0 0 10px; color: var(--jd-text); }
.rd.jd p { font-size: 16.5px; line-height: 1.62; color: var(--jd-dim); margin: 0 0 12px; }
.rd.jd .jd-lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--jd-text); }
.jd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.jd-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--jd-line2); border-radius: 999px; background: transparent;
  color: var(--jd-text); font: 600 15px "Inter", system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.jd-btn.gold { background: var(--jd-gold); border-color: var(--jd-gold); color: #0b0a09; }
.jd-btn:focus-visible { outline: 2px solid var(--jd-gold2); outline-offset: 3px; }
.jd-sec { margin: 42px var(--pad) 0; padding-top: 26px; border-top: 1px solid var(--jd-line); max-width: 1000px; }
@media (min-width: 900px) { .jd-sec { margin-left: auto; margin-right: auto; } }
.jd-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 20px; counter-reset: s; }
@media (min-width: 900px) { .jd-steps { grid-template-columns: repeat(3, 1fr); gap: 30px; } }
.jd-steps li { counter-increment: s; }
.jd-steps li::before { content: "0" counter(s); display: block; margin-bottom: 6px; font: 600 12px "Inter", sans-serif; letter-spacing: .2em; color: var(--jd-gold); }
.jd-steps b { display: block; margin-bottom: 6px; font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 23px; color: var(--jd-text); }
.rd.jd .jd-steps p { font-size: 15.5px; }
.rd.jd blockquote { margin: 6px 0 0; font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 600; font-size: clamp(24px, 5.6vw, 34px); line-height: 1.22; color: var(--jd-gold2); }
.jd-talks { display: grid; gap: 22px; }
@media (min-width: 900px) { .jd-talks { grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; } }
.jd .ab-film img { border-radius: 4px; box-shadow: none; }
.jd .ab-film b { font-family: "Playfair Display", Georgia, serif; font-weight: 700; }
.jd .ab-film i { background: var(--jd-gold); color: #0b0a09; }
.jd .jd-beats li { background: #ffffff08; border: 1px solid var(--jd-line); border-radius: 10px; color: var(--jd-text); }
.jd .jd-beats b { font-family: "Playfair Display", Georgia, serif; font-weight: 700; color: var(--jd-text); }
.jd-foot { margin: 42px var(--pad) 0; padding: 26px 0 calc(var(--safe-b) + 40px); border-top: 1px solid var(--jd-line); max-width: 1000px; }
@media (min-width: 900px) { .jd-foot { margin-left: auto; margin-right: auto; } }
.jd-mail a { color: var(--jd-gold2); font-weight: 600; }
.jd-links { list-style: none; padding: 0; margin: 6px 0 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.jd-links a { color: var(--jd-text); text-decoration: none; border-bottom: 1px solid var(--jd-line2); font-size: 14px; }
.rd.jd .jd-fine { font-size: 13.5px; color: var(--jd-muted); }

/* R7: (the Dream story and the board gallery were taken out again in James's 1 Dec review) */

/* ---------- R7 (call 1 Dec: "Map: tighter, like GLYSPACE's map"): the map is the menu, names printed on it */
.sheet.world-map { width: min(100vw, 560px); padding-top: 46px; }
.world-map .atlas.tight { position: relative; aspect-ratio: 4 / 3; width: 100%; max-height: none; margin: 0; border-radius: 22px; overflow: hidden; background: #7fc3e0; }
.world-map .atlas.tight svg { display: block; width: 100%; height: 100%; max-height: none; }
.world-map .atlas.tight .pin.named { position: absolute; width: auto; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; display: block; color: var(--ink); cursor: pointer; }
.world-map .atlas.tight .pin.named i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px #fff; }
.world-map .atlas.tight .pin.named b { position: absolute; white-space: nowrap; padding: 5px 9px; border-radius: 999px; background: #fff; font: 800 12px/1 var(--display); box-shadow: 0 2px 8px rgba(13, 26, 63, .18); }
.world-map .atlas.tight .pin.below b { left: 0; top: 10px; transform: translateX(-50%); }
.world-map .atlas.tight .pin.above b { left: 0; bottom: 10px; transform: translateX(-50%); }
.world-map .atlas.tight .pin.left b { right: 10px; top: 0; transform: translateY(-50%); }
.world-map .atlas.tight .pin.right b { left: 10px; top: 0; transform: translateY(-50%); }
.world-map .atlas.tight .pin.named:hover b, .world-map .atlas.tight .pin.named:focus-visible b { background: var(--yellow); }
.world-map .atlas.tight .you { z-index: 2; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: #2b7cff; box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgba(43, 124, 255, .25); }
@media (min-width: 500px) { .world-map .atlas.tight .pin.named b { font-size: 14px; padding: 6px 11px; } }
.map-foot { display: flex; justify-content: center; margin: 10px 0 2px; }
.map-tour { border: 0; background: none; color: var(--muted); font: 700 14px var(--text); text-decoration: underline; padding: 6px 10px; cursor: pointer; }

/* R7 (call 1 Dec): the trolley ride (src/world3d/plug/trolley) */
#trolley-skip { position: fixed; z-index: 21; left: 50%; bottom: calc(var(--safe-b) + 26px); transform: translateX(-50%); padding: 10px 18px; font-weight: 800; }
#trolley-skip[hidden] { display: none; }
body.trolley-riding #dock, body.trolley-riding #field-action, body.trolley-riding #say { visibility: hidden; }
body.trolley-riding #markers { display: none; }
/* R7m (J6): the horse's Step off sits above the dock (the controls stay while riding) */
#horse-off { position: fixed; z-index: 21; left: 50%; bottom: calc(var(--safe-b) + 84px); transform: translateX(-50%); padding: 10px 18px; font-weight: 800; }
#horse-off[hidden] { display: none; }
/* r7p (J4, call 3 Dec: "Step off is hard to see when it appears"): a big dark pill with a white ring and an arrow; it
   pops in with a bounce and pulses three times when JC mounts, then stays plainly visible while he rides */
#horse-off { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px 14px 18px; font-size: 18px; font-weight: 800; color: #fff; background: var(--ink);
  box-shadow: 0 0 0 4px #fff, 0 10px 26px rgba(13, 26, 63, .35); bottom: calc(var(--safe-b) + 116px); }
#horse-off svg { width: 22px; height: 22px; flex: none; }
#horse-off.pop { animation: off-pop .55s cubic-bezier(.3, 1.6, .5, 1) both, off-pulse 1.1s ease-in-out .55s 3; }
@keyframes off-pop { 0% { transform: translateX(-50%) translateY(24px) scale(.4); opacity: 0; } 100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; } }
@keyframes off-pulse { 0%, 100% { box-shadow: 0 0 0 4px #fff, 0 0 0 4px rgba(255, 138, 61, 0), 0 10px 26px rgba(13, 26, 63, .35); }
  50% { box-shadow: 0 0 0 4px #fff, 0 0 0 14px rgba(255, 138, 61, .55), 0 10px 26px rgba(13, 26, 63, .35); } }
/* r7p (J6): GLYSPACE social icons at the bottom of About me */
.jd-social { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 4px 0 14px; }
.jd-social .jd-fine { margin: 0; }
.jd-icons { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; }
.jd-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--jd-gold2); border: 1px solid var(--jd-line2); transition: background .2s, color .2s; }
.jd-icon:hover, .jd-icon:focus-visible { background: var(--jd-gold2); color: #111; }
