/* Ground the combat sprites without changing their size, position or controls. */
/* Stalker wheels: idle reaches y=450 in a 585x504 cell. Other poses have
   different transparent bottom margins; move only the art frame to that line.
   Attack also covers the skill pose. Token coordinates and gauges stay put. */
.lane-unit[data-sprite-cell="retreat"] .battle-unit-sprite-frame[data-enemy-type="stalker-ai"] {
  --sprite-offset-y: -0.396825%;
}
.lane-unit[data-sprite-cell="advance"] .battle-unit-sprite-frame[data-enemy-type="stalker-ai"] {
  --sprite-offset-y: 0.992063%;
}
.lane-unit[data-sprite-cell="detect"] .battle-unit-sprite-frame[data-enemy-type="stalker-ai"] {
  --sprite-offset-y: 4.761905%;
}
.lane-unit[data-sprite-cell="attack"] .battle-unit-sprite-frame[data-enemy-type="stalker-ai"] {
  --sprite-offset-y: 5.555556%;
}
.lane-unit[data-sprite-cell="melee"] .battle-unit-sprite-frame[data-enemy-type="stalker-ai"] {
  --sprite-offset-y: 6.547619%;
}

.battle-screen .lane-unit::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 76%;
  height: 15%;
  z-index: -1;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at center, rgb(0 0 0 / .62) 0 16%, rgb(0 0 0 / .25) 34%, transparent 62%),
    radial-gradient(ellipse at center, rgb(0 0 0 / .28) 0 28%, transparent 72%);
  pointer-events: none;
}

/* The frame's transparent lower margin puts the visible feet above its edge.
   Keep this shadow on the token, outside the animated/clipped sprite sheet. */
.battle-screen:is(
  [data-battle-background="tunnel"],
  [data-battle-background="blast-door"],
  [data-battle-background="connecting-passage"],
  [data-battle-background="abandoned-platform"],
  [data-battle-background="sunlit-platform"],
  [data-battle-background="shopping-passage"],
  [data-battle-background="maintenance-corridor"],
  [data-battle-background="ventilation-sunshaft"],
  [data-battle-background="armored-train-breach"]
) .battlefield::before {
  content: "";
  inset: auto 0;
  top: var(--field-plane-top);
  height: 32px;
  z-index: 3;
  transform: translateY(-35%);
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / .38) 35%, rgb(0 0 0 / .2) 54%, transparent);
  animation: none;
  pointer-events: none;
}
