/* POKERZIN MOBILE V3.1 — SINGLE GEOMETRY OWNER
   The game is composed of three independent, viewport-bound regions:
   header / table-stage / action dock. No game logic or wallet changes. */
@media (max-width:900px) and (orientation:portrait), (max-height:600px) and (orientation:landscape) {
 html body #game[data-match-type="poker"] {
  --pk-top:env(safe-area-inset-top,0px);
  --pk-bottom:env(safe-area-inset-bottom,0px);
  --pk-left:env(safe-area-inset-left,0px);
  --pk-right:env(safe-area-inset-right,0px);
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:var(--pk-header) minmax(0,1fr) var(--pk-dock)!important;
  width:100%!important;max-width:100vw!important;height:100dvh!important;
  min-height:0!important;margin:0!important;padding:0!important;
  box-sizing:border-box;overflow:hidden!important;overscroll-behavior:contain;
  background:#051f19!important;
 }
 html body #game[data-match-type="poker"].hidden {display:none!important;}
 html body #game[data-match-type="poker"] #scoreboard {display:none!important;}
 html body #game[data-match-type="poker"] #poker-board,
 html body #game[data-match-type="poker"] #poker-seats,
 html body #game[data-match-type="poker"] .plastic-table {display:contents!important;}
 html body #game[data-match-type="poker"] .table-shell,
 html body #game[data-match-type="poker"] .molded-line,
 html body #game[data-match-type="poker"] .plastic-table::before,
 html body #game[data-match-type="poker"] .plastic-table::after,
 html body #game[data-match-type="poker"] .actions {display:none!important;}
 html body #game[data-match-type="poker"] #poker-actions.hidden,
 html body #game[data-match-type="poker"] #poker-board.hidden,
 html body #game[data-match-type="poker"] #poker-showdown.hidden,
 html body #game[data-match-type="poker"] #match-result.hidden,
 html body #game[data-match-type="poker"] #hand.hidden {display:none!important;}
 /* Header owns its actual safe-area height; no table elements may enter it. */
 html body #game[data-match-type="poker"] .topbar {
  grid-area:1/1!important;position:relative!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:minmax(20px,1fr) minmax(20px,1fr)!important;
  align-items:center!important;gap:0 6px!important;
  height:100%!important;min-height:0!important;width:100%!important;
  box-sizing:border-box;overflow:hidden!important;
  margin:0!important;
  padding:calc(3px + var(--pk-top)) calc(8px + var(--pk-right)) 3px
          calc(52px + var(--pk-left))!important;
  background:#09261f!important;
 }
 html body #game[data-match-type="poker"] .game-menu-wrap{
  top:calc(3px + var(--pk-top))!important;
  left:calc(5px + var(--pk-left))!important;
  z-index:120!important;
 }
 html body #game[data-match-type="poker"] #game-menu-toggle{
  width:40px!important;height:40px!important;min-height:40px!important;
  padding:6px!important;
 }
 html body #game[data-match-type="poker"] #game-menu{
  overflow-y:auto;max-height:calc(100dvh - 58px);
  max-width:calc(100vw - 20px);
 }
 html body #game[data-match-type="poker"] .topbar > div:first-child{
  grid-area:1/1/3/2!important;min-width:0!important;
  display:flex!important;flex-direction:column;justify-content:center;
  overflow:hidden;gap:1px!important;
 }
 html body #game[data-match-type="poker"] #mode-label{
  font-size:clamp(11px,3vw,14px)!important;line-height:1.12!important;
  display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 }
 html body #game[data-match-type="poker"] .topbar > div:first-child > span{
  font-size:10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 }
 html body #game[data-match-type="poker"] .topbar > div:nth-child(2){display:contents!important;}
 html body #game[data-match-type="poker"] .game-wallet{
  grid-area:1/2!important;justify-self:end!important;align-self:center;
  display:flex!important;align-items:center;gap:3px;white-space:nowrap;
  font-size:clamp(10px,2.9vw,13px)!important;
 }
 html body #game[data-match-type="poker"] #online-badge{
  grid-area:2/2!important;justify-self:end!important;align-self:center;
  min-height:23px!important;padding:3px 7px!important;
  font-size:10px!important;white-space:nowrap;
 }
 html body #game[data-match-type="poker"] .topbar > #poker-premium-switch,
 html body #game[data-match-type="poker"] .topbar > #poker-cosmetics-toggle{
  display:none!important;
 }
 /* Stage is a full-width canvas of real, non-overlapping grid cells. */
 html body #game[data-match-type="poker"] .table-wrap,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .table-wrap{
  --pk-seat:0px;--pk-guide:0px;--pk-row:0px;
  position:relative!important;grid-area:2/1!important;
  display:grid!important;grid-template-columns:var(--pk-cols)!important;
  grid-template-rows:var(--pk-rows)!important;
  align-items:center!important;justify-items:stretch!important;
  row-gap:1px!important;column-gap:3px!important;
  height:100%!important;min-height:0!important;
  width:100%!important;max-width:none!important;
  padding:2px calc(5px + var(--pk-right)) 2px calc(5px + var(--pk-left))!important;
  margin:0!important;overflow:hidden!important;box-sizing:border-box;
 }
 html body #game[data-match-type="poker"] .table-wrap::before,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .table-wrap::before{
  position:relative!important;content:'';pointer-events:none;
  grid-area:var(--pk-table-area)!important;
  align-self:stretch!important;justify-self:stretch!important;
  margin:0!important;transform:none!important;
  min-width:0!important;min-height:0!important;
  box-shadow:none!important;border:0!important;
  background-size:contain!important;
  background-repeat:no-repeat!important;background-position:center!important;
  filter:drop-shadow(0 8px 12px #0007);
  z-index:0;
 }
 /* Seat panels: two textual lines and dedicated card row. Never clip vertically. */
 html body #game[data-match-type="poker"] .poker-seat,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat{
  position:relative!important;inset:auto!important;transform:none!important;
  display:grid!important;
  grid-template-columns:24px minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr) 15px!important;
  align-items:center!important;align-content:center!important;
  gap:1px 4px!important;
  height:var(--pk-seat-h)!important;min-height:0!important;
  width:100%!important;min-width:0!important;max-width:var(--pk-seat-w)!important;
  margin:0!important;padding:4px!important;box-sizing:border-box;
  justify-self:center!important;align-self:center!important;
  border-radius:12px!important;z-index:3;
 }
 html body #game[data-match-type="poker"] .poker-seat .avatar{
  width:24px!important;height:24px!important;
  grid-row:1!important;min-height:0!important;
 }
 html body #game[data-match-type="poker"] .poker-seat > div:not(.poker-card-backs){
  min-width:0!important;width:100%!important;min-height:0!important;overflow:hidden!important;
  display:flex!important;flex-direction:column;justify-content:center!important;
  align-items:stretch!important;gap:0!important;line-height:1.05!important;
 }
 html body #game[data-match-type="poker"] .poker-seat strong{
  display:block!important;max-width:100%;
  font-size:10px!important;line-height:1.05!important;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 }
 html body #game[data-match-type="poker"] .poker-seat small{
  display:block!important;max-width:100%;
  font-size:9px!important;line-height:1.05!important;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 }
 html body #game[data-match-type="poker"] .poker-seat .seat-balance{
  display:flex!important;align-items:center;gap:2px;
  font-size:10px!important;line-height:1.05!important;
  white-space:nowrap;
 }
 html body #game[data-match-type="poker"] .poker-seat .seat-balance::before{
  width:12px!important;height:10px!important;margin-right:2px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .trucuzin-coin{
  width:11px!important;height:11px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-card-backs{
  display:flex!important;grid-column:1/-1!important;grid-row:2!important;
  justify-content:center!important;align-items:center!important;
  min-height:0!important;height:15px!important;
  gap:2px!important;margin:0!important;overflow:visible!important;
 }
 html body #game[data-match-type="poker"] .poker-card-backs i,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-card-backs i{
  width:12px!important;height:16px!important;
  border-width:1px!important;flex:0 0 auto!important;
 }
 html body #game[data-match-type="poker"] .poker-seat-empty,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat-empty{
  width:29px!important;max-width:29px!important;height:22px!important;
  padding:0!important;min-height:0!important;opacity:.2!important;
  pointer-events:none;
 }
 html body #game[data-match-type="poker"] .poker-seat-empty small{display:none!important;}
 html body #game[data-match-type="poker"] .poker-seat-clock{
  right:0!important;top:-8px!important;font-size:9px!important;
 }
 html body #game[data-match-type="poker"] .poker-pot-panel,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-pot-panel{
  grid-area:var(--pk-pot-area)!important;position:relative!important;
  justify-self:center!important;align-self:center!important;
  min-width:0!important;max-width:min(132px,100%)!important;
  padding:2px 7px!important;margin:0!important;z-index:2!important;
  border-radius:12px!important;
 }
 html body #game[data-match-type="poker"] .poker-pot-panel::before{display:none!important;}
 html body #game[data-match-type="poker"] #poker-pot{
  font-size:16px!important;line-height:1.05!important;
 }
 html body #game[data-match-type="poker"] #poker-street,
 html body #game[data-match-type="poker"] #poker-blinds{
  font-size:9px!important;line-height:1.05!important;
 }
 html body #game[data-match-type="poker"] #poker-community,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #poker-community{
  grid-area:var(--pk-community-area)!important;
  position:relative!important;inset:auto!important;
  align-self:center!important;justify-self:center!important;
  display:flex!important;align-items:center;justify-content:center;
  gap:3px!important;min-width:0!important;max-width:100%!important;
  width:100%!important;height:auto!important;
  margin:0!important;padding:0!important;transform:none!important;z-index:2!important;
 }
 html body #game[data-match-type="poker"] #poker-community .table-card{
  width:var(--pk-card)!important;height:calc(var(--pk-card)*1.4)!important;
  flex:0 1 var(--pk-card)!important;min-width:0!important;
 }
 html body #game[data-match-type="poker"] #hand,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #hand{
  grid-area:var(--pk-hand-area)!important;position:relative!important;inset:auto!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  align-self:center!important;justify-self:center!important;
  gap:5px!important;width:auto!important;max-width:100%!important;
  margin:0!important;padding:0!important;transform:none!important;z-index:4!important;
  pointer-events:none;
 }
 html body #game[data-match-type="poker"] #hand .card{
  position:relative!important;inset:auto!important;
  flex:0 0 auto!important;
  width:var(--pk-own)!important;height:calc(var(--pk-own)*1.4)!important;
  margin:0!important;transform:none!important;
 }
 html body #game[data-match-type="poker"] #me,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #me{
  grid-area:var(--pk-hero-area)!important;position:relative!important;inset:auto!important;
  display:grid!important;grid-template-columns:28px minmax(0,1fr)!important;
  width:min(100%,var(--pk-hero-w))!important;max-width:var(--pk-hero-w)!important;
  min-width:0!important;height:var(--pk-hero-h)!important;min-height:0!important;
  margin:0!important;padding:4px 7px!important;box-sizing:border-box;
  transform:none!important;align-self:center!important;justify-self:center!important;
  border-radius:26px!important;z-index:3!important;
 }
 html body #game[data-match-type="poker"] #my-avatar-image{
  width:28px!important;height:28px!important;
 }
 html body #game[data-match-type="poker"] #me > div{
  display:flex!important;min-width:0!important;
  flex-direction:column;justify-content:center;gap:1px!important;
 }
 html body #game[data-match-type="poker"] #my-name{
  font-size:11px!important;line-height:1.1!important;
  max-width:100%!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 }
 html body #game[data-match-type="poker"] #turn-status,
 html body #game[data-match-type="poker"] #poker-turn-clock{
  font-size:9px!important;line-height:1.1!important;
 }
 html body #game[data-match-type="poker"] #me .seat-balance{
  font-size:10px!important;
 }
 html body #game[data-match-type="poker"] #me{
  grid-template-rows:minmax(0,1fr) 12px!important;
  align-content:center!important;
 }
 html body #game[data-match-type="poker"] #me #poker-turn-clock{
  grid-column:1/-1!important;grid-row:2!important;align-self:center!important;
  font-size:9px!important;text-align:center;white-space:nowrap;
 }

 html body #game[data-match-type="poker"] #message{
  position:relative!important;inset:auto!important;
  grid-area:var(--pk-message-area)!important;font-size:10px!important;
  margin:0!important;padding:0!important;pointer-events:none;
  align-self:center!important;justify-self:center!important;
  max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  z-index:5;text-align:center;
 }
 /* Betting HUD is physically outside the stage grid. */
 html body #game[data-match-type="poker"] #poker-action-dock{
  grid-area:3/1!important;display:flex!important;min-width:0!important;
  width:100%!important;height:100%!important;box-sizing:border-box;
  padding:3px calc(5px + var(--pk-right)) calc(4px + var(--pk-bottom)) calc(5px + var(--pk-left))!important;
  background:#061a15!important;
  z-index:12!important;
 }
 html body #game[data-match-type="poker"] #poker-action-dock #poker-actions,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #poker-action-dock #poker-actions{
  position:relative!important;inset:auto!important;transform:none!important;
  width:100%!important;height:100%!important;min-width:0!important;
  max-width:none!important;margin:0!important;padding:4px!important;
  box-sizing:border-box;align-self:stretch!important;
  display:grid!important;gap:4px!important;z-index:1!important;
 }
 html body #game[data-match-type="poker"] #poker-action-dock #poker-actions.hidden{
  display:none!important;
 }
 html body #game[data-match-type="poker"] #poker-actions button{
  min-width:0!important;width:100%!important;
  min-height:var(--pk-btn-h)!important;max-height:none!important;
  padding:3px!important;font-size:var(--pk-font)!important;
  line-height:1.1!important;touch-action:manipulation;
 }
 html body #game[data-match-type="poker"] .poker-bet-box{
  min-width:0!important;min-height:0!important;
  display:grid!important;gap:2px!important;margin:0!important;padding:0!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-box label{
  font-size:10px!important;line-height:1!important;
 }
 html body #game[data-match-type="poker"] #poker-bet-range{
  min-width:0!important;width:100%!important;
  min-height:16px!important;height:16px!important;margin:0!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-buttons{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:3px!important;min-width:0!important;min-height:0!important;
 }
 /* Result/side-pot details use their own scroll area, never extend the page. */
 html body #game[data-match-type="poker"] #poker-showdown{
  position:relative!important;inset:auto!important;
  grid-area:auto!important;z-index:16!important;
  width:100%!important;height:100%!important;max-width:none!important;
  max-height:100%!important;overflow:auto!important;
  margin:0!important;padding:6px!important;box-sizing:border-box!important;
 }
 html body #game[data-match-type="poker"] #match-result{
  position:relative!important;inset:auto!important;
  grid-area:auto!important;z-index:20!important;
  width:100%!important;height:100%!important;max-width:none!important;
  max-height:100%!important;overflow-y:auto!important;
  overscroll-behavior:contain;
  margin:0!important;padding:9px!important;
  box-sizing:border-box;
 }
 html body #game[data-match-type="poker"] #match-result .result-actions{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:5px!important;
 }
 html body #game[data-match-type="poker"] #match-result .result-actions button{
  width:100%!important;min-width:0!important;min-height:40px!important;
  font-size:11px!important;white-space:normal;padding:5px!important;
 }
 html body #game[data-match-type="poker"] #result-title{
  font-size:clamp(16px,3vw,20px)!important;
 }
 html body #game[data-match-type="poker"] #result-message{
  font-size:11px!important;line-height:1.2!important;margin:4px 0!important;
 }
 html body #game[data-match-type="poker"] #poker-action-dock[data-poker-panel="showdown"] #poker-actions,
 html body #game[data-match-type="poker"] #poker-action-dock[data-poker-panel="result"] #poker-actions,
 html body #game[data-match-type="poker"] #poker-action-dock[data-poker-panel="result"] #poker-showdown{
  display:none!important;
 }
 html body #game[data-match-type="poker"] #poker-action-dock[data-poker-panel="actions"] #poker-showdown,
 html body #game[data-match-type="poker"] #poker-action-dock[data-poker-panel="actions"] #match-result,
 html body #game[data-match-type="poker"] #poker-action-dock[data-poker-panel="showdown"] #match-result{display:none!important;}
 html body #game[data-match-type="poker"] .poker-dialog-overlay{
  max-width:100vw!important;max-height:100dvh!important;
 }
}
/* Portrait design is a separate scene, not a squeezed landscape table. */
@media (max-width:900px) and (orientation:portrait) {
 html body #game[data-match-type="poker"] {
  --pk-header:calc(55px + var(--pk-top));
  --pk-dock:calc(146px + var(--pk-bottom));
  --pk-cols:repeat(6,minmax(0,1fr));
  --pk-rows:minmax(62px,1fr) minmax(56px,1fr) minmax(54px,1fr) minmax(62px,1fr)
             minmax(56px,1fr) minmax(68px,1fr) minmax(56px,1fr) minmax(14px,.2fr);
  --pk-table-area:2/1/7/7;--pk-pot-area:3/3/4/5;
  --pk-community-area:4/1/5/7;--pk-hand-area:6/2/7/6;--pk-hero-area:7/2/8/6;
  --pk-message-area:8/1/9/7;
  --pk-seat-w:clamp(86px,28vw,110px);--pk-seat-h:56px;
  --pk-hero-w:170px;--pk-hero-h:55px;
  --pk-card:clamp(25px,7vw,38px);--pk-own:clamp(38px,11vw,51px);
  --pk-btn-h:42px;--pk-font:clamp(10px,2.7vw,13px);
 }
 html body #game[data-match-type="poker"][data-poker-dock-panel="showdown"],
 html body #game[data-match-type="poker"][data-poker-dock-panel="result"]{
  --pk-dock:calc(185px + var(--pk-bottom));
 }
 html body #game[data-match-type="poker"] .table-wrap::before,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .table-wrap::before{
  background-image:url('/assets/pokerzin/table-portrait-v31.svg')!important;
  background-position:center!important;background-size:100% 100%!important;
  /* Portrait SVG was authored at portrait aspect ratio; no landscape-image distortion. */
 }
 html body #game[data-match-type="poker"] .poker-seat[data-position="0"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="0"]{grid-area:1/1/2/3!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="1"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="1"]{grid-area:1/3/2/5!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="2"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="2"]{grid-area:1/5/2/7!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="3"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="3"]{grid-area:2/1/3/3!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="4"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="4"]{grid-area:2/5/3/7!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="5"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="5"]{grid-area:5/1/6/3!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="6"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="6"]{grid-area:5/5/6/7!important;}
 html body #game[data-match-type="poker"] #poker-action-dock #poker-actions{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-template-rows:44px minmax(0,1fr)!important;
  align-items:stretch!important;
 }
 html body #game[data-match-type="poker"] #poker-actions > button{grid-row:1!important;}
 html body #game[data-match-type="poker"] .poker-bet-box{
  grid-column:1/-1!important;grid-row:2!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:14px 18px minmax(40px,1fr)!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-box label{grid-row:1;}
 html body #game[data-match-type="poker"] #poker-bet-range{grid-row:2;}
 html body #game[data-match-type="poker"] .poker-bet-buttons{grid-row:3!important;}
}
@media (max-width:900px) and (orientation:portrait) and (max-height:680px){
 html body #game[data-match-type="poker"]{
  --pk-header:calc(50px + var(--pk-top));--pk-dock:calc(140px + var(--pk-bottom));
  --pk-rows:minmax(57px,1fr) minmax(51px,1fr) minmax(50px,1fr) minmax(54px,1fr)
            minmax(50px,1fr) minmax(63px,1fr) minmax(50px,1fr) minmax(12px,.2fr);
  --pk-seat-h:51px;--pk-own:clamp(34px,9vw,46px);--pk-hero-h:49px;
 }
}
/* Landscape: 3 top players, 2 on each side, hero centered along the bottom rim. */
@media (max-height:600px) and (orientation:landscape){
 html body #game[data-match-type="poker"] {
  --pk-header:calc(clamp(34px,10dvh,43px) + var(--pk-top));
  --pk-dock:calc(clamp(76px,20dvh,86px) + var(--pk-bottom));
  --pk-cols:minmax(92px,1fr) repeat(3,minmax(0,1.5fr)) minmax(92px,1fr);
  --pk-rows:minmax(60px,1fr) minmax(51px,1fr) minmax(51px,1fr) minmax(62px,1fr) minmax(12px,.2fr);
  --pk-table-area:2/1/5/6;--pk-pot-area:2/2/3/5;
  --pk-community-area:3/2/4/5;--pk-hand-area:4/4/5/5;--pk-hero-area:4/3/5/4;
  --pk-message-area:5/2/6/5;
  --pk-seat-w:clamp(93px,14vw,135px);--pk-seat-h:50px;
  --pk-hero-w:155px;--pk-hero-h:53px;
  --pk-card:clamp(23px,3.5vw,35px);--pk-own:clamp(30px,4.3vw,38px);
  --pk-btn-h:39px;--pk-font:clamp(10px,1.45vw,12px);
 }
 html body #game[data-match-type="poker"][data-poker-dock-panel="showdown"],
 html body #game[data-match-type="poker"][data-poker-dock-panel="result"]{
  --pk-dock:calc(clamp(98px,27dvh,110px) + var(--pk-bottom));
 }

 /* Landscape racetrack: proportioned table with straight long rails and round ends.
    "contain" preserves the authored 1200:455 geometry on short and wide phones. */
 html body #game[data-match-type="poker"] .table-wrap::before,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .table-wrap::before{
   grid-area:1/1/5/6!important;
   width:100%!important;height:100%!important;
   aspect-ratio:auto!important;
   max-width:100%!important;max-height:100%!important;
   align-self:center!important;justify-self:center!important;
   background-image:url('/assets/pokerzin/table-landscape-racetrack-v2.svg')!important;
   background-size:contain!important;
   background-position:center!important;
 }
 /* Top seat labels have their own line box below the header; side seats stay within rows. */
 html body #game[data-match-type="poker"] .poker-seat,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat {
   grid-template-columns:22px minmax(0,1fr)!important;
   grid-template-rows:minmax(0,1fr) 12px!important;
   gap:1px 3px!important;padding:3px 4px!important;
   align-self:center!important;
 }
 html body #game[data-match-type="poker"] .poker-seat[data-position="0"],
 html body #game[data-match-type="poker"] .poker-seat[data-position="1"],
 html body #game[data-match-type="poker"] .poker-seat[data-position="2"]{
   height:57px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .avatar{
   width:22px!important;height:22px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat strong{font-size:10px!important;line-height:1!important;}
 html body #game[data-match-type="poker"] .poker-seat small{font-size:9px!important;line-height:1!important;}
 html body #game[data-match-type="poker"] .poker-seat .seat-balance{
   font-size:10px!important;line-height:1!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-card-backs{
   height:12px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-card-backs i{
   width:10px!important;height:12px!important;
 }
 /* Main-player card cluster: adjoining grid cells instead of two distant islands. */
 html body #game[data-match-type="poker"] #me,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #me{
   justify-self:end!important;align-self:center!important;margin:0!important;
 }
 html body #game[data-match-type="poker"] #hand,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #hand{
   justify-self:start!important;align-self:center!important;
   width:max-content!important;margin:0 0 0 7px!important;max-width:100%!important;
 }
 html body #game[data-match-type="poker"] .topbar{
  grid-template-columns:minmax(0,1fr) auto auto!important;
  grid-template-rows:1fr!important;
 }
 html body #game[data-match-type="poker"] .topbar > div:first-child{grid-area:1/1!important;}
 html body #game[data-match-type="poker"] .game-wallet{grid-area:1/2!important;}
 html body #game[data-match-type="poker"] #online-badge{grid-area:1/3!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="0"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="0"]{grid-area:1/2!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="1"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="1"]{grid-area:1/3!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="2"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="2"]{grid-area:1/4!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="3"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="3"]{grid-area:2/1!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="4"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="4"]{grid-area:2/5!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="5"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="5"]{grid-area:3/1!important;}
 html body #game[data-match-type="poker"] .poker-seat[data-position="6"],
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat[data-position="6"]{grid-area:3/5!important;}
 html body #game[data-match-type="poker"] #poker-action-dock #poker-actions{
  grid-template-columns:minmax(58px,.7fr) minmax(70px,.85fr) minmax(0,3.5fr)!important;
  grid-template-rows:1fr!important;align-items:stretch!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-box{
  grid-column:3!important;grid-row:1!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1.7fr)!important;
  grid-template-rows:1fr 1fr!important;column-gap:4px!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-box label{grid-area:1/1!important;}
 html body #game[data-match-type="poker"] #poker-bet-range{grid-area:2/1!important;}
 html body #game[data-match-type="poker"] .poker-bet-buttons{grid-area:1/2/3/3!important;}
}
@media (max-height:375px) and (orientation:landscape){
 html body #game[data-match-type="poker"]{
  --pk-header:calc(34px + var(--pk-top));--pk-dock:calc(70px + var(--pk-bottom));
  --pk-seat-h:50px;--pk-hero-h:53px;
  --pk-rows:minmax(60px,1fr) minmax(51px,1fr) minmax(51px,1fr) minmax(62px,1fr) minmax(12px,.2fr);
  --pk-card:clamp(23px,3.5vw,32px);
  --pk-own:clamp(30px,4.3vw,36px);--pk-btn-h:34px;
 }
 html body #game[data-match-type="poker"] .poker-seat{
  grid-template-rows:minmax(28px,1fr) 13px!important;
  padding:2px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-card-backs{height:13px!important;}
 html body #game[data-match-type="poker"] .poker-card-backs i{width:10px!important;height:13px!important;}
}
@media(prefers-reduced-motion:reduce){
 html body #game[data-match-type="poker"] .poker-dialog-card{animation:none!important;}
}

