/* Real card nodes keep their position; empty tracks are not fake game cards. */
body.v45-battle-active :is(#player-field,#opponent-field)[data-v304-field-slots],
html.shocker-mobile-v252 body.v45-battle-active.v64-shocker-battle :is(#player-field,#opponent-field)[data-v304-field-slots] {
  display: grid !important;
  grid-template-columns: repeat(var(--field-v304-slots,3),var(--field-v304-card-width,64px)) !important;
  grid-template-rows: max-content !important;
  grid-auto-flow: row !important;
  justify-content: safe center !important;
  align-content: center !important;
  justify-items: center !important;
  align-items: center !important;
}
body.v45-battle-active :is(#player-field,#opponent-field)[data-v304-field-slots] > .card {
  grid-column-start: var(--field-v304-slot-column,auto) !important;
  grid-row: 1 !important;
  justify-self: center !important;
  align-self: center !important;
}
/* Preserve the existing portrait card baseline and the existing horizontal
   field panning when an expanded field exceeds its available art-safe width. */
html.shocker-mobile-portrait-v252 body.v45-battle-active.v64-shocker-battle :is(#player-field,#opponent-field)[data-v304-field-slots] {
  align-content: end !important;
  align-items: end !important;
}

/* v305: the battle document has one explicit desktop column. Transient cards
   must never create an implicit side column or change the board's width. The
   existing short-landscape layout and smartphone-specific grid are retained. */
@media (min-height:501px) {
  html:not(.shocker-mobile-v252) body.v45-battle-active.v64-shocker-battle {
    grid-template-columns: minmax(0,1fr) !important;
  }
  html:not(.shocker-mobile-v252) body.v45-battle-active.v64-shocker-battle > :is(h2,#turn-info,#phase-bar,.field-area) {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* The adjustment choice stays luminous above the hand-fan and skin finish.
   Use an outline and a shadow, keeping the card's border and box unchanged. */
body.v45-battle-active.v64-shocker-battle .player-area #hand-row #hand-zone > .card.adjust-tap-selected {
  border-width: 1px !important;
  border-color: #ffe39a !important;
  outline: 2px solid rgba(255,226,141,.95) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 1px rgba(67,43,7,.85),0 0 18px rgba(255,213,104,.85),0 0 34px rgba(255,190,62,.28),0 10px 18px rgba(0,0,0,.6) !important;
  filter: brightness(1.09) saturate(1.06) !important;
  z-index: 141 !important;
}
