/* Two permanent card anchors; closing is an explicit destination below discard. */
body[data-screen="game"]:has(.game-rummy) .topbar { height: 56px; flex: 0 0 56px; }
.table-game .rummy-table {
  --rummy-card: clamp(90px, min(24cqw, 27cqh), 144px);
  --stock-card: var(--rummy-card);
  display: grid; grid-template-columns: repeat(2, var(--rummy-card));
  grid-template-rows: calc(var(--rummy-card) * 156 / 110 + 26px) 44px;
  justify-content: center; align-content: center; gap: 12px 34px;
  width: 100%; height: 100%; padding: 0;
}
.rummy-stock, .rummy-discard { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) 26px; justify-items: center; align-items: center; }
.table-game .rummy-stock .stock-pile { margin: 0; }
.rummy-discard { padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 8px; color: var(--pop-paper); }
.rummy-discard:disabled, .rummy-close:disabled { opacity: 1; }
.rummy-card { display: block; width: var(--rummy-card); aspect-ratio: 110 / 156; }
.rummy-empty { border: 1px dashed #fff4d666; border-radius: 7px; }
.rummy-label { font: 18px/1.2 var(--pop-body); white-space: nowrap; }
.rummy-close { grid-column: 2; min-height: 44px; padding: 4px 10px; font-size: 20px; }
.rummy-close:disabled { visibility: hidden; }
.rummy-discard:focus-visible, .rummy-close:focus-visible { outline: 2px solid var(--pop-paper); outline-offset: -3px; }
@media (max-height: 600px) {
  .table-game .rummy-table { --rummy-card: 90px; gap: 5px 24px; }
}
@media (max-width: 700px) {
  /* Draw choices must not change the playfield when the phase switches. */
  body[data-screen="game"]:has(.game-rummy) .topbar { flex-wrap: wrap; height: 84px; flex-basis: 84px; min-height: 84px; align-content: space-between; }
  body[data-screen="game"]:has(.game-rummy) .top-actions { width: 100%; justify-content: flex-end; }
}
