/* Two movable print sculptures at the sides of the house. */
#stage-performers { clip-path: inset(-155px 0 -38px); }
.book-figure {
  --book-edge: clamp(3px, 1.55vw, 24px);
  position: absolute;
  bottom: -3px;
  width: clamp(138px, 12vw, 176px);
  padding: 0;
  border: 0;
  background: transparent;
  color: #f4c095;
  font: inherit;
  overflow: visible;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}
.book-figure-jussi { left: var(--book-edge); }
.book-figure-mariah { right: var(--book-edge); }
.book-figure:focus-visible { outline: 2px solid #f4c095; outline-offset: 2px; border-radius: 4px; }
.book-figure-print { display: block; width: 100%; height: auto; overflow: visible; pointer-events: none; }
.book-choreography {
  --book-track: none;
  transform-box: view-box;
  animation: var(--book-track, none) var(--book-phrase-duration, 6s) cubic-bezier(.45,0,.23,1);
}
.book-reaction { position: absolute; left: 52%; top: 30%; pointer-events: none; }
.book-figure-jussi .book-reaction { left: 78%; }
.book-figure-mariah .book-reaction { left: 25%; }
.book-reaction-piece, .book-reaction-mark {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
}
.book-reaction-piece {
  width: var(--size);
  height: var(--size);
  color: var(--ink);
  animation: book-scatter var(--duration) cubic-bezier(.2,.64,.37,1) var(--delay) both;
}
.book-reaction-mark {
  width: 26px;
  height: 26px;
  transform: translate(-50%, -85%);
  color: #fff0da;
  animation: book-stamp .7s ease-out both;
}
.book-figure[data-force="full"] .book-reaction-mark { width: 42px; height: 42px; animation-duration: 1.15s; }
.book-figure[data-reaction="echoes"] .book-reaction-mark,
.book-figure[data-reaction="orbit"] .book-reaction-mark { animation-name: book-wave; }
@keyframes book-scatter {
  0% { transform: translate(-50%, -50%) scale(.22); opacity: 0; }
  16% { opacity: 1; }
  48% { transform: translate(calc(var(--mx) - 50%), calc(var(--my) - 50%)) rotate(calc(var(--spin) * .45)); opacity: .9; }
  100% { transform: translate(calc(var(--dx) - 50%), calc(var(--dy) - 50%)) rotate(var(--spin)) scale(.38); opacity: 0; }
}
@keyframes book-stamp {
  0% { transform: translate(-50%, -85%) scale(.35) rotate(-13deg); opacity: .72; }
  22% { transform: translate(-50%, -85%) scale(1.12) rotate(7deg); opacity: 1; }
  100% { transform: translate(-50%, -165%) scale(.68) rotate(-10deg); opacity: 0; }
}
@keyframes book-wave {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(3.6); opacity: 0; }
}

