/* The toy stands upright on the top right shelf, facing the room like the Etch
   A Sketch on the desk. The front photograph is the body; the peg screen is a
   live rectangular canvas inside the black panel. */
.stage .lite-brite { --object-width:min(20vw,186px); --object-tilt:-1.2deg; }
.stage .lite-brite .object-photo { aspect-ratio:320/278; }
.litebrite-rest { display:none; }

.room-view .stage .lite-brite {
  position:absolute;
  left:67%;
  top:16.31%;
  width:9.115%!important;
  height:11.914%!important;
  aspect-ratio:auto;
  transform:none!important;
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  filter:none;
  z-index:10;
  transition:filter .18s ease;
}
.room-view .stage .lite-brite:is(:hover,:focus-visible) { filter:brightness(1.05) saturate(1.03); }
.room-view .stage .lite-brite .object-photo { display:none; }
.room-view .stage .litebrite-rest { display:block; position:absolute; inset:0; }
.litebrite-rest-shell {
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  pointer-events:none;
  filter:brightness(.93) saturate(.94) contrast(.98) sepia(.03) drop-shadow(1px 3px 2px rgb(0 0 0 / .35)) drop-shadow(0 6px 8px rgb(0 0 0 / .18));
}
.litebrite-rest-canvas {
  position:absolute;
  left:10.31%; top:6.47%;
  width:75.94%; height:85.61%;
  display:block;
  pointer-events:none;
}

/* At night the pegs throw a little colour past the frame and onto the shelf. */
.room-litebrite-glow {
  position:absolute;
  left:67.6%; top:17.3%;
  width:8%; height:9.8%;
  z-index:12;
  pointer-events:none;
  background:radial-gradient(ellipse at 52% 50%,#ffc96b66 0%,#ff8b3d2e 38%,transparent 70%);
  mix-blend-mode:screen;
  opacity:calc(var(--room-night,0) * .7);
  transition:opacity 1.2s ease;
}
.room-litebrite-glow[data-lit="false"] { opacity:0; }

@media(max-width:600px) {
  .stage .lite-brite { --object-width:25vw; }
}
