/* sprite.css — two-sheet character (idle/walk strips, 8 cells each) */
#hero {
  position: absolute;
  /* bottom + size + z-index set by JS (per-room ground line, cell aspect, layer sandwich) */
  transform: translateX(-50%) scale(var(--hero-room-scale, 1));
  transform-origin: bottom center;
  image-rendering: pixelated;
  pointer-events: none;
}
/* sheets face RIGHT natively → no flip walking right, mirror when walking left */
#hero .sheet-frame {
  position: absolute; inset: 0;
  background-size: 800% 100%;            /* 8 cells */
  background-repeat: no-repeat;
  image-rendering: pixelated;
  transform: scaleX(var(--flip, 1));
}
#hero.face-left { --flip: -1; }
#hero.idle .sheet-frame {
  background-image: var(--idle-url);
  animation: strip8 1.6s steps(8) infinite;
}
#hero.walking .sheet-frame {
  background-image: var(--walk-url);
  animation: strip8 var(--step, 0.6s) steps(8) infinite;
}
@keyframes strip8 { to { background-position-x: var(--strip-shift); } }

.reduced-motion #hero .sheet-frame { animation: none !important; }
