/* The existing print bed keeps its dimensions and responsive behavior.
   This frame takes exactly the original mascot's centered 60% footprint. */
.print-bed .bed-chile-scan {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  aspect-ratio: 330 / 305;
  transform: translate(-50%, -50%);
  isolation: isolate;
  pointer-events: none;
}
.print-bed .bed-chile-scan > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}
/* Static printed result is also the reduced-motion fallback. */
.print-bed .bed-chile-scan > .bed-mascot {
  clip-path: inset(0 0 100% 0);
}
.print-bed .bed-chile-scan > .bed-chile-scan__printed {
  clip-path: inset(0 0 0 0);
}
.print-bed .bed-chile-scan__line {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 100%;
  height: 1px;
  transform: translateY(-50%);
  background: #c5f542;
  box-shadow: 0 0 6px 1px rgb(197 245 66 / 35%);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .print-bed .bed-chile-scan > .bed-mascot {
    animation: bed-chile-original 8s linear infinite;
  }
  .print-bed .bed-chile-scan > .bed-chile-scan__printed {
    animation: bed-chile-printed 8s linear infinite;
  }
  .print-bed .bed-chile-scan__line {
    animation:
      bed-chile-sweep 8s linear infinite,
      bed-chile-glow 8s linear infinite;
  }
}
/* Complementary clips share a boundary: no original behind printed pixels.
   0–1.6s original, 1.6–4.4s up, 4.4–6.4s printed, 6.4–7.6s down. */
@keyframes bed-chile-original {
  0%,
  20%,
  95%,
  100% {
    clip-path: inset(0 0 0 0);
  }
  55%,
  80% {
    clip-path: inset(0 0 100% 0);
  }
}
@keyframes bed-chile-printed {
  0%,
  20%,
  95%,
  100% {
    clip-path: inset(100% 0 0 0);
  }
  55%,
  80% {
    clip-path: inset(0 0 0 0);
  }
}
@keyframes bed-chile-sweep {
  0%,
  20%,
  95%,
  100% {
    top: 100%;
  }
  55%,
  80% {
    top: 0%;
  }
}
@keyframes bed-chile-glow {
  0%,
  20%,
  55%,
  80%,
  95%,
  100% {
    opacity: 0;
  }
  21%,
  54%,
  81%,
  94% {
    opacity: 1;
  }
}
