/* Geometry only. Cards, player panels, labels and pucks inherit PokerTH's
   original skin; this sheet must not introduce a second visual design. */
html[data-cash-layout="stable"] .cash-layout-stage {
  position:absolute;left:0;top:0;transform-origin:0 0;--comm-scale:1;--sscale:1;
}
html[data-cash-layout="stable"] #g-cash-table-scene,
html[data-cash-layout="stable"] #g-table-scaler,
html[data-cash-layout="stable"] #g-seats {
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  transform:none!important;translate:none!important;max-width:none!important;max-height:none!important;
}
html[data-cash-layout="stable"] #g-zoom-layer { position:absolute!important;inset:0!important;width:100%!important;height:100%!important; }
html[data-cash-layout="stable"] .felt-oval {
  position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
  min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
  margin:0!important;padding:0!important;transform:none!important;translate:none!important;
}
html[data-cash-layout="stable"] body.in-game .game-area { padding-bottom:var(--table-controls-height,176px)!important;min-height:0!important; }
html[data-cash-layout="stable"] body.in-game #g-table-zone { width:100%!important;flex:1 1 0!important;min-height:0!important;overflow:visible; }
html[data-cash-layout="stable"] body.in-game .player-bar { display:none!important; }
/* This layout reserves the controls once, below the table. The old short
   landscape flow rule otherwise consumes that space again; its desktop
   translateX then places half of the panel outside the window. */
html[data-cash-layout="stable"] body.in-game .my-zone {
  position:fixed!important;left:0!important;right:0!important;top:auto!important;bottom:0!important;
  margin-left:auto!important;margin-right:auto!important;max-width:100%!important;
  transform:none!important;translate:none!important;z-index:29;
}
html[data-cash-layout="stable"] #g-seats .seat {
  --plate-w:var(--table-opp-w);--plate-h:var(--table-opp-h);
  position:absolute!important;width:var(--plate-w)!important;height:var(--plate-h)!important;
  padding:0!important;margin:0!important;transform:translate(-50%,-50%)!important;translate:none!important;
  --sscale:1!important;
}
html[data-cash-layout="stable"] #g-seats .seat.me { --plate-w:var(--table-self-w);--plate-h:var(--table-self-h); }
html[data-cash-layout="stable"] #g-seats .seat.me .seat-holecards .pk { width:37px!important;height:52px!important; }
html[data-cash-layout="stable"] #g-seats .seat.me .seat-avatar { width:52px!important;height:52px!important; }
/* Match the reserved original player grid on both mouse and touch devices.
   Legacy desktop .pk.xsm !important rules must not enlarge cards alone. */
html[data-cash-layout="stable"] #g-seats .seat:not(.me) .seat-holecards .pk { width:24px!important;height:34px!important; }
html[data-cash-layout="stable"] #g-seats .seat.seat-narrow:not(.me) .seat-holecards .pk { width:25px!important; }
html[data-cash-layout="stable"] #g-seats .seat .seat-plate {
  box-sizing:border-box!important;width:var(--plate-w)!important;height:var(--plate-h)!important;
  min-width:0!important;min-height:0!important;transform:none!important;scale:1!important;
}
/* An absent hand leaves its grid cells reserved, without exposing any cards. */
html[data-cash-layout="stable"] .seat-hole-placeholder > .pk { visibility:hidden; }
/* Lower portrait opponents keep the original side markers, including the
   overlap with a neighbouring avatar that the user explicitly prefers. */
html[data-cash-layout="stable"] #g-seats .seat.role-self-lower .seat-pucks { top:auto!important;bottom:0!important; }
html[data-cash-layout="stable"] #g-seats .seat.role-lower-right .seat-pucks {
  left:calc(100% + 6px)!important;right:auto!important;top:calc(100% + 6px)!important;bottom:auto!important;transform:none!important;
}
html[data-cash-layout="stable"] #g-seats .seat.open-side-r > .seat-open-strip,
html[data-cash-layout="stable"] #g-seats .seat.open-side-l > .seat-open-strip {
  width:80px;top:0;bottom:auto;left:auto;right:auto;
}
html[data-cash-layout="stable"] #g-seats .seat.open-side-r > .seat-open-strip { left:calc(100% + 8px);justify-content:flex-start; }
html[data-cash-layout="stable"] #g-seats .seat.open-side-l > .seat-open-strip { right:calc(100% + 8px);justify-content:flex-end; }
/* Betting has ended when this result is visible. Reuse that annotation band
   while keeping every player, card and winner frame exactly in place. */
