/* The portrait play surface uses the phone's visible height instead of reserving
   off-table space for a closed bet editor. Short phones can scroll the editor. */
@media (max-width:600px) and (orientation:portrait){
  body[data-screen=game]{-webkit-text-size-adjust:100%;text-size-adjust:100%}
  body[data-screen=game] .site-header{min-height:48px}
  body[data-screen=game] .header-tools{min-width:0}
  .game{
    --layout-top:56px;
    --editor-room:0px;
    --scene-gap:13px;
    --scene-bottom:7px;
    --surface-height:clamp(300px,calc(100svh - 246px),calc(var(--surface)*1.50));
    --felt-seat:calc(var(--surface)*.263);
    --seat-height:clamp(33px,calc(var(--surface)*.106),48px);
    --card-width:calc(var(--surface)*.132);
    --rack-inset:10px;
  }
  .game .poker-tools{top:5px;gap:2px}
  .game .poker-tools>.btn{font-size:10px;min-height:40px;padding:2px 5px}
  .game .table-meta{top:10px;gap:1px;white-space:nowrap}
  .game .table-meta .meta-blinds{font-size:clamp(12px,3.2vw,16px)}
  .game .table-meta .meta-count{font-size:10px}
  .game .table[data-phase]::before{
    inset:9% 10.6% 8.5%;
    border-radius:23% / 15%;
    background:var(--felt-grain) center / 150px 150px,radial-gradient(ellipse at 50% 44%,#3d9d68 0%,#32895b 68%,#276c4a 100%);
    background-blend-mode:soft-light,normal;
  }
  .game .table[data-phase]{--board-y:50%}
  .game .table[data-phase] .board-cards{gap:calc(var(--surface)*.011)}
  .game .table[data-phase] .settled-pot{display:none}
  .game .table[data-phase] .seat[data-seat]{--occupied-h:var(--seat-height)}
  .game .table[data-phase] .seat[data-seat] .seat-identity{padding:2px 6px}
  .game .table[data-phase] .seat[data-seat] .seat-money{width:100%;flex-wrap:nowrap;align-items:center;gap:3px}
  .game .table[data-phase] .seat[data-seat] .stack{min-width:0;max-width:100%;white-space:nowrap;overflow-wrap:normal;overflow:hidden;text-overflow:ellipsis}
  .game .table[data-phase] .seat[data-seat] .seat-award{flex:0 1 auto;max-width:none;box-shadow:none}
  .game .table[data-phase] .seat[data-seat] .seat-status{flex:none;white-space:nowrap}
  .game .table[data-phase] .seat[data-seat] .dealer-mark{right:1px;bottom:-7px}
  .game .table[data-phase] .seat.vacant{padding-block:1px}
  .game .table[data-phase] .seat.vacant .vacant-label{font-size:10px;letter-spacing:.1em;text-indent:0}
  .game .table[data-phase] .seat.vacant .vacant-index{font-size:11px;top:7px;left:7px}
  .game .table[data-phase][data-seat-layout="6"] :is(.seat,.seat-wager).pos0{--seat-x:50%;--seat-y:90%;--wager-x:50%;--wager-y:64%}
  .game .table[data-phase][data-seat-layout="6"] :is(.seat,.seat-wager).pos3{--seat-x:50%;--seat-y:6%;--wager-x:50%;--wager-y:25%}
  .game .table[data-phase][data-seat-layout="6"] :is(.seat,.seat-wager):is(.pos1,.pos2){--seat-x:15%;--wager-x:34%}
  .game .table[data-phase][data-seat-layout="6"] :is(.seat,.seat-wager):is(.pos4,.pos5){--seat-x:85%;--wager-x:66%}
  .game .table[data-phase][data-seat-layout="6"] :is(.seat,.seat-wager):is(.pos2,.pos4){--seat-y:23%;--wager-y:31%}
  .game .table[data-phase][data-seat-layout="6"] :is(.seat,.seat-wager):is(.pos1,.pos5){--seat-y:70%;--wager-y:71%}
  .game .table[data-phase][data-seat-layout="6"] .seat[data-seat]:is(.pos2,.pos4) .pocket{
    inset:auto auto calc(100% + 2px) 50%;transform:translateX(-50%);
    --felt-pocket:clamp(24px,calc(var(--surface)*.093),46px);
  }
  .game .table[data-phase][data-seat-layout="6"] .seat[data-seat].pos0 .pocket{
    inset:auto auto calc(100% + 3px) 50%;transform:translateX(-50%);
    --felt-pocket:clamp(30px,calc(var(--surface)*.109),50px);
  }
  .game .table[data-phase][data-seat-layout="6"] .seat[data-seat].pos0 .seat-combo{right:3px;translate:0 -80%}
  .game .table[data-phase][data-seat-layout="6"] .seat[data-seat].pos3 .pocket{--felt-pocket:clamp(23px,calc(var(--surface)*.080),37px)}
  .game .table[data-phase] .seat[data-seat] .seat-combo{max-width:calc(100% - 3px);white-space:nowrap}
  .game .controls:not(.turn-rack){justify-self:center;justify-items:center;width:min(100%,var(--rack-width));padding-inline:10px;gap:4px}
  .game .controls:not(.turn-rack) .decision-heading{justify-content:center;text-align:center}
  .game .controls:not(.turn-rack) .action-row{justify-content:center}
  .game .controls .hand-breakdown{margin-top:2px}
  .game .turn-rack .action-row{grid-row:1}
  .game .controls.turn-rack .bet-editor{
    position:relative;inset:auto;transform:none;grid-row:2;margin:0;justify-self:center;
  }
  .pd-dock .pd-bar{width:min(100%,360px);margin-inline:auto;gap:6px}
  .pd-dock .pd-bar .pd-button{flex:1;min-height:42px}
  .pd-dock .pd-preview{width:min(100%,360px);margin-inline:auto}
}