/* True small-height landscape viewport (Safari/browser toolbars, PWA safe areas).
   Dimensions are budgeted for <=355 CSS px; buttons and player values remain visible. */
@media (max-height:355px) and (orientation:landscape){
 html body #game[data-match-type="poker"]{
  --pk-header:calc(32px + var(--pk-top));
  --pk-dock:calc(66px + var(--pk-bottom));
  --pk-rows:minmax(47px,1fr) minmax(42px,1fr) minmax(42px,1fr)
            minmax(53px,1fr) minmax(8px,.15fr);
  --pk-seat-h:41px;--pk-seat-w:clamp(88px,14vw,123px);
  --pk-hero-w:143px;--pk-hero-h:48px;
  --pk-card:clamp(22px,3vw,28px);
  --pk-own:clamp(28px,4vw,32px);
  --pk-btn-h:30px;--pk-font:10px;
 }
 html body #game[data-match-type="poker"] .poker-seat,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat{
  grid-template-rows:minmax(0,1fr) 9px!important;
  padding:2px 3px!important;gap:1px 3px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat[data-position="0"],
 html body #game[data-match-type="poker"] .poker-seat[data-position="1"],
 html body #game[data-match-type="poker"] .poker-seat[data-position="2"]{
  height:46px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .avatar{
  width:19px!important;height:19px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat strong{
  font-size:9px!important;line-height:1!important;
 }
 html body #game[data-match-type="poker"] .poker-seat small{
  font-size:8px!important;line-height:1!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .seat-balance{
  font-size:9px!important;line-height:1!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-card-backs{
  height:9px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-card-backs i{
  width:8px!important;height:9px!important;
 }
}

/* UX2 — distribuição da mesa somente para Pokerzin; não modifica regras. */
html body #game[data-match-type="poker"] .poker-win-tag{display:none;}
html body #game[data-match-type="poker"] .poker-seat-winner .poker-win-tag{
 display:block;position:absolute;top:-10px;left:50%;transform:translateX(-50%);z-index:9;
 padding:2px 10px;border-radius:20px;background:linear-gradient(120deg,#ffe28e,#bf8523);
 color:#112f22;font-size:10px;font-weight:900;letter-spacing:.08em;box-shadow:0 2px 8px #000a;
}
html body #game[data-match-type="poker"] .poker-seat-winner{
 border-color:#ffdb72!important;box-shadow:0 0 0 2px #f9cb69bb,0 0 16px #ffd46677!important;
}
html body #game[data-match-type="poker"] .poker-card-backs.poker-revealed-holes{
 display:flex!important;justify-content:center!important;align-items:center!important;
 gap:3px!important;overflow:visible!important;
}
html body #game[data-match-type="poker"] .poker-mini-hole.poker-card{
 position:relative!important;display:block!important;flex:0 0 auto!important;
 width:18px!important;height:25px!important;min-width:18px!important;
 border-radius:4px!important;font-size:9px!important;transform:none!important;
}
html body #game[data-match-type="poker"] .poker-cards-won .poker-mini-hole.poker-card,
html body #game[data-match-type="poker"] #hand.poker-winning-hand .card{
 outline:2px solid #fbd263!important;box-shadow:0 0 12px #ffd35cbb,0 0 0 2px #c38b28!important;
}
html body #game[data-match-type="poker"] .poker-hand-strength{
 position:absolute;right:0;bottom:-6px;z-index:7;
 background:#041b16ef;color:#f8d778;border:1px solid #d8aa4a;
 border-radius:9px;padding:2px 7px;font-size:9px;font-weight:900;
 letter-spacing:.035em;white-space:nowrap;box-shadow:0 2px 8px #000a;pointer-events:none;
}
html body #game[data-match-type="poker"] .poker-hand-strength[hidden]{display:none!important;}
html body #game[data-match-type="poker"] .poker-bet-trigger,
html body #game[data-match-type="poker"] .poker-bet-heading{display:none;}
@media (max-height:600px) and (orientation:landscape){
 html body #game[data-match-type="poker"]{--pk-dock:calc(clamp(58px,17dvh,72px) + var(--pk-bottom));}
 html body #game[data-match-type="poker"][data-poker-dock-panel="showdown"]{
   --pk-dock:calc(clamp(58px,17dvh,74px) + var(--pk-bottom));
 }
 html body #game[data-match-type="poker"] .table-wrap,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .table-wrap{
   column-gap:5px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat,
 html body #game[data-match-type="poker"][data-poker-premium="true"] .poker-seat{
   max-width:min(100%,145px)!important;min-width:0!important;
   border-radius:11px!important;grid-template-columns:22px minmax(0,1fr)!important;
   grid-template-rows:minmax(0,1fr) 14px!important;
   padding:3px 5px!important;gap:1px 4px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat:has(.poker-revealed-holes){
   grid-template-rows:minmax(0,1fr) 23px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat[data-position="0"],
 html body #game[data-match-type="poker"] .poker-seat[data-position="1"],
 html body #game[data-match-type="poker"] .poker-seat[data-position="2"]{
   height:min(58px,100%)!important;
 }
 html body #game[data-match-type="poker"] .poker-seat > div:not(.poker-card-backs){
   overflow:hidden!important;min-width:0!important;
 }
 html body #game[data-match-type="poker"] .poker-seat strong{
   white-space:nowrap!important;text-overflow:ellipsis!important;overflow:hidden!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-revealed-holes{
   grid-row:2!important;height:23px!important;overflow:visible!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-mini-hole.poker-card{
   width:17px!important;height:23px!important;min-width:17px!important;
 }
 html body #game[data-match-type="poker"] #me,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #me{
   border-radius:12px!important;overflow:visible!important;padding:4px 6px!important;
 }
 html body #game[data-match-type="poker"] #hand,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #hand{
   overflow:visible!important;justify-self:start!important;
 }
 html body #game[data-match-type="poker"] #hand .poker-hand-strength{
   bottom:-4px;font-size:8px!important;
 }
 html body #game[data-match-type="poker"] #poker-action-dock{overflow:visible!important;}
 html body #game[data-match-type="poker"] #poker-action-dock #poker-actions,
 html body #game[data-match-type="poker"][data-poker-premium="true"] #poker-action-dock #poker-actions{
   display:grid!important;position:relative!important;overflow:visible!important;
   grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:1fr!important;
   gap:6px!important;padding:3px!important;background:transparent!important;
 }
 html body #game[data-match-type="poker"] #poker-actions > #poker-fold,
 html body #game[data-match-type="poker"] #poker-actions > #poker-check-call,
 html body #game[data-match-type="poker"] #poker-actions > #poker-bet-trigger{
   display:block!important;grid-column:auto!important;grid-row:1!important;
   width:100%!important;height:100%!important;min-height:42px!important;
   padding:4px 6px!important;font-size:clamp(12px,2.5vw,18px)!important;
   font-weight:900!important;border-radius:9px!important;letter-spacing:.02em!important;
   border:1px solid #ffffff55!important;color:white!important;text-shadow:0 2px 2px #000a!important;
 }
 html body #game[data-match-type="poker"] #poker-actions > #poker-fold{
   background:linear-gradient(#30b9ff,#0866cf)!important;
 }
 html body #game[data-match-type="poker"] #poker-actions > #poker-check-call{
   background:linear-gradient(#d66eff,#8016c9)!important;
 }
 html body #game[data-match-type="poker"] #poker-actions > #poker-bet-trigger{
   background:linear-gradient(#ffdb54,#e88c08)!important;
 }
 html body #game[data-match-type="poker"] #poker-actions > button:disabled{opacity:.44!important;}
 html body #game[data-match-type="poker"] .poker-bet-box,
 html body #game[data-match-type="poker"] #poker-action-dock .poker-bet-box{
   display:none!important;position:absolute!important;
   inset:auto 3px calc(100% + 7px) auto!important;
   width:min(380px,88vw)!important;max-width:min(380px,88vw)!important;
   grid-column:auto!important;grid-row:auto!important;
   grid-template-columns:1fr!important;grid-template-rows:auto auto auto auto!important;
   padding:11px!important;gap:8px!important;
   background:#062a20f7!important;border:1px solid #dbb564!important;
   border-radius:13px!important;box-shadow:0 14px 33px #000c!important;z-index:60!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-box.open,
 html body #game[data-match-type="poker"] #poker-action-dock .poker-bet-box.open{
   display:grid!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-heading{
   display:flex!important;align-items:center;justify-content:space-between;
   grid-area:auto!important;font-size:12px;color:#ffe08b;
 }
 html body #game[data-match-type="poker"] #poker-bet-close{
   width:32px!important;height:32px!important;min-height:32px!important;
   border-radius:7px!important;background:#174738!important;color:#fff!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-box label,
 html body #game[data-match-type="poker"] #poker-bet-range,
 html body #game[data-match-type="poker"] .poker-bet-buttons{
   grid-column:auto!important;grid-row:auto!important;grid-area:auto!important;
 }
 html body #game[data-match-type="poker"] .poker-bet-buttons{
   display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;
 }
 html body #game[data-match-type="poker"] #poker-action-dock[data-poker-panel="showdown"] #poker-showdown{
   display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;
   width:100%!important;height:100%!important;padding:3px 7px!important;
   overflow:auto!important;background:linear-gradient(115deg,#062a22,#0a3a2b)!important;
   border:1px solid #be9a52!important;border-radius:10px!important;
 }
 html body #game[data-match-type="poker"] .poker-showdown-brief{
   display:flex;align-items:center;justify-content:space-between;gap:8px;
   width:100%;font-size:12px;color:#ffdc78;
 }
 html body #game[data-match-type="poker"] .poker-showdown-brief small{font-size:10px;color:#d7e5d6;}
 html body #game[data-match-type="poker"] #poker-showdown .poker-reveal-choice{
   display:flex;flex-wrap:nowrap!important;gap:5px;margin:0!important;
 }
 html body #game[data-match-type="poker"] #poker-showdown .poker-reveal-choice button{
   min-height:28px!important;padding:3px 6px!important;font-size:10px!important;
 }
}
@media (max-height:355px) and (orientation:landscape){
 html body #game[data-match-type="poker"]{
   --pk-dock:calc(57px + var(--pk-bottom));
 }
 html body #game[data-match-type="poker"] .poker-seat:has(.poker-revealed-holes){
   grid-template-rows:minmax(0,1fr) 18px!important;
 }
 html body #game[data-match-type="poker"] .poker-seat .poker-revealed-holes{
   height:18px!important;
 }
 html body #game[data-match-type="poker"] .poker-mini-hole.poker-card{
   width:13px!important;height:18px!important;min-width:13px!important;
 }
 html body #game[data-match-type="poker"] .poker-showdown-brief small{display:none;}
}
