.nlo-nesti {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  pointer-events: none;
  user-select: none;
  transform-origin: 50% 88%;
}

.nlo-nesti img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .13s ease;
}

.nlo-nesti .nlo-nesti-idle { opacity: 1; }
.buddy .nlo-nesti { animation: nloNestiFloat 2.6s ease-in-out infinite; }

.buddy.look .nlo-nesti-idle,
.buddy.wave .nlo-nesti-idle,
.buddy.drag .nlo-nesti-idle,
.buddy.happy .nlo-nesti-idle,
.buddy.sad .nlo-nesti-idle,
.cock.j .nlo-nesti-idle,
.cock.s .nlo-nesti-idle { opacity: 0; }

.buddy.look:not(.wave, .drag, .happy, .sad) .nlo-nesti-read,
.buddy.wave:not(.happy, .sad) .nlo-nesti-wave,
.buddy.drag:not(.happy, .sad) .nlo-nesti-wave,
.buddy.happy:not(.sad) .nlo-nesti-happy,
.buddy.sad .nlo-nesti-sad,
.cock.j .nlo-nesti-happy,
.cock.s .nlo-nesti-sad { opacity: 1; }

.buddy.wave .nlo-nesti { animation: nloNestiWave .64s ease-in-out 2; }
.buddy.happy .nlo-nesti { animation: nloNestiHop .52s ease-in-out 2; }
.buddy.sad .nlo-nesti { animation: nloNestiSettle .4s ease-out both; }
.buddy.drag .nlo-nesti { animation: none; transform: rotate(-5deg); }

@keyframes nloNestiFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes nloNestiWave {
  0%, 100% { transform: rotate(0); }
  30% { transform: translateY(-3px) rotate(7deg); }
  68% { transform: translateY(-2px) rotate(-4deg); }
}
@keyframes nloNestiHop {
  0%, 100% { transform: translateY(0) scale(1); }
  17% { transform: translateY(0) scale(1.045,.95); }
  54% { transform: translateY(-12px) scale(.98,1.025); }
}
@keyframes nloNestiSettle {
  0% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .buddy .nlo-nesti { animation: none; transform: none; }
  .nlo-nesti img { transition: none; }
}
