/* v149 character wheel: the card follows a drag and the center selection
   remains the visual focus without making the lobby decode every portrait. */
#lobby .character-list.character-wheel {
  --wheel-drag-x: 0px;
}

#lobby .character-list.character-wheel .character-option {
  transform: translateX(calc(-50% + var(--wheel-x, 0px) + var(--wheel-drag-x, 0px) + var(--wheel-intro-x, 0px))) translateY(var(--wheel-y, 0px)) scale(var(--wheel-scale, 1)) !important;
  will-change: transform;
}

#lobby .character-list.character-wheel.is-initial-position .character-option {
  transition: none !important;
}

/* The old wheel rule made the portrait 100% of the complete card, rather
   than its grid row. That pushed the label into an empty lower half on Toy. */
#lobby .character-list.character-wheel .character-portrait {
  height: auto !important;
  min-height: 0 !important;
  align-self: stretch;
}

#lobby .character-list.character-wheel .character-option.active {
  z-index: 24;
}

/* The wheel stays readable on wide screens and settles with a visible lift
   animation after a fast drag or wheel gesture. */
#lobby .character-list.character-wheel {
  overflow: visible !important;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
}
#lobby .character-list.character-wheel .character-option {
  transition: transform .42s cubic-bezier(.16,.86,.24,1), opacity .24s ease, filter .24s ease;
  pointer-events: auto;
}
#lobby .character-list.character-wheel .character-option:not(.active) {
  cursor: pointer;
}
#lobby .character-list.character-wheel .character-option.active {
  pointer-events: auto;
  cursor: pointer;
}
#lobby .character-list.character-wheel .character-option.active {
  animation: character-wheel-lift .42s cubic-bezier(.16,.86,.24,1);
}
@keyframes character-wheel-lift {
  0% { filter: brightness(1); }
  45% { filter: brightness(1.28); }
  100% { filter: brightness(1.12); }
}

/* Toy and server use one multiplayer button treatment. */
.toy-ranked-only #lobby #lobby-multiplayer { display: inline-grid !important; visibility: visible !important; }

@media (max-width: 760px) {
  #lobby .character-list.character-wheel {
    height: 248px !important;
    min-height: 232px !important;
    max-height: 248px !important;
    margin-bottom: 2px;
  }

  #lobby .character-list.character-wheel .character-option {
    width: 154px !important;
    height: 220px !important;
    grid-template-rows: minmax(0, 1fr) 14px 48px;
  }

  #lobby .character-list.character-wheel .character-platform {
    width: 76%;
    height: 12px;
  }

  #lobby .character-list.character-wheel .character-option-label strong { font-size: 15px; }
  #lobby .character-list.character-wheel .character-option-label small { font-size: 10px; }
}
