/* All scene positions use the original painting's 1792 × 878 coordinate space. */
.scene-interaction {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
}
.cat-hit {
  position: absolute; left: 22%; top: 0; width: 12.8%; height: 13.4%;
  padding: 0; border: 0; background: none; border-radius: 48%;
  pointer-events: auto; cursor: pointer; touch-action: manipulation;
}
.cat-hit:focus-visible { outline: 2px dashed #fff0b9; outline-offset: 3px; }
.cat-eyes {
  opacity: 0; transform: scaleY(.12); transform-origin: 563px 57px;
  transition: opacity 160ms ease, transform 380ms cubic-bezier(.2,.7,.3,1);
}
.cat-eye { fill: url(#cat-bead); stroke: #abb5a0; stroke-width: .9; }
.cat-eye-glint { fill: #fffef2; }
.cat-eye-rim { stroke: #b9c9ac; stroke-width: .65; opacity: .7; stroke-linecap: round; }
.cat-awake .cat-eyes { opacity: 1; transform: scaleY(1); }
.coffee-steam { opacity: .8; }
.steam-ribbon { animation: steam-rise 7.5s linear infinite; transform-origin: 155px 695px; }
.steam-ribbon:nth-child(2) { animation-delay: -2.8s; animation-duration: 8.7s; stroke-width: 3.8; }
.steam-ribbon:nth-child(3) { animation-delay: -5.6s; animation-duration: 6.9s; stroke-width: 2.4; }
@keyframes steam-rise {
  0% { opacity: 0; transform: translate(-2px,8px) scaleX(.85); }
  20% { opacity: .75; }
  65% { opacity: .5; }
  100% { opacity: 0; transform: translate(6px,-36px) scaleX(1.2); }
}
.lamp-breath { animation: lamplight 12s ease-in-out infinite alternate; }
@keyframes lamplight { from { opacity: .35; } to { opacity: .75; } }
.sun-dust circle { opacity: 0; animation: dust-drift 17s linear infinite; }
.sun-dust circle:nth-child(2) { animation-delay: -6s; animation-duration: 21s; }
.sun-dust circle:nth-child(3) { animation-delay: -12s; animation-duration: 19s; }
.sun-dust circle:nth-child(4) { animation-delay: -4s; animation-duration: 23s; }
@keyframes dust-drift {
  0% { opacity: 0; transform: translate(0,10px); }
  25%, 65% { opacity: .42; }
  100% { opacity: 0; transform: translate(16px,-25px); }
}
.motion-toggle {
  position: fixed; z-index: 20; bottom: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px;
  border: 1px solid #cdb48966; border-radius: 7px; padding: 7px 10px;
  background: #30261de8; color: #f4e6c6; font: 14px/1.2 "Patrick Hand", cursive;
  box-shadow: 0 2px 9px #0002; cursor: pointer;
  transition: background-color 180ms ease;
}
.motion-toggle[hidden] { display: none; }
.motion-toggle:hover { background: #443426; }
.motion-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.play-icon { display: none; }
.room-paused .pause-icon { display: none; }
.room-paused .play-icon { display: inline; }
.room-paused .room-motion * { animation-play-state: paused !important; }
.room-paused .paint-motion, .room-paused .coffee-steam, .room-paused .sun-dust, .room-paused .lamp-breath { visibility: hidden; }
.room-paused .cat-eyes { transition: none; }
.page-hidden .room-motion * { animation-play-state: paused !important; }
@media (max-width: 900px), (max-aspect-ratio: 6/5) {
  .scene-interaction { position: absolute; inset: 0 auto auto 50%; width: 1200px; height: 588px; transform: translateX(-345px); z-index: 0; }
  .scene-interaction .cat-hit { left: 22%; top: 0; width: 12.8%; height: 13.4%; }
  .motion-toggle { position: relative; inset: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .room-motion *, .motion-toggle { transition: none !important; }
}

/* Independent, infrequent blinks and a small gaze inside the painted whites. */
.soot-eye-pair { transform-box: fill-box; transform-origin: center; animation: soot-blink 9.7s linear infinite; }
.soot-right .soot-eye-pair { animation-duration: 13.1s; animation-delay: -4.6s; }
.soot-look { transition: transform 140ms ease-out; }
@keyframes soot-blink {
  0%, 93%, 96%, 100% { transform: scaleY(1); }
  94.2%, 94.9% { transform: scaleY(.06); }
}
.room-paused .soot-face { visibility: hidden; }

/* The shadow groups share the corresponding foliage's period and direction. */
.screen-reflections { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.shadow-canopy { --wind-a: -2.2px; --wind-b: 1.5px; animation: leaf-shadow 7.8s cubic-bezier(.45,0,.55,1) infinite; }
.shadow-monstera { --wind-a: 2.5px; --wind-b: -1.8px; animation: leaf-shadow 9.3s cubic-bezier(.45,0,.55,1) infinite; }
.shadow-trailing { --wind-a: 1.8px; --wind-b: -2.5px; animation: leaf-shadow 10.7s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes leaf-shadow {
  0%, 50%, 100% { transform: translate(0,0); }
  25% { transform: translate(var(--wind-a), .6px); }
  75% { transform: translate(var(--wind-b), -.4px); }
}
.room-paused .screen-reflections *, .page-hidden .screen-reflections * { animation-play-state: paused !important; }
@media (max-width: 900px), (max-aspect-ratio: 6/5) { .screen-reflections { display: none; } }

/* The same bead eyes soften into a satisfied squint after three gentle strokes. */
.cat-content .cat-eyes { opacity: 1; transform: scaleY(.16); transition: transform 420ms ease, opacity 200ms ease; }

.console-hit {
  position: absolute; left: 88.5%; top: 73.8%; width: 5.7%; height: 14.6%;
  padding: 0; border: 0; background: none; border-radius: 12%;
  pointer-events: auto; cursor: pointer; touch-action: manipulation;
}
.console-hit:focus-visible { outline: 2px dashed #fff0b9; outline-offset: 4px; }
.console-game { opacity: 0; visibility: hidden; transition: opacity 180ms ease, visibility 0s 180ms; }
.console-playing .console-game { opacity: .96; visibility: visible; transition-delay: 0s; }
.pixel-player { transform: translate(5px,52px); }
.pixel-celebration { opacity: 0; }
.console-playing .pixel-player { animation: pixel-hop 3.4s steps(1,end) both; }
.console-playing .pixel-star { animation: pixel-collect 3.4s steps(1,end) both; }
.console-playing .pixel-celebration { animation: pixel-spark 3.4s steps(1,end) both; }
@keyframes pixel-hop {
  0%, 12% { transform: translate(5px,52px); }
  20% { transform: translate(9px,51px); }
  28% { transform: translate(14px,52px); }
  36% { transform: translate(19px,48px); }
  44% { transform: translate(23px,37px); }
  52% { transform: translate(28px,31px); }
  60% { transform: translate(33px,39px); }
  68% { transform: translate(35px,52px) scaleY(.9); }
  76%, 100% { transform: translate(35px,52px); }
}
@keyframes pixel-collect { 0%, 48% { opacity: 1; } 52%, 100% { opacity: 0; } }
@keyframes pixel-spark { 0%, 48% { opacity: 0; } 52%, 60% { opacity: 1; } 64%, 100% { opacity: 0; } }
.room-paused .console-game { opacity: 0; visibility: hidden; transition: none; }
