/* Veira scenes (vm-scenes.js): small looping drawings; each loop runs only while its scene is on screen. */
.vsc {
  display: block;
}
.vsc svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
/* only the moving parts turn around their own box; plain transform attributes (flips, rotations) keep user space */
.vsc [class^="s-"],
.vsc [class*=" s-"] {
  transform-box: fill-box;
}
/* chew: the upper jaw bites and the loose plate rocks */
.vsc.on .s-chomp {
  animation: sc-chomp 1.1s ease-in-out infinite;
}
.vsc .s-rock {
  transform-origin: 50% 100%;
}
.vsc.on .s-rock {
  animation: sc-rock 1.1s ease-in-out infinite;
}
@keyframes sc-chomp {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes sc-rock {
  0%,
  45%,
  100% {
    transform: none;
  }
  10% {
    transform: rotate(-7deg);
  }
  25% {
    transform: rotate(5deg);
  }
}
/* yawn: the mouth opens wide and the plate pops up */
.vsc .s-mouth {
  transform-origin: 50% 50%;
}
.vsc.on .s-mouth {
  animation: sc-mouth 2.6s ease-in-out infinite;
}
.vsc.on .s-pop {
  animation: sc-pop 2.6s ease-in-out infinite;
}
@keyframes sc-mouth {
  0%,
  100% {
    transform: scaleY(0.38);
  }
  40%,
  75% {
    transform: scaleY(1);
  }
}
@keyframes sc-pop {
  0%,
  45%,
  100% {
    transform: none;
  }
  58% {
    transform: translateY(-30px) rotate(-14deg);
  }
  72% {
    transform: translateY(-6px) rotate(4deg);
  }
}
/* nofit: the plate slides around on the gap */
.vsc.on .s-slide {
  animation: sc-slide 1.6s ease-in-out infinite;
}
@keyframes sc-slide {
  0%,
  100% {
    transform: none;
  }
  25% {
    transform: translateX(-6px) rotate(-4deg);
  }
  75% {
    transform: translateX(6px) rotate(4deg);
  }
}
/* fill: the gel fills the gap, then a check */
.vsc .s-gel {
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.vsc.on .s-gel {
  animation: sc-gel 3.4s ease-in-out infinite;
}
@keyframes sc-gel {
  0%,
  12% {
    transform: scaleX(0);
  }
  45%,
  92% {
    transform: none;
  }
  100% {
    transform: scaleX(0);
  }
}
/* fill: the plate settles into the gel once the gap is full */
.vsc.on .s-sit {
  animation: sc-sit 3.4s ease-in-out infinite;
}
@keyframes sc-sit {
  0%,
  12% {
    transform: translateY(-3px);
  }
  45%,
  92% {
    transform: none;
  }
  100% {
    transform: translateY(-3px);
  }
}
.vsc .s-ok,
.vsc .s-ok2 {
  transform-origin: 50% 50%;
}
.vsc.on .s-ok {
  animation: sc-ok 3.4s ease-out infinite;
}
@keyframes sc-ok {
  0%,
  48% {
    transform: scale(0);
  }
  56% {
    transform: scale(1.2);
  }
  62%,
  92% {
    transform: none;
  }
  100% {
    transform: scale(0);
  }
}
/* night: stars twinkle, bubbles rise */
.vsc.on .s-tw {
  animation: sc-tw 1.8s ease-in-out infinite;
}
@keyframes sc-tw {
  50% {
    opacity: 0.25;
  }
}
.vsc.on .s-bub {
  animation: sc-bub 2.4s ease-in infinite;
}
@keyframes sc-bub {
  0% {
    transform: none;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translateY(-30px);
    opacity: 0;
  }
}
/* ooze: cream bulges out from under the plate and drips */
.vsc .s-blob {
  transform-origin: 50% 0;
}
.vsc.on .s-blob {
  animation: sc-blob 2.4s ease-in-out infinite;
}
.vsc .s-drip {
  opacity: 0;
}
.vsc.on .s-drip {
  animation: sc-drip 2.4s ease-in infinite;
}
@keyframes sc-blob {
  0%,
  100% {
    transform: scale(0.3);
  }
  40%,
  80% {
    transform: scale(1.15);
  }
}
@keyframes sc-drip {
  0%,
  40% {
    opacity: 0;
    transform: none;
  }
  50% {
    opacity: 1;
  }
  90% {
    opacity: 1;
    transform: translateY(12px);
  }
  100% {
    opacity: 0;
    transform: translateY(14px);
  }
}
/* suction: tug the plate up, it snaps back */
.vsc.on .s-tug {
  animation: sc-tug 1.8s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
.vsc .s-snap {
  opacity: 0;
}
.vsc.on .s-snap {
  animation: sc-snap 1.8s ease-out infinite;
}
@keyframes sc-tug {
  0%,
  100% {
    transform: none;
  }
  45% {
    transform: translateY(-5px);
  }
  52% {
    transform: translateY(1px);
  }
  58% {
    transform: none;
  }
}
@keyframes sc-snap {
  0%,
  50% {
    opacity: 0;
  }
  56% {
    opacity: 1;
  }
  80%,
  100% {
    opacity: 0;
  }
}
/* refund: the envelope goes out, the money comes back */
.vsc.on .s-env {
  animation: sc-env 3.2s ease-in-out infinite;
}
.vsc .s-coin {
  opacity: 0;
}
.vsc.on .s-coin {
  animation: sc-coin 3.2s ease-in-out infinite;
}
@keyframes sc-env {
  0%,
  10% {
    transform: none;
    opacity: 1;
  }
  40% {
    transform: translateX(26px);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes sc-coin {
  0%,
  45% {
    opacity: 0;
    transform: translateX(26px);
  }
  60% {
    opacity: 1;
  }
  80%,
  95% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
  }
}
/* truck: drives to her door */
.vsc.on .s-truck {
  animation: sc-truck 3.2s cubic-bezier(0.4, 0, 0.3, 1) infinite;
}
@keyframes sc-truck {
  0% {
    transform: translateX(-30px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  65%,
  88% {
    transform: translateX(30px);
    opacity: 1;
  }
  100% {
    transform: translateX(30px);
    opacity: 0;
  }
}
/* month: the tube squeezes down while four weeks fill */
.vsc .s-squeeze {
  transform-origin: 100% 50%;
}
.vsc.on .s-squeeze {
  animation: sc-squeeze 4s ease-in-out infinite;
}
@keyframes sc-squeeze {
  0%,
  8% {
    transform: none;
  }
  85%,
  92% {
    transform: scaleX(0.42);
  }
  100% {
    transform: none;
  }
}
.vsc.on .s-wk {
  animation: sc-fillday 4s steps(1) infinite;
  animation-delay: calc(var(--i) * 0.8s + 0.4s);
}
@keyframes sc-fillday {
  0% {
    fill: #86c93a;
  }
  60%,
  100% {
    fill: #fff;
  }
}
/* clock: a whole day goes round */
.vsc .s-hand {
  transform-origin: 50% 100%;
}
.vsc.on .s-hand {
  animation: sc-spin 3.4s linear infinite;
}
@keyframes sc-spin {
  to {
    transform: rotate(360deg);
  }
}
/* apple: the plate bites, a bite appears */
.vsc.on .s-chomp2 {
  animation: sc-bitemove 2.6s ease-in-out infinite;
}
.vsc .s-bite {
  transform-origin: 50% 50%;
  transform: scale(0);
}
.vsc.on .s-bite {
  animation: sc-bite 2.6s ease-out infinite;
}
@keyframes sc-bitemove {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: translateX(-12px);
  }
  45% {
    transform: none;
  }
}
@keyframes sc-bite {
  0%,
  28% {
    transform: scale(0);
  }
  34%,
  92% {
    transform: none;
  }
  100% {
    transform: scale(0);
  }
}
/* laugh */
.vsc .s-laugh {
  transform-origin: 50% 0;
}
.vsc.on .s-laugh {
  animation: sc-laugh 0.9s ease-in-out infinite;
}
@keyframes sc-laugh {
  0%,
  100% {
    transform: scaleY(0.55);
  }
  50% {
    transform: none;
  }
}
.vsc.on .s-ha {
  animation: sc-ha 0.9s ease-in-out infinite;
}
@keyframes sc-ha {
  50% {
    transform: translateY(-4px);
  }
}
/* scrub */
.vsc.on .s-brush {
  animation: sc-brush 0.7s ease-in-out infinite;
}
@keyframes sc-brush {
  0%,
  100% {
    transform: translateX(-16px);
  }
  50% {
    transform: translateX(14px);
  }
}
.vsc.on .s-bits {
  animation: sc-bits 1.4s ease-in-out infinite;
}
@keyframes sc-bits {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(-3px);
  }
}
/* crumbs slide under the plate */
.vsc.on .s-crumb {
  animation: sc-crumb 2.4s ease-in-out infinite;
}
@keyframes sc-crumb {
  0% {
    transform: none;
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  70%,
  90% {
    transform: translateX(40px);
    opacity: 1;
  }
  100% {
    transform: translateX(40px);
    opacity: 0;
  }
}
/* sore: the plate presses, the spot throbs */
.vsc .s-press {
  transform-origin: 0 100%;
}
.vsc.on .s-press {
  animation: sc-press 1.3s ease-in-out infinite;
}
@keyframes sc-press {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: rotate(4deg);
  }
}
.vsc .s-spot {
  transform-origin: 50% 50%;
}
.vsc.on .s-spot {
  animation: sc-throb 1.3s ease-in-out infinite;
}
@keyframes sc-throb {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}
/* seven days on one bead */
.vsc.on .s-day {
  animation: sc-fillday 4.2s steps(1) infinite;
  animation-delay: calc(var(--i) * 0.45s + 0.5s);
}
.vsc .s-bead {
  transform-origin: 50% 50%;
}
.vsc.on .s-bead {
  animation: sc-bead 4.2s ease-out infinite;
}
@keyframes sc-bead {
  0% {
    transform: translateY(-14px);
    opacity: 0;
  }
  10%,
  92% {
    transform: none;
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.vsc-cal7.on .s-ok {
  animation: sc-ok7 4.2s ease-out infinite;
}
@keyframes sc-ok7 {
  0%,
  80% {
    transform: scale(0);
  }
  86% {
    transform: scale(1.2);
  }
  90%,
  97% {
    transform: none;
  }
  100% {
    transform: scale(0);
  }
}
/* three times a day */
.vsc .s-sq {
  transform-origin: 50% 50%;
}
.vsc.on .s-sq {
  animation: sc-sq 2.7s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.9s);
}
@keyframes sc-sq {
  0%,
  30%,
  100% {
    transform: none;
  }
  12% {
    transform: scale(0.85, 1.15);
  }
}
/* the restroom map: the route draws from home to the Italian place */
.vsc .s-route {
  stroke-dashoffset: 0;
}
.vsc.on .s-route {
  animation: sc-route 3.6s linear infinite;
}
@keyframes sc-route {
  0% {
    stroke-dasharray: 0 200;
  }
  70%,
  100% {
    stroke-dasharray: 130 200;
  }
}
.vsc .s-me {
  transform-origin: 50% 50%;
}
.vsc.on .s-me {
  animation: sc-throb 1.2s ease-in-out infinite;
}
/* warm water: steam rises */
.vsc.on .s-steam {
  animation: sc-steam 2s ease-in-out infinite;
}
@keyframes sc-steam {
  0% {
    transform: translateY(4px);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translateY(-8px);
    opacity: 0;
  }
}
/* cushion: the plate presses, the gel gives */
.vsc .s-cush {
  transform-origin: 50% 100%;
}
.vsc.on .s-cush {
  animation: sc-cush 1.6s ease-in-out infinite;
}
.vsc.on .s-push {
  animation: sc-push 1.6s ease-in-out infinite;
}
@keyframes sc-cush {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: scaleY(0.6);
  }
}
@keyframes sc-push {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(4px);
  }
}
/* price tag swings */
.vsc .s-swing {
  transform-origin: 13% 50%;
}
.vsc.on .s-swing {
  animation: sc-swing 2.2s ease-in-out infinite;
}
@keyframes sc-swing {
  0%,
  100% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(6deg);
  }
}
/* tap */
.vsc.on .s-finger {
  animation: sc-finger 1.6s ease-in-out infinite;
}
@keyframes sc-finger {
  0%,
  100% {
    transform: translate(6px, 8px);
  }
  40%,
  55% {
    transform: none;
  }
}
.vsc .s-ring {
  transform-origin: 50% 50%;
  opacity: 0;
}
.vsc.on .s-ring {
  animation: sc-ring 1.6s ease-out infinite;
}
@keyframes sc-ring {
  0%,
  42% {
    transform: scale(0.4);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  90%,
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}
/* the tooth on the dentist calendar */
.vsc .s-tooth {
  transform-origin: 50% 50%;
}
.vsc.on .s-tooth {
  animation: sc-ha 1.6s ease-in-out infinite;
}
/* quits by lunch: the plate tips off the gum */
.vsc .s-fall {
  transform-origin: 100% 100%;
}
.vsc.on .s-fall {
  animation: sc-fall 2.8s ease-in infinite;
}
@keyframes sc-fall {
  0%,
  35% {
    transform: none;
  }
  60%,
  90% {
    transform: translateY(8px) rotate(28deg);
  }
  100% {
    transform: none;
  }
}
.vsc .s-no {
  transform-origin: 50% 50%;
}
.vsc-lunch.on .s-no {
  animation: sc-nox 2.8s ease-out infinite;
}
@keyframes sc-nox {
  0%,
  55% {
    transform: scale(0);
  }
  62% {
    transform: scale(1.2);
  }
  68%,
  92% {
    transform: none;
  }
  100% {
    transform: scale(0);
  }
}
/* products: cream squeezes, powder shakes, the strip peels; each gets a cross */
.vsc .s-p,
.vsc .s-peel {
  transform-origin: 50% 50%;
}
.vsc.on .s-p1 {
  animation: sc-sq 3s ease-in-out infinite;
}
.vsc.on .s-p2 {
  animation: sc-shk 3s ease-in-out infinite 0.6s;
}
.vsc .s-peel {
  transform-origin: 0 50%;
}
.vsc.on .s-peel {
  animation: sc-peel 3s ease-in-out infinite 1.2s;
}
@keyframes sc-shk {
  0%,
  30%,
  100% {
    transform: none;
  }
  8% {
    transform: rotate(-20deg);
  }
  16% {
    transform: rotate(-6deg);
  }
  24% {
    transform: rotate(-20deg);
  }
}
@keyframes sc-peel {
  0%,
  30%,
  100% {
    transform: none;
  }
  15% {
    transform: rotate(-18deg);
  }
}
.vsc .s-x {
  transform-origin: 50% 50%;
  transform: scale(0);
}
.vsc.on .s-x1 {
  animation: sc-x 3s ease-out infinite 0.3s;
}
.vsc.on .s-x2 {
  animation: sc-x 3s ease-out infinite 0.9s;
}
.vsc.on .s-x3 {
  animation: sc-x 3s ease-out infinite 1.5s;
}
@keyframes sc-x {
  0% {
    transform: scale(0);
  }
  10% {
    transform: scale(1.2);
  }
  16%,
  60% {
    transform: none;
  }
  70%,
  100% {
    transform: scale(0);
  }
}
.vsc .s-ok2 {
  transform: none;
}
/* spread: the tube draws a thin line along the inside of the plate */
.vsc .s-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.vsc.on .s-line {
  animation: sc-line 2.8s ease-in-out infinite;
}
@keyframes sc-line {
  0%,
  10% {
    stroke-dashoffset: 1;
  }
  70%,
  92% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: 1;
  }
}
.vsc.on .s-pen {
  animation: sc-pen 2.8s ease-in-out infinite;
}
@keyframes sc-pen {
  0%,
  10% {
    transform: none;
  }
  70%,
  92% {
    transform: translateX(54px);
  }
  100% {
    transform: none;
  }
}
/* bead: the tube dips, leaves one pea-sized bead, and lifts away */
.vsc .s-bead {
  transform-origin: 50% 100%;
  transform: scale(0);
}
.vsc.on .s-bead {
  animation: sc-bead 2.8s ease-out infinite;
}
@keyframes sc-bead {
  0%,
  22% {
    transform: scale(0);
  }
  42%,
  92% {
    transform: none;
  }
  100% {
    transform: scale(0);
  }
}
.vsc.on .s-dip {
  animation: sc-dip 2.8s ease-in-out infinite;
}
@keyframes sc-dip {
  0%,
  8% {
    transform: translateY(-7px);
    opacity: 1;
  }
  22%,
  44% {
    transform: none;
    opacity: 1;
  }
  62%,
  100% {
    transform: translateY(-12px);
    opacity: 0;
  }
}
/* peel: the old layer lifts off in one piece */
.vsc .s-layer {
  transform-origin: 100% 50%;
}
.vsc.on .s-layer {
  animation: sc-layer 3s ease-in-out infinite;
}
@keyframes sc-layer {
  0%,
  15% {
    transform: none;
    opacity: 1;
  }
  55% {
    transform: translate(10px, -26px) rotate(-24deg);
    opacity: 1;
  }
  75%,
  92% {
    transform: translate(18px, -40px) rotate(-30deg);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 0;
  }
}
.vsc-peel.on .s-ok {
  animation: sc-ok 3s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .vsc.on * {
    animation: none !important;
  }
  .vsc .s-gel,
  .vsc .s-x {
    transform: none;
  }
}