.book-assistive {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#stage-performers[data-duet="left"] .book-figure-jussi .book-reaction::before,
#stage-performers[data-duet="right"] .book-figure-mariah .book-reaction::before {
  content: '';
  position: absolute;
  left: 0;
  top: -29px;
  width: 12px;
  height: 12px;
  background: #f4c095;
  clip-path: polygon(50% 0, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0 50%, 37% 37%);
  transform: translateX(-50%);
  animation: book-duet-signal 1.65s ease-in-out infinite alternate;
}
@keyframes book-duet-signal { from { opacity: .4; } to { opacity: 1; } }
.book-constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  animation: book-constellation-linger var(--constellation-duration) linear both;
}
.book-constellation polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.book-constellation-branch {
  stroke: #f4c095;
  stroke-width: 1.5;
  stroke-dasharray: 2 6;
  animation: book-constellation-light .55s ease-out .8s both;
}
.book-constellation-trace, .book-constellation-line {
  stroke-dasharray: 1;
  animation: book-constellation-draw 1.25s ease-out both;
}
.book-constellation-trace { stroke: #071e22; stroke-width: 5; opacity: .84; }
.book-constellation-line { stroke: #f4c095; stroke-width: 2; }
.book-constellation-star {
  fill: #f4c095;
  stroke: #071e22;
  stroke-width: 1.4;
  animation: book-constellation-light .55s ease-out var(--star-in) both;
}
.book-constellation-center { fill: #fff0da; }
.roof > .book-constellation, .house-body > .book-constellation { z-index: 6; }
.rose-window {
  display: block;
  position: absolute;
  top: 49.23%;
  left: 38.38%;
  width: 13.8%;
  height: 39.2%;
  min-width: 44px;
  min-height: 44px;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #f4c095;
  cursor: pointer;
  touch-action: manipulation;
  z-index: 7;
}
.rose-window:focus-visible, #winter-window:focus-visible { outline: 2px solid #fff0da; outline-offset: 2px; }
.rose-window > span, #winter-window > span:first-child {
  position: absolute;
  right: -5px;
  bottom: 1px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid #f4c095;
  border-radius: 50%;
  background: #071e22;
  font: 13px/1 sans-serif;
}
@keyframes book-constellation-linger {
  0%, 100% { opacity: 0; }
  12%, 76% { opacity: 1; }
}
@keyframes book-constellation-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes book-constellation-light { from { opacity: 0; } to { opacity: 1; } }

/* A tree is now one cached SVG image instead of dozens of live SVG nodes. */
.geometric-tree img { display: block; width: 100%; height: auto; }
.winter-landscape .nocturne-tree img { opacity: .47; }
.scene-grove .nocturne-tree img { opacity: .66; }
.scene-paused .winter-landscape *,
.scene-paused #stage-performers .book-choreography,
.scene-paused .scene-grove *,
#stage-performers[data-in-view="false"] .book-choreography,
.scene-grove[data-in-view="false"] .book-tree { animation-play-state: paused !important; }
.scene-paused .book-constellation { visibility: hidden; }
/* Core feedback begins in the first frame; artwork is already colored and decoded. */
.modal-cover .cover-image { object-fit: cover; }
.door-surface { transition: transform .32s cubic-bezier(.2,.65,.2,1),filter .2s; }
.door-leaf { transition-duration: .42s; }
#book-modal.revealing .modal-grid { animation: quick-page-arrives .22s ease-out both; }
@keyframes quick-page-arrives { from { opacity: .85; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  #stage-performers .book-choreography,
  #stage-performers .book-reaction-mark,
  #stage-performers .book-reaction::before,
  .book-constellation,
  .book-constellation-branch,
  .book-constellation-trace,
  .book-constellation-line,
  .book-constellation-star { animation: none; }
  #stage-performers .book-reaction-piece { display: none; }
  #stage-performers .book-react { transform: none; transition: none; }
  #book-modal.revealing .modal-grid { animation: none; }
  .door-surface,.door-leaf { transition: none; }
}

/* Two different Klee-like dogs. Pose changes reuse the same small SVG rig. */
.book-figure {
  --dog-leg-shadow: #9c6b52;
  --gaze-x: 0px; --gaze-y: 0px; --eye-size: 1; --eye-response: 1;
  --torso-x: 0px; --torso-y: 0px; --torso-angle: 0deg; --torso-width: 1; --torso-height: 1;
  --head-x: 0px; --head-y: 0px; --head-angle: 0deg;
  --front-x: 0px; --front-y: 0px; --front-angle: 0deg;
  --hind-x: 0px; --hind-y: 0px; --hind-angle: 0deg;
  --tail-x: 0px; --tail-y: 0px; --tail-rest: 0deg;
  --wag-angle: 9deg; --wag-speed: 2.2s; --dog-side: 1; --stride: .39s;
}
.book-figure-mariah { --dog-leg-shadow: #b2c3ac; --dog-side: -1; --wag-speed: 3.1s; --stride: .46s; }
.dog-part { transform-box: view-box; transition: transform .85s cubic-bezier(.4,0,.2,1), opacity .5s; }
.book-figure .dog-motion { transform-box: view-box; }
.dog-fur { fill: none; stroke-width: 1.05; opacity: .7; }
.book-figure[data-coat="black"] .dog-fur { opacity: .48; }
.dog-torso { transform-origin: 88px 109px; transform: translate(var(--torso-x),var(--torso-y)) rotate(var(--torso-angle)) scale(var(--torso-width),var(--torso-height)); }
.dog-breath { transform-origin: 88px 117px; }
.dog-head { transform-origin: 119px 81px; transform: translate(var(--head-x),var(--head-y)) rotate(var(--head-angle)); }
.dog-front { transform-origin: 113px 109px; transform: translate(var(--front-x),var(--front-y)) rotate(var(--front-angle)); }
.dog-hind { transform-origin: 56px 112px; transform: translate(var(--hind-x),var(--hind-y)) rotate(var(--hind-angle)); }
.dog-front-far,.dog-hind-far { opacity: .76; }
.dog-ear { transform-origin: 112px 43px; transform: rotate(var(--ear-angle,0deg)); }
.dog-ear-far { transform-box: view-box; transform-origin: 167px 43px; transform: rotate(calc(var(--ear-angle,0deg) * -.55)); transition: transform .85s cubic-bezier(.4,0,.2,1); }
.dog-tail-anchor { transform: translate(var(--tail-x),var(--tail-y)); }
.book-figure .dog-tail { transform-origin: 44px 97px; animation: dog-tail-wag var(--wag-speed) ease-in-out infinite; }
.dog-eyes-open { transform-origin: 139px 55px; animation: dog-blink 9.7s linear infinite; }
.book-figure-mariah .dog-eyes-open { animation-duration: 12.3s; animation-delay: -4s; }
.dog-brow { transform-origin: 137px 47px; transform: rotate(-9deg); }
.dog-gaze { transform: translate(var(--gaze-x), var(--gaze-y)); transition: transform .2s ease-out; }
.dog-iris { transform-box: view-box; transform-origin: var(--eye-cx) var(--eye-cy); transform: scale(calc(var(--eye-size) * var(--eye-response))); transition: transform .4s ease-out; }
.dog-hat { transform-box: view-box; transform-origin: 135px 29px; opacity: 0; transform: translateY(-6px) rotate(-8deg) scale(.65); transition: opacity .5s, transform .7s cubic-bezier(.16,1,.3,1); pointer-events: none; }
.book-figure[data-hat="on"] .dog-hat { opacity: 1; transform: none; }
.dog-eyes-closed,.dog-mouth-howl,.dog-tongue { opacity: 0; transition: opacity .35s; }
.dog-mouth-smile,.dog-eyes-open { transition: opacity .35s; }
.dog-dream,.dog-howl-rings,.dog-pee { opacity: 0; pointer-events: none; transition: opacity .6s; }
.dog-dream text { font: 700 18px var(--font-ui,monospace); fill: #f4c095; stroke: none; }
.book-figure-mariah .dog-dream { transform: translateX(-90px); }
.book-figure-mariah .dog-howl-rings { transform: translateX(-120px); }
.book-figure[data-emotion="happy"],.book-figure[data-emotion="excited"] { --wag-angle: 28deg; --wag-speed: .47s; --ear-angle: -8deg; --eye-size: 1.14; }
.book-figure[data-emotion="happy"] .dog-brow { transform: translateY(-2px) rotate(-16deg); }
.book-figure[data-emotion="happy"] .dog-tongue,.book-figure[data-emotion="excited"] .dog-tongue { opacity: 1; }
.book-figure[data-emotion="drowsy"] { --eye-size: .76; }
.book-figure[data-emotion="drowsy"] .dog-brow { transform: translateY(3px) rotate(7deg); }
.book-figure[data-emotion="curious"] { --eye-size: 1.04; }
.book-figure[data-emotion="proud"] { --eye-size: 1.1; }
.book-figure[data-emotion="concentrating"] { --eye-size: .86; }
.book-figure[data-activity="happy"] { --head-y: -3px; --head-angle: -7deg; }
.book-figure[data-activity="sit"] { --torso-x: -8px; --torso-y: 9px; --torso-angle: -18deg; --torso-width: .83; --hind-x: -5px; --hind-y: 17px; --hind-angle: -67deg; --tail-x: -11px; --tail-y: 15px; --head-x: -9px; --head-angle: -7deg; --wag-speed: 2.9s; }
.book-figure[data-activity="lie"],.book-figure[data-activity="sleep"] { --torso-y: 35px; --torso-height: .7; --head-x: -2px; --head-y: 52px; --head-angle: 7deg; --front-x: 8px; --front-y: 31px; --front-angle: -65deg; --hind-x: 2px; --hind-y: 35px; --hind-angle: 79deg; --tail-y: 34px; --tail-rest: -18deg; --wag-angle: 5deg; --wag-speed: 4s; --ear-angle: 9deg; }
.book-figure[data-activity="sleep"] { --head-y: 56px; --head-angle: 12deg; --wag-angle: 0deg; }
.book-figure[data-activity="sleep"] .dog-eyes-open,.book-figure[data-activity="sleep"] .dog-mouth-smile { opacity: 0; }
.book-figure[data-activity="sleep"] .dog-eyes-closed,.book-figure[data-activity="sleep"] .dog-dream { opacity: 1; }
.book-figure[data-activity="sleep"] .dog-tail { animation: none; transform: rotate(-19deg); }
.book-figure[data-activity="sleep"] .dog-breath { animation: dog-sleep-breath 3.8s ease-in-out infinite; }
.book-figure[data-activity="sleep"] .dog-dream .dog-motion { animation: dog-dream-rise 3.6s ease-in-out infinite; }
.book-figure[data-activity="sleep"] .dog-dream :nth-child(2) { animation-delay: -1.2s; }
.book-figure[data-activity="sleep"] .dog-dream :nth-child(3) { animation-delay: -2.4s; }
.book-figure[data-activity="sniff"] { --head-x: 4px; --head-y: 25px; --head-angle: 26deg; --ear-angle: 8deg; --wag-angle: 6deg; }
.book-figure[data-activity="sniff"] .dog-head-life { transform-origin: 135px 70px; animation: dog-nose-search 2.7s ease-in-out infinite; }
.book-figure[data-activity="stretch"] { --torso-y: 7px; --torso-angle: 15deg; --head-x: 10px; --head-y: 30px; --head-angle: 18deg; --front-x: 10px; --front-y: 26px; --front-angle: -65deg; --hind-angle: 8deg; --tail-y: -6px; --tail-rest: -9deg; }
.book-figure[data-activity="pee"] { --hind-x: 6px; --hind-y: -3px; --hind-angle: -72deg; --tail-rest: 17deg; --head-angle: 9deg; --ear-angle: 8deg; --wag-angle: 2deg; }
.book-figure[data-activity="pee"] .dog-hind-far { transform: none; }
.book-figure[data-activity="pee"] .dog-pee { opacity: .8; }
.book-figure[data-activity="pee"] .dog-stream { animation: dog-stream .85s linear infinite; }
.book-figure[data-activity="howl"] { --head-y: -8px; --head-angle: -37deg; --ear-angle: 15deg; --wag-speed: 3.4s; --wag-angle: 5deg; }
.book-figure[data-activity="howl"] .dog-mouth-smile { opacity: 0; }
.book-figure[data-activity="howl"] .dog-mouth-howl,.book-figure[data-activity="howl"] .dog-howl-rings { opacity: 1; }
.book-figure[data-activity="howl"] .dog-howl-rings .dog-motion { transform-origin: 151px 23px; animation: dog-howl-wave 1.8s ease-out infinite; }
.book-figure[data-activity="howl"] .dog-howl-rings :nth-child(2) { animation-delay: -.9s; }
.book-figure[data-activity="howl"] .dog-brow { transform: rotate(-18deg); }
.book-figure[data-activity="run"] { --wag-speed: .35s; --wag-angle: 20deg; --head-angle: -8deg; --ear-angle: -14deg; }
.book-figure[data-activity="run"] .dog-locomotion { animation: dog-patrol var(--dog-activity-duration,4.4s) cubic-bezier(.4,0,.3,1) both; }
.book-figure[data-activity="run"] .dog-front { animation: dog-front-stride var(--stride) ease-in-out infinite; }
.book-figure[data-activity="run"] .dog-hind { animation: dog-hind-stride var(--stride) ease-in-out infinite; }
.book-figure[data-activity="run"] .dog-front-far { animation-delay: calc(var(--stride) * -.5); }
.book-figure[data-activity="run"] .dog-hind-far { animation-delay: calc(var(--stride) * -.5); }
.book-figure[data-activity="run"] .dog-breath { animation: dog-trot-body var(--stride) ease-in-out infinite; }
.scene-paused #stage-performers .dog-motion,#stage-performers[data-in-view="false"] .dog-motion,.scene-paused #stage-performers .dog-front,.scene-paused #stage-performers .dog-hind,#stage-performers[data-in-view="false"] .dog-front,#stage-performers[data-in-view="false"] .dog-hind { animation-play-state: paused !important; }
@keyframes dog-tail-wag { 0%,100% { transform: rotate(calc(var(--tail-rest) - var(--wag-angle))); } 50% { transform: rotate(calc(var(--tail-rest) + var(--wag-angle))); } }
@keyframes dog-blink { 0%,90%,94%,100% { transform: scaleY(1); } 91%,93% { transform: scaleY(.12); } }
@keyframes dog-sleep-breath { 0%,100% { transform: scaleY(.99); } 50% { transform: scaleY(1.04); } }
@keyframes dog-dream-rise { 0%,100% { transform: translateY(0); opacity: .25; } 55% { transform: translateY(-7px); opacity: 1; } }
@keyframes dog-nose-search { 0%,100% { transform: translateX(0) rotate(-2deg); } 50% { transform: translateX(3px) rotate(3deg); } }
@keyframes dog-stream { to { stroke-dashoffset: -16; } }
@keyframes dog-howl-wave { from { transform: translateY(4px) scale(.75); opacity: .9; } to { transform: translateY(-6px) scale(1.25); opacity: 0; } }
@keyframes dog-patrol { 0%,100% { transform: translateX(0); } 35% { transform: translateX(calc(20px * var(--dog-side))); } 72% { transform: translateX(calc(-7px * var(--dog-side))); } }
@keyframes dog-front-stride { 0%,100% { transform: rotate(-22deg); } 50% { transform: rotate(19deg); } }
@keyframes dog-hind-stride { 0%,100% { transform: rotate(18deg); } 50% { transform: rotate(-21deg); } }
@keyframes dog-trot-body { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-1.3px); } }
@media (max-width:1199px) {
  #stage-performers { position: relative; display: block !important; height: clamp(88px,22vw,128px); bottom: auto; margin: -7px auto -8px; width: min(72%,360px); z-index: 3; }
  #stage-performers .book-figure { width: clamp(87px,28vw,144px); bottom: 0; }
  #stage-performers .book-figure-jussi { left: 0; }
  #stage-performers .book-figure-mariah { right: 0; }
  #stage-performers .book-constellation { z-index: 1; }
}
@media (prefers-reduced-motion:reduce) {
  #stage-performers .dog-motion,#stage-performers .dog-front,#stage-performers .dog-hind { animation: none !important; }
  #stage-performers .dog-part, #stage-performers .dog-gaze, #stage-performers .dog-iris,
  #stage-performers .dog-ear-far, #stage-performers .dog-hat { transition: none; }
}

/* Keep the scene controls in the artwork and the effects out of the hit targets. */
.sky-star, .chimney-egg, .snow-tracks {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.scene > .sky-star { z-index: 4; }
.sky-star:focus-visible, .chimney-egg:focus-visible, .snow-tracks:focus-visible {
  outline: 2px solid #f4c095;
  outline-offset: 2px;
}
.chimney-egg { position: absolute; z-index: 1; top: -17px; left: 50%; transform: translateX(-50%); }
.snow-tracks {
  position: absolute;
  right: 8%;
  top: 0;
  transform: translateY(-38%);
  color: #f4c095;
  font: bold 17px/1 monospace;
}
.snow-tracks span { display: inline-block; transform: rotate(-13deg); }
.rose-window, #winter-window { touch-action: none; user-select: none; -webkit-touch-callout: none; }
.rose-window:active > span, #winter-window:active > span:first-child { background: #ee2e31; color: #fff0da; }
#winter-window {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: #f4c095;
  cursor: pointer;
  pointer-events: auto;
}
#winter-window > span:first-child { right: 2px; bottom: 2px; }
#winter-window .holiday-egg { left: 50%; top: 50%; width: 77%; height: 90%; border-radius: 2px; }
.house { pointer-events: none; }
.house .door, .house .rose-window { pointer-events: auto; }
.scene > .chimney i, .scene > .chimney::after { pointer-events: none; }
.holiday-egg {
  position: absolute;
  pointer-events: none;
  z-index: 6;
}
.holiday-egg svg { display: block; width: 100%; height: auto; overflow: visible; }
.egg-candles, .egg-baubles {
  left: 38.38%;
  top: 49.23%;
  width: 10.5%;
  height: 30%;
  overflow: hidden;
  border-radius: 50%;
  background: #071e22;
  transform: translate(-50%, -50%);
  animation: holiday-appear 3.65s ease-in-out both;
}
.egg-candles svg, .egg-baubles svg { height: 100%; }
.egg-flames { animation: candle-flicker .8s ease-in-out infinite alternate; }
.egg-baubles svg { transform-origin: 50% 13%; animation: bauble-swing 1.7s ease-in-out infinite alternate; }
.egg-comet { width: clamp(43px, 7vw, 90px); top: 5%; left: 15%; animation: comet-across 3.45s ease-in-out both; }
.egg-gift { width: clamp(52px, 7vw, 86px); top: 10%; left: 83%; animation: gift-lift 3.45s ease-in-out both; }
.egg-tracks { width: clamp(85px, 15vw, 145px); right: 9%; bottom: -8px; animation: holiday-appear 3.5s ease-out both; }
.egg-tracks use { animation: track-appear .46s ease-out both; }
.egg-tracks use:nth-of-type(2) { animation-delay: .23s; }
.egg-tracks use:nth-of-type(3) { animation-delay: .46s; }
.egg-tracks use:nth-of-type(4) { animation-delay: .69s; }
.egg-flare {
  width: clamp(45px, 9vw, 91px);
  left: 53%;
  top: 7%;
  animation: flare-up 2.1s cubic-bezier(.25,.6,.28,1) both;
}
.flare-trail { transform-box: fill-box; transform-origin: top; animation: flare-trail .36s ease-in-out infinite alternate; }
.egg-rescue {
  width: clamp(109px, 21vw, 216px);
  top: -21%;
  left: 35%;
  animation: rescue-crossing 5.65s ease-in-out both;
}
.rescue-rotor { transform-box: fill-box; transform-origin: center; animation: rescue-rotor .26s linear infinite alternate; }
.rescue-light { transform-box: fill-box; transform-origin: top center; animation: rescue-search 1.2s ease-in-out infinite alternate; }
@keyframes holiday-appear { 0%, 100% { opacity: 0; } 15%, 78% { opacity: 1; } }
@keyframes candle-flicker { from { opacity: .74; } to { opacity: 1; } }
@keyframes bauble-swing { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@keyframes track-appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes comet-across {
  0% { opacity: 0; transform: translate(-38%, -22%) rotate(-10deg); }
  22%, 68% { opacity: 1; }
  60% { transform: translate(270%, -48%) rotate(7deg); }
  100% { opacity: 0; transform: translate(430%, -90%) rotate(14deg); }
}
@keyframes gift-lift {
  0%, 100% { opacity: 0; transform: translateY(48%) rotate(-18deg) scale(.6); }
  30%, 69% { opacity: 1; transform: translateY(-35%) rotate(10deg); }
  51% { transform: translateY(-46%) rotate(-6deg); }
}
@keyframes flare-up {
  0% { opacity: 0; transform: translate(-80%, 45%) rotate(28deg) scale(.4); }
  14% { opacity: 1; }
  65%, 78% { opacity: 1; transform: translate(18%, -104%) rotate(7deg); }
  100% { opacity: 0; transform: translate(24%, -112%) rotate(2deg) scale(1.1); }
}
@keyframes flare-trail { from { transform: scaleY(.65); } to { transform: scaleY(1); } }
@keyframes rescue-crossing {
  0% { opacity: 0; transform: translate(-175%, 16%) rotate(-7deg); }
  15%, 81% { opacity: 1; }
  36% { transform: translate(-26%, 1%) rotate(-2deg); }
  58% { transform: translate(5%, 15%) rotate(4deg); }
  74% { transform: translate(25%, 4%) rotate(-4deg); }
  100% { opacity: 0; transform: translate(124%, -13%) rotate(-8deg); }
}
@keyframes rescue-rotor { from { transform: scaleX(.42); } to { transform: scaleX(1); } }
@keyframes rescue-search { from { transform: skewX(-18deg); } to { transform: skewX(19deg); } }
.scene-paused .holiday-egg { visibility: hidden; }
@media (max-width: 700px) {
  .scene > .sky-star { top: 31px; right: 0; }
  .egg-rescue { top: -24%; }
  .egg-comet { left: 8%; }
}
@media (prefers-reduced-motion: reduce) {
  .holiday-egg, .holiday-egg * { animation: none !important; }
}

.egg-rose-stars {
  left: 38.38%;
  top: 49.23%;
  width: clamp(100px, 20%, 158px);
  color: #f4c095;
  transform: translate(-50%, -50%);
  animation: holiday-appear 3.55s ease-in-out both;
}
.rose-crown {
  transform-origin: center;
  animation: rose-crown-turn 3.55s ease-in-out both;
}
.rose-ray {
  fill: currentColor;
  stroke: #071e22;
  stroke-width: 1.2;
  animation: rose-ray-rise .8s ease-out var(--star-delay, 0ms) both;
}
.egg-winter-stars { inset: 0; animation: holiday-appear 4.1s ease-in-out both; }
.egg-winter-stars svg { height: 100%; }
.winter-star {
  fill: #fff0da;
  stroke: #071e22;
  stroke-width: 1.35;
  animation: winter-star-drift 2.9s ease-in-out var(--star-delay) both;
}
.egg-winter-stars svg > g:nth-child(3n) .winter-star { fill: #ee2e31; stroke: #f4c095; }
@keyframes rose-crown-turn { from { transform: rotate(-38deg); } to { transform: rotate(30deg); } }
@keyframes rose-ray-rise {
  from { opacity: 0; transform: scale(.25); }
  65% { opacity: 1; transform: scale(1.22); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes winter-star-drift {
  from { opacity: 0; transform: translate(24px, 25px) scale(.32); }
  38%, 66% { opacity: 1; }
  48% { transform: translate(0, 0) rotate(-14deg); }
  to { opacity: 0; transform: translate(-14px, -29px) rotate(28deg) scale(.7); }
}

/* Weather is part of the header composition, printed in the same five inks. */
header {
  display: grid;
  z-index: 7;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: clamp(20px, 3vw, 44px);
  height: auto;
  min-height: 110px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.weather-controls {
  position: static;
  inset: auto;
  z-index: auto;
  justify-self: end;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: min(100%, 368px);
  min-height: 60px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #f4c095;
  backdrop-filter: none;
}
.weather-controls .ambience-toggle {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  min-height: 60px;
  font-size: .75rem;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
}
.weather-controls .ambience-toggle input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.weather-switch {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #679289;
  border: 1px solid #679289;
  border-radius: 50% 0 50% 50%;
  background: url('assets/riso-grain.svg'), #071e22;
  box-shadow: 2px 1px 0 #1d7874;
  pointer-events: none;
}
.weather-controls .ambience-toggle input:checked + .weather-switch {
  color: #f4c095;
  background-color: #ee2e31;
  border-color: #ee2e31;
  box-shadow: -2px 1px 0 #679289;
}
.weather-controls .ambience-toggle input:focus-visible + .weather-switch {
  outline: 2px solid #f4c095;
  outline-offset: 4px;
}
.weather-controls .range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 36px;
  align-items: center;
  gap: 0 4px;
  min-width: 0;
  font-size: .75rem;
  line-height: 1.4;
  cursor: pointer;
}
.weather-controls .range-control output {
  color: #f4c095;
  font-size: .6875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.snow-rail { position: relative; display: block; grid-column: 1 / -1; height: 36px; }
.snow-rail::before {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  top: 27px;
  height: 4px;
  background: repeating-linear-gradient(90deg, #679289 0 1px, transparent 1px 25%);
  border-right: 1px solid #679289;
  opacity: .7;
  pointer-events: none;
}
.weather-controls .range-control input {
  --snow-track: linear-gradient(to right, #f4c095 0 var(--snow-progress, 0%), #1d7874 var(--snow-progress, 0%) 100%);
  position: relative;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 36px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: ew-resize;
}
/* Separate track/thumb rules are intentional: Safari and Firefox parse different pseudos. */
.weather-controls input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border: 0;
  background: url('assets/riso-grain.svg'), var(--snow-track);
  box-shadow: 2px 2px 0 #67928955;
}
.weather-controls input[type="range"]::-moz-range-track {
  height: 5px;
  border: 0;
  background: url('assets/riso-grain.svg'), var(--snow-track);
  box-shadow: 2px 2px 0 #67928955;
}
.weather-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 2px solid #f4c095;
  border-radius: 50%;
  background: url('assets/riso-grain.svg'), #ee2e31;
  box-shadow: -2px 1px 0 #1d7874, 2px 2px 0 #071e22;
}
.weather-controls input[type="range"]::-moz-range-thumb {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 2px solid #f4c095;
  border-radius: 50%;
  background: url('assets/riso-grain.svg'), #ee2e31;
  box-shadow: -2px 1px 0 #1d7874, 2px 2px 0 #071e22;
}
.weather-controls #snow-speed::-webkit-slider-thumb {
  border-radius: 1px;
  border-color: #071e22;
  background-color: #f4c095;
  box-shadow: 3px 2px 0 #ee2e31;
  transform: rotate(-9deg);
}
.weather-controls #snow-speed::-moz-range-thumb {
  border-radius: 1px;
  border-color: #071e22;
  background-color: #f4c095;
  box-shadow: 3px 2px 0 #ee2e31;
  transform: rotate(-9deg);
}
.weather-controls .range-control input:focus-visible {
  outline: 2px solid #679289;
  outline-offset: 2px;
}
.weather-controls[data-snow="false"] .range-control { opacity: .4; cursor: default; }
.weather-controls .range-control input:disabled { opacity: 1; cursor: default; }
@media (hover: hover) {
  .weather-controls .ambience-toggle:hover .weather-switch { outline: 1px solid #f4c095; outline-offset: 3px; }
  .weather-controls .range-control:hover input:not(:disabled) { filter: brightness(1.15); }
}
@media (max-width: 700px) {
  header {
    grid-template-columns: auto 1fr;
    gap: 10px 18px;
    min-height: 0;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  header nav { grid-column: 2; grid-row: 1; justify-self: end; }
  .weather-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    width: min(100%, 368px);
    gap: 12px;
    justify-self: end;
  }
  .weather-controls .range-control { grid-template-rows: auto 44px; }
  .snow-rail, .weather-controls .range-control input { height: 44px; }
  .snow-rail::before { top: 31px; }
}
@media (max-width: 380px) {
  .weather-controls { grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .weather-controls .range-control { grid-template-columns: 1fr; grid-template-rows: auto 44px auto; }
  .weather-controls .range-control output { grid-column: 1; grid-row: 3; }
  .weather-controls .snow-rail { grid-row: 2; }
}

.scene > .meteor-star, .roof-egg, .freedom-egg {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
}
.scene > .meteor-star { z-index: 4; }
.roof-egg, .freedom-egg {
  position: absolute;
  display: grid;
  place-items: center;
  color: #f4c095;
}
.roof-egg {
  transform: translate(-50%, -50%);
  z-index: 7;
  font: 14px/1 monospace;
}
.ladder-egg { left: 17%; top: 65%; }
.choir-egg { left: 89%; top: 58%; }
.roof-egg > span {
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  background: #071e22;
  border: 1px solid #679289;
  border-radius: 50%;
  opacity: .82;
}
.freedom-egg { left: 8%; top: 0; transform: translateY(-38%); }
.freedom-egg svg { display: block; opacity: .8; }
.meteor-star:focus-visible, .roof-egg:focus-visible, .freedom-egg:focus-visible {
  outline: 2px solid #f4c095;
  outline-offset: 2px;
}
.egg-choir {
  width: clamp(151px, 38%, 308px);
  right: 0;
  top: 17%;
  animation: holiday-appear 9.4s ease-in-out both;
}
.choir-arch { opacity: .94; }
.choir-singer { animation: choir-breathe 1.35s ease-in-out var(--choir-delay) infinite alternate; }
.choir-mouth {
  transform-box: fill-box;
  transform-origin: center;
  animation: choir-vowel .74s ease-in-out var(--choir-delay) infinite alternate;
}
.choir-notes { animation: choir-raise-notes 2.25s ease-in-out infinite; }
.egg-ladder {
  width: clamp(95px, 22%, 178px);
  left: 3%;
  top: 27%;
  animation: holiday-appear 5.65s ease-in-out both;
}
.ladder-climber {
  transform: translate(88px, 14px);
  animation: ladder-climb 5.65s ease-in-out both;
}
.egg-freedom {
  width: clamp(245px, 58%, 465px);
  left: 50%;
  bottom: -20px;
  transform: translateX(-50%);
  animation: holiday-appear 6.35s ease-in-out both;
}
.freedom-dawn {
  transform-box: fill-box;
  transform-origin: center bottom;
  opacity: .55;
  animation: freedom-light 6.35s ease-out both;
}
.freedom-figure {
  transform: translateX(var(--freedom-x));
  animation: freedom-step 5.8s ease-in-out var(--freedom-delay) both;
}
.freedom-hands { animation: freedom-reach 5.8s ease-in-out both; }
.freedom-chain-left, .freedom-chain-right { transform-box: fill-box; transform-origin: center; opacity: .48; }
.freedom-chain-left { transform: translate(-23px, 13px) rotate(-14deg); animation: chain-fall-left 6.35s ease-in-out both; }
.freedom-chain-right { transform: translate(23px, 13px) rotate(14deg); animation: chain-fall-right 6.35s ease-in-out both; }
.freedom-chain-joint { opacity: 0; animation: chain-give 6.35s ease-in-out both; }
.freedom-spark { opacity: .45; animation: chain-spark 6.35s ease-in-out both; }
.egg-meteors {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  background: linear-gradient(180deg, #030d14f2 0%, #06131ad9 37%, #06131a50 78%, #06131a12);
  animation: sky-darken 6.1s ease-in-out both;
}
.egg-meteors svg { width: 100%; height: 100%; }
.meteor-streak {
  opacity: .78;
  transform: translate(-115px, 85px);
  animation: meteor-fall 2.5s cubic-bezier(.3,.08,.65,1) var(--meteor-delay) both;
}
@keyframes choir-breathe { to { transform: translateY(-3px); } }
@keyframes choir-vowel { from { transform: scale(.9, .34); } to { transform: scale(1, 1.2); } }
@keyframes choir-raise-notes {
  0%, 100% { opacity: .2; transform: translateY(5px); }
  52% { opacity: 1; transform: translateY(-9px); }
}
@keyframes ladder-climb {
  0%, 9% { opacity: 0; transform: translate(11px, 162px) rotate(8deg); }
  21% { opacity: 1; transform: translate(30px, 112px) rotate(-17deg); }
  30%, 37% { opacity: 1; transform: translate(74px, 118px) rotate(4deg); }
  47%, 52% { transform: translate(80px, 87px) rotate(-6deg); }
  62%, 66% { transform: translate(86px, 54px) rotate(4deg); }
  77%, 81% { opacity: 1; transform: translate(93px, 20px) rotate(-5deg); }
  100% { opacity: 0; transform: translate(130px, -6px) rotate(8deg); }
}
@keyframes freedom-light {
  0%, 27% { opacity: .08; transform: scale(.57, .75); }
  67%, 100% { opacity: .8; transform: scale(1); }
}
@keyframes freedom-step {
  0%, 27% { transform: translateY(4px) rotate(4deg); }
  61% { transform: translateX(var(--freedom-x)) translateY(-7px); }
  100% { transform: translateX(var(--freedom-x)); }
}
@keyframes freedom-reach { 0%, 29% { transform: translateY(7px); } 62%, 100% { transform: translateY(-2px); } }
@keyframes chain-fall-left { 0%, 30% { opacity: 1; transform: none; } 75%, 100% { opacity: .48; transform: translate(-23px, 13px) rotate(-14deg); } }
@keyframes chain-fall-right { 0%, 30% { opacity: 1; transform: none; } 75%, 100% { opacity: .48; transform: translate(23px, 13px) rotate(14deg); } }
@keyframes chain-give { 0%, 27% { opacity: 1; } 38%, 100% { opacity: 0; } }
@keyframes chain-spark { 0%, 24%, 66%, 100% { opacity: 0; } 38% { opacity: 1; } }
@keyframes sky-darken { 0%, 100% { opacity: 0; } 18%, 75% { opacity: 1; } }
@keyframes meteor-fall {
  0% { opacity: 0; transform: translate(210px, -135px); }
  22%, 60% { opacity: 1; }
  100% { opacity: 0; transform: translate(-680px, 400px); }
}
@media (max-width: 700px) {
  .egg-choir { top: 16%; }
  .egg-ladder { left: 1%; top: 30%; }
  .egg-freedom { bottom: -13px; }
}
