/* Positioning for these three furnishings is computed in seat-layout.js from
   one rail point per seat. No per-seat percentage offsets belong here. */
@media (min-width: 900px), (orientation: landscape) {
.poker-table::after {
  box-sizing: border-box;
  width: min(70%, 840px);
}

/* Keep the original rotation/animation, with a rail-normal correction only
   for the four curved-end seats. CSS left/top stay stable for measurement. */
#card-layer > .hole-card-pair {
  translate: var(--card-rail-x, 0px) var(--card-rail-y, 0px);
}
#poker-table .seat,
#poker-table .seat .avatar {
  width: var(--seat-avatar-size, 50px);
  height: var(--seat-avatar-size, 50px);
}

#seat-layer > .seat,
#marker-layer > .seat-rail-number,
#marker-layer > .table-marker,
#wager-layer > .wager-chip-rack,
#stack-layer > .player-chip-rack {
  right: auto;
  bottom: auto;
}

/* The first row follows the numbered-seat orbit; extra chips extend inward.
   A three-chip row keeps the neighboring curved-end seats separated. */
#wager-layer > .wager-chip-rack {
  width: 0;
  height: 0;
  min-width: 0;
  min-height: 0;
  transform-origin: 0 0;
  transform: translate(-50%, -50%) rotate(var(--rack-rotation, 0deg)) scale(var(--rack-scale, 1));
}

#wager-layer .chip-pile { display: contents; }

#wager-layer .chip-token {
  position: absolute;
  inset: auto;
  left: var(--wager-x);
  top: var(--wager-y);
  transform: translate(-50%, -50%);
  width: 21px;
  height: 11px;
  z-index: var(--wager-z, 0);
}

#wager-layer .chip-pile.is-10000 .chip-token { width: 24px; height: 13px; }
#wager-layer .chip-token::after { font-size: 5px; }

#stack-layer > .player-chip-rack {
  width: max-content;
  min-width: 0;
  max-width: none;
  min-height: 0;
  align-items: flex-end;
  gap: 4px;
  transform: translate(-50%, -50%) rotate(var(--rack-rotation)) scale(var(--rack-scale, 1));
  transform-origin: center;
}

#stack-layer .chip-pile {
  flex: 0 0 14px;
  width: 14px;
  height: calc(7px + (var(--chip-count) - 1) * 3px);
  transform: none;
}

#stack-layer .chip-token {
  width: 14px;
  height: 7px;
  bottom: calc(var(--chip-index) * 3px);
  transform: none;
}

#stack-layer .chip-pile.is-10000 {
  flex-basis: 18px;
  width: 18px;
  height: calc(9px + (var(--chip-count) - 1) * 3px);
}

#stack-layer .chip-pile.is-10000 .chip-token {
  width: 18px;
  height: 9px;
}

}

#card-layer > .hole-card-pair.is-mucked { visibility: hidden; pointer-events: none; }

/* Empty is distinct from folded: keep the rail number and a noninteractive
   seat silhouette, but no portrait, profile control, cards or chips. */
#seat-layer > .seat.is-empty { cursor: default; pointer-events: none; opacity: 1; }
#seat-layer > .seat.is-empty .avatar {
  display: grid; place-items: center; border: 1px dashed #7b817d;
  background: #111815; color: #b1b8b2; box-shadow: none;
}
.empty-seat-label { max-width: 100%; font-size: 10px; font-weight: 500; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
.seat-rail-number.is-empty { border-style: dashed; border-color: #8a958d; background: #162019; color: #c5cdc7; box-shadow: none; }

/* Collection starts at the fitted size. Resetting to scale(1) for the first
   animation frame would briefly spill dense wagers back across the line. */
.poker-table.is-sweeping #wager-layer > .wager-chip-rack,
.poker-table.is-dealer-sweeping #wager-layer > .wager-chip-rack { animation-name: fitted-wager-sweep; }
@keyframes fitted-wager-sweep {
  0% { opacity: 1; transform: translate(-50%, -50%) translate3d(0, 0, 0) rotate(var(--rack-rotation, 0deg)) scale(var(--rack-scale, 1)); }
  72% { opacity: .92; }
  100% { opacity: .08; transform: translate(-50%, -50%) translate3d(var(--sweep-x), var(--sweep-y), 0) rotate(var(--rack-rotation, 0deg)) scale(calc(var(--rack-scale, 1) * .66)); }
}

@media (max-width: 899px) and (orientation: portrait) {
  #wager-layer .wager-chip-rack { align-items: flex-end; gap: 7px; }
  #wager-layer .chip-pile { position: relative; display: block; width: 15px; height: calc(8px + (var(--chip-count) - 1) * 2px); }
  #wager-layer .chip-token { position: absolute; inset: auto; left: 0; bottom: calc(var(--chip-index) * 2px); width: 15px; height: 8px; }
  #wager-layer .chip-pile.is-10000 { width: 18px; }
  #wager-layer .chip-pile.is-10000 .chip-token { width: 18px; height: 10px; }
  #wager-layer .chip-token::after { font-size: 4px; }
}
