/* Table-first cleanup. Keep teaching and review tools behind explicit requests. */
body[data-screen=table][data-game-mode=practice] #event-strip,
body[data-screen=table] .mobile-challenge,
body[data-screen=table] #action-panel[hidden],
#table-view [hidden]{display:none!important}
body[data-screen=table] .game-toolbar{
 display:flex;height:auto;min-height:44px;gap:8px;padding:0 10px;
}
body[data-screen=table] .game-toolbar #room-label{
 flex:1;min-width:0;min-height:44px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
body[data-screen=table] .game-toolbar>div{
 display:flex;flex:0 1 auto;min-width:0;align-items:center;gap:8px;border:0;
}
body[data-screen=table] .game-toolbar button{min-height:44px}
body[data-screen=table] #table-mode{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-screen=table] .game-foot{justify-content:space-between}
body[data-screen=table] .game-foot #hand-label{display:block;margin-right:auto;font-size:12px;color:var(--muted)}
body[data-screen=table] .game-foot #table-help{flex:none;min-width:60px;min-height:44px}
body[data-screen=table] .actions{border:0;box-shadow:none;width:auto;flex:0 1 auto}
body[data-screen=table]:not(.menu-open) #action-panel[data-turn=you] .actions{outline:none;box-shadow:none;animation:none}
body[data-screen=table] .action-panel .hand-recap{width:100%;border:0;border-radius:0;padding:4px;background:transparent}
body[data-screen=table] .hand-recap .finish-buttons{display:flex;flex-direction:row;gap:8px;justify-content:flex-end;margin:0 0 12px}
body[data-screen=table] .hand-recap .finish-buttons button{min-height:44px}
body[data-screen=table] .hand-recap .recap-money{margin-top:8px}
body[data-screen=table] .hand-recap .recap-finish{color:var(--muted)}
body[data-screen=table] .pause-screen h2{font-size:var(--text-lg);margin:0}
body[data-screen=table] .pause-screen #resume{min-height:44px}
body[data-screen=table] .game:has(#pause-screen:not([hidden])) .table-action{visibility:hidden}
body[data-screen=table] footer{justify-content:center}
body[data-screen=table] footer>span:last-child{max-width:none;text-align:center;font-size:12px}
.table-help-menu{display:grid;gap:8px}
.table-help-menu button{min-height:44px;text-align:left}
.table-help-menu .sound-hint{margin:0 0 8px}
@media(max-width:600px) and (max-height:700px){
 /* The top seat already shows SB/BB beside its name. Its duplicate action
    caption otherwise intrudes into the pot label on short phones. */
 body[data-screen=table] .seat.seat-3 .seat-action{display:none}
}
@media(min-width:901px) and (min-height:651px) and (max-height:750px){
 /* A little extra felt height keeps the shared-card row clear of the
    player's cards in short desktop windows, while retaining visible actions. */
 body[data-screen=table] #table.stage{min-height:312px}
}
@media(max-width:700px){
 body[data-screen=table] .game-toolbar{padding-inline:6px;gap:4px}
 body[data-screen=table] .game-toolbar>div{gap:6px}
 body[data-screen=table] .game-toolbar button{font-size:12px;padding-inline:2px}
 body[data-screen=table] .game-toolbar #room-label .desktop-only{display:none}
 body[data-screen=table] #table-mode{max-width:110px}
 body[data-screen=table] #history,body[data-screen=table] #pause{min-width:44px}
 body[data-screen=table] .hand-recap .finish-buttons button{flex:1;min-width:0}
}
@media(min-width:601px) and (max-height:650px){
 body[data-screen=table] .game{grid-template-rows:44px 28px minmax(132px,1fr) 28px 44px}
 /* In short landscape windows, the full best-five comparison is in Review hand. */
 body[data-screen=table] .hand-recap .recap-hands{display:none}
 body[data-screen=table] .game:has(#table[data-phase=finished]) .hand-recap .finish-buttons{
  position:sticky;top:0;z-index:10;isolation:isolate;background:var(--surface);padding:6px 0;margin:0 0 8px;
 }
 body[data-screen=table] .game:has(#table[data-phase=finished]) .hand-recap .finish-buttons button{flex:1;min-width:0;padding-inline:5px;font-size:12px}
}
