/* Field-only artwork. Portrait lists, HP rings, hitboxes and UI stay intact. */
.unit-marker:has(.battle-pixel-character)::before {
  inset: auto;
  left: 3px;
  bottom: 5px;
  width: 42px;
  height: 16px;
  border: 1px solid #ffffff88;
  border-radius: 50%;
  clip-path: none;
  opacity: .6;
  filter: none;
}
.unit-marker:has(.battle-pixel-character).is-selected::before {
  opacity: 1;
  border-color: #ffeb8c;
}
.unit-marker:has(.battle-pixel-character) > .hex-hp-bar {
  opacity: .75;
  z-index: 2;
}
.unit-marker .battle-pixel-character {
  position: absolute;
  inset: auto;
  left: 0;
  top: -5px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  clip-path: none;
  background-image: var(--battle-pixel-atlas);
  background-size: 500% 100%;
  background-position: 0 0;
  background-repeat: no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 1px 0 #080d18);
  animation: battle-pixel-idle 1.4s steps(1, end) infinite;
}
.terrain-structure { object-fit: contain; image-rendering: pixelated; }
.tile[data-tile-type="acceleration_lane"][data-pixel-lane-facing] { content: var(--pixel-lane-image); }
.battle-pixel-mob-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.battle-pixel-mob {
  position: absolute; width: 48px; height: 48px;
  background: var(--battle-pixel-atlas) 0 0 / 500% 100% no-repeat;
  image-rendering: pixelated; pointer-events: none;
  animation: battle-pixel-idle 1.5s steps(1, end) infinite;
  filter: drop-shadow(0 1px 0 #080d18);
}
.battle-pixel-mob[hidden] { display: none; }
.tile.battle-pixel-mob-ground { content: url('../assets/tiles/pixel/grass.png'); image-rendering: pixelated; }
.battle-pixel-mob.is-unobserved { animation: none; filter: brightness(.68) saturate(.72); }
.unit-marker.is-main-recovering .battle-pixel-character { filter: grayscale(1) brightness(.5); }
body.is-processing .battle-pixel-character, body.is-processing .battle-pixel-mob,
.unit-marker.is-main-recovering .battle-pixel-character { animation-play-state: paused; }
@keyframes battle-pixel-idle {
  0% { background-position: 0% 0; }
  30% { background-position: 25% 0; }
  46% { background-position: 50% 0; }
  68% { background-position: 75% 0; }
  78% { background-position: 100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .battle-pixel-character, .battle-pixel-mob { animation: none !important; }
}
