.player-hand {
  display: grid;
  grid-template-columns: repeat(auto-fit, 24%);
  @media (min-aspect-ratio: 9/10) {
    grid-template-columns: repeat(auto-fit, 10%);
  }
  justify-items: center;
  align-content: center;
  justify-content: center;
  max-width: 100%;
  min-height: 0;

  & > form {
    width: 100%;
    height: 100%;
  }
  & > form,
  & > .card {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    max-width: 100%;
  }

  & > .card,
  & > form > .card {
    display: flex;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
    overflow: hidden;
    padding: 0;
    border: none;
    background: transparent;
    /* aspect-ratio: 2 / 3; */
    /* height: auto; */
    /* width: auto; */
    /* max-height: 100%; */
    /* max-width: 100%; */

    & > img {
      height: 100%;
      width: 100%;
      object-fit: contain;
      display: block;
      border-radius: var(--radius-lg);
    }

    &:hover {
      transform: translateY(-15px);
      box-shadow: var(--shadow-lg);
      z-index: var(--z-card-hover);
    }
  }

  & > .card.-unplayable {
    opacity: 0.5;
    cursor: not-allowed;

    &:hover {
      transform: none;
      box-shadow: var(--shadow-md);
    }
  }
}

@media (min-width: 768px) {
  .player-hand > .card,
  .player-hand > form > .card {
    &:hover {
      transform: translateY(-20px) scale(1.05);
    }
  }
}
