/* A clipped, draggable table: clipping belongs to the stage, never the page. */
#picker-deck-wrap.deck3d-stage,
.deck3d-stage {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--deck-stage-height, 280px);
  min-height: 190px;
  overflow: hidden;
  isolation: isolate;
  perspective: 1100px;
  perspective-origin: 50% 48%;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 90%, #7a517522 0, transparent 65%);
}
.deck3d-stage::before {
  content: "";
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 10px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(ellipse, #0006, transparent 70%);
  pointer-events: none;
}
.deck3d-stage[hidden] { display: none !important; }
#picker-deck.deck3d-deck,
.deck3d-deck {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  transform-style: preserve-3d;
}
.deck3d-deck .pick-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--deck-card-width, 112px);
  height: var(--deck-card-height, 182px);
  aspect-ratio: auto;
  padding: 0;
  border: 1px solid #89709e;
  border-radius: 9px;
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background:
    radial-gradient(circle at 50% 48%, #7a527429 0, transparent 53%),
    repeating-linear-gradient(45deg, #25213e 0 5px, #352b4c 5px 10px);
  box-shadow: inset 0 0 0 3px #1d1733, inset 0 0 0 4px #9a7a5240,
    2px 3px 0 #1c152b, 3px 5px 0 #6b536433, 0 14px 24px #0007;
  color: #dbb969;
  cursor: pointer;
  touch-action: pan-y;
  transition: border-color .18s, box-shadow .18s;
}
.deck3d-deck .pick-card::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid #d4b77948;
  border-radius: 36% 36% 36% 36% / 23% 23% 23% 23%;
  pointer-events: none;
}
.deck3d-deck .pick-card::after {
  content: "";
  position: absolute;
  width: 45%;
  aspect-ratio: 1;
  left: 27.5%;
  top: 35%;
  border: 1px solid #d4b7794d;
  border-radius: 50%;
  pointer-events: none;
}
.deck3d-deck .pick-card > span {
  position: relative;
  z-index: 1;
  font-size: clamp(26px, 3.3vw, 36px);
  text-shadow: 0 2px 9px #0009;
  pointer-events: none;
}
.deck3d-deck .pick-card.is-picked {
  border: 2px solid #edca76;
  color: #fff0ae;
  background: radial-gradient(circle at 50% 48%, #a36c663d, transparent 65%),
    repeating-linear-gradient(45deg, #49314f 0 5px, #34253c 5px 10px);
  box-shadow: inset 0 0 0 3px #33203d, inset 0 0 0 4px #e5c57a55,
    0 0 17px #d9b56240, 0 19px 28px #0009;
}
.deck3d-deck .pick-card:focus-visible {
  outline: 2px solid #fff0bf;
  outline-offset: 3px;
}
.deck3d-stage.is-dragging,
.deck3d-stage.is-dragging .pick-card { cursor: grabbing; }
.deck3d-stage.is-shuffling { cursor: progress; }
.deck3d-stage.is-shuffling .pick-card { pointer-events: none; }
.deck3d-stage.is-dragging .pick-card { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .deck3d-deck .pick-card { transition: none; }
}
