/* A half-moon of felt inside a padded wooden rail, the same in both themes. */
.bj-table {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  width: 100%;
  min-height: 22rem;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 2rem;
  border: 0.7rem solid #4a2e17;
  border-top-width: 0.35rem;
  border-radius: 1.5rem 1.5rem 50% 50% / 1.5rem 1.5rem 7rem 7rem;
  background: radial-gradient(ellipse at 50% 30%, var(--felt-light), var(--felt) 60%, var(--felt-dark));
  box-shadow:
    inset 0 0 0 2px rgb(233 196 96 / 0.55),
    inset 0 0.75rem 2rem rgb(0 0 0 / 0.35),
    0 1rem 1.5rem -0.75rem rgb(0 0 0 / 0.7);
}

.bj-rule {
  margin: 0;
  color: rgb(233 196 96 / 0.8);
  font: 700 clamp(0.7rem, 2.5vw, 0.875rem) / 1.3 var(--display);
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.bj-hands {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2.5rem;
}

.bj-hand {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 14px;
}

.bj-hand[data-active="true"] {
  outline: 2px solid var(--gold);
}

.bj-label {
  margin: 0;
  color: #e8efe9;
  font-size: 0.875rem;
  font-weight: 600;
}

.bj-value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bj-hand[data-tone="win"] .bj-value {
  color: var(--win);
}

.bj-hand[data-tone="loss"] .bj-value {
  color: var(--loss);
}

/* Cards fan out to the right, overlapping so long hands still fit. */
.bj-cards {
  display: flex;
  min-height: calc(clamp(2.8rem, 12vw, 4.2rem) * 1.4);
}

/* Rank and suit sit in the corner, where they still show under the next card. */
.bj-card {
  display: grid;
  place-items: start;
  padding: 0.35rem 0.4rem;
  width: clamp(2.8rem, 12vw, 4.2rem);
  aspect-ratio: 5 / 7;
  border-radius: 8px;
  background: #f8f4e9;
  box-shadow: 0 4px 10px -4px rgb(0 0 0 / 0.6);
  color: #14201a;
  font: 700 clamp(0.9rem, 3.8vw, 1.25rem) / 1 var(--display);
  animation: card-in 0.2s ease-out;
}

.bj-card + .bj-card {
  margin-left: calc(clamp(2.8rem, 12vw, 4.2rem) * -0.35);
}

.bj-card[data-red="true"] {
  color: #c62a41;
}

.bj-card[data-state="down"] {
  border: 3px solid #f8f4e9;
  background: repeating-linear-gradient(45deg, var(--chip-red) 0 4px, #a8253b 4px 8px);
}

@keyframes card-in {
  from {
    transform: translateY(-0.75rem) scale(0.9);
    opacity: 0;
  }
}

.bj-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .bj-card {
    animation: none !important;
  }
}
