/* D: the capture-state geometry (board height, hand 525/540, message 677) is used in every in-play state, so nothing moves when the played-card box appears. Outcome screen unchanged. */
html body .compact-basra .game:not(.zz):not(.zz){height:calc(100dvh - 44px)!important;min-height:730px!important}
html body .compact-basra .game:not(:has(.table-outcome)) .hand-header{top:525px!important}
html body .compact-basra .game:not(:has(.table-outcome)) .round-cards:not(.table-round){top:540px!important}
html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-instruction.essential,html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-error{top:677px!important}
/* short phones: tighter stack so board, hand and message fit; played box overlaps the empty lower band of the table row, not cards */
@media (max-height:780px){
 html body .compact-basra .game:not(.zz):not(.zz){min-height:0!important}
 body .compact-basra .game:not(:has(.table-outcome)) .table-stage .table-round .played-move{top:calc(100% - 56px)!important}
 html body .compact-basra .game:not(:has(.table-outcome)) .hand-header{top:482px!important}
 html body .compact-basra .game:not(:has(.table-outcome)) .round-cards:not(.table-round){top:497px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-instruction.essential,html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-error{top:622px!important}
}
@media (max-height:700px){
 body .compact-basra .game:not(:has(.table-outcome)) .table-stage .table-round .played-move{top:calc(100% - 74px)!important}
 html body .compact-basra .game:not(:has(.table-outcome)) .hand-header{top:454px!important}
 html body .compact-basra .game:not(:has(.table-outcome)) .round-cards:not(.table-round){top:468px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-instruction.essential,html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-error{top:598px!important}
}
@media (max-height:660px){
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .table-stage .table-round .played-move{width:104px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .hand-header{top:446px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-cards:not(.table-round){top:459px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-instruction.essential,html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-error{top:576px!important;max-width:92%!important;white-space:nowrap}
}
@media (max-height:620px){
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .table-stage .table-round{top:118px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .table-stage .table-round .played-move{top:calc(100% - 72px)!important;width:96px!important;padding:3px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .playing-card{width:46px!important;min-width:46px!important;height:69px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .corner{font-size:18px!important;line-height:17px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .corner small{font-size:12px!important;line-height:12px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .pip{font-size:23px!important;line-height:24px!important;top:28px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .hand-header{top:var(--hh,364px)!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-cards:not(.table-round){top:var(--hc,380px)!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-cards:not(.table-round) .playing-card{width:50px!important;min-width:50px!important;height:75px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-cards:not(.table-round) .corner{font-size:18px!important;line-height:17px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-cards:not(.table-round) .corner small{font-size:12px!important;line-height:12px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-cards:not(.table-round) .pip{font-size:24px!important;line-height:25px!important;top:30px!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-instruction.essential,html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .round-error{top:var(--mt,459px)!important;max-width:62%!important;white-space:normal!important;text-align:center;line-height:14px;transform:translate(-50%,0)!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move>small{display:none!important}
 html body .compact-basra .game:not(:has(.table-outcome)):not(.zz):has(.opening-countdown) .table-stage .table-round{top:184px!important}
 html body .compact-basra .game.game.game:not(:has(.table-outcome)):not(.zz) .last-deal-notice.last-deal-notice{top:34px!important;left:62px!important;right:auto!important;transform:none!important;font-size:13px!important;padding:0 14px!important;line-height:18px!important;height:18px!important}
}
/* opening countdown: lift above the table cards (no overlap) */
html body .compact-basra .game:not(.zz) .opening-countdown{top:-8px!important}
#computer-dealer-label{position:fixed;z-index:6;direction:rtl;background:#fbf3e3;border:1px solid #9c4224;color:#3d2616;border-radius:11px;padding:0 10px;height:20px;line-height:18px;font:700 12px/18px Arial,sans-serif;white-space:nowrap;pointer-events:none;box-sizing:border-box}
#computer-dealer-label[hidden]{display:none}
@media (max-height:620px){html[data-dealer-pos=high] body .compact-basra .game.game.game:not(:has(.table-outcome)):not(.zz) .last-deal-notice.last-deal-notice{top:34px!important;left:205px!important}}

/* short phones (<=620px high): thrown card beside the hand, table row clear of the score panel */
@media (max-height:620px){html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .table-round .played-move{position:fixed!important;top:var(--hc,380px)!important;left:243px!important;right:auto!important;bottom:auto!important;transform:none!important;width:50px!important;padding:2px!important}}
@media (max-height:620px){html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz):not(:has(.opening-countdown)) .table-stage .table-round{top:160px!important}}

/* computer, 621-700px high: thrown card beside the hand, not over its labels */
@media (min-height:621px) and (max-height:660px){
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .table-round .played-move{position:fixed!important;top:459px!important;left:calc(50% + 98px)!important;right:auto!important;bottom:auto!important;transform:none!important;width:50px!important;padding:2px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .playing-card{width:46px!important;min-width:46px!important;height:69px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .corner{font-size:18px!important;line-height:17px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .corner small{font-size:12px!important;line-height:12px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .pip{font-size:23px!important;line-height:24px!important;top:28px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move>small{display:none!important}
}
@media (min-height:661px) and (max-height:700px){
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .table-round .played-move{position:fixed!important;top:468px!important;left:calc(50% + 98px)!important;right:auto!important;bottom:auto!important;transform:none!important;width:50px!important;padding:2px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .playing-card{width:46px!important;min-width:46px!important;height:69px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .corner{font-size:18px!important;line-height:17px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .corner small{font-size:12px!important;line-height:12px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move .pip{font-size:23px!important;line-height:24px!important;top:28px!important}
html body .compact-basra.compact-basra .game.game:not(:has(.table-outcome)):not(.zz) .table-stage .played-move>small{display:none!important}
}
/* "סיבוב אחרון" fix: the pill keeps its original centered position. While it shows, the table
   zone gets a top pad so its first row starts exactly where a one-row table already sat (y258 on
   phones), and the zone grows downward: wrapped rows appear BELOW the first row instead of the
   group re-centering upward under the label. 1-row tables and empty tables do not move at all.
   No card-count conditions: works identically at any width and any table size. 11+ cards shrink
   so 3 rows still fit; the table fitter scales anything beyond that inside the padded zone.
   <=620px-high phones keep the small-chip layout (no overlap there). */
@media (max-width:767px) and (min-height:621px) and (max-height:660px){
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .table-round{align-content:flex-start!important;row-gap:0!important;padding-top:63px!important;height:255px!important;overflow:visible!important}
}
@media (min-height:661px){
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .table-round{align-content:flex-start!important;row-gap:0!important;padding-top:73px!important;height:270px!important;overflow:visible!important}
}
@media (min-width:768px) and (max-width:899px) and (min-height:661px){
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .table-round{height:300px!important}
}
/* 701px+ phones: the thrown-card box sits inside the zone's lower area, where the anchored second
   row now is; move it to the right side (same pattern as the shipped 621-700px design), pill time only */
@media (min-height:701px) and (max-width:767px){
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .table-round .played-move{position:fixed!important;top:446px!important;left:calc(50% + 112px)!important;right:auto!important;bottom:auto!important;transform:none!important;width:50px!important;padding:2px!important}
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .played-move .playing-card{width:46px!important;min-width:46px!important;height:69px!important}
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .played-move .corner{font-size:18px!important;line-height:17px!important}
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .played-move .corner small{font-size:12px!important;line-height:12px!important}
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .played-move .pip{font-size:23px!important;line-height:24px!important;top:28px!important}
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .played-move>small{display:none!important}
}
/* same fix, 11+ cards on the table: smaller table cards so 3 rows stay below the pill */
@media (min-height:621px){
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .table-round:has(> .playing-card:nth-child(11 of .playing-card)) > .playing-card{width:40px!important;min-width:40px!important;height:60px!important}
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .table-round:has(> .playing-card:nth-child(11 of .playing-card)) > .playing-card .corner{font-size:15px!important;line-height:14px!important}
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .table-round:has(> .playing-card:nth-child(11 of .playing-card)) > .playing-card .corner small{font-size:11px!important;line-height:11px!important}
 html body .compact-basra .game.game:not(:has(.table-outcome)):not(.zz):has(.last-deal-notice) .table-stage .table-round:has(> .playing-card:nth-child(11 of .playing-card)) > .playing-card .pip{font-size:20px!important;line-height:21px!important;top:22px!important}
}

/* Final-card delay fix: on <=700px-high phones the thrown-card box
   (.played-move) by design overlaps the hand-row area, and the empty, fully transparent
   .round-cards hand row paints ABOVE it (the row's stacking beats the box: the box lives inside
   .table-round's z-index:2 context, so lifting the box's own z-index cannot fix it - verified).
   The client's visible-card acknowledgement samples the card with elementFromPoint; the
   transparent row wins the hit test, the "rendered" ack never fires, and the server falls back to
   its ~8s timeout on the final card(s) of the last round. The card is visibly on screen the whole
   time: a hit-testing bug, not a position bug. The row container itself has no interactive role
   (only the card buttons inside it are clicked), so exclude IT alone from hit testing and keep
   the cards clickable. No position, size, paint-order or layout change; applies at every height. */
html body .compact-basra .game:not(.zz) .round-cards:not(.table-round){pointer-events:none!important}
html body .compact-basra .game:not(.zz) .round-cards:not(.table-round) > .playing-card{pointer-events:auto!important}
