/* Character artwork steps forward; cards, controls and names keep their place. */
#quick-commanders .commander-active-list,
#quick-commanders .commander-reserve-list,
#quick-commanders .quick-hero-choices {
  box-sizing: border-box;
  min-width: 0;
  padding: 26px 14px 7px;
  scroll-padding-inline: 14px;
}
#quick-commanders .quick-hero-current { margin-top: 24px; }
#quick-commanders :is(.commander-active-card,.commander-reserve-card,.quick-hero-choice,.quick-hero-current) { isolation: isolate; }
#quick-commanders .commander-portrait img,
#captain-roster-page .hero-quick-portrait,
#hero-collection-dialog .hero-collection-portrait,
.hero-management-choice img { transform-origin: center bottom; }

/* Space inside scrollable strips keeps the enlarged heads and shoulders visible. */
#captain-roster-page .hero-quick-grid { padding: 25px 13px 8px; scroll-padding: 25px 13px; row-gap: 25px; }
.hero-management-grid { padding-top: 26px; }
#hero-collection-dialog .hero-collection-art { padding-top: 25px; }

#quick-commanders :is(.commander-active-card,.quick-hero-choice):focus-visible,
#quick-commanders .quick-hero-current:has(:focus-visible),
.hero-management-choice:has(:focus-visible) {
  z-index: 5;
  border-color: #ddb777;
  outline: 2px solid #eac98a;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #quick-commanders .commander-portrait img,
  #captain-roster-page .hero-quick-portrait,
  #hero-collection-dialog .hero-collection-portrait,
  .hero-management-choice img {
    transition: transform 240ms cubic-bezier(.2,.75,.2,1), filter 240ms ease;
  }
  #quick-commanders :is(.commander-active-card,.commander-reserve-card,.quick-hero-choice,.quick-hero-current):is(:hover,:focus-visible,:has(:focus-visible)),
  #captain-roster-page .hero-quick-choice:is(:hover,:focus-visible,:has(:focus-visible)),
  #hero-collection-dialog .hero-collection-tile:is(:hover,:focus-visible,:has(:focus-visible)),
  .hero-management-choice:is(:hover,:focus-visible,:has(:focus-visible)) {
    z-index: 5;
    border-color: #d7b575;
    background-color: #c4a05a0d;
    box-shadow: 0 0 14px #d7b57517;
  }
  #quick-commanders :is(.commander-active-card,.commander-reserve-card,.quick-hero-choice,.quick-hero-current):is(:hover,:focus-visible,:has(:focus-visible)) .commander-portrait img,
  #captain-roster-page .hero-quick-choice:is(:hover,:focus-visible,:has(:focus-visible)) .hero-quick-portrait,
  #hero-collection-dialog .hero-collection-tile:is(:hover,:focus-visible,:has(:focus-visible)) .hero-collection-portrait,
  .hero-management-choice:is(:hover,:focus-visible,:has(:focus-visible)) img {
    transform: translateY(-2px) scale(1.22);
  }
  #quick-commanders .commander-active-card:is(:hover,:focus-visible,:has(:focus-visible)) .commander-portrait img,
  #quick-commanders .quick-hero-current:not(.is-not-in-march):is(:hover,:focus-visible,:has(:focus-visible)) .commander-portrait img,
  #quick-commanders .quick-hero-choice.is-owned:is(:hover,:focus-visible,:has(:focus-visible)) .commander-portrait img,
  #captain-roster-page .hero-quick-choice.is-owned:is(:hover,:focus-visible,:has(:focus-visible)) .hero-quick-portrait {
    filter: drop-shadow(0 5px 5px #0006) drop-shadow(0 0 5px #d7b5753d);
    opacity: 1;
  }
  #quick-commanders .commander-reserve-card:is(:hover,:focus-visible,:has(:focus-visible)) .commander-portrait img,
  #quick-commanders .quick-hero-choice.is-unowned:is(:hover,:focus-visible,:has(:focus-visible)) .commander-portrait img,
  #quick-commanders .quick-hero-current.is-not-in-march:is(:hover,:focus-visible,:has(:focus-visible)) .commander-portrait img,
  #captain-roster-page .hero-quick-choice.is-unowned:is(:hover,:focus-visible,:has(:focus-visible)) .hero-quick-portrait {
    filter: grayscale(1) drop-shadow(0 4px 4px #0006);
  }
}

@media (prefers-reduced-motion: reduce) {
  #quick-commanders .commander-portrait img,
  #captain-roster-page .hero-quick-portrait,
  #hero-collection-dialog .hero-collection-portrait,
  .hero-management-choice img { transition: none; transform: none; }
}

