/* Phone portrait: a tall table, readable seats and a separate detail sheet. */
[hidden]{display:none!important}
.table-access-note{font-size:12px;color:var(--muted);line-height:1.7;margin:8px 0 18px}
.upgrade-benefits{border:1px solid #557fa9;border-radius:14px;padding:18px;margin:20px 0;background:#11273e}
.upgrade-benefits p{line-height:1.9;margin-bottom:0}
.upgrade-continue{display:block;width:100%;min-height:48px;margin-top:12px;background:transparent;border:1px solid #52637b;border-radius:10px;color:inherit;font-size:14px}
#upgradeDialog{width:min(460px,calc(100vw - 24px));margin:auto;border:1px solid #506078;border-radius:20px;background:#0c192a;color:#edf5ff;padding:0;max-height:calc(100dvh - 24px);overflow:auto}
#upgradeDialog::backdrop{background:rgba(3,9,18,.78)}
@media(max-width:1100px) and (orientation:portrait){
  html.portrait #app.on{height:100dvh;min-height:0;overflow:hidden;flex-direction:column}
  html.portrait #left{height:100%;min-height:0;width:100%;padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));padding-top:calc(8px + env(safe-area-inset-top,0px))}
  html.portrait .topbar{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin-bottom:6px;flex-shrink:0}
  html.portrait .topbar .pill{grid-column:span 2;font-size:11px;text-align:center;padding:5px 2px;min-width:0}
  html.portrait #pillBlinds,html.portrait #tbMode,html.portrait .topbar .spacer{display:none!important}
  html.portrait .topbar .tb{min-height:44px;min-width:0;padding:5px 2px;font-size:12px;grid-column:span 1}
  html.portrait #btnMember,html.portrait #btnThink,html.portrait #btnPanel,html.portrait [data-solver-open]{grid-column:span 2}
  html.portrait #btnMember,html.portrait #btnThink,html.portrait #btnPanel{order:1}
  html.portrait .topbar .speedbox,html.portrait #btnSfx,html.portrait #btnRank,html.portrait #btnQuit{order:2}
  html.portrait .topbar .play-quota{order:3}
  html.portrait #btnRebuy,html.portrait .topbar [data-solver-open]{order:4;grid-column:span 3}
  html.portrait .topbar .bico{display:none}
  html.portrait #btnSfx .bico,html.portrait #btnRank .bico,html.portrait #btnQuit .bico{display:inline;font-size:17px;margin:0}
  html.portrait #btnRank .btxt,html.portrait #btnQuit .btxt{display:none}
  html.portrait .topbar .speedbox{grid-column:span 3;min-width:0;padding:6px;gap:4px;min-height:44px}
  html.portrait #speedRange{width:100%;min-width:24px;height:6px;flex:1}
  html.portrait #speedVal{font-size:10px;min-width:30px}
  html.portrait .topbar .play-quota{grid-column:1/-1;min-height:0;border:0;background:transparent;padding:0;text-align:center;font-size:11px;color:var(--muted)}
  html.portrait #tablewrap{min-height:250px;flex:1 1 0}
  html.portrait #table .rail,html.portrait #table .felt{border-radius:45% / 27%}
  html.portrait #centerZone{top:48%;width:76%;gap:8px}
  html.portrait #streetTag{font-size:11px;letter-spacing:.13em}
  html.portrait #potLine{font-size:13px;padding:4px 14px}
  html.portrait .seat{width:100px;padding:5px 6px;border-radius:12px}
  html.portrait .seat.hero{width:136px}
  html.portrait .seat .srow{flex-wrap:wrap;gap:3px}
  html.portrait .seat .sinfo{flex:1 1 0;min-width:0}
  html.portrait .seat .avatar{width:20px;height:20px}
  html.portrait .seat .sname{font-size:11px;max-width:60px}
  html.portrait .seat .sstack{font-size:12px;gap:3px}
  html.portrait .seat .sstack small{font-size:9px}
  html.portrait .seat .spos{font-size:9px;padding:1px 3px}
  html.portrait .seat .scards{width:100%;justify-content:center;margin-top:2px}
  html.portrait .seat.hero .sname{font-size:12px}
  html.portrait .seat .saction{font-size:10px;bottom:-9px}
  html.portrait #board .card{--cs:.74}
  html.portrait .seat.hero .card{--cs:1}
  html.portrait #posbar{margin-top:5px;padding:5px 7px;gap:7px;min-height:32px}
  html.portrait #myPosDesc{font-size:10px}
  html.portrait #controls{flex:0 0 auto;padding-top:6px}
  html.portrait #waitMsg{padding:9px 4px;font-size:12px;line-height:1.5;min-height:42px}
  html.portrait #actionBox .ctrlrow{display:flex;gap:6px}
  html.portrait #actionBox .act{flex:1;min-width:0;min-height:48px;font-size:15px;padding:10px 3px;border-radius:12px}
  html.portrait #sizeRow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-top:6px}
  html.portrait #sizeRow:not([style*="none"]){display:grid!important}
  html.portrait #sizeRow .qb{min-height:38px;min-width:0;padding:3px;font-size:11px}
  html.portrait #betSlider{grid-column:span 4;width:100%;min-width:0;margin:7px 0;height:8px}
  html.portrait #betVal{font-size:12px;min-width:0;text-align:right}
  html.portrait #handEndBar.on{display:grid;grid-template-columns:28px 1fr;gap:5px;padding:8px;border-radius:14px}
  html.portrait #heStats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;min-width:0}
  html.portrait #heStats .hs{min-width:0;padding:0}
  html.portrait #heStats .v{font-size:11px;white-space:nowrap}
  html.portrait #heStats .k{font-size:9px}
  html.portrait #heDesc{grid-column:1/-1;font-size:10px;text-align:center}
  html.portrait #handEndBar .spacer{display:none}
  html.portrait #nextBtn{grid-column:1/-1;width:100%;min-height:46px;font-size:15px}
  html.portrait #right{position:fixed;inset:auto 0 0;width:100%;height:78dvh;max-height:650px;z-index:80;transform:translateY(105%);transition:transform .2s ease;pointer-events:none;border:1px solid var(--grid);border-radius:20px 20px 0 0;box-shadow:0 -15px 60px #0008;padding-bottom:env(safe-area-inset-bottom,0px);flex:none}
  html.portrait #right.open{transform:translateY(0);pointer-events:auto}
  html.portrait #drawerHead{display:flex;min-height:54px;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--grid)}
  html.portrait #drawerClose{min-height:40px;margin-left:auto;font-size:13px}
  html.portrait #drawerNext{display:none;min-height:40px}
  html.portrait #right.hasnext #drawerNext{display:block}
  html.portrait #scrim.on{display:block;position:fixed;inset:0;background:#0007;z-index:79}
  html.portrait .tabs button{min-height:46px;padding:7px 3px;font-size:12px}
  html.portrait .panel{max-height:none;flex:1;min-height:0;overflow:auto;padding:14px 12px 24px;overscroll-behavior:contain}
  #setup{padding:14px 12px 24px}
  .home-caption{display:none}
  .home-intro{padding:18px 0 12px}
  .setup-inner h1{font-size:36px;margin-bottom:9px}
  .home-scene{top:-8px;opacity:.75}
  .home-capabilities{margin-top:10px}
  .home-match{padding:18px 14px}
  #setup .lvlcards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #setup .lvlcard{min-height:0;padding:11px 9px}
  #setup .lvname{font-size:13px}
  #setup .lvdesc{font-size:11px;line-height:1.65}
  #setup .opt,#setup .member-entry{min-height:44px}
  #setup .field{margin-bottom:14px}
  .home-divider{margin:14px 0}
  .home-header{flex-wrap:nowrap}
  .member-header-right{min-width:0;gap:6px;flex-wrap:wrap;justify-content:flex-end}
  #memberDialog{width:calc(100vw - 16px);max-width:none;max-height:calc(100dvh - 16px);margin:auto;border-radius:18px}
  #memberDialog .member-box,#upgradeDialog .member-box{padding:22px 18px}
  #memberDialog h2{font-size:24px}
  #memberDialog input{font-size:16px;min-height:48px}
  #memberDialog .member-close{min-width:44px;min-height:44px}
  #memberDialog .member-plans{gap:10px}
}
@media(max-width:1100px) and (orientation:portrait) and (max-height:690px){
  html.portrait #app.on{overflow-y:auto;overscroll-behavior:contain}
  html.portrait #left{height:auto;min-height:740px}
  html.portrait #tablewrap{min-height:380px}
  html.portrait #controls{position:sticky;bottom:0;z-index:12;background:var(--page);padding-top:8px;border-top:1px solid var(--grid)}
  html.portrait .seat{width:92px;padding:3px 5px}
  html.portrait .seat.hero{width:118px}
  html.portrait .seat .avatar{display:none}
  html.portrait .seat.hero .card{--cs:.85}
  html.portrait .topbar{gap:4px}
  html.portrait #left{padding:5px}
  html.portrait #myPosDesc{display:none}
}
@media(prefers-reduced-motion:reduce){#right{transition:none!important}}

/* Settlement stays inside each seat, in normal flow below its hole cards. */
#btnTools{display:none}
.seat-outcome:empty{display:none}
.seat .wintag{display:block;position:static;transform:none;animation:none;box-shadow:none;
  padding:2px 3px;margin-top:4px;border-radius:5px;font-size:11px;text-align:center;line-height:17px}
.seat.winner{border-color:var(--gold);box-shadow:0 0 0 1px #eab23444,0 4px 16px #0005}
.seat-hand{font-size:10px;color:#c5d6e5;text-align:center;line-height:16px;margin-top:2px}
#reviewPeek{width:100%;min-height:44px;background:#152c44;border:1px solid #4a789e;border-radius:10px;color:#b8dcff;font:inherit;font-size:12px;margin-bottom:6px;cursor:pointer}

@media(max-width:1100px) and (orientation:portrait){
  html.portrait #app.on{overflow-y:auto;overscroll-behavior-y:contain;scrollbar-width:none}
  html.portrait #left{height:auto;min-height:100dvh;flex:1 0 auto;padding:6px 8px calc(10px + env(safe-area-inset-bottom,0px))}
  html.portrait .topbar{grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin-bottom:6px}
  html.portrait .topbar .pill{font-size:11px;padding:4px 1px;border-radius:8px;order:0}
  html.portrait #btnMember,html.portrait #btnPanel,html.portrait #btnTools{grid-column:span 2;order:1;min-height:44px;font-size:12px}
  html.portrait #btnTools{display:block;background:#17293c;border-color:#344c63}
  html.portrait #btnTools[aria-expanded="true"]{color:#c1e0ff;border-color:#75abdc}
  html.portrait .topbar .play-quota{order:2;font-size:10px;line-height:16px}
  html.portrait .topbar #btnThink,html.portrait .topbar .speedbox,html.portrait .topbar #btnSfx,
  html.portrait .topbar #btnRank,html.portrait .topbar #btnQuit,html.portrait .topbar [data-solver-open]{display:none}
  html.portrait .topbar.tools-open #btnThink,html.portrait .topbar.tools-open #btnSfx,
  html.portrait .topbar.tools-open #btnRank,html.portrait .topbar.tools-open #btnQuit,
  html.portrait .topbar.tools-open [data-solver-open]{display:block;order:3}
  html.portrait .topbar.tools-open .speedbox{display:flex;order:3;grid-column:span 3}
  html.portrait .topbar #btnThink{grid-column:span 3}
  html.portrait .topbar #btnRebuy{order:4;grid-column:1/-1;min-height:44px}
  html.portrait #speedRange{height:32px;background:transparent;touch-action:pan-y}
  html.portrait #tablewrap{flex:1 0 410px;min-height:410px}
  html.portrait[data-players="7"] #tablewrap,html.portrait[data-players="8"] #tablewrap{flex-basis:540px;min-height:540px}
  html.portrait #centerZone{top:48%;gap:5px;width:78%;display:grid;grid-template-columns:auto auto;justify-content:center}
  html.portrait[data-players="8"] #centerZone{top:59%}
  html.portrait[data-players="7"] #centerZone{top:57%}
  html.portrait[data-players="4"] #centerZone{top:64%}
  html.portrait #board{grid-column:1/-1;grid-row:1;gap:4px;min-height:39px}
  html.portrait #board .card{--cs:.64}
  html.portrait #streetTag{font-size:10px;letter-spacing:.05em;align-self:center}
  html.portrait #potLine{font-size:12px;padding:3px 8px;white-space:nowrap}
  html.portrait .seat{width:104px;padding:5px 5px 3px;border-radius:10px;backdrop-filter:none}
  html.portrait .seat.hero{width:134px}
  html.portrait .seat .avatar{display:none}
  html.portrait .seat .sname{font-size:11px;max-width:94px}
  html.portrait .seat .sinfo{text-align:center}
  html.portrait .seat .sstack{justify-content:center;font-size:12px;line-height:18px}
  html.portrait .seat .scards{min-height:43px;margin:3px 0 0;gap:4px}
  html.portrait .seat .card.sm{--cs:1;width:30px;height:42px}
  html.portrait .seat .card.sm .r{font-size:16px}
  html.portrait .seat .card.sm .s{font-size:13px}
  html.portrait .seat.hero .card{--cs:1}
  html.portrait .seat-outcome,html.portrait .seat-outcome:empty{display:block;min-height:20px}
  html.portrait .seat .wintag{margin:2px 0 0;line-height:17px;padding:0;font-size:10px;border-radius:4px;white-space:nowrap}
  html.portrait .seat-hand{margin:0;font-size:10px;line-height:14px;min-height:14px}
  html.portrait .seat .saction{font-size:10px;bottom:auto;top:100%;max-width:110px;white-space:nowrap;line-height:17px;padding:0 5px}
  html.portrait .seat.winner .saction{display:none}
  html.portrait .dbtn{width:18px;height:18px;font-size:11px;pointer-events:none}
  html.portrait #posbar{min-height:28px;margin-top:4px;padding:3px 6px}
  html.portrait #myPosDesc{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  html.portrait #controls{position:relative;bottom:auto;z-index:auto;min-height:0;padding-top:4px;margin-top:4px;border:0}
  html.portrait #actionBox .act{min-height:50px;font-size:14px;line-height:1.35;touch-action:manipulation}
  html.portrait #sizeRow .qb{min-height:44px;font-size:11px;touch-action:manipulation}
  html.portrait #betSlider{height:32px;margin:0;background:transparent;touch-action:pan-y}
  html.portrait #betVal{font-size:13px;align-self:center}
  html.portrait #handEndBar.on{padding:8px;gap:7px}
  html.portrait #heStats .v{font-size:12px}
  html.portrait #heStats .k{font-size:9px;line-height:16px}
  html.portrait #nextBtn{min-height:48px;font-size:15px;padding:10px;touch-action:manipulation}
  html.portrait #right{visibility:hidden;transform:translateY(105%);height:min(78dvh,650px);overflow:hidden}
  html.portrait #right.open{visibility:visible;transform:none}
  html.portrait #drawerHead{min-height:56px;flex-shrink:0}
  html.portrait #drawerClose,html.portrait #drawerNext{min-height:44px;padding:8px 12px;border:1px solid #425b74;border-radius:9px;background:#18314a;color:#e7f2ff;font-size:12px}
  html.portrait .table-wallet-notice{padding:7px 9px;gap:6px;margin-bottom:6px}
  html.portrait .table-wallet-notice p{font-size:11px;line-height:1.55}
}
@media(max-width:360px) and (orientation:portrait){
  html.portrait .seat{width:88px}
  html.portrait .seat.hero{width:118px}
  html.portrait .seat .sname{max-width:78px;font-size:10px}
  html.portrait #board .card{--cs:.56}
  html.portrait #board{gap:3px}
  html.portrait #heStats .v{font-size:10px}
  html.portrait #heStats .k{font-size:8px}
}
