/* =====================================================================
   Wren & Wobble — A Pocketful of Weather
   Tokens come from the website kit (04-DESIGN-AND-MOTION.txt).
   ===================================================================== */

@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces-variable.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("../assets/fonts/figtree-variable.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Shantell Sans"; src: url("../assets/fonts/shantell-sans-variable.woff2") format("woff2"); font-weight: 350 650; font-style: normal; font-display: swap; }
/* Accented letters for Spanish and other Latin-1 text: downloaded only when a page uses them. */
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces-variable-accents.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; unicode-range: U+00A1-00A8, U+00AA-00B6, U+00B8-00D6, U+00D8-00E1, U+00E3-00E7, U+00EB-00EE, U+00F0, U+00F2-00F5, U+00F7-00FB, U+00FD-00FF, U+0152-0153, U+20AC; }
@font-face { font-family: "Figtree"; src: url("../assets/fonts/figtree-variable-accents.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+00A1-00A8, U+00AA-00AC, U+00AE-00B6, U+00B8-00D6, U+00D8-00E1, U+00E3-00E7, U+00EB-00EE, U+00F0, U+00F2-00F5, U+00F7-00FB, U+00FD-00FF, U+0152-0153, U+20AC; }
@font-face { font-family: "Shantell Sans"; src: url("../assets/fonts/shantell-sans-variable-accents.woff2") format("woff2"); font-weight: 350 650; font-style: normal; font-display: swap; unicode-range: U+00A1-00A8, U+00AA-00B6, U+00B8-00D6, U+00D8-00E1, U+00E3-00E7, U+00EB-00EE, U+00F0, U+00F2-00F5, U+00F7-00FB, U+00FD-00FF, U+0152-0153, U+20AC; }

:root {
  --paper: #F5E9CF;
  --paper-light: #FBF4E4;
  --paper-deep: #EAD8B4;
  --ink: #23382F;
  --ink-soft: #3B4F45;
  --deep-sea: #174C50;
  --garden: #557A52;
  --ochre: #C58A32;
  --warm: #F5CE79;
  --frost: #B8CAD8;
  --plum: #74627E;
  --rose: #CA8175;
  --ivory: #FFF7E6;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hand: "Shantell Sans", "Comic Sans MS", "Chalkboard SE", cursive;

  /* Motion knobs (see 04-DESIGN-AND-MOTION.txt) */
  --t-select: 190ms;
  --t-effect: 640ms;
  --t-settle: 220ms;
  --t-enter: 440ms;
  --ease-paper: cubic-bezier(.2, .75, .25, 1);
  --ease-settle: cubic-bezier(.34, 1.36, .64, 1);

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --focus: var(--deep-sea);
  --masthead-h: 64px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--masthead-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.62 var(--body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; }
picture { display: contents; }
[hidden] { display: none !important; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.06; margin: 0; letter-spacing: -0.012em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--ivory); padding: 10px 16px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 10px; }
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Paper reading surface: the kit's page material, kept low-contrast */
.section, .masthead { position: relative; isolation: isolate; }
.section::before, .masthead::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../assets/textures/page-seamless.webp") 0 0 / 900px auto repeat;
  opacity: .28; mix-blend-mode: multiply;
}
.section { padding-block: clamp(72px, 10vw, 136px); }
.section h2 { font-size: clamp(1.9rem, 1.1rem + 3.2vw, 3.6rem); max-width: 20ch; font-variation-settings: "opsz" 96; }
.lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); max-width: 40rem; margin-top: 1.1rem; color: var(--ink-soft); }
.note { font-family: var(--hand); font-size: 1rem; line-height: 1.45; color: var(--ink-soft); }
.section-note { margin-top: .9rem; color: var(--ink-soft); }

/* ---------- Buttons and chips ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .8em 1.35em; border-radius: 12px;
  font: 650 1.0625rem/1.1 var(--body); text-decoration: none; cursor: pointer;
  border: 0; position: relative;
  transition: transform var(--t-select) var(--ease-paper), box-shadow var(--t-select) var(--ease-paper), background-color var(--t-select);
}
.button::after { content: ""; position: absolute; inset: 4px; border: 1.5px dashed currentColor; border-radius: 9px; opacity: .28; pointer-events: none; }
.button-warm { background: var(--warm); color: var(--ink); box-shadow: 0 3px 0 #B98431, 0 10px 22px rgba(10, 30, 28, .22); }
.button-ivory { background: rgba(255, 247, 230, .12); color: var(--ivory); box-shadow: inset 0 0 0 2px rgba(255, 247, 230, .78); }
.button-ink { background: var(--deep-sea); color: var(--ivory); box-shadow: 0 3px 0 #0E3336, 0 8px 18px rgba(10, 30, 28, .18); }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px); }
.chip {
  display: inline-flex; align-items: center; gap: .45em; min-height: 40px; padding: .45em 1em;
  border-radius: 999px; border: 1.5px solid currentColor; background: transparent; cursor: pointer;
  font: 600 .9375rem/1.1 var(--body); text-decoration: none;
  transition: background-color var(--t-select), color var(--t-select);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper-light); border-color: var(--ink); }
.chip-check::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; }
.chip-check[aria-pressed="true"]::before { background: var(--warm) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.2l2.6 2.6L11 4.4' fill='none' stroke='%2323382F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--warm); }

/* ---------- Masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 50; background: var(--paper); box-shadow: 0 1px 0 rgba(197, 138, 50, .55), 0 6px 18px rgba(35, 56, 47, .08); }
.masthead-inner { width: min(1280px, 100% - 2 * var(--gutter)); margin-inline: auto; height: var(--masthead-h); display: flex; align-items: center; gap: clamp(12px, 3vw, 40px); }
.masthead-logo { display: block; flex: none; border-radius: 8px; }
.logo-box { display: block; position: relative; width: 210px; height: 48px; }
.logo-box img { position: absolute; left: 0; top: 50%; width: 100%; height: auto; transform: translateY(-50%); }
.nav { margin-left: auto; position: relative; }
.nav-list { display: flex; gap: clamp(4px, 1.4vw, 22px); list-style: none; }
.nav-list a { display: block; white-space: nowrap; padding: .5rem .7rem; border-radius: 8px; font-weight: 600; text-decoration: none; color: var(--ink); }
.nav-list a:hover { background: rgba(197, 138, 50, .16); }
.nav-list a[aria-current="true"] { box-shadow: inset 0 -3px 0 var(--ochre); }
.nav-toggle { display: none; }
.sound-toggle {
  flex: none; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .4rem .85rem .4rem .6rem;
  border-radius: 999px; border: 1.5px solid rgba(35, 56, 47, .35); background: var(--paper-light); cursor: pointer; font-weight: 600; font-size: .9375rem;
}
.sound-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-icon .spk { fill: currentColor; stroke: none; }
.sound-toggle .wave { display: none; }
.sound-toggle[data-on="true"] .wave { display: inline; }
.sound-toggle[data-on="true"] .mute { display: none; }
.sound-toggle[data-on="true"] { background: var(--deep-sea); color: var(--ivory); border-color: var(--deep-sea); }

/* ---------- Opening spread ---------- */
.opening { position: relative; display: grid; align-items: end; min-height: clamp(640px, calc(100svh - var(--masthead-h)), 960px); --focus: var(--warm); color: var(--ivory); background: var(--deep-sea); overflow: hidden; }
.opening-scene { position: absolute; inset: 0; overflow: hidden; }
.opening-scene > *, .opening-scene > picture > img { position: absolute; will-change: transform; }
.o-far { inset: -10px 0; width: 100%; height: calc(100% + 20px); object-fit: cover; object-position: 58% 42%; }
.o-shade { inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(12, 46, 49, .88) 0%, rgba(12, 46, 49, .78) 28%, rgba(12, 46, 49, .5) 43%, rgba(12, 46, 49, .12) 54%, rgba(12, 46, 49, 0) 62%), linear-gradient(0deg, rgba(12, 40, 36, .4), rgba(12, 40, 36, 0) 34%); }
.o-relief { right: -1%; bottom: -5%; width: clamp(380px, 40vw, 680px); }
.o-choir { right: clamp(12px, 5vw, 96px); bottom: 9%; width: clamp(230px, 22vw, 360px); }
.o-choir img { display: block; width: 100%; transform-origin: 50% 98%; }
.o-pair { left: 41%; bottom: 7.5%; display: flex; align-items: flex-end; gap: clamp(4px, 1vw, 16px); }
.o-wren { position: relative; display: block; height: clamp(230px, 34svh, 340px); width: auto; transform-origin: 50% 100%; filter: drop-shadow(0 6px 6px rgba(10, 25, 20, .25)); }
.o-pair { --wob-w: clamp(170px, 19svh, 236px); }
.o-pair .wobble { width: var(--wob-w); margin-bottom: 2px; }
.ground-shadow { position: absolute; left: -6%; right: -4%; bottom: -10px; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(16, 38, 30, .45), rgba(16, 38, 30, 0)); }
.greet-hint { position: absolute; right: -2.5rem; bottom: calc(var(--wob-w) * .86 + 10px); width: max-content; max-width: 12rem; font: 500 1rem/1.3 var(--hand); color: var(--ivory); text-shadow: 0 1px 2px rgba(0, 0, 0, .55); transform: rotate(-4deg); pointer-events: none; transition: opacity 400ms; }
.greeted .greet-hint { opacity: 0; }
.o-leaf { left: -2%; top: -3%; width: clamp(260px, 29vw, 470px); transform-origin: 6% 2%; filter: drop-shadow(0 18px 18px rgba(5, 20, 15, .45)) saturate(1.08); z-index: 2; }
.opening-copy { position: relative; z-index: 3; width: min(560px, 42%); margin: 0 0 clamp(36px, 7svh, 80px) clamp(24px, 6vw, 104px); padding-top: clamp(90px, 16svh, 200px); }
.opening-logo { margin: 0 0 .4rem -2%; width: min(440px, 100%); line-height: 0; }
.opening-logo img { width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .28)); }
.opening-headline { font: 600 clamp(1.75rem, 1rem + 2.1vw, 2.75rem)/1.08 var(--display); font-variation-settings: "opsz" 120; letter-spacing: -.01em; text-wrap: balance; max-width: 16ch; }
.opening-text { margin-top: .9rem; font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); color: rgba(255, 247, 230, .92); max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }

/* ---------- Wobble (greeting) ---------- */
.wobble { position: relative; display: block; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 40% 40% 30% 30%; -webkit-tap-highlight-color: transparent; }
.wobble-figure { position: relative; display: block; transform-origin: 50% 100%; }
.wobble-body { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 6px rgba(20, 20, 50, .22)); }
.wobble-ear { position: absolute; inset: 0; width: 100%; height: auto; transform-origin: 39.2% 19.8%; transition: rotate 220ms var(--ease-paper); }
@media (hover: hover) and (pointer: fine) { .wobble:hover .wobble-ear { rotate: -4deg; } }
.wobble.greet .wobble-figure { animation: wob-greet 780ms var(--ease-paper); }
.wobble.greet .wobble-ear { animation: ear-lift 1100ms var(--ease-paper); }
.yip {
  position: absolute; left: 4%; top: -14%; padding: .1em .55em; border-radius: 999px;
  font: 600 1.05rem/1.4 var(--hand); color: var(--ink); background: var(--ivory); box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  opacity: 0; transform: translateY(6px) scale(.8); pointer-events: none;
}
.wobble.greet .yip { animation: yip 1500ms var(--ease-paper); }
@keyframes wob-greet {
  0% { transform: scale(1, 1); }
  20% { transform: scale(1.055, .915); }
  46% { transform: translateY(-7px) scale(.965, 1.05); }
  72% { transform: translateY(0) scale(1.015, .985); }
  100% { transform: none; }
}
@keyframes ear-lift { 0% { rotate: 0deg; } 22% { rotate: 3deg; } 48% { rotate: -12deg; } 78% { rotate: -9deg; } 100% { rotate: 0deg; } }
@keyframes yip { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 18% { opacity: 1; transform: translateY(-4px) scale(1.04); } 30% { transform: translateY(0) scale(1); } 78% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
[data-wren].attend { animation: attend 900ms var(--ease-paper); transform-origin: 50% 100%; }
@keyframes attend { 0% { rotate: 0deg; } 35% { rotate: 1.8deg; } 70% { rotate: .6deg; } 100% { rotate: 0deg; } }

/* Paper hinges: about 1 degree over 5–7 s, each at its own phase. Running only while the scene is near view. */
.hinge { animation: hinge 6s ease-in-out infinite; animation-play-state: paused; }
.hinge-slow { animation-duration: 7s; animation-delay: -2.4s; }
.is-live .hinge { animation-play-state: running; }
@keyframes hinge { 0%, 100% { rotate: -.5deg; } 50% { rotate: .55deg; } }

/* ---------- Page entrance: once, 16 px over 440 ms ---------- */
html.js:not(.reduced) [data-enter] { opacity: 0; transform: translateY(16px); }
html.js:not(.reduced) [data-enter].entered { opacity: 1; transform: none; transition: opacity var(--t-enter) ease-out, transform var(--t-enter) var(--ease-paper); }

/* ---------- Game ---------- */
.game { background: var(--paper); }
.game-intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 56px; align-items: start; }
.beta-stamp {
  margin-top: 8px; padding: 18px 22px; max-width: 15rem; text-align: center; transform: rotate(3deg);
  border: 2px solid var(--ochre); outline: 1.5px dashed var(--ochre); outline-offset: -8px; border-radius: 10px; background: var(--paper-light);
  box-shadow: 0 8px 20px rgba(35, 56, 47, .12);
}
.beta-stamp-main { display: block; font: 650 1.45rem/1.1 var(--display); color: var(--ink); }
.beta-stamp-sub { display: block; margin-top: .35rem; font: 500 1rem/1.35 var(--hand); color: var(--ink-soft); }
.play-slot:empty { display: none; }
.play-slot { margin-top: 1.4rem; }

.jars { margin-top: clamp(56px, 8vw, 104px); }
.jars-head h3 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); }
.jars-head p { margin-top: .5rem; color: var(--ink-soft); }
.jar-shelf {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 28px; padding: 0 8px;
  position: relative; border-bottom: 12px solid #B58449; box-shadow: 0 14px 0 -6px rgba(78, 52, 22, .25);
  border-radius: 0 0 6px 6px; background: linear-gradient(transparent 72%, rgba(181, 132, 73, .16));
}
.jar-tab {
  position: relative; display: grid; justify-items: center; align-content: end; gap: 8px; min-height: 172px; padding: 10px 4px 12px;
  background: none; border: 0; cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent;
}
.jar-tab img { height: 118px; width: auto; transform-origin: 50% 100%; filter: drop-shadow(0 5px 4px rgba(40, 28, 10, .25)); transition: transform var(--t-select) var(--ease-paper), filter var(--t-select); }
.jar-tab:hover img { transform: translateY(-4px); }
.jar-name { font: 650 .975rem/1.2 var(--body); padding: .28em .8em; border-radius: 999px; border: 1.5px solid transparent; transition: background-color var(--t-select), color var(--t-select); }
.jar-tab[aria-selected="true"] img { transform: translateY(-12px) rotate(-4deg); filter: drop-shadow(0 14px 10px rgba(40, 28, 10, .3)); }
.jar-tab[aria-selected="true"] .jar-name { background: var(--ink); color: var(--paper-light); }
.jar-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 50%; bottom: -24px; width: 18px; height: 12px; translate: -50% 0; background: var(--ink); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.jar-tab:focus-visible { outline-offset: -2px; }

.jar-stage-wrap { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 44px; align-items: center; }
.jar-stage { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #2D4B45; box-shadow: 0 0 0 6px var(--paper-light), 0 0 0 7.5px rgba(197, 138, 50, .7), 0 18px 40px rgba(35, 56, 47, .22); }
.stage-bg { position: absolute; inset: -18px; width: calc(100% + 36px); max-width: none; height: calc(100% + 36px); object-fit: cover; opacity: 0; filter: blur(1.6px) saturate(.88); transition: opacity 420ms ease; }
.stage-bg.on { opacity: 1; }
.stage-veil { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(20, 30, 28, .32), rgba(20, 30, 28, 0) 45%); }
.stage-wobble { position: absolute; left: 7%; bottom: 7%; width: 30%; transform-origin: 50% 100%; z-index: 4; transition: left 520ms var(--ease-paper), bottom 520ms var(--ease-paper); }
/* over the gap his feet (and the rainbow's) sit level with the two cliff tops */
.stage-wobble.at-gap { left: 35%; bottom: 27.5%; }
.stage-wobble.at-seam { bottom: 18.5%; }
.fx { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity var(--t-select) ease, visibility 0s linear var(--t-select); }
.fx.on { opacity: 1; visibility: visible; transition: opacity var(--t-select) ease; }
.fx-tag {
  position: absolute; z-index: 6; display: flex; align-items: center; gap: .4rem; padding: .3rem .75rem .3rem .4rem;
  background: var(--paper-light); color: var(--ink); border-radius: 999px; font: 600 .95rem/1.2 var(--hand);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .22); white-space: nowrap;
}
.fx-tag img { width: auto; height: 26px; }