html[data-cash-layout="stable"] .cash-layout-stage[data-result-visible] .seat.me .seat-self-strip,
html[data-cash-layout="stable"] .cash-layout-stage[data-result-visible] .seat.me .seat-winner-badge,
html[data-cash-layout="stable"] .cash-layout-stage[data-result-visible] .seat.me .seat-foot { visibility:hidden; }
/* Very long amounts scroll within their own annotation, without making an
   otherwise spacious table microscopic. Ordinary amounts keep their skin. */
html[data-cash-layout="stable"] .seat-bet-amount {
  max-width:58px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scrollbar-width:none;
  pointer-events:auto;touch-action:pan-x;overscroll-behavior:contain;
}
html[data-cash-layout="stable"] .seat-bet-amount::-webkit-scrollbar { display:none; }
/* A top portrait seat's bet already occupies the band just below its box. */
html[data-cash-layout="stable"] .seat.betside-b .seat-open-strip.below,
html[data-cash-layout="stable"] .seat.betside-b.winner-below .seat-winner-badge { top:calc(100% + 36px); }
html[data-cash-layout="stable"] #g-comm {
  position:absolute!important;left:var(--table-board-x)!important;top:var(--table-board-y)!important;
  width:var(--table-board-w)!important;height:var(--table-board-h)!important;display:flex!important;gap:calc(3px * var(--table-board-scale))!important;
  --comm-scale:var(--table-board-scale)!important;padding:0!important;margin:0!important;transform:none!important;translate:none!important;
}
html[data-cash-layout="stable"] #g-comm .pk { width:calc(46px * var(--table-board-scale))!important;height:calc(64px * var(--table-board-scale))!important;flex:0 0 calc(46px * var(--table-board-scale))!important; }
html[data-cash-layout="stable"] #g-potbar,
html[data-cash-layout="stable"] .cash-pot-piles {
  position:absolute!important;left:var(--table-pot-x)!important;top:var(--table-pot-y)!important;
  max-width:108px!important;box-sizing:border-box!important;overflow:auto;
  transform:translate(-50%,-50%)!important;translate:none!important;margin:0!important;
}
html[data-cash-layout="stable"] .cash-pot-piles {
  /* Keep the complete original row. Fit its measured contents into the free
     pot lane; a 108px scroll box clips side pots and its scrollbar covers text. */
  width:max-content!important;height:auto!important;max-width:none!important;
  display:flex;align-items:center;gap:6px!important;
  overflow:visible!important;justify-content:center!important;flex-wrap:nowrap!important;pointer-events:none;
  transform:translate(-50%,-50%) scale(var(--cash-pot-piles-scale,1))!important;transform-origin:50% 50%;
}
html[data-cash-layout="stable"] .cash-pot-pile { flex:none; }
html[data-cash-layout="stable"] #g-win-hand,
html[data-cash-layout="stable"] .replay-pot-label {
  position:absolute!important;left:var(--table-result-x)!important;top:var(--table-result-y)!important;
  width:max-content!important;max-width:var(--table-result-w)!important;max-height:var(--table-result-h)!important;
  box-sizing:border-box!important;margin:0!important;
  transform:translateX(-50%)!important;translate:none!important;white-space:var(--table-result-wrap)!important;overflow:auto!important;text-align:center!important;
}
html[data-cash-layout="stable"] .replay-board { position:static!important;transform:none!important; }
html[data-cash-layout="stable"] #g-win-hand { font-size:14px!important;line-height:18px!important;pointer-events:auto;touch-action:pan-x pan-y; }
