.modal:has(.player-picker) {
  width: min(61rem, 100% - 1rem);
  max-width: calc(100% - 1rem);
  border-color: #b1ccc2;
}

.player-picker-note {
  margin: 0 0 .9rem;
  color: var(--muted);
}

.player-choices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.55rem, 1.8vw, 1.05rem);
}

.player-choice {
  --player-panel: #d2e9dd;
  --player-panel-light: #f2f6e6;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #a8c7bc;
  border-radius: .85rem;
  background: var(--surface);
  color: #173f46;
  text-align: start;
  transition: border-color .18s, box-shadow .18s;
}

.player-choice[data-id="coral"], .player-wardrobe[data-avatar="coral"] .player-choice {
  --player-panel: #edd0c5;
  --player-panel-light: #fff1e8;
}

.player-choice[data-id="navy"] {
  --player-panel: #c9dde7;
  --player-panel-light: #e9f3f3;
}

.player-choice[data-id="sand"] {
  --player-panel: #ebdaba;
  --player-panel-light: #fff4dc;
}

.player-choice-art {
  position: relative;
  isolation: isolate;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: radial-gradient(ellipse at 56% 33%, var(--player-panel-light), transparent 72%),
    linear-gradient(166deg, var(--player-panel-light), var(--player-panel));
}

.player-choice-art::before {
  position: absolute;
  z-index: -1;
  inset: auto 23% 5%;
  height: 5%;
  border-radius: 50%;
  background: #23463d26;
  filter: blur(7px);
  content: "";
}

.player-choice-art img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: .4rem .3rem .28rem;
  object-fit: contain;
  object-position: center bottom;
  transition: transform .2s ease;
}

.player-choice-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
  min-height: 2.6rem;
  padding: .47rem .58rem;
  border-top: 1px solid #c6dbd0;
  font-size: clamp(.82rem, 1.4vw, 1.04rem);
  font-weight: 650;
  line-height: 1.25;
}

.player-choice[aria-pressed="true"] {
  border-color: #14776a;
}

.player-choice[aria-pressed="true"] .player-choice-name {
  background: var(--aqua);
  color: #07574c;
}

.player-choice[aria-pressed="true"] .player-choice-name::after {
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font-size: .75rem;
  content: "✓";
}

@media (hover: hover) {
  .player-choice:hover {
    border-color: #098070;
    box-shadow: 0 .24rem .8rem #12403630;
  }

  .player-choice:hover img {
    transform: scale(1.03);
  }
}

[data-action="player-picker"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 2.5rem;
  min-width: 2.5rem;
  padding: .24rem .55rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: .85rem;
  font-weight: 650;
  white-space: nowrap;
}

[data-action="player-picker"]:hover {
  border-color: #70b7a8;
  background: var(--aqua);
}

[data-action="player-picker"] img:not([hidden]) {
  width: 1.72rem;
  height: 1.72rem;
  border-radius: 50%;
  background: var(--aqua);
  object-fit: cover;
  object-position: center 7%;
}

.modal:has(.player-wardrobe) { width: min(47rem, 100% - 1rem); }
.player-wardrobe .player-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.player-wardrobe .actions { margin-top: .76rem; }

@media (max-width: 43rem) {
  .player-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 34rem) {
  .player-wardrobe .player-choice-name { padding-inline: .32rem; }

  [data-action="player-picker"]:has(img[src]:not([src=""]):not([hidden])) {
    padding-inline: .3rem;
  }

  [data-action="player-picker"]:has(img[src]:not([src=""]):not([hidden])) .player-hud-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-choice:hover img {
    transform: none;
  }
}