/* Rain: beads gather on the leaf, one runs to the tip and drips */
.fx-leaf { position: absolute; right: 4%; top: -2%; width: 48%; transform-origin: 6% 2%; }
.fx-leaf img { display: block; width: 100%; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .3)); }
.bead { position: absolute; width: 5.4%; aspect-ratio: 1; border-radius: 50%; transform: scale(0);
  background: radial-gradient(circle at 34% 30%, #fff 0 16%, rgba(214, 236, 255, .95) 26%, rgba(110, 170, 225, .7) 62%, rgba(40, 95, 150, .55) 100%);
  box-shadow: 1px 2px 2px rgba(10, 30, 20, .35); }
.play .bead { animation: bead var(--t-effect) var(--ease-settle) forwards; }
.settled .bead { transform: scale(1); }
.bead-run { position: absolute; width: 6.4%; aspect-ratio: 1; left: 50%; top: 40%; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 34% 30%, #fff 0 16%, rgba(214, 236, 255, .95) 26%, rgba(110, 170, 225, .75) 62%, rgba(40, 95, 150, .6) 100%); }
.play .bead-run { animation: bead-run 900ms var(--ease-paper) 260ms forwards; }
@keyframes bead { 0% { transform: scale(0); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes bead-run { 0% { opacity: 0; left: 40%; top: 30%; } 15% { opacity: 1; } 70% { left: 66%; top: 86%; } 85% { left: 67%; top: 92%; transform: scaleY(1.2); } 100% { left: 67%; top: 140%; opacity: 0; } }

/* Snow: frost creeps along the edge of the page */
.frost-edge { position: absolute; inset: 0; pointer-events: none; }
.frost-edge svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.frost-glow { position: absolute; inset: 0; opacity: 0; background: linear-gradient(90deg, rgba(240, 248, 255, .7), rgba(240, 248, 255, 0) 16%), linear-gradient(0deg, rgba(240, 248, 255, .7), rgba(240, 248, 255, 0) 24%); transition: opacity 640ms ease; }
.fx-snow.play .frost-glow, .fx-snow.settled .frost-glow { opacity: 1; }
.frost-edge path { stroke-dasharray: 80; stroke-dashoffset: 80; }
.play .frost-edge path { animation: draw 560ms var(--ease-paper) forwards; animation-delay: calc(var(--i, 0) * 6ms); }
.settled .frost-edge path { stroke-dashoffset: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Wind: a paper ribbon lifts (JS drives the path) */
.ribbon { position: absolute; right: 10%; bottom: 8%; width: 46%; height: 78%; overflow: visible; }

/* Sunshine: the lantern warms */
.lantern { position: absolute; right: 18%; top: 0; width: 22%; height: 72%; overflow: visible; }
.lantern .glow { opacity: 0; transform-origin: 50% 70%; transform-box: fill-box; transform: scale(.6); transition: opacity 640ms ease, transform 640ms var(--ease-settle); }
.lantern .body { transition: fill 640ms ease; }
.fx-sun.lit .lantern .glow { opacity: 1; transform: scale(1); }
.fx-sun.lit .lantern .body { fill: #F7C86A; }
.fx-sun.lit .lantern .flame { opacity: 1; }
.lantern .flame { opacity: 0; transition: opacity 500ms ease 120ms; }

/* Thunder: a brass seam lights along its length */
.seam { position: absolute; left: 0; right: 0; bottom: 13%; height: 7%; }
.seam-bar { position: absolute; inset: 0; background: linear-gradient(#E7C77C, #B8893A 45%, #8A6024); box-shadow: 0 3px 6px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .55); }
.seam-bar::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 10px 50%, #6E4C1C 0 3px, transparent 3.5px) 0 0 / 44px 100% repeat-x; }
.seam-light { position: absolute; inset: -60% 0; background: linear-gradient(90deg, rgba(255, 244, 190, 0) 0%, rgba(255, 244, 190, .95) 50%, rgba(255, 244, 190, 0) 100%) no-repeat; background-size: 30% 100%; background-position: -40% 0; filter: blur(2px); mix-blend-mode: screen; }
.play .seam-light { animation: seam-run 720ms var(--ease-paper) forwards; }
.seam-glow { position: absolute; inset: -140% -2%; background: radial-gradient(60% 50% at 50% 50%, rgba(250, 230, 140, .6), transparent 72%); opacity: 0; transition: opacity 260ms ease; }
.fx-thunder.lit .seam-glow { opacity: 1; }
.fx-thunder.lit .seam-bar { background: linear-gradient(#FFE7A6, #DDB056 45%, #A9792E); box-shadow: 0 0 14px rgba(255, 228, 140, .8), 0 3px 6px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .7); transition: background 260ms, box-shadow 260ms; }
@keyframes seam-run { to { background-position: 140% 0; } }

/* Rainbow: a stitched span between two supported edges */
.span { position: absolute; inset: 0; width: 100%; height: 100%; }
.span .stitch { stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); }
.play .span .stitch { animation: draw 760ms var(--ease-paper) forwards; animation-delay: calc(var(--i) * 55ms); }
.settled .span .stitch { stroke-dashoffset: 0; }

.jar-panel { padding: 4px 0; border-radius: 12px; }
.jar-panel .jp-label { display: flex; align-items: center; gap: .6rem; font-weight: 650; color: var(--ink-soft); }
.jar-panel .jp-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--accent, var(--ochre)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.jar-panel h4 { font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.4rem); margin-top: .55rem; }
.jar-panel .jp-text { margin-top: .8rem; font-size: 1.125rem; }
.jar-panel .jp-shape { margin-top: 1.1rem; padding-top: 1rem; border-top: 1.5px dashed rgba(197, 138, 50, .7); color: var(--ink-soft); }
.jar-panel .jp-shape strong { color: var(--ink); }
.jar-panel .jp-effect { margin-top: .7rem; font-family: var(--hand); color: var(--ink-soft); }

/* ---------- Worlds ---------- */
.worlds { --tone: #24513E; background: var(--tone); color: var(--ivory); transition: background-color 700ms ease; --focus: var(--warm); }
.worlds::before { opacity: .16; mix-blend-mode: soft-light; }
.worlds .lead { color: rgba(255, 247, 230, .9); }
.world-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 6px 4px 12px; }
.world-tab { flex: none; scroll-snap-align: start; min-height: 44px; padding: .5rem .85rem; font-size: .96875rem; border-radius: 999px; border: 1.5px solid rgba(255, 247, 230, .55); background: transparent; color: var(--ivory); cursor: pointer; font-weight: 600; transition: background-color var(--t-select), color var(--t-select); }
.world-tab:hover { background: rgba(255, 247, 230, .12); }
.world-tab[aria-selected="true"] { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.world-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: clamp(20px, 3vw, 40px); margin-top: 20px; align-items: start; border-radius: 16px; }
.section.worlds { padding-top: clamp(64px, 7vw, 96px); }
.world-scene { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: rgba(0, 0, 0, .2); box-shadow: 0 0 0 6px rgba(255, 247, 230, .9), 0 22px 50px rgba(0, 0, 0, .3); perspective: 1400px; }
.world-scene .ws { position: absolute; inset: 0; transform-origin: 0 50%; }
.world-scene .ws.enter { animation: page-in 520ms var(--ease-paper); }
.world-scene .ws.leave { animation: page-out 380ms ease forwards; }
@keyframes page-in { from { opacity: 0; transform: rotateY(-7deg) translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes page-out { to { opacity: 0; } }
.ws > * { position: absolute; will-change: transform; }
.ws .w-far { inset: -8px 0; width: 100%; height: calc(100% + 16px); object-fit: cover; }
.ws .w-relief { bottom: -2%; width: 66%; }
.ws .w-relief.at-bottom-center { left: 17%; }
.ws .w-relief.at-bottom-right { right: -1%; width: 50%; }
.ws .w-edge { width: 36%; }
.ws .w-edge.at-top-left { left: -1%; top: -1%; transform-origin: 0 0; }
.ws .w-edge.at-top-right { right: -1%; top: -1%; width: 48%; transform-origin: 100% 0; }
.ws .w-edge.at-bottom-right { right: -1%; bottom: -1%; width: 44%; transform-origin: 100% 100%; }
.ws .w-edge.at-bottom-left { left: -1%; bottom: -1%; width: 44%; transform-origin: 0 100%; }
.ws .w-set { display: block; }
.ws .w-set img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 96%; }
.ws .w-set.at-right { right: 7%; bottom: 7%; height: 60%; aspect-ratio: var(--ar); }
.ws .w-set.at-left { left: 6%; bottom: 5%; height: 70%; aspect-ratio: var(--ar); }
.ws .w-set.at-sky { right: 8%; top: 9%; width: 36%; aspect-ratio: var(--ar); }
.ws .w-set.at-sky-left { left: 8%; top: 8%; width: 30%; aspect-ratio: var(--ar); }
.world-card.turning { opacity: .3; }
.world-card { transition: opacity 220ms ease; background: var(--paper-light); color: var(--ink); border-radius: 14px; padding: 22px 22px 24px; box-shadow: 0 16px 36px rgba(0, 0, 0, .22); position: relative; }
.world-card::before { content: ""; position: absolute; inset: 7px; border: 1.5px dashed rgba(197, 138, 50, .6); border-radius: 9px; pointer-events: none; }
.world-card h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.world-card p { margin-top: .6rem; }
.world-jar { display: flex; align-items: center; gap: .7rem; margin-top: 1rem !important; padding-top: .9rem; border-top: 1.5px dashed rgba(197, 138, 50, .6); font-weight: 600; }
.world-jar img { height: 54px; width: auto; }
.world-count { font: 500 .95rem/1.3 var(--hand); color: var(--ink-soft); }

/* ---------- Gameplay ---------- */
.play-grid { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 44px; align-items: start; }
.reels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reel video, .film { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; background: #10201C; border-radius: 12px; object-fit: contain; }
.reel { margin: 0; }
.reel figcaption { margin-top: .7rem; }
.reel h3 { font-size: 1.2rem; }
.reel p { margin-top: .3rem; font-size: .975rem; color: var(--ink-soft); }
.reel .reel-meta { font: 500 .9rem/1.3 var(--hand); }
.captures { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.capture { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; border-radius: 10px; }
.capture img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 4px var(--paper-light), 0 8px 18px rgba(35, 56, 47, .18); transition: transform var(--t-select) var(--ease-paper); }
.capture:hover img { transform: translateY(-3px) rotate(-.4deg); }
.capture span { display: block; margin-top: .55rem; font-weight: 600; font-size: .975rem; }

/* ---------- Series ---------- */
.series { background: linear-gradient(180deg, var(--paper) 0%, #EFE0C2 100%); }
.series-head { max-width: 46rem; }
.series-links:empty { display: none; }
.theatre { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); margin-top: 48px; align-items: start; }
.screen { margin: 0; }
.screen-frame { padding: 10px; border-radius: 22px; background: #2C2320; box-shadow: 0 0 0 2px #B58449, 0 24px 50px rgba(35, 25, 15, .3); }
.screen-frame .film { border-radius: 14px; }
.screen-caption { margin-top: 1.1rem; }
.screen-kicker { font: 500 1rem/1.3 var(--hand); color: var(--ink-soft); }
.screen-title { font-size: clamp(1.45rem, 1.2rem + .9vw, 1.9rem); margin-top: .25rem; }
.screen-meta { margin-top: .35rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.screen-synopsis { margin-top: .6rem; }
.screen-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: .9rem; }
.screen-note { font-size: .9rem; color: var(--ink-soft); }
.transcript { margin-top: .9rem; border-top: 1.5px dashed rgba(197, 138, 50, .7); padding-top: .6rem; }
.transcript summary { cursor: pointer; font-weight: 650; min-height: 40px; display: flex; align-items: center; }
.transcript-body { margin-top: .4rem; max-height: 16rem; overflow: auto; padding-right: .5rem; font-size: 1rem; color: var(--ink-soft); }
.transcript-body p + p { margin-top: .45rem; }
.playlist-title { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.8rem); }
.episodes { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.episode {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; padding: 10px 14px 10px 10px;
  text-align: left; border: 0; border-radius: 14px; background: rgba(251, 244, 228, .75); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .35); transition: background-color var(--t-select), box-shadow var(--t-select);
}
.episode:hover { background: var(--paper-light); }
.episode[aria-current="true"] { background: var(--paper-light); box-shadow: inset 0 0 0 2.5px var(--deep-sea), 0 8px 20px rgba(35, 56, 47, .14); }
.episode img { width: 72px; height: 128px; object-fit: cover; border-radius: 8px; }
.ep-num { font: 500 .95rem/1.2 var(--hand); color: var(--ink-soft); }
.ep-title { display: block; font: 600 1.2rem/1.15 var(--display); margin-top: .2rem; }
.ep-syn { display: block; margin-top: .35rem; font-size: .975rem; color: var(--ink-soft); }
.ep-dur { display: inline-block; margin-top: .4rem; font-size: .875rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.episode[aria-current="true"] .ep-dur::after { content: " · now showing"; font-weight: 500; }

/* ---------- Characters ---------- */
.characters { background: var(--paper); }
.pair-cards { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); margin-top: 48px; }
.who { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: end; }
.who-art { position: relative; display: grid; place-items: end center; min-width: 160px; }
.who-art::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: -10px; height: 22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(35, 56, 47, .28), transparent); z-index: -1; }
.who-wren img { height: clamp(300px, 34vw, 420px); width: auto; transform-origin: 50% 100%; }
.wobble-large { width: clamp(200px, 22vw, 300px); }
.who-text h3 { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); }
.who-text p { margin-top: .7rem; font-size: 1.125rem; }
.who-text .note { margin-top: 1rem; font-size: 1rem; }

/* ---------- Beta band ---------- */
.beta { background: var(--deep-sea); color: var(--ivory); padding-block: clamp(56px, 8vw, 96px); --focus: var(--warm); position: relative; overflow: hidden; }
.beta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 80% at 18% 50%, rgba(245, 206, 121, .28), transparent 70%); pointer-events: none; }
.beta-inner { position: relative; display: flex; align-items: center; gap: clamp(20px, 4vw, 56px); }
.beta-jar { width: clamp(84px, 10vw, 130px); filter: drop-shadow(0 0 26px rgba(245, 206, 121, .55)); }
.beta-title { font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); }
.beta-sub { margin-top: .5rem; font: 500 clamp(1.1rem, 1rem + .4vw, 1.35rem)/1.4 var(--hand); color: rgba(255, 247, 230, .9); }
.beta-form { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4rem; align-items: end; }
.beta-form label { display: grid; gap: 6px; font-weight: 600; }
.beta-form input, .beta-form select { min-height: 48px; padding: .6rem .9rem; border-radius: 10px; border: 2px solid rgba(255, 247, 230, .6); background: rgba(255, 247, 230, .08); color: var(--ivory); font: inherit; }
.beta-form select option { color: var(--ink); }
.form-status { flex-basis: 100%; font-weight: 600; }

/* ---------- Press ---------- */
.press-groups { margin-top: 40px; display: grid; gap: 40px; }
.press-group h3 { font-size: clamp(1.3rem, 1.1rem + .6vw, 1.6rem); }
.press-group > p { margin-top: .3rem; color: var(--ink-soft); }
.press-items { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 16px; }
.press-item { display: grid; grid-template-rows: 160px 1fr; border-radius: 14px; background: var(--paper-light); box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .4); overflow: hidden; }
.press-preview { position: relative; height: 160px; background: repeating-conic-gradient(#EFE3CB 0 25%, #E6D6B8 0 50%) 0 0 / 18px 18px; }
.press-preview.is-photo { background: #2D4B45; }
.press-preview.is-photo img { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.press-preview img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); object-fit: contain; }
.press-body { padding: 14px 16px 16px; display: grid; gap: 4px; align-content: start; }
.press-body strong { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.press-body span { font-size: .925rem; color: var(--ink-soft); }
.press-body a { margin-top: 8px; justify-self: start; }

/* ---------- Footer ---------- */
.footer { background: #12393C; color: var(--ivory); padding-block: 56px 40px; --focus: var(--warm); }
.footer-inner { display: grid; gap: 16px; justify-items: start; }
.footer-logo { width: 220px; margin: -18px 0 -18px -6px; }
.footer-line { font: 600 1.2rem/1.3 var(--display); }
.footer-nav, .footer-social { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a, .footer-social a { display: inline-block; padding: .35rem 0; font-weight: 600; text-decoration: none; }
.footer-nav a:hover, .footer-social a:hover { text-decoration: underline; }
.footer-social:empty { display: none; }
.footer-small { font-size: .9rem; color: rgba(255, 247, 230, .78); }

/* ---------- Lightbox ---------- */
.lightbox { width: min(1100px, 94vw); max-height: 94vh; padding: 18px; border: 0; border-radius: 16px; background: var(--paper-light); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.lightbox::backdrop { background: rgba(14, 30, 28, .78); }
.lightbox figure { margin: 0; }
.lightbox img { display: block; width: 100%; height: auto; max-height: calc(94vh - 150px); object-fit: contain; border-radius: 10px; background: #233; }
.lightbox figcaption { margin-top: .7rem; font-weight: 650; }
.lightbox-count { font-weight: 500; color: var(--ink-soft); }
.lightbox-close-form { position: absolute; right: 12px; top: 10px; z-index: 2; }
.lightbox-close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper-light); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.lightbox-nav { display: flex; gap: 10px; margin-top: .8rem; }

/* ---------- Setup notes (only with ?setup in the address) ---------- */
.setup-note { display: none; }
html.setup-mode .setup-note {
  display: block; margin-top: 1rem; padding: .7rem .9rem; max-width: 44rem; border: 2px dashed #B9862F; border-radius: 10px;
  background: #FFF6DC; color: #2B2A22; font: 500 .9rem/1.45 var(--body);
}
html.setup-mode .setup-note strong { font-weight: 700; }
.setup-panel { position: fixed; right: 14px; bottom: 14px; z-index: 80; width: min(360px, calc(100vw - 28px)); max-height: 60vh; overflow: auto; padding: 14px 16px; border-radius: 12px; background: #FFF6DC; color: #2B2A22; border: 2px dashed #B9862F; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); font-size: .9rem; line-height: 1.45; }
.setup-panel h2 { font-size: 1.05rem; margin-bottom: .4rem; }
.setup-panel ul { padding-left: 1.1rem; display: grid; gap: .35rem; }
.noscript { padding: 1rem var(--gutter); background: var(--paper-deep); }

/* =====================================================================
   Tablet
   ===================================================================== */
@media (max-width: 1024px) {
  .opening-copy { width: min(470px, 47%); margin-left: 32px; }
  .o-pair { left: 50%; }
  .o-choir { right: 1%; width: clamp(180px, 19vw, 240px); }
  .jar-shelf { gap: 4px; }
  .jar-tab img { height: 100px; }
  .jar-stage-wrap { grid-template-columns: 1fr; }
  .world-view { grid-template-columns: 1fr; }
  .play-grid { grid-template-columns: 1fr; }
  .reels { max-width: 560px; }
  .who { grid-template-columns: 1fr; justify-items: start; }
}

/* =====================================================================
   Phone: text above the scene, faces visible, labels exposed
   ===================================================================== */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .8rem; border-radius: 999px;
    border: 1.5px solid rgba(35, 56, 47, .35); background: var(--paper-light); font-weight: 600; cursor: pointer;
  }
  .nav-toggle-bars { width: 16px; height: 2px; background: currentColor; position: relative; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .nav-list { display: none; position: absolute; right: 0; top: calc(100% + 10px); flex-direction: column; gap: 2px; min-width: 210px; padding: 8px; border-radius: 14px; background: var(--paper-light); box-shadow: 0 18px 40px rgba(0, 0, 0, .2), inset 0 0 0 1.5px rgba(197, 138, 50, .5); }
  .nav-list.open { display: flex; }
  .nav-list a { padding: .75rem .9rem; }
  .opening { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .opening.pm-open { min-height: calc(100svh - var(--masthead-h)); }
  .opening-copy { order: -1; width: auto; margin: 0; padding: 28px var(--gutter) 30px; background: linear-gradient(180deg, #123F42, var(--deep-sea)); }
  .opening-logo { width: min(78vw, 380px); margin: 0 0 .2rem -1%; }
  .opening-headline { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.4rem); max-width: none; }
  .opening-scene { position: relative; inset: auto; height: clamp(330px, 92vw, 540px); }
  .o-shade { background: linear-gradient(180deg, rgba(23, 76, 80, .5), rgba(23, 76, 80, 0) 22%); }
  .o-far { object-position: 62% 50%; }
  .o-relief { width: 74%; right: -6%; bottom: -6%; }
  .o-choir { width: 36%; right: 2%; bottom: 7%; }
  .o-pair { left: 18%; bottom: 6%; }
  .o-wren { height: clamp(190px, 44vw, 330px); }
  .o-pair { --wob-w: clamp(124px, 29vw, 220px); }
  .o-leaf { width: 44%; left: -4%; top: -3%; }
  .greet-hint { right: -3.2rem; bottom: calc(var(--wob-w) * .95 + 16px); font-size: .95rem; }
}

@media (max-width: 760px) {
  :root { --masthead-h: 58px; }
  /* Phone opening: the painted spread comes first, with the title logo set on it like a book cover,
     so Wren, Wobble and the name are all in the first screen. The words follow underneath. */
  .opening-scene { order: 0; height: clamp(380px, 108vw, 470px); }
  .opening-copy { order: 1; padding-top: 22px; position: static; }
  .opening-copy > :not(.opening-logo) { position: relative; z-index: 3; }
  .opening-logo { position: absolute; z-index: 5; top: 12px; left: 50%; width: min(62vw, 300px); margin: 0; translate: -50% 0; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
  .o-shade { background: linear-gradient(180deg, rgba(12, 46, 49, .62), rgba(12, 46, 49, .25) 30%, rgba(12, 46, 49, 0) 46%), linear-gradient(0deg, rgba(12, 46, 49, .55), rgba(12, 46, 49, 0) 18%); }
  .o-leaf { width: 40%; top: 14%; }
  .opening .actions { position: static; }
  html.js:not(.reduced) .opening .actions[data-enter] { transform: none; }
  .play-open { position: absolute; z-index: 6; top: calc(16px + min(62vw, 300px) * .667); left: 64%; translate: -50% 0; min-height: 44px; padding: .25rem .9rem .25rem .45rem; background: rgba(12, 46, 49, .72); backdrop-filter: blur(3px); }
  .play-open img { width: 19px; height: 30px; }
  .world-tabs { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  body { font-size: 1.0625rem; }
  .logo-box { width: 168px; height: 40px; }
  .sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sound-toggle { padding: .4rem; width: 44px; justify-content: center; }
  .masthead-inner { gap: 8px; }
  /* phone top bar: logo, then three 44px controls that always fit in 360px */
  .nav-toggle { width: 44px; padding: 0; justify-content: center; }
  .nav-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav { margin-left: auto; }


  .game-intro { grid-template-columns: 1fr; }
  .beta-stamp { justify-self: start; transform: rotate(-2deg); }
  .jar-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 6px; border-bottom-width: 10px; }
  .jar-tab { min-height: 150px; }
  .jar-tab img { height: 94px; }
  .jar-tab[aria-selected="true"]::after { display: none; }
  .jar-stage { aspect-ratio: 4 / 3; }
  .stage-wobble.at-gap { bottom: 22.5%; }
  .fx-tag { font-size: .875rem; }
  .world-scene { aspect-ratio: 4 / 3; }
  .ws .w-far { object-position: 50% 50%; }
  .reels { grid-template-columns: 1fr 1fr; gap: 12px; }
  .captures { grid-template-columns: 1fr 1fr; gap: 10px; }
  .capture span { font-size: .875rem; }
  .theatre { grid-template-columns: 1fr; }
  .screen { max-width: 440px; width: 100%; margin-inline: auto; }
  .episode { grid-template-columns: 60px minmax(0, 1fr); gap: 12px; }
  .episode img { width: 60px; height: 107px; }
  .pair-cards { grid-template-columns: 1fr; }
  .who { grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; }
  .who-wren img { height: 240px; }
  .wobble-large { width: 170px; }
  .beta-inner { align-items: flex-start; }
  .footer-logo { width: 190px; }
}

@media (max-width: 400px) {
  .who { grid-template-columns: 1fr; }
  .fx-tag { font-size: .8125rem; }
}

/* =====================================================================
   Reduced motion: same composition, no travel
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .hinge { animation: none !important; }
  .opening-scene > *, .opening-scene > picture > img, .ws > * { transform: none !important; }
}
html.reduced .hinge { animation: none; }
html.paused .hinge { animation-play-state: paused !important; }
.wobble.ear-up .wobble-ear { rotate: -10deg; }
.wobble.yip-on .yip { opacity: 1; transform: none; }


h1, h2, h3, h4 { text-wrap: balance; }

/* =====================================================================
   Upgrade layer: rig, WebGL stage, story, weather, book, seals
   ===================================================================== */

/* ---------- Wobble's rig ---------- */
.rig { position: relative; display: block; width: 100%; aspect-ratio: 620 / 525; }
.rig-hop, .rig-cloud { position: absolute; inset: 0; transform-origin: 50% 100%; will-change: transform; }
.rig-part { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; user-select: none; }
.rig-body { filter: drop-shadow(0 6px 6px rgba(20, 20, 50, .22)); }
.rig-lid { transform: scaleY(0); }
.rig-shape { position: absolute; left: 50%; bottom: calc(var(--sy, 0) * -100%); width: calc(var(--sw, 1) * 100%); transform-origin: 50% 100%; opacity: 0; pointer-events: none; }
.rig-shape-img { display: block; width: 100%; height: auto; filter: drop-shadow(0 8px 8px rgba(20, 20, 50, .25)); }
.rig-shape[data-kind="sun"] .rig-shape-img { filter: drop-shadow(0 0 26px rgba(255, 200, 90, .65)) drop-shadow(0 8px 8px rgba(60, 30, 0, .2)); }
.rig-shape[data-kind="thunder"] .rig-shape-img { filter: drop-shadow(0 0 14px rgba(246, 224, 74, .35)) drop-shadow(0 8px 8px rgba(20, 10, 50, .3)); }
.rig-fluff { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.rig-puff { position: absolute; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #fff, #F3EFF7 52%, #D6CDE6); box-shadow: 0 2px 4px rgba(40, 30, 70, .15); }
.rig-rived > .rig-hop, .rig-rived > .rig-shape, .rig-rived > .rig-fluff { visibility: hidden; }
.rig-rive { position: absolute; inset: -20% -20% 0; width: 140%; height: 120%; pointer-events: none; }
.rig-flying-jar { filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .3)); }
.wobble .rig { pointer-events: none; }
.wobble:hover .wobble-ear { rotate: 0deg; }

/* ---------- WebGL stage in the opening ---------- */
.stage-gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
/* hidden by opacity, not visibility, so the choir's description stays available to screen readers */
.opening-scene.gl-ready .o-far, .opening-scene.gl-ready .o-relief, .opening-scene.gl-ready .o-choir { opacity: 0; }
.opening-scene .o-shade { z-index: 1; }
.opening-scene .o-relief, .opening-scene .o-choir { z-index: 1; }
.opening-scene .o-pair { z-index: 2; transform-style: preserve-3d; }
.opening-scene .o-leaf { z-index: 3; }
.stage-light { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: soft-light; opacity: .7;
  background: radial-gradient(38% 46% at var(--lx, 30%) var(--ly, 25%), rgba(255, 220, 150, .75), rgba(255, 220, 150, 0) 70%); }
html[data-tier="still"] .stage-light { display: none; }
.seal-slot-opening { position: absolute; z-index: 4; right: clamp(150px, 21vw, 330px); bottom: 3.5%; }


/* pop-up cues: a paper tab the pair stands on, and the stacked page edges of the book */
.o-pair::before { content: ""; position: absolute; left: -7%; right: -9%; bottom: -12px; height: 18px; z-index: 0; background: linear-gradient(180deg, #F4E8CE, #D9C59E); clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%); filter: drop-shadow(0 4px 4px rgba(10, 25, 20, .35)); }
.o-pair::after { content: ""; position: absolute; left: -2%; right: -4%; bottom: -12px; height: 0; z-index: 0; border-top: 1.5px dashed rgba(140, 105, 60, .5); }
.o-pair > .o-wren, .o-pair > .wobble { position: relative; z-index: 1; }
.o-pair > .ground-shadow, .o-pair > .greet-hint { z-index: 1; }
.opening-scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; z-index: 4; pointer-events: none; background: repeating-linear-gradient(180deg, #F3E7CF 0 2px, #D3BF98 2px 3px); box-shadow: 0 -3px 8px rgba(0, 0, 0, .25); }

/* ---------- Chapter ribbons and page turns ---------- */
.ribbons { display: none; }
@media (min-width: 1100px) {
  .ribbons { display: block; position: fixed; z-index: 44; right: 0; top: 50%; translate: 0 -50%; width: 52px; padding: 10px 0 10px 8px; border-radius: 14px 0 0 14px; background: rgba(251, 244, 228, .92); box-shadow: -4px 8px 22px rgba(20, 30, 30, .22), inset 0 0 0 1.5px rgba(197, 138, 50, .45); view-transition-name: ribbons; }
  /* a column that grows leftwards: an opened ribbon never pushes the others off the edge */
  .ribbons ol { list-style: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; width: 100%; }
  .ribbons li { display: flex; justify-content: flex-end; width: 100%; }
  .ribbons a { flex: none; }
  .ribbons a { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 36px; min-width: 40px; padding: 0 9px 0 16px; background: var(--tone); color: #FFF7E6; font: 650 .875rem/1 var(--body); text-decoration: none; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 9px 50%); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); transition: padding var(--t-select) var(--ease-paper), filter var(--t-select); }
  .ribbons a[aria-current] { padding-right: 15px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18), inset -4px 0 0 #F5CE79; }
  .ribbons a:hover, .ribbons a:focus-visible { filter: brightness(1.08); }
  .ribbons a:focus-visible { outline: 3px solid var(--deep-sea); outline-offset: 2px; clip-path: none; border-radius: 6px 0 0 6px; }
  .ribbon-icon svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .ribbon-label { display: block; max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 260ms var(--ease-paper); }
  .ribbons a:hover .ribbon-label, .ribbons a:focus-visible .ribbon-label { max-width: 12rem; }
  .opening.pm-open ~ .ribbons, html:has(.opening.pm-open) .ribbons { display: none; }
}
.masthead { view-transition-name: masthead; }
.companion { view-transition-name: companion; }
::view-transition-group(masthead), ::view-transition-group(ribbons), ::view-transition-group(companion) { animation: none; }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; animation-duration: 680ms; animation-timing-function: cubic-bezier(.45, 0, .2, 1); animation-fill-mode: both; }
::view-transition-old(root) { z-index: 2; transform-origin: 0 50%; animation-name: vt-turn-next; box-shadow: 18px 0 48px rgba(10, 20, 20, .45); }
::view-transition-new(root) { z-index: 1; animation-name: vt-under; }
html[data-turn="back"]::view-transition-old(root) { transform-origin: 100% 50%; animation-name: vt-turn-back; }
@keyframes vt-turn-next { from { transform: perspective(2600px) rotateY(0); filter: brightness(1); } to { transform: perspective(2600px) rotateY(-96deg); filter: brightness(.62); } }
@keyframes vt-turn-back { from { transform: perspective(2600px) rotateY(0); filter: brightness(1); } to { transform: perspective(2600px) rotateY(96deg); filter: brightness(.62); } }
@keyframes vt-under { from { filter: brightness(.78); } to { filter: brightness(1); } }
h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }

/* ---------- Paper film controls ---------- */
.screen-frame { position: relative; }
.pc-big { position: absolute; z-index: 2; left: 50%; top: 46%; translate: -50% -50%; width: 76px; height: 76px; border-radius: 50%; border: 0; background: rgba(251, 244, 228, .94); color: var(--ink); cursor: pointer; box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 0 0 2px rgba(197, 138, 50, .6); transition: opacity 200ms, scale 200ms var(--ease-paper); }
.pc-big .pc-icon svg { width: 34px; height: 34px; margin-left: 4px; }
.pc-big:hover { scale: 1.06; }
.pc-playing .pc-big { opacity: 0; pointer-events: none; scale: .9; }
.pc-bar { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 14px; background: rgba(251, 244, 228, .94); color: var(--ink); box-shadow: 0 8px 20px rgba(0, 0, 0, .3), inset 0 0 0 1.5px rgba(197, 138, 50, .55); transition: opacity 260ms; }
.pc-playing:not(:hover):not(:focus-within) .pc-bar { opacity: 0; }
.pc-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: none; color: inherit; cursor: pointer; }
.pc-btn:hover { background: rgba(197, 138, 50, .16); }
.pc-icon svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.pc-time { flex: none; font: 600 .8125rem/1 var(--body); font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.pc-seek { flex: 1; min-width: 40px; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; --p: 0%; }
.pc-seek::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--warm) var(--p), rgba(35, 56, 47, .2) var(--p)); }
.pc-seek::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(35, 56, 47, .2); }
.pc-seek::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--warm); }
.pc-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--deep-sea); border: 3px solid var(--paper-light); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.pc-seek::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--deep-sea); border: 3px solid var(--paper-light); }
.screen-frame:fullscreen { display: grid; place-items: center; background: #0B1715; padding: 0; border-radius: 0; }
.screen-frame:fullscreen .film { width: auto; height: 100vh; max-width: 100vw; border-radius: 0; }
@media (max-width: 760px) { .pc-time { display: none; } .pc-bar { left: 10px; right: 10px; bottom: 10px; } }

/* ---------- Read it to me ---------- */
.read-toggle { position: absolute; z-index: 4; right: clamp(16px, 3vw, 40px); top: 18px; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .9rem .4rem .65rem; border-radius: 999px; border: 1.5px solid rgba(255, 247, 230, .5); background: rgba(10, 32, 36, .55); color: var(--ivory); font: 650 .9375rem/1 var(--body); cursor: pointer; backdrop-filter: blur(4px); }
.read-toggle.on { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.read-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.intro .w { transition: color 120ms, text-shadow 120ms; }
.intro.reading .beat .w { color: rgba(255, 247, 230, .72); }
.intro.reading .beat .w.said { color: var(--ivory); }
.intro.reading .beat .w.saying { color: #FFE39A; text-shadow: 0 0 14px rgba(255, 210, 120, .6), 0 2px 12px rgba(0, 0, 0, .45); }
.intro.is-static .read-toggle { position: static; justify-self: start; }
@media (max-width: 760px) { .read-toggle { top: auto; bottom: 14px; right: 14px; } }

/* ---------- Companion Wobble ---------- */
.companion { position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: 96px; transition: transform 520ms var(--ease-settle), opacity 300ms; }
.companion[data-state="hidden"] { transform: translateY(140%); opacity: 0; pointer-events: none; }
.companion-wob { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 40%; filter: drop-shadow(0 8px 10px rgba(20, 30, 40, .28)); }
.companion-home { position: absolute; top: -6px; right: -6px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(35, 56, 47, .35); background: var(--paper-light); color: var(--ink); font: 700 1rem/1 var(--body); cursor: pointer; opacity: 0; transition: opacity 200ms; }
.companion:hover .companion-home, .companion:focus-within .companion-home { opacity: 1; }
@media (hover: none) { .companion-home { opacity: .85; } }
.companion-home::before { content: ""; position: absolute; inset: -8px; }
.companion-bubble { position: absolute; width: max-content; right: 70%; bottom: 82%; padding: .3rem .65rem; border-radius: 14px 14px 4px 14px; background: var(--paper-light); color: var(--ink); font: 600 .95rem/1.2 var(--hand); white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); opacity: 0; scale: .7; transform-origin: 100% 100%; transition: opacity 200ms, scale 260ms var(--ease-settle); pointer-events: none; }
.companion-bubble.on { opacity: 1; scale: 1; }
.companion.shiver .companion-wob { animation: c-shiver 180ms linear 8; }
@keyframes c-shiver { 25% { translate: -1.5px 0; } 75% { translate: 1.5px 0; } }
.companion.windy .companion-wob { animation: c-windy 2.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes c-windy { 50% { rotate: -4deg; translate: -3px 0; } }
.companion.glow .companion-wob { filter: drop-shadow(0 0 16px rgba(255, 200, 110, .7)) drop-shadow(0 8px 10px rgba(20, 30, 40, .28)); }
.companion.watching { transform: translateY(18%); }
.companion-back { margin-top: 14px; color: var(--ivory); border-color: rgba(255, 247, 230, .45); }
@media (max-width: 760px) {
  .companion { width: 58px; right: 0; transform: translateX(26%); }
  .companion.scrolling, .companion[data-state="hidden"] { transform: translateX(26%) translateY(150%); }
  .companion-bubble { font-size: .85rem; right: 60%; bottom: calc(100% + 18px); }
  .companion.scrolling .companion-bubble { opacity: 0; }
  .companion-home { top: -10px; right: auto; left: -10px; }
}
@media (prefers-reduced-motion: reduce) { .companion { transition: opacity 200ms; } .companion.shiver .companion-wob, .companion.windy .companion-wob { animation: none; } }

/* ---------- The paper remembers the weather ---------- */
.journal-mood-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(197, 138, 50, .1); }
.journal-mood-row[hidden] { display: none; }
.journal-mood { font: 500 1rem/1.35 var(--hand); color: var(--ink-soft); }
html[data-mood="snow"] :is(.press-item, .episode, .world-card, .jar-panel, .beta-stamp) { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .85), inset 0 0 22px rgba(196, 224, 248, .65), 0 6px 16px rgba(35, 56, 47, .08); }
html[data-mood="sun"] .section::before { filter: sepia(.35) saturate(1.3) brightness(1.03); opacity: .34; }
html[data-mood="sun"] .section { background-image: radial-gradient(90% 60% at 8% 0%, rgba(255, 214, 140, .16), transparent 70%); }
html[data-mood="rain"] .section { background-image: radial-gradient(6% 9% at 12% 22%, rgba(46, 95, 152, .06), transparent 70%), radial-gradient(5% 7% at 86% 64%, rgba(46, 95, 152, .055), transparent 70%), radial-gradient(4% 6% at 64% 88%, rgba(46, 95, 152, .05), transparent 70%); }
html[data-mood="wind"] :is(.press-item:nth-child(3n+1), .episode:nth-child(odd)) { rotate: -.5deg; }
html[data-mood="wind"] :is(.press-item:nth-child(3n+2), .episode:nth-child(even)) { rotate: .4deg; }
html[data-mood="thunder"] :is(.press-item, .episode, .world-card) { box-shadow: inset 0 0 0 1.5px #D7AE5A, 0 0 0 1px rgba(215, 174, 90, .25), 0 6px 18px rgba(80, 60, 20, .12); }
html[data-mood="bow"] .section h2 { line-height: 1.34; }
@media (max-width: 760px) { html[data-mood="bow"] .section h2 { line-height: 1.46; } }
html[data-mood="bow"] .section h2 .h-ink { padding-bottom: .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: repeating-linear-gradient(90deg, #D9706F 0 7px, transparent 7px 10px, #E59A55 10px 17px, transparent 17px 20px, #E9C75E 20px 27px, transparent 27px 30px, #86B57C 30px 37px, transparent 37px 40px, #6E9ED3 40px 47px, transparent 47px 50px, #9C86CB 50px 57px, transparent 57px 60px) left bottom / 100% 3px no-repeat; }
@media (prefers-reduced-motion: reduce) { html[data-mood="wind"] :is(.press-item, .episode) { rotate: none; } }

/* ---------- A playable minute ---------- */
.play-open { display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .3rem 1rem .3rem .55rem; border: 0; border-radius: 999px; background: rgba(255, 247, 230, .12); color: var(--ivory); font: 650 1rem/1 var(--body); cursor: pointer; box-shadow: inset 0 0 0 1.5px rgba(255, 247, 230, .45); transition: background-color var(--t-select); }
.play-open:hover { background: rgba(255, 247, 230, .22); }
.play-open img { width: 23px; height: 36px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.opening.pm-open .opening-copy, .opening.pm-open .opening-scene { visibility: hidden; }
.pm { position: absolute; inset: 0; z-index: 8; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; padding: clamp(14px, 2.4vw, 28px) var(--gutter) clamp(16px, 2.4vw, 28px); background: radial-gradient(120% 90% at 30% 10%, #1D5A5C, #0F3436 70%); color: var(--ivory); }
.pm[hidden] { display: none; }
.pm-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; width: min(1120px, 100%, (100svh - var(--masthead-h) - 300px) * 1.6); margin-inline: auto; }
.pm-eyebrow { font: 500 1rem/1.2 var(--hand); color: #F5CE79; }
.pm-title { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); margin-top: .15rem; }
/* headings take focus only so screen readers hear the new puzzle; they are not controls */
.pm-title:focus, .pm-end h3:focus { outline: none; }
.pm-count { margin-top: .2rem; font-size: .9375rem; color: rgba(255, 247, 230, .78); }
.pm-close { position: static; flex: none; }
.pm-board { position: relative; justify-self: center; align-self: center; width: min(1120px, 100%, (100svh - var(--masthead-h) - 300px) * 1.6); aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 6px rgba(255, 247, 230, .92), 0 24px 50px rgba(0, 0, 0, .35); background: #2D4B45; }
.pm-bg { position: absolute; inset: -2%; width: 104%; max-width: none; height: 104%; object-fit: cover; filter: saturate(.9) brightness(.92); }
.pm-stage { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 16 / 10; }
.pm-terrain, .pm-terrain svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.p-wren { position: absolute; height: 29%; aspect-ratio: 588 / 1280; translate: -50% 0; z-index: 3; --face: 1; }
.p-wren img { display: block; width: 100%; height: 100%; transform: scaleX(var(--face)); transform-origin: 50% 100%; filter: drop-shadow(0 5px 5px rgba(10, 20, 20, .35)); transition: transform 160ms; }
.p-wren.walking img { animation: p-walk 380ms ease-in-out infinite; }
.p-wren.squash img { transform: scaleX(var(--face)) scaleY(.86); }
.p-wren.hanging img { transform: scaleX(var(--face)) rotate(-6deg); }
/* the kite string, from her raised hand straight up to Wobble */
.p-wren.hanging::before { content: ""; position: absolute; left: 56%; bottom: 88%; width: 106%; height: 1.5px; background: #4A3524; transform-origin: 0 50%; rotate: -43.6deg; }
@keyframes p-walk { 0%, 100% { translate: 0 0; rotate: 0deg; } 25% { translate: 0 -4%; rotate: -2deg; } 75% { translate: 0 -4%; rotate: 2deg; } }
.p-wob { position: absolute; width: 13%; translate: -50% 0; z-index: 2; transition-property: left, bottom; transition-timing-function: var(--ease-paper); }
.p-wob.target::after { content: ""; position: absolute; inset: -18%; border-radius: 50%; border: 3px dashed rgba(245, 206, 121, .9); animation: p-pulse 900ms ease-in-out infinite; }
@keyframes p-pulse { 50% { scale: 1.08; } }
.p-bubble { position: absolute; z-index: 4; translate: -50% 0; padding: .3rem .75rem; border-radius: 14px; background: #FFF7E6; border: 1.5px solid #C58A32; color: var(--ink); font: 600 1rem/1.2 var(--hand); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); opacity: 0; scale: .7; transition: opacity 200ms, scale 260ms var(--ease-settle); pointer-events: none; }
.p-bubble.on { opacity: 1; scale: 1; }
.p-flag { animation: p-flag 2.6s ease-in-out infinite; transform-box: fill-box; }
@keyframes p-flag { 50% { rotate: 3deg; } }
/* fixed columns, so the bottles never move under the pointer when the note changes */
.pm-foot { display: grid; grid-template-columns: auto minmax(0, 26rem); align-items: center; justify-content: center; gap: 14px 28px; width: min(1120px, 100%); margin-inline: auto; }
.pm-tray { display: flex; gap: 12px; }
.pm-jar { display: grid; justify-items: center; gap: 4px; min-width: 84px; padding: 8px 10px 6px; border: 0; border-radius: 14px; background: rgba(255, 247, 230, .1); color: var(--ivory); font: 650 .9375rem/1 var(--body); cursor: grab; touch-action: none; box-shadow: inset 0 0 0 1.5px rgba(255, 247, 230, .3); transition: background-color var(--t-select), transform var(--t-select) var(--ease-paper); }
.pm-jar img { height: 64px; width: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); pointer-events: none; }
.pm-jar:hover:not(:disabled) { background: rgba(255, 247, 230, .2); transform: translateY(-3px); }
.pm-jar:disabled { cursor: default; opacity: .78; }
.pm-jar.tried { box-shadow: inset 0 0 0 1.5px rgba(255, 247, 230, .15); }
.pm-jar.tried span::after { content: " (tried)"; font-weight: 400; color: rgba(255, 247, 230, .7); }
.p-drag { filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .4)); }
.pm-side { display: grid; gap: 8px; justify-items: start; max-width: 30rem; }
.pm-note { font: 500 1.125rem/1.35 var(--hand); color: #FFE9B5; min-height: 2.7em; width: 100%; }
.pm .chip { color: var(--ivory); border-color: rgba(255, 247, 230, .45); }
.pm-end { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; padding: 24px var(--gutter); background: radial-gradient(120% 90% at 30% 10%, #1D5A5C, #0F3436 70%); }
.pm-card { position: relative; display: grid; justify-items: center; gap: 12px; width: min(560px, 100%); padding: 26px clamp(20px, 4vw, 40px) 30px; border-radius: 18px; text-align: center; color: var(--ink); background: var(--paper-light) url("../assets/textures/page-seamless.webp") 0 0 / 700px; box-shadow: 0 26px 60px rgba(0, 0, 0, .4); }
.pm-card::before { content: ""; position: absolute; inset: 8px; border: 1.5px dashed rgba(197, 138, 50, .6); border-radius: 12px; pointer-events: none; }
.pm-end-art { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 128px; margin-top: -86px; }
.pm-end-wren { height: 128px; width: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.pm-end-wob { height: 76px; width: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.pm-end[hidden] { display: none; }
.pm-end h3 { font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.8rem); }
.pm-end p { max-width: 34rem; font-size: 1.125rem; }
.pm-end .actions { justify-content: center; }
.pm-beta { color: var(--ink-soft); }
@media (max-width: 760px) {
  /* phones: the board runs edge to edge and the bottles sit low, in the thumb zone */
  .pm { inset: 0 0 auto 0; height: calc(100svh - var(--masthead-h)); grid-template-rows: auto minmax(0, 1fr) auto; align-content: stretch; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .pm-head { width: 100%; }
  .pm-board { aspect-ratio: auto; height: 100%; min-height: 62.5vw; align-self: stretch; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(var(--gutter) * -1); border-radius: 0; box-shadow: 0 6px 0 rgba(255, 247, 230, .92), 0 -6px 0 rgba(255, 247, 230, .92); }
  .pm-foot { align-self: end; }
  .pm-bg { object-position: 50% 100%; }
  .pm-jar { min-width: 76px; }
  .pm-jar img { height: 52px; }
  .pm-foot { grid-template-columns: 1fr; justify-content: stretch; }
  .pm-tray { flex-wrap: nowrap; gap: 8px; }
  .pm-jar { flex: 1 1 0; min-width: 0; padding: 6px 4px 5px; font-size: .875rem; }
  .pm-jar img { height: 46px; }
  .pm-end-art { height: 96px; margin-top: -60px; } .pm-end-wren { height: 96px; } .pm-end-wob { height: 58px; }
}

/* ---------- Paper dioramas (worlds) ---------- */
.diorama-gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.world-scene.dio-ready .ws { opacity: 0; }
.world-scene.dio-on .ws .hinge { animation: none; }
.world-scene .ws.leave-dio { pointer-events: none; }

/* ---------- Page-wide weather ---------- */
.wx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 40; pointer-events: none; opacity: 0; transition: opacity .3s; }
.wx-canvas.on { opacity: 1; }
.wx-css { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; }
.wx-rain { background: radial-gradient(14% 18% at 20% 30%, rgba(40, 96, 150, .14), transparent 70%), radial-gradient(10% 14% at 70% 60%, rgba(40, 96, 150, .12), transparent 70%), radial-gradient(12% 16% at 45% 82%, rgba(40, 96, 150, .12), transparent 70%); animation: wx-css 4.5s ease forwards; }
.wx-snow { box-shadow: inset 0 0 60px 14px rgba(240, 248, 255, .6); animation: wx-css 4.5s ease forwards; }
.wx-wind { background: repeating-linear-gradient(-8deg, transparent 0 22px, rgba(140, 110, 80, .07) 22px 23px); animation: wx-css 4.5s ease forwards, wx-drift 4.5s linear; }
.wx-sun { background: radial-gradient(90% 80% at 6% -8%, rgba(255, 214, 140, .42), transparent 70%); animation: wx-css 4.5s ease forwards; }
.wx-thunder { background: radial-gradient(circle, rgba(250, 214, 120, .9) 0 1px, transparent 1.5px) 0 0 / 46px 46px, rgba(40, 36, 90, .06); animation: wx-css 4.5s ease forwards; }
.wx-bow { background: linear-gradient(176deg, transparent 18%, rgba(217, 112, 111, .5) 18.2%, transparent 18.5%, transparent 20%, rgba(229, 154, 85, .5) 20.2%, transparent 20.5%, transparent 22%, rgba(233, 199, 94, .5) 22.2%, transparent 22.5%, transparent 24%, rgba(134, 181, 124, .5) 24.2%, transparent 24.5%, transparent 26%, rgba(110, 158, 211, .5) 26.2%, transparent 26.5%); animation: wx-css 4.5s ease forwards; }
.wx-still { animation-duration: 4.5s !important; }
@keyframes wx-css { 0% { opacity: 0; } 8% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
@keyframes wx-drift { from { background-position: 0 0; } to { background-position: 240px 0; } }

/* ---------- How it began ---------- */
.intro { position: relative; height: 430svh; background: #0E2B30; color: var(--ivory); --focus: var(--warm); }
.intro-pin { position: sticky; top: var(--masthead-h); height: calc(100svh - var(--masthead-h)); overflow: hidden; }
.intro-stage { position: absolute; inset: 0; --push: 1; }
.intro-stage > *, .intro-stage > picture > img { position: absolute; }
.i-bg { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 32% 28%; transform: scale(var(--push)); transform-origin: 32% 28%; filter: brightness(calc(1 - var(--night, 0) * .5)) saturate(calc(1 - var(--night, 0) * .35)) hue-rotate(calc(var(--night, 0) * 12deg)); }
.intro.gl-on .i-bg { opacity: 0; }
.intro-gl { inset: 0; width: 100%; height: 100%; }
.i-lens { left: calc(var(--x) - var(--r)); top: calc(var(--y) - var(--r)); width: calc(var(--r) * 2); height: calc(var(--r) * 2); border-radius: 50%; overflow: hidden; pointer-events: none;
  background: radial-gradient(circle at 31% 28%, rgba(255, 255, 255, .95) 0 6%, rgba(255, 255, 255, 0) 12%), radial-gradient(circle, rgba(0, 0, 0, 0) 58%, rgba(8, 30, 40, .55) 100%), url("../assets/hd/worlds/coast/horizon.webp") 24% 0% / 600% auto no-repeat, #7E8FA6;
  transform: rotate(180deg); box-shadow: 0 10px 24px rgba(0, 0, 0, .35), inset 0 0 18px rgba(255, 255, 255, .35); transition: opacity .2s; }
.i-relief { left: 0; right: 0; bottom: -2%; width: 100%; height: auto; }
.i-garden { right: -3%; bottom: -7%; width: min(46vw, 660px); height: auto; transform-origin: 50% 100%; opacity: min(1, calc(var(--g, 0) * 1.6)); transform: perspective(1100px) rotateX(calc((1 - var(--g, 0)) * 82deg)); filter: drop-shadow(0 -6px 18px rgba(0, 0, 0, .25)); -webkit-mask-image: linear-gradient(100deg, transparent 4%, #000 30%); mask-image: linear-gradient(100deg, transparent 4%, #000 30%); }
.intro.is-static .i-garden { --g: 1; }
.i-wren { left: 75%; bottom: 3%; height: min(42%, 360px); width: auto; transform-origin: 50% 100%; opacity: min(1, calc(var(--w, 0) * 1.6)); transform: perspective(900px) rotateX(calc((1 - var(--w, 0)) * 80deg)) scaleX(-1); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .3)); }
.intro.is-static .i-wren { --w: 1; }
.i-wobble { left: 64%; bottom: 4%; width: clamp(150px, 18vw, 250px); transform: translate(-50%, calc(var(--fall, 1) * -115svh)); opacity: 0; }
.i-jars { list-style: none; inset: auto 4% 47% 4%; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.i-jar { display: grid; justify-items: center; gap: 4px; opacity: 0; transform: translateY(26px) scale(.8); transition: opacity .5s ease calc(var(--i) * 70ms), transform .6s var(--ease-settle) calc(var(--i) * 70ms); font: 500 .95rem/1.2 var(--hand); color: var(--ivory); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.i-jar img { height: clamp(58px, 9vw, 110px); width: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.i-jars.on .i-jar { opacity: 1; transform: none; }
.intro-beats { position: absolute; left: clamp(20px, 6vw, 96px); bottom: clamp(24px, 7svh, 72px); width: min(560px, 86vw); z-index: 3; }
.intro-beats::before { content: ""; position: absolute; inset: -40px -60px -40px -120px; background: radial-gradient(closest-side, rgba(10, 32, 36, .7), rgba(10, 32, 36, 0)); z-index: -1; }
.beat { position: absolute; left: 0; bottom: 0; margin: 0; font: 500 clamp(1.35rem, 1rem + 1.4vw, 2.1rem)/1.3 var(--display); font-variation-settings: "opsz" 48; opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s var(--ease-paper); text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.beat.on { opacity: 1; transform: none; position: relative; }
.beat-note { position: absolute; left: auto; right: -20px; bottom: auto; top: -4.6rem; text-wrap: balance; font: 500 1.05rem/1.35 var(--hand); color: #FFE9B5; transform: rotate(-3deg) translateY(10px); width: 22rem; }
.beat-note.on { position: absolute; transform: rotate(-3deg); }
.intro-hint { position: absolute; left: 50%; translate: -50% 0; top: 22px; margin: 0; padding: .3rem .8rem; border-radius: 999px; background: rgba(10, 32, 36, .5); font: 500 .95rem var(--hand); color: rgba(255, 247, 230, .7); }
.intro[data-beat="3"] .intro-hint { opacity: 0; }
.intro.is-static { height: auto; }
.intro.is-static .intro-pin { position: relative; top: 0; height: auto; display: grid; gap: 24px; padding: 48px var(--gutter); }
.intro.is-static .intro-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.intro.is-static .i-wobble { opacity: 1; --fall: 0; }
.intro.is-static .i-jar { opacity: 1; transform: none; }
.intro.is-static .i-lens { --x: 64%; --y: 38%; --r: 12vw; opacity: 1; left: calc(64% - 12vw); top: calc(38% - 12vw); }
.intro.is-static .intro-beats { position: relative; left: 0; bottom: 0; width: auto; max-width: 44rem; display: grid; gap: 1rem; }
.intro.is-static .beat, .intro.is-static .beat-note { position: relative; opacity: 1; transform: none; top: auto; right: auto; }
.intro.is-static .intro-hint { display: none; }

/* ---------- Book theatre ---------- */
.book { position: relative; isolation: isolate; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "left right"; column-gap: clamp(40px, 5vw, 72px); padding: 28px clamp(18px, 3vw, 40px); }
/* The open spread. It fades in as the cover turns, so a closed book is just its cover. */
.book::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 18px; background: linear-gradient(90deg, #F8EFDC 0 49.6%, #E9DAB9 50%, #F8EFDC 50.4%); box-shadow: 0 0 0 10px #7B4B2C, 0 0 0 12px #5A341E, 0 30px 60px rgba(35, 25, 15, .35); opacity: clamp(0, calc((var(--open, 1) - .3) * 3), 1); }
.book.open::before { opacity: 1; }
.book-right { justify-self: center; width: min(100%, 400px); }
.book-left { grid-area: left; }
/* while the cover is still closed, the left page isn't there yet */
.book:not(.open) .book-left { opacity: clamp(0, calc((var(--open, 0) - .42) * 5), 1); }
.book-right { grid-area: right; }
.book-spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 40px; translate: -50% 0; background: linear-gradient(90deg, rgba(80, 50, 20, 0), rgba(80, 50, 20, .18) 50%, rgba(80, 50, 20, 0)); pointer-events: none; }
.book-spine .seal-slot { position: absolute; bottom: 20px; left: 50%; translate: -50% 0; pointer-events: auto; }
.book-cover { position: absolute; z-index: 5; top: -6px; bottom: -6px; left: 50%; right: -6px; transform-origin: 0 50%; transform-style: preserve-3d; pointer-events: none; }
.book.open .book-cover { visibility: hidden; }
.cover-front, .cover-back { position: absolute; inset: 0; border-radius: 4px 16px 16px 4px; backface-visibility: hidden; }
.cover-front { display: grid; place-content: start center; justify-items: center; gap: 14px; padding: clamp(48px, 9vh, 110px) 30px 30px; background: linear-gradient(90deg, #5A341E, #7B4B2C 6%, #8E5A35 50%, #7B4B2C); box-shadow: inset 0 0 0 10px rgba(255, 220, 160, .15), inset 0 0 0 12px rgba(0, 0, 0, .2), 0 26px 50px rgba(35, 25, 15, .32); }
.cover-front::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--shade, 0)); border-radius: inherit; }
.cover-front img { width: min(80%, 320px); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.cover-title { font: 600 clamp(1.2rem, 1rem + .8vw, 1.7rem)/1.1 var(--display); color: #F5CE79; }
/* a cloth bookmark ribbon, so the closed book reads as a storybook */
.cover-front::before { content: ""; position: absolute; top: -4px; right: 18%; width: 22px; height: 118px; background: linear-gradient(90deg, #9C3A33, #C2544A 45%, #9C3A33); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); box-shadow: 0 2px 0 rgba(0, 0, 0, .2); }
.cover-sub { font: 500 1rem/1.2 var(--hand); color: rgba(245, 222, 170, .85); }
.cover-front .cover-rule { width: 60%; height: 0; border-top: 2px dashed rgba(245, 206, 121, .55); }
.cover-back { transform: rotateY(180deg); background: radial-gradient(120% 80% at 30% 20%, rgba(255, 255, 255, .35), transparent 60%), linear-gradient(90deg, #DCC7A0, #EFE2C6 35%, #E6D5B3); box-shadow: inset 0 0 0 10px #7B4B2C; }
.screen-frame { position: relative; perspective: 1600px; }
.leaf { position: absolute; inset: 10px; transform-origin: 0 50%; transform-style: preserve-3d; z-index: 3; pointer-events: none; }
.leaf-front, .leaf-back { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; overflow: hidden; }
.leaf-front img { width: 100%; height: 100%; object-fit: cover; }
.leaf-back { transform: rotateY(180deg); background: linear-gradient(90deg, #EBDDBF, #F8EFDC 22%); box-shadow: inset -30px 0 40px rgba(80, 50, 20, .18); }

/* ---------- Seals and the journal ---------- */
.seal-slot { display: inline-block; }
.seal { display: block; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; filter: drop-shadow(0 3px 5px rgba(40, 30, 10, .35)); transition: transform var(--t-select) var(--ease-paper); }
.seal img { display: block; width: 100%; height: 100%; border-radius: 50%; background: #EEE4CF; }
.seal img:not([src]) { box-shadow: inset 0 0 0 2px rgba(197, 138, 50, .35); }
.seal:hover { transform: rotate(-8deg) scale(1.06); }
.seal.found::after { content: ""; position: absolute; right: -2px; top: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--deep-sea) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.2l2.6 2.6L11 4.4' fill='none' stroke='%23FFF7E6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.seal { position: relative; }
.seal.on-dark img { filter: sepia(.45) saturate(1.25) brightness(.96) contrast(1.05); }
.seal.on-dark { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .45)); }
.seal.on-dark::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px dashed rgba(245, 206, 121, .65); pointer-events: none; }
html:not([data-tier="still"]) .seal:not(.found) img { animation: seal-shine 5.5s ease-in-out infinite; }
@keyframes seal-shine { 0%, 82%, 100% { filter: none; } 90% { filter: brightness(1.12) drop-shadow(0 0 6px rgba(255, 230, 160, .9)); } }
.stamp-col { display: grid; justify-items: center; gap: 14px; }
.seal-slot-worlds { margin-top: 18px; }
.reels-col { display: grid; gap: 18px; justify-items: start; }
.journal-button { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem .8rem .4rem .6rem; border-radius: 999px; border: 1.5px solid rgba(35, 56, 47, .35); background: var(--paper-light); cursor: pointer; font-weight: 600; font-size: .9375rem; }
.journal-icon-wrap { display: inline-flex; }
.journal-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.journal-count { font-variant-numeric: tabular-nums; padding: .05rem .45rem; border-radius: 999px; background: rgba(197, 138, 50, .2); font-size: .85rem; }
.journal { width: min(760px, 94vw); max-height: 92vh; overflow: auto; padding: 28px clamp(18px, 4vw, 40px) 32px; border: 0; border-radius: 18px; background: linear-gradient(rgba(253, 248, 236, .72), rgba(253, 248, 236, .72)), url("../assets/textures/page-seamless.webp") 0 0 / 900px, var(--paper-light); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.journal::after { content: ""; position: sticky; bottom: -32px; display: block; height: 30px; margin: 0 calc(clamp(18px, 4vw, 40px) * -1) -32px; background: linear-gradient(rgba(253, 248, 236, 0), rgba(253, 248, 236, .95)); pointer-events: none; }
.journal::backdrop { background: rgba(14, 30, 28, .72); }
.journal .lightbox-close { position: absolute; right: 14px; top: 14px; }
.journal h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
.journal-intro { margin-top: .5rem; color: var(--ink-soft); max-width: 36rem; }
.journal-grid { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 22px; align-items: start; }
.journal-slot { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; font-size: .8125rem; line-height: 1.3; color: var(--ink-soft); }
.journal-slot canvas, .slot-empty { width: min(96px, 100%); aspect-ratio: 1; border-radius: 50%; }
.slot-empty { display: grid; place-items: center; border: 2px dashed rgba(197, 138, 50, .6); font: 600 1.5rem var(--display); color: rgba(35, 56, 47, .35); }
.journal-slot.has span { font-weight: 650; color: var(--ink); }
.rub-area { margin-top: 20px; display: grid; justify-items: center; gap: 12px; }
.rub-area h3 { font-size: 1.4rem; }
.rub-canvas { width: min(300px, 72vw, 34vh); aspect-ratio: 1; border-radius: 50%; cursor: crosshair; box-shadow: 0 10px 28px rgba(40, 30, 10, .25), inset 0 0 0 1px rgba(0, 0, 0, .05); }
.rub-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; }
.rub-status { font-family: var(--hand); color: var(--ink-soft); }
.journal-done { margin-top: 24px; padding-top: 20px; border-top: 1.5px dashed rgba(197, 138, 50, .7); }
.journal-done h3 { font-size: 1.6rem; }
.journal-done p { margin-top: .4rem; }

@media (max-width: 900px) {
  .book { grid-template-columns: 1fr; grid-template-areas: "right" "left"; }
  .book::before { background: #F8EFDC; }
  .book-spine { display: none; }
  .book-cover { left: -6px; }
  .seal-slot-opening { right: 5%; bottom: 3%; }
}
@media (max-width: 760px) {
  .journal-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .journal-button { padding: .4rem .6rem; }
  .journal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rub-canvas { width: min(220px, 60vw, 30vh); }
  .journal-slot canvas, .slot-empty { width: min(84px, 100%); }
  .intro { height: 400svh; }
  /* On a phone the words sit at the top of the page and Wobble lands on the rocks below. */
  .i-jars { inset: auto 2% 33% 2%; }
  .i-jars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
  .i-jar { min-width: 0; }
  .i-jar img { height: clamp(44px, 12vw, 64px); }
  .i-jar span { font-size: .6rem; line-height: 1.1; text-align: center; }
  .intro-beats { left: 18px; right: 18px; width: auto; top: 18px; bottom: auto; }
  .intro-beats::before { inset: -60px -40px -50px -40px; }
  .beat { top: 0; bottom: auto; font-size: 1.2rem; }
  .beat-note { right: auto; left: 0; top: calc(100% + .6rem); width: 15rem; font-size: .95rem; }
  .i-wobble { left: 56%; bottom: 3%; width: 150px; }
  .i-garden { right: -18%; width: 92%; bottom: -5%; }
  .i-wren { left: 12%; height: 25%; bottom: 3%; transform: perspective(900px) rotateX(calc((1 - var(--w, 0)) * 80deg)); }
  .intro-hint { display: none; }
  .seal { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .rig-hop, .rig-cloud { transition: none; }
  .seal:not(.found) img { animation: none !important; }
}

@media (max-width: 400px) {
  .logo-box { width: 140px; height: 34px; }
  .masthead-inner { width: calc(100% - 28px); gap: 6px; }
}
@media (max-width: 340px) {
  .logo-box { width: 118px; height: 30px; }
  .journal-button { padding: .4rem .5rem; gap: .25rem; }
  .journal-icon-wrap { display: none; }
}

/* =====================================================================
   v4: languages, grown-up gate, grown-ups corner, privacy page
   ===================================================================== */
html.i18n-wait body { visibility: hidden; }

/* menu extras: in the dropdown on smaller screens; on wide screens only the language chip shows */
.nav-chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .4rem .8rem; border-radius: 999px;
  border: 1.5px solid rgba(35, 56, 47, .35); background: var(--paper-light); cursor: pointer; font-weight: 600; font-size: .9375rem; white-space: nowrap;
}
.nav-chip-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav-chip[aria-pressed="true"] { background: var(--deep-sea); color: var(--ivory); border-color: var(--deep-sea); }
.nav-list .nav-extra { display: none; }
@media (min-width: 1200px) {
  .nav-list .nav-extra:has(.nav-lang) { display: block; }
  .nav-list { align-items: center; }
}
@media (min-width: 901px) and (max-width: 1199px) { .nav-list li:has(> a[href="#make"]) { display: none; } }
@media (max-width: 900px) {
  .nav-list .nav-extra { display: block; margin-top: 4px; padding-top: 6px; border-top: 1.5px dashed rgba(197, 138, 50, .5); }
  .nav-list .nav-extra + .nav-extra { border-top: 0; margin-top: 0; padding-top: 0; }
  .nav-list .nav-chip { width: 100%; justify-content: flex-start; border-color: transparent; background: transparent; padding: .6rem .9rem; border-radius: 8px; }
  .nav-list .nav-chip[aria-pressed="true"] { background: var(--deep-sea); }
}

/* the grown-up gate */
.gate { width: min(460px, 92vw); padding: 0; border: 0; border-radius: 18px; background: var(--paper-light); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.gate::backdrop { background: rgba(14, 30, 28, .72); }
.gate-card { position: relative; padding: 26px clamp(20px, 5vw, 32px) 28px; display: grid; gap: .7rem; }
.gate-jar { position: absolute; right: 20px; top: 18px; width: 46px; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .22)); }
.gate h2 { font-size: 1.7rem; padding-right: 60px; }
.gate-why { color: var(--ink-soft); }
.gate-form { display: grid; gap: .7rem; }
.gate-label { display: grid; gap: .5rem; font-weight: 600; }
.gate-prompt { font: 600 1.05rem/1.4 var(--hand); }
.gate-label input { min-height: 52px; max-width: 12rem; padding: .5rem .9rem; border-radius: 10px; border: 2px solid rgba(35, 56, 47, .45); background: #fff; font: 600 1.35rem/1 var(--body); letter-spacing: .08em; }
.gate-status { min-height: 1.4em; font-weight: 600; color: #8A3B2E; }
.gate .button-ivory { color: var(--ink); box-shadow: inset 0 0 0 2px rgba(35, 56, 47, .55); background: transparent; }
a.nope { animation: nope 420ms ease; }
@keyframes nope { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* grown-ups corner: quieter paper, three cards, the first one does the work */
.section.grownups { background: var(--paper-deep); }
.gu-head { max-width: 46rem; }
.gu-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: clamp(14px, 2vw, 24px); margin-top: clamp(28px, 4vw, 44px); align-items: start; }
.gu-card { background: var(--paper-light); border-radius: 16px; padding: 24px clamp(18px, 2.4vw, 28px) 26px; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 26px rgba(35, 56, 47, .1); }
.gu-card h3 { font-size: 1.45rem; }
.gu-card > p { margin-top: .6rem; color: var(--ink-soft); }
.gu-first { background: var(--deep-sea); color: var(--ivory); --focus: var(--warm); }
.gu-first > p, .gu-first .gu-small { color: rgba(255, 247, 230, .88); }
.gu-status { font: 600 1.15rem/1.35 var(--hand) !important; color: var(--warm) !important; }
.gu-first .gu-reward { color: var(--warm); margin-top: .25rem; }
.gu-open { margin-top: 1.1rem; background: var(--warm); color: var(--ink); box-shadow: 0 3px 0 #B98431, 0 10px 22px rgba(10, 30, 28, .22); }
.gu-panel { margin-top: 1.1rem; display: grid; gap: 1rem; }
.gu-stores { display: flex; flex-wrap: wrap; gap: 10px; }
.gu-store { display: inline-flex; align-items: center; min-height: 48px; padding: .5rem 1rem; border-radius: 12px; background: #0D2A2C; color: var(--ivory); font-weight: 650; text-decoration: none; box-shadow: inset 0 0 0 1.5px rgba(255, 247, 230, .35); }
.gu-store.has-badge { padding: 0; background: none; box-shadow: none; }
.gu-store img { height: 48px; width: auto; display: block; }
.gu-form { display: grid; gap: .55rem; margin-top: 0; }
.gu-form label { font-weight: 600; }
.gu-form input[type="email"] { min-height: 48px; padding: .6rem .9rem; border-radius: 10px; border: 2px solid rgba(255, 247, 230, .6); background: rgba(255, 247, 230, .08); color: var(--ivory); font: inherit; }
.gu-check { display: flex !important; align-items: flex-start; gap: .6rem; font-weight: 500 !important; }
.gu-check input { width: 22px; height: 22px; margin-top: .15rem; flex: none; accent-color: var(--warm); }
.gu-small { font-size: .9rem; line-height: 1.5; }
.gu-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gu-list { list-style: none; margin-top: .8rem; display: grid; gap: .55rem; }
.gu-list li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); }
.gu-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: .7rem; height: .7rem; border-radius: 50%; background: var(--garden); box-shadow: inset 0 0 0 2px var(--paper-light), 0 0 0 1.5px var(--garden); }
.gu-more { margin-top: 1rem !important; font-weight: 650; }
.gu-hands { margin-top: 1.2rem; padding-top: 1rem; border-top: 1.5px dashed rgba(197, 138, 50, .6); display: grid; gap: .7rem; justify-items: start; }
.gu-hands p { color: var(--ink-soft); }
@media (max-width: 1000px) { .gu-grid { grid-template-columns: 1fr 1fr; } .gu-first { grid-column: 1 / -1; } }
@media (max-width: 640px) { .gu-grid { grid-template-columns: 1fr; } }

/* plain document pages (privacy) */
.doc-page { background: var(--paper); }
.doc-masthead { position: sticky; top: 0; z-index: 30; background: var(--paper); box-shadow: 0 1px 0 rgba(35, 56, 47, .12); }
.doc-back { margin-left: auto; font-weight: 650; text-decoration: none; padding: .5rem .7rem; border-radius: 8px; }
.doc-back:hover { background: rgba(197, 138, 50, .16); }
.doc { padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px); }
.doc-wrap { width: min(44rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
.doc h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); }
.doc h2 { font-size: clamp(1.35rem, 1.15rem + .8vw, 1.75rem); margin-top: 2.4rem; }
.doc section p, .doc section ul { margin-top: .7rem; }
.doc ul { padding-left: 1.3rem; }
.doc li + li { margin-top: .3rem; }
.doc .setup-note { margin-top: 1.2rem; }
.doc-date { color: var(--ink-soft); font-family: var(--hand); }
.doc-contact { list-style: none; padding-left: 0 !important; }
@media (max-width: 640px) { .doc-masthead .logo-box { width: 150px; } .doc-back { padding: .5rem .3rem; font-size: .95rem; } }
@media (max-width: 420px) { .doc-masthead .logo-box { width: 118px; } .doc-back { white-space: nowrap; font-size: .9rem; } .doc-masthead .nav-chip { padding-inline: .6rem; } }
@media (max-width: 350px) { .doc-masthead .nav-lang { display: none; } }

/* small hands mode: bigger targets, fewer ways out */
html[data-hands="small"] { --hands-target: 60px; }
html[data-hands="small"] :is(.button, .chip, .world-tab, .nav-chip, .journal-button, .sound-toggle, .pm-skip) { min-height: var(--hands-target); font-size: 1.1rem; }
html[data-hands="small"] .pm-jar { min-height: 104px; }
html[data-hands="small"] .pm-jar img { height: 66px; }
html[data-hands="small"] .pm-jar span { font-size: 1.05rem; }
html[data-hands="small"] .jar-tab { min-height: 120px; }
html[data-hands="small"] .episode { padding-block: 14px; }
html[data-hands="small"] .seal { width: 84px; height: 84px; }
html[data-hands="small"] .play-open { font-size: 1.15rem; padding: .7rem 1.2rem; }
html[data-hands="small"] :is(#press, .footer-social, [data-series-links], [data-film-links], .gu-first .gu-open, .gu-first .gu-panel, .footer-small) { display: none !important; }

/* Make & do: printed sheets pegged to a line */
.section.make { background: var(--paper-light); }
.make-head { max-width: 46rem; }
.make-line { position: relative; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 44px); margin-top: clamp(40px, 5vw, 64px); padding-top: 26px; }
.make-line::before { content: ""; position: absolute; left: -2%; right: -2%; top: 0; height: 40px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 40' preserveAspectRatio='none'%3E%3Cpath d='M0 6 Q250 34 500 18 T1000 8' fill='none' stroke='%238F6B43' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; pointer-events: none; }
.make-sheet { display: grid; gap: .55rem; align-content: start; }
.make-paper { position: relative; transform: rotate(var(--tilt, 0deg)); transform-origin: 50% 0; transition: transform 600ms var(--ease-settle); margin-bottom: .6rem; }
.make-paper img { display: block; width: 100%; height: auto; aspect-ratio: 640 / 828; object-fit: cover; background: #fff; border-radius: 3px; box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 14px 26px rgba(35, 56, 47, .18); }
.make-sheet:hover .make-paper, .make-sheet:focus-within .make-paper { transform: rotate(calc(var(--tilt, 0deg) * -0.6)); }
.peg { position: absolute; left: 50%; top: -18px; width: 16px; height: 42px; margin-left: -8px; border-radius: 4px; background: linear-gradient(90deg, #C99A62, #E2B884 45%, #B7864F); box-shadow: 0 3px 6px rgba(0, 0, 0, .25); z-index: 2; }
.peg::after { content: ""; position: absolute; left: 3px; right: 3px; top: 13px; height: 6px; border-radius: 2px; background: #9E9A8E; }
.make-sheet h3 { font-size: 1.4rem; }
.make-sheet p { color: var(--ink-soft); }
.make-meta { font: 500 .95rem/1.3 var(--hand); }
.make-sheet .button { justify-self: start; margin-top: .3rem; }
.make-try { margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(28px, 4vw, 40px); border-top: 1.5px dashed rgba(197, 138, 50, .7); }
.make-try h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.make-try-note { margin-top: .4rem; color: var(--ink-soft); max-width: 40rem; }
.try-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; margin-top: 1.4rem; }
.try-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: start; padding: 14px; border-radius: 14px; background: var(--paper); }
.try-card img { width: 64px; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 3px var(--paper-light), 0 6px 14px rgba(35, 56, 47, .16); }
.try-ep { font: 500 .95rem/1.2 var(--hand); color: var(--ink-soft); }
.try-card h4 { font: 600 1.15rem/1.2 var(--display); margin: .2rem 0 .6rem; }
.try-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 860px) { .make-line { grid-template-columns: repeat(2, minmax(0, 1fr)); } .make-line::before { display: none; } .make-paper { margin-top: 18px; } }
@media (max-width: 560px) { .make-line { grid-template-columns: minmax(0, 1fr); } .make-paper { max-width: 330px; } }
html.reduced .make-paper, html.still .make-paper { transition: none; }

/* page turns between pages, not only within one */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* a film's own page */
.film-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .9rem; }
.ep-page { background: var(--paper); }
.ep { padding-block: clamp(28px, 5vw, 64px) clamp(56px, 8vw, 96px); }
.ep-wrap { width: min(1080px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.ep-wrap:first-child { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.ep-screen { margin: 0; }
.ep-screen .screen-frame { position: relative; border-radius: 18px; overflow: hidden; background: #0F2A2C; box-shadow: 0 0 0 8px var(--paper-light), 0 0 0 9.5px rgba(197, 138, 50, .7), 0 26px 60px rgba(35, 56, 47, .28); }
.ep-screen video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; }
.ep-kicker { font: 600 1.05rem/1.3 var(--display); color: var(--deep-sea); }
.ep-count { font: 500 1rem/1.3 var(--hand); color: var(--ink-soft); margin-top: .15rem; }
.ep-text h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); margin-top: .8rem; }
.ep-meta { margin-top: .5rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ep-syn { margin-top: 1rem; }
.ep-text .screen-tools { margin-top: 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ep-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .9rem; }
.ep-links:empty { display: none; }
.ep-text .transcript { margin-top: 1.4rem; }
.ep-text .transcript-body { max-height: none; }
.ep-text .transcript-body p + p { margin-top: .45rem; }
.ep-lower { margin-top: clamp(40px, 6vw, 72px); display: grid; gap: clamp(28px, 4vw, 44px); }
.ep-try { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: center; padding: clamp(18px, 3vw, 28px); border-radius: 18px; background: var(--paper-light); box-shadow: 0 12px 30px rgba(35, 56, 47, .1); }
.ep-try img { width: 150px; height: auto; transform: rotate(-2deg); border-radius: 3px; box-shadow: 0 10px 22px rgba(35, 56, 47, .2); background: #fff; }
.ep-try-kicker { font: 500 1rem/1.3 var(--hand); color: var(--ink-soft); }
.ep-try h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: .3rem 0 .5rem; }
.ep-try p:not(.ep-try-kicker) { color: var(--ink-soft); max-width: 36rem; }
.ep-try .button { margin-top: 1rem; }
.ep-navs { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ep-nav { display: inline-grid; grid-template-columns: 54px auto; gap: 12px; align-items: center; padding: 10px 16px 10px 10px; border-radius: 14px; text-decoration: none; background: var(--paper-light); max-width: 100%; }
.ep-nav-next { margin-left: auto; }
.ep-nav:hover { box-shadow: inset 0 0 0 2px var(--deep-sea); }
.ep-nav img { width: 54px; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; }
.ep-nav-label { display: block; font: 500 .95rem/1.2 var(--hand); color: var(--ink-soft); }
.ep-nav-title { display: block; font: 600 1.1rem/1.2 var(--display); }
@media (max-width: 760px) {
  .ep-wrap:first-child { grid-template-columns: minmax(0, 1fr); }
  .ep-screen { max-width: 340px; margin-inline: auto; width: 100%; }
  .ep-try { grid-template-columns: 96px minmax(0, 1fr); align-items: start; }
  .ep-try img { width: 96px; }
}
@media (min-width: 761px) { .ep-screen { position: sticky; top: calc(var(--masthead-h) + 24px); } }
.ep-text .transcript-body p + p { margin-top: .8rem; }

/* pocket level: walking, darkness and lanterns, the brass gate, scene changes */
.pm-board { cursor: pointer; }
.pm-board:focus-visible { outline: 3px solid var(--warm); outline-offset: 4px; }
.pm-stage, .pm-bg { transition: opacity 280ms ease; }
.pm-board.leaving .pm-stage, .pm-board.leaving .pm-bg { opacity: 0; }
.pm-dark { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 22% 70%, rgba(20, 12, 30, .55), rgba(10, 6, 18, .9) 60%); transition: opacity 1.2s ease; }
.pm-board.is-dark .pm-dark { opacity: 1; }
.pm-board.is-dark.lit .pm-dark { opacity: .28; }
.p-step { opacity: .07; transition: opacity 600ms ease; }
.pm-board.lit .p-step { opacity: 1; }
.pm-board.lit .p-step:nth-of-type(2) { transition-delay: 300ms; }
.pm-board.lit .p-step:nth-of-type(3) { transition-delay: 600ms; }
.p-glow { opacity: 0; transition: opacity 700ms ease; }
.p-flame { transition: fill 400ms ease; }
.pm-board.lit .p-glow { opacity: 1; }
.pm-board.lit .p-flame { fill: #FFE09A; }
.pm-board.lit .p-lamp:nth-of-type(2) .p-glow, .pm-board.lit .p-lamp:nth-of-type(2) .p-flame { transition-delay: 250ms; }
.pm-board.lit .p-lamp:nth-of-type(3) .p-glow, .pm-board.lit .p-lamp:nth-of-type(3) .p-flame { transition-delay: 500ms; }
.p-gate { transition: transform 1s var(--ease-paper); }
.pm-board.open .p-gate { transform: translateY(-44px); }
.p-socket-light, .p-gatelamp { transition: fill 300ms ease; }
.pm-board.powered .p-socket-light, .pm-board.powered .p-gatelamp { fill: #F5CE79; }
.p-catch-arm, .p-catch-knob { transition: transform 300ms ease; transform-origin: 103.2px 70.4px; }
.pm-board.open .p-catch-arm, .pm-board.open .p-catch-knob { transform: rotate(80deg); }
.p-wob.floating { animation: p-float 2.6s ease-in-out infinite; }
@keyframes p-float { 50% { translate: -50% -3%; } }
.p-wob.plugged::before { content: ""; position: absolute; left: 50%; top: 8%; width: 30%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(rgba(255, 236, 160, .9), rgba(255, 236, 160, 0) 70%); animation: p-spark 700ms ease-in-out infinite alternate; }
@keyframes p-spark { from { opacity: .35; } to { opacity: 1; } }
html.reduced .p-wob.floating, html.reduced .p-wob.plugged::before { animation: none; }
.pm-finds { position: absolute; inset: 0; pointer-events: none; }
.find-btn.pm-find { position: absolute; width: max(6.4%, 36px); translate: -50% 0; pointer-events: auto; z-index: 3; }
.pm-found { margin-top: .2rem; }

/* lost things, anywhere on the page */
.find-btn { display: block; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 2px 2px rgba(20, 20, 20, .35)); animation: find-idle 4.2s ease-in-out infinite; position: relative; }
.find-btn svg { width: 100%; height: 100%; display: block; }
.find-btn:hover, .find-btn:focus-visible { animation: none; transform: scale(1.12) rotate(-6deg); }
.find-btn.got { animation: find-got 900ms var(--ease-settle) forwards; }
.find-btn.got svg { animation: find-fly 1.4s 1.6s ease-in forwards; }
@keyframes find-idle { 0%, 82%, 100% { transform: none; } 88% { transform: rotate(-7deg); } 94% { transform: rotate(5deg); } }
@keyframes find-got { 40% { transform: scale(1.5) translateY(-20%); } 100% { transform: scale(1.25) translateY(-10%); } }
@keyframes find-fly { to { opacity: 0; transform: translateY(-60%) scale(.6); } }
.find-note { position: absolute; left: 50%; bottom: 112%; translate: -50% 0; width: max-content; max-width: min(260px, 60vw); padding: .5rem .75rem; border-radius: 10px; background: var(--paper-light); color: var(--ink); font: 500 .9rem/1.35 var(--hand); box-shadow: 0 8px 20px rgba(0, 0, 0, .25); text-align: left; z-index: 5; animation: note-in 260ms ease-out; }
.find-note strong { display: block; font: 650 .95rem/1.25 var(--body); }
@keyframes note-in { from { opacity: 0; translate: -50% 6px; } }
html.reduced .find-btn, html.reduced .find-btn.got, html.reduced .find-btn.got svg { animation: none; }

/* the journal's lost & found */
.journal-finds { margin-top: 26px; padding-top: 20px; border-top: 1.5px dashed rgba(197, 138, 50, .7); }
.journal-finds h3 { font-size: 1.45rem; }
.finds-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 22px; margin-top: 14px; }
.finds-group h4 { font: 600 1rem/1.2 var(--display); margin-bottom: 6px; }
.finds-group ul { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.finds-group li { display: grid; justify-items: center; gap: 4px; text-align: center; font-size: .75rem; line-height: 1.25; color: var(--ink-soft); }
.finds-art { width: 46px; height: 46px; display: block; filter: drop-shadow(0 2px 2px rgba(20, 20, 20, .25)); }
.finds-art svg { width: 100%; height: 100%; }
.finds-empty { width: 46px; height: 46px; border-radius: 50%; border: 1.5px dashed rgba(35, 56, 47, .35); display: grid; place-items: center; font: 600 1rem var(--hand); color: rgba(35, 56, 47, .45); }
.find-btn.note-l .find-note { left: auto; right: 0; translate: 0 0; }
.find-btn.note-r .find-note { left: 0; translate: 0 0; }
@keyframes note-in { from { opacity: 0; transform: translateY(6px); } }

/* living worlds: lost things on the island, idle motion for the CSS (lite) tier */
.world-finds { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.find-btn.world-find { position: absolute; width: clamp(40px, 6%, 64px); translate: calc(-50% + var(--px, 0px)) calc(-100% + var(--py, 0px)); pointer-events: auto; }
.find-btn.world-find.arrive { animation: find-arrive 700ms var(--ease-settle) both, find-idle 4.2s 2s ease-in-out infinite; }
@keyframes find-arrive { from { opacity: 0; transform: translateY(-40%) rotate(-12deg); } }
html.reduced .find-btn.world-find.arrive { animation: none; }
html:not(.reduced) .world-scene:not(.dio-on) .w-set[data-idle="bob"] img { animation: idle-bob 5s ease-in-out infinite; }
html:not(.reduced) .world-scene:not(.dio-on) .w-set[data-idle="swim"] img { animation: idle-swim 8s ease-in-out infinite; }
html:not(.reduced) .world-scene:not(.dio-on) .w-set[data-idle="flutter"] img { animation: idle-flutter 2.6s ease-in-out infinite; }
html:not(.reduced) .world-scene:not(.dio-on) .w-set[data-idle="flicker"] img { animation: idle-flicker 1.9s steps(8) infinite; }
html:not(.reduced) .world-scene:not(.dio-on) .w-set[data-idle="rock"] img { animation: idle-rock 7s ease-in-out infinite; transform-origin: 50% 100%; }
html:not(.reduced) .world-scene:not(.dio-on) .w-set[data-idle="glint"] img { animation: idle-glint 9s ease-in-out infinite; }
@keyframes idle-bob { 50% { translate: 0 -1.4%; } }
@keyframes idle-swim { 50% { translate: 0 -3%; rotate: -1.5deg; } }
@keyframes idle-flutter { 50% { translate: 0 -1.2%; rotate: 1.6deg; } }
@keyframes idle-flicker { 0%, 100% { filter: brightness(1.04); } 30% { filter: brightness(1.12); } 60% { filter: brightness(1.02); } 80% { filter: brightness(1.1); } }
@keyframes idle-rock { 50% { rotate: 3deg; } }
@keyframes idle-glint { 0%, 70%, 100% { filter: brightness(1); } 80% { filter: brightness(1.18); } }

/* time and season in the opening garden */
.o-night, .o-snow { inset: 0; pointer-events: none; z-index: 2; }
.o-night { background: radial-gradient(ellipse 42% 46% at 70% 72%, rgba(18, 30, 70, 0) 0%, rgba(18, 30, 70, .2) 55%, rgba(10, 16, 44, .55) 100%); mix-blend-mode: multiply; }
html.is-night .opening-scene .o-night { mix-blend-mode: normal; background: radial-gradient(ellipse 44% 48% at 72% 74%, rgba(16, 24, 60, .05), rgba(12, 18, 48, .42) 62%, rgba(8, 12, 36, .66)); }
.firefly { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #FFF1A8; box-shadow: 0 0 10px 4px rgba(255, 226, 120, .65); animation-name: ff-drift, ff-blink; animation-timing-function: ease-in-out, ease-in-out; animation-iteration-count: infinite, infinite; animation-direction: alternate, alternate; }
@keyframes ff-drift { 0% { translate: 0 0; } 50% { translate: 18px -14px; } 100% { translate: -12px -26px; } }
@keyframes ff-blink { 0%, 30% { opacity: .1; } 60%, 100% { opacity: 1; } }
.flake { position: absolute; top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgba(255, 255, 255, .7); animation: snow-fall linear infinite; }
@keyframes snow-fall { to { transform: translate3d(28px, calc(100svh + 40px), 0); } }
html.reduced .firefly, html.reduced .flake { animation: none; }
html.reduced .flake { top: auto; bottom: 8%; }
html.is-winter .jar-tab img { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .6)); }
.wx-gpu { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 41; opacity: 0; transition: opacity 400ms ease; }
.wx-gpu.on { opacity: 1; }

/* depth travel as scroll-driven CSS where supported (motion.js does it by script elsewhere) */
[data-depth="far"] { --travel: 5px; } [data-depth="mid"] { --travel: 12px; } [data-depth="near"] { --travel: 22px; }
@media (max-width: 760px) { [data-depth="far"] { --travel: 2.75px; } [data-depth="mid"] { --travel: 6.6px; } [data-depth="near"] { --travel: 12.1px; } }
@keyframes depth { from { translate: 0 var(--travel, 0px); } to { translate: 0 calc(var(--travel, 0px) * -1); } }
@supports (animation-timeline: view()) {
  html.sda [data-scene] { view-timeline: --scene block; }
  html.sda:not(.reduced) [data-scene] [data-depth] { animation: depth linear both; animation-timeline: --scene; animation-range: cover 0% cover 100%; }
  html.sda:not(.reduced) [data-scene] .hinge[data-depth] { animation: hinge 6s ease-in-out infinite paused, depth linear both; animation-timeline: auto, --scene; animation-range: normal, cover 0% cover 100%; }
  html.sda:not(.reduced):not(.paused) [data-scene].is-live .hinge[data-depth] { animation-play-state: running, running; }
}

/* a language switch in every footer, so it is reachable at every width */
.footer-lang { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: .35rem 0; cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: .2em; }
.footer-lang:hover { text-decoration-style: solid; }
/* Spanish menu labels run longer: the sound button keeps its icon and drops its words on mid-width screens */
@media (min-width: 901px) and (max-width: 1439px) {
  html[lang="es"] .sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html[lang="es"] .sound-toggle { padding: .4rem; width: 44px; justify-content: center; }
}

/* =====================================================================
   v5: kinetic type (js/type.js, js/kinetic.js; numbers in motion/knobs.json → "type")
   ===================================================================== */
@property --bnce { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --kt-glow { syntax: '<number>'; inherits: false; initial-value: 0; }
.kt-w { display: inline-block; white-space: nowrap; transform-origin: 50% 100%; }
.kt-c { display: inline-block; transform-origin: 50% 82%; }
.kt-head { position: relative; }
/* the kinetic cuts, once loaded (full tier): Fraunces with softness, Shantell Sans with bounce and informality */
html.kt-fonts { --hand: "Shantell K", "Shantell Sans", "Comic Sans MS", "Chalkboard SE", cursive; }
html.kt-fonts .kt-head, html.kt-fonts .kt-logo-word, html.kt-fonts .world-card h3, html.kt-fonts .nt-tile { font-family: "Fraunces K", var(--display); }

/* 12: paper-thick headings, with a shadow cast by the lantern light (the pointer) */
.kt-head, .kt-head .kt-w, .kt-head .kt-c {
  text-shadow:
    0 0 calc(var(--kt-glow, 0) * 18px) rgba(255, 214, 120, calc(var(--kt-glow, 0) * .95)),
    0 0 calc(var(--kt-glow, 0) * 4px) rgba(255, 236, 170, calc(var(--kt-glow, 0) * .9)),
    var(--kt-frost, 0 0 0 transparent),
    var(--kt-thick, 0 0 0 transparent),
    calc(var(--sx, var(--sun-sx, 0)) * .8px) calc(var(--sy, var(--sun-sy, 4)) * .8px) 6px var(--kt-cast-c, rgba(60, 40, 10, .13));
}
/* 1: what the weather leaves behind */
html.kt-fonts[data-mood="rain"] .kt-head { font-variation-settings: "SOFT" 45; }
html.kt-fonts[data-mood="rain"] .section h2.kt-head { font-variation-settings: "opsz" 96, "SOFT" 45; }
html[data-mood="snow"] .kt-head { --kt-frost: 0 -0.05em 0 rgba(255, 255, 255, .8); }
html[data-mood="sun"] .kt-head { --kt-glow-rest: 1; }
.kt-drop { position: absolute; z-index: 2; width: .16em; height: .22em; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; background: radial-gradient(circle at 35% 30%, #fff, #BFE0F0 45%, #6FA8C8); box-shadow: 0 1px 2px rgba(0, 40, 70, .25); pointer-events: none; }

/* 8: pop-up words fold from the page */
.kt-head .kt-w { backface-visibility: hidden; }

/* 2: living handwriting. The bounce runs only on lines that are on screen. */
html.kt-fonts .kt-hand-in { font-variation-settings: "BNCE" calc(var(--bnce) * var(--kt-bnce-amp, 32)), "INFM" var(--kt-infm, 0); animation: kt-bnce var(--kt-hand-period, 3.4s) ease-in-out infinite alternate; }
html.kt-fonts .kt-hand-in .kt-c { font-variation-settings: inherit; }
@keyframes kt-bnce { from { --bnce: -1; } to { --bnce: 1; } }
html[data-wob="sleepy"] { --kt-infm: var(--kt-sleepy-infm, 85); --kt-hand-period: var(--kt-sleepy-period, 6s); --kt-bnce-amp: 18; }
html[data-wob="excited"] { --kt-infm: 30; --kt-hand-period: var(--kt-excited-period, 1.15s); --kt-bnce-amp: var(--kt-excited-amp, 90); }
.kt-nib { position: absolute; left: 0; top: 0; width: .3em; height: .3em; margin: -.15em 0 0 -.02em; border-radius: 50%; background: currentColor; opacity: .8; pointer-events: none; transition: opacity .35s ease; z-index: 1; }
.kt-nib.done { opacity: 0; }
.kt-src { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap; }
.kt-guess { position: relative; display: inline-block; opacity: .8; }
.kt-guess::after { content: ""; position: absolute; left: -.1em; right: -.1em; top: 52%; height: .14em; border-radius: .1em; background: currentColor; transform: scaleX(0) rotate(-4deg); transform-origin: 0 50%; transition: transform .38s cubic-bezier(.5, 0, .3, 1); }
.kt-guess.struck::after { transform: scaleX(1) rotate(-4deg); }

/* 3: sound words */
.kt-sfx { display: inline-block; cursor: pointer; }

/* 5: edible words, and what Wobble spits back */
.kt-edible { cursor: pointer; background-image: radial-gradient(circle, currentColor 0 1.2px, transparent 1.6px); background-size: 7px 4px; background-repeat: repeat-x; background-position: 0 calc(100% + .02em); padding-bottom: .06em; }
.kt-edible:hover { background-size: 7px 5px; }
.kt-feed { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; background: var(--paper-light); color: var(--ink); }
.kt-feed:focus-visible { position: static; width: auto; height: auto; clip: auto; margin-top: .6rem; padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid var(--ink); font: 600 .95rem/1.2 var(--body); }
.kt-eater { position: fixed; z-index: 60; pointer-events: none; transform-origin: 50% 100%; }
.kt-w-rain .kt-c, .kt-w-rain { color: #2F6E92; font-variation-settings: "opsz" 96, "SOFT" 100; }
.worlds .kt-w-rain .kt-c, .worlds .kt-w-rain, .beta .kt-w-rain .kt-c { color: #A9D8F2; }
.kt-w-snow .kt-c, .kt-w-snow { color: #5D86A8; text-shadow: 0 -0.06em 0 #fff, 0 .04em 0 rgba(93, 134, 168, .35); }
.worlds .kt-w-snow .kt-c, .worlds .kt-w-snow { color: #DDEFFC; }
.kt-w-wind .kt-c { transform: skewX(-10deg) rotate(-3deg); }
.kt-w-wind { font-style: italic; }
.kt-w-sun .kt-c, .kt-w-sun { color: #C47A12; font-variation-settings: "opsz" 96, "wght" 700; text-shadow: 0 0 .35em rgba(255, 196, 90, .55); }
.worlds .kt-w-sun .kt-c, .worlds .kt-w-sun { color: #FFD27A; }
.kt-w-thunder .kt-c, .kt-w-thunder { color: #9A6A12; text-shadow: 0 1px 0 #F6D776, 0 -1px 0 #5A3B05; }
.worlds .kt-w-thunder .kt-c, .worlds .kt-w-thunder { color: #F2C14E; }
.kt-w-bow .kt-c { color: hsl(calc(var(--bow-i, 0) * 52deg + 2deg) 62% 45%); }
.worlds .kt-w-bow .kt-c { color: hsl(calc(var(--bow-i, 0) * 52deg + 2deg) 72% 72%); }

/* 6: Wobble hops along a heading */
.kt-plat { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; transition: opacity .3s ease; transform-origin: 50% 100%; }
.kt-plat .rig, .kt-eater .rig { filter: drop-shadow(0 4px 4px rgba(20, 30, 40, .25)); }

/* 7: the springy first line */
.kt-spring .kt-c { cursor: grab; touch-action: manipulation; }
.kt-spring .kt-c.kt-held { cursor: grabbing; }
@media (pointer: coarse) { .kt-spring .kt-c { cursor: default; } }

/* 12: fireflies at night */
.kt-firefly { position: absolute; left: 0; top: 0; z-index: 2; width: 7px; height: 7px; margin: -3px 0 0 -3px; border-radius: 50%; background: #FFF1A8; box-shadow: 0 0 10px 4px rgba(255, 226, 120, .7); pointer-events: none; opacity: 0; will-change: transform, opacity; }
.kt-firefly-halo { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 226, 140, .55) 0%, rgba(255, 210, 110, .22) 35%, rgba(255, 210, 110, 0) 68%); mix-blend-mode: screen; }

/* print and reduced motion: everything at rest */
@media print { .kt-w, .kt-c { transform: none !important; opacity: 1 !important; } .kt-plat, .kt-eater, .kt-firefly, .kt-drop, .kt-nib { display: none !important; } }
html.reduced .kt-hand-in { animation: none; }

/* 9 + 11: island names */
.kt-missing { color: transparent !important; text-shadow: none !important; background: linear-gradient(currentColor, currentColor) 50% 88% / 70% 2px no-repeat; }
.worlds .kt-missing { background-image: linear-gradient(rgba(255, 247, 230, .55), rgba(255, 247, 230, .55)); }
.world-card h3 .kt-missing { background-image: repeating-linear-gradient(90deg, rgba(35, 56, 47, .55) 0 4px, transparent 4px 7px); }
.kt-ghost { position: fixed; z-index: 30; margin: 0; pointer-events: none; white-space: pre; line-height: 1; }
.find-btn.world-find.kt-letter-find { width: clamp(34px, 4.6%, 54px); display: grid; place-items: center; font: 700 clamp(1.3rem, 2.6vw, 2.1rem)/1 var(--display); color: #FBF1D8; text-shadow: 0 1px 0 #D9A441, 0 2px 0 #C58A32, 0 3px 0 #A66F22, 0 5px 6px rgba(0, 0, 0, .35); background: none; }
.kt-letter-find span { display: block; transform: rotate(-12deg); }
.kt-letter-fly { position: fixed; z-index: 70; pointer-events: none; color: #FBF1D8; text-shadow: 0 1px 0 #D9A441, 0 2px 0 #C58A32, 0 3px 0 #A66F22, 0 6px 10px rgba(0, 0, 0, .3); line-height: 1; }
.journal-letters { font-family: var(--hand); color: var(--ink-soft); margin-top: .4rem; }

/* 10: the living logo */
.kt-logo-wrap { position: relative; display: block; }
.kt-logo-src { opacity: 0; }
.kt-logo { position: absolute; inset: 0; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .28)); -webkit-tap-highlight-color: transparent; }
.kt-logo-piece { position: absolute; height: auto; max-width: none; user-select: none; -webkit-user-drag: none; }
.kt-logo-play { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; background: var(--ivory); color: var(--ink); }
.kt-logo-play:focus-visible { position: absolute; z-index: 6; width: auto; height: auto; clip: auto; top: .5rem; left: .5rem; padding: .4rem .8rem; border-radius: 999px; border: 0; background: var(--ivory); color: var(--ink); font: 600 .9rem/1.2 var(--body); }

/* 4: your name in the weather */
.name-toy { margin-top: clamp(48px, 6vw, 80px); padding: clamp(22px, 3.5vw, 40px); border-radius: 22px; background: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .45), 0 10px 30px rgba(60, 40, 10, .08); display: grid; gap: 1.1rem; }
.nt-head h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.nt-head p { margin-top: .35rem; color: var(--ink-soft); }
.nt-form { display: grid; gap: .35rem; max-width: 22rem; }
.nt-form label { font-weight: 600; }
.nt-input { font: 600 1.25rem/1.2 var(--display); padding: .6rem .85rem; border-radius: 12px; border: 1.5px solid rgba(35, 56, 47, .45); background: var(--paper-light); color: var(--ink); min-height: 48px; }
.nt-input::placeholder { color: rgba(35, 56, 47, .45); }
.nt-stage { position: relative; min-height: clamp(150px, 20vw, 210px); border-radius: 16px; background: linear-gradient(180deg, #EAF2F0 0%, #F7EFDC 70%); box-shadow: inset 0 0 0 1.5px rgba(35, 56, 47, .12); display: grid; place-items: center; padding: 56px 14px 22px; overflow: hidden; transition: background 600ms ease; }
.nt-stage.nt-rain { background: linear-gradient(180deg, #CFE2EA 0%, #E9EEE6 75%); }
.nt-stage.nt-snow { background: linear-gradient(180deg, #E6F0F8 0%, #F7F7F4 75%); }
.nt-stage.nt-wind { background: linear-gradient(180deg, #E4EDE6 0%, #F4EEDD 75%); }
.nt-stage.nt-sun { background: linear-gradient(180deg, #FFF1C9 0%, #F9E7C4 75%); }
.nt-stage.nt-thunder { background: linear-gradient(180deg, #DEDAE8 0%, #EFE6D2 75%); }
.nt-stage.nt-bow { background: linear-gradient(180deg, #EEF0F8 0%, #F8EFE0 75%); }
.nt-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 1vw, 12px); --size: clamp(34px, min(13vw, calc((min(100vw, 1180px) - 110px) / var(--n, 6) - 6px)), 78px); }
.nt-tile { position: relative; display: grid; place-items: center; width: var(--size, 64px); aspect-ratio: 1; border-radius: 14%; background: #FBF1D8; color: var(--ink); box-shadow: 0 5px 0 #C58A32, 0 9px 12px rgba(60, 40, 10, .22); rotate: var(--tilt, 0deg); font: 600 calc(var(--size, 64px) * .62)/1 var(--display); transition: background-color .5s ease, color .5s ease, box-shadow .5s ease; }
html.kt-fonts .nt-tile { font-family: "Fraunces K", var(--display); }
.nt-tile.nt-space { width: calc(var(--size, 64px) * .35); background: none; box-shadow: none; }
.nt-ch { display: block; }
.nt-stage.is-sample .nt-tile { opacity: .5; }
.nt-rain .nt-tile { background: #DCEEF7; color: #1F4F6B; box-shadow: 0 5px 0 #6FA8C8, 0 9px 12px rgba(20, 50, 70, .22); font-variation-settings: "SOFT" 100; }
.nt-snow .nt-tile { background: linear-gradient(180deg, #fff 0 12%, #EEF6FC 12%); color: #3D6688; box-shadow: 0 5px 0 #9DBBD3, 0 9px 12px rgba(40, 70, 100, .2), inset 0 0 0 2px rgba(255, 255, 255, .7); }
.nt-wind .nt-tile { rotate: calc(var(--tilt, 0deg) + 7deg); background: #F3EBDD; color: #4A5B4F; box-shadow: 0 5px 0 #B59A6E, 0 9px 12px rgba(60, 40, 10, .2); }
.nt-sun .nt-tile { background: #FFE6A8; color: #7A4A06; box-shadow: 0 5px 0 #E0A33A, 0 0 22px rgba(255, 196, 90, .55); }
.nt-thunder .nt-tile { background: #F5DE9A; color: #4A3305; box-shadow: 0 5px 0 #9A6A12, 0 9px 12px rgba(40, 25, 5, .25), inset 0 0 0 2px #E6C15A; }
.nt-charging .nt-tile { box-shadow: 0 5px 0 #9A6A12, 0 0 24px rgba(246, 210, 90, .85), inset 0 0 0 2px #F6D776; }
.nt-bow .nt-tile { background: hsl(calc(var(--bow-i, 0) * 52deg + 2deg) 70% 86%); color: hsl(calc(var(--bow-i, 0) * 52deg + 2deg) 60% 30%); box-shadow: 0 5px 0 hsl(calc(var(--bow-i, 0) * 52deg + 2deg) 55% 55%), 0 9px 12px rgba(60, 40, 10, .18); }
.nt-floating .nt-tile::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 46px; background: rgba(122, 74, 6, .45); }
.nt-drop { top: 92%; left: 50%; }
.nt-jars { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-jar { display: grid; justify-items: center; gap: 2px; min-width: 76px; min-height: 48px; padding: .4rem .5rem .35rem; border-radius: 14px; border: 1.5px solid rgba(35, 56, 47, .25); background: var(--paper-light); color: var(--ink); font: 600 .85rem/1.1 var(--body); cursor: pointer; }
.nt-jar img { width: 26px; height: auto; }
.nt-jar[aria-pressed="true"] { border-color: var(--deep-sea); background: var(--deep-sea); color: var(--ivory); }
.nt-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nt-hint { font: 500 .95rem/1.35 var(--hand); color: var(--ink-soft); }
html[data-hands="small"] .nt-jar { min-width: 96px; min-height: var(--hands-target, 56px); font-size: 1rem; }
html[data-hands="small"] .nt-tiles { --size: clamp(52px, 14vw, 90px); }
/* 3: the stressed word swells as it's read */
.intro .beat .w.stress { display: inline-block; transition: transform 260ms var(--ease-settle), font-variation-settings 260ms ease; transform-origin: 50% 80%; }
.intro.reading .beat .w.stress.saying { transform: scale(1.16) translateY(-2px); }
html.reduced .intro.reading .beat .w.stress.saying { transform: none; }
.name-toy { grid-template-columns: minmax(0, 1fr); }
.nt-input { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 400px) { .name-toy { padding: 18px 14px; } .nt-jar { min-width: 64px; } }

/* =====================================================================================================
   v6: weather of the day, sticker book, weather toys, page turns, watch-along, seasonal islands,
   Wobble's sneezes, and "Help Wobble grow" (support.html)
   ===================================================================================================== */

/* ---- weather of the day ---- */
.play-daily { margin-left: .5rem; padding-left: .7rem; }
.play-daily .pd-sun { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #FFE6A0, #F5CE79 55%, #D9A143); box-shadow: 0 0 0 3px rgba(245, 206, 121, .25), 0 2px 4px rgba(0, 0, 0, .3); }
.play-daily .pd-streak { font: 500 .8125rem/1 var(--hand); padding: .25rem .5rem; border-radius: 999px; background: rgba(245, 206, 121, .22); color: #FFE6A0; }
.play-daily .pd-streak[hidden] { display: none; }
.play-daily.done .pd-sun { background: radial-gradient(circle at 40% 40%, #FFF3D0, #F5CE79); }

.pm.is-daily .pm-eyebrow { color: #FFE6A0; }
.pd-card { gap: 10px; }
.pd-streak-big { font: 600 clamp(1.25rem, 1rem + 1vw, 1.6rem)/1.2 var(--display); }
.pd-dots { list-style: none; display: flex; gap: 8px; margin: 4px 0 0; padding: 0; }
.pd-dots li { width: 18px; height: 18px; border-radius: 50%; border: 2px dashed rgba(197, 138, 50, .7); }
.pd-dots li.on { border: 0; background: radial-gradient(circle at 40% 40%, #FFE6A0, #F5CE79 60%, #C58A32); box-shadow: 0 2px 0 #B98431; }
.pd-unlock { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; text-align: left; padding: 10px 14px; border-radius: 14px; background: rgba(245, 206, 121, .28); }
.pd-sticker { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); transform: rotate(-6deg); }
.pd-back { font: 500 .95rem/1.3 var(--hand); color: var(--ink-soft); }

/* ---- sticker book ---- */
.journal-stickers { margin-top: 34px; padding-top: 26px; border-top: 1.5px dashed rgba(197, 138, 50, .55); }
.journal-stickers h3:focus { outline: none; }
.sb-keys { margin-top: .35rem; font-size: .875rem; color: var(--ink-soft); max-width: 40rem; }
.sb-page { position: relative; margin-top: 16px; aspect-ratio: 3 / 2; border-radius: 6px; background: var(--paper) url("../assets/textures/page-seamless.webp") 0 0 / 700px; box-shadow: inset 0 0 0 1px rgba(62, 44, 28, .15), 0 10px 24px rgba(35, 25, 15, .16), 6px 6px 0 -2px #E9DCBD, 6px 6px 0 -1px rgba(62, 44, 28, .2); overflow: hidden; touch-action: none; }
.sb-page::after { content: ""; position: absolute; inset: 0 auto 0 50%; width: 30px; transform: translateX(-50%); background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(62, 44, 28, .1), rgba(0, 0, 0, 0)); pointer-events: none; }
.sb-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font: 500 1.05rem/1.4 var(--hand); color: rgba(35, 56, 47, .55); }
.stk { border: 0; padding: 0; background: none; cursor: pointer; color: inherit; }
.stk-face { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; width: 100%; height: 100%; filter: drop-shadow(2.5px 0 0 #FFFDF6) drop-shadow(-2.5px 0 0 #FFFDF6) drop-shadow(0 2.5px 0 #FFFDF6) drop-shadow(0 -2.5px 0 #FFFDF6) drop-shadow(0 3px 4px rgba(35, 25, 15, .28)); }
.stk-face svg, .stk-face img { width: 88%; height: 88%; object-fit: contain; pointer-events: none; }
.stk-seal { border-radius: 50%; }
.stk-seal::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--crayon) 70%, #fff), var(--crayon)); box-shadow: inset 0 0 0 3px rgba(255, 246, 222, .35); }
.stk-seal { position: relative; }
.stk-seal img { position: relative; width: 52%; height: 60%; }
.stk-letter > span { display: grid; place-items: center; width: 78%; height: 82%; border-radius: 10%; background: #FBF1DB; box-shadow: inset 0 0 0 1.5px rgba(62, 44, 28, .3); font: 600 clamp(1.6rem, 4vw, 2.6rem)/1 var(--display); color: var(--ink); }
.stk.on-page { position: absolute; width: 12%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(var(--s, 1)); touch-action: none; }
.stk.on-page:focus-visible, .stk.on-page.is-selected { outline: 2.5px dashed var(--deep-sea); outline-offset: 4px; border-radius: 8px; }
.stk.on-page:active { cursor: grabbing; }
.sb-status { min-height: 1.4em; margin-top: 8px; font: 500 .95rem/1.3 var(--hand); color: var(--ink-soft); }
.sb-actions { margin-top: 6px; }
.sb-tray-title { margin-top: 18px; font-size: 1.05rem; }
.sb-tray { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; margin: 10px 0 0; padding: 0; }
.stk.in-tray { width: 100%; aspect-ratio: 1; border-radius: 12px; background: rgba(255, 253, 246, .6); box-shadow: inset 0 0 0 1px rgba(62, 44, 28, .12); transition: transform var(--t-select, 160ms); }
.stk.in-tray:hover { transform: rotate(-4deg) scale(1.06); }
.stk.in-tray .stk-face { width: 82%; height: 82%; margin: auto; }
.sb-none { grid-column: 1 / -1; font: 500 1rem/1.4 var(--hand); color: var(--ink-soft); }
.print-sheet { display: none; }
@media print {
  html.printing-sheet body > *:not(.print-sheet) { display: none !important; }
  html.printing-sheet .print-sheet { display: block !important; }
  html.printing-sheet .print-sheet img { width: 100%; height: auto; }
}

/* ---- weather toys ---- */
.wx-toys { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); margin-top: clamp(36px, 5vw, 56px); padding: clamp(18px, 3vw, 28px); border-radius: 20px; background: rgba(255, 253, 246, .55); box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .35); }
.toys-title { grid-column: 1 / -1; font-size: clamp(1.25rem, 1rem + .8vw, 1.6rem); }
.toy-name { font: 650 1.15rem/1.2 var(--display); }
.toy-how { margin-top: .3rem; color: var(--ink-soft); font-size: .9375rem; }
.pt-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 12px; }
.pt-swatch { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: .3rem .75rem .3rem .45rem; border-radius: 999px; border: 1.5px solid rgba(35, 56, 47, .3); background: var(--paper-light); color: var(--ink); font-weight: 600; font-size: .9375rem; cursor: pointer; }
.pt-swatch img { width: 20px; height: 31px; object-fit: contain; }
.pt-swatch[aria-pressed="true"] { background: var(--deep-sea); color: var(--ivory); border-color: var(--deep-sea); box-shadow: 0 3px 0 #0E3336; }
.blow-toy { display: grid; justify-items: center; align-content: start; gap: 10px; text-align: center; }
.blow-btn { position: relative; display: grid; justify-items: center; gap: 6px; width: 172px; padding: 18px 10px 14px; border: 0; border-radius: 28px; background: radial-gradient(120% 100% at 50% 0%, #E9F2F8, #B8CAD8); color: var(--ink); font-weight: 700; cursor: pointer; box-shadow: 0 5px 0 #7F98AE, 0 14px 26px rgba(23, 76, 80, .2); user-select: none; -webkit-user-select: none; touch-action: none; -webkit-touch-callout: none; }
.blow-btn.is-holding { transform: translateY(3px); box-shadow: 0 2px 0 #7F98AE, 0 8px 16px rgba(23, 76, 80, .2); }
.blow-wob { --puff: 0; position: relative; display: block; width: 112px; height: 96px; transform: scale(calc(1 + var(--puff) * .22), calc(1 + var(--puff) * .12)); transform-origin: 50% 80%; }
.blow-wob img { width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); }
.blow-cheek { position: absolute; top: 52%; left: 18%; width: 22%; height: 18%; border-radius: 50%; background: radial-gradient(circle, rgba(232, 144, 111, .8), rgba(232, 144, 111, 0) 70%); opacity: calc(.25 + var(--puff) * .75); transform: scale(calc(.6 + var(--puff) * .7)); }
.blow-cheek.r { left: auto; right: 22%; }
.blow-label { font: 650 1rem/1.1 var(--body); }
@media (max-width: 760px) { .wx-toys { grid-template-columns: minmax(0, 1fr); } }
.paint-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 60; pointer-events: none; }
.paint-catch { position: fixed; inset: 0; z-index: 61; cursor: crosshair; touch-action: none; }
.paint-catch[hidden] { display: none; }
.paint-bar { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 62; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); padding: 8px 8px 8px 18px; border-radius: 999px; transform: translateX(-50%); background: var(--paper-light); color: var(--ink); box-shadow: 0 12px 30px rgba(10, 30, 28, .3), inset 0 0 0 1.5px rgba(197, 138, 50, .5); }
.paint-bar[hidden] { display: none; }
.pb-label { font: 500 1rem/1.25 var(--hand); }
html.is-painting .companion { opacity: .4; }

/* ---- real page turns ---- */
.curl-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 40; pointer-events: none; display: none; }
.curl-layer.on { display: block; }

/* ---- watch-along films ---- */
.wa-toggle { margin-right: 6px; }
.wa-panel { position: absolute; inset: 10px; z-index: 5; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 18px 14px; border-radius: 14px; text-align: center; color: var(--ink); background: rgba(251, 244, 228, .94) url("../assets/textures/page-seamless.webp") 0 0 / 600px; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .5); overflow: auto; }
.wa-panel[hidden] { display: none; }
.wa-head { display: flex; align-items: center; gap: 8px; }
.wa-wob { width: 58px; height: auto; transform: scaleX(-1); animation: wa-bob 1.6s ease-in-out infinite; }
@keyframes wa-bob { 50% { transform: scaleX(-1) translateY(-4px) rotate(3deg); } }
.wa-kicker { font: 500 1rem/1.2 var(--hand); color: #557A52; }
.wa-q { font-size: clamp(1.2rem, 1rem + 1vw, 1.55rem); max-width: 18em; }
.wa-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.wa-choice { display: grid; justify-items: center; gap: 4px; min-height: 44px; padding: 8px 4px 10px; border-radius: 14px; border: 1.5px solid rgba(35, 56, 47, .25); background: var(--paper-light); color: var(--ink); font: 600 .875rem/1.2 var(--body); cursor: pointer; transition: transform var(--t-select, 160ms); }
.wa-choice:hover { transform: translateY(-2px) rotate(-1deg); border-color: var(--deep-sea); }
.wa-choice svg { width: min(72px, 100%); height: auto; aspect-ratio: 1; }
.wa-toast { position: absolute; left: 18px; right: 18px; bottom: 74px; z-index: 4; padding: 10px 14px; border-radius: 14px; background: var(--paper-light); color: var(--ink); font: 500 1rem/1.35 var(--hand); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.wa-toast[hidden] { display: none; }
.wa-toast.is-right { box-shadow: 0 10px 24px rgba(0, 0, 0, .3), inset 0 0 0 2px var(--warm); }

/* ---- seasonal islands ---- */
.season-chip { margin-top: 18px; background: rgba(255, 247, 230, .14); color: var(--ivory); border-color: rgba(255, 247, 230, .55); }
.season-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 4px rgba(245, 206, 121, .25); animation: season-pulse 2.4s ease-in-out infinite; }
@keyframes season-pulse { 50% { box-shadow: 0 0 0 7px rgba(245, 206, 121, 0); } }
.world-tab.is-season { border-style: dashed; }
.world-word-k { font: 500 .9rem/1 var(--hand); opacity: .8; }
.season-fx { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.season-fx > span { position: absolute; top: 0; height: 100%; width: calc(16px * var(--s)); animation: season-fall 10s linear infinite; }
.season-fx > span::after { content: ""; position: absolute; left: 0; top: 0; display: block; }
.fx-snow > span::after { width: calc(6px * var(--s)); height: calc(6px * var(--s)); border-radius: 50%; background: #fff; opacity: .85; box-shadow: 0 0 4px rgba(255, 255, 255, .8); }
.fx-leaves > span { animation-name: season-leaf; }
.fx-leaves > span::after { width: calc(16px * var(--s)); height: calc(8px * var(--s)); border-radius: 0 100% 0 100%; background: #D7782F; animation: season-spin 2.6s linear infinite; }
.fx-leaves > span:nth-child(3n)::after { background: #BE522E; }
.fx-leaves > span:nth-child(4n)::after { background: #E8AA42; }
.fx-lanterns > span { animation-name: season-rise; }
.fx-lanterns > span::after { width: calc(14px * var(--s)); height: calc(18px * var(--s)); border-radius: 40%; background: radial-gradient(circle at 50% 45%, #FFE6A0, #F0A44A); box-shadow: 0 0 calc(18px * var(--s)) rgba(255, 200, 110, .75); }
/* each particle rides a column as tall as the scene, so 100% is the scene's height */
@keyframes season-fall { from { transform: translate(0, -8%); } to { transform: translate(30px, 104%); } }
@keyframes season-leaf { from { transform: translate(0, -8%); } 25% { transform: translate(40px, 20%); } 50% { transform: translate(-10px, 48%); } 75% { transform: translate(50px, 76%); } to { transform: translate(10px, 104%); } }
@keyframes season-spin { to { transform: rotate(360deg); } }
@keyframes season-rise { from { transform: translate(0, 100%); opacity: 0; } 15% { opacity: 1; } 60% { transform: translate(-14px, 40%); } to { transform: translate(8px, -6%); opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .season-fx > span, .season-fx > span::after { animation: none !important; transform: translateY(calc(var(--s) * 30%)) !important; } }
html[data-tier="still"] .season-fx > span, html[data-tier="still"] .season-fx > span::after { animation: none; transform: translateY(calc(var(--s) * 30%)); }

/* ---- Wobble's weather sneeze ---- */
.rig-sneeze { position: absolute; width: 9%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; }
.sn-rain { background: #7FB4DA; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.sn-snow { background: #fff; box-shadow: 0 0 4px rgba(120, 150, 190, .7); }
.sn-wind { background: none; border: 2px solid rgba(230, 245, 238, .95); border-right-color: transparent; }
.sn-sun { background: radial-gradient(circle, #FFE6A0, rgba(245, 206, 121, 0) 70%); width: 16%; }
.sn-thunder { background: #F5CE79; clip-path: polygon(40% 0, 70% 0, 55% 40%, 80% 40%, 30% 100%, 42% 55%, 20% 55%); border-radius: 0; }

/* ---- Help Wobble grow ---- */
.gu-support a, [data-support-footer] a { font-weight: 650; }
.sp-pays { display: grid; gap: 10px; padding-left: 1.2rem; }
.sp-goal progress { width: 100%; height: 22px; margin-top: 12px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: rgba(35, 56, 47, .12); overflow: hidden; }
.sp-goal progress::-webkit-progress-bar { background: rgba(35, 56, 47, .12); border-radius: 999px; }
.sp-goal progress::-webkit-progress-value { background: linear-gradient(90deg, #F5CE79, #C58A32); border-radius: 999px; }
.sp-goal progress::-moz-progress-bar { background: linear-gradient(90deg, #F5CE79, #C58A32); border-radius: 999px; }
.sp-goal-nums { margin-top: 8px; font: 650 1.1rem/1.3 var(--display); }
.sp-tiers { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; padding: 0; }
.sp-tier { padding: 18px 18px 16px; border-radius: 16px; background: var(--paper-light) url("../assets/textures/page-seamless.webp") calc(var(--i) * 140px) 0 / 700px; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .45), 0 8px 18px rgba(35, 25, 15, .08); transform: rotate(calc((var(--i) - 1.5) * .6deg)); }
.sp-tier h3 { font-size: 1.2rem; }
.sp-tier ul { margin-top: 8px; padding-left: 1.1rem; display: grid; gap: 6px; font-size: .9375rem; }
.sp-price { margin-top: 2px; font: 600 1rem/1.2 var(--hand); color: #557A52; }
.sp-wall { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; padding: 0; }
.sp-wall li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 8px; border-radius: 10px; background: #FBF1DB; box-shadow: 0 3px 0 rgba(62, 44, 28, .15); transform: rotate(var(--r)); font: 600 1rem/1.2 var(--hand); }
.sp-wall img { width: 18px; height: 27px; object-fit: contain; }
.sp-clip { margin: 14px 0 0; }
.sp-clip video { width: 100%; height: auto; border-radius: 14px; background: #2C2320; }
.sp-clip figcaption { margin-top: 6px; font-size: .9375rem; color: var(--ink-soft); }
.support-page .doc section { margin-top: 34px; }

/* on phones "Play a minute" sits in the picture; the weather of the day stays with the other buttons */
@media (max-width: 760px) { .play-daily.play-open { position: static; translate: none; top: auto; left: auto; margin-left: 0; backdrop-filter: none; background: rgba(255, 247, 230, .12); } }
@media (hover: none) and (pointer: coarse) { .sb-keys { display: none; } }

/* ---- v7: light that follows the time ---- */
.opening-scene::before, .world-scene::before { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(ellipse 70% 90% at var(--sun-x, 70%) 0%, var(--sun-tint, transparent), transparent 70%); mix-blend-mode: soft-light; opacity: var(--sun-glow, 0); transition: opacity 2s ease; }
html[data-sun="golden"] .opening-scene::before, html[data-sun="golden"] .world-scene::before { mix-blend-mode: overlay; }
.world-card, .wx-toys, .pm-card, .sp-tier, .maker { --cast: calc(var(--sun-sx, 0) * 1px) calc(var(--sun-sy, 4) * 1.6px); }
.world-card { box-shadow: var(--cast) 18px rgba(35, 25, 15, .18); }

/* ---- v7: make a puzzle ---- */
.maker { margin-top: clamp(40px, 6vw, 72px); padding: clamp(18px, 3vw, 32px); border-radius: 20px; background: var(--paper-light) url("../assets/textures/page-seamless.webp") 0 0 / 800px; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .4), var(--cast, 0 4px) 22px rgba(35, 25, 15, .12); scroll-margin-top: 90px; }
.maker h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
.mk-intro { margin-top: .35rem; max-width: 44rem; color: var(--ink-soft); }
.mk-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); margin-top: 18px; align-items: start; }
@media (max-width: 860px) { .mk-grid { grid-template-columns: minmax(0, 1fr); } .mk-side { order: -1; } }
.mk-form fieldset { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.mk-form legend { font: 650 1.05rem/1.3 var(--display); margin-bottom: 8px; }
.mk-hint { margin: -4px 0 8px; font-size: .875rem; color: var(--ink-soft); }
.mk-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-choice, .mk-bottle { position: relative; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .35rem .8rem; border-radius: 12px; border: 1.5px solid rgba(35, 56, 47, .25); background: rgba(255, 253, 246, .8); cursor: pointer; font-weight: 600; font-size: .9375rem; }
.mk-choice input, .mk-bottle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mk-choice:has(input:checked), .mk-bottle:has(input:checked) { background: var(--deep-sea); color: var(--ivory); border-color: var(--deep-sea); }
.mk-choice:has(input:focus-visible), .mk-bottle:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.mk-problem .mk-choice { flex: 1 1 240px; font-weight: 500; }
.mk-sw { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .2); }
.mk-bottle img { width: 18px; height: 28px; object-fit: contain; }
.mk-bottle.is-answer { cursor: default; }
.mk-need { font: 500 .8rem/1 var(--hand); color: #F5CE79; }
.mk-preview { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #1D5A5C; box-shadow: 0 0 0 5px var(--ivory), 0 14px 30px rgba(0, 0, 0, .25); }
.mk-preview .mk-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mk-preview .mk-terrain, .mk-preview .mk-terrain svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-preview.is-dark::after { content: ""; position: absolute; inset: 0; background: rgba(10, 8, 24, .45); }
.mk-shelf { display: flex; justify-content: center; gap: 10px; margin-top: 14px; min-height: 46px; }
.mk-shelf img { width: 30px; height: 46px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
.mk-code-row { margin-top: 10px; text-align: center; font: 500 1rem/1.3 var(--hand); }
.mk-code { display: inline-block; padding: .2rem .6rem; border-radius: 8px; background: #FBF1DB; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .5); font: 700 1.35rem/1.2 var(--body); letter-spacing: .14em; color: var(--ink); }
.mk-side .actions { justify-content: center; margin-top: 10px; }
.mk-status { min-height: 1.3em; margin-top: 8px; text-align: center; font: 500 .95rem/1.3 var(--hand); color: var(--ink-soft); overflow-wrap: anywhere; }
.mk-play { margin-top: 16px; padding-top: 14px; border-top: 1.5px dashed rgba(197, 138, 50, .5); }
.mk-play label { display: block; font-weight: 600; margin-bottom: 6px; }
.mk-play-row { display: flex; gap: 8px; }
.mk-play input { flex: 1; min-width: 0; min-height: 44px; padding: .4rem .7rem; border-radius: 10px; border: 1.5px solid rgba(35, 56, 47, .35); font: 700 1.1rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; background: #fff; }
.pm-sky, .mk-preview .pm-sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.pm-sky > span { position: absolute; top: 0; height: 100%; width: 12px; animation: season-fall 9s linear infinite; }
.pm-sky > span::after { content: ""; position: absolute; left: 0; top: 0; display: block; }
[data-sky="rain"] .pm-sky > span { animation-duration: 1.6s; }
[data-sky="rain"] .pm-sky > span::after { width: 2px; height: calc(14px * var(--s)); background: rgba(190, 220, 245, .8); border-radius: 2px; }
[data-sky="snow"] .pm-sky > span::after { width: calc(6px * var(--s)); height: calc(6px * var(--s)); border-radius: 50%; background: #fff; }
[data-sky="leaves"] .pm-sky > span { animation-name: season-leaf; }
[data-sky="leaves"] .pm-sky > span::after { width: calc(14px * var(--s)); height: calc(7px * var(--s)); border-radius: 0 100% 0 100%; background: #D7782F; }
[data-sky="stars"] .pm-sky > span { animation: bt-twinkle 3s ease-in-out infinite; height: 60%; }
[data-sky="stars"] .pm-sky > span::after { top: calc(var(--s) * 40%); width: 4px; height: 4px; border-radius: 50%; background: #FFF6DE; box-shadow: 0 0 6px #FFF6DE; }
@media (prefers-reduced-motion: reduce) { .pm-sky > span { animation: none !important; transform: translateY(calc(var(--s) * 30%)); } }

/* ---- v7: the weather band ---- */
.band-toy { grid-column: 1 / -1; padding-top: 18px; border-top: 1.5px dashed rgba(197, 138, 50, .45); }
.band-keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; max-width: 620px; margin: 14px 0 12px; }
.band-key { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; border: 0; border-radius: 16px 16px 22px 22px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 20%, #fff), color-mix(in srgb, var(--c) 42%, #fff)); box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 70%, #000), 0 10px 18px rgba(23, 76, 80, .15); cursor: pointer; }
.band-key img { width: 58%; height: auto; pointer-events: none; }
.band-key .band-num { position: absolute; left: 8px; top: 6px; font: 700 .8rem/1 var(--body); color: color-mix(in srgb, var(--c) 70%, #000); }
.band-key:active, .band-key.hit { animation: band-hit 240ms cubic-bezier(.3, 1.6, .5, 1); }
@keyframes band-hit { 40% { transform: translateY(4px) scale(.96, 1.04); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 70%, #000); } }
.band-strip { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; margin: 0 0 10px; padding: 0; }
.band-strip li { width: calc(var(--d) * 14px); height: 18px; border-radius: 9px; background: var(--c); opacity: .75; }
.band-strip li.now { opacity: 1; transform: scaleY(1.35); }
.band-status { min-height: 1.3em; margin-top: 6px; font: 500 .95rem/1.3 var(--hand); color: var(--ink-soft); overflow-wrap: anywhere; }
.band-rec[aria-pressed="true"] { background: #C9483F; color: #fff; box-shadow: 0 3px 0 #8E2C25; }

/* ---- v7: pages you turn by hand ---- */
.pt-layer { position: absolute; inset: 10px; z-index: 6; overflow: hidden; border-radius: 14px; pointer-events: none; }
.pt-layer[hidden] { display: none; }
.pt-under, .pt-leaf { position: absolute; inset: 0; background: #2C2320 center / cover no-repeat; }
.pt-shade, .pt-flap { position: absolute; inset: 0; }
.pt-flap { filter: drop-shadow(-6px 4px 10px rgba(0, 0, 0, .35)); }
.pt-corner { position: absolute; bottom: 10px; z-index: 7; width: 64px; height: 64px; border: 0; padding: 0; cursor: grab; touch-action: none; background: none; }
.pt-corner::before { content: ""; position: absolute; bottom: 0; width: 34px; height: 34px; background: linear-gradient(135deg, transparent 50%, #F0E3C6 50%, #FBF4E4); box-shadow: -3px -3px 6px rgba(0, 0, 0, .25); transition: width 200ms, height 200ms; }
.pt-next { right: 10px; } .pt-next::before { right: 0; border-radius: 6px 0 14px 0; }
.pt-prev { left: 10px; } .pt-prev::before { left: 0; transform: scaleX(-1); border-radius: 6px 0 14px 0; }
.pt-corner:hover::before, .pt-corner:focus-visible::before { width: 46px; height: 46px; }
.pt-corner[hidden] { display: none; }
.screen-frame.is-turning .film { visibility: hidden; }

/* ---- v7: bedtime ---- */
.bt-moon svg { width: 20px; height: 20px; fill: currentColor; }
.bedtime { --night: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0B1430; color: #FFF7E6; overflow: hidden; }
.bedtime::backdrop { background: #060B1E; }
.bt-scene, .bt-dim { position: absolute; inset: 0; }
.bt-sky { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.bt-wren { position: absolute; left: 12%; bottom: 6%; height: min(42vh, 360px); filter: brightness(.72) saturate(.8) drop-shadow(0 0 30px rgba(245, 206, 121, .2)); }
.bt-wob { position: absolute; left: calc(12% + min(22vh, 190px)); bottom: 6%; width: min(26vh, 220px); filter: brightness(.82) saturate(.8); }
.bt-dim { background: radial-gradient(ellipse at 50% 40%, rgba(6, 10, 30, calc(.2 + var(--night) * .35)), rgba(4, 6, 20, calc(.55 + var(--night) * .3))); transition: background 3s ease; }
.bedtime.asleep .bt-dim { background: rgba(3, 5, 16, .86); }
.bt-stars > span { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #FFF6DE; box-shadow: 0 0 6px #FFF6DE; animation: bt-twinkle 5s ease-in-out infinite; }
@keyframes bt-twinkle { 50% { opacity: .25; } }
.bt-lanterns { z-index: 1; }
.bt-card { position: absolute; left: 50%; top: 12%; width: min(680px, 88vw); transform: translateX(-50%); text-align: center; }
.bt-title { font: 600 clamp(1rem, .9rem + .5vw, 1.25rem)/1.2 var(--hand); color: #F5CE79; }
.bt-text { margin-top: 14px; font: 500 clamp(1.4rem, 1rem + 2vw, 2.4rem)/1.45 var(--display); text-shadow: 0 2px 16px rgba(0, 0, 0, .6); opacity: 0; }
.bt-text.in { animation: bt-in 2.4s ease forwards; }
@keyframes bt-in { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
.bt-text.bt-end { color: #FFE6A0; }
.bt-dots { list-style: none; display: flex; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; }
.bt-dots li { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 247, 230, .25); }
.bt-dots li.on { background: #F5CE79; }
.bt-tools { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.bt-tools .chip { background: rgba(255, 247, 230, .1); color: #FFF7E6; border-color: rgba(255, 247, 230, .4); }
.bt-close { position: absolute; right: 18px; top: 18px; z-index: 3; background: rgba(255, 247, 230, .14); color: #FFF7E6; }
.bedtime.bt-still .bt-text.in { animation: none; opacity: 1; }
.bedtime.bt-still .season-fx > span, .bedtime.bt-still .bt-stars > span { animation: none; }

/* ---- v7: choose what happens next ---- */
.fork { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(18px, 4vw, 48px); align-items: center; margin-top: clamp(40px, 6vw, 72px); }
@media (max-width: 760px) { .fork { grid-template-columns: minmax(0, 1fr); } }
.fork h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
.fork-copy p { margin-top: .5rem; max-width: 30rem; }
.fork-words { font: 500 1.05rem/1.4 var(--hand); color: var(--ink-soft); min-height: 2.8em; }
.fork-frame { position: relative; padding: 10px; border-radius: 22px; background: #2C2320; box-shadow: 0 0 0 2px #B58449, 0 24px 50px rgba(35, 25, 15, .3); }
.fork-video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 14px; background: #F5E9CF; }
.fork-start { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); }
.fork-start[hidden], .fork-choices[hidden], .fork-again[hidden] { display: none; }
.fork-choices { position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 0 0 14px 14px; background: linear-gradient(rgba(245, 233, 207, 0), rgba(245, 233, 207, .96) 30%); }
.fork-jar { display: grid; justify-items: center; gap: 4px; min-height: 44px; padding: 8px 4px; border-radius: 14px; border: 1.5px solid rgba(35, 56, 47, .3); background: var(--paper-light); color: var(--ink); font-weight: 650; cursor: pointer; }
.fork-jar img { width: 34px; height: 52px; object-fit: contain; }
.fork-jar.tried { opacity: .55; }
.fork-again { position: absolute; left: 10px; right: 10px; bottom: 18px; justify-content: center; }

/* ---- v7: wardrobe ---- */
.rig-wear { position: absolute; inset: 0; pointer-events: none; }
.wear { position: absolute; display: block; }
.wear svg { width: 100%; height: 100%; overflow: visible; }
.wear-hat { left: 6%; top: -9%; width: 34%; aspect-ratio: 1; transform: rotate(-12deg); }
.wear-hat.wear-flowers, .wear-hat.wear-leaf { top: -3%; }
.wear-neck { left: 6%; top: 46%; width: 38%; aspect-ratio: 1; transform: rotate(-8deg); }
.wear-feet { width: 10%; aspect-ratio: 60 / 72; }
.wear-l { left: 18%; top: 80%; } .wear-r { left: 72%; top: 82%; }
.journal-wardrobe { margin-top: 34px; padding-top: 26px; border-top: 1.5px dashed rgba(197, 138, 50, .55); }
.wd-slot { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.wd-slot legend { font: 650 1rem/1.3 var(--display); margin-bottom: 8px; }
.wd-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.wd-item { display: grid; justify-items: center; gap: 4px; min-height: 44px; padding: 10px 8px; border-radius: 14px; border: 1.5px solid rgba(35, 56, 47, .2); background: rgba(255, 253, 246, .7); color: var(--ink); font-size: .875rem; font-weight: 600; text-align: center; cursor: pointer; }
.wd-item[aria-pressed="true"] { border-color: var(--deep-sea); box-shadow: inset 0 0 0 2px var(--deep-sea); background: #fff; }
.wd-art { display: grid; place-items: center; width: 56px; height: 56px; font-size: 1.6rem; color: var(--ink-soft); }
.wd-art svg { width: 100%; height: 100%; }
.wd-item.is-locked .wd-art { filter: grayscale(1) opacity(.45); }
.wd-how { font: 500 .78rem/1.25 var(--hand); color: var(--ink-soft); }

/* ---- v7: Wobble in your room ---- */
.ar-open { margin-top: 12px; }
.ar-cube { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 3px; transform: rotate(45deg) scale(.8); }
.ar-dialog { width: min(560px, 94vw); padding: 24px; border: 0; border-radius: 18px; background: var(--paper-light); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.ar-dialog::backdrop { background: rgba(14, 30, 28, .72); }
.ar-dialog h2 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); padding-right: 50px; }
.ar-stage { margin-top: 12px; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: radial-gradient(circle at 50% 70%, #FBF4E4, #E9DCBD); }
.ar-stage model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.ar-go { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); }
.ar-status { min-height: 1.3em; margin-top: 10px; font: 500 1rem/1.35 var(--hand); }
.ar-note { margin-top: 4px; font-size: .875rem; color: var(--ink-soft); }
.ar-close { position: absolute; right: 14px; top: 14px; }
.bt-toggle { margin-right: 8px; }
.bt-toggle .bt-moon svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.bt-toggle .sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bt-card::before { content: ""; position: absolute; inset: -40px -70px; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(5, 9, 26, .78), rgba(5, 9, 26, 0) 70%); }
@media (max-width: 430px) { .bt-toggle { display: none; } }
@media (min-width: 431px) { .nav-bedtime { display: none !important; } }
.opening.pm-open .opening-copy h1 { visibility: visible; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 560px) { .band-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 300px; } }
.fork-start { white-space: nowrap; }

/* =====================================================================================================
   v8: the book that opens, the journey path, the island map, weather takeovers, the sound invitation,
   the paper TV, postcards, the note for grown-ups, journal codes, the roadmap and the studio page
   ===================================================================================================== */

/* ---- the book that opens ---- */
.bk { position: absolute; inset: 0; z-index: 9; perspective: 2200px; display: grid; place-items: center; }
.bk-cover { --lx: 50%; --ly: 40%; --rx: 0deg; --ry: 0deg; position: absolute; inset: 0; transform-origin: 0 50%; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .4s ease; cursor: pointer; }
.bk-front, .bk-back { position: absolute; inset: 0; backface-visibility: hidden; }
.bk-front { display: grid; place-content: center; justify-items: center; gap: 10px; background:
  radial-gradient(circle at var(--lx) var(--ly), rgba(255, 236, 190, .28), rgba(0, 0, 0, 0) 55%),
  repeating-linear-gradient(45deg, rgba(255, 255, 255, .025) 0 2px, rgba(0, 0, 0, .03) 2px 4px),
  linear-gradient(135deg, #1F5A5C, #123C3F); box-shadow: inset 18px 0 30px rgba(0, 0, 0, .35), inset -2px 0 0 rgba(255, 255, 255, .08); }
.bk-front::before { content: ""; position: absolute; inset: 22px; border: 2px solid rgba(245, 206, 121, .55); border-radius: 10px; box-shadow: inset 0 0 0 6px rgba(245, 206, 121, .12); pointer-events: none; }
.bk-logo { width: min(420px, 62vw); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.bk-sub { font: 600 clamp(1.1rem, .9rem + 1vw, 1.6rem)/1.2 var(--display); color: #F5CE79; letter-spacing: .02em; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.bk-band { position: absolute; left: 0; top: 0; bottom: 0; width: 34px; background: linear-gradient(90deg, #0C2A2C, #1A4B4D 60%, #0E3133); box-shadow: 4px 0 10px rgba(0, 0, 0, .3); }
.bk-back { transform: rotateY(180deg); background: var(--paper-light) url("../assets/textures/page-seamless.webp") 0 0 / 700px; }
.bk-open { position: absolute; bottom: 9%; left: 50%; z-index: 2; transform: translateX(-50%); min-height: 46px; padding: .5rem 1.2rem; border-radius: 999px; border: 0; background: var(--warm); color: var(--ink); font: 700 1rem/1 var(--body); box-shadow: 0 3px 0 #B98431, 0 10px 22px rgba(0, 0, 0, .3); cursor: pointer; }
.bk.is-opening .bk-cover { transition: transform 1.4s cubic-bezier(.6, .05, .25, 1); transform: rotateY(-168deg); }
.bk.is-opening .bk-open { opacity: 0; transition: opacity .3s; }
.bk.is-opening { pointer-events: none; }

/* ---- the journey path ---- */
.journey { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 clamp(96px, 9vw, 120px) 0 12px; background: linear-gradient(rgba(245, 233, 207, 0), rgba(245, 233, 207, .94) 40%); transform: translateY(100%); transition: transform .4s var(--ease-paper, ease); pointer-events: none; }
.journey.is-on { transform: none; pointer-events: auto; }
html:has(.opening.pm-open) .journey, html.is-painting .journey, html.bedtime-on .journey { transform: translateY(100%); }
.jy-map { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: .3rem .8rem .3rem .55rem; border-radius: 999px; border: 1.5px solid rgba(35, 56, 47, .35); background: var(--paper-light); color: var(--ink); font: 650 .9rem/1 var(--body); cursor: pointer; }
.jy-map-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; display: block; }
.jy-track { --p: 0; position: relative; flex: 1; height: 40px; display: flex; align-items: center; justify-content: space-between; }
.jy-track::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 2px; background: repeating-linear-gradient(90deg, rgba(122, 90, 52, .5) 0 8px, transparent 8px 13px); }
.jy-fill { position: absolute; left: 6px; top: 50%; height: 4px; width: calc((100% - 12px) * var(--p)); transform: translateY(-50%); border-radius: 2px; background: var(--ochre); }
.jy-stop { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; }
.jy-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--paper-light); box-shadow: inset 0 0 0 2px rgba(122, 90, 52, .7); transition: transform .2s; }
.jy-stop.is-past .jy-dot { background: var(--ochre); box-shadow: none; }
.jy-stop.is-here .jy-dot { transform: scale(1.35); background: var(--deep-sea); box-shadow: 0 0 0 3px rgba(23, 76, 80, .2); }
.jy-label { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: .15rem .5rem; border-radius: 6px; background: var(--ink); color: var(--ivory); font: 600 .75rem/1.3 var(--body); opacity: 0; pointer-events: none; transition: opacity .15s; }
.jy-stop:hover .jy-label, .jy-stop:focus-visible .jy-label { opacity: 1; }
.jy-wob { --face: 1; position: absolute; z-index: 2; left: calc(6px + (100% - 12px) * var(--p)); bottom: 22px; width: 44px; height: auto; transform: translateX(-50%) scaleX(calc(var(--face) * -1)); pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .25)); }
.jy-wob.is-walking { animation: jy-trot .32s ease-in-out infinite; }
@keyframes jy-trot { 50% { translate: 0 -4px; rotate: 3deg; } }
@media (max-width: 640px) { .journey { padding-right: 84px; gap: 6px; } .jy-map span:last-child { display: none; } .jy-stop { width: 20px; } }
@media (prefers-reduced-motion: reduce) { .jy-wob.is-walking { animation: none; } .journey { transition: none; } }
@media print { .journey { display: none; } }

/* ---- the island map ---- */
.nav-map { display: none; }
@media (max-width: 1023px) { .nav-map { display: list-item; } }
.mp { width: min(980px, 96vw); max-height: 94vh; padding: 22px clamp(14px, 3vw, 30px) 18px; border: 0; border-radius: 18px; background: #F1E3C2 url("../assets/textures/page-seamless.webp") 0 0 / 800px; color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); overflow: auto; }
.mp::backdrop { background: rgba(14, 30, 28, .72); }
.mp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding-right: 54px; }
.mp-head h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem); }
.mp-progress { font: 500 1rem/1.3 var(--hand); color: #557A52; }
.mp-close { position: absolute; right: 14px; top: 14px; }
.mp-chart { position: relative; margin-top: 14px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 50%, rgba(120, 170, 180, .35), rgba(70, 120, 135, .55)), url("../assets/textures/page-seamless.webp") 0 0 / 600px; box-shadow: inset 0 0 0 2px rgba(122, 90, 52, .4), inset 0 0 60px rgba(30, 60, 70, .35); }
.mp-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.mp-compass { position: absolute; right: 14px; bottom: 12px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(122, 90, 52, .6); font: 700 1rem/1 var(--display); color: #7A5A34; background: rgba(251, 244, 228, .7); }
.mp-isle { position: absolute; display: grid; justify-items: center; gap: 4px; width: clamp(84px, 14%, 150px); padding: 0; border: 0; background: none; transform: translate(-50%, -50%); cursor: pointer; color: var(--ink); }
.mp-art { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; box-shadow: 0 0 0 4px #FBF4E4, 0 8px 18px rgba(20, 30, 40, .35); transition: transform .25s var(--ease-paper, ease); }
.mp-art img { width: 100%; height: 100%; object-fit: cover; }
.mp-isle:hover .mp-art, .mp-isle:focus-visible .mp-art { transform: translateY(-4px) rotate(-2deg); }
.mp-fog { position: absolute; top: 0; left: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .88), rgba(240, 240, 245, .74) 60%, rgba(230, 232, 240, .55)); backdrop-filter: blur(4px); transition: opacity .8s; }
.mp-isle.is-seen .mp-fog { opacity: 0; }
.mp-name { padding: .15rem .55rem; border-radius: 6px; background: rgba(251, 244, 228, .92); font: 650 .8rem/1.2 var(--body); box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.mp-isle.is-season .mp-name { background: var(--warm); }
.mp-hint { margin-top: 10px; font: 500 .95rem/1.3 var(--hand); color: var(--ink-soft); }
@media (max-width: 640px) { .mp-chart { aspect-ratio: 3 / 4; } .mp-name { font-size: .7rem; } }

/* ---- weather that takes over the page ---- */
.tk { position: fixed; inset: 0; z-index: 25; pointer-events: none; overflow: hidden; }
.tk > div { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.tk-water { top: auto; height: 0; background: linear-gradient(rgba(120, 175, 205, .45), rgba(62, 118, 160, .7)); box-shadow: 0 -2px 0 rgba(220, 240, 252, .9); transition: height 1.2s ease, opacity .6s; }
.tk-wave { position: absolute; left: -10%; right: -10%; top: -10px; height: 20px; background: radial-gradient(ellipse 18px 10px at 50% 100%, rgba(190, 220, 240, .8) 70%, transparent 72%) 0 0 / 36px 20px repeat-x; animation: tk-wave 2.4s linear infinite; }
.tk-wave2 { top: -6px; opacity: .6; animation-duration: 3.4s; animation-direction: reverse; }
@keyframes tk-wave { to { transform: translateX(36px); } }
html.tko-rain .tk-water { opacity: 1; height: 14vh; }
html.tko-rain .world-card, html.tko-rain .jar-panel, html.tko-rain .wx-toys, html.tko-rain .episode, html.tko-rain .maker, html.tko-rain .postcard { animation: tk-float 1.8s ease-in-out 2; }
@keyframes tk-float { 50% { transform: translateY(-6px) rotate(-.6deg); } }
.tk-frost { box-shadow: inset 0 0 160px 70px rgba(232, 243, 252, .95), inset 0 0 50px 18px rgba(255, 255, 255, 1); }
html.tko-snow .tk-frost { opacity: 1; }
html.tko-snow .kt-head { text-shadow: 0 -0.05em 0 #fff, 0 0 .25em rgba(184, 202, 216, .9); }
html.tko-wind .world-card, html.tko-wind .jar-panel, html.tko-wind .wx-toys, html.tko-wind .episode, html.tko-wind .maker, html.tko-wind .postcard, html.tko-wind .who { transform-origin: 0 0; animation: tk-lift 1.1s ease-in-out 3; }
@keyframes tk-lift { 40% { transform: perspective(900px) rotateX(-6deg) rotateZ(.8deg); } }
.tk-warm { background: radial-gradient(ellipse at 80% 0%, rgba(255, 214, 120, .45), rgba(255, 214, 120, 0) 60%); mix-blend-mode: soft-light; }
html.tko-sun .tk-warm { opacity: 1; }
.tk-bow { background: radial-gradient(circle at 50% 120%, transparent 54%, rgba(224, 100, 90, .28) 55%, rgba(238, 154, 74, .28) 58%, rgba(242, 207, 91, .28) 61%, rgba(127, 176, 105, .28) 64%, rgba(91, 155, 213, .28) 67%, rgba(124, 107, 180, .28) 70%, transparent 71%); transform: translateY(20%); transition: opacity .8s, transform 1.6s ease; }
html.tko-bow .tk-bow { opacity: 1; transform: none; }
.tk-flash { background: rgba(255, 250, 230, .16); }
html.tko-thunder .tk-flash { animation: tk-flash 3.6s ease 1; }
@keyframes tk-flash { 0%, 100% { opacity: 0; } 4% { opacity: 1; } 10% { opacity: .1; } }
html.tko-thunder .kt-head { animation: tk-flicker 1.4s steps(2) 1; }
@keyframes tk-flicker { 30% { opacity: .75; } 60% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tk { display: none; } }

/* ---- headphones on? ---- */
.si { position: fixed; right: 16px; top: calc(var(--masthead-h, 64px) + 12px); z-index: 40; display: flex; gap: 12px; width: min(360px, calc(100vw - 32px)); padding: 16px 16px 14px; border-radius: 16px; background: var(--paper-light); color: var(--ink); box-shadow: 0 18px 40px rgba(10, 30, 28, .3), inset 0 0 0 1.5px rgba(197, 138, 50, .45); transform: translateY(20px); opacity: 0; transition: transform .4s var(--ease-paper, ease), opacity .4s; }
.si.is-in { transform: none; opacity: 1; }
.si.is-gone { transform: translateY(20px); opacity: 0; }
.si-icon svg { width: 34px; height: 34px; fill: none; stroke: var(--deep-sea); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.si-title { font: 650 1.1rem/1.2 var(--display); }
.si-text { margin-top: 4px; font-size: .9rem; color: var(--ink-soft); }
.si .actions { margin-top: 10px; }

/* ---- the paper TV in Wren's house ---- */
.reels .reel { position: relative; padding: 14px 14px 34px; border-radius: 26px 26px 20px 20px; background: linear-gradient(160deg, #B98A57, #8F6B43); box-shadow: inset 0 2px 0 rgba(255, 246, 222, .4), inset 0 -4px 0 rgba(60, 40, 20, .3), 0 18px 34px rgba(35, 25, 15, .3); }
.reels .reel::before { content: ""; position: absolute; left: 50%; top: -34px; width: 70px; height: 34px; transform: translateX(-50%); background: linear-gradient(60deg, transparent 47%, #5B4330 48% 52%, transparent 53%) left / 50% 100% no-repeat, linear-gradient(-60deg, transparent 47%, #5B4330 48% 52%, transparent 53%) right / 50% 100% no-repeat; }
.reels .reel::after { content: ""; position: absolute; right: 18px; bottom: 9px; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #F5CE79, #B98431); box-shadow: -26px 0 0 -2px #E3B96A; }
.reels .reel video { border-radius: 16px; box-shadow: inset 0 0 0 3px #2C2320; background: #2C2320; }

/* ---- postcards ---- */
.postcard { margin-top: clamp(40px, 6vw, 72px); scroll-margin-top: 90px; }
.postcard h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); }
.pc-intro { margin-top: .35rem; color: var(--ink-soft); max-width: 40rem; }
.pc-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px); margin-top: 16px; align-items: start; }
@media (max-width: 760px) { .pc-grid { grid-template-columns: minmax(0, 1fr); } .pc-frame { order: -1; } }
.pc-field { display: grid; gap: 4px; margin-bottom: 12px; font-weight: 600; }
.pc-field select { min-height: 44px; padding: .3rem .6rem; border-radius: 10px; border: 1.5px solid rgba(35, 56, 47, .35); background: #fff; font: 500 1rem/1.2 var(--body); color: var(--ink); }
.pc-check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; }
.pc-check input { width: 20px; height: 20px; }
.pc-frame { transform: rotate(-1.2deg); }
.pc-canvas { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 16px 36px rgba(35, 25, 15, .22); background: #FFFDF6; }
.pc-status { min-height: 1.3em; margin-top: 6px; font: 500 .95rem/1.3 var(--hand); color: var(--ink-soft); }

/* ---- a note for grown-ups ---- */
.nudge { position: fixed; left: 50%; bottom: 70px; z-index: 45; width: min(440px, calc(100vw - 28px)); padding: 18px 18px 16px; border-radius: 18px; background: var(--paper-light) url("../assets/textures/page-seamless.webp") 0 0 / 600px; color: var(--ink); box-shadow: 0 24px 50px rgba(10, 30, 28, .35), inset 0 0 0 1.5px rgba(197, 138, 50, .5); transform: translate(-50%, 30px); opacity: 0; transition: transform .45s var(--ease-paper, ease), opacity .45s; }
.nudge.is-in { transform: translate(-50%, 0); opacity: 1; }
.nd-close { position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(35, 56, 47, .08); font-size: 1.3rem; cursor: pointer; color: var(--ink); }
.nd-body { display: grid; justify-items: center; gap: 8px; text-align: center; }
.nd-wob { width: 74px; transform: scaleX(-1); }
.nd-kid { font: 600 1.15rem/1.2 var(--hand); }
.nd-title { font: 500 .9rem/1 var(--hand); color: #557A52; }
.nd-body .actions { justify-content: center; }

/* ---- journal code ---- */
.journal-code { margin-top: 34px; padding-top: 26px; border-top: 1.5px dashed rgba(197, 138, 50, .55); }
.jc-row { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.jc-code { padding: .3rem .7rem; border-radius: 8px; background: #FBF1DB; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .5); font: 700 1.1rem/1.2 var(--body); letter-spacing: .08em; overflow-wrap: anywhere; }
.jc-status { min-height: 1.3em; margin-top: 6px; font: 500 .95rem/1.3 var(--hand); color: var(--ink-soft); }
.jc-form { margin-top: 10px; }
.jc-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.jc-form input { flex: 1; min-width: 0; min-height: 44px; padding: .4rem .7rem; border-radius: 10px; border: 1.5px solid rgba(35, 56, 47, .35); font: 700 1rem/1 var(--body); letter-spacing: .06em; text-transform: uppercase; background: #fff; }

/* ---- where the game is up to ---- */
.roadmap { margin-top: clamp(36px, 5vw, 60px); scroll-margin-top: 90px; }
.roadmap h3 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem); }
.rm { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 16px 0 0; padding: 0; counter-reset: rm; }
.rm-stage { position: relative; padding: 18px 16px 14px; border-radius: 4px 14px 14px 14px; background: var(--paper-light); color: var(--ink); box-shadow: 0 8px 18px rgba(35, 25, 15, .12), inset 0 0 0 1.5px rgba(197, 138, 50, .35); transform: rotate(calc((var(--i) - 2) * .5deg)); }
.rm-stage h4 { font: 650 1rem/1.25 var(--display); }
.rm-stage p { margin-top: 4px; font-size: .875rem; color: var(--ink-soft); }
.rm-pin { position: absolute; left: 14px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #E59A90, #B5544A); box-shadow: 0 2px 3px rgba(0, 0, 0, .3); }
.rm-status { font: 600 .85rem/1.2 var(--hand) !important; color: #557A52 !important; }
.rm-stage.is-done { opacity: .85; }
.rm-stage.is-done .rm-pin { background: radial-gradient(circle at 35% 30%, #9CC28A, #557A52); }
.rm-stage.is-now { box-shadow: 0 10px 22px rgba(35, 25, 15, .16), inset 0 0 0 2.5px var(--deep-sea); }
.rm-stage.is-now .rm-pin { background: radial-gradient(circle at 35% 30%, #F5CE79, #C58A32); }
.rm-unlocks { font-style: italic; }
.rm-count { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-weight: 600; }
.rm-count-n { display: grid; place-items: center; min-width: 52px; height: 52px; padding: 0 8px; border-radius: 12px; background: var(--warm); font: 700 1.5rem/1 var(--display); color: var(--ink); box-shadow: 0 3px 0 #B98431; }
.vc { margin-top: 30px; }
.vc ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 14px 0 0; padding: 0; }
.vc li { padding: 16px; border-radius: 12px; background: #FBF1DB; color: var(--ink); transform: rotate(var(--r)); box-shadow: 0 6px 14px rgba(35, 25, 15, .12); }
.vc blockquote { margin: 0; font: 500 1.05rem/1.45 var(--display); }
.vc-who { margin-top: 8px; font: 500 .9rem/1.2 var(--hand); color: var(--ink-soft); }

/* ---- the studio page ---- */
.studio-page .doc-wrap { max-width: 980px; }
.st-sec { margin-top: clamp(40px, 6vw, 70px); }
.st-sec h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem); }
.st-sec > p { margin-top: .5rem; max-width: 42rem; }
.st-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.st-tabs .chip[aria-pressed="true"] { background: var(--deep-sea); color: var(--ivory); border-color: var(--deep-sea); }
.st-slider { display: grid; gap: 6px; margin: 16px 0; max-width: 420px; font-weight: 600; }
.st-slider input { width: 100%; accent-color: var(--ochre); min-height: 32px; }
.st-stack { --spread: 0; position: relative; aspect-ratio: 16 / 9; perspective: 1400px; transform-style: preserve-3d; margin: 10px 0 40px; }
.st-layer { position: absolute; inset: 0; margin: 0; transform-style: preserve-3d; transform: translateY(calc(var(--spread) * -6%)) rotateX(calc(var(--spread) * 40deg)) rotateZ(calc(var(--spread) * -10deg)) translateZ(calc(var(--d) * var(--spread) * 95px)) scale(calc(1 - var(--spread) * .22)); transition: transform .15s linear; transform-origin: 50% 80%; }
.st-layer img { position: absolute; max-width: none; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, calc(.1 + var(--spread) * .3))); }
.st-horizon img { inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.st-relief img { left: 18%; bottom: 0; width: 64%; }
.st-set img { right: 6%; bottom: 12%; width: 30%; }
.st-edge img { left: 0; bottom: 0; width: 46%; }
.st-layer figcaption { position: absolute; right: 2%; top: calc(4% + var(--d) * 9%); padding: .2rem .6rem; border-radius: 6px; background: var(--ink); color: var(--ivory); font: 600 .8rem/1.2 var(--body); opacity: var(--spread); transform: translateZ(1px); }
.st-wob { --x: 0; position: relative; aspect-ratio: 620 / 525; max-width: 620px; margin: 10px auto 0; }
.st-part { position: absolute; inset: 0; margin: 0; transform: translate(calc(var(--x) * var(--ox) * 1px), calc(var(--x) * var(--oy) * 1px)) rotate(calc(var(--x) * var(--or) * 1deg)); transition: transform .15s linear; }
.st-part img { width: 100%; height: 100%; }
.st-part figcaption { position: absolute; left: calc(6% + var(--i) * 15%); bottom: var(--cy); padding: .15rem .5rem; border-radius: 6px; background: var(--ink); color: var(--ivory); font: 600 .75rem/1.2 var(--body); white-space: nowrap; opacity: var(--x); }
.st-logo { --s: 0; position: relative; max-width: 700px; margin: 10px auto 0; }
.st-logo img { position: absolute; height: auto; transform: translate(calc(var(--s) * var(--dx) * 1%), calc(var(--s) * var(--dy) * 1%)) rotate(calc(var(--s) * var(--rz) * 1deg)); transition: transform .15s linear; filter: drop-shadow(0 calc(var(--s) * 8px) calc(var(--s) * 8px) rgba(0, 0, 0, .25)); }
.st-cmp { --c: 0; position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; margin-top: 10px; }
.st-cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-cmp-after { position: absolute; inset: 0; clip-path: inset(0 calc((1 - var(--c)) * 100%) 0 0); }
.st-cmp-after::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--c) * 100%); width: 3px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, .4); }
.st-end { padding: 24px; border-radius: 16px; background: var(--paper-light); box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .4); }
@media (prefers-reduced-motion: reduce) { .st-layer, .st-part, .st-logo img { transition: none; } }

.st-p-lid-back img, .st-p-lid-front img { opacity: var(--x); }
.pc-controls { min-width: 0; }
.pc-field select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.tk > .tk-water { top: auto; bottom: 0; }

/* ============ v9: the website and the game, and things to hold ============ */
.beta-ribbon { position: fixed; left: 50%; bottom: 10px; z-index: 90; translate: -50% 0; max-width: calc(100vw - 24px); margin: 0; padding: .4rem .9rem; border-radius: 999px; background: var(--soft-plum, #74627E); color: #fff; font: 600 .85rem/1.3 var(--body); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); text-align: center; }

/* the journal: from the game, the field guide, toy tags */
.journal-game, .journal-guide, .journal-tag { margin-top: 34px; padding-top: 26px; border-top: 1.5px dashed rgba(197, 138, 50, .55); }
.fg-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); align-items: start; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.fg-page details { height: 100%; padding: 10px 12px; border-radius: 10px; background: #FFFBF0; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .45), 0 3px 8px rgba(35, 56, 47, .08); }
.fg-page summary { display: flex; align-items: center; gap: 8px; font: 650 .98rem/1.25 var(--display); cursor: pointer; }
.fg-page summary img { flex: none; width: 18px; height: auto; }
.fg-page p { margin: .5rem 0 0; font-size: .95rem; }
.fg-try { font-family: var(--hand); }
.fg-page.is-missing { min-height: 48px; border-radius: 10px; background: repeating-linear-gradient(135deg, rgba(197, 138, 50, .08) 0 8px, transparent 8px 16px); box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .3); }

/* the Lost & Found office, under the films */
.lf { margin-top: clamp(34px, 5vw, 56px); }
.lf-head { max-width: 62ch; }
.lf-head h3 { margin: 0 0 .3rem; font: 650 clamp(1.35rem, 2.4vw, 1.75rem)/1.15 var(--display); }
.lf-shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 18px 0 0; padding: 0 0 14px; list-style: none; border-bottom: 14px solid #A47A4E; box-shadow: 0 10px 0 -4px rgba(35, 56, 47, .16); background: linear-gradient(180deg, transparent 0 calc(100% - 2px), rgba(0, 0, 0, .08) 0); }
.lf-thing { display: grid; justify-items: center; align-content: end; gap: 4px; padding: 10px 8px 0; text-align: center; border-inline-start: 6px solid #B98A57; }
.lf-thing:first-child { border-inline-start: 0; }
.lf-art { width: clamp(52px, 9vw, 86px); aspect-ratio: 1; filter: grayscale(1) brightness(0); opacity: .14; transition: filter 400ms, opacity 400ms; }
.lf-art svg { width: 100%; height: 100%; }
.lf-thing.is-here .lf-art { filter: none; opacity: 1; animation: lf-land 520ms cubic-bezier(.3, 1.5, .5, 1); }
.lf-name { font: 650 .95rem/1.2 var(--display); }
.lf-note { font-size: .85rem; color: rgba(35, 56, 47, .82); }
.lf-tag { padding: .1rem .5rem; border-radius: 999px; background: var(--garden); color: #fff; font: 600 .75rem/1.4 var(--body); }
.lf-count { margin-top: 18px; font-size: .95rem; }
@keyframes lf-land { from { translate: 0 -24px; rotate: -8deg; } }
@media (max-width: 720px) { .lf-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom-width: 0; box-shadow: none; gap: 14px 0; } .lf-thing { border-inline-start: 0; border-bottom: 10px solid #A47A4E; padding-bottom: 6px; } }
html[data-tier="still"] .lf-thing.is-here .lf-art { animation: none; }
@media (prefers-reduced-motion: reduce) { .lf-thing.is-here .lf-art { animation: none; } }

/* today's sky */
.sky-keys { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 620px; margin: 12px 0; }
.sky-key { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--ink); font: 600 .8rem/1.2 var(--body); cursor: pointer; }
.sky-key img { width: 22px; height: auto; }
.sky-key[aria-pressed="true"] { background: var(--c); color: #fff; border-color: var(--c); }
.sky-key:disabled { opacity: .45; cursor: default; }
.sky-bars { display: grid; gap: 4px; max-width: 420px; margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.sky-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 8.5em; align-items: center; gap: 10px; }
.sky-bar { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--c) var(--w), rgba(35, 56, 47, .1) var(--w)); }
.sky-sample { display: block !important; font-style: italic; color: rgba(35, 56, 47, .75); }
@media (max-width: 560px) { .sky-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 300px; } }

/* the map: testers' islands and field-guide pages */
.mp-flag, .mp-pages { padding: .05rem .45rem; border-radius: 6px; font: 600 .7rem/1.35 var(--body); box-shadow: 0 2px 4px rgba(0, 0, 0, .15); }
.mp-flag { background: var(--deep-sea); color: #fff; }
.mp-pages { background: var(--warm-light, #F5CE79); color: var(--ink); }
.mp-testers { margin: .4rem 0 0; font-weight: 600; }

.mk-game { margin-top: .6rem; }
.sp-free { padding-left: 1.2rem; }
.sp-season { font: 600 .9rem/1.3 var(--hand); color: var(--deep-sea); }
.sp-things progress { width: 100%; height: 12px; accent-color: var(--garden); }
@media (max-width: 560px) { .beta-ribbon { bottom: 58px; font-size: .72rem; padding: .3rem .7rem; border-radius: 12px; } }

/* ============ v10: everyone together, the camera, the classroom, birthdays and the advent calendar ============ */
.journal-photos, .journal-wren-letters, .journal-birthday { margin-top: 34px; padding-top: 26px; border-top: 1.5px dashed rgba(197, 138, 50, .55); }
.ph-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 18px; margin: 16px 0 0; padding: 0; list-style: none; }
.ph-album li { display: grid; justify-items: center; gap: 6px; rotate: var(--r, 0deg); }
.ph-print { width: 100%; height: auto; aspect-ratio: 900 / 1060; box-shadow: 0 6px 14px rgba(35, 56, 47, .18); }
.lt-letter { margin-top: 12px; padding: 14px 16px; border-radius: 4px; background: #FFFDF6; font-family: var(--hand); box-shadow: 0 3px 10px rgba(35, 56, 47, .12); rotate: -.4deg; }
.lt-letter p { margin: 0 0 .4rem; }
.lt-date { font: 600 .85rem/1.2 var(--body); color: rgba(35, 56, 47, .7); }
.bd-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bd-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.bd-banner { position: relative; margin: 12px auto; max-width: min(760px, calc(100vw - 24px)); padding: 14px 44px 14px 18px; border-radius: 16px; background: #FFF4D6; box-shadow: inset 0 0 0 2px #F2C14E, 0 6px 18px rgba(35, 56, 47, .12); }
.bd-banner p { margin: 0 0 8px; }
.bd-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); }
.bd-make { display: grid; gap: 8px; margin-top: 10px; }
.bd-card { width: 100%; height: auto; aspect-ratio: 1400 / 1000; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.bd-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
.bd-confetti i { position: absolute; top: -20px; left: var(--x); width: 10px; height: 6px; background: var(--c); animation: bd-fall 3.6s var(--d) cubic-bezier(.3, .2, .6, 1) forwards; }
@keyframes bd-fall { to { translate: 30px 110vh; rotate: 540deg; } }

/* this week, and the shared jar */
.wk { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 18px; margin: 0 0 clamp(28px, 4vw, 44px); }
.wk-card { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: 18px; background: #FFFDF6; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .45); }
.wk-card h3 { margin: 0; font: 650 1.3rem/1.2 var(--display); }
.wk-card p { margin: 0; }
.wk-code { font: 700 1.4rem/1 var(--body); letter-spacing: .12em; }
.wk-card .ph-print { max-width: 260px; }
.mk-send { margin-top: .6rem; }
.jg { display: flex; gap: 18px; align-items: center; margin-top: clamp(28px, 4vw, 44px); padding: 18px; border-radius: 18px; background: rgba(255, 253, 246, .7); }
.jg h3 { margin: 0 0 .3rem; font: 650 1.3rem/1.2 var(--display); }
.jg p { margin: 0 0 .3rem; }
.jg-jar { position: relative; flex: none; width: 60px; }
.jg-jar img { position: relative; width: 60px; height: auto; display: block; }
.jg-fill { z-index: 1; mix-blend-mode: multiply; position: absolute; left: 14%; right: 14%; bottom: 8%; height: calc(var(--fill, 0%) * .62); border-radius: 0 0 12px 12px; background: linear-gradient(#7FB7D9, #3E7FC4); opacity: .85; transition: height 600ms; }
.jg-nums { font-weight: 650; }
.rw-row { display: flex; align-items: center; gap: 12px; }
.rw-jar { width: 30px; height: auto; }
.rw-form { margin-top: 10px; }
.gu-poll .pl-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.pl-results { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.pl-results li { display: grid; grid-template-columns: minmax(0, 1fr) 11em; align-items: center; gap: 10px; --c: var(--garden); }
.pl-results .sky-bar { background: linear-gradient(90deg, var(--c) var(--w), rgba(35, 56, 47, .1) var(--w)); }

/* the advent calendar */
.ad { margin: 0 0 clamp(28px, 4vw, 44px); padding: clamp(16px, 3vw, 28px); border-radius: 22px; background: linear-gradient(160deg, #234B5E, #3D6B7A); color: #FFFDF6; }
.ad h3 { margin: 0 0 .3rem; font: 650 clamp(1.3rem, 2.4vw, 1.7rem)/1.15 var(--display); }
.ad > p { margin: 0 0 14px; }
.ad-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.ad-door { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 1.5px dashed rgba(255, 253, 246, .75); border-radius: 10px; background: rgba(255, 253, 246, .1); color: #FFFDF6; font: 650 clamp(1rem, 2vw, 1.4rem)/1 var(--display); cursor: pointer; rotate: var(--r); transition: background 200ms, transform 200ms; }
.ad-door:not(:disabled):not(.is-open):hover { background: rgba(255, 253, 246, .22); transform: translateY(-2px); }
.ad-door:disabled { opacity: .5; cursor: default; }
.ad-door.is-open { border-style: solid; border-color: #F5CE79; background: #FBF1DB; cursor: default; animation: ad-open 420ms cubic-bezier(.3, 1.5, .5, 1); }
.ad-door img, .ad-pic { width: 70%; height: 70%; object-fit: contain; }
.ad-pic svg { width: 100%; height: 100%; }
.ad-form label { color: #FFFDF6; }
.ad-status { margin: 8px 0 0; }
@keyframes ad-open { from { transform: perspective(300px) rotateY(-70deg); } }
@media (max-width: 640px) { .ad-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .ad-door.is-open, .bd-confetti i { animation: none; } .bd-confetti { display: none; } }

/* the hint book and the teachers' page */
.hb-tools { margin: 0 0 1rem; }
.hb-list { display: grid; gap: 10px; margin: 0 0 2rem; padding: 0; list-style: none; }
.hb-puzzle details { padding: 14px 16px; border-radius: 14px; background: #FFFDF6; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .45); }
.hb-puzzle summary { font: 650 1.15rem/1.3 var(--display); cursor: pointer; }
.hb-steps { display: grid; gap: 8px; margin: 12px 0; }
.hb-step { padding: 10px 12px; border-radius: 10px; background: #F7EFDC; }
.hb-step p { margin: 0; font-size: 1.1rem; }
.hb-label { font: 600 .85rem/1.3 var(--hand) !important; color: #7A5A34; }
.hb-answer { background: #E4F0DC; }
.tc-sec { margin: 2.2rem 0; }
.tc-steps li { margin-bottom: .4rem; }
.tc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px; margin: 1rem 0 0; padding: 0; list-style: none; }
.tc-card { padding: 14px 16px; border-radius: 12px; background: #FFFDF6; box-shadow: inset 0 0 0 1.5px rgba(197, 138, 50, .45); break-inside: avoid; }
.tc-card h3 { margin: .2rem 0 .4rem; font: 650 1.1rem/1.2 var(--display); }
.tc-card p { margin: 0 0 .4rem; }
.tc-kind { display: flex; align-items: center; gap: 4px; font: 600 .8rem/1 var(--body); color: #7A5A34; }
.tc-prints li { margin-bottom: .4rem; }
@media print {
  .teachers-page .masthead, .teachers-page .footer, .teachers-page .tc-sec:not(:has(.tc-cards)), .teachers-page .lead, .teachers-page h1, .teachers-page .tc-sec > p { display: none !important; }
  .tc-cards { grid-template-columns: repeat(2, 1fr); }
  .tc-card { box-shadow: 0 0 0 1px #999; }
}
/* the class warm-up: everything in the puzzle bigger, for the back of the room */
html.classroom .pm { font-size: 1.3rem; }
html.classroom .pm-title { font-size: clamp(2rem, 4vw, 3.2rem); }
.bd-make input, .rw-form input { font: inherit; padding: .5rem .7rem; border-radius: 10px; border: 1.5px solid rgba(35, 56, 47, .35); background: #FFFDF6; max-width: 320px; }

/* A film not yet on this copy of the site: the poster stays, with a quiet note (added for the Lovable package). */
.film-away { position: absolute; left: 50%; bottom: 14%; transform: translateX(-50%); z-index: 3; margin: 0; max-width: 80%; padding: .55em 1em; border-radius: 999px; background: rgba(245, 233, 207, .94); color: #23382F; font: 600 .95rem/1.3 Figtree, system-ui, sans-serif; text-align: center; box-shadow: 0 6px 18px rgba(35, 25, 15, .25); pointer-events: none; }
.film-away[hidden] { display: none; }
.screen-frame.is-away .pc, .screen-frame.is-away [class^="pc-"] { opacity: .45; }
