
/* HANDS */

.hand {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: 0;
}

.seat[data-seat="south"] .hand {
  min-height: var(--ch);
  min-width: 100%;
  flex-shrink: 0;
  justify-content: center;
}

.seat:not([data-seat="south"]) .hand {
  flex-shrink: 0;
}

.seat[data-seat="north"] .hand {
  min-height: var(--ch);
  min-width: calc(3 * var(--cw) + 6px);
}

.seat[data-seat="west"] .hand,
.seat[data-seat="east"] .hand {
  flex-direction: column;
  gap: 2px;
  min-height: calc(3 * var(--ch) + 4px);
  min-width: var(--cw);
  flex-wrap: nowrap;
}

/* CARDS */

.card {
  width: var(--cw);
  height: var(--ch);
  background: var(--card-bg);
  border-radius: 9px;
  border: 1px solid rgba(0,0,0,.15);
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
  cursor: default;
  transition: transform .16s ease, box-shadow .16s ease;
  color: var(--black);
}

.card.red {
  color: var(--red);
}

.card.black {
  color: var(--black);
}

.card .rank {
  font-size: calc(var(--cw) * .38);
  font-weight: 800;
  line-height: 1;
}

.card .suit {
  font-size: calc(var(--cw) * .44);
  line-height: 1.05;
}

.card.back {
  background: linear-gradient(135deg, #236346, #092b1c);
  border: 2px solid var(--gold);
}

.card.back::after {
  content: "✦";
  color: var(--gold);
  font-size: calc(var(--cw) * .45);
}

.card.playable,
.card.selectable {
  cursor: pointer;
}

.card.playable:hover {
  transform: translateY(-7px);
}

.card.selectable:hover {
  transform: translateY(-5px);
}

.card.selected {
  outline: 3px solid var(--gold);
  outline-offset: -2px;
  transform: translateY(-7px);
  box-shadow: 0 0 14px 3px rgba(212,175,55,.5);
}

.card.picked {
  box-shadow: 0 0 0 2px var(--gold), 0 10px 20px rgba(0,0,0,.6);
}

.card.phantom {
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
}

/* TABLE */

.table-zone {
  grid-area: table;
  --cw: 54px;
  --ch: 78px;

  position: relative;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(212,175,55,.22);
  border-radius: 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  min-height: 0;
  min-width: 0;
}

.table-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.deck-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: .6rem;
  letter-spacing: 1px;
  color: var(--gold);
  background: rgba(0,0,0,.45);
  padding: 2px 8px;
  border-radius: 9px;
}

.deck-badge b {
  color: var(--gold-l);
}

/* PILES */

.pile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  position: relative;
  flex-wrap: nowrap;
}

.pile-chk {
  display: flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
}

.pile-count {
  font-size: .7rem;
  font-weight: 800;
  color: var(--gold-l);
  background: rgba(0,0,0,.45);
  border-radius: 10px;
  padding: 3px 8px;
  min-width: 28px;
  text-align: center;
}

.mini {
  width: 19px;
  height: 27px;
  border-radius: 3px;
  background: var(--card-bg);
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: 0 1px 3px rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--black);
  flex: 0 0 auto;
}

.mini.red {
  color: var(--red);
}

.mini.back {
  background: linear-gradient(135deg, #1d5136, #0a2417);
  border: 1px solid var(--gold);
}

.mini.chkobba-card {
  width: 24px;
  height: 34px;
  flex: 0 0 24px;
  border: 2px solid var(--gold);
  box-shadow: 0 0 5px var(--gold);
}

.pile.pop {
  transform: scale(1.18);
}

.seat[data-seat="west"] .pile-fan,
.seat[data-seat="east"] .pile-fan {
  display: none;
}

.pile-fan {
  display: flex;
  align-items: center;
}

.pile-fan .mini {
  margin-left: -14px;
}

.pile-fan .mini:first-child {
  margin-left: 0;
}
