.tokens-container {
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  z-index: 5;
  max-width: 90%;
}

.space.side-left .tokens-container {
  bottom: auto;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}

.space.side-right .tokens-container {
  bottom: auto;
  right: 4px;
  left: auto;
  top: 50%;
  transform: translateY(-50%);
  flex-direction: column;
}

/* Shape-distinct tokens: each avatar's emoji sits on a colored player base */
.player-token {
  --token-bg: #888888;
  position: relative;
  width: 22px;
  height: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* Colored player base (disc) under each piece */
.player-token::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 18px;
  height: 6px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 30%,
      rgba(255,255,255,0.55) 0%,
      rgba(255,255,255,0.1) 40%,
      transparent 70%),
    var(--token-bg);
  border: 1px solid rgba(0,0,0,0.45);
  box-shadow:
    0 2px 3px rgba(0,0,0,0.55),
    inset 0 -1px 1px rgba(0,0,0,0.35);
}

/* The emoji itself — this is what makes each token a different shape */
.token-glyph {
  position: relative;
  z-index: 1;
  font-size: 20px;
  line-height: 1;
  filter:
    drop-shadow(0 1px 1px rgba(0,0,0,0.6))
    drop-shadow(0 2px 2px rgba(0,0,0,0.35));
}

/* Bot tokens — dashed white ring around the colored disc base */
.player-token.bot::before {
  border: 1.5px dashed rgba(255,255,255,0.95);
  box-shadow:
    0 2px 3px rgba(0,0,0,0.55),
    inset 0 -1px 1px rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,0,0,0.4);
}

/* Active turn — floating + golden glow */
.player-token.current-turn {
  animation: token-float 0.75s ease-in-out infinite alternate;
}

@keyframes token-float {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 4px rgba(255,215,0,0.8));
  }
  100% {
    transform: translateY(-4px) scale(1.12);
    filter: drop-shadow(0 0 9px rgba(255,215,0,1));
  }
}
