:root{
  font-family:Inter,system-ui,sans-serif;
  color:#f4f6f5;
  background:#060808;
  --ui-scale:1;
  --base-font:18px;
}

*{box-sizing:border-box}
html{font-size:var(--base-font)}
body{margin:0;min-height:100vh;background:#060808;overflow-x:hidden}
button,input{font:inherit}
button{
  min-height:44px;padding:10px 14px;border-radius:10px;
  color:#fff;background:#173f32;border:1px solid #2e6a57;
  font-weight:800;cursor:pointer;
}
button:hover{filter:brightness(1.13)}
button:disabled{opacity:.34;cursor:not-allowed}
.secondaryButton{margin-top:14px;background:#14231f;border-color:#405a51}
input{
  min-height:44px;padding:9px 11px;border-radius:9px;
  background:#0e1514;color:#fff;border:1px solid #40504b;
}
select{
  min-height:38px;padding:7px 9px;border-radius:8px;
  background:#0e1514;color:#fff;border:1px solid #40504b;font:inherit;
}
.panel{
  max-width:620px;margin:10vh auto;padding:34px;text-align:center;
  background:#0c1111;border:1px solid #33413d;border-radius:18px;
}
.panel h1{font-size:3rem;margin:0}.panel input{width:100%;margin:14px 0}
#error{color:#ff8888}
.landingTableActions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.landingTableActions button{width:100%;margin:0}
#createTableName{margin:10px 0 0}
.privateTableToggle{display:flex;align-items:center;gap:8px;margin:10px 0 0;color:#b7cbc3;font-size:.78rem;font-weight:850;text-align:left}
.privateTableToggle input{width:18px;min-height:auto;margin:0;accent-color:#63d8ae}
#createTablePassword{margin:10px 0 0}
.joinPrivacyStatus{margin:7px 0 0;color:#9db6ad;font-size:.78rem;font-weight:850}
.roomCodeJoin{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;margin-top:12px}
.roomCodeJoin span{color:#789087;font-size:.75rem;font-weight:850;text-transform:uppercase}
.roomCodeJoin input{margin:0;text-transform:uppercase;letter-spacing:.08em;font-weight:900}
.roomCodeJoin button{white-space:nowrap}
.roomBrowser{margin-top:14px;text-align:left;border:1px solid #263a34;border-radius:12px;background:#080d0c;overflow:hidden}
.roomBrowserHeading{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #1e302b}
.roomBrowserHeading b{font-size:.88rem}.roomBrowserHeading span{color:#8ea99f;font-size:.72rem;font-weight:850}
.roomBrowserList{display:grid;gap:7px;max-height:320px;overflow:auto;padding:8px}
.roomBrowserItem{display:grid;gap:5px;width:100%;min-height:auto;padding:10px 11px;text-align:left;background:#101917;border-color:#304941;border-radius:8px}
.roomBrowserItem.private{border-color:#6c5b35;background:#17150f}
.roomBrowserItem.current{border-color:#f1d57c;background:#1a180e;opacity:.78}
.roomBrowserTop,.roomBrowserCounts{display:flex;justify-content:space-between;gap:8px;align-items:center}
.roomBrowserTop b{font-size:.9rem}
.roomBrowserTop em{color:#f1d57c;font-style:normal;font-size:.68rem;font-weight:900;text-transform:uppercase}
.roomBrowserHost{color:#f1d57c;font-size:.74rem;font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.roomBrowserCounts{color:#b9cdc5;font-size:.75rem;font-weight:850}
.roomBrowserPlayers{color:#829a91;font-size:.7rem;line-height:1.35;overflow:hidden;text-overflow:ellipsis}
.roomBrowserEmpty{padding:14px;color:#8ea99f;text-align:center;font-weight:800}
.avatarCustomizer{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:10px 0 14px;
  text-align:left;
}
.avatarCustomizer label{
  display:grid;
  gap:4px;
  color:#9fb4ac;
  font-size:.72rem;
  font-weight:850;
  text-transform:uppercase;
}
.avatarCustomizer select{width:100%;font-size:.86rem;text-transform:none}
.avatarCustomizer .avatarToggle{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:7px 9px;
  border:1px solid #40504b;
  border-radius:8px;
  background:#0e1514;
}
.avatarToggle input{min-height:auto;width:auto;margin:0}

#game{font-size:calc(1rem * var(--ui-scale))}
.gameHeader{
  display:grid;grid-template-columns:auto minmax(0,1fr) minmax(0,auto);align-items:center;
  gap:10px;padding:8px 10px;min-height:50px;max-height:50px;overflow:hidden;
  background:#090d0d;border-bottom:1px solid #27332f;
}
.titleBlock{display:flex;gap:10px;align-items:baseline;min-width:0;white-space:nowrap}
.titleBlock>b{font-size:1.28rem}
#phase{color:#b8cec5;overflow:hidden;text-overflow:ellipsis}
.cameraControls,.viewControls{
  display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0;
  overflow:hidden;
}
.controlLabel{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:#89a49a;font-weight:900}
.viewControls button,.cameraControls button{flex:0 0 auto;min-height:34px;padding:5px 8px;white-space:nowrap}
.viewControls #soundBtn,.viewControls #graphicsBtn,.viewControls #fullscreenBtn,.viewControls #musicMenuBtn{width:38px;padding:5px}
.viewControls #musicBtn{width:58px}
.viewControls #serverBrowserBtn{width:62px}
.viewControls #testSoundBtn{width:82px}
.volumeControl{
  display:flex;align-items:center;gap:7px;min-height:38px;
  background:#101616;border:1px solid #40504b;border-radius:9px;padding:5px 9px;font-weight:800;
}
.volumeControl input{width:120px;min-height:auto;padding:0}
#volumeLabel{min-width:40px;text-align:right}
#musicVolumeLabel{min-width:40px;text-align:right}
#musicMenuBtn{min-width:38px;padding:7px 10px}
.musicDialogCard{
  width:min(440px,calc(100vw - 24px));
  display:grid;
  gap:12px;
  padding:16px;
  background:#08100e;
  border:1px solid #3b5b50;
  border-radius:10px;
  color:#eef8f2;
}
.musicDialogHeading{display:flex;justify-content:space-between;gap:12px;align-items:start}
.musicDialogHeading h2{margin:2px 0 0;font-size:1.25rem}
.musicNowPlaying{color:#f1d57c;font-weight:900;font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.musicTrackList{display:grid;gap:6px;max-height:330px;overflow:auto}
.musicDialogSliders{display:grid;gap:8px}
.musicDialogSliders .volumeControl{display:grid;grid-template-columns:auto minmax(0,1fr) auto}
.musicDialogSliders .volumeControl input{width:100%}
.musicTrackItem{
  width:100%;
  min-height:36px;
  padding:7px 9px;
  text-align:left;
  border-radius:7px;
  background:#101917;
  border-color:#304941;
  color:#dcebe5;
  font-weight:850;
}
.musicTrackItem[aria-selected="true"]{border-color:#f1d57c;color:#f1d57c;background:#17150f}
.musicDialogActions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
#serverBrowserBtn{min-width:70px}
#serverBrowserDialog{
  width:min(620px,calc(100vw - 24px));
  padding:0;
  border:1px solid #4f7164;
  border-radius:12px;
  background:#08100e;
  color:#eef8f2;
  box-shadow:0 24px 90px rgba(0,0,0,.82);
}
#serverBrowserDialog::backdrop{background:rgba(0,0,0,.78);backdrop-filter:blur(3px)}
.serverBrowserDialogCard{display:grid;gap:12px;padding:16px}
.serverBrowserDialogHeading{display:flex;justify-content:space-between;gap:12px;align-items:start}
.serverBrowserDialogHeading h2{margin:2px 0 0;font-size:1.25rem}
.serverBrowserDialogActions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.inGameRoomBrowser{margin-top:0}

.chipBetBuilder{
  display:grid;grid-template-columns:minmax(0,1.4fr) minmax(240px,.8fr);gap:12px;
  padding:10px 12px;background:#0b1110;border-top:1px solid #1f2c28;
}
.chipWallet{display:flex;gap:7px;flex-wrap:wrap;margin-top:6px}
.denominationChip{
  --chip-color:#eee;position:relative;min-width:68px;min-height:54px;padding:6px 8px 6px 42px;
  background:#111918;border-color:#384b44;text-align:left;
}
.denominationChip::before{
  content:attr(data-value);position:absolute;left:7px;top:50%;transform:translateY(-50%);
  width:29px;height:29px;border-radius:50%;display:grid;place-items:center;
  color:#fff;background:var(--chip-color);border:3px dashed rgba(255,255,255,.72);
  box-shadow:0 2px 8px rgba(0,0,0,.42);font-size:.66rem;font-weight:1000;
}
.denominationChip[data-value="1"]::before{color:#1b2020}
.denominationChip[data-value="1000"]::before{color:#1b2020}
.denominationChip small{display:block;color:#9fb4ac;font-weight:750;font-size:.62rem}
.betBreakdownBox{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:8px 10px;border-radius:10px;background:#070b0a}
#betBreakdown{color:#f2d886;font-size:.82rem;line-height:1.35}
#clearBetChipsBtn{min-height:32px;padding:4px 9px;font-size:.72rem}

#graphicsDialog{
  border:1px solid #587367;border-radius:20px;background:#09100e;color:#fff;
  width:min(94vw,620px);padding:0;box-shadow:0 24px 80px rgba(0,0,0,.68);
}
#graphicsDialog::backdrop{background:rgba(0,0,0,.76)}
.graphicsCard{display:flex;flex-direction:column;gap:18px;padding:22px}
.graphicsHeading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.graphicsHeading h2{margin:2px 0 0;font-size:1.65rem}
.settingsEyebrow{color:#88b7a5;text-transform:uppercase;letter-spacing:.12em;font-size:.68rem;font-weight:900}
#graphicsCloseBtn{min-height:36px;padding:5px 10px;background:#1b2824}
.graphicsOptions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.graphicsOption{
  min-height:132px;padding:16px;text-align:left;background:#101a17;border-color:#3b5149;
  display:flex;flex-direction:column;gap:10px;justify-content:flex-start;
}
.graphicsOption strong{font-size:1.1rem;color:#fff}
.graphicsOption span{font-size:.78rem;line-height:1.45;color:#aac0b7;font-weight:650}
.graphicsOption.active{background:#164936;border-color:#6ee0b4;box-shadow:0 0 0 2px rgba(110,224,180,.16)}
.graphicsAdvanced{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
  padding:12px;border:1px solid #22342f;border-radius:12px;background:#070d0c;
}
.graphicsToggle{
  display:flex;align-items:center;gap:9px;min-height:38px;padding:8px 10px;
  border:1px solid #263a34;border-radius:9px;background:#0d1715;font-weight:850;color:#dcebe6;
}
.graphicsToggle input{min-height:auto;width:18px;height:18px;padding:0;margin:0;accent-color:#63d8ae}
.graphicsSlider{display:grid;grid-column:1 / -1;gap:7px;color:#dcebe6;font-weight:850}
.graphicsSlider span{display:flex;justify-content:space-between;gap:12px}
.graphicsSlider b{color:#f4d46d}
.graphicsSlider input{width:100%;min-height:auto;padding:0;accent-color:#63d8ae}
.graphicsStatus{margin:0;color:#b9d4c9;font-size:.8rem;min-height:1.2em}

html[data-graphics="potato"] button:hover{filter:none}
html[data-graphics="potato"] #playerHud.yourTurn .miniCard,
html[data-graphics="potato"] #playerHud.timerUrgent .miniCard{animation:none;box-shadow:0 0 0 3px rgba(255,216,77,.34)}
html[data-graphics="potato"] #tableStage{background:#070b0a}
html[data-bloom="on"] #tableStage::after{
  content:"";position:absolute;inset:-2px;pointer-events:none;z-index:1;
  background:radial-gradient(circle at 50% 48%,rgba(60,255,170,.08),transparent 39%),
             radial-gradient(circle at 54% 28%,rgba(255,216,92,.07),transparent 33%);
  mix-blend-mode:screen;
}
html[data-dof="on"] #tableStage::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:2;
  background:radial-gradient(ellipse at 50% 48%,transparent 0 46%,rgba(0,0,0,.18) 68%,rgba(0,0,0,.42) 100%);
}
#tableStage{
  position:relative;height:min(72vh,850px);min-height:560px;
  overflow:hidden;background:radial-gradient(circle at 50% 30%,#151e1b,#060808 72%);
}
#scene{position:absolute;inset:0;width:100%;height:100%;display:block;filter:var(--scene-filter,none)}

/* POKER3D_SPACE_PISTOL_AIM_PRESENTATION_V1 */
#spacePistolAimBtn[aria-pressed="true"]{
  border-color:#5de8ff;
  color:#bdf7ff;
  box-shadow:0 0 0 1px rgba(93,232,255,.22),0 0 14px rgba(40,190,225,.22);
}

#spacePistolAimReticle{
  position:absolute;
  left:50%;
  top:50%;
  z-index:6;
  width:34px;
  height:34px;
  transform:translate(-50%,-50%);
  pointer-events:none;
  border:1px solid rgba(102,235,255,.82);
  border-radius:50%;
  box-shadow:0 0 10px rgba(63,216,255,.58),inset 0 0 8px rgba(63,216,255,.24);
}

#spacePistolAimReticle[hidden]{display:none}

#spacePistolAimReticle::before,
#spacePistolAimReticle::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  background:#8ff3ff;
  box-shadow:0 0 6px #3bdcff;
  transform:translate(-50%,-50%);
}

#spacePistolAimReticle::before{width:44px;height:1px}
#spacePistolAimReticle::after{width:1px;height:44px}

#spacePistolAimReticle span{
  position:absolute;
  left:50%;
  top:50%;
  width:4px;
  height:4px;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:#e8fdff;
  box-shadow:0 0 8px #4de5ff;
}

#spacePistolAimHint{
  position:absolute;
  left:50%;
  top:calc(50% + 34px);
  z-index:6;
  transform:translateX(-50%);
  pointer-events:none;
  padding:4px 8px;
  border-radius:6px;
  background:rgba(3,13,15,.72);
  color:#bdf7ff;
  font-size:11px;
  letter-spacing:.04em;
  white-space:nowrap;
}

#spacePistolAimHint[hidden]{display:none}
.lastHandBanner{
  position:absolute;left:12px;top:12px;z-index:7;pointer-events:none;
  display:flex;align-items:center;gap:8px;max-width:min(560px,72%);
  padding:7px 11px;border:1px solid #b89432;border-radius:10px;
  background:rgba(14,18,13,.94);box-shadow:0 7px 22px rgba(0,0,0,.42);
}
.lastHandBanner[hidden]{display:none}
.lastHandBanner span{color:#d8b84f;font-size:.58rem;font-weight:950;letter-spacing:.1em;white-space:nowrap}
.lastHandBanner b{color:#fff2bd;font-size:.76rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#hudTop{
  position:absolute;left:50%;top:12px;transform:translateX(-50%);
  display:flex;gap:10px;z-index:4;pointer-events:none;
}
#potHud,#turnHud{
  background:#07100de7;border:1px solid #47655b;border-radius:999px;
  padding:8px 14px;font-weight:900;text-shadow:0 1px 2px #000;
}
#turnHud{color:#ffe17a}

#playerHud{
  position:absolute;left:50%;bottom:12px;transform:translateX(-50%);
  z-index:5;text-align:center;pointer-events:none;
}
.heroLabel{
  display:inline-block;margin-bottom:5px;padding:3px 9px;border-radius:999px;
  background:#07100ddc;border:1px solid #47655b;font-size:.7rem;font-weight:900;letter-spacing:.08em;
}
#heroCards{display:flex;justify-content:center;gap:8px}
.miniCard{
  width:92px;height:128px;border-radius:9px;background:#fff;color:#111;overflow:hidden;
  border:3px solid #ddd;display:block;font-weight:1000;font-size:2rem;
  box-shadow:0 8px 22px rgba(0,0,0,.5);
}
.miniCard img{width:100%;height:100%;display:block;object-fit:fill;user-select:none}
.miniCard.red{color:#c62424}
.miniCard.back{color:transparent}
#playerHud.yourTurn .miniCard{
  border-color:#ffd84d;
  box-shadow:0 0 0 4px rgba(255,216,77,.22),0 0 34px rgba(255,216,77,.76),0 9px 24px rgba(0,0,0,.55);
  animation:heroPulse 1s ease-in-out infinite alternate;
}
#playerHud.timerUrgent .miniCard{
  border-color:#ff6262;
  box-shadow:0 0 0 4px rgba(255,75,75,.22),0 0 38px rgba(255,75,75,.8),0 9px 24px rgba(0,0,0,.55);
  animation:urgentPulse .45s ease-in-out infinite alternate;
}
@keyframes heroPulse{to{transform:translateY(-4px) scale(1.03)}}
@keyframes urgentPulse{to{transform:scale(1.055)}}
.heroTurnTimer{
  width:min(310px,70vw);margin:7px auto 0;background:#08100fe8;
  border:2px solid #d9b95b;border-radius:11px;padding:6px 8px 8px;
}
.heroTimerText{display:flex;justify-content:space-between;font-weight:1000;color:#ffe47c;margin-bottom:4px}
.heroTimerTrack{height:11px;border-radius:999px;background:#242c2a;overflow:hidden}
.heroTimerFill{height:100%;background:linear-gradient(90deg,#4cbf91,#d9b95b,#e25f5f)}
.orbitHint{
  position:absolute;right:10px;bottom:8px;z-index:3;pointer-events:none;
  background:#050909b9;padding:5px 8px;border-radius:7px;color:#91a79f;font-size:.7rem
}

#betPanel{
  background:#080c0c;border-top:1px solid #27332f;padding:9px 12px 11px;
}
.betSummary{
  display:flex;gap:18px;justify-content:center;flex-wrap:wrap;
  margin-bottom:7px;color:#b8cec5;font-size:.9rem;
}
.betSummary b{color:#fff}
.playerChipCountSection{
  margin:0 0 7px;
  padding:7px 8px;
  border:1px solid #25352f;
  border-radius:10px;
  background:#070b0a;
}
.playerChipCounts{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px;
  margin-top:4px;
}
.playerChipCount{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:0 5px;
  min-width:0;
  padding:4px 6px;
  border-radius:7px;
  background:#101815;
  border:1px solid #2d4139;
  line-height:1.05;
}
.playerChipCount.me{border-color:#d5b950;background:#16211c}
.playerChipCount.out{opacity:.48}
.playerChipCount span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.68rem;color:#b9cdc5;font-weight:850}
.playerChipCount b{color:#ffe18a;font-size:.72rem}
.playerChipCount small{grid-column:1 / -1;color:#789087;font-size:.52rem;font-weight:750}
.blindBadge{
  display:inline-grid;
  place-items:center;
  min-width:24px;
  margin-left:4px;
  padding:1px 5px;
  border-radius:999px;
  background:#6f5320;
  color:#ffe7a1;
  border:1px solid #caa85f;
  font-style:normal;
  font-size:.54rem;
  line-height:1.2;
}
#controls{
  display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;
}
#controls button{min-width:105px;font-size:1rem}
.raiseBox{display:flex;gap:7px;align-items:center}
#raiseAmount{width:120px;font-weight:900}
#raiseSlider{width:190px;min-height:auto;padding:0}
#status{text-align:center;color:#aac0b7;min-height:28px;padding-top:6px;font-weight:700}

.inviteBar{
  display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:9px;align-items:center;
  padding:10px 14px;background:#090d0d;border-top:1px solid #27332f;
}
.inviteLabel{font-weight:900}.inviteBar input{width:100%;font-size:.86rem}
#inviteDialog{
  width:min(92vw,520px);padding:0;border:1px solid #4f7164;border-radius:12px;
  background:#09110f;color:#fff;box-shadow:0 24px 90px rgba(0,0,0,.82);
}
#inviteDialog::backdrop{background:rgba(0,0,0,.8);backdrop-filter:blur(3px)}
.inviteCard{display:grid;gap:11px;padding:20px}
.inviteCard h2,.inviteCard p{margin:0}.inviteCard h2{color:#f4dd94}
.inviteCard>p{color:#a9bdb5;font-size:.78rem;line-height:1.4}
.inviteDialogHeading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.inviteDialogHeading button{min-height:36px;padding:5px 9px;background:#17231f}
.inviteCard label{display:grid;gap:5px;color:#d6e3de;font-size:.75rem;font-weight:850}
.inviteCard label span{color:#71877f;font-size:.64rem;font-weight:700}
.inviteCard input{width:100%}
#emailInviteBtn,#textInviteBtn{min-height:48px;background:#174c3a;border-color:#4da783}
.inviteQuickActions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:3px}
.inviteQuickActions button{min-height:44px;background:#14231f}
#inviteDialogStatus{min-height:1.25em;color:#efcf6d!important;font-weight:800}

/* POKER3D_AUTO_CALL_PERSISTENT_TOGGLE_V2
Auto Call must remain reachable after an automatic action hides the turn dock. */
.autoCallDock{
display:flex;
align-items:center;
gap:8px;
margin:8px 0;
padding:7px 9px;
border:1px solid rgba(105,202,164,.34);
border-radius:10px;
background:rgba(10,27,23,.92);
}
.autoCallDock .controlLabel{margin-right:auto}
#autoCallDock #autoCallBtn{
min-height:42px;
padding:7px 12px;
white-space:nowrap;
}
#autoCallDock #autoCallBtn[aria-pressed="true"]{
border-color:#69caa4;
box-shadow:0 0 0 1px rgba(105,202,164,.25);
}

#mobileGameTabs{display:none}

@media(max-width:900px){
  #tableStage{height:62vh;min-height:480px}
  .gameHeader{align-items:stretch}
  .cameraControls,.viewControls{width:100%}
  .raiseBox{width:100%;justify-content:center}
  #raiseSlider{width:min(48vw,260px)}
}
@media(max-width:560px){
  :root{--base-font:16px}
  .panel{margin:4vh 12px;padding:24px 18px}
  .panel h1{font-size:2.35rem}
  .landingTableActions{grid-template-columns:1fr}
  .roomCodeJoin{grid-template-columns:1fr}
  .roomCodeJoin span{display:none}
  .roomBrowserList{max-height:240px}
  .roomBrowserTop,.roomBrowserCounts{display:grid;gap:3px}
  #tableStage{min-height:440px}
  .miniCard{width:74px;height:104px;font-size:1.6rem}
  .inviteBar{grid-template-columns:1fr}.inviteBar button{width:100%}
  #inviteDialog{width:calc(100vw - 18px);max-height:calc(100dvh - 18px)}
  .inviteCard{padding:16px 13px;gap:9px}
  .inviteQuickActions{grid-template-columns:1fr}
}

.accountCard{
  display:grid;
  gap:8px;
  padding:10px;
  border:1px solid rgba(91,218,205,.28);
  border-radius:10px;
  background:rgba(4,16,24,.62);
}

.accountStatus{font-size:.86rem;color:#9adbd4}
.accountFields{display:grid;gap:8px}
.accountActions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
@media(max-width:900px) and (max-height:500px){
  .panel{max-width:680px;margin:10px auto;padding:14px 22px}
  .panel h1{font-size:2rem}
  .panel p{margin:6px 0}
  .panel input{margin:7px 0}
  .secondaryButton,.roomCodeJoin{margin-top:7px}
}
@media(prefers-reduced-motion:reduce){
  #playerHud.yourTurn .miniCard,#playerHud.timerUrgent .miniCard{animation:none}
}


/* 2D community-card HUD */
#boardHud{
  position:absolute;
  left:50%;
  top:60px;
  transform:translateX(-50%);
  z-index:5;
  text-align:center;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
}
#boardHud.hidden{
  opacity:0;
  transform:translateX(-50%) translateY(-8px);
}
.boardHudLabel{
  display:inline-block;
  margin-bottom:5px;
  padding:3px 9px;
  border-radius:999px;
  background:#06100de3;
  border:1px solid #47655b;
  color:#b9d1c7;
  font-size:.66rem;
  font-weight:900;
  letter-spacing:.08em;
}
#boardHudCards{
  display:flex;
  gap:6px;
  justify-content:center;
}
#boardHudCards .miniCard{
  width:58px;
  height:82px;
  font-size:1.2rem;
  border-width:2px;
  box-shadow:0 5px 14px rgba(0,0,0,.5);
}

@media(max-width:700px){
  #boardHud{top:106px}
  #boardHudCards .miniCard{width:46px;height:65px;font-size:1rem}
}


/* Bottom information dock */
#playerHud{
  position:absolute;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  z-index:6;
  text-align:center;
  pointer-events:none;
  width:min(760px,94vw);
}
#bottomInfoDock{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:5px;
}
#hudBottom{
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}
#hudBottom #potHud,
#hudBottom #turnHud{
  background:#07100de8;
  border:1px solid #47655b;
  border-radius:999px;
  padding:6px 11px;
  font-size:.82rem;
  font-weight:900;
  text-shadow:0 1px 2px #000;
}
#hudBottom #turnHud{color:#ffe17a}

/* 2D board now lives beside the local player's cards at the bottom. */
#boardHud{
  position:static;
  transform:none;
  z-index:auto;
  text-align:center;
  pointer-events:none;
  transition:opacity .18s ease;
}
#boardHud.hidden{opacity:0}
#boardHudCards{
  display:flex;
  justify-content:center;
  gap:5px;
}
#boardHudCards .miniCard{
  width:50px;
  height:70px;
  font-size:1.05rem;
  border-width:2px;
  box-shadow:0 4px 10px rgba(0,0,0,.46);
}
.boardHudLabel{
  margin-bottom:3px;
  font-size:.6rem;
}
#winnerHud{
  margin-top:5px;
  padding:5px 8px 6px;
  border:1px solid #b89432;
  border-radius:8px;
  background:rgba(7,16,13,.94);
  box-shadow:0 6px 18px rgba(0,0,0,.42);
}
#winnerHud[hidden]{display:none}
.winnerHudLabel{
  margin-bottom:4px;
  color:#ffe17a;
  font-size:.61rem;
  font-weight:950;
  letter-spacing:.08em;
}
#winnerHudHands{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.winnerHand2d{display:flex;align-items:center;gap:6px}
.winnerHandMeta{display:flex;flex-direction:column;align-items:flex-end;line-height:1.12}
.winnerHandMeta strong{color:#fff2bd;font-size:.68rem}
.winnerHandMeta span{color:#c9d8d1;font-size:.58rem}
.winnerHandCards{display:flex;gap:4px}
.winnerHandCards .miniCard{width:46px;height:64px;border-width:2px;box-shadow:0 0 0 2px rgba(255,216,77,.2),0 4px 10px rgba(0,0,0,.46)}

/* Table chat, requests, and rebuy */
#socialPanel{
  background:#080c0c;
  border-top:1px solid #27332f;
  padding:10px 12px;
}
#tableManagement{
  display:grid;gap:8px;margin:-10px -12px 10px;padding:9px 12px;
  background:#0d1714;border-bottom:1px solid #31463e;
}
.tableSessionSummary{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.tableSessionSummary>div{display:flex;align-items:baseline;gap:8px;min-width:0}
.tableSessionSummary strong{color:#f2d886;font-size:.76rem;overflow-wrap:anywhere}
.tableManagementActions{display:flex;align-items:end;gap:7px;flex-wrap:wrap}
.tableManagementActions label{display:grid;gap:3px;color:#9fb5ac;font-size:.64rem;font-weight:850;text-transform:uppercase}
.tableManagementActions select,.bountyPickerCard select{
  min-height:36px;padding:5px 9px;border-radius:7px;background:#0b1210;color:#fff;border:1px solid #40564e;font-weight:850;
}
.tableManagementActions button{min-height:36px;padding:5px 10px;font-size:.72rem}
#leaveTableBtn{background:#3a2020;border-color:#754242}
#bountyPicker{
  width:min(92vw,520px);padding:0;border:1px solid #d1aa3d;border-radius:12px;
  background:#09110f;color:#fff;box-shadow:0 24px 90px rgba(0,0,0,.82),0 0 0 2px rgba(209,170,61,.15);
}
#bountyPicker::backdrop{background:rgba(0,0,0,.86);backdrop-filter:blur(3px)}
.bountyPickerCard{display:grid;gap:13px;padding:22px}
.bountyPickerCard h2{margin:0;color:#ffe18a;font-size:1.45rem}
#bountyPickerPrompt,.bountyRule,#bountyPickerFeedback{margin:0;line-height:1.4}
#bountyPickerPrompt{color:#e6eee9;font-weight:800}
.bountyRule{color:#9db2aa;font-size:.76rem}
.bountyRankFields{display:grid;grid-template-columns:1fr auto 1fr;align-items:end;gap:10px}
.bountyRankFields label{display:grid;gap:5px;color:#a9beb6;font-size:.72rem;font-weight:850;text-transform:uppercase}
.bountyRankFields select{width:100%;min-height:54px;font-size:1.15rem;text-align:center}
.bountyRankFields>span{padding-bottom:14px;color:#e7c767;font-size:1.35rem;font-weight:950}
#selectBountyBtn{min-height:52px;background:#725a16;border-color:#dbb74b;font-size:1rem}
#bountyPickerFeedback{min-height:1.4em;color:#f4d777;font-size:.78rem;font-weight:800}
#tableNotice{
  position:fixed;z-index:10000;left:50%;top:16px;transform:translateX(-50%);width:min(92vw,620px);
  padding:12px 16px;border:1px solid #59b892;border-radius:9px;background:#102b22;color:#eafff7;
  box-shadow:0 12px 40px rgba(0,0,0,.7);text-align:center;font-weight:850;
}
#tableNotice[hidden]{display:none}
#tableNotice[data-kind="error"]{background:#3a1616;border-color:#d46a6a;color:#ffdede}
.socialTop{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  color:#b8cec5;
  font-size:.86rem;
}
.socialHint{color:#6f8980;margin-left:8px}
.socialActions{
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap;
}
#requestAmount{width:110px}
#tableChat{
  max-height:130px;
  overflow:auto;
  margin:8px auto;
  padding:7px 9px;
  border:1px solid #27332f;
  border-radius:10px;
  background:#060909;
  text-align:left;
  font-size:.82rem;
}
.chatLine{padding:3px 1px;color:#d2dfda}
.chatLine.system{color:#e6ca73}
.chatLine.request{
  display:flex;
  gap:7px;
  align-items:center;
  flex-wrap:wrap;
  color:#d9e8e2;
}
.chatLine button{min-height:32px;padding:4px 8px;font-size:.76rem}
.chatComposer{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
}
.chatComposer input{width:100%}

#rebuyDialog{
  border:1px solid #4a6259;
  border-radius:16px;
  background:#0a1010;
  color:#fff;
  max-width:460px;
  width:min(92vw,460px);
}
#chipTradeDialog,#leaderboardDialog{
  border:1px solid #4a6259;border-radius:16px;background:#0a1010;color:#fff;
  width:min(94vw,620px);max-width:620px;
}
#chipTradeDialog::backdrop,#leaderboardDialog::backdrop{background:rgba(0,0,0,.74)}
.tradeCard,.leaderboardCard{display:flex;flex-direction:column;gap:14px}
.tradeCard h2,.leaderboardCard h2{margin:0}
.tradeGrid{display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:end}
.tradeGrid label{display:flex;flex-direction:column;gap:6px;color:#abc1b8;font-size:.78rem;font-weight:850}
.tradeGrid label span{display:grid;grid-template-columns:80px 1fr;gap:6px}
.tradeGrid input,.tradeGrid select{width:100%;min-width:0}
.tradeGrid select{min-height:44px;border-radius:9px;background:#0e1514;color:#fff;border:1px solid #40504b;padding:8px}
.tradeEquals{font-size:1.6rem;color:#e5c86d;padding-bottom:8px}
.tradeValueStatus{min-height:1.3em;margin:0;color:#e8cb71;font-weight:800}
.tradeValueStatus.invalid{color:#ff8989}
.dialogActions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.leaderboardHeading{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.leaderboardTable{display:grid;gap:5px}
/* POKER3D_TABLE_VICTORY_LEADERBOARD_V1 */
.leaderboardRow{display:grid;grid-template-columns:42px minmax(0,1fr) 72px 62px 62px 82px;gap:8px;align-items:center;padding:8px;border-radius:9px;background:#0f1816}
.leaderboardRow.header{color:#88a69b;background:transparent;text-transform:uppercase;font-size:.65rem;font-weight:900}
.leaderboardRank{color:#e6cb72;font-weight:950}
#rebuyDialog::backdrop{background:rgba(0,0,0,.72)}
.rebuyCard{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.rebuyCard h2{margin:0}
.rebuyNote{font-size:.78rem;color:#9eb4ab}

/* 3D selection highlight helper */
.playerSelectedGlow{
  outline:none;
}

@media(max-width:700px){
  #playerHud{bottom:8px}
  #boardHudCards .miniCard{width:42px;height:59px;font-size:.9rem}
  .socialTop{align-items:stretch}
  .socialActions{width:100%}
  #requestAmount{flex:1;min-width:110px}
  .graphicsOptions{grid-template-columns:1fr}
  .graphicsAdvanced{grid-template-columns:1fr}
  .chipBetBuilder{grid-template-columns:1fr}
  .tradeGrid{grid-template-columns:1fr}.tradeEquals{text-align:center;padding:0}
  .leaderboardRow{grid-template-columns:32px minmax(0,1fr) 54px 46px 46px 58px;gap:4px;font-size:.68rem}
  .tableSessionSummary{display:grid;gap:4px}
  .tableManagementActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
  .tableManagementActions label{grid-column:1 / -1}
  .tableManagementActions select,.tableManagementActions button{width:100%}
  #bountyPicker{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
  .bountyPickerCard{padding:18px 14px;gap:11px}
  .bountyPickerCard h2{font-size:1.3rem}
  .bountyRankFields select{min-height:58px;font-size:1.3rem}
  #selectBountyBtn{min-height:56px}
}


/* Wider table polish / legal-action guidance / action log */
#actionFeed{
  display:flex;
  gap:5px;
  justify-content:center;
  flex-wrap:wrap;
  min-height:22px;
  max-width:min(760px,92vw);
}
.actionFeedItem{
  display:inline-block;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(5,12,10,.88);
  border:1px solid #334941;
  color:#c8d9d2;
  font-size:.66rem;
  font-weight:850;
  white-space:nowrap;
}
#controls button[data-action]{
  transition:opacity .12s ease,filter .12s ease,transform .12s ease,border-color .12s ease;
}
#controls button[data-action].legalAction:not(:disabled){
  opacity:1;
  border-color:#4d9b7f;
}
#controls button[data-action]:disabled{
  opacity:.18;
  filter:grayscale(.85);
  cursor:not-allowed;
}
#controls input:disabled{
  opacity:.22;
  filter:grayscale(.9);
}
#controls button[data-action].legalAction:not(:disabled):hover{
  transform:translateY(-1px);
}

@media(min-width:1200px){
  #tableStage{height:min(74vh,900px)}
}

/* Screen-fit desktop layout: the table and every playing control stay inside
   one browser viewport. Narrow/mobile screens keep the stacked layout above. */
@media(min-width:900px) and (min-height:700px){
  body:has(#game:not([hidden])){height:100dvh;min-height:0;overflow:hidden}
  #game:not([hidden]){
    display:grid;
    grid-template-columns:minmax(0,1fr) clamp(360px,32vw,500px);
    grid-template-rows:auto minmax(0,1fr) auto auto;
    width:100%;
    height:100dvh;
    min-height:0;
    overflow:hidden;
  }
  .gameHeader{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:5px 10px;
    padding:5px 8px;
  }
  .titleBlock{grid-column:1;grid-row:1;white-space:nowrap}
  .cameraControls{grid-column:2;grid-row:1;justify-content:flex-end}
  .viewControls{grid-column:1 / -1;grid-row:2;justify-content:center}
  .cameraControls,.viewControls{gap:4px}
  .viewControls button,.cameraControls button{
    min-height:31px;
    padding:4px 7px;
    border-radius:7px;
    font-size:.69rem;
  }
  .volumeControl{min-height:31px;padding:3px 6px;font-size:.68rem}
  .volumeControl input{width:74px}
  #volumeLabel{min-width:32px}
  #musicVolumeLabel{min-width:32px}

  #tableStage{
    grid-column:1;
    grid-row:2 / 5;
    width:100%;
    height:auto;
    min-height:0;
  }
  #betPanel{
    grid-column:2;
    grid-row:2;
    min-height:0;
    overflow-y:auto;
    padding:6px 8px 7px;
    border-left:1px solid #27332f;
  }
  .betSummary{gap:10px;margin-bottom:4px;font-size:.76rem}
  .playerChipCountSection{margin-bottom:5px;padding:5px 6px}
  .playerChipCounts{gap:3px;margin-top:3px}
  .playerChipCount{padding:3px 4px}
  .chipBetBuilder{
    grid-template-columns:1fr;
    gap:5px;
    padding:6px;
    border-radius:9px;
  }
  .chipWallet{gap:4px;margin-top:3px}
  .denominationChip{
    flex:1 1 30%;
    min-width:92px;
    min-height:44px;
    padding:4px 5px 4px 38px;
  }
  .denominationChip::before{width:27px;height:27px;left:6px}
  .betBreakdownBox{gap:3px;padding:6px 8px}
  #controls{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    margin-top:6px;
  }
  #controls button{min-width:0;min-height:38px;padding:6px;font-size:.82rem}
  .raiseBox{grid-column:1 / -1;width:100%}
  #raiseAmount{width:110px;min-height:38px}
  #raiseSlider{width:auto;min-width:0;flex:1}
  #controls button[data-action="raise"]{grid-column:span 2}
  #status{min-height:23px;padding-top:3px;font-size:.74rem}

  #socialPanel{
    grid-column:2;
    grid-row:3;
    padding:6px 8px;
    border-left:1px solid #27332f;
  }
  .socialTop{display:block;font-size:.72rem}
  .socialHint{display:none}
  .socialActions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin-top:4px}
  .socialActions button,.socialActions input{min-height:34px;padding:4px 6px;font-size:.68rem}
  #requestAmount{width:100%}
  #tradeChipsBtn{grid-column:1 / -1}
  #tableChat{max-height:64px;margin:5px auto;padding:4px 6px;font-size:.7rem}
  .chatComposer{gap:4px}
  .chatComposer input,.chatComposer button{min-height:34px;padding:4px 7px;font-size:.72rem}

  .inviteBar{
    grid-column:2;
    grid-row:4;
    grid-template-columns:minmax(0,1fr) auto;
    padding:5px 8px;
    gap:5px;
    border-left:1px solid #27332f;
  }
  .inviteLabel{display:none}
  .inviteBar input,.inviteBar button{min-height:34px;padding:4px 7px;font-size:.68rem}

  #boardHudCards{gap:7px}
  #boardHudCards .miniCard{width:76px;height:106px}
  .boardHudLabel{font-size:.66rem}
}

@media(min-width:1500px) and (min-height:700px){
  .gameHeader{grid-template-columns:auto minmax(0,1fr) auto}
  .cameraControls{grid-column:2;grid-row:1}
  .viewControls{grid-column:3;grid-row:1}
}

@media(min-width:900px) and (max-height:800px){
  .lastHandBanner{top:6px;left:7px;padding:4px 7px;max-width:68%}
  .lastHandBanner b{font-size:.65rem}
  .playerChipCount small{display:none}
  .playerChipCountSection{margin-bottom:2px;padding:2px 4px}
  .playerChipCounts{margin-top:2px}
  .playerChipCount{padding:2px 4px}
  .chipBetBuilder{gap:2px;padding:3px 4px}
  .chipWallet{gap:3px;margin-top:2px}
  .denominationChip{
    flex:1 1 22%;
    min-width:74px;
    min-height:36px;
    padding:2px 3px 2px 31px;
  }
  .denominationChip::before{width:22px;height:22px;left:4px;border-width:2px;font-size:.5rem}
  .denominationChip small{font-size:.48rem}
  .betBreakdownBox{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:2px 6px;
    padding:3px 6px;
  }
  .betBreakdownBox .controlLabel{grid-column:1}
  #betBreakdown{grid-column:1;font-size:.68rem}
  #clearBetChipsBtn{grid-column:2;grid-row:1 / 3;align-self:center}
  #controls{margin-top:3px}
  #controls button{min-height:34px}
  #raiseAmount{min-height:34px}
  #boardHudCards .miniCard{width:62px;height:87px}
  .miniCard{width:78px;height:109px}
  #actionFeed{max-height:22px;overflow:hidden}
  #tableChat{max-height:44px}
}

@media(max-width:700px){
  .playerChipCounts{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Phone layout keeps the table visible and prioritizes only the controls needed to play the hand. */
@media(max-width:700px), (max-width:900px) and (max-height:500px){
  body:has(#game:not([hidden])){height:100dvh;min-height:0;overflow:hidden}
  #game:not([hidden]){
    display:flex;
    flex-direction:column;
    width:100%;
    height:100dvh;
    min-height:0;
    overflow:hidden;
    padding-bottom:env(safe-area-inset-bottom,0);
  }
  .gameHeader{
    flex:0 0 auto;
    display:grid;
    grid-template-columns:1fr;
    gap:4px;
    max-height:118px;
    padding:4px 6px;
    overflow:hidden;
  }
  .titleBlock{grid-column:1;grid-row:auto;justify-content:center;font-size:.73rem}
  .titleBlock>b{font-size:1rem}
  .cameraControls,.viewControls{
    grid-column:1;
    grid-row:auto;
    width:100%;
    flex-wrap:nowrap;
    justify-content:flex-start;
    gap:4px;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  .cameraControls::-webkit-scrollbar,.viewControls::-webkit-scrollbar{display:none}
  .cameraControls .controlLabel{display:none}
  .viewControls button,.cameraControls button{
    flex:0 0 auto;
    min-height:32px;
    padding:4px 8px;
    border-radius:6px;
    font-size:.67rem;
  }
  .volumeControl{flex:0 0 auto;min-height:32px;padding:3px 6px;font-size:.64rem}
  .volumeControl input{width:74px}

  #tableStage{
    flex:1 1 auto;
    width:100%;
    height:auto;
    min-height:220px;
  }
  .orbitHint{display:none}
  .lastHandBanner{left:5px;top:5px;max-width:92%;padding:4px 6px}
  .lastHandBanner span{font-size:.46rem}
  .lastHandBanner b{font-size:.56rem}

  #playerHud{bottom:3px;width:98vw}
  #bottomInfoDock{gap:2px}
  #boardHudCards{gap:5px}
  #boardHudCards .miniCard{width:clamp(56px,16vw,66px);height:clamp(80px,22.5vw,94px);font-size:clamp(1.2rem,5vw,1.55rem);font-weight:900;border-width:2px;border-radius:7px}
  .boardHudLabel,.heroLabel{margin-bottom:2px;padding:2px 7px;font-size:.62rem}
  #heroCards{gap:4px}
  #heroCards .miniCard{width:52px;height:73px;border-width:2px;border-radius:6px}
  #hudBottom{gap:4px}
  #potHud,#turnHud{padding:5px 8px;font-size:.74rem;font-weight:850}
  #actionFeed{max-height:17px;overflow:hidden;flex-wrap:nowrap;justify-content:flex-start;max-width:96vw}
  .actionFeedItem{padding:2px 5px;font-size:.5rem}
  .heroTurnTimer{width:min(260px,84vw);margin-top:3px;padding:4px 6px 5px}
  .heroTimerText{font-size:.65rem;margin-bottom:2px}
  .heroTimerTrack{height:7px}
  #winnerHud{margin-top:2px;padding:3px 5px}
  .winnerHudLabel{margin-bottom:2px;font-size:.5rem}
  .winnerHandMeta strong{font-size:.56rem}
  .winnerHandMeta span{font-size:.48rem}
  .winnerHandCards .miniCard{width:32px;height:45px}

  /* POKER3D_MOBILE_GAMEPLAY_DOCK_V1
     Mobile has one permanent gameplay surface.
     Secondary chip-management/table tools stay out of the playing area. */
  #autoCallDock{
    display:none!important;
  }

  #betPanel{
    display:block;
    flex:0 0 auto;
    max-height:34dvh;
    overflow-y:auto;
    padding:7px 8px calc(8px + env(safe-area-inset-bottom,0));
  }

  #betPanel .playerChipCountSection,
  #betPanel .chipBetBuilder{
    display:none!important;
  }

  #betPanel .betSummary{
    margin:0 0 6px;
    font-size:.78rem;
  }

  #controls{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
    margin:0;
  }

  #controls button{
    min-width:0;
    min-height:54px;
    padding:7px 5px;
    border-radius:9px;
    font-size:.9rem;
    font-weight:900;
  }

  #controls button[data-action="fold"],
  #controls button[data-action="check"],
  #controls button[data-action="call"]{
    font-size:.95rem;
  }

  .raiseBox{
    grid-column:1 / -1;
    width:100%;
    gap:7px;
  }

  #raiseAmount{
    width:96px;
    min-height:44px;
    font-size:.9rem;
  }

  #raiseSlider{
    width:auto;
    flex:1;
    min-height:32px;
  }

  #controls button[data-action="raise"]{
    grid-column:span 2;
  }

  #status{
    min-height:22px;
    padding-top:4px;
    font-size:.74rem;
    line-height:1.25;
  }

  #socialPanel,
  .inviteBar{
    display:none!important;
  }
}

@media(max-width:900px) and (max-height:500px) and (orientation:landscape){
  .gameHeader{max-height:78px;grid-template-columns:auto minmax(0,1fr)}
  .titleBlock{grid-column:1;grid-row:1 / 3;align-self:center}
  .cameraControls,.viewControls{grid-column:2}
  #tableStage{min-height:150px}
  #betPanel{max-height:38dvh}
  #heroCards .miniCard{width:45px;height:63px}
  #boardHudCards .miniCard{width:54px;height:76px;font-size:1.18rem;font-weight:900}
}

@media(min-width:901px){
  body:has(#game:not([hidden])){height:100vh;overflow:hidden}
  #game:not([hidden]){
    display:grid;
    grid-template-columns:minmax(0,1fr) clamp(390px,28vw,520px);
    grid-template-rows:auto minmax(0,1fr) minmax(180px,28vh) auto;
    height:100vh;
    overflow:hidden;
    background:#050707;
  }
  .gameHeader{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:minmax(170px,auto) minmax(0,1fr) minmax(420px,auto);
    gap:9px;
    align-items:center;
    padding:7px 10px;
  }
  .titleBlock{min-width:0}
  .titleBlock>b{font-size:1.12rem}
  #phase{font-size:.88rem;white-space:nowrap}
  .cameraControls,.viewControls{
    min-width:0;
    flex-wrap:nowrap;
    overflow-x:auto;
    scrollbar-width:thin;
  }
  .viewControls{justify-content:flex-end}
  .cameraControls button,.viewControls button{
    flex:0 0 auto;
    min-height:34px;
    padding:5px 8px;
    border-radius:7px;
    font-size:.72rem;
  }
  .volumeControl{
    flex:0 0 auto;
    min-height:34px;
    padding:4px 7px;
    border-radius:7px;
    font-size:.68rem;
  }
  .volumeControl input{width:80px}
  #volumeLabel,#musicVolumeLabel{min-width:34px}

  #tableStage{
    grid-column:1;
    grid-row:2 / 5;
    height:auto;
    min-height:0;
  }
  #betPanel{
    grid-column:2;
    grid-row:2;
    display:flex;
    flex-direction:column;
    gap:10px;
    min-height:0;
    overflow:hidden;
    border-top:0;
    border-left:1px solid #27332f;
    padding:12px 14px;
  }
  .betSummary{
    order:0;
    justify-content:space-between;
    gap:8px;
    margin:0;
    padding-bottom:9px;
    border-bottom:1px solid #1d2a26;
    font-size:.8rem;
  }
  #controls{
    order:1;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    padding:10px;
    border:1px solid #33594c;
    border-radius:10px;
    background:#0a1411;
    box-shadow:0 10px 28px rgba(0,0,0,.24);
  }
  #controls button{
    min-width:0;
    min-height:48px;
    font-size:.9rem;
  }
  .raiseBox{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:112px minmax(0,1fr);
    width:100%;
  }
  #raiseAmount{width:100%;min-height:42px}
  #raiseSlider{width:100%}
  #controls button[data-action="raise"]{grid-column:1 / 3}
  #status{
    order:2;
    min-height:20px;
    padding:0;
    font-size:.76rem;
  }
  .playerChipCountSection{
    order:3;
    min-height:0;
    margin:0;
    overflow:hidden;
  }
  .playerChipCounts{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:5px;
  }
  .playerChipCount{padding:5px 6px}
  .playerChipCount span{font-size:.66rem}
  .playerChipCount b{font-size:.7rem}
  .playerChipCount small{display:none}
  .chipBetBuilder{
    order:4;
    grid-template-columns:1fr;
    gap:8px;
    min-height:0;
    margin:0;
    padding:0;
    overflow:auto;
    border-top:0;
    background:transparent;
  }
  .chipWallet{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
  }
  .denominationChip{min-width:0;min-height:44px}
  .betBreakdownBox{border:1px solid #22322d}

  #socialPanel{
    grid-column:2;
    grid-row:3;
    min-height:0;
    overflow:auto;
    border-top:1px solid #27332f;
    border-left:1px solid #27332f;
    padding:10px 14px;
  }
  #tableManagement{
    margin:0 0 10px;
    padding:0 0 10px;
    background:transparent;
  }
  .tableSessionSummary{
    display:grid;
    grid-template-columns:1fr;
    gap:6px;
  }
  .tableSessionSummary>div{
    justify-content:space-between;
    padding:7px 9px;
    border:1px solid #22322d;
    border-radius:8px;
    background:#0a100e;
  }
  .tableManagementActions{
    display:grid;
    grid-template-columns:1fr 1fr;
    align-items:stretch;
    gap:7px;
  }
  .tableManagementActions label{grid-column:1 / -1}
  .tableManagementActions button{width:100%}
  .socialTop{display:grid;gap:8px;font-size:.78rem}
  .socialHint{display:block;margin:2px 0 0}
  .socialActions{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  #requestAmount{width:100%;grid-column:1 / -1}
  #tableChat{max-height:110px}

  .inviteBar{
    grid-column:2;
    grid-row:4;
    grid-template-columns:1fr auto auto;
    border-left:1px solid #27332f;
    padding:9px 14px;
  }
  .inviteLabel{display:none}
}


/* POKER3D LOADING SCREEN */
#gameLoadingScreen[hidden]{
  display:none !important;
}

#gameLoadingScreen{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 50% 42%,rgba(28,86,68,.22),transparent 36%),
    rgba(2,5,7,.97);
  backdrop-filter:blur(10px);
}

/* Retro UI: avoid costly compositing and repaint effects on Pi/cheap phones. */
html[data-graphics="retro"] *,
html[data-graphics="retro"] *::before,
html[data-graphics="retro"] *::after{
  animation:none!important;
  transition:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  filter:none!important;
  box-shadow:none!important;
  text-shadow:none!important;
}

html[data-graphics="retro"] button,
html[data-graphics="retro"] dialog,
html[data-graphics="retro"] .panel,
html[data-graphics="retro"] .hudPanel,
html[data-graphics="retro"] .gameHeader,
html[data-graphics="retro"] #turnControls,
html[data-graphics="retro"] #playerHud{
  background-image:none!important;
}

html[data-graphics="retro"] #gameLoadingScreen:not([hidden]){
  animation:poker3dLoadingSafetyExit .01s linear 3s forwards!important;
}

/* POKER3D_TABLE_LOADER_OVERLAY_EXPIRY_V1
   The playable table can already be live while a browser delays a final
   JavaScript callback. This overlay is cosmetic, never allowed to block play. */
#gameLoadingScreen:not([hidden]){
  animation:poker3dLoadingSafetyExit .01s linear 3s forwards;
}

@keyframes poker3dLoadingSafetyExit{
  to{
    visibility:hidden;
    opacity:0;
    pointer-events:none;
  }
}

.poker3dLoadingCard{
  width:min(430px,calc(100vw - 40px));
  padding:38px 34px;
  text-align:center;
  border:1px solid rgba(218,183,100,.28);
  border-radius:22px;
  background:rgba(8,13,15,.92);
  box-shadow:
    0 28px 90px rgba(0,0,0,.65),
    inset 0 1px 0 rgba(255,255,255,.04);
}

.poker3dLoadingBrand{
  margin-bottom:28px;
  color:#d7ba75;
  font:900 34px/1 Georgia,serif;
  letter-spacing:.16em;
}

.poker3dLoadingSpinner{
  width:62px;
  height:62px;
  margin:0 auto 24px;
  border:5px solid rgba(255,255,255,.09);
  border-top-color:#d7ba75;
  border-right-color:#398b72;
  border-radius:50%;
  animation:poker3dLoadingSpin .9s linear infinite;
}

#gameLoadingTitle{
  margin:0 0 9px;
  font-size:23px;
}

#gameLoadingDetail{
  min-height:24px;
  margin:0 0 24px;
  color:#aebbb7;
}

.poker3dLoadingBar{
  position:relative;
  height:5px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.08);
}

.poker3dLoadingBar span{
  position:absolute;
  top:0;
  bottom:0;
  width:42%;
  border-radius:999px;
  background:linear-gradient(90deg,#398b72,#d7ba75);
  animation:poker3dLoadingSlide 1.25s ease-in-out infinite;
}

@keyframes poker3dLoadingSpin{
  to{transform:rotate(360deg)}
}

@keyframes poker3dLoadingSlide{
  0%{left:-45%}
  50%{left:52%}
  100%{left:105%}
}

@media (prefers-reduced-motion:reduce){
  .poker3dLoadingSpinner,
  .poker3dLoadingBar span{
    animation:none;
  }

  .poker3dLoadingBar span{
    left:29%;
  }
}


/* POKER3D TURN-ONLY BOTTOM DOCK */

#turnActionDock[hidden],
#tableManagement[hidden]{
  display:none !important;
}

#turnActionDock{
  position:fixed;
  left:50%;
  bottom:max(10px,env(safe-area-inset-bottom,0px));
  transform:translateX(-50%);
  z-index:9500;

  width:min(1180px,calc(100vw - 24px));

  display:grid;
  grid-template-columns:minmax(390px,.9fr) minmax(520px,1.25fr);
  gap:10px;

  pointer-events:auto;
}

.turnDockPanel{
  min-width:0;
  padding:9px 10px;

  background:rgba(5,10,10,.94);
  border:1px solid #385449;
  border-radius:12px;

  box-shadow:
    0 12px 38px rgba(0,0,0,.68),
    inset 0 1px 0 rgba(255,255,255,.035);

  backdrop-filter:blur(8px);
}

.turnDockTitle{
  margin:0 0 6px;
  color:#d9bd69;

  font-size:.68rem;
  font-weight:950;
  letter-spacing:.1em;
  text-transform:uppercase;
}


/* ================================
   ACTION SIDE
   ================================ */

#game #turnActionDock #controls{
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr));
  grid-template-rows:auto auto;

  gap:6px;
  margin:0;
  padding:0;

  border:0;
  background:transparent;
}

#game #turnActionDock #controls button{
  min-width:0;
  min-height:43px;
  padding:6px 8px;
}

#game #turnActionDock #controls button[data-action="fold"]{
  grid-column:1;
  grid-row:1;
}

#game #turnActionDock #controls button[data-action="check"]{
  grid-column:2;
  grid-row:1;
}

#game #turnActionDock #controls button[data-action="call"]{
  grid-column:3;
  grid-row:1;
}

#game #turnActionDock #controls button[data-action="raise"]{
  grid-column:4;
  grid-row:1;
}

#game #turnActionDock #controls button[data-action="allin"]{
  grid-column:5;
  grid-row:1;
}

#game #turnActionDock .raiseBox{
  grid-column:1 / -1;
  grid-row:2;

  display:flex;
  align-items:center;
  gap:8px;

  width:100%;
  margin:0;
}

#game #turnActionDock #raiseAmount{
  width:105px;
  min-height:38px;
}

#game #turnActionDock #raiseSlider{
  flex:1;
  width:auto;
  min-width:120px;
}

#game #turnActionDock #status{
  min-height:18px;
  margin:5px 0 0;
  padding:0;

  color:#f3d878;
  font-size:.7rem;
  text-align:center;
}


/* ================================
   CHIP SIDE
   ================================ */

#game #turnActionDock .chipBetBuilder{
  display:grid !important;
  grid-template-columns:minmax(0,1.35fr) minmax(190px,.65fr);

  gap:8px;
  margin:0;
  padding:0;

  background:transparent;
  border:0;
}

#game #turnActionDock .chipWallet{
  display:flex !important;
  gap:5px;
  margin-top:4px;
  flex-wrap:wrap;
}

#game #turnActionDock .denominationChip{
  flex:1 1 29%;
  min-width:72px;
  min-height:42px;

  padding-top:4px;
  padding-bottom:4px;
}

#game #turnActionDock .betBreakdownBox{
  margin:0;
  padding:7px 8px;

  border:1px solid #263c34;
  border-radius:8px;
  background:#080e0c;
}


/* ================================
   HIDDEN TABLE SETTINGS
   ================================ */

#tableSettingsToggle{
  min-height:36px;
  margin:0 0 8px;
  padding:6px 11px;

  background:#111b18;
  border:1px solid #3a5149;

  color:#b9cec5;
  font-size:.72rem;
}

#tableSettingsToggle[aria-expanded="true"]{
  border-color:#b89b47;
  color:#efd57d;
}


/* ================================
   SMALLER SCREENS
   ================================ */

@media(max-width:900px){
  #turnActionDock{
    width:calc(100vw - 12px);
    bottom:max(6px,env(safe-area-inset-bottom,0px));

    grid-template-columns:1fr;
    gap:5px;
  }

  .turnDockPanel{
    padding:6px;
  }

  .turnDockTitle{
    margin-bottom:4px;
    font-size:.57rem;
  }

  #game #turnActionDock #controls button{
    min-height:39px;
    font-size:.72rem;
  }

  #game #turnActionDock .chipBetBuilder{
    display:grid !important;
    grid-template-columns:1fr 180px;
    gap:5px;
  }

  #game #turnActionDock .denominationChip{
    min-height:36px;
    min-width:64px;
  }
}

@media(max-width:600px){
  #game #turnActionDock .chipBetBuilder{
    grid-template-columns:1fr;
  }

  #game #turnActionDock #controls{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }

  #game #turnActionDock #controls button{
    padding:4px 3px;
    font-size:.65rem;
  }

  #game #turnActionDock #raiseAmount{
    width:82px;
  }
}


/* POKER3D FULLSCREEN GAME OVERLAY HUD */

body:has(#game:not([hidden])){
  width:100vw !important;
  height:100vh !important;
  min-height:0 !important;
  margin:0 !important;
  overflow:hidden !important;
  background:#000;
}

#game:not([hidden]){
  position:fixed !important;
  inset:0 !important;

  display:block !important;

  width:100vw !important;
  height:100vh !important;
  min-height:0 !important;

  margin:0 !important;
  padding:0 !important;

  overflow:hidden !important;
  background:#000;
}


/* ===================================
   THE 3D TABLE IS THE ENTIRE SCREEN
   =================================== */

#game #tableStage{
  position:absolute !important;
  inset:0 !important;

  width:100% !important;
  height:100% !important;

  min-width:0 !important;
  min-height:0 !important;

  margin:0 !important;
  padding:0 !important;

  z-index:0 !important;

  overflow:hidden !important;
}

#game #scene{
  position:absolute !important;
  inset:0 !important;

  width:100% !important;
  height:100% !important;

  display:block !important;
}


/* ===================================
   TOP BAR NOW FLOATS OVER THE CAMERA
   =================================== */

#game .gameHeader{
  position:absolute !important;
  top:0 !important;
  left:0 !important;
  right:0 !important;

  z-index:9000 !important;

  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;

  width:auto !important;

  margin:0 !important;
  padding:5px 8px !important;

  gap:5px !important;

  background:rgba(4,9,9,.87) !important;
  border-bottom:1px solid rgba(88,122,110,.45) !important;

  backdrop-filter:blur(9px);
}

#game .gameHeader button{
  min-height:30px !important;
  padding:4px 7px !important;
  font-size:.67rem !important;
}

#game .gameHeader .controlLabel{
  display:none;
}

#game .cameraControls,
#game .viewControls{
  gap:4px !important;
}

#game .volumeControl{
  min-height:30px !important;
  padding:3px 5px !important;
  font-size:.62rem !important;
}

#game .volumeControl input{
  width:68px !important;
}


/* ===================================
   OLD PAGE-LAYOUT PANELS NO LONGER
   TAKE ANY SCREEN SPACE
   =================================== */

#game #betPanel,
#game #socialPanel,
#game #mobileGameTabs{
  display:none !important;
}


/* ===================================
   COMPACT STACK / BET / CALL STATUS
   =================================== */

#playerStatsOverlay{
  position:absolute;
  top:52px;
  left:10px;

  z-index:7000;

  pointer-events:none;
}

#playerStatsOverlay .betSummary{
  display:flex !important;
  align-items:center !important;

  gap:10px !important;

  margin:0 !important;
  padding:6px 9px !important;

  border:1px solid rgba(79,111,100,.72);
  border-radius:9px;

  background:rgba(5,11,10,.82);

  color:#b8cec5;
  font-size:.69rem !important;

  backdrop-filter:blur(7px);
}

#playerStatsOverlay .betSummary b{
  color:#fff;
}


/* ===================================
   TOP-RIGHT UTILITY BUTTONS
   =================================== */

#overlayUtilityButtons{
  position:absolute;
  top:52px;
  right:10px;

  z-index:8100;

  display:flex;
  gap:5px;
}

#overlayUtilityButtons button{
  min-height:32px;
  padding:5px 9px;

  border-radius:8px;

  background:rgba(7,15,13,.88);
  border:1px solid #3c584f;

  font-size:.68rem;
  font-weight:850;

  backdrop-filter:blur(7px);
}

#overlayUtilityButtons button[aria-expanded="true"]{
  color:#ffe18a;
  border-color:#b8973b;
}


/* ===================================
   GENERIC FLOATING UTILITY PANELS
   =================================== */

.pokerOverlayPanel[hidden],
#chatOverlayPanel[hidden]{
  display:none !important;
}

.pokerOverlayPanel{
  position:absolute;
  top:91px;
  right:10px;

  z-index:8200;

  width:min(390px,calc(100vw - 20px));
  max-height:calc(100vh - 110px);

  overflow:auto;

  border:1px solid #405e53;
  border-radius:12px;

  background:rgba(5,11,10,.95);

  box-shadow:0 18px 60px rgba(0,0,0,.62);

  backdrop-filter:blur(10px);
}

.pokerOverlayPanelHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:8px;

  padding:8px 9px;

  border-bottom:1px solid #263a33;

  background:rgba(12,24,20,.96);
}

.pokerOverlayPanelHeader strong{
  color:#ecd378;

  font-size:.7rem;
  font-weight:950;
  letter-spacing:.08em;
}

.pokerOverlayPanelHeader button{
  min-height:30px;
  padding:4px 7px;

  font-size:.62rem;
}

.pokerOverlayPanelBody{
  padding:8px;
}


/* ===================================
   TABLE CHIP COUNTS
   =================================== */

#chipCountOverlayPanel{
  width:min(350px,calc(100vw - 20px));
}

#chipCountOverlayPanel .playerChipCountSection{
  display:block !important;

  margin:0 !important;
  padding:0 !important;

  overflow:visible !important;

  border:0 !important;
  background:transparent !important;
}

#chipCountOverlayPanel .playerChipCountSection>.controlLabel{
  display:none;
}

#chipCountOverlayPanel .playerChipCounts{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;

  gap:4px !important;

  margin:0 !important;
}

#shopOverlayPanel{
  width:min(430px,calc(100vw - 20px));
}

.shopBalance{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  padding:9px 10px;
  border:1px solid #3e5e52;
  border-radius:8px;
  background:#0d1815;
}

.shopBalance span{
  color:#9fb7ae;
  font-size:.7rem;
  font-weight:900;
  text-transform:uppercase;
}

.shopBalance b{
  color:#f2d56e;
  font-size:1.05rem;
}

.shopTabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin-bottom:8px;
}

.shopTabs button[aria-pressed="true"]{
  color:#ffe18a;
  border-color:#b8973b;
}

.shopGrid{
  display:grid;
  gap:7px;
}

.shopItem{
  display:grid;
  gap:7px;
  padding:9px;
  border:1px solid #304b42;
  border-radius:8px;
  background:#0b1512;
}

.shopItemTop{
  display:flex;
  align-items:start;
  justify-content:space-between;
  gap:8px;
}

.shopItemTop strong{
  color:#eef8f2;
  font-size:.83rem;
}

.shopItemTop span,
.shopPrice,
.shopStatus{
  color:#9cb3aa;
  font-size:.68rem;
  font-weight:800;
}

.shopPrice{
  color:#f2d56e;
}

.shopItemActions{
  display:flex;
  gap:6px;
}

.shopItemActions button{
  min-height:32px;
  padding:5px 9px;
  font-size:.68rem;
}

#chipCountOverlayPanel .playerChipCount{
  padding:4px 5px !important;
}

#chipCountOverlayPanel .playerChipCount small{
  display:none !important;
}


/* ===================================
   PLAYER TOOLS
   =================================== */

#playersOverlayPanel{
  width:min(430px,calc(100vw - 20px));
}

#playersOverlayPanel .socialTop{
  display:grid !important;

  gap:8px !important;

  margin:0 !important;
  padding:0 !important;

  font-size:.72rem !important;
}

#playersOverlayPanel .socialHint{
  display:block !important;

  margin:2px 0 0 !important;

  font-size:.62rem;
}

#playersOverlayPanel .socialActions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;

  gap:5px !important;

  margin:0 !important;
}

#playersOverlayPanel #requestAmount{
  width:100% !important;
  grid-column:1 / -1;
}

#playersOverlayPanel .socialActions button,
#playersOverlayPanel .socialActions input{
  min-height:34px !important;
  padding:5px 7px !important;

  font-size:.67rem !important;
}

#playersOverlayPanel .inviteBar{
  position:static !important;

  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto auto !important;

  gap:5px !important;

  margin:9px 0 0 !important;
  padding:8px 0 0 !important;

  border-top:1px solid #26372f !important;
  border-left:0 !important;

  background:transparent !important;
}

#playersOverlayPanel .inviteLabel{
  display:none !important;
}

#playersOverlayPanel .inviteBar input,
#playersOverlayPanel .inviteBar button{
  min-height:32px !important;
  padding:4px 6px !important;

  font-size:.63rem !important;
}


/* ===================================
   GAME SETTINGS
   =================================== */

#gameSettingsOverlayPanel{
  width:min(390px,calc(100vw - 20px));
}

#gameSettingsOverlayPanel #tableManagement{
  display:grid !important;

  gap:8px !important;

  margin:0 !important;
  padding:0 !important;

  border:0 !important;
  background:transparent !important;
}

#gameSettingsOverlayPanel .tableSessionSummary{
  display:grid !important;
  grid-template-columns:1fr !important;

  gap:5px !important;
}

#gameSettingsOverlayPanel .tableSessionSummary>div{
  display:flex !important;
  justify-content:space-between !important;

  padding:6px 7px;

  border:1px solid #283b34;
  border-radius:7px;

  background:#09110f;
}

#gameSettingsOverlayPanel .tableManagementActions{
  display:grid !important;
  grid-template-columns:1fr 1fr !important;

  gap:5px !important;
}

#gameSettingsOverlayPanel .tableManagementActions label{
  grid-column:1 / -1 !important;
}

#gameSettingsOverlayPanel .tableManagementActions button,
#gameSettingsOverlayPanel .tableManagementActions select{
  width:100% !important;
}


/* ===================================
   CHAT
   =================================== */

#chatOverlayToggle{
  position:absolute;
  right:12px;
  bottom:12px;

  z-index:9400;

  min-width:72px;
  min-height:38px;

  display:flex;
  align-items:center;
  justify-content:center;

  gap:6px;

  padding:6px 10px;

  border:1px solid #4a7566;
  border-radius:10px;

  background:rgba(8,19,16,.94);

  box-shadow:0 8px 28px rgba(0,0,0,.5);

  font-weight:900;

  backdrop-filter:blur(8px);

  transition:bottom .18s ease;
}

#chatUnreadBadge{
  min-width:19px;
  height:19px;

  display:grid;
  place-items:center;

  padding:0 4px;

  border-radius:999px;

  background:#df4e4e;
  color:white;

  font-size:.58rem;
  font-weight:1000;

  box-shadow:0 0 0 2px #081310;
}

#chatUnreadBadge[hidden]{
  display:none !important;
}

#chatOverlayPanel{
  position:absolute;

  right:12px;
  bottom:58px;

  z-index:9300;

  width:min(390px,calc(100vw - 24px));

  max-height:min(500px,55vh);

  display:flex;
  flex-direction:column;

  overflow:hidden;

  border:1px solid #45685c;
  border-radius:12px;

  background:rgba(5,11,10,.96);

  box-shadow:0 18px 64px rgba(0,0,0,.68);

  backdrop-filter:blur(11px);

  transition:bottom .18s ease;
}

.chatHeaderActions{
  display:flex;
  gap:5px;
}

#chatModeBtn{
  color:#d8c170;
}

.chatOverlayBody{
  min-height:0;

  display:flex;
  flex-direction:column;

  padding:7px;
}

#chatOverlayPanel #tableChat{
  flex:1 1 auto;

  min-height:150px;
  max-height:330px !important;

  overflow:auto !important;

  margin:0 0 6px !important;
  padding:7px 8px !important;

  border:1px solid #253830 !important;

  background:rgba(2,6,5,.78) !important;

  font-size:.73rem !important;
}

#chatOverlayPanel .chatComposer{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;

  gap:5px !important;
}

#chatOverlayPanel .chatComposer input,
#chatOverlayPanel .chatComposer button{
  min-height:36px !important;

  padding:5px 7px !important;

  font-size:.71rem !important;
}


/* ===================================
   YOUR EXISTING CARDS / BOARD HUD
   =================================== */

#game #playerHud{
  z-index:4000 !important;

  bottom:12px !important;

  transition:bottom .18s ease;
}

#game.turnControlsVisible #playerHud{
  bottom:190px !important;
}


/* ===================================
   TURN DOCK WINS BOTTOM PRIORITY
   =================================== */

#game #turnActionDock{
  z-index:9600 !important;
}

#game.turnControlsVisible #chatOverlayToggle{
  bottom:190px;
}

#game.turnControlsVisible #chatOverlayPanel{
  bottom:236px;
}


/* ===================================
   OTHER EXISTING OVERLAYS
   =================================== */

#game .orbitHint{
  right:auto !important;
  left:10px !important;
  bottom:9px !important;
}

#game.turnControlsVisible .orbitHint{
  display:none !important;
}


/* ===================================
   SMALLER DESKTOP / TABLET
   =================================== */

@media(max-width:1100px){
  #game .gameHeader{
    overflow-x:auto;
    flex-wrap:nowrap !important;
  }

  #game .titleBlock,
  #game .cameraControls,
  #game .viewControls{
    flex:0 0 auto;
    flex-wrap:nowrap !important;
  }

  #playerStatsOverlay{
    top:48px;
  }

  #overlayUtilityButtons{
    top:48px;
  }

  .pokerOverlayPanel{
    top:87px;
  }
}

@media(max-width:700px){
  #playerStatsOverlay{
    left:5px;
    top:84px;
  }

  #overlayUtilityButtons{
    top:84px;
    right:5px;
  }

  #overlayUtilityButtons button{
    padding:4px 6px;
    font-size:.58rem;
  }

  .pokerOverlayPanel{
    top:122px;
    right:5px;

    width:calc(100vw - 10px);
  }

  #chatOverlayPanel{
    right:5px;

    width:calc(100vw - 10px);
  }

  #chatOverlayToggle{
    right:5px;
  }
}


/* POKER3D GUIDED TABLE SETUP */

#tableSetupGuide[hidden]{
  display:none !important;
}

#tableSetupGuide{
  position:absolute;
  inset:0;

  z-index:9100;

  display:flex;
  justify-content:center;
  align-items:flex-start;

  padding:58px 12px 0;

  pointer-events:none;
}

.tableSetupGuideCard{
  width:min(460px,calc(100vw - 24px));

  padding:10px 14px;

  border:1px solid rgba(89,132,116,.72);
  border-radius:12px;

  background:rgba(5,13,11,.91);

  box-shadow:0 12px 38px rgba(0,0,0,.48);

  backdrop-filter:blur(9px);

  pointer-events:auto;
}

.tableSetupEyebrow{
  margin-bottom:3px;

  color:#d7bc64;

  font-size:.58rem;
  font-weight:950;

  letter-spacing:.13em;
}

#tableSetupGuideTitle{
  margin:0;

  color:#fff;

  font-size:1rem;
  line-height:1.15;
}

#tableSetupGuideMessage{
  margin:4px 0 6px;

  color:#b8cbc4;

  font-size:.71rem;
  line-height:1.35;
}

#tableSetupProgress{
  color:#e4ca74;

  font-size:.65rem;
  font-weight:850;
}


/* Required first-time setup becomes impossible to miss. */

#tableSetupGuide.requiresSetup{
  align-items:center;

  padding-top:0;

  background:rgba(0,0,0,.62);

  backdrop-filter:blur(3px);

  pointer-events:auto;
}

#tableSetupGuide.requiresSetup .tableSetupGuideCard{
  width:min(520px,calc(100vw - 24px));

  padding:20px;

  border-color:#b99b46;

  background:rgba(5,12,10,.98);

  box-shadow:
    0 24px 90px rgba(0,0,0,.8),
    inset 0 1px 0 rgba(255,255,255,.04);
}

#tableSetupGuide.requiresSetup #tableSetupGuideTitle{
  font-size:1.45rem;
}

#tableSetupGuide.requiresSetup #tableSetupGuideMessage{
  margin:7px 0 10px;

  font-size:.82rem;
}


/* Host setup form */

#tableSetupHostForm[hidden]{
  display:none !important;
}

#tableSetupHostForm{
  display:grid;

  gap:9px;

  margin-top:14px;
}

#tableSetupHostForm label{
  display:grid;

  gap:5px;

  color:#c9dad3;

  font-size:.72rem;
  font-weight:900;
}

#tableSetupExpected{
  width:100%;
  min-height:48px;

  padding:8px 10px;

  border:1px solid #526c62;
  border-radius:9px;

  background:#09120f;
  color:white;

  font-size:1rem;
  font-weight:900;
}

#tableSetupSave{
  width:100%;
  min-height:50px;

  border-color:#a98d3d;

  background:#315f4c;
  color:#fff;

  font-size:.9rem;
  font-weight:950;
}

#tableSetupHostForm small{
  color:#768f85;

  font-size:.64rem;
  line-height:1.35;
}


@media(max-width:700px){
  #tableSetupGuide{
    padding-top:90px;
  }

  #tableSetupGuide.requiresSetup{
    padding:10px;
  }

  #tableSetupGuide.requiresSetup .tableSetupGuideCard{
    padding:16px;
  }
}


/* POKER3D PERSISTENT HAND HISTORY V2 */

/* Old temporary/clipped feeds are replaced by the permanent panel. */
#actionFeed{
  display:none !important;
}

.lastHandBanner{
  display:none !important;
}


#persistentHandHistory{
  position:absolute !important;

  /*
     Top header = ~40px.
     Stack/bet box begins around 52px.
     Hand history sits safely BELOW both.
  */
  top:98px !important;
  left:10px !important;

  z-index:7050 !important;

  width:min(350px,calc(100vw - 20px)) !important;
  max-height:min(56vh,560px) !important;

  display:flex !important;
  flex-direction:column !important;

  overflow:hidden !important;

  border:1px solid rgba(83,118,105,.72) !important;
  border-radius:10px !important;

  background:rgba(4,10,9,.86) !important;

  box-shadow:0 10px 28px rgba(0,0,0,.42) !important;

  backdrop-filter:blur(8px);

  pointer-events:auto !important;
}


#persistentHandHistoryHeader{
  flex:0 0 auto;

  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:10px;

  padding:7px 9px;

  border-bottom:1px solid rgba(91,124,112,.48);

  background:rgba(10,20,17,.96);
}


#persistentHandHistoryHeader strong{
  color:#e7c965;

  font-size:.7rem;
  font-weight:950;

  letter-spacing:.09em;
}


#persistentHandHistoryHeader span{
  color:#819a90;

  font-size:.57rem;
  font-weight:800;
}


#persistentHandHistoryBody{
  min-height:0;

  overflow-y:auto !important;
  overscroll-behavior:contain;

  scrollbar-width:thin;
}


.handHistorySection{
  padding:7px 9px;

  border-bottom:1px solid rgba(80,107,98,.32);
}


.handHistorySection:last-child{
  border-bottom:0;
}


.handHistorySection.currentHand{
  background:rgba(29,65,52,.25);
}


.handHistoryHeading{
  margin-bottom:4px;
}


.handHistoryHeading strong{
  color:#bcd3ca;

  font-size:.66rem;
  font-weight:950;

  letter-spacing:.05em;
}


.currentHand .handHistoryHeading strong{
  color:#ffe27d;
}


.handHistoryWinner{
  margin:1px 0 5px;

  color:#fff1bc;

  font-size:.66rem;
  font-weight:850;

  line-height:1.3;
}


.handHistoryActions{
  display:grid;

  gap:2px;
}


.handHistoryAction{
  color:#a9beb6;

  font-size:.62rem;
  line-height:1.3;

  overflow-wrap:anywhere;
}


.handHistoryEmpty,
.handHistoryWaiting{
  color:#6f8980;

  font-size:.6rem;
  font-style:italic;
}


.handHistoryWaiting{
  padding:10px;
}


/* Smaller desktop/tablet */
@media(max-width:1100px){
  #persistentHandHistory{
    top:94px !important;

    width:min(
      325px,
      calc(100vw - 20px)
    ) !important;

    max-height:50vh !important;
  }
}


/* Mobile header is taller */
@media(max-width:700px){
  #persistentHandHistory{
    top:128px !important;
    left:5px !important;

    width:min(
      290px,
      calc(100vw - 10px)
    ) !important;

    max-height:40vh !important;
  }

  #persistentHandHistoryHeader{
    padding:5px 7px;
  }

  .handHistorySection{
    padding:5px 7px;
  }

  .handHistoryAction{
    font-size:.56rem;
  }

  .handHistoryWinner{
    font-size:.59rem;
  }
}



/* POKER3D COMPACT PAST HANDS */

.handHistorySection.previousHand{
  padding:4px 8px !important;
  min-height:0 !important;
}

.previousHandRow{
  display:flex;
  align-items:center;

  gap:7px;

  min-width:0;
}

.previousHandNumber{
  flex:0 0 auto;

  color:#6f8980;

  font-size:.55rem;
  font-weight:900;
}

.previousHandResult{
  min-width:0;

  color:#d6e3de;

  font-size:.61rem;
  font-weight:800;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* Live hand gets the visual space instead. */

.handHistorySection.currentHand{
  padding:8px 9px !important;
}

.currentHand .handHistoryActions{
  display:grid;
  gap:3px;
}

.currentHand .handHistoryAction{
  font-size:.64rem;
}


/* Six old hands now occupy very little vertical space. */

@media(max-width:700px){
  .handHistorySection.previousHand{
    padding:3px 6px !important;
  }

  .previousHandNumber{
    font-size:.5rem;
  }

  .previousHandResult{
    font-size:.55rem;
  }
}



/* POKER3D GOLD BOUNTY HISTORY */

.handHistorySection.previousHand.bountyWin{
  position:relative;

  border-left:3px solid #e7bd43 !important;

  background:
    linear-gradient(
      100deg,
      rgba(101,72,10,.28),
      rgba(219,174,54,.14),
      rgba(255,227,126,.23),
      rgba(93,63,7,.24)
    ) !important;

  background-size:220% 100% !important;

  animation:
    poker3dBountyHandShimmer 4.5s linear infinite;
}


.bountyWin .previousHandNumber{
  color:#e7bd43 !important;
}


.bountyWin .previousHandResult{
  color:#fff1b0 !important;

  text-shadow:
    0 0 7px rgba(238,190,63,.16);
}


.bountyHistoryBadge{
  flex:0 0 auto;

  padding:2px 6px;

  border:1px solid rgba(255,220,105,.75);
  border-radius:999px;

  background:
    linear-gradient(
      110deg,
      #8c6817,
      #f0ca55,
      #fff2a5,
      #d19a27,
      #ffe67f,
      #8c6817
    );

  background-size:250% 100%;

  color:#211600;

  font-size:.52rem;
  font-weight:1000;

  letter-spacing:.045em;

  text-shadow:
    0 1px 0 rgba(255,255,255,.35);

  box-shadow:
    0 0 8px rgba(239,191,55,.25);

  animation:
    poker3dBountyBadgeShimmer 2.8s linear infinite;
}


@keyframes poker3dBountyHandShimmer{
  from{
    background-position:200% 0;
  }

  to{
    background-position:-20% 0;
  }
}


@keyframes poker3dBountyBadgeShimmer{
  from{
    background-position:200% 0;
  }

  to{
    background-position:-50% 0;
  }
}


@media(prefers-reduced-motion:reduce){
  .handHistorySection.previousHand.bountyWin,
  .bountyHistoryBadge{
    animation:none !important;
  }
}


/* Don't let bounty badge crush winner text on narrow screens. */
@media(max-width:700px){
  .bountyHistoryBadge{
    padding:2px 5px;

    font-size:.48rem;
  }
}



/* POKER3D SERVER DEV CONSOLE */

#developerConsole[hidden],
#devConsoleLauncher[hidden]{
  display:none!important;
}

#developerConsole{
  position:fixed;
  top:58px;
  right:18px;
  z-index:30000;

  width:min(360px,calc(100vw - 24px));
  max-height:calc(100vh - 82px);

  overflow:hidden;

  border:1px solid rgba(113,220,185,.7);
  border-radius:12px;

  background:rgba(4,12,10,.98);
  color:#dceae5;

  box-shadow:
    0 18px 60px rgba(0,0,0,.72);

  pointer-events:auto;
}

.devConsoleHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;

  padding:10px 12px;

  border-bottom:
    1px solid rgba(91,180,150,.35);

  background:#0d1f1a;
}

.devConsoleHeader > div{
  display:grid;
}

.devConsoleHeader strong{
  color:#70d8b3;
  font-size:.72rem;
  font-weight:1000;
  letter-spacing:.09em;
}

.devConsoleHeader span{
  color:#68867b;
  font-size:.52rem;
  font-weight:900;
}

#devConsoleClose{
  width:30px;
  height:30px;
  padding:0;
}

.devConsoleBody{
  display:grid;
  gap:10px;

  max-height:calc(100vh - 145px);

  padding:11px;
  overflow:auto;
}

.devField,
.devSection{
  display:grid;
  gap:7px;
}

.devField > span,
.devSection > strong{
  color:#8fab9f;
  font-size:.58rem;
  font-weight:950;
  letter-spacing:.07em;
}

.devSection{
  padding:9px;

  border:
    1px solid rgba(71,103,92,.4);

  border-radius:9px;

  background:#08110f;
}

.devCardRow{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}

.devFitGrid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}

.devFitGrid label{
  display:grid;
  gap:4px;
  color:#8fab9f;
  font-size:.56rem;
  font-weight:950;
}

.devToggleRow{
  display:flex;
  align-items:center;
  gap:7px;
  color:#aac5bb;
  font-size:.62rem;
  font-weight:850;
}

#developerConsole .devToggleRow input{
  width:auto;
  min-height:auto;
  margin:0;
}

#developerConsole select,
#developerConsole input{
  width:100%;
  box-sizing:border-box;

  padding:7px 8px;

  border:
    1px solid rgba(93,132,118,.55);

  border-radius:7px;

  background:#050c0a;
  color:#e4eee9;

  font-weight:800;
}

#developerConsole button{
  min-height:32px;

  border:
    1px solid rgba(98,137,123,.62);

  border-radius:7px;

  background:#13231e;
  color:#d7e6e0;

  font-size:.64rem;
  font-weight:900;

  cursor:pointer;
}

#developerConsole .devPrimary{
  border-color:#55c59d;
  background:#236e55;
  color:white;
}

#developerConsole .devGold{
  border-color:#e8bd48;
  background:#c99c2c;
  color:#171000;
}

.devSection.danger button{
  border-color:#dc4f4f;
  background:#411919;
  color:#ffc8c8;
}

.devInfo,
.devConsoleStatus{
  padding:7px 8px;

  border-radius:7px;

  background:#07100e;

  font-size:.62rem;
  font-weight:800;
}

.devConsoleStatus{
  color:#71ddb7;
}

.devConsoleStatus[data-error="true"]{
  color:#ff8585;
}

#devConsoleLauncher{
  position:fixed;
  right:12px;
  bottom:12px;
  z-index:29999;

  padding:7px 10px;

  border:1px solid #55cfa2;
  border-radius:7px;

  background:#05110d;
  color:#68dcb2;

  font-size:.58rem;
  font-weight:1000;

  cursor:pointer;
}

@media(max-width:700px){
  #developerConsole{
    top:52px;
    right:6px;
    width:calc(100vw - 12px);
  }
}


/* POKER3D_MOBILE_FULLSCREEN_MENU_V1 */
#mobileMenuBtn,
#mobileMenuBackdrop{
  display:none;
}

@media(max-width:700px), (max-width:900px) and (max-height:500px){

  /* Header becomes an off-canvas menu instead of consuming table space. */
  .gameHeader{
    position:fixed !important;
    z-index:10021;
    top:0;
    right:0;
    left:auto;
    width:min(88vw,380px);
    height:100dvh;
    max-height:none !important;
    padding:
      calc(58px + env(safe-area-inset-top,0))
      12px
      calc(18px + env(safe-area-inset-bottom,0));
    margin:0;
    overflow-y:auto !important;
    overscroll-behavior:contain;

    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    gap:14px;

    background:
      linear-gradient(180deg,#0d1513 0%,#070b0a 100%);
    border:0;
    border-left:1px solid #40554d;

    box-shadow:-18px 0 48px rgba(0,0,0,.68);

    transform:translateX(105%);
    transition:transform .22s ease;
  }

  #game.mobile-menu-open .gameHeader{
    transform:translateX(0);
  }

  #mobileMenuBtn{
    display:block;
    position:fixed;
    z-index:10030;
    top:calc(8px + env(safe-area-inset-top,0));
    right:9px;

    min-width:88px;
    min-height:44px;
    padding:7px 11px;

    border:1px solid #68b99b;
    border-radius:999px;
    background:rgba(7,17,14,.94);
    color:#f6e29a;

    box-shadow:0 5px 20px rgba(0,0,0,.55);
    backdrop-filter:blur(8px);

    font-size:.72rem;
    font-weight:950;
    letter-spacing:.04em;
  }

  #mobileMenuBackdrop{
    display:block;
    position:fixed;
    z-index:10020;
    inset:0;
    pointer-events:none;
    opacity:0;
    background:rgba(0,0,0,.66);
    backdrop-filter:blur(2px);
    transition:opacity .18s ease;
  }

  #game.mobile-menu-open #mobileMenuBackdrop{
    pointer-events:auto;
    opacity:1;
  }

  .gameHeader .titleBlock{
    display:flex;
    justify-content:flex-start;
    align-items:center;
    gap:8px;
    width:100%;
    padding-bottom:10px;
    border-bottom:1px solid #263a33;
  }

  .gameHeader .titleBlock>b{
    font-size:1.25rem;
  }

  .gameHeader #phase{
    font-size:.76rem;
  }

  .cameraControls,
  .viewControls{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    width:100% !important;
    gap:8px !important;
    overflow:visible !important;
  }

  .cameraControls .controlLabel{
    display:block !important;
    grid-column:1 / -1;
    padding:2px 1px;
    color:#89a49a;
    font-size:.72rem;
  }

  .cameraControls button,
  .viewControls button{
    width:100%;
    min-width:0;
    min-height:48px !important;
    padding:8px 7px !important;
    border-radius:9px !important;
    font-size:.78rem !important;
    white-space:normal;
    line-height:1.15;
  }

  .viewControls #zoomLabel{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
    border:1px solid #34483f;
    border-radius:9px;
    background:#0e1714;
    font-weight:900;
  }

  .volumeControl{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    width:100%;
    min-height:50px !important;
    gap:8px;
    padding:8px 10px !important;
  }

  .volumeControl input{
    width:100% !important;
  }

  /* With the header removed from document flow, the table gets the space. */
  #tableStage{
    flex:1 1 auto !important;
    height:auto !important;
    min-height:0 !important;
  }

  /* Recent action bubbles are useful but should never cover the table. */
  #actionFeed{
    max-height:15px !important;
    min-height:0 !important;
    overflow:hidden !important;
  }
}


/* ==========================================================
   POKER3D MOBILE FULLSCREEN OVERLAY SHEETS V2
   ========================================================== */

@media(max-width:700px), (max-width:900px) and (max-height:500px){

  /*
     The 3D scene is the page.
     Everything else floats above it only when requested.
  */
  body:has(#game:not([hidden])){
    width:100%;
    height:100dvh;
    min-height:0;
    overflow:hidden !important;
  }

  #game:not([hidden]){
    position:relative !important;
    width:100% !important;
    height:100dvh !important;
    min-height:0 !important;
    overflow:hidden !important;
    display:block !important;
    background:#020504;
  }

  #tableStage{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
  }

  #scene{
    width:100% !important;
    height:100% !important;
  }

  #game #betPanel,
  #game #socialPanel,
  #game #mobileGameTabs{
    display:none !important;
  }


  /* --------------------------------------------------------
     MENU stays tiny in upper-right.
     -------------------------------------------------------- */

  #mobileMenuBtn{
    top:calc(8px + env(safe-area-inset-top,0)) !important;
    right:8px !important;
    min-width:82px !important;
    min-height:40px !important;
    padding:5px 10px !important;
    font-size:.68rem !important;
  }


  /* --------------------------------------------------------
     Stack / table / call summary.
     -------------------------------------------------------- */



/* POKER3D_AUTO_CALL_MOBILE_TRAY_V4
OFF: lives inside the hidden mobile control tray.
ON: compact floating control at bottom-left. */
#autoCallDock{
margin:0 !important;
pointer-events:auto;
}

#autoCallDock .controlLabel{
display:none !important;
}

#autoCallDock #autoCallBtn{
min-width:0 !important;
min-height:38px !important;
padding:5px 9px !important;
font-size:.66rem !important;
line-height:1 !important;
white-space:nowrap;
}

#autoCallDock.autoCallTrayMobile{
position:static !important;
inset:auto !important;
z-index:auto !important;
display:flex !important;
width:100% !important;
max-width:none !important;
padding:0 !important;
background:transparent !important;
box-shadow:none !important;
backdrop-filter:none !important;
}

#autoCallDock.autoCallTrayMobile #autoCallBtn{
width:100% !important;
min-height:44px !important;
}

#autoCallDock.autoCallArmedMobile{
position:fixed !important;
top:auto !important;
left:7px !important;
right:auto !important;
bottom:calc(7px + env(safe-area-inset-bottom,0)) !important;
z-index:8800 !important;
display:flex !important;
width:auto !important;
max-width:calc(100vw - 14px) !important;
padding:3px !important;
border-radius:10px;
background:rgba(5,13,11,.92) !important;
box-shadow:0 4px 18px rgba(0,0,0,.42);
backdrop-filter:blur(8px);
}

#game.turnControlsVisible #autoCallDock.autoCallArmedMobile{
bottom:calc(31dvh + 10px + env(safe-area-inset-bottom,0)) !important;
}
#playerStatsOverlay{
    position:absolute !important;
    top:calc(60px + env(safe-area-inset-top,0)) !important;
    left:7px !important;
    right:auto !important;
    z-index:8050 !important;
    max-width:calc(100vw - 14px) !important;
  }

  #playerStatsOverlay .betSummary{
    gap:7px !important;
    padding:5px 8px !important;
    font-size:.62rem !important;
    white-space:nowrap;
  }


  /* --------------------------------------------------------
     Chips / Players / Game floating utility controls.
     -------------------------------------------------------- */

  #overlayUtilityButtons{
    position:absolute !important;
    z-index:8150 !important;

    top:calc(102px + env(safe-area-inset-top,0)) !important;
    right:7px !important;

    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;

    gap:4px !important;

    max-width:calc(100vw - 14px);
  }

  #overlayUtilityButtons button{
    min-width:0 !important;
    min-height:34px !important;

    padding:4px 7px !important;

    border-radius:9px !important;

    background:rgba(5,13,11,.84) !important;
    border:1px solid rgba(77,118,103,.72) !important;

    backdrop-filter:blur(8px);

    font-size:.57rem !important;
    font-weight:900 !important;

    box-shadow:0 4px 14px rgba(0,0,0,.34);
  }

  #overlayUtilityButtons button[aria-expanded="true"]{
    color:#ffe18a !important;
    border-color:#d2ad43 !important;
    background:rgba(35,30,13,.94) !important;
  }


  /* --------------------------------------------------------
     HAND HISTORY:
     tiny tab normally, bottom sheet when opened.
     -------------------------------------------------------- */

  #persistentHandHistory{
    position:absolute !important;

    top:calc(102px + env(safe-area-inset-top,0)) !important;
    left:7px !important;
    right:auto !important;
    bottom:auto !important;

    z-index:8160 !important;

    width:112px !important;
    height:34px !important;
    max-height:34px !important;

    overflow:hidden !important;

    border-radius:9px !important;

    background:rgba(5,13,11,.86) !important;
    border:1px solid rgba(77,118,103,.72) !important;

    box-shadow:0 4px 14px rgba(0,0,0,.34) !important;
    backdrop-filter:blur(8px);
  }

  #persistentHandHistoryHeader{
    height:32px !important;
    min-height:32px !important;

    padding:4px 7px !important;

    border:0 !important;

    cursor:pointer;
    user-select:none;
  }

  #persistentHandHistoryHeader strong{
    font-size:.57rem !important;
    white-space:nowrap;
  }

  #persistentHandHistoryHeader span{
    display:none !important;
  }

  #persistentHandHistoryHeader::after{
    content:"▴";
    margin-left:auto;
    color:#829d92;
    font-size:.65rem;
  }

  #persistentHandHistoryBody{
    display:none !important;
  }

  #persistentHandHistory.mobile-open{
    position:fixed !important;

    top:auto !important;
    left:7px !important;
    right:7px !important;

    bottom:calc(7px + env(safe-area-inset-bottom,0)) !important;

    width:auto !important;
    height:auto !important;

    max-height:min(56dvh,520px) !important;

    border-radius:14px !important;

    background:rgba(4,11,9,.97) !important;

    box-shadow:
      0 -12px 45px rgba(0,0,0,.66),
      0 0 0 1px rgba(99,157,135,.15) !important;
  }

  #persistentHandHistory.mobile-open #persistentHandHistoryHeader{
    height:42px !important;
    min-height:42px !important;
    padding:7px 10px !important;
    border-bottom:1px solid rgba(91,124,112,.48) !important;
  }

  #persistentHandHistory.mobile-open #persistentHandHistoryHeader strong{
    font-size:.68rem !important;
  }

  #persistentHandHistory.mobile-open #persistentHandHistoryHeader span{
    display:block !important;
    font-size:.55rem !important;
  }

  #persistentHandHistory.mobile-open #persistentHandHistoryHeader::after{
    content:"▼";
  }

  #persistentHandHistory.mobile-open #persistentHandHistoryBody{
    display:block !important;
    max-height:calc(56dvh - 44px) !important;
    overflow-y:auto !important;
  }

  #persistentHandHistory.mobile-open .handHistorySection.currentHand{
    padding:6px 8px !important;
  }

  #persistentHandHistory.mobile-open .currentHand .handHistoryAction{
    font-size:.61rem !important;
    line-height:1.25 !important;
  }

  #persistentHandHistory.mobile-open .handHistorySection.previousHand{
    padding:3px 7px !important;
  }


  /* --------------------------------------------------------
     CHIPS / PLAYERS / GAME become bottom sheets.
     -------------------------------------------------------- */

  .pokerOverlayPanel{
    position:fixed !important;

    top:auto !important;
    left:7px !important;
    right:7px !important;

    bottom:calc(7px + env(safe-area-inset-bottom,0)) !important;

    width:auto !important;
    max-width:none !important;

    max-height:min(60dvh,560px) !important;

    overflow:hidden !important;

    z-index:9500 !important;

    border-radius:15px !important;

    background:rgba(4,11,9,.98) !important;

    border:1px solid rgba(90,145,124,.74) !important;

    box-shadow:
      0 -16px 52px rgba(0,0,0,.72),
      0 0 0 1px rgba(99,157,135,.12) !important;

    backdrop-filter:blur(14px);
  }

  .pokerOverlayPanelHeader{
    position:sticky;
    top:0;
    z-index:2;

    min-height:44px !important;

    padding:7px 9px !important;

    background:rgba(9,22,18,.98) !important;
  }

  .pokerOverlayPanelHeader strong{
    font-size:.68rem !important;
  }

  .overlayPanelClose{
    min-height:32px !important;
    padding:4px 8px !important;
    font-size:.61rem !important;
  }

  .pokerOverlayPanelBody{
    max-height:calc(60dvh - 46px) !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
    padding:8px !important;
  }


  /* --------------------------------------------------------
     Table chip counts are compact.
     -------------------------------------------------------- */

  #chipCountOverlayPanel .playerChipCounts{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:5px !important;
  }

  #chipCountOverlayPanel .playerChipCount{
    min-height:38px !important;
    padding:5px 6px !important;
  }


  /* --------------------------------------------------------
     Player and game tools fit comfortably in a sheet.
     -------------------------------------------------------- */

  #playersOverlayPanel .socialActions{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  #playersOverlayPanel .socialActions button,
  #playersOverlayPanel .socialActions input{
    min-height:40px !important;
  }

  #gameSettingsOverlayPanel .tableManagementActions{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  #gameSettingsOverlayPanel .tableManagementActions button,
  #gameSettingsOverlayPanel .tableManagementActions select{
    min-height:40px !important;
  }


  /* --------------------------------------------------------
     YOUR TURN dock: compact and anchored to bottom.
     Never cover half the table.
     -------------------------------------------------------- */

  #turnActionDock{
    position:fixed !important;

    z-index:9000 !important;

    left:7px !important;
    right:7px !important;

    bottom:calc(7px + env(safe-area-inset-bottom,0)) !important;

    width:auto !important;
    max-width:none !important;

    max-height:31dvh !important;

    overflow-y:auto !important;
    overscroll-behavior:contain;

    padding:6px !important;

    border-radius:14px !important;

    background:rgba(4,11,9,.95) !important;

    backdrop-filter:blur(11px);

    box-shadow:0 -8px 32px rgba(0,0,0,.58) !important;
  }

  #turnActionDock #controls{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;

    gap:4px !important;
    margin:0 !important;
  }

  #turnActionDock #controls button{
    min-width:0 !important;
    min-height:42px !important;

    padding:5px 3px !important;

    font-size:.66rem !important;

    white-space:normal;
    line-height:1.1;
  }

  #turnActionDock .raiseBox{
    grid-column:1 / -1 !important;

    display:grid !important;
    grid-template-columns:92px minmax(0,1fr) !important;

    width:100% !important;

    gap:6px !important;
  }

  #turnActionDock #raiseAmount{
    width:92px !important;
    min-height:38px !important;
  }

  #turnActionDock #raiseSlider{
    width:100% !important;
    min-width:0 !important;
  }

  #turnActionDock #status{
    min-height:18px !important;
    padding-top:3px !important;
    font-size:.58rem !important;
  }

  /*
     The large chip tray must NOT appear automatically during a turn.
     It remains available from the dedicated Chips/utility UI.
  */
  #turnActionDock .chipBetBuilder,
  #turnActionDock .playerChipCountSection{
    display:none !important;
  }


  /* --------------------------------------------------------
     Local cards / board remain readable.
     -------------------------------------------------------- */

  #playerHud{
    bottom:calc(8px + env(safe-area-inset-bottom,0)) !important;
    width:96vw !important;
  }

  #game.turnControlsVisible #playerHud{
    bottom:calc(31dvh + 12px) !important;
  }

  #boardHudCards .miniCard{
    width:37px !important;
    height:52px !important;
  }

  #heroCards .miniCard{
    width:54px !important;
    height:76px !important;
  }

  #hudBottom #potHud,
  #hudBottom #turnHud{
    padding:4px 7px !important;
    font-size:.59rem !important;
  }

  .heroTurnTimer{
    width:min(240px,72vw) !important;
    margin-top:3px !important;
    padding:3px 5px 4px !important;
  }


  /* Hide legacy action feed completely. */
  #actionFeed,
  .lastHandBanner{
    display:none !important;
  }
}



/* ==========================================================
   POKER3D MOBILE LAYOUT REPAIR V3
   Fix clipped turn controls + unusable blurred menu
   ========================================================== */

@media(max-width:700px), (max-width:900px) and (max-height:500px){

  /* --------------------------------------------------------
     MOBILE MENU
     Keep the dark backdrop, but NEVER blur the actual menu.
     -------------------------------------------------------- */

  #game #mobileMenuBtn{
    position:fixed !important;
    z-index:10100 !important;
    top:calc(8px + env(safe-area-inset-top,0)) !important;
    right:8px !important;
  }

  #game #mobileMenuBackdrop{
    position:fixed !important;
    z-index:10080 !important;
    inset:0 !important;

    background:rgba(0,0,0,.72) !important;

    -webkit-backdrop-filter:none !important;
    backdrop-filter:none !important;

    filter:none !important;
  }

  #game .gameHeader{
    position:fixed !important;

    z-index:10090 !important;

    top:0 !important;
    right:0 !important;
    left:auto !important;

    width:min(92vw,400px) !important;
    height:100dvh !important;
    max-height:100dvh !important;

    box-sizing:border-box !important;

    padding:
      calc(62px + env(safe-area-inset-top,0))
      12px
      calc(18px + env(safe-area-inset-bottom,0))
      !important;

    overflow-x:hidden !important;
    overflow-y:auto !important;

    opacity:1 !important;

    filter:none !important;

    -webkit-backdrop-filter:none !important;
    backdrop-filter:none !important;

    background:#07100e !important;

    border-left:1px solid #46675b !important;

    box-shadow:-18px 0 50px rgba(0,0,0,.75) !important;

    transform:translate3d(105%,0,0) !important;

    pointer-events:none !important;
  }

  #game.mobile-menu-open .gameHeader{
    transform:translate3d(0,0,0) !important;
    pointer-events:auto !important;
  }

  #game.mobile-menu-open #mobileMenuBackdrop{
    opacity:1 !important;
    pointer-events:auto !important;
  }

  .gameHeader .cameraControls,
  .gameHeader .viewControls{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;

    width:100% !important;

    gap:8px !important;

    overflow:visible !important;

    filter:none !important;
    opacity:1 !important;
  }

  .gameHeader .cameraControls button,
  .gameHeader .viewControls button{
    width:100% !important;

    min-width:0 !important;
    min-height:48px !important;

    box-sizing:border-box !important;

    opacity:1 !important;
    filter:none !important;

    pointer-events:auto !important;
  }

  .gameHeader .volumeControl{
    grid-column:1 / -1 !important;

    width:100% !important;

    box-sizing:border-box !important;

    opacity:1 !important;
    filter:none !important;
  }


  /* --------------------------------------------------------
     TURN ACTION DOCK
     Old CSS centered this with translateX(-50%), which is why
     half the controls are hanging off the left side.
     -------------------------------------------------------- */

  #game #turnActionDock{
    position:fixed !important;

    z-index:9200 !important;

    left:6px !important;
    right:6px !important;

    bottom:calc(6px + env(safe-area-inset-bottom,0)) !important;

    top:auto !important;

    width:auto !important;
    min-width:0 !important;
    max-width:none !important;

    height:auto !important;
    min-height:0 !important;
    max-height:150px !important;

    margin:0 !important;

    transform:none !important;
    translate:none !important;

    box-sizing:border-box !important;

    overflow-x:hidden !important;
    overflow-y:auto !important;

    padding:6px !important;

    border-radius:14px !important;

    background:rgba(4,12,10,.96) !important;

    box-shadow:
      0 -8px 30px rgba(0,0,0,.58),
      0 0 0 1px rgba(75,127,108,.18)
      !important;

    -webkit-backdrop-filter:none !important;
    backdrop-filter:none !important;
  }


  /* Five poker actions always fit across the phone. */

  #game #turnActionDock #controls{
    display:grid !important;

    grid-template-columns:
      repeat(5,minmax(0,1fr))
      !important;

    gap:4px !important;

    width:100% !important;
    min-width:0 !important;

    margin:0 !important;

    box-sizing:border-box !important;
  }

  #game #turnActionDock #controls button{
    width:100% !important;

    min-width:0 !important;
    max-width:none !important;

    min-height:44px !important;

    padding:5px 2px !important;

    box-sizing:border-box !important;

    font-size:.64rem !important;
    line-height:1.08 !important;

    white-space:normal !important;
    overflow:hidden !important;
  }


  /* Raise amount + slider get their own full-width row. */

  #game #turnActionDock .raiseBox{
    grid-column:1 / -1 !important;

    display:grid !important;

    grid-template-columns:
      82px minmax(0,1fr)
      !important;

    width:100% !important;

    gap:6px !important;

    margin:0 !important;

    box-sizing:border-box !important;
  }

  #game #turnActionDock #raiseAmount{
    width:82px !important;

    min-width:0 !important;
    min-height:36px !important;

    box-sizing:border-box !important;
  }

  #game #turnActionDock #raiseSlider{
    width:100% !important;
    min-width:0 !important;

    box-sizing:border-box !important;
  }

  #game #turnActionDock #status{
    min-height:16px !important;

    padding:2px 1px 0 !important;

    font-size:.57rem !important;
    line-height:1.15 !important;
  }


  /* --------------------------------------------------------
     DO NOT show the huge chip tray automatically every turn.
     -------------------------------------------------------- */

  #game #turnActionDock .chipBetBuilder,
  #game #turnActionDock .playerChipCountSection,
  #game #turnActionDock .chipWallet,
  #game #turnActionDock .betBreakdownBox{
    display:none !important;
  }


  /* --------------------------------------------------------
     Keep cards/timer above the compact action dock.
     -------------------------------------------------------- */

  #game.turnControlsVisible #playerHud{
    bottom:158px !important;
  }

  #game:not(.turnControlsVisible) #playerHud{
    bottom:calc(8px + env(safe-area-inset-bottom,0)) !important;
  }

  #game.turnControlsVisible .heroTurnTimer{
    margin-top:2px !important;
  }


  /* Chat stays above action controls during our turn. */

  #game.turnControlsVisible #chatOverlayToggle{
    bottom:158px !important;
  }

  #game:not(.turnControlsVisible) #chatOverlayToggle{
    bottom:calc(8px + env(safe-area-inset-bottom,0)) !important;
  }


  /* --------------------------------------------------------
     Make absolutely sure nothing creates horizontal overflow.
     -------------------------------------------------------- */

  #game,
  #tableStage,
  #turnActionDock,
  #turnActionDock *,
  .gameHeader,
  .gameHeader *{
    box-sizing:border-box !important;
  }

}

@media (min-width:901px){
  #game .gameHeader{
    display:grid !important;
    grid-template-columns:minmax(120px,auto) minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:6px !important;
    height:50px !important;
    min-height:50px !important;
    max-height:50px !important;
    padding:5px 8px !important;
    overflow:hidden !important;
  }

  #game .titleBlock{
    min-width:0 !important;
    overflow:hidden !important;
    white-space:nowrap !important;
  }

  #game #phase{
    min-width:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  #game .cameraControls,
  #game .viewControls{
    min-width:0 !important;
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:4px !important;
    overflow:hidden !important;
  }

  #game .cameraControls button,
  #game .viewControls button{
    flex:0 1 auto !important;
    min-width:0 !important;
    min-height:30px !important;
    max-height:30px !important;
    padding:4px 7px !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  #game .viewControls #soundBtn,
  #game .viewControls #graphicsBtn,
  #game .viewControls #fullscreenBtn,
  #game .viewControls #musicMenuBtn{
    flex:0 0 34px !important;
    width:34px !important;
    padding:4px !important;
  }

  #game .viewControls #musicBtn{
    flex:0 0 54px !important;
    width:54px !important;
  }

  #game .viewControls #serverBrowserBtn{
    flex:0 0 58px !important;
    width:58px !important;
  }

  #game .viewControls #testSoundBtn{
    flex:0 0 76px !important;
    width:76px !important;
  }

  #game .gameHeader .volumeControl{
    display:none !important;
  }
}

/* POKER3D_JOIN_CHARACTER_PREVIEW_V1 */
.characterPreviewCard{
  width:min(100%,560px);
  margin:14px auto 12px;
  padding:12px;
  border:1px solid #3f5f55;
  border-radius:16px;
  background:
    linear-gradient(
      180deg,
      rgba(15,27,24,.96),
      rgba(5,11,10,.98)
    );
  box-shadow:
    0 18px 42px rgba(0,0,0,.34),
    inset 0 1px rgba(255,255,255,.04);
}

.characterPreviewHeading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:2px 3px 10px;
}

.characterPreviewHeading>div{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-width:0;
}

.characterPreviewHeading small{
  color:#76a999;
  font-size:.66rem;
  font-weight:900;
  letter-spacing:.14em;
}

.characterPreviewHeading b{
  max-width:100%;
  overflow:hidden;
  color:#f4faf7;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:1.08rem;
}

.characterPreviewHeading>span{
  flex:0 0 auto;
  color:#9eb6ae;
  font-size:.72rem;
  font-weight:700;
}

.characterPreviewStage{
  position:relative;
  width:100%;
  height:310px;
  overflow:hidden;
  border:1px solid #2f4b42;
  border-radius:13px;
  background:
    radial-gradient(
      circle at 50% 38%,
      rgba(51,93,79,.36),
      rgba(7,13,12,.96) 66%
    );
  touch-action:none;
  user-select:none;
}

#characterPreviewCanvas{
  display:block;
  width:100%;
  height:100%;
  cursor:grab;
  touch-action:none;
}

#characterPreviewCanvas:active{
  cursor:grabbing;
}

.characterPreviewLoading{
  position:absolute;
  left:50%;
  bottom:16px;
  transform:translateX(-50%);
  padding:7px 11px;
  border:1px solid #46695e;
  border-radius:999px;
  background:rgba(5,12,10,.88);
  color:#c3d8d1;
  font-size:.72rem;
  font-weight:800;
  pointer-events:none;
  white-space:nowrap;
}

.characterPreviewLoading[hidden]{
  display:none;
}

#joinArea .avatarCustomizer{
  width:min(100%,560px);
  margin:10px auto;
}

#joinArea .avatarCustomizer label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  width:100%;
}

#joinArea #avatarColor{
  width:76px;
  min-width:76px;
  height:48px;
  padding:4px;
  cursor:pointer;
}

@media(max-width:700px){
  .characterPreviewCard{
    margin:10px auto;
    padding:9px;
    border-radius:13px;
  }

  .characterPreviewStage{
    height:245px;
  }

  .characterPreviewHeading{
    padding-bottom:8px;
  }

  .characterPreviewHeading>span{
    font-size:.66rem;
  }
}

@media(max-width:900px) and (max-height:500px){
  .characterPreviewCard{
    width:min(100%,460px);
    margin:6px auto;
    padding:7px;
  }

  .characterPreviewStage{
    height:185px;
  }

  .characterPreviewHeading{
    padding-bottom:5px;
  }
}



/* =======================================================================
   POKER3D_PREMIUM_START_UI_V1
   Premium lobby + pre-join character customization treatment.
   Scoped around .panel / createArea / joinArea so the actual table HUD
   remains unchanged.
   ======================================================================= */

:root{
  --p3d-bg:#020605;
  --p3d-panel:rgba(5,15,13,.94);
  --p3d-panel-soft:rgba(7,20,17,.78);
  --p3d-line:rgba(91,220,185,.23);
  --p3d-line-hot:rgba(73,255,207,.72);
  --p3d-teal:#48e6bd;
  --p3d-teal-bright:#72ffda;
  --p3d-teal-dim:#2b987e;
  --p3d-text:#f5fbf8;
  --p3d-muted:#88a69d;
  --p3d-gold:#e1c477;
}

/* ---------- immersive page background ---------- */

body{
  background:
    radial-gradient(
      circle at 50% 12%,
      rgba(18,88,72,.22),
      transparent 34%
    ),
    radial-gradient(
      circle at 8% 70%,
      rgba(13,76,65,.12),
      transparent 29%
    ),
    radial-gradient(
      circle at 92% 67%,
      rgba(13,76,65,.12),
      transparent 29%
    ),
    linear-gradient(
      180deg,
      #030807 0%,
      #010302 100%
    );
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    linear-gradient(
      90deg,
      transparent 0 7%,
      rgba(69,231,190,.025) 7.1%,
      transparent 7.3% 92.7%,
      rgba(69,231,190,.025) 92.9%,
      transparent 93.1%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.007) 0 1px,
      transparent 1px 5px
    );
}

body::after{
  content:"";
  position:fixed;
  left:50%;
  bottom:-390px;
  width:min(1500px,120vw);
  height:720px;
  transform:translateX(-50%);
  z-index:-1;
  pointer-events:none;
  border-radius:50%;
  border:2px solid rgba(76,239,199,.13);
  box-shadow:
    0 0 80px rgba(44,214,170,.08),
    inset 0 0 100px rgba(34,184,147,.035);
  background:
    radial-gradient(
      ellipse at center,
      rgba(24,103,83,.08),
      transparent 67%
    );
}

/* ---------- main card ---------- */

.panel{
  position:relative;
  isolation:isolate;
  width:min(760px,calc(100vw - 32px));
  max-width:none;
  margin:clamp(24px,6vh,72px) auto;
  padding:clamp(24px,4vw,42px);
  overflow:hidden;
  color:var(--p3d-text);
  text-align:center;
  border:1px solid rgba(92,220,185,.32);
  border-radius:28px;
  background:
    linear-gradient(
      145deg,
      rgba(13,31,27,.96),
      rgba(4,12,10,.97) 46%,
      rgba(4,10,9,.985)
    );
  box-shadow:
    0 40px 120px rgba(0,0,0,.68),
    0 0 0 1px rgba(255,255,255,.018) inset,
    0 0 70px rgba(38,216,169,.055);
  backdrop-filter:blur(18px);
}

.panel::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  pointer-events:none;
  background:
    radial-gradient(
      circle at 50% -15%,
      rgba(80,255,209,.17),
      transparent 34%
    ),
    linear-gradient(
      110deg,
      transparent 0 35%,
      rgba(255,255,255,.018) 43%,
      transparent 52%
    );
}

.panel::after{
  content:"♠   ♥   ♦   ♣";
  position:absolute;
  top:146px;
  left:50%;
  z-index:-1;
  transform:translateX(-50%);
  color:rgba(151,189,177,.18);
  font-size:.78rem;
  letter-spacing:.75rem;
  white-space:nowrap;
  pointer-events:none;
}

.panel h1{
  margin:0;
  font-size:clamp(3.15rem,7vw,5.15rem);
  font-weight:950;
  line-height:.9;
  letter-spacing:-.055em;
  color:#fff;
  background:
    linear-gradient(
      180deg,
      #ffffff 3%,
      #dbe9e4 40%,
      #81948e 72%,
      #defff6 100%
    );
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  filter:
    drop-shadow(0 5px 6px rgba(0,0,0,.5))
    drop-shadow(0 0 15px rgba(65,238,195,.13));
}

.panel>p:first-of-type{
  margin:20px 0 26px;
  color:#a9bbb5;
  font-size:.95rem;
  letter-spacing:.015em;
}

/* ---------- generic landing inputs ---------- */

#createArea input,
#joinArea>input,
.roomCodeJoin input{
  min-height:54px;
  padding:11px 16px;
  border:1px solid rgba(103,174,153,.36);
  border-radius:12px;
  outline:none;
  background:
    linear-gradient(
      180deg,
      rgba(8,19,16,.96),
      rgba(4,12,10,.98)
    );
  color:#f3faf7;
  box-shadow:
    inset 0 1px rgba(255,255,255,.025),
    0 8px 20px rgba(0,0,0,.1);
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

#createArea input:hover,
#joinArea>input:hover,
.roomCodeJoin input:hover{
  border-color:rgba(89,219,184,.52);
}

#createArea input:focus,
#joinArea>input:focus,
.roomCodeJoin input:focus{
  border-color:rgba(79,248,203,.78);
  box-shadow:
    0 0 0 3px rgba(62,220,179,.08),
    0 0 24px rgba(45,214,171,.08),
    inset 0 1px rgba(255,255,255,.035);
}

#createArea input::placeholder,
#joinArea>input::placeholder,
.roomCodeJoin input::placeholder{
  color:#62766f;
}

/* ---------- main landing actions ---------- */

.landingTableActions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:28px;
}

.landingTableActions button{
  position:relative;
  width:100%;
  min-height:64px;
  margin:0;
  padding:13px 18px 13px 48px;
  overflow:hidden;
  border-radius:13px;
  font-size:.98rem;
  letter-spacing:.01em;
  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease,
    filter .16s ease;
}

.landingTableActions button::before{
  position:absolute;
  left:20px;
  top:50%;
  transform:translateY(-50%);
  color:var(--p3d-teal-bright);
  font-size:1.35rem;
  font-weight:500;
}

#quickConnectBtn{
  border-color:rgba(74,255,207,.75);
  background:
    radial-gradient(
      circle at 50% 0,
      rgba(78,255,207,.18),
      transparent 65%
    ),
    linear-gradient(
      180deg,
      #124c3e,
      #0b3028
    );
  box-shadow:
    0 0 0 1px rgba(132,255,226,.07) inset,
    0 0 24px rgba(42,229,179,.12);
}

#quickConnectBtn::before{
  content:"⚡";
}

#createTableBtn{
  margin-top:0;
  border-color:rgba(86,174,150,.42);
  background:
    linear-gradient(
      180deg,
      rgba(17,39,34,.98),
      rgba(8,24,20,.98)
    );
}

#createTableBtn::before{
  content:"+";
  display:grid;
  width:24px;
  height:24px;
  place-items:center;
  border:1px solid currentColor;
  border-radius:50%;
  line-height:1;
}

.landingTableActions button:hover{
  transform:translateY(-2px);
  border-color:rgba(102,255,217,.85);
  box-shadow:
    0 10px 30px rgba(0,0,0,.24),
    0 0 24px rgba(40,230,177,.14);
}

/* ---------- create field ---------- */

#createTableName{
  margin:14px 0 0;
}

/* ---------- custom private toggle ---------- */

.privateTableToggle{
  position:relative;
  display:flex;
  min-height:54px;
  align-items:center;
  gap:13px;
  margin:12px 0 0;
  padding:0 15px;
  border:1px solid rgba(86,150,132,.25);
  border-radius:12px;
  background:rgba(6,17,14,.52);
  color:#d9e5e1;
  font-size:.82rem;
  font-weight:850;
  text-align:left;
  cursor:pointer;
}

.privateTableToggle::before{
  content:"♠";
  display:grid;
  width:27px;
  height:27px;
  place-items:center;
  border-radius:8px;
  background:rgba(62,213,172,.08);
  color:#73e8c6;
  font-size:.88rem;
}

.privateTableToggle input{
  order:3;
  width:46px;
  height:24px;
  min-height:24px;
  margin:0 0 0 auto;
  appearance:none;
  border:1px solid rgba(94,160,142,.42);
  border-radius:999px;
  background:#15251f;
  cursor:pointer;
  position:relative;
}

.privateTableToggle input::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#78938a;
  transition:.18s ease;
}

.privateTableToggle input:checked{
  border-color:rgba(80,239,195,.66);
  background:#165d4d;
  box-shadow:0 0 18px rgba(48,230,181,.12);
}

.privateTableToggle input:checked::after{
  left:25px;
  background:#6ff2ce;
  box-shadow:0 0 9px rgba(111,242,206,.55);
}

/* ---------- open tables ---------- */

.roomBrowser{
  margin-top:16px;
  overflow:hidden;
  border:1px solid rgba(90,180,155,.38);
  border-radius:15px;
  background:
    linear-gradient(
      180deg,
      rgba(5,17,14,.88),
      rgba(3,10,8,.96)
    );
  box-shadow:
    0 14px 34px rgba(0,0,0,.16),
    inset 0 1px rgba(255,255,255,.018);
}

.roomBrowserHeading{
  min-height:52px;
  padding:11px 15px;
  border-bottom:1px solid rgba(78,143,125,.22);
  background:
    linear-gradient(
      90deg,
      rgba(45,133,109,.075),
      transparent
    );
}

.roomBrowserHeading b{
  display:flex;
  align-items:center;
  gap:8px;
  color:#eff9f5;
  font-size:.9rem;
  letter-spacing:.01em;
}

.roomBrowserHeading b::before{
  content:"☷";
  color:var(--p3d-teal);
  font-size:1.05rem;
}

.roomBrowserHeading span{
  color:#7fa398;
  font-size:.72rem;
  font-weight:900;
}

.roomBrowserHeading span::before{
  content:"● ";
  color:#35dba9;
  font-size:.7rem;
}

.roomBrowserList{
  gap:8px;
  min-height:118px;
  max-height:320px;
  padding:10px;
}

.roomBrowserEmpty{
  display:grid;
  min-height:104px;
  place-items:center;
  align-content:center;
  gap:9px;
  padding:18px;
  color:#78988e;
  font-size:.83rem;
  font-weight:800;
}

.roomBrowserEmpty::before{
  content:"◉  ◉  ◉";
  color:rgba(81,218,180,.28);
  font-size:1.4rem;
  letter-spacing:-.24rem;
}

.roomBrowserItem{
  min-height:68px;
  padding:11px 13px;
  border:1px solid rgba(73,141,122,.34);
  border-radius:10px;
  background:
    linear-gradient(
      180deg,
      rgba(16,35,30,.96),
      rgba(7,21,17,.96)
    );
  box-shadow:inset 0 1px rgba(255,255,255,.02);
  transition:
    transform .14s ease,
    border-color .14s ease,
    background .14s ease;
}

.roomBrowserItem:hover:not(:disabled){
  transform:translateX(3px);
  border-color:rgba(77,237,195,.56);
  background:
    linear-gradient(
      180deg,
      rgba(19,49,40,.98),
      rgba(8,28,23,.98)
    );
}

/* ---------- join-by-code ---------- */

.roomCodeJoin{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin-top:14px;
}

.roomCodeJoin>span{
  position:relative;
  width:30px;
  color:#657e75;
  font-size:0;
}

.roomCodeJoin>span::after{
  content:"OR";
  font-size:.68rem;
  font-weight:950;
  letter-spacing:.08em;
}

.roomCodeJoin input{
  margin:0;
  text-transform:uppercase;
  letter-spacing:.16em;
  font-weight:900;
}

#joinCodeBtn{
  min-height:54px;
  padding:10px 20px;
  border-color:rgba(75,232,190,.52);
  background:
    linear-gradient(
      180deg,
      #165845,
      #0c372c
    );
  box-shadow:
    inset 0 1px rgba(255,255,255,.04),
    0 0 18px rgba(42,220,171,.08);
}

/* ---------- graphics button ---------- */

#landingGraphicsBtn{
  position:relative;
  min-width:260px;
  min-height:50px;
  margin-top:18px;
  padding:9px 42px;
  border:1px solid rgba(85,172,148,.4);
  border-radius:12px;
  background:
    linear-gradient(
      180deg,
      rgba(16,39,33,.92),
      rgba(7,22,18,.96)
    );
  color:#cfe0da;
  box-shadow:inset 0 1px rgba(255,255,255,.025);
}

#landingGraphicsBtn::before{
  content:"▣";
  position:absolute;
  left:18px;
  color:var(--p3d-teal);
}

#landingGraphicsBtn::after{
  content:"›";
  position:absolute;
  right:18px;
  color:#75d9bd;
  font-size:1.2rem;
}

/* =======================================================================
   JOIN / CHARACTER CUSTOMIZATION
   ======================================================================= */

.roomline{
  margin-top:25px;
  color:#afbeb9;
  font-size:1rem;
}

.roomline b{
  color:#ecf8f4;
  font-size:1.15rem;
  letter-spacing:.04em;
}

.joinPrivacyStatus{
  margin:6px 0 14px;
  color:#54e0b6;
  font-size:.76rem;
  font-weight:950;
  letter-spacing:.03em;
}

#joinArea>#nameInput{
  margin:0 0 14px;
}

#joinArea>#nameInput{
  background:
    linear-gradient(
      90deg,
      rgba(39,117,95,.08),
      transparent 32%
    ),
    rgba(4,13,11,.95);
}

#joinArea>#nameInput:focus{
  background:
    linear-gradient(
      90deg,
      rgba(45,167,130,.12),
      transparent 38%
    ),
    rgba(4,13,11,.98);
}

/* preview card expansion */

#joinArea .characterPreviewCard{
  width:100%;
  max-width:none;
  margin:0 auto 15px;
  padding:13px;
  border:1px solid rgba(72,205,170,.42);
  border-radius:18px;
  background:
    radial-gradient(
      circle at 50% 38%,
      rgba(32,120,95,.12),
      transparent 48%
    ),
    linear-gradient(
      180deg,
      rgba(8,24,20,.95),
      rgba(3,12,10,.98)
    );
  box-shadow:
    0 18px 45px rgba(0,0,0,.22),
    inset 0 1px rgba(255,255,255,.025);
}

#joinArea .characterPreviewHeading{
  min-height:50px;
  padding:3px 6px 10px;
}

#joinArea .characterPreviewHeading small{
  color:#5fe3bd;
  font-size:.67rem;
  letter-spacing:.17em;
}

#joinArea .characterPreviewHeading b{
  margin-top:2px;
  color:#f0faf6;
  font-size:1rem;
}

#joinArea .characterPreviewHeading>span{
  color:#9bb4ac;
}

#joinArea .characterPreviewHeading>span::before{
  content:"↻ ";
  color:#55e2ba;
  font-size:1rem;
}

#joinArea .characterPreviewStage{
  height:365px;
  border:1px solid rgba(82,183,156,.32);
  border-radius:14px;
  background:
    radial-gradient(
      ellipse at 50% 90%,
      rgba(41,222,173,.16),
      transparent 31%
    ),
    radial-gradient(
      circle at 50% 42%,
      rgba(22,79,65,.32),
      rgba(2,9,8,.97) 72%
    );
  box-shadow:
    inset 0 0 65px rgba(0,0,0,.28);
}

/* decorative floor glow behind existing WebGL pedestal */

#joinArea .characterPreviewStage::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:15px;
  width:54%;
  height:28px;
  transform:translateX(-50%);
  z-index:0;
  border-radius:50%;
  border:1px solid rgba(81,255,207,.35);
  box-shadow:
    0 0 28px rgba(51,235,186,.17),
    inset 0 0 20px rgba(43,211,170,.08);
  pointer-events:none;
}

#characterPreviewCanvas{
  position:relative;
  z-index:1;
}

/* ---------- prettier character color row ---------- */

#joinArea .avatarCustomizer{
  width:100%;
  max-width:none;
  margin:13px 0 14px;
  padding:11px 13px;
  border:1px solid rgba(81,151,133,.25);
  border-radius:12px;
  background:rgba(5,16,13,.72);
}

#joinArea .avatarCustomizer label{
  display:flex;
  min-height:52px;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  width:100%;
  color:#aebfba;
  font-size:.72rem;
  font-weight:950;
  letter-spacing:.055em;
}

#joinArea #avatarColor{
  position:relative;
  width:72px;
  min-width:72px;
  height:48px;
  margin:0;
  padding:4px;
  overflow:hidden;
  border:1px solid rgba(97,214,183,.48);
  border-radius:10px;
  background:#09110f;
  cursor:pointer;
  box-shadow:
    0 0 0 3px rgba(52,220,176,.04),
    0 8px 18px rgba(0,0,0,.22);
}

/* ---------- join CTA ---------- */

#joinBtn{
  position:relative;
  width:min(420px,100%);
  min-height:58px;
  margin-top:2px;
  padding:12px 52px;
  overflow:hidden;
  border:1px solid rgba(91,255,212,.78);
  border-radius:12px;
  background:
    radial-gradient(
      circle at 50% 0,
      rgba(99,255,215,.18),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      #17624e,
      #0b392d
    );
  color:white;
  font-size:1rem;
  font-weight:950;
  letter-spacing:.01em;
  box-shadow:
    0 0 25px rgba(43,229,180,.12),
    inset 0 1px rgba(255,255,255,.08);
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    filter .16s ease;
}

#joinBtn::before{
  content:"⚡";
  position:absolute;
  left:22px;
  color:#7affdb;
  font-size:1.1rem;
}

#joinBtn::after{
  content:"›";
  position:absolute;
  right:22px;
  color:#9effe4;
  font-size:1.35rem;
}

#joinBtn:hover{
  transform:translateY(-2px);
  box-shadow:
    0 12px 34px rgba(0,0,0,.28),
    0 0 34px rgba(43,229,180,.18),
    inset 0 1px rgba(255,255,255,.1);
}

/* ---------- small entrance polish ---------- */

#createArea,
#joinArea{
  animation:p3dLandingReveal .32s ease-out both;
}

@keyframes p3dLandingReveal{
  from{
    opacity:0;
    transform:translateY(8px);
  }

  to{
    opacity:1;
    transform:none;
  }
}

/* ---------- mobile ---------- */

@media(max-width:700px){
  .panel{
    width:calc(100vw - 18px);
    margin:9px auto;
    padding:22px 14px 20px;
    border-radius:20px;
  }

  .panel h1{
    font-size:3.1rem;
  }

  .panel>p:first-of-type{
    margin:14px 0 20px;
    font-size:.82rem;
  }

  .panel::after{
    top:118px;
  }

  .landingTableActions{
    grid-template-columns:1fr;
    gap:9px;
  }

  .landingTableActions button{
    min-height:56px;
  }

  .roomCodeJoin{
    grid-template-columns:1fr;
  }

  .roomCodeJoin>span{
    width:auto;
  }

  #joinCodeBtn{
    width:100%;
  }

  #landingGraphicsBtn{
    width:100%;
    min-width:0;
  }

  #joinArea .characterPreviewStage{
    height:min(48vh,330px);
  }
}

@media(max-width:900px) and (max-height:500px){
  .panel{
    width:min(760px,calc(100vw - 18px));
    margin:7px auto;
    padding:14px 22px;
  }

  .panel h1{
    font-size:2.45rem;
  }

  .panel>p:first-of-type{
    margin:7px 0 11px;
  }

  .panel::after{
    display:none;
  }

  .landingTableActions{
    margin-top:12px;
  }

  #joinArea .characterPreviewStage{
    height:190px;
  }
}

@media(prefers-reduced-motion:reduce){
  #createArea,
  #joinArea{
    animation:none;
  }

  .landingTableActions button,
  #joinBtn,
  .roomBrowserItem{
    transition:none;
  }
}

/* =======================================================================
   POKER3D_PREMIUM_START_UI_V2
   Fix private-table switch, add in-page color studio, and bring guided
   table setup + bounty selection into the premium Poker3D visual system.
   ======================================================================= */

/* -----------------------------------------------------------------------
   PRIVATE TABLE TOGGLE FIX
   The earlier #createArea input rule gave the checkbox a 54px minimum
   height. This selector intentionally outranks it.
   ----------------------------------------------------------------------- */

#createArea .privateTableToggle input#privateTableToggle{
  flex:0 0 48px !important;
  width:48px !important;
  min-width:48px !important;
  height:26px !important;
  min-height:26px !important;
  max-height:26px !important;

  margin:0 0 0 auto !important;
  padding:0 !important;

  appearance:none;
  -webkit-appearance:none;

  border:1px solid rgba(94,160,142,.5);
  border-radius:999px;

  outline:none;

  background:#15251f;

  box-shadow:
    inset 0 2px 5px rgba(0,0,0,.32),
    0 0 0 1px rgba(255,255,255,.015);

  cursor:pointer;

  position:relative;
}

#createArea .privateTableToggle input#privateTableToggle::after{
  content:"";

  position:absolute;
  top:3px;
  left:3px;

  width:18px;
  height:18px;

  border-radius:50%;

  background:
    linear-gradient(
      180deg,
      #a2b8b0,
      #70877f
    );

  box-shadow:
    0 2px 5px rgba(0,0,0,.45);

  transition:
    left .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

#createArea .privateTableToggle input#privateTableToggle:checked{
  border-color:rgba(83,248,204,.75);

  background:
    linear-gradient(
      180deg,
      #17614f,
      #0d4437
    );

  box-shadow:
    inset 0 2px 5px rgba(0,0,0,.25),
    0 0 18px rgba(51,226,181,.15);
}

#createArea .privateTableToggle input#privateTableToggle:checked::after{
  left:25px;

  background:
    linear-gradient(
      180deg,
      #8affde,
      #48d8b2
    );

  box-shadow:
    0 0 10px rgba(86,255,212,.48),
    0 2px 5px rgba(0,0,0,.4);
}

#createArea .privateTableToggle input#privateTableToggle:focus-visible{
  box-shadow:
    0 0 0 3px rgba(72,230,189,.16),
    0 0 18px rgba(51,226,181,.15);
}


/* =======================================================================
   CHARACTER COLOR STUDIO
   ======================================================================= */

#joinArea .avatarCustomizer{
  --avatar-picker-color:#3f8cff;
  --avatar-picker-hue:#3f8cff;

  display:grid;
  gap:12px;

  width:100%;
  max-width:none;

  margin:13px 0 15px;
  padding:15px;

  border:1px solid rgba(85,177,151,.3);
  border-radius:14px;

  background:
    radial-gradient(
      circle at 95% 0,
      color-mix(
        in srgb,
        var(--avatar-picker-color) 11%,
        transparent
      ),
      transparent 36%
    ),
    linear-gradient(
      180deg,
      rgba(7,20,17,.88),
      rgba(3,13,11,.94)
    );

  box-shadow:
    inset 0 1px rgba(255,255,255,.025),
    0 12px 28px rgba(0,0,0,.13);
}

.avatarColorTopline{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.avatarColorTopline>span{
  color:#d9e7e2;
  font-size:.72rem;
  font-weight:950;

  letter-spacing:.08em;
  text-transform:uppercase;
}

#avatarColorHex{
  padding:4px 8px;

  border:1px solid rgba(94,164,145,.24);
  border-radius:7px;

  background:rgba(0,0,0,.2);

  color:#8eb0a6;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;

  font-size:.68rem;
  font-weight:800;
  letter-spacing:.05em;
}

.avatarColorSwatches{
  display:grid;
  grid-template-columns:repeat(10,minmax(0,1fr));
  gap:7px;
}

.avatarColorSwatches button{
  position:relative;

  min-width:0;
  min-height:38px;

  padding:0;

  border:1px solid rgba(255,255,255,.15);
  border-radius:9px;

  background:
    linear-gradient(
      145deg,
      rgba(255,255,255,.15),
      transparent 45%
    ),
    var(--swatch);

  box-shadow:
    inset 0 1px rgba(255,255,255,.19),
    0 5px 12px rgba(0,0,0,.22);

  transition:
    transform .14s ease,
    border-color .14s ease,
    box-shadow .14s ease;
}

.avatarColorSwatches button:hover{
  transform:translateY(-2px);

  border-color:rgba(255,255,255,.45);
}

.avatarColorSwatches button.selected{
  transform:translateY(-2px);

  border-color:#8affdf;

  box-shadow:
    0 0 0 2px rgba(77,235,194,.24),
    0 0 16px
      color-mix(
        in srgb,
        var(--swatch) 48%,
        transparent
      ),
    inset 0 1px rgba(255,255,255,.25);
}

.avatarColorSwatches button.selected::after{
  content:"✓";

  position:absolute;
  right:4px;
  bottom:2px;

  display:grid;
  width:15px;
  height:15px;
  place-items:center;

  border-radius:50%;

  background:rgba(0,0,0,.68);
  color:#fff;

  font-size:.56rem;
  font-weight:950;
}

.avatarColorMixer{
  display:grid;
  gap:8px;

  padding:11px 12px;

  border:1px solid rgba(88,153,135,.2);
  border-radius:11px;

  background:rgba(0,0,0,.14);
}

.avatarColorMixer label{
  display:grid !important;
  grid-template-columns:82px minmax(0,1fr);
  gap:10px !important;
  align-items:center !important;

  min-height:30px !important;

  color:#849f96 !important;

  font-size:.64rem !important;
  font-weight:900 !important;
  letter-spacing:.045em !important;
  text-transform:uppercase !important;
}

#joinArea .avatarColorMixer input[type="range"]{
  width:100% !important;
  height:8px !important;
  min-height:8px !important;

  margin:0 !important;
  padding:0 !important;

  appearance:none;
  -webkit-appearance:none;

  border:0 !important;
  border-radius:999px;

  outline:none;

  box-shadow:
    0 0 0 1px rgba(255,255,255,.08),
    inset 0 1px 3px rgba(0,0,0,.35);

  cursor:pointer;
}

#avatarHue{
  background:
    linear-gradient(
      90deg,
      #ff3b3b,
      #ffee3b,
      #42ef67,
      #35e9ef,
      #3b65ff,
      #cf43f2,
      #ff3b3b
    ) !important;
}

#avatarSaturation{
  background:
    linear-gradient(
      90deg,
      #7f8683,
      var(--avatar-picker-hue)
    ) !important;
}

#avatarLightness{
  background:
    linear-gradient(
      90deg,
      #050606,
      var(--avatar-picker-hue),
      #fff
    ) !important;
}

#joinArea .avatarColorMixer input[type="range"]::-webkit-slider-thumb{
  appearance:none;
  -webkit-appearance:none;

  width:18px;
  height:18px;

  border:2px solid #dffcf4;
  border-radius:50%;

  background:#10231e;

  box-shadow:
    0 0 0 3px rgba(38,212,168,.13),
    0 2px 6px rgba(0,0,0,.5);
}

#joinArea .avatarColorMixer input[type="range"]::-moz-range-thumb{
  width:15px;
  height:15px;

  border:2px solid #dffcf4;
  border-radius:50%;

  background:#10231e;

  box-shadow:
    0 0 0 3px rgba(38,212,168,.13),
    0 2px 6px rgba(0,0,0,.5);
}

.avatarColorCustomRow{
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  gap:9px;
  align-items:center;
}

.avatarColorPreview{
  width:48px;
  height:44px;

  border:2px solid rgba(232,255,248,.65);
  border-radius:10px;

  background:var(--avatar-picker-color);

  box-shadow:
    0 0 0 3px rgba(69,228,187,.08),
    0 7px 16px rgba(0,0,0,.26),
    inset 0 1px rgba(255,255,255,.18);
}

#joinArea #avatarColorHexInput{
  width:100%;

  min-height:44px;

  margin:0 !important;
  padding:8px 11px !important;

  border:1px solid rgba(91,157,139,.35);
  border-radius:9px;

  background:#07100e;

  color:#dcebe6;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;

  font-size:.78rem;
  font-weight:850;
  letter-spacing:.06em;

  text-transform:uppercase;
}

#avatarColorReset{
  min-height:44px;
  margin:0;

  padding:7px 12px;

  border-color:rgba(95,158,141,.31);

  background:#111e1a;

  color:#9eb5ad;

  font-size:.7rem;
}


/* =======================================================================
   GUIDED TABLE SETUP — premium treatment
   ======================================================================= */

#tableSetupGuide.requiresSetup{
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(29,104,85,.12),
      rgba(0,0,0,.78) 45%
    );

  backdrop-filter:blur(7px);
}

.tableSetupGuideCard{
  overflow:hidden;

  border:1px solid rgba(81,183,155,.4);
  border-radius:16px;

  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(59,215,174,.12),
      transparent 45%
    ),
    linear-gradient(
      160deg,
      rgba(9,26,21,.96),
      rgba(3,12,10,.985)
    );

  box-shadow:
    0 25px 90px rgba(0,0,0,.58),
    inset 0 1px rgba(255,255,255,.035);
}

#tableSetupGuide.requiresSetup .tableSetupGuideCard{
  width:min(560px,calc(100vw - 24px));

  padding:25px;

  border-color:rgba(88,231,191,.48);

  background:
    radial-gradient(
      circle at 50% 0,
      rgba(49,199,158,.14),
      transparent 42%
    ),
    linear-gradient(
      155deg,
      rgba(9,27,22,.985),
      rgba(3,12,10,.99)
    );

  box-shadow:
    0 35px 110px rgba(0,0,0,.76),
    0 0 45px rgba(36,203,159,.055),
    inset 0 1px rgba(255,255,255,.04);
}

.tableSetupEyebrow{
  color:#5de4bd;

  font-size:.62rem;
  letter-spacing:.17em;
}

#tableSetupGuide.requiresSetup #tableSetupGuideTitle{
  margin-top:5px;

  color:#f6fcf9;

  font-size:1.55rem;
  letter-spacing:-.02em;
}

#tableSetupGuide.requiresSetup #tableSetupGuideMessage{
  margin:8px 0 12px;

  color:#adbfba;

  font-size:.79rem;
  line-height:1.5;
}

#tableSetupProgress{
  color:#6eddbd;

  font-size:.68rem;
  font-weight:900;

  letter-spacing:.02em;
}

#tableSetupHostForm{
  gap:10px;
}

#tableSetupHostForm label{
  color:#d2e2dc;

  font-size:.7rem;
  letter-spacing:.02em;
}

#tableSetupExpected{
  min-height:52px;

  border:1px solid rgba(84,190,160,.42);
  border-radius:10px;

  background:
    linear-gradient(
      180deg,
      #0c1b17,
      #07110e
    );

  color:#fff;

  box-shadow:
    inset 0 1px rgba(255,255,255,.025);

  font-size:1rem;
}

#tableSetupExpected:focus{
  border-color:#58dfb9;

  outline:none;

  box-shadow:
    0 0 0 3px rgba(66,224,183,.09),
    0 0 22px rgba(45,204,164,.08);
}

#tableSetupSave{
  min-height:54px;

  border:1px solid rgba(88,244,201,.65);
  border-radius:10px;

  background:
    radial-gradient(
      circle at 50% 0,
      rgba(101,255,215,.15),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      #17604d,
      #0d3c30
    );

  color:#f8fffc;

  box-shadow:
    0 0 24px rgba(40,217,171,.08),
    inset 0 1px rgba(255,255,255,.06);
}

#tableSetupHostForm small{
  margin-top:2px;

  color:#718d83;

  font-size:.66rem;
}


/* =======================================================================
   BOUNTY PICKER — same premium family, subtle gold accent
   ======================================================================= */

#bountyPicker{
  width:min(92vw,570px);

  padding:0;

  overflow:hidden;

  border:1px solid rgba(95,226,190,.48);
  border-radius:18px;

  background:
    radial-gradient(
      circle at 50% 0,
      rgba(61,204,165,.13),
      transparent 40%
    ),
    linear-gradient(
      150deg,
      #0a1b17,
      #04100d
    );

  color:#fff;

  box-shadow:
    0 35px 120px rgba(0,0,0,.84),
    0 0 0 1px rgba(255,255,255,.018) inset,
    0 0 48px rgba(42,215,170,.06);
}

#bountyPicker::backdrop{
  background:
    radial-gradient(
      circle at 50% 50%,
      rgba(25,88,72,.1),
      rgba(0,0,0,.84) 50%
    );

  backdrop-filter:blur(7px);
}

.bountyPickerCard{
  display:grid;
  gap:15px;

  padding:26px;
}

#bountyPicker .settingsEyebrow{
  color:#5be0ba;

  font-size:.65rem;
  font-weight:950;

  letter-spacing:.16em;
}

.bountyPickerCard h2{
  margin:0;

  color:#f8fcfa;

  font-size:1.55rem;
  letter-spacing:-.02em;
}

#bountyPickerPrompt{
  color:#d8e6e1;

  font-size:.84rem;
  font-weight:800;

  line-height:1.45;
}

.bountyRule{
  padding:10px 11px;

  border:1px solid rgba(190,157,69,.17);
  border-radius:9px;

  background:rgba(164,124,30,.055);

  color:#9dafaa;

  font-size:.72rem;
  line-height:1.45;
}

.bountyRankFields{
  gap:12px;
}

.bountyRankFields label{
  color:#93aea5;

  font-size:.68rem;
  letter-spacing:.05em;
}

.bountyPickerCard select{
  width:100%;
  min-height:56px;

  border:1px solid rgba(88,181,156,.4);
  border-radius:10px;

  background:#07130f;

  color:#fff;

  font-size:1.13rem;
  font-weight:950;

  text-align:center;

  outline:none;
}

.bountyPickerCard select:focus{
  border-color:#5de3bd;

  box-shadow:
    0 0 0 3px rgba(62,222,180,.08);
}

.bountyRankFields>span{
  padding-bottom:15px;

  color:#e0c56a;

  font-size:1.25rem;
}

#selectBountyBtn{
  min-height:55px;

  border:1px solid rgba(224,190,92,.66);
  border-radius:10px;

  background:
    radial-gradient(
      circle at 50% 0,
      rgba(255,222,111,.12),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      #6d581d,
      #4b3b10
    );

  color:#fff9df;

  font-size:.94rem;

  box-shadow:
    0 0 24px rgba(219,180,68,.075),
    inset 0 1px rgba(255,255,255,.055);
}

#selectBountyBtn:hover:not(:disabled){
  border-color:#f1d476;

  box-shadow:
    0 0 28px rgba(219,180,68,.13),
    inset 0 1px rgba(255,255,255,.075);
}

#bountyPickerFeedback{
  min-height:1.3em;

  color:#cdb86d;

  font-size:.72rem;
}


/* =======================================================================
   MOBILE V2
   ======================================================================= */

@media(max-width:700px){
  .avatarColorSwatches{
    grid-template-columns:repeat(5,1fr);
  }

  .avatarColorMixer label{
    grid-template-columns:72px minmax(0,1fr);
  }

  .avatarColorCustomRow{
    grid-template-columns:44px minmax(0,1fr) auto;
  }

  .avatarColorPreview{
    width:44px;
    height:42px;
  }

  #tableSetupGuide.requiresSetup .tableSetupGuideCard,
  .bountyPickerCard{
    padding:19px;
  }

  .bountyRankFields{
    grid-template-columns:1fr auto 1fr;
    gap:7px;
  }
}

@media(max-width:430px){
  .avatarColorCustomRow{
    grid-template-columns:44px minmax(0,1fr);
  }

  #avatarColorReset{
    grid-column:1 / -1;
    width:100%;
  }
}


/* ============================================================
   POKER3D_DEV_CAPTURE_REPORT_V1
   ============================================================ */

.devCapturePanel{
  display:grid;
  gap:9px;
}

.devCapturePanel>strong{
  color:#71e8c6;
  font-size:.68rem;
  font-weight:950;
  letter-spacing:.1em;
}

.devCaptureHelp{
  margin:0;
  color:#8ea79e;
  font-size:.67rem;
  line-height:1.4;
}

.devCaptureActions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
}

.devCaptureActions button{
  min-width:0;
  min-height:38px;
  padding:7px 9px;
  font-size:.68rem;
}

#devCopyChatGPTReportBtn{
  grid-column:1 / -1;

  border-color:rgba(81,231,191,.55);

  background:
    linear-gradient(
      180deg,
      #185846,
      #0d372c
    );
}

.devCaptureStatus{
  min-height:1.4em;
  padding:6px 8px;

  border:1px solid rgba(77,135,119,.22);
  border-radius:7px;

  background:rgba(0,0,0,.16);

  color:#8fb1a6;
  font-size:.62rem;
  line-height:1.35;

  overflow-wrap:anywhere;
}

.devCaptureStatus[data-kind="error"]{
  border-color:rgba(205,91,91,.34);
  color:#ff9d9d;
}

@media(max-width:560px){
  .devCaptureActions{
    grid-template-columns:1fr;
  }

  #devCopyChatGPTReportBtn{
    grid-column:auto;
  }
}


/* ============================================================
   POKER3D_STUDIO_SCENE_INSPECTOR_V1
   ============================================================ */

.devStudioInspector{
  display:grid;
  gap:9px;
}

.devStudioTitleRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.devStudioTitleRow>strong{
  color:#70e8c4;
  font-size:.67rem;
  letter-spacing:.08em;
}

#devSceneDraftState{
  flex:0 0 auto;
  padding:4px 7px;
  border:1px solid rgba(83,209,174,.28);
  border-radius:999px;
  background:rgba(28,81,68,.24);
  color:#8ce6cd;
  font-size:.56rem;
  font-weight:900;
  letter-spacing:.07em;
}

#devSceneDraftState[data-dirty="true"]{
  border-color:rgba(222,177,74,.45);
  background:rgba(109,78,16,.25);
  color:#ffd87c;
}

.devStudioHelp{
  margin:0;
  color:#89a49b;
  font-size:.62rem;
  line-height:1.4;
}

.devStudioSubhead{
  margin-top:2px;
  color:#8ca99f;
  font-size:.58rem;
  letter-spacing:.09em;
}

.devStudioXYZ{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}

.devStudioXYZ label{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:4px;
  min-width:0;
}

.devStudioXYZ label span{
  color:#74958b;
  font-size:.58rem;
  font-weight:900;
}

.devStudioXYZ input{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}

.devStudioVisible{
  margin:2px 0;
}

.devStudioActions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
}

.devStudioActions button{
  min-height:36px;
  min-width:0;
}

#devApplySceneTransformBtn{
  grid-column:1 / -1;
}

@media(max-width:560px){
  .devStudioXYZ{
    grid-template-columns:1fr;
  }

  .devStudioActions{
    grid-template-columns:1fr;
  }

  #devApplySceneTransformBtn{
    grid-column:auto;
  }
}


/* ============================================================
   POKER3D_STUDIO_TRANSFORM_GIZMOS_V1
   ============================================================ */

.devTransformGizmoPanel{
  display:grid;
  gap:8px;
}

.devGizmoHint{
  padding:3px 7px;

  border:1px solid rgba(107,232,197,.25);
  border-radius:999px;

  color:#86bbae;

  font-size:.56rem;
  font-weight:900;
  letter-spacing:.08em;
}

.devGizmoModes{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}

.devGizmoOptions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
}

.devTransformGizmoPanel button{
  min-width:0;
  min-height:37px;
}

.devTransformGizmoPanel button[data-active="true"]{
  border-color:rgba(89,229,191,.70);

  background:
    linear-gradient(
      180deg,
      rgba(28,104,83,.95),
      rgba(13,56,46,.95)
    );

  color:#b5ffe9;
}

#devTransformEditModeBtn[data-active="true"]{
  border-color:rgba(224,184,75,.66);

  background:
    linear-gradient(
      180deg,
      rgba(112,80,20,.98),
      rgba(62,43,11,.98)
    );

  color:#ffe29a;
}

@media(max-width:560px){
  .devGizmoModes{
    grid-template-columns:1fr;
  }

  .devGizmoOptions{
    grid-template-columns:1fr;
  }
}

/* ============================================================
   POKER3D_STUDIO_DIRECT_DOCK_V1
   ============================================================ */

:root{
  --poker3d-studio-direct-width:460px;
  --p3ds-bg:#181b20;
  --p3ds-bg2:#1e2228;
  --p3ds-bg3:#242a31;
  --p3ds-border:#353c45;
  --p3ds-border-soft:#292f36;
  --p3ds-text:#d9dee4;
  --p3ds-muted:#818a94;
  --p3ds-accent:#4aa9df;
}


#developerStudioDock[hidden]{
  display:none !important;
}


#developerStudioDock{
  position:fixed;
  top:0;
  right:0;
  bottom:0;

  width:
    var(--poker3d-studio-direct-width);

  z-index:20000;

  display:grid;

  grid-template-rows:
    42px
    38px
    auto
    minmax(0,1fr)
    28px;

  box-sizing:border-box;

  overflow:hidden;

  background:
    var(--p3ds-bg);

  color:
    var(--p3ds-text);

  border-left:
    1px solid
    var(--p3ds-border);

  box-shadow:
    -10px 0 30px
    rgba(0,0,0,.40);

  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;

  font-size:12px;
}


#developerStudioResizeHandle{
  position:absolute;

  top:0;
  left:-4px;
  bottom:0;

  width:8px;

  z-index:4;

  cursor:ew-resize;
}


#developerStudioResizeHandle:hover,
body.poker3d-studio-direct-resizing
#developerStudioResizeHandle{
  background:
    rgba(74,169,223,.28);
}


body.poker3d-studio-direct-resizing{
  cursor:ew-resize !important;
  user-select:none !important;
}


.developerStudioDockHeader{
  display:flex;

  align-items:center;
  justify-content:space-between;

  padding:
    0 8px
    0 12px;

  background:
    #1d2127;

  border-bottom:
    1px solid
    var(--p3ds-border);
}


.developerStudioDockBrand{
  display:flex;

  align-items:baseline;

  gap:8px;
}


.developerStudioDockBrand strong{
  color:#f2f4f6;

  font-size:12px;

  letter-spacing:.06em;
}


.developerStudioDockBrand span{
  color:#6dcaff;

  font-size:9px;

  letter-spacing:.08em;
}


#developerStudioDockClose{
  width:28px;
  height:28px;

  min-height:0;

  padding:0;

  border:0;

  background:transparent;

  color:#bac1c8;

  font-size:20px;

  cursor:pointer;
}


#developerStudioDockClose:hover{
  background:#343b43;

  color:white;
}


.developerStudioDockTabs{
  display:grid;

  grid-template-columns:
    repeat(4,1fr);

  background:#181c21;

  border-bottom:
    1px solid
    var(--p3ds-border);
}


.developerStudioDockTabs button{
  min-height:38px;

  padding:0 6px;

  border:0;

  border-right:
    1px solid
    var(--p3ds-border-soft);

  border-radius:0;

  background:transparent;

  color:#929ba5;

  font-size:11px;

  font-weight:700;

  cursor:pointer;
}


.developerStudioDockTabs button:last-child{
  border-right:0;
}


.developerStudioDockTabs button:hover{
  background:#252a31;

  color:#e6e9ec;
}


.developerStudioDockTabs
button[data-active="true"]{
  background:#252b32;

  color:#f4f6f8;

  box-shadow:
    inset 0 -2px 0
    var(--p3ds-accent);
}


#developerStudioContext{
  padding:7px 9px;

  background:#171b20;

  border-bottom:
    1px solid
    var(--p3ds-border-soft);
}


#developerStudioContext:empty{
  display:none;
}


#developerStudioContext
.devField{
  margin:0 !important;
}


#developerStudioContext
#devBountyInfo{
  margin:
    5px 0 0 !important;

  padding:
    5px 7px !important;
}


#developerStudioDockContent{
  min-height:0;

  overflow:hidden;
}


#developerStudioConsoleHost,
#developerStudioAssetHost{
  height:100%;

  min-height:0;
}


/* Existing DEV console becomes dock content. */

#developerStudioDock
#developerConsole{
  position:static !important;

  inset:auto !important;

  display:block;

  box-sizing:border-box;

  width:100% !important;
  height:100% !important;

  max-width:none !important;
  max-height:none !important;

  margin:0 !important;

  padding:0 !important;

  overflow:hidden !important;

  border:0 !important;

  border-radius:0 !important;

  background:
    var(--p3ds-bg) !important;

  box-shadow:none !important;

  color:
    var(--p3ds-text) !important;
}


#developerStudioDock
#developerConsole[hidden]{
  display:none !important;
}


#developerStudioDock
#developerConsole
.devConsoleHeader{
  display:none !important;
}


#developerStudioDock
.devConsoleBody{
  box-sizing:border-box;

  height:100% !important;

  max-height:none !important;

  padding:8px !important;

  overflow-y:auto !important;

  overflow-x:hidden !important;

  scrollbar-width:thin;

  scrollbar-color:
    #48515b
    #191d22;
}


#developerStudioDock
.devSection,
#developerStudioDock
#devSceneInspectorTools{
  margin:
    0 0 7px !important;

  padding:
    9px !important;

  border:
    1px solid
    var(--p3ds-border-soft) !important;

  border-radius:
    3px !important;

  background:
    #1c2025 !important;

  box-shadow:none !important;
}


#developerStudioDock
.devStudioTitleRow{
  margin:
    -9px -9px 8px !important;

  padding:
    7px 9px !important;

  background:
    #21262c !important;

  border-bottom:
    1px solid
    var(--p3ds-border-soft) !important;
}


#developerStudioDock
.devStudioHelp{
  color:#7f8994 !important;

  font-size:10px !important;

  line-height:1.35 !important;
}


#developerStudioDock
.devField{
  display:grid;

  gap:4px;

  margin:
    6px 0 !important;
}


#developerStudioDock
.devField > span{
  color:#848d97 !important;

  font-size:9px !important;

  font-weight:700 !important;

  letter-spacing:.06em !important;
}


#developerStudioDock
input,
#developerStudioDock
select{
  box-sizing:border-box;

  min-height:30px;

  padding:5px 7px;

  border:
    1px solid #3b434c !important;

  border-radius:
    3px !important;

  background:
    #111419 !important;

  color:
    #dce1e5 !important;
}


#developerStudioDock
button{
  box-sizing:border-box;

  border:
    1px solid #3b434c;

  border-radius:3px;

  background:#252a31;

  color:#d9dee3;
}


#developerStudioDock
button:hover{
  background:#30363e;
}


/* World Outliner gets editor hierarchy styling. */

#developerStudioDock
#devWorldOutlinerPanel{
  margin:
    8px 0 !important;

  padding:
    7px !important;

  border:
    1px solid #303741 !important;

  border-radius:
    3px !important;

  background:
    #14181d !important;
}


#developerStudioDock
#devWorldOutlinerTree{
  max-height:
    280px !important;

  border:
    1px solid #282e35 !important;

  border-radius:
    2px !important;

  background:
    #101318 !important;
}


/* Asset Browser is now a dock tab, not floating UI. */

#devAssetBrowserBtn{
  display:none !important;
}


#developerStudioDock
#devAssetBrowserPanel{
  position:static !important;

  inset:auto !important;

  display:block;

  box-sizing:border-box !important;

  width:100% !important;

  height:100% !important;

  max-width:none !important;

  max-height:none !important;

  margin:0 !important;

  padding:12px !important;

  overflow-y:auto !important;

  border:0 !important;

  border-radius:0 !important;

  background:
    var(--p3ds-bg) !important;

  box-shadow:none !important;

  color:
    var(--p3ds-text) !important;
}


#developerStudioDock
#devAssetBrowserPanel[hidden]{
  display:none !important;
}


#developerStudioDock
#devAssetBrowserClose{
  display:none !important;
}


.developerStudioDockFooter{
  display:flex;

  align-items:center;

  gap:10px;

  padding:
    0 10px;

  overflow:hidden;

  background:#191d22;

  color:#717a84;

  border-top:
    1px solid
    var(--p3ds-border-soft);

  font-size:9px;

  white-space:nowrap;
}


/* One slim DEV launcher instead of overlapping buttons. */

#devConsoleLauncher{
  position:fixed !important;

  top:50% !important;

  right:0 !important;

  bottom:auto !important;

  left:auto !important;

  transform:
    translateY(-50%) !important;

  width:
    28px !important;

  min-width:
    28px !important;

  height:
    92px !important;

  padding:
    7px 3px !important;

  margin:0 !important;

  writing-mode:
    vertical-rl;

  letter-spacing:.08em;

  z-index:
    19990 !important;

  border-radius:
    4px 0 0 4px !important;

  background:
    #1c252b !important;

  color:
    #83d1ff !important;
}


body.poker3d-studio-direct-open
#devConsoleLauncher{
  display:none !important;
}


/* Desktop Studio uses real screen space instead of covering HUD/chat. */

@media (min-width:1001px){

  body.poker3d-studio-direct-open
  #game{
    width:
      calc(
        100vw -
        var(--poker3d-studio-direct-width)
      ) !important;

    max-width:
      calc(
        100vw -
        var(--poker3d-studio-direct-width)
      ) !important;
  }
}


@media (max-width:1000px){

  #developerStudioDock{
    width:
      min(
        92vw,
        var(--poker3d-studio-direct-width)
      );
  }

  #developerStudioResizeHandle{
    display:none;
  }
}

/* ============================================================
   POKER3D_STUDIO_DIRECT_DOCK_V1_1_TAB_ROUTING_FIX
   ============================================================ */

/*
 * Existing Poker3D DEV styles can assign display values to
 * .devSection. Make Studio tab visibility authoritative.
 */
#developerStudioDock
.devConsoleBody > [hidden]{
  display:none !important;
}


/*
 * The console and asset hosts are mutually exclusive views.
 * Without this rule the inactive 100%-height host still consumes
 * the entire Studio content area.
 */
#developerStudioConsoleHost[hidden],
#developerStudioAssetHost[hidden]{
  display:none !important;
}


#developerStudioConsoleHost,
#developerStudioAssetHost{
  box-sizing:border-box;

  width:100%;

  height:100%;

  min-height:0;

  overflow:hidden;
}

/* ============================================================
   POKER3D_STUDIO_DIRECT_DOCK_V1_2_VISUAL_POLISH

   Presentation-only editor polish.
   No game logic / socket / scene mutation behavior.
   ============================================================ */


/* ------------------------------------------------------------
   Overall editor density
   ------------------------------------------------------------ */

#developerStudioDock{
  --p3ds-panel:#1b1f24;
  --p3ds-panel2:#20252b;
  --p3ds-field:#111419;
  --p3ds-hover:#292f36;
  --p3ds-selected:#263b49;
  --p3ds-selected-line:#55b9ee;
  --p3ds-title:#f0f3f5;
  --p3ds-label:#8d97a1;
}


#developerStudioDockContent{
  background:#16191e;
}


#developerStudioDock
.devConsoleBody{
  padding:7px !important;
}


#developerStudioDock
.devSection{
  margin-bottom:6px !important;
}


#developerStudioDock
.devSection:last-child{
  margin-bottom:0 !important;
}


/* ------------------------------------------------------------
   Proper editor-like section headers
   ------------------------------------------------------------ */

#developerStudioDock
.devSection > strong:first-child{
  display:block;

  margin:
    -9px -9px 8px;

  padding:
    7px 9px;

  border-bottom:
    1px solid #2d343c;

  background:
    #20252b;

  color:
    var(--p3ds-title);

  font-size:10px;

  font-weight:800;

  letter-spacing:.075em;
}


#developerStudioDock
.devStudioTitleRow{
  min-height:28px;

  display:flex;

  align-items:center;

  justify-content:space-between;

  gap:8px;
}


#developerStudioDock
.devStudioTitleRow strong{
  color:
    var(--p3ds-title) !important;

  font-size:
    10px !important;

  letter-spacing:
    .075em !important;
}


/* ------------------------------------------------------------
   Scene / Inspector
   ------------------------------------------------------------ */

#developerStudioDock
#devSceneInspectorTools{
  padding:8px !important;

  border-color:
    #303840 !important;

  background:
    #191d22 !important;
}


#developerStudioDock
#devSceneInspectorTools
.devStudioHelp{
  margin:
    4px 2px 8px !important;

  padding:
    0 !important;
}


/* Outliner becomes a distinct editor pane */

#developerStudioDock
#devWorldOutlinerPanel{
  margin:
    7px 0 10px !important;

  padding:
    7px !important;

  border:
    1px solid #343c45 !important;

  border-radius:
    3px !important;

  background:
    #12161a !important;

  box-shadow:
    inset 0 1px 0
    rgba(255,255,255,.018);
}


#developerStudioDock
#devWorldOutlinerPanel
.devStudioSubhead{
  color:#b7c0c9 !important;

  font-size:9px !important;

  font-weight:800 !important;

  letter-spacing:.09em !important;
}


#developerStudioDock
#devWorldOutlinerFilter{
  height:29px;

  margin:
    0 0 6px !important;

  padding:
    4px 7px !important;

  background:
    #0e1115 !important;
}


#developerStudioDock
#devWorldOutlinerTree{
  max-height:
    300px !important;

  min-height:
    170px;

  padding:
    3px 0;

  overflow:auto;

  border:
    1px solid #272e35 !important;

  background:
    #0d1014 !important;
}


/* Generic hierarchy rows */

#developerStudioDock
#devWorldOutlinerTree button,
#developerStudioDock
#devWorldOutlinerTree
[role="button"]{
  border-color:
    transparent !important;

  background:
    transparent !important;
}


#developerStudioDock
#devWorldOutlinerTree button:hover,
#developerStudioDock
#devWorldOutlinerTree
[role="button"]:hover{
  background:
    var(--p3ds-hover) !important;
}


/* Handle common selected-state implementations */

#developerStudioDock
#devWorldOutlinerTree
[data-selected="true"],
#developerStudioDock
#devWorldOutlinerTree
[aria-selected="true"],
#developerStudioDock
#devWorldOutlinerTree
.selected{
  background:
    var(--p3ds-selected) !important;

  box-shadow:
    inset 2px 0 0
    var(--p3ds-selected-line) !important;

  color:#eef8ff !important;
}


/* Scene-object selector and metadata */

#developerStudioDock
#devSceneObjectSelect{
  margin-top:3px;
}


#developerStudioDock
#devSceneObjectInfo{
  margin-top:6px !important;

  border-color:
    #29323a !important;

  background:
    #101419 !important;

  color:
    #9faab4 !important;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace !important;

  font-size:
    9px !important;

  line-height:
    1.4 !important;
}


/* ------------------------------------------------------------
   Numeric Inspector fields
   ------------------------------------------------------------ */

#developerStudioDock
.devStudioInspector input[type="number"]{
  min-width:0;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;

  font-size:10px;
}


#developerStudioDock
.devStudioInspector select{
  font-size:10px;
}


#developerStudioDock
.devStudioInspector
input:focus,
#developerStudioDock
.devStudioInspector
select:focus{
  outline:none;

  border-color:
    #4ca9dc !important;

  box-shadow:
    0 0 0 1px
    rgba(76,169,220,.22);
}


/* XYZ labels become easier to scan */

#developerStudioDock
.devStudioInspector
label{
  color:
    var(--p3ds-label);
}


/* ------------------------------------------------------------
   Gizmo section
   ------------------------------------------------------------ */

#developerStudioDock
#devTransformGizmoTools{
  border-color:
    #343c45 !important;

  background:
    #181c21 !important;
}


#developerStudioDock
.devGizmoModes{
  display:grid !important;

  grid-template-columns:
    repeat(3,minmax(0,1fr)) !important;

  gap:5px !important;

  margin-top:6px !important;
}


#developerStudioDock
.devGizmoModes button{
  min-width:0;

  padding:
    5px 4px;
}


#developerStudioDock
.devGizmoHint{
  color:#6dbce8 !important;

  font-size:9px !important;
}


/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

#developerStudioDock
button{
  min-height:28px;

  padding:
    5px 8px;

  transition:
    background-color .08s linear,
    border-color .08s linear,
    color .08s linear;
}


#developerStudioDock
button.devPrimary{
  border-color:
    #3276a0 !important;

  background:
    #245b7c !important;

  color:
    #eff9ff !important;
}


#developerStudioDock
button.devPrimary:hover{
  background:
    #2b698e !important;
}


#developerStudioDock
button.devGold{
  border-color:
    #796832 !important;

  background:
    #5d5129 !important;

  color:
    #fff0b5 !important;
}


/* ------------------------------------------------------------
   Shared Player context
   ------------------------------------------------------------ */

#developerStudioContext{
  padding:
    7px 8px 6px;

  background:
    #14181d;
}


#developerStudioContext
.devField > span{
  margin-bottom:1px;

  color:#747e88 !important;
}


#developerStudioContext
#devBountyInfo{
  border:
    1px solid #253029 !important;

  background:
    #09140f !important;

  color:
    #b9d7c9 !important;

  font-size:
    9px !important;
}


/* ------------------------------------------------------------
   Game tab readability
   ------------------------------------------------------------ */

#developerStudioDock
.devConsoleBody >
[data-developer-studio-tab="game"]{
  border-left:
    2px solid #39444e !important;
}


#developerStudioDock
.devConsoleBody >
[data-developer-studio-tab="game"]:hover{
  border-left-color:
    #4d7b98 !important;
}


/* ------------------------------------------------------------
   Debug tab readability
   ------------------------------------------------------------ */

#developerStudioDock
#devCaptureTools{
  border-left:
    2px solid #6c5682 !important;
}


#developerStudioDock
.devCaptureActions{
  display:grid !important;

  grid-template-columns:
    repeat(2,minmax(0,1fr)) !important;

  gap:5px !important;
}


#developerStudioDock
#devCaptureStatus{
  margin-top:7px !important;

  padding:6px !important;

  border:
    1px solid #302a39 !important;

  border-radius:3px !important;

  background:
    #15121a !important;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace !important;

  font-size:
    9px !important;
}


/* ------------------------------------------------------------
   Asset Browser editor styling
   ------------------------------------------------------------ */

#developerStudioDock
#devAssetBrowserPanel{
  padding:9px !important;
}


#developerStudioDock
#devAssetBrowserPanel
select{
  min-height:32px !important;

  margin-bottom:8px !important;
}


#developerStudioDock
#devAssetBrowserInfo{
  border:
    1px solid #2a3239 !important;

  border-radius:3px !important;

  background:
    #101419 !important;

  color:
    #a8b2bc !important;

  font-size:
    9px !important;

  line-height:
    1.4 !important;
}


/* ------------------------------------------------------------
   Scrollbars
   ------------------------------------------------------------ */

#developerStudioDock *{
  scrollbar-width:thin;

  scrollbar-color:
    #48515b
    #15191e;
}


#developerStudioDock ::-webkit-scrollbar{
  width:8px;

  height:8px;
}


#developerStudioDock ::-webkit-scrollbar-track{
  background:#15191e;
}


#developerStudioDock ::-webkit-scrollbar-thumb{
  border:
    2px solid #15191e;

  border-radius:8px;

  background:#48515b;
}


/* ------------------------------------------------------------
   Bottom shortcut/status bar
   ------------------------------------------------------------ */

.developerStudioDockFooter{
  justify-content:flex-start;

  border-top:
    1px solid #30363d;

  background:#15191e;

  color:#6f7983;

  letter-spacing:.02em;
}


.developerStudioDockFooter span{
  padding-right:2px;
}


/* ------------------------------------------------------------
   Very wide Studio dock gets more breathing room.
   ------------------------------------------------------------ */

@media (min-width:1500px){

  #developerStudioDock
  .devConsoleBody{
    padding:8px !important;
  }

  #developerStudioDock
  #devWorldOutlinerTree{
    max-height:340px !important;
  }
}

/* ============================================================
   POKER3D_STUDIO_DIRECT_DOCK_V1_3_SCENE_SPLIT
   ============================================================ */


/*
 * Scene mode owns the entire console body.
 * The outer DEV console must not scroll because each split pane
 * has its own scrolling region.
 */
#developerStudioDock
.devConsoleBody.developerStudioSceneSplitActive{
  height:100% !important;

  min-height:0 !important;

  padding:0 !important;

  overflow:hidden !important;
}


/* ------------------------------------------------------------
   Main split
   ------------------------------------------------------------ */

#developerStudioSceneSplit{
  --poker3d-studio-scene-outliner-size:38%;

  box-sizing:border-box;

  display:grid;

  grid-template-rows:
    var(--poker3d-studio-scene-outliner-size)
    7px
    minmax(0,1fr);

  width:100%;
  height:100%;

  min-width:0;
  min-height:0;

  overflow:hidden;

  background:#14181d;
}


#developerStudioSceneSplit[hidden]{
  display:none !important;
}


/* ------------------------------------------------------------
   Outliner pane
   ------------------------------------------------------------ */

#developerStudioSceneOutlinerPane{
  box-sizing:border-box;

  min-width:0;
  min-height:0;

  overflow:hidden;

  padding:7px 7px 5px;

  background:#12161a;
}


#developerStudioSceneOutlinerHost{
  width:100%;
  height:100%;

  min-width:0;
  min-height:0;

  overflow:hidden;
}


#developerStudioDock
#developerStudioSceneOutlinerPane
#devWorldOutlinerPanel{
  box-sizing:border-box;

  display:flex;

  flex-direction:column;

  width:100%;
  height:100%;

  min-width:0;
  min-height:0;

  margin:0 !important;

  padding:7px !important;

  overflow:hidden !important;

  border:
    1px solid #343c45 !important;

  border-radius:
    3px !important;

  background:
    #101419 !important;
}


/*
 * The hierarchy itself consumes all spare Outliner space.
 */
#developerStudioDock
#developerStudioSceneOutlinerPane
#devWorldOutlinerTree{
  flex:
    1 1 auto;

  width:100%;

  min-height:0 !important;
  max-height:none !important;

  overflow:auto !important;

  margin-bottom:0 !important;
}


/* ------------------------------------------------------------
   Draggable horizontal divider
   ------------------------------------------------------------ */

#developerStudioSceneDivider{
  position:relative;

  box-sizing:border-box;

  width:100%;
  height:7px;

  cursor:row-resize;

  outline:none;

  background:#1b2026;

  border-top:
    1px solid #303841;

  border-bottom:
    1px solid #0d1014;

  z-index:2;
}


#developerStudioSceneDivider span{
  position:absolute;

  left:50%;
  top:50%;

  width:44px;
  height:2px;

  transform:
    translate(-50%,-50%);

  border-radius:2px;

  background:#48535e;

  pointer-events:none;
}


#developerStudioSceneDivider:hover,
#developerStudioSceneDivider:focus-visible,
body.poker3d-studio-scene-split-resizing
#developerStudioSceneDivider{
  background:#26323a;
}


#developerStudioSceneDivider:hover span,
#developerStudioSceneDivider:focus-visible span,
body.poker3d-studio-scene-split-resizing
#developerStudioSceneDivider span{
  background:#59b8e9;
}


body.poker3d-studio-scene-split-resizing{
  cursor:row-resize !important;

  user-select:none !important;
}


/* ------------------------------------------------------------
   Inspector / tools pane
   ------------------------------------------------------------ */

#developerStudioSceneInspectorPane{
  box-sizing:border-box;

  min-width:0;
  min-height:0;

  overflow-y:auto;
  overflow-x:hidden;

  padding:6px 7px 8px;

  background:#181c21;

  scrollbar-width:thin;

  scrollbar-color:
    #48515b
    #15191e;
}


#developerStudioSceneInspectorHost{
  box-sizing:border-box;

  width:100%;

  min-width:0;
}


/*
 * Scene sections are now nested inside the lower pane.
 * Remove the old document-style outer spacing.
 */
#developerStudioDock
#developerStudioSceneInspectorHost >
.devSection{
  margin:
    0 0 6px !important;
}


#developerStudioDock
#developerStudioSceneInspectorHost >
.devSection:last-child{
  margin-bottom:0 !important;
}


/*
 * The Scene Inspector no longer owns the World Outliner, so tighten
 * the gap above the actual object Inspector controls.
 */
#developerStudioDock
#developerStudioSceneInspectorHost
#devSceneInspectorTools{
  margin-top:0 !important;
}


/* ------------------------------------------------------------
   Pane identity
   ------------------------------------------------------------ */

#developerStudioSceneOutlinerPane::before{
  content:"SCENE HIERARCHY";

  display:block;

  height:16px;

  margin:
    0 1px 5px;

  color:#73808b;

  font-size:8px;

  font-weight:800;

  letter-spacing:.10em;

  line-height:16px;
}


#developerStudioSceneOutlinerHost{
  height:
    calc(100% - 21px);
}


#developerStudioSceneInspectorPane::before{
  content:"INSPECTOR / TOOLS";

  display:block;

  height:16px;

  margin:
    0 1px 5px;

  color:#73808b;

  font-size:8px;

  font-weight:800;

  letter-spacing:.10em;

  line-height:16px;
}


/* ------------------------------------------------------------
   Small-height protection
   ------------------------------------------------------------ */

@media (max-height:700px){

  #developerStudioSceneSplit{
    --poker3d-studio-scene-outliner-size:34%;
  }

  #developerStudioSceneOutlinerPane{
    padding-top:5px;
  }

  #developerStudioSceneInspectorPane{
    padding-top:5px;
  }
}


/* ============================================================
   POKER3D_STUDIO_DIRECT_DOCK_V1_4_COLLAPSIBLE_INSPECTOR
   ============================================================ */

#developerStudioSceneInspectorHost
> #devSceneInspectorTools{
  order:-10;
}


#developerStudioDock
.developerStudioToolGroup{
  margin:0 0 6px;

  overflow:hidden;

  border:
    1px solid #343c45;

  border-radius:3px;

  background:#171b20;
}


#developerStudioDock
.developerStudioToolGroupHeader{
  display:flex;

  align-items:center;

  gap:6px;

  width:100%;

  min-height:30px;

  padding:5px 8px;

  border:0;

  border-radius:0;

  background:#222830;

  color:#e3e8ed;

  font-size:10px;

  font-weight:800;

  letter-spacing:.055em;

  text-align:left;
}


#developerStudioDock
.developerStudioToolGroupHeader:hover,
#developerStudioDock
.developerStudioToolGroupHeader:focus-visible{
  background:#2a323a;

  color:#f5f9fc;
}


#developerStudioDock
.developerStudioToolGroupChevron{
  display:inline-block;

  width:10px;

  color:#75bfe8;

  transition:transform .10s ease;
}


#developerStudioDock
.developerStudioToolGroup[data-expanded="true"]
> .developerStudioToolGroupHeader
.developerStudioToolGroupChevron{
  transform:rotate(90deg);
}


#developerStudioDock
.developerStudioToolGroupBody{
  padding:8px;

  border-top:
    1px solid #303740;
}


#developerStudioDock
.developerStudioToolGroupBody[hidden],
#developerStudioDock
.developerStudioLegacyGroupTitle[hidden]{
  display:none !important;
}


#developerStudioDock
#devSceneInspectorTools{
  padding:0 !important;

  border:0 !important;

  background:transparent !important;
}


#developerStudioDock
#devSceneInspectorTools
> .developerStudioToolGroup:last-child,
#developerStudioDock
#devCosmeticCalibrationTools
> .developerStudioToolGroup,
#developerStudioDock
#devAnimationTesterTools
> .developerStudioToolGroup,
#developerStudioDock
#devTransformGizmoTools
> .developerStudioToolGroup{
  margin-bottom:0;
}


#developerStudioDock
#devCosmeticCalibrationTools,
#developerStudioDock
#devAnimationTesterTools,
#developerStudioDock
#devTransformGizmoTools{
  padding:0 !important;

  border:0 !important;

  background:transparent !important;
}

/* POKER3D_SPACE_PISTOL_TOUCH_FIRE_CSS_V1 */

/*
 * Only disable browser touch gestures while pistol aim is active.
 * Normal Poker3D mobile camera pinch/orbit behavior remains unchanged.
 */
#scene[data-space-pistol-touch-aim="on"]{
  touch-action:none;
}

#spacePistolTouchFireBtn{
  display:none;
}

#spacePistolTouchFireBtn[hidden]{
  display:none !important;
}

@media(max-width:700px), (max-width:900px) and (max-height:500px){
  #spacePistolTouchFireBtn:not([hidden]){
    position:absolute;
    right:max(18px,env(safe-area-inset-right));
    bottom:max(88px,calc(env(safe-area-inset-bottom) + 72px));
    z-index:90;

    display:flex;
    align-items:center;
    justify-content:center;

    width:84px;
    height:84px;
    padding:0;

    border:2px solid rgba(255,255,255,.8);
    border-radius:50%;

    background:rgba(150,20,20,.88);
    color:#fff;

    font-size:1rem;
    font-weight:900;
    letter-spacing:.08em;

    box-shadow:
      0 5px 20px rgba(0,0,0,.55),
      inset 0 0 18px rgba(255,255,255,.12);

    user-select:none;
    -webkit-user-select:none;
    touch-action:none;
  }

  #spacePistolTouchFireBtn:not([hidden]):active{
    transform:scale(.94);
  }
}
/* POKER3D_POKERCOIN_HUD_V1 */
.pokerCoinHudBalance{
 display:inline-flex;
 align-items:center;
 min-height:28px;
 padding:4px 10px;
 border:1px solid rgba(255,215,90,.55);
 border-radius:999px;
 font-weight:800;
 white-space:nowrap;
}
.shopItemAffordable{
 outline:1px solid rgba(120,220,140,.5);
}
.shopItemUnaffordable{
 opacity:.72;
}
.shopAffordability{
 margin-top:4px;
 font-size:.78rem;
 font-weight:800;
}
.shopAffordability.unaffordable{
 opacity:.75;
}

/* POKER3D_POKERCOIN_PURCHASE_UI_V1 */
.shopPurchasePanel{
display:grid;
gap:8px;
margin-bottom:10px;
padding:10px;
border:1px solid #3e5e52;
border-radius:9px;
background:#091310;
}

.shopPurchaseHeading,
.shopPurchasePackage{
display:grid;
gap:5px;
}

.shopPurchaseHeading{
grid-template-columns:1fr auto;
align-items:center;
}

.shopPurchaseHeading strong,
.shopPurchasePackage strong,
.shopPurchaseOrder strong{
color:#f4e199;
}

.shopPurchaseHeading span,
.shopPurchasePackage span,
.shopPurchaseDisclaimer,
.shopPurchaseOrder{
color:#9fb7ae;
font-size:.68rem;
}

.shopPurchaseDisclaimer,
.shopPurchaseOrder p{
margin:0;
line-height:1.35;
}

.shopPurchasePackages{
display:grid;
gap:7px;
}

.shopPurchasePackage{
padding:8px;
border:1px solid #304b42;
border-radius:8px;
background:#0d1815;
}

.shopPurchaseMethods{
display:grid;
grid-template-columns:repeat(3,minmax(0,1fr));
gap:6px;
}

.shopPurchaseMethods button{
min-height:44px;
padding:6px 5px;
font-size:.68rem;
}

.shopPurchaseOrder{
display:grid;
gap:5px;
padding:8px;
border:1px solid #8d7431;
border-radius:8px;
background:#181509;
overflow-wrap:anywhere;
}

/* POKER3D_AIM_STATUS_EDGE_HUD_V1 */
#spacePistolAimHint{
  left:max(10px,env(safe-area-inset-left,0px));
  right:auto;
  top:max(calc(env(safe-area-inset-top,0px) + 72px),calc(50% - 62px));
  transform:none;
  z-index:82;
  max-width:min(42vw,260px);
  padding:5px 8px;
  border:1px solid rgba(93,232,255,.22);
  border-radius:8px;
  background:rgba(3,13,15,.84);
  box-shadow:0 4px 16px rgba(0,0,0,.34);
  font-size:10px;
  line-height:1.35;
  letter-spacing:.025em;
  white-space:normal;
  text-align:left;
}

/* POKER3D_SPACE_ROCK_FARM_EDGE_HUD_V1 */
#spaceRockFarmNotice{
  position:absolute;
  left:max(10px,env(safe-area-inset-left,0px));
  top:calc(50% - 128px);
  z-index:89;
  pointer-events:none;
  width:min(46vw,280px);
  padding:6px 9px;
  border:1px solid rgba(89,184,146,.58);
  border-radius:8px;
  background:rgba(8,34,27,.92);
  color:#eafff7;
  box-shadow:0 5px 18px rgba(0,0,0,.38);
  font-size:10px;
  font-weight:800;
  line-height:1.35;
  text-align:left;
}
#spaceRockFarmNotice[hidden]{display:none}
#spaceRockFarmNotice[data-kind="error"]{
  border-color:rgba(212,106,106,.72);
  background:rgba(58,22,22,.94);
  color:#ffdede;
}
#spaceRockFarmCashOutBtn{display:none}
#spaceRockFarmCashOutBtn[hidden]{display:none !important}

#quickRockRangeBtn{
  position:absolute;
  left:max(12px,env(safe-area-inset-left,0px));
  bottom:max(72px,calc(env(safe-area-inset-bottom,0px) + 72px));
  z-index:92;
  min-height:42px;
  padding:8px 13px;
  border:1px solid rgba(255,210,82,.8);
  border-radius:10px;
  background:rgba(26,20,5,.94);
  color:#ffe58b;
  box-shadow:0 5px 18px rgba(0,0,0,.42);
  font:900 12px/1 inherit;
  letter-spacing:.06em;
}
#quickRockRangeBtn[hidden]{display:none!important}
#quickRockRangeBtn[aria-pressed="true"]{
  border-color:#5de8b7;
  color:#baffea;
}
#quickPistolAimBtn{
  position:absolute;
  left:max(12px,env(safe-area-inset-left,0px));
  bottom:max(124px,calc(env(safe-area-inset-bottom,0px) + 124px));
  z-index:93;
  min-width:116px;
  min-height:44px;
  padding:8px 12px;
  border:1px solid rgba(93,232,255,.72);
  border-radius:10px;
  background:rgba(4,20,24,.94);
  color:#c9f9ff;
  box-shadow:0 5px 18px rgba(0,0,0,.45);
  font:900 12px/1 inherit;
  letter-spacing:.055em;
}
#quickPistolAimBtn[hidden]{display:none!important}
#quickPistolAimBtn[aria-pressed="true"]{border-color:#ff796f;color:#ffd7d4}

/* Weapon play owns the screen. Poker controls return immediately on holster. */
#game.weaponAimActive #playerHud,
#game.weaponAimActive #autoCallDock,
#game.weaponAimActive #betPanel,
#game.weaponAimActive #turnActionDock,
#game.weaponAimActive #mobileGameTabs{
  display:none!important;
}

@media(max-width:700px), (max-width:900px) and (max-height:500px){
  #spacePistolAimHint{
    left:max(8px,env(safe-area-inset-left,0px));
    top:max(calc(env(safe-area-inset-top,0px) + 54px),calc(50% - 68px));
    max-width:min(46vw,220px);
    padding:4px 7px;
    font-size:9px;
  }
  #spaceRockFarmNotice{
    left:max(8px,env(safe-area-inset-left,0px));
    top:calc(50% - 126px);
    width:min(52vw,230px);
    padding:5px 7px;
    font-size:9px;
  }
  #spaceRockFarmCashOutBtn:not([hidden]){
    /* POKER3D_MOBILE_ROCK_FARM_CASH_OUT_V1 */
    position:absolute;
    left:max(10px,env(safe-area-inset-left,0px));
    top:calc(50% + 8px);
    z-index:91;
    display:flex;
    min-width:104px;
    min-height:44px;
    padding:6px 10px;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid rgba(255,215,111,.78);
    border-radius:10px;
    background:rgba(39,31,8,.94);
    color:#fff4c4;
    box-shadow:0 5px 18px rgba(0,0,0,.48);
    font-size:.76rem;
    font-weight:950;
    letter-spacing:.055em;
    touch-action:manipulation;
    user-select:none;
    -webkit-user-select:none;
  }
  #spaceRockFarmCashOutBtn:not([hidden]) small{
    opacity:.64;
    font-size:.58rem;
    font-weight:800;
  }
  #spaceRockFarmCashOutBtn:not([hidden]):active{transform:scale(.96)}
}
rn/* POKER3D_FIRST_RUN_STREAMLINE_V1 */rn.firstRunHero{max-width:680px;margin:0 auto 18px;text-align:center}rn.firstRunEyebrow{font-size:.78rem;font-weight:900;letter-spacing:.18em;text-transform:uppercase;opacity:.72}rn.firstRunHero h1{margin:6px 0;font-size:clamp(1.45rem,4vw,2.35rem);line-height:1.08}rn.firstRunHero p{margin:0;color:#9db6ad;font-weight:700}rn#quickConnectBtn.playNowPrimary{min-height:54px;font-size:1.08rem;font-weight:950}rn.onboardingDeferred{display:none!important}rn@media(max-width:600px){.firstRunHero{margin-bottom:12px}.firstRunHero h1{font-size:1.55rem}#quickConnectBtn.playNowPrimary{min-height:56px;font-size:1.1rem}}rn
/* POKER3D_LANDING_PROGRESSIVE_DISCLOSURE_V1 */
#landing{
max-width:720px;
}
#landing .firstRunHero{
margin-bottom:22px;
}
#landing .landingTableActions{
gap:10px;
}
#landing #quickConnectBtn{
min-height:58px;
}
#landing #createTableBtn{
min-height:48px;
}
.landingMoreOptions{
width:100%;
margin-top:10px;
background:transparent;
border-color:rgba(157,182,173,.28);
color:#9db6ad;
}
.friendSetupDeferred,
.discoveryDeferred{
display:none!important;
}
body.friendSetupOpen .friendSetupDeferred{
display:block!important;
}
body.friendSetupOpen .privateTableToggle.friendSetupDeferred{
display:flex!important;
}
body.discoveryOpen .discoveryDeferred{
display:block!important;
}
body.discoveryOpen .roomCodeJoin.discoveryDeferred{
display:grid!important;
}
body.friendSetupOpen #createTableName{
margin-top:12px;
}
@media(max-width:560px){
#landing{
margin:2vh 10px;
padding:20px 16px;
}
#landing .firstRunHero{
margin-bottom:16px;
}
#landing .firstRunHero p{
font-size:.92rem;
line-height:1.4;
}
}
/* POKER3D_JOIN_OPTIONAL_CONTROLS_V1 */
.joinOptionalControls{
display:flex;
gap:8px;
margin:10px 0;
}
.joinOptionalControls button{
flex:1;
min-height:38px;
}
#joinArea .accountCard.accountCollapsed .accountFields{
display:none!important;
}
#joinArea .accountCard.accountCollapsed{
padding-block:9px;
}
#joinArea.characterOptionsOpen .characterPreviewCard.onboardingDeferred{
display:block!important;
}
#joinArea.characterOptionsOpen .avatarCustomizer.onboardingDeferred{
display:grid!important;
}
@media(max-width:560px){
.joinOptionalControls{
margin:8px 0;
}
#joinArea.characterOptionsOpen .characterPreviewCard{
margin-top:8px;
}
}
/* POKER3D_ACTION_BAR_PRIORITY_STYLE_V1 */
#controls[data-action-priority="primary"]{
display:flex;
gap:8px;
align-items:center;
justify-content:center;
}

#controls[data-action-priority="primary"] button{
min-height:42px;
padding:8px 14px;
}


/* POKER3D_ACTION_BAR_RESPONSIVE_V1 */
#controls[data-action-priority="primary"]{
flex-wrap:wrap;
}

#controls[data-action-priority="primary"] button[data-action]{
flex:1 1 auto;
}

@media(max-width:700px){
#controls[data-action-priority="primary"]{
width:100%;
gap:5px;
}

#controls[data-action-priority="primary"] button[data-action]{
min-height:44px;
font-size:.9rem;
}
}


/* POKER3D_SECONDARY_HUD_STYLE_V1 */
[data-action-priority="secondary"]{
opacity:.92;
}

#playerHud [data-action-priority="secondary"]{
font-size:.95rem;
}

/* POKER3D_LIVE_CINEMATIC_LANDING_V1
   The landing page reuses the real table renderer as a read-only backdrop. */
body.landing-spectator{background:#030706}
body.landing-spectator #game{
  position:fixed;
  z-index:0;
  inset:0;
  display:block!important;
  overflow:hidden;
  background:#030706;
}
body.landing-spectator #game>:not(#tableStage){display:none!important}
body.landing-spectator #tableStage{position:absolute;inset:0;width:100%;height:100%;min-height:100%;overflow:hidden}
body.landing-spectator #tableStage>:not(#scene){display:none!important}
body.landing-spectator #scene{display:block;width:100%!important;height:100%!important;filter:saturate(.94) brightness(.84)}
body.landing-spectator main{position:relative;z-index:1;min-height:100vh;min-height:100svh}

#landing.panel{
  position:relative;
  z-index:2;
  display:grid;
  align-items:center;
  min-height:100vh;
  min-height:100svh;
  width:100%;
  max-width:none;
  margin:0;
  padding:clamp(18px,5vw,72px);
  overflow:hidden;
  text-align:left;
  border:0;
  border-radius:0;
  background:linear-gradient(90deg,rgba(1,6,5,.72) 0%,rgba(2,8,6,.42) 38%,rgba(2,7,6,.035) 73%,rgba(2,7,6,.16) 100%);
}
#landing[hidden]{display:none!important}
.landingContent{
  position:relative;
  width:min(470px,100%);
  max-height:calc(100vh - clamp(36px,10vw,144px));
  overflow:visible;
  padding:clamp(24px,3vw,42px);
  border:1px solid rgba(131,227,187,.2);
  border-radius:26px;
  background:linear-gradient(145deg,rgba(7,18,15,.92),rgba(5,11,9,.83));
  box-shadow:0 28px 90px rgba(0,0,0,.5),inset 0 1px rgba(255,255,255,.04);
  backdrop-filter:blur(3px);
}
#landing #createArea,#landing #joinArea{position:relative}
#landing .discoveryDeferred,
#landing .friendSetupDeferred{
  position:absolute;
  left:calc(100% + 18px);
  top:0;
  width:min(430px,calc(100vw - 560px));
  max-height:calc(100vh - 150px);
  overflow:auto;
  opacity:0;
  pointer-events:none;
  transform:translateX(-10px);
  transition:opacity .16s ease,transform .16s ease;
}
#landing .roomCodeJoin.discoveryDeferred{top:auto;bottom:0}
#landing #roomBrowser.discoveryDeferred{
  bottom:92px;
}
#landing #friendSetupPanel.friendSetupDeferred{
  gap:12px;
  padding:14px;
  border:1px solid rgba(91,220,185,.23);
  border-radius:14px;
  background:rgba(5,15,13,.92);
}
#landing #friendSetupPanel.friendSetupDeferred .privateTableToggle{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
}
#landing #friendSetupPanel.friendSetupDeferred #createTableName,
#landing #friendSetupPanel.friendSetupDeferred #createTablePassword{
  width:100%;
  margin:0;
}
body.discoveryOpen #landing .discoveryDeferred,
body.friendSetupOpen #landing .friendSetupDeferred{
  opacity:1;
  pointer-events:auto;
  transform:none;
}
body.friendSetupOpen #landing #friendSetupPanel.friendSetupDeferred{display:grid!important}
#landing .firstRunHero{margin:0 0 26px;text-align:left}
#landing .firstRunEyebrow{display:flex;align-items:center;gap:9px;color:#8de6bf;font-size:.67rem;letter-spacing:.17em}
.landingLiveDot{width:8px;height:8px;flex:0 0 auto;border-radius:50%;background:#66e5ae;box-shadow:0 0 15px #66e5ae;animation:landingLivePulse 2s ease-in-out infinite}
#landing .firstRunHero h1{max-width:440px;margin:11px 0 12px;font-size:clamp(2.45rem,5vw,4.8rem);line-height:.93;letter-spacing:-.058em}
#landing .firstRunHero p{max-width:410px;margin:0;color:#b5c9c1;font-weight:650;line-height:1.55}
#landing .landingTableActions{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:10px}
#landing .landingTableActions button{min-height:58px;border-radius:14px}
#landing #quickConnectBtn{border-color:#70e0b2;background:linear-gradient(135deg,#49d49b,#1a8c64);color:#02130d;box-shadow:0 12px 28px rgba(37,178,126,.24);font-size:1.08rem}
#landing #quickConnectBtn::after{content:"  →"}
#landing #createTableBtn{margin:0;background:rgba(18,42,35,.8);border-color:rgba(122,192,163,.34)}
.landingPlayHint{margin:11px 3px 0;color:#819d92;font-size:.71rem;line-height:1.45;text-align:left}
#landing .landingMoreOptions{min-height:40px;margin-top:14px;padding:7px 10px;font-size:.78rem}
.joinWelcome{margin-bottom:16px}
.joinWelcome>span{color:#76d9b1;font-size:.64rem;font-weight:950;letter-spacing:.17em}
.joinWelcome h2{margin:6px 0;font-size:1.55rem;letter-spacing:-.025em}
.joinWelcome p{margin:0;color:#93ada3;font-size:.82rem;line-height:1.45}
#joinArea .roomline,#joinArea .joinPrivacyStatus{text-align:left}
#joinArea .onboardingDeferred{display:none!important}
#joinArea.accountOptionsOpen .accountCard.onboardingDeferred,
#joinArea.characterOptionsOpen .characterPreviewCard.onboardingDeferred,
#joinArea.characterOptionsOpen .avatarCustomizer.onboardingDeferred{
  position:absolute;
  left:calc(100% + 18px);
  width:min(430px,calc(100vw - 560px));
  max-height:calc(100vh - 150px);
  overflow:auto;
  display:block!important;
}
#joinArea.accountOptionsOpen .accountCard.onboardingDeferred{top:0}
#joinArea.characterOptionsOpen .characterPreviewCard.onboardingDeferred{top:0}
#joinArea.characterOptionsOpen .avatarCustomizer.onboardingDeferred{
  top:0;
  left:calc(200% + 36px);
}
#joinArea.characterOptionsOpen .avatarCustomizer.onboardingDeferred{display:grid!important}
#joinArea #joinBtn{width:100%;min-height:56px;margin-top:12px;border-color:#70e0b2;background:linear-gradient(135deg,#49d49b,#1a8c64);color:#02130d}
#landingGraphicsBtn{margin-top:12px!important}

@keyframes landingLivePulse{50%{opacity:.42;transform:scale(.72)}}
@media(max-width:700px){
  #landing.panel{align-items:end;padding:32vh 10px 10px;overflow:auto;background:linear-gradient(180deg,rgba(2,7,6,.08) 0%,rgba(2,7,6,.18) 25%,rgba(2,7,6,.94) 58%,#020706 100%)}
  .landingContent{width:100%;max-width:560px;max-height:none;margin:0 auto;padding:22px 17px;border-radius:21px;overflow:visible}
  #landing .discoveryDeferred,
  #landing .friendSetupDeferred,
  #joinArea.accountOptionsOpen .accountCard.onboardingDeferred,
  #joinArea.characterOptionsOpen .characterPreviewCard.onboardingDeferred,
  #joinArea.characterOptionsOpen .avatarCustomizer.onboardingDeferred{
    position:static;
    width:auto;
    max-height:none;
    transform:none;
  }
  #landing .firstRunHero{margin-bottom:18px}
  #landing .firstRunHero h1{font-size:clamp(2.25rem,11vw,3.35rem)}
  #landing .firstRunHero p{font-size:.85rem}
  #landing .landingTableActions{grid-template-columns:1fr}
  #landing #createTableBtn{min-height:44px}
  body.landing-spectator #scene{filter:saturate(.9) brightness(.78)}
}
@media(prefers-reduced-motion:reduce){.landingLiveDot{animation:none}}


/* POKER3D_MOBILE_RESPONSIVE_FINAL_V1 */
:root {
--mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
--mobile-safe-top: env(safe-area-inset-top, 0px);
}

html, body {
max-width: 100%;
overflow-x: hidden;
}

@media (max-width: 768px) {
#game {
width: 100vw;
max-width: 100vw;
height: 100dvh;
min-height: 100svh;
overflow: hidden;
}

.modal,
.dialog,
[role="dialog"],
.landing,
.menu,
.customize,
.panel {
box-sizing: border-box;
max-width: calc(100vw - 16px);
max-height: calc(100dvh - var(--mobile-safe-top) - var(--mobile-safe-bottom) - 16px);
overflow-y: auto;
overscroll-behavior: contain;
margin-left: auto;
margin-right: auto;
}

.actions,
.actionButtons,
.hudButtons,
.buttonRow {
display: flex;
flex-wrap: wrap;
gap: 6px;
}

button,
.button {
max-width: 100%;
}

canvas {
max-width: 100vw;
}
}

/* ============================================================
   POKER3D_LANDING_BRAND_REFRESH_V1
   Cleaner branded landing hierarchy.
   ============================================================ */

#landing .landingContent{
  width:min(500px,100%);
  padding:clamp(28px,3vw,40px);
  border:1px solid rgba(111,232,196,.23);
  border-radius:24px;
  background:
    radial-gradient(
      circle at 12% 0,
      rgba(55,190,148,.10),
      transparent 38%
    ),
    linear-gradient(
      145deg,
      rgba(5,17,14,.95),
      rgba(3,11,9,.88)
    );
  box-shadow:
    0 30px 90px rgba(0,0,0,.48),
    0 0 0 1px rgba(255,255,255,.025) inset,
    0 0 42px rgba(28,157,118,.045);
}

#landing .firstRunHero{
  max-width:none;
  margin:0 0 24px;
  text-align:left;
}

#landing .firstRunEyebrow{
  display:flex;
  align-items:center;
  gap:9px;
  margin-bottom:12px;
  color:#75e6c1;
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.16em;
  opacity:.92;
}

#landing .firstRunHero h1{
  margin:0 0 12px;
  color:#f0f9f5;
  font-size:clamp(3.25rem,5.5vw,4.7rem);
  font-weight:950;
  line-height:.92;
  letter-spacing:-.055em;
  text-shadow:
    0 2px 0 rgba(255,255,255,.035),
    0 12px 32px rgba(0,0,0,.32);
}

#landing .firstRunHero p{
  max-width:355px;
  margin:0;
  color:#b5c8c1;
  font-size:.92rem;
  font-weight:650;
  line-height:1.5;
  letter-spacing:.005em;
}

#landing .landingTableActions{
  display:grid;
  grid-template-columns:1fr!important;
  gap:0;
  margin-top:26px;
}

#landing #quickConnectBtn{
  min-height:68px;
  padding:14px 20px 14px 52px;
  border-radius:15px;
  font-size:1.08rem;
  font-weight:950;
  letter-spacing:.015em;
  box-shadow:
    0 0 0 1px rgba(164,255,230,.10) inset,
    0 10px 34px rgba(0,0,0,.22),
    0 0 28px rgba(41,229,177,.13);
}

#landing #quickConnectBtn:hover{
  transform:translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(164,255,230,.14) inset,
    0 14px 38px rgba(0,0,0,.28),
    0 0 34px rgba(41,229,177,.19);
}

#landing .landingPlayHint{
  margin:12px 2px 16px;
  color:#81978f;
  font-size:.74rem;
  font-weight:650;
  line-height:1.45;
}

#landing #morePlayOptionsBtn{
  width:100%;
  min-height:43px;
  margin:0;
  padding:10px 14px;
  border:1px solid rgba(113,171,153,.23);
  border-radius:11px;
  background:rgba(4,15,12,.42);
  color:#a8bbb4;
  font-size:.76rem;
  font-weight:850;
  letter-spacing:.025em;
}

#landing #morePlayOptionsBtn:hover{
  border-color:rgba(102,222,186,.42);
  background:rgba(10,31,25,.58);
  color:#d1e4dd;
}

/* Private Table now belongs to More ways to play.
   Keep it visible when its friend-table setup is active so the existing
   two-click create flow continues to work exactly as before. */
#landing #createTableBtn.landingMorePlayDeferred{
  display:none!important;
  position:relative;
  left:auto;
  top:auto;
  width:100%;
  max-height:none;
  margin:10px 0 0;
  padding:11px 42px 11px 52px;
  overflow:visible;
  opacity:1;
  pointer-events:auto;
  transform:none;
  border:1px solid rgba(90,183,157,.31);
  border-radius:12px;
  background:
    linear-gradient(
      180deg,
      rgba(13,34,28,.82),
      rgba(5,19,15,.88)
    );
  color:#d6e7e1;
  text-align:left;
  font-size:.86rem;
  font-weight:900;
  min-height:58px;
}

body.discoveryOpen #landing #createTableBtn.landingMorePlayDeferred,
body.friendSetupOpen #landing #createTableBtn.landingMorePlayDeferred{
  display:block!important;
}

#landing #createTableBtn.landingMorePlayDeferred::before{
  content:"+";
  position:absolute;
  left:17px;
  top:50%;
  display:grid;
  width:24px;
  height:24px;
  place-items:center;
  transform:translateY(-50%);
  border:1px solid rgba(93,231,193,.62);
  border-radius:50%;
  color:#67e5bd;
  font-size:1rem;
  line-height:1;
}

#landing #createTableBtn.landingMorePlayDeferred::after{
  content:"Create a table for friends";
  display:block;
  margin-top:2px;
  color:#7f978e;
  font-size:.68rem;
  font-weight:650;
  letter-spacing:.01em;
}

#landing #createTableBtn.landingMorePlayDeferred:hover{
  border-color:rgba(98,229,191,.52);
  background:
    linear-gradient(
      180deg,
      rgba(18,47,38,.9),
      rgba(7,25,20,.92)
    );
}

#landing #landingGraphicsBtn{
  width:100%;
  min-width:0;
  min-height:46px;
  margin-top:18px;
  padding:9px 42px;
  border-radius:11px;
  border-color:rgba(83,153,134,.27);
  background:rgba(5,18,14,.52);
  color:#9eb2aa;
  font-size:.76rem;
}

@media(max-width:700px){
  #landing .landingContent{
    padding:24px 19px;
    border-radius:20px;
  }

  #landing .firstRunHero{
    margin-bottom:20px;
  }

  #landing .firstRunHero h1{
    font-size:clamp(3rem,15vw,4rem);
  }

  #landing .firstRunHero p{
    max-width:320px;
    font-size:.86rem;
  }

  #landing #quickConnectBtn{
    min-height:62px;
  }
}
/* ============================================================
   POKER3D_LANDING_IDENTITY_GATE_V1
   Identity first -> table selection second.
   ============================================================ */

#landing .landingIdentityGate{
  display:grid;
  gap:12px;
  margin-top:26px;
}

#landing .landingIdentityActions{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr);
  gap:10px;
}

#landing .landingIdentityActions button{
  width:100%;
  min-height:62px;
  margin:0;
  border-radius:14px;
  font-size:.94rem;
  font-weight:950;
}

#landing .landingGuestPrimary{
  position:relative;
  padding:13px 18px 13px 50px;
  border:1px solid #70e0b2;
  background:linear-gradient(135deg,#49d49b,#1a8c64);
  color:#02130d;
  box-shadow:
    0 12px 28px rgba(37,178,126,.24),
    inset 0 1px rgba(255,255,255,.17);
}

#landing .landingGuestPrimary::before{
  content:"♠";
  position:absolute;
  left:19px;
  top:50%;
  transform:translateY(-50%);
  font-size:1.3rem;
}

#landing .landingLoginChoice{
  border-color:rgba(108,190,164,.36);
  background:rgba(10,29,24,.74);
  color:#d7e7e1;
}

#landing .landingLoginPanel{
  display:grid;
  gap:11px;
  padding:17px;
  border:1px solid rgba(104,215,181,.23);
  border-radius:15px;
  background:linear-gradient(
    145deg,
    rgba(8,25,20,.92),
    rgba(4,15,12,.94)
  );
}

#landing .landingLoginPanel[hidden]{
  display:none!important;
}

#landing .landingLoginHeading{
  display:flex;
  align-items:flex-start;
  gap:11px;
}

#landing .landingLoginHeading>div{
  display:grid;
  gap:3px;
}

#landing .landingLoginHeading b{
  color:#e6f3ee;
  font-size:.95rem;
}

#landing .landingLoginHeading span{
  color:#829a91;
  font-size:.69rem;
  line-height:1.4;
}

#landing .landingLoginBack{
  width:35px;
  min-width:35px;
  height:35px;
  min-height:35px;
  margin:0;
  padding:0;
  border-radius:10px;
}

#landing .landingLoginPanel input{
  width:100%;
  min-height:50px;
  margin:0;
}

#landing .landingLoginActions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}

#landing .landingLoginActions button{
  width:100%;
  min-height:48px;
  margin:0;
}

#landing #landingAccountLoginBtn{
  border-color:rgba(87,225,183,.58);
  background:linear-gradient(135deg,#2eaa7e,#176849);
  color:#eefbf6;
  font-weight:900;
}

/* Stage two stays hidden until identity is chosen. */
#landing .landingGameSelectDeferred{
  display:none!important;
}

body.landingIdentityReady #landing .landingGameSelectDeferred{
  display:block!important;
}

body.landingIdentityReady
#landing
.landingTableActions.landingGameSelectDeferred{
  display:grid!important;
}

body.landingIdentityReady #landingIdentityGate{
  display:none!important;
}

/* Public Games is directly visible in stage two. */
#landing #roomBrowser.landingServerBrowser{
  position:static!important;
  left:auto!important;
  top:auto!important;
  bottom:auto!important;
  width:100%!important;
  max-height:none!important;
  margin-top:16px;
  overflow:hidden;
  opacity:1!important;
  pointer-events:auto!important;
  transform:none!important;
  background:rgba(3,13,10,.72);
}

#landing
#roomBrowser.landingServerBrowser
.roomBrowserList{
  max-height:205px;
}

/* Secondary tools live behind More ways to play. */
#landing #friendsEntryPanel.landingMorePlayDeferred{
  display:none!important;
  position:static!important;
  width:100%!important;
  margin-top:10px;
  opacity:1!important;
  pointer-events:auto!important;
  transform:none!important;
}

body.landingMoreOpen
#landing
#friendsEntryPanel.landingMorePlayDeferred{
  display:grid!important;
}

body.landingMoreOpen
#landing
#createTableBtn.landingMorePlayDeferred,
body.friendSetupOpen
#landing
#createTableBtn.landingMorePlayDeferred{
  display:block!important;
}

@media(max-width:700px){
  #landing .landingIdentityActions{
    grid-template-columns:1fr;
  }

  #landing .landingLoginActions{
    grid-template-columns:1fr;
  }

  #landing
  #roomBrowser.landingServerBrowser
  .roomBrowserList{
    max-height:180px;
  }
}
/* ============================================================
   POKER3D_LANDING_ACCOUNT_SWITCH_STYLE_V1
   Compact account status above Quick Join.
   ============================================================ */

body.landingIdentityReady
#landing
#landingSessionBar.landingGameSelectDeferred{
  display:none!important;
}

body.landingIdentityReady.landingAccountSession
#landing
#landingSessionBar.landingGameSelectDeferred{
  display:flex!important;
}

#landing .landingSessionBar{
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
  padding:9px 10px 9px 14px;
  border:1px solid rgba(101,195,165,.22);
  border-radius:11px;
  background:rgba(3,14,11,.60);
}

#landing #landingSessionStatus{
  min-width:0;
  overflow:hidden;
  color:#9ec1b5;
  font-size:.72rem;
  font-weight:750;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#landing #landingLogoutBtn{
  flex:0 0 auto;
  width:auto;
  min-width:72px;
  min-height:34px;
  margin:0;
  padding:6px 11px;
  border-radius:9px;
  border-color:rgba(126,176,160,.25);
  background:rgba(9,27,22,.7);
  color:#a9beb7;
  font-size:.68rem;
  font-weight:850;
}

#landing #landingLogoutBtn:hover{
  border-color:rgba(106,221,185,.42);
  color:#d9e9e3;
}

@media(max-width:700px){
  #landing .landingSessionBar{
    margin-bottom:10px;
  }
}
/* ============================================================
   POKER3D_LOGIN_PROGRESS_NOTE_STYLE_V1
   Explains why creating/logging into an account is useful.
   ============================================================ */

#landing .landingLoginBenefit{
  margin:10px 4px 0;
  color:#8aa79c;
  font-size:.72rem;
  font-weight:650;
  line-height:1.45;
  text-align:center;
}

#landing .landingLoginBenefit::before{
  content:"✓ ";
  color:#62d9ad;
  font-weight:950;
}

@media(max-width:700px){
  #landing .landingLoginBenefit{
    margin-top:9px;
    font-size:.68rem;
  }
}
/* ============================================================
   POKER3D_MORE_WAYS_CLEANUP_V1
   Keeps alternate play methods compact and focused.
   ============================================================ */

/* When alternate play methods are open, temporarily remove the
   Public Games list so the landing card does not become cluttered. */
body.landingMoreOpen
#landing
#roomBrowser.landingServerBrowser,
body.friendSetupOpen
#landing
#roomBrowser.landingServerBrowser{
  display:none!important;
}

/* Expanded landing states remain contained inside the viewport. */
body.landingMoreOpen #landing .landingContent,
body.friendSetupOpen #landing .landingContent{
  max-height:calc(100vh - 90px);
  max-height:calc(100svh - 90px);
  overflow:auto;
  scrollbar-gutter:stable;
}

/* Make the More Ways button read visually like a mode switch. */
body.landingMoreOpen #landing #morePlayOptionsBtn{
  border-color:rgba(92,224,184,.42);
  background:rgba(10,34,27,.78);
  color:#d5e8e1;
  box-shadow:inset 0 0 0 1px rgba(91,221,182,.05);
}

/* ------------------------------------------------------------
   PRIVATE TABLE OPTION
   ------------------------------------------------------------ */

body.landingMoreOpen
#landing
#createTableBtn.landingMorePlayDeferred,
body.friendSetupOpen
#landing
#createTableBtn.landingMorePlayDeferred{
  position:relative!important;
  display:block!important;
  width:100%!important;
  min-height:58px;
  margin:10px 0 0!important;
  padding:10px 44px 10px 54px!important;
  border:1px solid rgba(86,206,171,.30)!important;
  border-radius:12px!important;
  background:
    linear-gradient(
      180deg,
      rgba(12,39,31,.86),
      rgba(6,24,19,.90)
    )!important;
  box-shadow:none!important;
  color:#dcece6!important;
  text-align:left!important;
  opacity:1!important;
  transform:none!important;
  pointer-events:auto!important;
}

body.landingMoreOpen
#landing
#createTableBtn.landingMorePlayDeferred:hover,
body.friendSetupOpen
#landing
#createTableBtn.landingMorePlayDeferred:hover{
  border-color:rgba(91,231,190,.50)!important;
  background:
    linear-gradient(
      180deg,
      rgba(17,51,41,.92),
      rgba(7,29,23,.94)
    )!important;
}

/* ------------------------------------------------------------
   JOIN WITH CODE
   ------------------------------------------------------------ */

body.landingMoreOpen
#landing
#friendsEntryPanel.landingMorePlayDeferred{
  display:grid!important;
  position:static!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center;
  gap:9px!important;

  width:100%!important;
  max-width:none!important;
  margin:10px 0 0!important;
  padding:11px!important;

  border:1px solid rgba(90,182,156,.26);
  border-radius:12px;
  background:
    linear-gradient(
      180deg,
      rgba(8,28,22,.82),
      rgba(4,18,14,.88)
    );

  opacity:1!important;
  transform:none!important;
  pointer-events:auto!important;
}

/* Remove the old floating "or" label. */
body.landingMoreOpen
#landing
#friendsEntryPanel.landingMorePlayDeferred > span{
  display:none!important;
}

body.landingMoreOpen
#landing
#roomCodeInput{
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
  margin:0!important;
  padding:9px 13px!important;

  border-radius:10px!important;
  border-color:rgba(114,179,159,.27)!important;

  background:rgba(2,13,10,.74)!important;
  color:#e3eee9!important;

  font-size:.82rem!important;
  letter-spacing:.08em;
}

body.landingMoreOpen
#landing
#roomCodeInput::placeholder{
  color:#718b82;
  letter-spacing:.14em;
}

body.landingMoreOpen
#landing
#joinCodeBtn{
  width:auto!important;
  min-width:132px!important;
  min-height:46px!important;

  margin:0!important;
  padding:9px 15px!important;

  border-radius:10px!important;
  white-space:nowrap;

  border-color:rgba(84,213,175,.39)!important;
  background:rgba(15,67,51,.82)!important;
  color:#dff5ed!important;

  font-size:.77rem!important;
  font-weight:900!important;
}

/* ------------------------------------------------------------
   PRIVATE TABLE SETUP
   ------------------------------------------------------------ */

/* Once Private Table is selected, focus entirely on its form. */
body.friendSetupOpen
#landing
#friendsEntryPanel.landingMorePlayDeferred{
  display:none!important;
}

body.friendSetupOpen
#landing
#friendSetupPanel.friendSetupDeferred{
  display:grid!important;
  position:static!important;

  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;

  width:100%!important;
  max-width:none!important;
  max-height:none!important;

  gap:10px!important;
  margin:10px 0 0!important;
  padding:13px!important;

  overflow:visible!important;

  border:1px solid rgba(91,220,185,.28)!important;
  border-radius:12px!important;

  background:
    linear-gradient(
      180deg,
      rgba(7,28,22,.94),
      rgba(4,18,14,.96)
    )!important;

  opacity:1!important;
  transform:none!important;
  pointer-events:auto!important;
}

body.friendSetupOpen
#landing
#friendSetupPanel input{
  width:100%!important;
  min-height:45px!important;
  margin:0!important;
}

body.friendSetupOpen
#landing
#friendSetupPanel .privateTableToggle{
  margin:0!important;
  padding:8px 3px!important;
}

/* ------------------------------------------------------------
   MOBILE
   ------------------------------------------------------------ */

@media(max-width:700px){

  body.landingMoreOpen #landing .landingContent,
  body.friendSetupOpen #landing .landingContent{
    max-height:none;
    overflow:visible;
  }

  body.landingMoreOpen
  #landing
  #friendsEntryPanel.landingMorePlayDeferred{
    grid-template-columns:1fr!important;
  }

  body.landingMoreOpen
  #landing
  #joinCodeBtn{
    width:100%!important;
  }
}
/* ============================================================
   POKER3D_JOIN_AUTO_CUSTOMIZE_STYLE_V2
   Identity is handled before table selection.
   Pre-seat step is customization-first.
   ============================================================ */

/* Account choice is redundant here. Keep the underlying account
   elements in the DOM because landing login reuses their logic. */
#joinArea .accountCard{
  display:none!important;
}

/* No Account / Customize disclosure buttons needed anymore. */
#joinArea .joinOptionalControls{
  display:none!important;
}

/* Customization is the default pre-seat content. */
#joinArea.characterOptionsOpen .characterPreviewCard,
#joinArea.characterOptionsOpen .characterOptionsDeferred{
  opacity:1;
  pointer-events:auto;
}

/* Tighten the left-side information so attention goes to the
   character preview and final Take My Seat action. */
#joinArea .joinWelcome{
  margin-bottom:18px;
}

#joinArea .joinWelcome h2{
  margin:6px 0 6px;
}

#joinArea .joinWelcome p{
  max-width:390px;
  color:#96ada4;
  font-size:.82rem;
  line-height:1.45;
}

#joinArea #joinBtn{
  margin-top:14px;
}

/* The character panel should look intentional rather than like
   an optional drawer that happened to be opened. */
#joinArea.characterOptionsOpen #characterPreviewCard{
  border-color:rgba(91,220,185,.30);
  box-shadow:
    0 20px 55px rgba(0,0,0,.32),
    0 0 0 1px rgba(255,255,255,.02) inset;
}

@media(max-width:700px){
  #joinArea .joinWelcome{
    margin-bottom:14px;
  }

  #joinArea #joinBtn{
    margin-top:12px;
  }
}
/* ============================================================
   POKER3D_COMPACT_TURN_DOCK_V1

   Desktop poker controls:
   - one unified bottom dock
   - actions first
   - compact raise controls
   - compact chip tray
   - reduced automatic-chip clutter
   - preserves mobile layout
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ----------------------------------------------------------
     UNIFIED DOCK
     ---------------------------------------------------------- */

  #game .turnDock{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:8px!important;

    transform:translateX(-50%)!important;

    width:min(1120px,calc(100vw - 48px))!important;
    max-width:none!important;

    display:grid!important;
    grid-template-columns:minmax(390px,.9fr) minmax(540px,1.25fr)!important;
    gap:0!important;

    padding:0!important;
    margin:0!important;

    border:1px solid rgba(94,162,139,.42)!important;
    border-radius:14px!important;

    background:rgba(3,11,9,.94)!important;
    backdrop-filter:blur(10px);

    box-shadow:
      0 14px 38px rgba(0,0,0,.48),
      inset 0 1px rgba(255,255,255,.025)!important;

    overflow:hidden!important;
    z-index:40!important;
  }

  #game .turnDockPanel{
    min-width:0!important;
    width:auto!important;

    margin:0!important;

    border:0!important;
    border-radius:0!important;

    background:transparent!important;
    box-shadow:none!important;
  }

  #game .turnDockActions{
    padding:9px 11px 7px!important;
    border-right:1px solid rgba(78,126,111,.27)!important;
  }

  #game .turnDockChips{
    padding:9px 11px 7px!important;
  }

  #game .turnDockTitle{
    margin:0 0 5px!important;
    padding:0!important;

    color:#91afa4!important;

    font-size:.56rem!important;
    font-weight:950!important;
    letter-spacing:.12em!important;
    line-height:1!important;
  }

  /* ----------------------------------------------------------
     ACTION BUTTONS
     ---------------------------------------------------------- */

  #game #controls{
    display:grid!important;

    grid-template-columns:
      repeat(5,minmax(0,1fr))!important;

    grid-template-rows:
      42px
      32px!important;

    gap:6px 7px!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;

    align-items:center!important;
  }

  /*
    Existing markup groups Fold / Check / Call / raise inputs.
    display:contents lets the controls participate in the clean
    grid without changing any JavaScript or event listeners.
  */
  #game #controls > [data-action-priority="primary"]{
    display:contents!important;
  }

  #game #controls button[data-action]{
    width:100%!important;
    min-width:0!important;

    height:42px!important;
    min-height:42px!important;

    margin:0!important;
    padding:6px 8px!important;

    border-radius:9px!important;

    font-size:.76rem!important;
    font-weight:950!important;

    white-space:nowrap!important;
  }

  #game #controls button[data-action="fold"]{
    grid-column:1!important;
    grid-row:1!important;
  }

  #game #controls button[data-action="check"]{
    grid-column:2!important;
    grid-row:1!important;
  }

  #game #controls button[data-action="call"]{
    grid-column:3!important;
    grid-row:1!important;
  }

  #game #controls button[data-action="raise"]{
    grid-column:4!important;
    grid-row:1!important;
  }

  #game #controls button[data-action="allin"]{
    grid-column:5!important;
    grid-row:1!important;
  }

  /* ----------------------------------------------------------
     BET AMOUNT + SLIDER
     ---------------------------------------------------------- */

  #game #controls .raiseBox{
    grid-column:1 / -1!important;
    grid-row:2!important;

    display:grid!important;
    grid-template-columns:88px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;

    width:100%!important;
    min-width:0!important;

    margin:0!important;
    padding:0!important;

    background:transparent!important;
    border:0!important;
  }

  #game #raiseAmount{
    width:88px!important;
    min-width:88px!important;

    height:32px!important;
    min-height:32px!important;

    margin:0!important;
    padding:4px 7px!important;

    border-radius:8px!important;

    font-size:.76rem!important;
    font-weight:900!important;
  }

  #game #raiseSlider{
    width:100%!important;
    min-width:0!important;

    margin:0!important;
  }

  /* Turn/status text becomes a small footer instead of another
     large block competing with the actual controls. */

  #game .turnDockActions #status{
    min-height:14px!important;

    margin:4px 0 0!important;
    padding:0!important;

    font-size:.61rem!important;
    line-height:1.2!important;

    text-align:center!important;
  }

  /* ----------------------------------------------------------
     CHIP AREA
     ---------------------------------------------------------- */

  #game .turnDockChips .chipBetBuilder{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:5px!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;

    background:transparent!important;
    border:0!important;
  }

  #game .turnDockChips .controlLabel{
    margin:0!important;

    color:#78988d!important;

    font-size:.52rem!important;
    letter-spacing:.09em!important;
    line-height:1!important;
  }

  /* ----------------------------------------------------------
     COMPACT CHIP TRAY
     ---------------------------------------------------------- */

  #game .turnDockChips .chipWallet{
    display:flex!important;

    flex-wrap:nowrap!important;
    align-items:center!important;

    gap:5px!important;

    width:100%!important;

    margin:4px 0 0!important;
    padding:0 0 1px!important;

    overflow-x:auto!important;
    overflow-y:hidden!important;

    scrollbar-width:thin;
  }

  #game .turnDockChips .denominationChip{
    flex:1 1 0!important;

    min-width:63px!important;
    max-width:90px!important;

    min-height:39px!important;
    height:39px!important;

    margin:0!important;

    padding:
      3px
      5px
      3px
      31px!important;

    border-radius:8px!important;

    font-size:.65rem!important;

    line-height:1.05!important;
  }

  #game .turnDockChips .denominationChip::before{
    left:5px!important;

    width:23px!important;
    height:23px!important;

    border-width:2px!important;

    font-size:.50rem!important;
  }

  #game .turnDockChips .denominationChip small{
    margin-top:1px!important;

    font-size:.48rem!important;
    line-height:1!important;
  }

  /* ----------------------------------------------------------
     AUTOMATIC CHIP SELECTION
     ---------------------------------------------------------- */

  #game .turnDockChips .betBreakdownBox{
    display:grid!important;

    grid-template-columns:
      minmax(0,1fr)
      auto!important;

    align-items:center!important;

    gap:6px!important;

    min-height:30px!important;

    margin:0!important;
    padding:4px 5px 4px 8px!important;

    border:1px solid rgba(74,109,98,.24)!important;
    border-radius:8px!important;

    background:rgba(3,9,7,.52)!important;
  }

  #game .turnDockChips .betBreakdownBox > .controlLabel{
    display:none!important;
  }

  #game #betBreakdown{
    min-width:0!important;

    margin:0!important;

    overflow:hidden!important;

    color:#dfc96f!important;

    font-size:.62rem!important;
    line-height:1.15!important;

    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  #game #clearBetChipsBtn{
    width:auto!important;

    min-width:70px!important;
    min-height:27px!important;
    height:27px!important;

    margin:0!important;
    padding:3px 7px!important;

    border-radius:7px!important;

    font-size:.58rem!important;
    font-weight:900!important;

    white-space:nowrap!important;
  }

  /* ----------------------------------------------------------
     KEEP PLAYER CARDS ABOVE THE CONTROL SURFACE
     ---------------------------------------------------------- */

  #game #heroCards{
    position:relative;
    z-index:45;
  }

  #game .heroLabel{
    position:relative;
    z-index:45;
  }
}

/* Slightly narrower desktop/laptop view:
   retain the same concept but allow the chip side to shrink. */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .turnDock{
    width:calc(100vw - 28px)!important;

    grid-template-columns:
      minmax(350px,.9fr)
      minmax(430px,1.1fr)!important;
  }

  #game .turnDockChips .denominationChip{
    min-width:56px!important;
  }
}
/* ============================================================
   POKER3D_COMPACT_TURN_DOCK_TWEAKS_V2_RECOVERY

   Desktop refinements:
   - Reset Bet beside raise amount/slider
   - slightly larger action controls
   - substantially larger chip buttons
   - community cards match player's hole cards
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* Give the dock a little more usable room without becoming huge. */
  #game .turnDock{
    width:min(1240px,calc(100vw - 32px))!important;
    grid-template-columns:
      minmax(470px,.95fr)
      minmax(610px,1.25fr)!important;
    bottom:10px!important;
  }

  #game .turnDockActions,
  #game .turnDockChips{
    padding:11px 13px 9px!important;
  }

  #game .turnDockTitle{
    margin-bottom:7px!important;
    font-size:.62rem!important;
  }

  /* ==========================================================
     ACTIONS
     ========================================================== */

  #game #controls{
    grid-template-rows:
      50px
      40px!important;

    gap:8px!important;
  }

  #game #controls button[data-action]{
    height:50px!important;
    min-height:50px!important;

    padding:7px 10px!important;

    border-radius:10px!important;

    font-size:.84rem!important;
    font-weight:950!important;
  }

  /* Raise row is now:
     [ amount ] [ slider ---------------- ] [ Reset Bet ] */
  #game #controls .raiseBox{
    grid-template-columns:
      100px
      minmax(0,1fr)
      98px!important;

    gap:9px!important;
    align-items:center!important;
  }

  #game #raiseAmount{
    width:100px!important;
    min-width:100px!important;

    height:40px!important;
    min-height:40px!important;

    padding:5px 8px!important;

    border-radius:9px!important;

    font-size:.82rem!important;
    font-weight:900!important;
  }

  #game #raiseSlider{
    width:100%!important;
    min-width:0!important;
  }

  #game #controls #clearBetChipsBtn.turnDockResetBtn,
  #game #controls .raiseBox #clearBetChipsBtn{
    position:static!important;

    display:block!important;

    width:98px!important;
    min-width:98px!important;

    height:40px!important;
    min-height:40px!important;

    margin:0!important;
    padding:5px 9px!important;

    border-radius:9px!important;

    font-size:.68rem!important;
    font-weight:900!important;

    white-space:nowrap!important;
  }

  #game .turnDockActions #status{
    margin-top:5px!important;
    font-size:.65rem!important;
  }

  /* ==========================================================
     CHIP TRAY
     ========================================================== */

  #game .turnDockChips .chipBetBuilder{
    gap:7px!important;
  }

  #game .turnDockChips .chipWallet{
    gap:6px!important;

    margin-top:5px!important;

    overflow-x:auto!important;
    overflow-y:hidden!important;
  }

  #game .turnDockChips .denominationChip{
    flex:1 0 78px!important;

    min-width:78px!important;
    max-width:102px!important;

    height:50px!important;
    min-height:50px!important;

    padding:
      5px
      7px
      5px
      39px!important;

    border-radius:9px!important;

    font-size:.72rem!important;
    line-height:1.05!important;
  }

  #game .turnDockChips .denominationChip::before{
    left:6px!important;

    width:29px!important;
    height:29px!important;

    border-width:2px!important;

    font-size:.58rem!important;
  }

  #game .turnDockChips .denominationChip small{
    font-size:.53rem!important;
    line-height:1.05!important;
  }

  /* The chip calculation only needs to be a compact readout now
     that Reset Bet has moved to the left. */
  #game .turnDockChips .betBreakdownBox{
    display:block!important;

    min-height:30px!important;

    margin:0!important;
    padding:6px 8px!important;

    border-radius:8px!important;
  }

  #game .turnDockChips .betBreakdownBox > .controlLabel{
    display:none!important;
  }

  #game .turnDockChips .betBreakdownBox #clearBetChipsBtn{
    display:none!important;
  }

  #game #betBreakdown{
    display:block!important;

    margin:0!important;

    font-size:.68rem!important;
    line-height:1.2!important;

    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  /* ==========================================================
     CARDS
     Current player's cards are 78 x 109 on this desktop layout.
     Make community cards exactly the same size.
     ========================================================== */

  #game #boardHudCards .miniCard{
    width:78px!important;
    height:109px!important;
  }

  #game #boardHudCards{
    gap:6px!important;
  }
}

/* Preserve a usable layout on narrower desktop/laptop screens. */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .turnDock{
    width:calc(100vw - 24px)!important;

    grid-template-columns:
      minmax(420px,.95fr)
      minmax(500px,1.1fr)!important;
  }

  #game .turnDockChips .denominationChip{
    flex-basis:70px!important;
    min-width:70px!important;
  }
}
/* ============================================================
   POKER3D_TURN_DOCK_CHIP_STACK_GRID_V1

   Desktop-only improvement:
   - no horizontal scrolling for chip tray
   - chip buttons shown in a compact 2-row grid
   - slightly larger chip buttons for readability
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* Give the chip panel a bit more usable room */
  #game .turnDock{
    width:min(1280px,calc(100vw - 28px))!important;
    grid-template-columns:
      minmax(470px,.92fr)
      minmax(680px,1.28fr)!important;
  }

  #game .turnDockChips .chipBetBuilder{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(210px,.44fr)!important;
    gap:10px!important;
    align-items:start!important;
  }

  /* Replace scroll-strip with a 2-row grid */
  #game .turnDockChips .chipWallet{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
    margin-top:6px!important;
    overflow:visible!important;
  }

  /* Bigger chip buttons */
  #game .turnDockChips .denominationChip{
    min-width:0!important;
    max-width:none!important;
    width:100%!important;

    min-height:56px!important;
    height:56px!important;

    padding:6px 8px 6px 42px!important;
    border-radius:10px!important;

    font-size:.76rem!important;
    line-height:1.08!important;
  }

  #game .turnDockChips .denominationChip::before{
    left:7px!important;
    width:30px!important;
    height:30px!important;
    border-width:2px!important;
    font-size:.60rem!important;
  }

  #game .turnDockChips .denominationChip small{
    font-size:.56rem!important;
    line-height:1.05!important;
  }

  /* Keep the auto-selection readout compact beside the grid */
  #game .turnDockChips .betBreakdownBox{
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    align-items:flex-start!important;
    min-height:56px!important;
    padding:8px 10px!important;
    border-radius:10px!important;
  }

  #game .turnDockChips .betBreakdownBox > .controlLabel{
    display:block!important;
    margin-bottom:4px!important;
    font-size:.58rem!important;
  }

  #game #betBreakdown{
    font-size:.72rem!important;
    line-height:1.25!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
}

/* Narrower desktop/laptop fallback */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .turnDock{
    width:calc(100vw - 20px)!important;
    grid-template-columns:
      minmax(430px,.95fr)
      minmax(560px,1.12fr)!important;
  }

  #game .turnDockChips .chipWallet{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:6px!important;
  }

  #game .turnDockChips .denominationChip{
    min-height:52px!important;
    height:52px!important;
    padding:5px 7px 5px 39px!important;
    font-size:.71rem!important;
  }

  #game .turnDockChips .denominationChip small{
    font-size:.52rem!important;
  }
}
/* ============================================================
   POKER3D_TURN_DOCK_CHIP_GRID_V2

   Correct desktop chip layout:
   - true 4 x 2 denomination grid
   - no horizontal scrolling
   - larger chip controls
   - auto-selection readout below chips
   - dock tall enough to prevent clipping
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ----------------------------------------------------------
     DOCK CONTAINMENT
     ---------------------------------------------------------- */

  #game .turnDock{
    width:min(1280px,calc(100vw - 28px))!important;

    grid-template-columns:
      minmax(470px,.92fr)
      minmax(680px,1.28fr)!important;

    min-height:174px!important;

    align-items:stretch!important;

    overflow:hidden!important;
  }

  #game .turnDockActions,
  #game .turnDockChips{
    min-height:174px!important;
    box-sizing:border-box!important;
  }

  #game .turnDockChips{
    overflow:visible!important;
  }

  /* ----------------------------------------------------------
     CHIP PANEL
     One vertical column:
       label + 4x2 chip grid
       automatic chip readout
     ---------------------------------------------------------- */

  #game .turnDockChips .chipBetBuilder{
    display:grid!important;

    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;

    gap:7px!important;

    width:100%!important;
    min-width:0!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;

    background:transparent!important;
    border:0!important;
  }

  #game .turnDockChips .chipBetBuilder > div:first-child{
    width:100%!important;
    min-width:0!important;
  }

  /* ----------------------------------------------------------
     TRUE 4 x 2 CHIP GRID
     ---------------------------------------------------------- */

  #game .turnDockChips .chipWallet{
    display:grid!important;

    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-auto-flow:row!important;
    grid-auto-rows:58px!important;

    gap:7px!important;

    width:100%!important;
    min-width:0!important;

    margin:5px 0 0!important;
    padding:0!important;

    overflow:visible!important;
  }

  #game .turnDockChips .denominationChip{
    position:relative!important;

    display:block!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;

    margin:0!important;

    padding:
      6px
      7px
      6px
      45px!important;

    border-radius:10px!important;

    box-sizing:border-box!important;

    overflow:hidden!important;

    font-size:.78rem!important;
    font-weight:900!important;
    line-height:1.06!important;

    text-align:left!important;
  }

  #game .turnDockChips .denominationChip::before{
    left:7px!important;
    top:50%!important;

    width:32px!important;
    height:32px!important;

    transform:translateY(-50%)!important;

    border-width:2px!important;

    font-size:.61rem!important;
    line-height:1!important;
  }

  #game .turnDockChips .denominationChip small{
    display:block!important;

    margin-top:2px!important;

    overflow:hidden!important;

    font-size:.57rem!important;
    line-height:1.05!important;

    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  /* ----------------------------------------------------------
     AUTO CHIP READOUT BELOW GRID
     ---------------------------------------------------------- */

  #game .turnDockChips .betBreakdownBox{
    display:grid!important;

    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;

    gap:8px!important;

    width:100%!important;
    min-width:0!important;

    min-height:34px!important;

    margin:0!important;
    padding:6px 9px!important;

    box-sizing:border-box!important;

    border-radius:9px!important;

    overflow:hidden!important;
  }

  #game .turnDockChips .betBreakdownBox > .controlLabel{
    display:block!important;

    margin:0!important;

    font-size:.54rem!important;
    line-height:1!important;

    white-space:nowrap!important;
  }

  #game #betBreakdown{
    min-width:0!important;

    margin:0!important;

    overflow:hidden!important;

    font-size:.69rem!important;
    line-height:1.15!important;

    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  /* Reset Bet was moved to the left controls already. */
  #game .turnDockChips .betBreakdownBox #clearBetChipsBtn{
    display:none!important;
  }
}

/* ============================================================
   NARROW DESKTOP FALLBACK
   Still 4 x 2; chips shrink slightly rather than becoming a
   horizontal scrolling strip.
   ============================================================ */

@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .turnDock{
    width:calc(100vw - 20px)!important;

    grid-template-columns:
      minmax(420px,.95fr)
      minmax(540px,1.1fr)!important;
  }

  #game .turnDockChips .chipWallet{
    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-auto-rows:54px!important;

    gap:6px!important;
  }

  #game .turnDockChips .denominationChip{
    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;

    padding-left:40px!important;

    font-size:.72rem!important;
  }

  #game .turnDockChips .denominationChip::before{
    width:28px!important;
    height:28px!important;

    font-size:.56rem!important;
  }

  #game .turnDockChips .denominationChip small{
    font-size:.52rem!important;
  }
}
/* ============================================================
   POKER3D_FORCE_TRUE_CHIP_GRID_V3

   Final desktop chip-tray correction.
   Uses the actual chipWallet ID so older flex rules cannot win.
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ----------------------------------------------------------
     RIGHT SIDE OF TURN DOCK
     ---------------------------------------------------------- */

  #game .turnDock{
    width:min(1260px,calc(100vw - 32px))!important;

    grid-template-columns:
      minmax(460px,.92fr)
      minmax(650px,1.18fr)!important;

    min-height:208px!important;
  }

  #game .turnDockChips{
    min-height:208px!important;
    overflow:visible!important;
  }

  /* Chip builder is vertical:
       tray label
       4x2 grid
       automatic selection summary
  */
  #game .turnDockChips .chipBetBuilder{
    display:block!important;

    width:100%!important;
    min-width:0!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;

    background:transparent!important;
    border:0!important;
  }

  #game .turnDockChips .chipBetBuilder > div:first-child{
    display:block!important;

    width:100%!important;
    min-width:0!important;

    margin:0!important;
    padding:0!important;
  }

  /* ----------------------------------------------------------
     ACTUAL CHIP WALLET
     ---------------------------------------------------------- */

  #game #chipWallet{
    display:grid!important;

    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-template-rows:
      repeat(2,62px)!important;

    grid-auto-flow:row!important;

    gap:8px!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:auto!important;
    min-height:132px!important;
    max-height:none!important;

    margin:6px 0 8px!important;
    padding:0!important;

    overflow:visible!important;

    flex-wrap:initial!important;
  }

  #game #chipWallet > .denominationChip{
    position:relative!important;

    display:block!important;

    float:none!important;
    flex:none!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:62px!important;
    min-height:62px!important;
    max-height:62px!important;

    margin:0!important;

    padding:
      7px
      8px
      7px
      48px!important;

    box-sizing:border-box!important;

    border-radius:11px!important;

    overflow:hidden!important;

    font-size:.82rem!important;
    font-weight:950!important;
    line-height:1.05!important;

    text-align:left!important;
  }

  #game #chipWallet > .denominationChip::before{
    left:8px!important;
    top:50%!important;

    width:33px!important;
    height:33px!important;

    transform:translateY(-50%)!important;

    border-width:2px!important;

    font-size:.63rem!important;
    line-height:1!important;
  }

  #game #chipWallet > .denominationChip small{
    display:block!important;

    margin-top:3px!important;

    font-size:.59rem!important;
    line-height:1.05!important;

    white-space:nowrap!important;
  }

  /* ----------------------------------------------------------
     AUTOMATIC SELECTION BELOW ALL EIGHT CHIPS
     ---------------------------------------------------------- */

  #game .turnDockChips .betBreakdownBox{
    display:flex!important;

    flex-direction:row!important;
    align-items:center!important;

    gap:10px!important;

    width:100%!important;
    min-width:0!important;

    min-height:34px!important;

    margin:0!important;
    padding:7px 9px!important;

    box-sizing:border-box!important;

    border-radius:9px!important;

    overflow:hidden!important;
  }

  #game .turnDockChips .betBreakdownBox > .controlLabel{
    display:block!important;

    flex:0 0 auto!important;

    margin:0!important;

    font-size:.55rem!important;
    line-height:1!important;

    white-space:nowrap!important;
  }

  #game #betBreakdown{
    display:block!important;

    flex:1 1 auto!important;

    min-width:0!important;

    margin:0!important;

    font-size:.70rem!important;
    line-height:1.15!important;

    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  #game .turnDockChips .betBreakdownBox #clearBetChipsBtn{
    display:none!important;
  }
}

/* Smaller desktop/laptop — still always 4 x 2. */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .turnDock{
    width:calc(100vw - 20px)!important;

    grid-template-columns:
      minmax(410px,.9fr)
      minmax(540px,1.08fr)!important;
  }

  #game #chipWallet{
    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-template-rows:
      repeat(2,56px)!important;

    min-height:120px!important;

    gap:6px!important;
  }

  #game #chipWallet > .denominationChip{
    height:56px!important;
    min-height:56px!important;
    max-height:56px!important;

    padding-left:43px!important;

    font-size:.75rem!important;
  }

  #game #chipWallet > .denominationChip::before{
    width:29px!important;
    height:29px!important;

    font-size:.57rem!important;
  }

  #game #chipWallet > .denominationChip small{
    font-size:.53rem!important;
  }
}
/* ============================================================
   POKER3D_COMPACT_TRUE_CHIP_GRID_V4

   Corrects the oversized V3 layout:
   - narrower unified action dock
   - exactly 4 chips per row
   - exactly 2 rows
   - no giant spanning denomination buttons
   - no horizontal scrolling
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ----------------------------------------------------------
     KEEP THE WHOLE DOCK COMPACT
     ---------------------------------------------------------- */

  #game .turnDock{
    width:min(1120px,calc(100vw - 36px))!important;
    max-width:1120px!important;

    grid-template-columns:
      minmax(420px,.88fr)
      minmax(0,1.12fr)!important;

    min-height:202px!important;
    max-height:none!important;

    bottom:8px!important;

    overflow:hidden!important;
  }

  #game .turnDockActions{
    min-width:0!important;
    min-height:202px!important;
  }

  #game .turnDockChips{
    min-width:0!important;
    min-height:202px!important;

    overflow:hidden!important;
  }

  /* ----------------------------------------------------------
     RIGHT PANEL IS ONE VERTICAL STACK
     ---------------------------------------------------------- */

  #game .turnDockChips .chipBetBuilder{
    display:grid!important;

    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;

    gap:6px!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;

    background:transparent!important;
    border:0!important;
  }

  #game .turnDockChips .chipBetBuilder > div:first-child{
    display:block!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;
  }

  /* ----------------------------------------------------------
     EXACT 4 x 2 CHIP GRID
     ---------------------------------------------------------- */

  #game .turnDockChips #chipWallet{
    display:grid!important;

    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-template-rows:
      repeat(2,58px)!important;

    grid-auto-columns:minmax(0,1fr)!important;
    grid-auto-rows:58px!important;
    grid-auto-flow:row!important;

    gap:7px!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:123px!important;
    min-height:123px!important;
    max-height:123px!important;

    margin:5px 0 6px!important;
    padding:0!important;

    overflow:hidden!important;

    flex:none!important;
  }

  /* Explicitly prevent old flex/grid placement rules from making
     individual chips span multiple cells. */
  #game .turnDockChips #chipWallet > .denominationChip{
    grid-column:auto!important;
    grid-row:auto!important;

    justify-self:stretch!important;
    align-self:stretch!important;

    float:none!important;
    flex:none!important;

    display:block!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;

    margin:0!important;

    padding:
      6px
      6px
      6px
      43px!important;

    box-sizing:border-box!important;

    border-radius:9px!important;

    overflow:hidden!important;

    font-size:.75rem!important;
    font-weight:950!important;
    line-height:1.05!important;

    text-align:left!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip::before{
    left:6px!important;
    top:50%!important;

    width:30px!important;
    height:30px!important;

    transform:translateY(-50%)!important;

    border-width:2px!important;

    font-size:.58rem!important;
    line-height:1!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip small{
    display:block!important;

    margin-top:2px!important;

    max-width:100%!important;

    overflow:hidden!important;

    font-size:.53rem!important;
    line-height:1.05!important;

    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  /* ----------------------------------------------------------
     AUTOMATIC CHIP READOUT
     ---------------------------------------------------------- */

  #game .turnDockChips .betBreakdownBox{
    display:flex!important;

    flex-direction:row!important;
    align-items:center!important;

    gap:8px!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    min-height:32px!important;

    margin:0!important;
    padding:6px 8px!important;

    box-sizing:border-box!important;

    overflow:hidden!important;

    border-radius:8px!important;
  }

  #game .turnDockChips .betBreakdownBox > .controlLabel{
    display:block!important;

    flex:0 0 auto!important;

    margin:0!important;

    font-size:.52rem!important;

    white-space:nowrap!important;
  }

  #game .turnDockChips #betBreakdown{
    flex:1 1 auto!important;

    min-width:0!important;

    margin:0!important;

    overflow:hidden!important;

    font-size:.66rem!important;
    line-height:1.1!important;

    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  #game .turnDockChips .betBreakdownBox #clearBetChipsBtn{
    display:none!important;
  }
}

/* ------------------------------------------------------------
   LAPTOP FALLBACK
   Still 4 x 2, but slightly smaller rather than becoming wide.
   ------------------------------------------------------------ */

@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .turnDock{
    width:calc(100vw - 24px)!important;
    max-width:none!important;

    grid-template-columns:
      minmax(390px,.9fr)
      minmax(0,1.1fr)!important;
  }

  #game .turnDockChips #chipWallet{
    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-template-rows:
      repeat(2,54px)!important;

    grid-auto-rows:54px!important;

    height:115px!important;
    min-height:115px!important;
    max-height:115px!important;

    gap:6px!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip{
    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;

    padding-left:39px!important;

    font-size:.69rem!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip::before{
    width:27px!important;
    height:27px!important;

    font-size:.53rem!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip small{
    font-size:.49rem!important;
  }
}
/* ============================================================
   POKER3D_TURN_HUD_CLEARANCE_V1

   Desktop-only polish:
   - keep the compact chip tray
   - stop the turn dock from covering the center "YOUR TURN" HUD
   - lift the player's cards / turn HUD slightly above the dock
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* Keep the dock compact and slightly lower */
  #game .turnDock{
    bottom:6px!important;
    z-index:2!important;
  }

  /* Make the center hero area render above the dock */
  #game #heroCards,
  #game #hudBottom,
  #game #turnHud,
  #game #potHud,
  #game .heroTurnTimer,
  #game #winnerHud{
    position:relative!important;
    z-index:3!important;
  }

  /* Lift the player-card / turn area so the dock doesn't overlap it */
  #game #heroCards{
    transform:translateY(-10px)!important;
  }

  #game #hudBottom,
  #game .heroTurnTimer,
  #game #turnHud{
    transform:translateY(-26px)!important;
  }

  /* Small spacing cleanup so the raised HUD still feels natural */
  #game #potHud{
    margin-bottom:4px!important;
  }
}

/* Slightly softer adjustment on narrower laptops */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game #heroCards{
    transform:translateY(-8px)!important;
  }

  #game #hudBottom,
  #game .heroTurnTimer,
  #game #turnHud{
    transform:translateY(-20px)!important;
  }
}
/* ============================================================
   POKER3D_GAMEPLAY_HUD_FULL_POLISH_V1

   Desktop gameplay presentation polish only.
   No poker/gameplay/network behavior changes.
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ==========================================================
     TOP GAME HEADER
     ========================================================== */

  #game .gameHeader{
    min-height:44px!important;
    padding:5px 8px!important;

    gap:6px!important;

    background:rgba(3,9,8,.94)!important;
    border-bottom:1px solid rgba(78,129,112,.30)!important;

    backdrop-filter:blur(9px);
  }

  #game .gameHeader button{
    min-height:30px!important;

    padding:4px 9px!important;

    border-radius:7px!important;

    border-color:rgba(87,137,120,.42)!important;
    background:rgba(10,30,24,.88)!important;

    font-size:.67rem!important;
    font-weight:850!important;

    box-shadow:none!important;
  }

  #game .gameHeader button:hover:not(:disabled){
    border-color:rgba(111,198,167,.58)!important;
    background:rgba(16,45,35,.92)!important;
  }

  #game .gameHeader button:disabled{
    opacity:.28!important;
  }

  #game .cameraControls,
  #game .viewControls{
    gap:4px!important;
  }

  /* ==========================================================
     TURN DOCK — ONE COHERENT SURFACE
     ========================================================== */

  #game .turnDock{
    width:min(1110px,calc(100vw - 36px))!important;
    max-width:1110px!important;

    min-height:198px!important;

    bottom:7px!important;

    border:1px solid rgba(91,161,138,.36)!important;
    border-radius:14px!important;

    background:
      linear-gradient(
        180deg,
        rgba(5,18,14,.94),
        rgba(2,10,8,.97)
      )!important;

    backdrop-filter:blur(12px)!important;

    box-shadow:
      0 18px 50px rgba(0,0,0,.42),
      inset 0 1px rgba(255,255,255,.025)!important;
  }

  #game .turnDockActions,
  #game .turnDockChips{
    padding:11px 13px 10px!important;
  }

  #game .turnDockActions{
    border-right:
      1px solid
      rgba(83,132,116,.24)!important;
  }

  #game .turnDockTitle{
    margin-bottom:7px!important;

    color:#83a99b!important;

    font-size:.57rem!important;
    font-weight:950!important;
    letter-spacing:.14em!important;

    opacity:.92;
  }

  /* ==========================================================
     ACTION BUTTON HIERARCHY
     ========================================================== */

  #game #controls{
    gap:7px!important;
  }

  #game #controls button[data-action]{
    min-height:48px!important;
    height:48px!important;

    border-radius:9px!important;

    border-width:1px!important;

    font-size:.80rem!important;
    font-weight:950!important;

    box-shadow:
      inset 0 1px rgba(255,255,255,.035)!important;
  }

  /* Fold: clearly destructive, but not visually dominant */
  #game #controls button[data-action="fold"]{
    border-color:rgba(185,82,82,.48)!important;
    background:rgba(70,21,21,.78)!important;
    color:#f1cccc!important;
  }

  /* Check: neutral */
  #game #controls button[data-action="check"]{
    border-color:rgba(107,127,119,.36)!important;
    background:rgba(21,29,27,.82)!important;
    color:#c4d0cc!important;
  }

  /* Call: primary common action */
  #game #controls button[data-action="call"]{
    border-color:rgba(85,207,165,.60)!important;
    background:rgba(19,87,64,.90)!important;
    color:#e8fff7!important;
  }

  /* Raise: stronger but distinct from Call */
  #game #controls button[data-action="raise"]{
    border-color:rgba(198,171,81,.55)!important;
    background:rgba(74,60,18,.88)!important;
    color:#fff2b8!important;
  }

  /* All-in: high-risk action */
  #game #controls button[data-action="allin"]{
    border-color:rgba(220,102,73,.58)!important;
    background:rgba(91,31,19,.88)!important;
    color:#ffd6ca!important;
  }

  #game #controls button[data-action].legalAction:not(:disabled){
    opacity:1!important;
    filter:none!important;
  }

  #game #controls button[data-action]:disabled{
    opacity:.20!important;

    filter:
      grayscale(.75)
      saturate(.55)!important;

    box-shadow:none!important;
  }

  #game #controls button[data-action]:hover:not(:disabled){
    transform:translateY(-1px)!important;
    filter:brightness(1.12)!important;
  }

  /* ==========================================================
     BET ROW
     ========================================================== */

  #game #controls .raiseBox{
    grid-template-columns:
      96px
      minmax(0,1fr)
      92px!important;

    gap:8px!important;

    margin-top:1px!important;
  }

  #game #raiseAmount{
    width:96px!important;
    min-width:96px!important;

    height:38px!important;

    border:1px solid rgba(104,153,136,.42)!important;
    border-radius:8px!important;

    background:rgba(3,13,10,.88)!important;
    color:#f1f7f4!important;

    font-size:.78rem!important;
    font-weight:900!important;
  }

  #game #raiseSlider{
    height:22px!important;

    accent-color:#55cba4!important;
  }

  #game #controls #clearBetChipsBtn{
    width:92px!important;
    min-width:92px!important;

    height:38px!important;
    min-height:38px!important;

    border:1px solid rgba(112,145,133,.39)!important;
    border-radius:8px!important;

    background:rgba(18,31,27,.90)!important;
    color:#cddbd6!important;

    font-size:.63rem!important;
    font-weight:900!important;
  }

  /* Turn instruction below the action row */
  #game .turnDockActions #status{
    min-height:15px!important;

    margin-top:5px!important;

    color:#e8cb69!important;

    font-size:.61rem!important;
    font-weight:850!important;

    text-align:center!important;
  }

  /* ==========================================================
     CHIP TRAY — KEEP THE GOOD 4x2 LAYOUT
     ========================================================== */

  #game .turnDockChips #chipWallet{
    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-template-rows:
      repeat(2,57px)!important;

    grid-auto-rows:57px!important;

    height:121px!important;
    min-height:121px!important;
    max-height:121px!important;

    gap:7px!important;

    margin:5px 0 6px!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip{
    height:57px!important;
    min-height:57px!important;
    max-height:57px!important;

    padding:
      6px
      7px
      6px
      43px!important;

    border:1px solid rgba(91,127,115,.38)!important;
    border-radius:9px!important;

    background:
      linear-gradient(
        180deg,
        rgba(15,29,25,.96),
        rgba(8,19,16,.96)
      )!important;

    font-size:.75rem!important;
    font-weight:950!important;

    box-shadow:
      inset 0 1px rgba(255,255,255,.025)!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip:hover:not(:disabled){
    border-color:rgba(101,190,159,.58)!important;
    background:
      linear-gradient(
        180deg,
        rgba(21,43,35,.98),
        rgba(11,27,22,.98)
      )!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip::before{
    width:30px!important;
    height:30px!important;

    box-shadow:
      0 2px 7px rgba(0,0,0,.35)!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip small{
    color:#a4b9b1!important;

    font-size:.52rem!important;
  }

  /* ==========================================================
     AUTOMATIC CHIP SUMMARY
     ========================================================== */

  #game .turnDockChips .betBreakdownBox{
    min-height:31px!important;

    padding:6px 8px!important;

    border:
      1px solid
      rgba(72,105,94,.25)!important;

    border-radius:8px!important;

    background:rgba(2,9,7,.58)!important;
  }

  #game .turnDockChips .betBreakdownBox > .controlLabel{
    color:#718f84!important;

    font-size:.49rem!important;
    letter-spacing:.10em!important;
  }

  #game #betBreakdown{
    color:#e7d078!important;

    font-size:.64rem!important;
    font-weight:850!important;
  }

  /* ==========================================================
     CENTER GAME HUD
     Keep it distinct from the bottom controls.
     ========================================================== */

  #game #heroCards{
    position:relative!important;
    z-index:6!important;
  }

  #game #hudBottom,
  #game #turnHud,
  #game #potHud,
  #game .heroTurnTimer{
    position:relative!important;
    z-index:7!important;
  }

  #game #heroCards .miniCard,
  #game #boardHudCards .miniCard{
    border-radius:8px!important;

    box-shadow:
      0 4px 14px rgba(0,0,0,.30)!important;
  }

  #game .heroTurnTimer{
    width:min(290px,32vw)!important;

    margin-top:5px!important;

    padding:7px 9px 8px!important;

    border:1px solid rgba(209,182,71,.58)!important;
    border-radius:10px!important;

    background:rgba(9,20,16,.91)!important;

    box-shadow:
      0 6px 20px rgba(0,0,0,.32)!important;

    backdrop-filter:blur(7px)!important;
  }

  #game .heroTimerText{
    margin-bottom:4px!important;

    font-size:.74rem!important;
    font-weight:950!important;
  }

  #game .heroTimerTrack{
    height:8px!important;

    border-radius:999px!important;

    overflow:hidden!important;
  }

  #game #potHud,
  #game #turnHud{
    border:
      1px solid
      rgba(78,127,111,.35)!important;

    background:rgba(3,15,11,.88)!important;

    box-shadow:
      0 4px 14px rgba(0,0,0,.24)!important;
  }

  /* ==========================================================
     HAND HISTORY
     Keep useful, but less visually dominant.
     ========================================================== */

  #game #actionFeed{
    opacity:.88!important;
  }

  #game .actionFeedItem{
    border-color:rgba(66,101,90,.35)!important;
    background:rgba(3,13,10,.78)!important;

    color:#aebfb9!important;

    box-shadow:none!important;
  }

  /* ==========================================================
     FLOATING GAME BUTTONS
     ========================================================== */

  #game #tableChat,
  #game .gameFloatingButton{
    border-color:rgba(89,145,125,.40)!important;
    background:rgba(4,19,14,.88)!important;

    backdrop-filter:blur(7px)!important;

    box-shadow:
      0 5px 18px rgba(0,0,0,.28)!important;
  }
}

/* ============================================================
   LAPTOP DESKTOP FALLBACK
   Keep polish but preserve available table area.
   ============================================================ */

@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .turnDock{
    width:calc(100vw - 24px)!important;
    max-width:none!important;

    grid-template-columns:
      minmax(390px,.9fr)
      minmax(0,1.1fr)!important;
  }

  #game #controls button[data-action]{
    font-size:.73rem!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip{
    font-size:.69rem!important;
  }

  #game .heroTurnTimer{
    width:min(270px,34vw)!important;
  }
}
/* ============================================================
   POKER3D_HUD_ALIGNMENT_TIMER_CLEARANCE_V2

   Corrects desktop HUD positioning introduced by earlier polish:
   - Pot + player-turn status return to the same horizontal row
   - turn status no longer overlaps community cards
   - hole cards + move timer are raised together
   - bottom action dock remains unchanged
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ----------------------------------------------------------
     POT + TURN STATUS
     Undo the earlier double vertical translation.
     ---------------------------------------------------------- */

  #game #hudBottom{
    position:relative!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:8px!important;

    transform:none!important;

    margin-top:5px!important;

    z-index:10!important;
  }

  #game #potHud,
  #game #turnHud{
    position:relative!important;

    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;

    transform:none!important;

    margin:0!important;

    vertical-align:middle!important;

    z-index:10!important;
  }

  #game #potHud{
    align-self:center!important;
  }

  #game #turnHud{
    align-self:center!important;
  }

  /* Give both HUD pills the same vertical rhythm. */
  #game #potHud,
  #game #turnHud{
    min-height:30px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    padding:5px 10px!important;

    box-sizing:border-box!important;

    line-height:1.15!important;
  }

  /* ----------------------------------------------------------
     COMMUNITY CARD CLEARANCE
     ---------------------------------------------------------- */

  #game #boardHudCards{
    position:relative!important;

    z-index:9!important;

    margin-bottom:7px!important;
  }

  #game .boardHudLabel{
    position:relative!important;

    z-index:9!important;

    margin-bottom:4px!important;
  }

  /* ----------------------------------------------------------
     PLAYER CARDS + MOVE TIMER
     Raise them as one visual group so the fixed bottom controls
     never cover the turn countdown.
     ---------------------------------------------------------- */

  #game #heroCards{
    position:relative!important;

    transform:translateY(-46px)!important;

    z-index:20!important;
  }

  #game .heroLabel{
    position:relative!important;

    transform:translateY(-46px)!important;

    z-index:20!important;
  }

  #game .heroTurnTimer{
    position:relative!important;

    transform:translateY(-62px)!important;

    z-index:30!important;

    margin-top:5px!important;
  }

  #game .heroTurnTimer,
  #game .heroTurnTimer *{
    pointer-events:none;
  }

  /* Ensure the timer itself stays visually above the dock. */
  #game .heroTurnTimer{
    box-shadow:
      0 7px 22px rgba(0,0,0,.42)!important;
  }

  /* ----------------------------------------------------------
     BOTTOM CONTROL DOCK
     Keep it below the gameplay HUD rather than fighting for
     stacking priority.
     ---------------------------------------------------------- */

  #game .turnDock{
    z-index:12!important;
  }

  #game .turnDockActions,
  #game .turnDockChips{
    z-index:auto!important;
  }
}

/* Slightly smaller shift on shorter/narrower desktop displays. */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game #heroCards,
  #game .heroLabel{
    transform:translateY(-38px)!important;
  }

  #game .heroTurnTimer{
    transform:translateY(-52px)!important;
  }
}
/* ============================================================
POKER3D_HERO_STACK_SPACING_V1

Desktop-only spacing correction:

- separates turn status from YOUR CARDS
- separates YOUR CARDS from the move timer
- keeps the timer above the bottom control dock
- preserves current polished dock/chip layout
============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* Keep the pot + turn row stable, but give it a little more
     breathing room above the hero section. */
  #game #hudBottom{
    gap:10px!important;
    margin-top:4px!important;
    margin-bottom:10px!important;
  }

  #game #turnHud{
    margin-bottom:10px!important;
  }

  /* Bring the hero section slightly less upward than the last patch
     so labels stop colliding with the turn banner. */
  #game .heroLabel{
    position:relative!important;
    transform:translateY(-24px)!important;
    margin:0 0 8px!important;
    z-index:20!important;
  }

  #game #heroCards{
    position:relative!important;
    transform:translateY(-24px)!important;
    margin-top:0!important;
    z-index:20!important;
  }

  /* Timer sits below the cards, but still above the dock. */
  #game .heroTurnTimer{
    position:relative!important;
    transform:translateY(-28px)!important;
    margin-top:10px!important;
    z-index:30!important;
  }

  #game .heroTurnTimer,
  #game .heroTurnTimer *{
    pointer-events:none;
  }

  /* Keep the dock visually below the timer. */
  #game .turnDock{
    bottom:8px!important;
    z-index:12!important;
  }
}

/* Slightly tighter laptop variant */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .heroLabel{
    transform:translateY(-18px)!important;
  }

  #game #heroCards{
    transform:translateY(-18px)!important;
  }

  #game .heroTurnTimer{
    transform:translateY(-22px)!important;
  }
}
/* ============================================================
   POKER3D_TURN_TIMER_DOCK_ANCHOR_V1

   Desktop HUD correction:
   The move timer is a viewport HUD element, not part of the
   table/card layout. Anchor it immediately above the action dock
   so it can never be clipped by the controls.
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  #game .heroTurnTimer{
    position:fixed!important;

    left:50%!important;
    right:auto!important;

    top:auto!important;
    bottom:218px!important;

    transform:translateX(-50%)!important;

    width:min(290px,32vw)!important;

    margin:0!important;

    z-index:60!important;

    box-sizing:border-box!important;

    overflow:visible!important;
  }

  /* Keep every piece of the timer above the dock. */
  #game .heroTurnTimer .heroTimerText,
  #game .heroTurnTimer .heroTimerTrack{
    position:relative!important;
    z-index:61!important;
  }

  #game .heroTurnTimer .heroTimerTrack{
    display:block!important;

    width:100%!important;

    min-height:8px!important;
    height:8px!important;

    overflow:hidden!important;
  }

  /* Controls remain below the timer. */
  #game .turnDock{
    z-index:40!important;
  }
}

/* Laptop desktop fallback. The dock is still approximately
   200px tall, so keep a small safety gap above it. */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .heroTurnTimer{
    bottom:214px!important;

    width:min(270px,34vw)!important;
  }
}
/* ============================================================
   POKER3D_CENTER_HUD_DOCK_CLEARANCE_V1

   Desktop-only correction.

   The bottom control dock occupies a permanent portion of the
   viewport. Move the CENTER GAME HUD upward as one coordinated
   stack rather than moving individual labels/cards independently.

   Preserves:
   - pot + turn alignment
   - 4x2 chip tray
   - fixed move timer
   - gameplay logic
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ----------------------------------------------------------
     COMMUNITY HUD
     ---------------------------------------------------------- */

  #game .boardHudLabel,
  #game #boardHudCards{
    position:relative!important;

    transform:translateY(-52px)!important;

    z-index:20!important;
  }

  /* ----------------------------------------------------------
     POT + PLAYER TURN ROW

     Move the parent only. Children remain transform:none so Pot
     and player-turn/SB/BB stay perfectly aligned.
     ---------------------------------------------------------- */

  #game #hudBottom{
    position:relative!important;

    transform:translateY(-52px)!important;

    z-index:21!important;

    margin-top:5px!important;
    margin-bottom:10px!important;
  }

  #game #potHud,
  #game #turnHud{
    transform:none!important;

    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;

    margin:0!important;
  }

  /* ----------------------------------------------------------
     YOUR CARDS + HOLE CARDS

     Give the actual cards enough clearance above the dock.
     ---------------------------------------------------------- */

  #game .heroLabel{
    position:relative!important;

    transform:translateY(-76px)!important;

    margin-bottom:7px!important;

    z-index:30!important;
  }

  #game #heroCards{
    position:relative!important;

    transform:translateY(-76px)!important;

    margin-top:0!important;

    z-index:30!important;
  }

  /* ----------------------------------------------------------
     MOVE TIMER

     This was correctly anchored independently above the controls.
     Do not inherit any of the card-stack transforms.
     ---------------------------------------------------------- */

  #game .heroTurnTimer{
    position:fixed!important;

    left:50%!important;
    right:auto!important;

    top:auto!important;
    bottom:218px!important;

    transform:translateX(-50%)!important;

    margin:0!important;

    z-index:60!important;
  }

  /* ----------------------------------------------------------
     SHOWDOWN / WINNER PANEL

     Keep showdown presentation in the same safe center region.
     ---------------------------------------------------------- */

  #game #winnerHud{
    position:relative!important;

    transform:translateY(-52px)!important;

    z-index:31!important;
  }

  /* ----------------------------------------------------------
     CONTROL DOCK

     Remains stationary. The HUD moves out of its reserved area.
     ---------------------------------------------------------- */

  #game .turnDock{
    bottom:8px!important;

    z-index:40!important;
  }
}

/* Narrow desktop/laptop version */
@media (min-width:901px) and (max-width:1180px) and (min-height:650px){

  #game .boardHudLabel,
  #game #boardHudCards,
  #game #hudBottom,
  #game #winnerHud{
    transform:translateY(-44px)!important;
  }

  #game .heroLabel,
  #game #heroCards{
    transform:translateY(-66px)!important;
  }

  #game .heroTurnTimer{
    bottom:214px!important;

    transform:translateX(-50%)!important;
  }
}
/* ============================================================
   POKER3D_CANONICAL_PLAYER_HUD_LAYOUT_V1

   FINAL desktop center-HUD layout owner.

   Earlier HUD polish accumulated several independent transforms.
   This block intentionally normalizes them and makes #playerHud
   responsible for vertical placement.

   Natural order:
     Community
     Pot + Turn
     Your Cards
     Hole Cards
     Turn Timer
     Bottom Control Dock

   No poker/network/gameplay behavior changes.
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ==========================================================
     ONE POSITIONING OWNER
     ========================================================== */

  #game #playerHud{
    position:absolute!important;

    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:204px!important;

    transform:translateX(-50%)!important;

    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-end!important;

    gap:5px!important;

    width:min(960px,94vw)!important;
    max-width:94vw!important;

    margin:0!important;
    padding:0!important;

    z-index:35!important;

    pointer-events:none!important;

    overflow:visible!important;
    box-sizing:border-box!important;
  }

  /* ==========================================================
     RESET ALL OLD INDEPENDENT VERTICAL MOVEMENT
     ========================================================== */

  #game .boardHudLabel,
  #game #boardHudCards,
  #game #winnerHud,
  #game #hudBottom,
  #game #potHud,
  #game #turnHud,
  #game .heroLabel,
  #game #heroCards,
  #game .heroTurnTimer{
    transform:none!important;

    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
  }

  /* ==========================================================
     COMMUNITY
     ========================================================== */

  #game .boardHudLabel{
    position:relative!important;

    margin:0 0 3px!important;

    z-index:36!important;
  }

  #game #boardHudCards{
    position:relative!important;

    margin:0!important;

    z-index:36!important;
  }

  /* Keep community and personal cards matched. */
  #game #boardHudCards .miniCard,
  #game #heroCards .miniCard{
    width:86px!important;
    height:120px!important;
  }

  /* ==========================================================
     WINNER / SHOWDOWN
     ========================================================== */

  #game #winnerHud{
    position:relative!important;

    margin:5px 0 0!important;

    z-index:38!important;
  }

  /* ==========================================================
     POT + CURRENT PLAYER / SB / BB
     ========================================================== */

  #game #hudBottom{
    position:relative!important;

    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;

    gap:8px!important;

    margin:6px 0 0!important;

    z-index:40!important;
  }

  #game #potHud,
  #game #turnHud{
    position:relative!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    min-height:30px!important;

    margin:0!important;
    padding:5px 10px!important;

    line-height:1.15!important;
    vertical-align:middle!important;

    box-sizing:border-box!important;

    z-index:40!important;
  }

  /* Explicitly kill the old turnHud bottom-margin override. */
  #game #turnHud{
    margin-bottom:0!important;
  }

  /* ==========================================================
     ACTION FEED
     ========================================================== */

  #game #actionFeed{
    position:relative!important;

    margin:1px 0 0!important;

    z-index:39!important;
  }

  /* ==========================================================
     YOUR CARDS LABEL
     ========================================================== */

  #game .heroLabel{
    position:relative!important;

    margin:4px 0 2px!important;

    z-index:42!important;
  }

  /* ==========================================================
     HOLE CARDS
     ========================================================== */

  #game #heroCards{
    position:relative!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:6px!important;

    margin:0!important;

    z-index:42!important;
  }

  /* ==========================================================
     TURN TIMER

     Important:
     This is deliberately back in NORMAL FLOW.
     It is no longer fixed and therefore cannot land on top of
     Pot / Turn / SB / BB.
     ========================================================== */

  #game .heroTurnTimer{
    position:relative!important;

    width:min(290px,32vw)!important;

    margin:7px 0 0!important;
    padding:7px 9px 8px!important;

    z-index:45!important;

    overflow:hidden!important;

    box-sizing:border-box!important;

    pointer-events:none!important;
  }

  #game .heroTurnTimer .heroTimerText{
    position:relative!important;

    margin:0 0 4px!important;

    z-index:46!important;
  }

  #game .heroTurnTimer .heroTimerTrack{
    position:relative!important;

    display:block!important;

    width:100%!important;

    height:8px!important;
    min-height:8px!important;

    margin:0!important;

    overflow:hidden!important;

    z-index:46!important;
  }

  /* ==========================================================
     BOTTOM CONTROL DOCK

     The player HUD stops above this reserved zone.
     ========================================================== */

  #game .turnDock{
    position:fixed!important;

    left:50%!important;
    right:auto!important;
    bottom:8px!important;

    transform:translateX(-50%)!important;

    z-index:50!important;
  }
}

/* ============================================================
   SHORTER DESKTOP / LAPTOP

   Same structure, just slightly tighter.
   ============================================================ */

@media (min-width:901px) and (max-height:760px){

  #game #playerHud{
    bottom:188px!important;

    gap:3px!important;
  }

  #game #boardHudCards .miniCard,
  #game #heroCards .miniCard{
    width:76px!important;
    height:106px!important;
  }

  #game .heroLabel{
    margin-top:2px!important;
  }

  #game .heroTurnTimer{
    width:min(270px,32vw)!important;

    margin-top:4px!important;
    padding:5px 8px 6px!important;
  }
}

/* ============================================================
   MOBILE
   Existing mobile layout remains authoritative.
   ============================================================ */

@media (max-width:900px), (max-height:649px){

  #game #playerHud{
    position:initial;
  }
}
/* ============================================================
   POKER3D_TURN_AWARE_HUD_GRID_V1

   FINAL DESKTOP HUD POSITIONING OWNER

   The game already exposes:
       #game.turnControlsVisible

   Therefore:
   - normal play uses the original compact vertical HUD
   - active turn uses a compact two-column card shelf
   - community cards no longer get dragged upward with controls
   - hole cards remain fully above the action dock
   - timer receives guaranteed unobstructed space
   - old stacked translateY fixes are neutralized here

   Presentation only. No poker behavior changes.
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* ==========================================================
     GLOBAL RESET

     Kill the accumulated positioning transforms from previous
     HUD corrections. This block is intentionally last in CSS
     and becomes the sole desktop layout owner.
     ========================================================== */

  #game #playerHud{
    position:absolute!important;

    left:50%!important;
    right:auto!important;
    top:auto!important;

    transform:translateX(-50%)!important;

    width:min(880px,calc(100vw - 40px))!important;
    max-width:calc(100vw - 40px)!important;

    margin:0!important;
    padding:0!important;

    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-end!important;

    gap:4px!important;

    pointer-events:none!important;
    z-index:45!important;
  }

  #game #bottomInfoDock{
    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;

    transform:none!important;

    margin:0!important;
    padding:0!important;

    box-sizing:border-box!important;
  }

  #game #boardHud,
  #game .boardHudLabel,
  #game #boardHudCards,
  #game #winnerHud,
  #game #hudBottom,
  #game #potHud,
  #game #turnHud,
  #game #actionFeed,
  #game .heroLabel,
  #game #heroCards,
  #game .heroTurnTimer{
    transform:none!important;
  }

  #game #boardHud,
  #game .boardHudLabel,
  #game #boardHudCards,
  #game #winnerHud,
  #game #hudBottom,
  #game #potHud,
  #game #turnHud,
  #game #actionFeed,
  #game .heroLabel,
  #game #heroCards{
    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
  }

  /* ==========================================================
     NORMAL / WAITING STATE

     No action controls are visible, so use a traditional
     compact centered vertical Poker HUD near the bottom.
     ========================================================== */

  #game:not(.turnControlsVisible) #playerHud{
    bottom:12px!important;
  }

  #game:not(.turnControlsVisible) #bottomInfoDock{
    width:min(720px,92vw)!important;

    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-end!important;

    gap:4px!important;
  }

  #game:not(.turnControlsVisible) #boardHud{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;

    margin:0!important;
  }

  #game:not(.turnControlsVisible) #boardHudCards{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:6px!important;

    margin:0!important;
  }

  #game:not(.turnControlsVisible) #hudBottom{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:8px!important;

    margin:4px 0 0!important;
  }

  #game:not(.turnControlsVisible) .heroLabel{
    margin:3px 0 2px!important;
  }

  #game:not(.turnControlsVisible) #heroCards{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:6px!important;

    margin:0!important;
  }

  /* Timer is hidden by game state outside the player's turn.
     Reset its legacy fixed positioning anyway. */
  #game:not(.turnControlsVisible) .heroTurnTimer{
    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;

    transform:none!important;

    margin:5px auto 0!important;
  }

  /* ==========================================================
     ACTIVE TURN

     Controls occupy the bottom ~200px.

     Instead of pushing the entire HUD upward as one huge stack,
     arrange the card information horizontally:

          COMMUNITY CARDS    YOUR CARDS
          POT / TURN         MOVE TIMER

     This dramatically reduces required vertical space.
     ========================================================== */

  #game.turnControlsVisible #playerHud{
    bottom:216px!important;

    width:min(840px,calc(100vw - 40px))!important;
  }

  #game.turnControlsVisible #bottomInfoDock{
    width:min(820px,calc(100vw - 40px))!important;

    display:grid!important;

    grid-template-columns:
      minmax(0,1fr)
      280px!important;

    grid-template-areas:
      "board heroLabel"
      "board heroCards"
      "hud   timer"!important;

    column-gap:16px!important;
    row-gap:5px!important;

    align-items:end!important;
    justify-items:center!important;

    overflow:visible!important;
  }

  /* ----------------------------------------------------------
     COMMUNITY SIDE
     ---------------------------------------------------------- */

  #game.turnControlsVisible #boardHud{
    grid-area:board!important;

    width:100%!important;

    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-end!important;

    margin:0!important;
    padding:0!important;

    align-self:end!important;
  }

  #game.turnControlsVisible .boardHudLabel{
    margin:0 0 4px!important;
  }

  #game.turnControlsVisible #boardHudCards{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;

    gap:6px!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;
  }

  /* Keep the community cards at the larger polished size. */
  #game.turnControlsVisible #boardHudCards .miniCard{
    width:86px!important;
    height:120px!important;
  }

  /* ----------------------------------------------------------
     YOUR CARDS SIDE
     ---------------------------------------------------------- */

  #game.turnControlsVisible .heroLabel{
    grid-area:heroLabel!important;

    align-self:end!important;

    margin:0 0 2px!important;
    padding:2px 7px!important;

    z-index:50!important;
  }

  #game.turnControlsVisible #heroCards{
    grid-area:heroCards!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:7px!important;

    margin:0!important;
    padding:0!important;

    align-self:end!important;

    overflow:visible!important;

    z-index:50!important;
  }

  #game.turnControlsVisible #heroCards .miniCard{
    width:86px!important;
    height:120px!important;
  }

  /* ----------------------------------------------------------
     POT + TURN STATUS
     ---------------------------------------------------------- */

  #game.turnControlsVisible #hudBottom{
    grid-area:hud!important;

    width:100%!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:8px!important;

    margin:0!important;
    padding:0!important;

    align-self:center!important;

    z-index:52!important;
  }

  #game.turnControlsVisible #potHud,
  #game.turnControlsVisible #turnHud{
    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;

    transform:none!important;

    margin:0!important;

    min-height:30px!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    padding:5px 10px!important;

    white-space:nowrap!important;

    z-index:52!important;
  }

  /* ----------------------------------------------------------
     MOVE TIMER

     It is now a normal GRID ITEM.
     No fixed positioning.
     No translateY.
     No guessing where the dock begins.
     ---------------------------------------------------------- */

  #game.turnControlsVisible .heroTurnTimer{
    grid-area:timer!important;

    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;

    transform:none!important;

    width:270px!important;
    max-width:270px!important;

    margin:0!important;
    padding:6px 9px 7px!important;

    box-sizing:border-box!important;

    align-self:center!important;
    justify-self:center!important;

    overflow:visible!important;

    z-index:70!important;

    pointer-events:none!important;
  }

  #game.turnControlsVisible .heroTurnTimer .heroTimerText{
    position:relative!important;

    z-index:71!important;

    margin:0 0 4px!important;

    line-height:1.15!important;
  }

  #game.turnControlsVisible .heroTurnTimer .heroTimerTrack{
    position:relative!important;

    display:block!important;

    width:100%!important;
    height:8px!important;
    min-height:8px!important;

    margin:0!important;

    overflow:hidden!important;

    z-index:71!important;
  }

  /* ----------------------------------------------------------
     ACTION FEED

     Hand History already exposes the detailed action history.
     During the player's turn this extra row only consumes
     precious vertical room, so hide it temporarily.
     ---------------------------------------------------------- */

  #game.turnControlsVisible #actionFeed{
    display:none!important;
  }

  /* ----------------------------------------------------------
     POKERCOINS

     Keep the balance centered immediately above the card shelf.
     ---------------------------------------------------------- */

  #game.turnControlsVisible #pokerCoinBalance{
    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;

    transform:none!important;

    margin:0 0 4px!important;

    z-index:52!important;
  }

  /* ----------------------------------------------------------
     CONTROL DOCK

     The dock owns the bottom layer.
     The HUD owns the region immediately above it.
     ---------------------------------------------------------- */

  #game #turnActionDock,
  #game .turnDock{
    position:fixed!important;

    left:50%!important;
    right:auto!important;

    bottom:8px!important;

    transform:translateX(-50%)!important;

    z-index:40!important;
  }
}

/* ============================================================
   SHORTER DESKTOPS

   Maintain the same structure. Slightly reduce card dimensions
   and reserve a little less vertical space.
   ============================================================ */

@media (min-width:901px) and (min-height:650px) and (max-height:760px){

  #game.turnControlsVisible #playerHud{
    bottom:204px!important;
  }

  #game.turnControlsVisible #bottomInfoDock{
    width:min(760px,calc(100vw - 32px))!important;

    grid-template-columns:
      minmax(0,1fr)
      250px!important;

    column-gap:12px!important;
  }

  #game.turnControlsVisible #boardHudCards .miniCard,
  #game.turnControlsVisible #heroCards .miniCard{
    width:76px!important;
    height:106px!important;
  }

  #game.turnControlsVisible .heroTurnTimer{
    width:245px!important;
    max-width:245px!important;
  }
}

/* ============================================================
   MOBILE

   Deliberately untouched. Existing mobile HUD remains owner.
   ============================================================ */
/* ============================================================
   POKER3D_TURN_AWARE_HUD_FINAL_CLEARANCE_V2

   Final desktop clearance adjustment for the new structural HUD.

   Do NOT change the new grid.
   Simply raise the complete active-turn HUD shelf enough that
   the blurred action/chip dock cannot touch:
   - hole cards
   - community cards
   - pot / turn status
   - YOUR TURN timer
   ============================================================ */

@media (min-width:901px) and (min-height:650px){

  /* Previous structural value: 216px.
     Add a clean 30px breathing zone above the control dock. */
  #game.turnControlsVisible #playerHud{
    bottom:246px!important;
    z-index:60!important;
  }

  /* Give the bottom information row a little internal breathing
     room without changing the two-column layout. */
  #game.turnControlsVisible #bottomInfoDock{
    padding-bottom:3px!important;
    overflow:visible!important;
  }

  /* Keep cards completely clear and crisp above the dock. */
  #game.turnControlsVisible #heroCards,
  #game.turnControlsVisible #boardHudCards{
    position:relative!important;
    z-index:62!important;
    overflow:visible!important;
  }

  #game.turnControlsVisible .heroLabel,
  #game.turnControlsVisible .boardHudLabel{
    position:relative!important;
    z-index:63!important;
  }

  /* Timer remains in its dedicated grid cell.
     No fixed positioning or translation. */
  #game.turnControlsVisible .heroTurnTimer{
    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;

    transform:none!important;

    z-index:70!important;

    margin:0!important;
    overflow:visible!important;
  }

  /* Pot + turn banner stays paired and above the blur edge. */
  #game.turnControlsVisible #hudBottom{
    position:relative!important;
    z-index:64!important;
  }

  /* The controls remain underneath the gameplay HUD. */
  #game #turnActionDock,
  #game .turnDock{
    z-index:40!important;
  }
}

/* Shorter desktop/laptop version.
   Previous structural value: 204px. */
@media (min-width:901px) and (min-height:650px) and (max-height:760px){

  #game.turnControlsVisible #playerHud{
    bottom:234px!important;
  }
}
/* ============================================================
   POKER3D_MINIMAL_GAMEPLAY_LABEL_CLEANUP_V1

   Small gameplay HUD cleanup only:
   - hide the COMMUNITY label above board cards
   - hide the PokerCoins balance from in-game HUD
   - shop display remains unchanged
   ============================================================ */

#game #pokerCoinBalance{
  display:none!important;
}

#game #boardHud .boardHudLabel{
  display:none!important;
}

/* Prevent a leftover empty label gap above the board cards. */
#game #boardHud{
  gap:0!important;
}

#game #boardHudCards{
  margin-top:0!important;
}
/* ============================================================
   POKER3D_MOBILE_GUI_OWNER_V1

   FINAL TRUE-MOBILE GUI OWNER

   IMPORTANT:
   This uses the SAME breakpoint as phoneLayoutQuery in app.js:

   (max-width:700px),
   (max-width:900px) and (max-height:500px)

   Desktop >= 901px with normal desktop height is untouched.

   Mobile model:
   PLAY  = gameplay + actions
   CHIPS = gameplay + chip tray
   TABLE = table/social tools sheet
   ============================================================ */

@media (max-width:700px),
       (max-width:900px) and (max-height:500px){

  /* ==========================================================
     FULLSCREEN GAME
     ========================================================== */

  body:has(#game:not([hidden])){
    width:100%!important;
    height:100dvh!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  #game:not([hidden]){
    --mobile-nav-height:52px;

    position:relative!important;

    display:block!important;

    width:100%!important;
    height:100dvh!important;
    min-height:0!important;

    padding:0!important;
    margin:0!important;

    overflow:hidden!important;

    background:#020504!important;
  }

  #game #tableStage{
    position:absolute!important;
    inset:0!important;

    width:100%!important;
    height:100%!important;

    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;
  }

  #game #scene{
    display:block!important;

    width:100%!important;
    height:100%!important;

    min-width:0!important;
    min-height:0!important;
  }


  /* ==========================================================
     MOBILE MENU
     Existing off-canvas menu behavior remains intact.
     ========================================================== */

  #game #mobileMenuBtn{
    display:block!important;

    position:fixed!important;
    z-index:10100!important;

    top:calc(7px + env(safe-area-inset-top,0))!important;
    right:7px!important;

    min-width:76px!important;
    min-height:38px!important;

    padding:5px 9px!important;

    border-radius:999px!important;

    font-size:.65rem!important;
    font-weight:950!important;

    white-space:nowrap!important;
  }


  /* ==========================================================
     BOTTOM NAVIGATION
     Restore the already-existing Play / Chips / Table controls.
     ========================================================== */

  #game #mobileGameTabs{
    position:fixed!important;
    z-index:10070!important;

    left:0!important;
    right:0!important;
    bottom:0!important;

    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;

    width:100%!important;
    height:auto!important;

    gap:4px!important;

    margin:0!important;

    padding:
      5px
      6px
      calc(5px + env(safe-area-inset-bottom,0))!important;

    border:0!important;
    border-top:1px solid rgba(79,126,111,.42)!important;

    background:rgba(3,11,9,.97)!important;

    box-shadow:
      0 -6px 22px rgba(0,0,0,.50)!important;
  }

  #game #mobileGameTabs button{
    width:100%!important;

    min-width:0!important;
    min-height:40px!important;

    margin:0!important;
    padding:6px 4px!important;

    border-radius:8px!important;

    font-size:.70rem!important;
    font-weight:900!important;
  }

  #game #mobileGameTabs button[aria-pressed="true"]{
    color:#fff0a8!important;

    border-color:#63c59f!important;

    background:
      linear-gradient(
        180deg,
        rgba(24,79,59,.96),
        rgba(12,50,37,.96)
      )!important;

    box-shadow:
      inset 0 -2px rgba(232,197,84,.92)!important;
  }


  /* ==========================================================
     OLD DESKTOP/SIDEBAR PANELS

     Bet controls have already been moved into turnActionDock.
     Keep the obsolete desktop bet panel suppressed.
     ========================================================== */

  #game #betPanel{
    display:none!important;
  }


  /* ==========================================================
     PLAYER HUD

     This is a viewport HUD on mobile.
     It NEVER participates in desktop positioning.
     ========================================================== */

  #game #playerHud{
    position:fixed!important;

    left:50%!important;
    right:auto!important;
    top:auto!important;

    bottom:
      calc(
        var(--mobile-nav-height) +
        8px +
        env(safe-area-inset-bottom,0)
      )!important;

    transform:translateX(-50%)!important;

    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-end!important;

    gap:3px!important;

    width:calc(100vw - 14px)!important;
    max-width:520px!important;

    margin:0!important;
    padding:0!important;

    z-index:10040!important;

    pointer-events:none!important;

    overflow:visible!important;
  }

  #game #bottomInfoDock{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-end!important;

    gap:3px!important;

    width:100%!important;
    max-width:100%!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;
  }


  /* ==========================================================
     COMMUNITY CARDS
     ========================================================== */

  #game #boardHud{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;

    width:auto!important;
    max-width:100%!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;
  }

  #game #boardHud .boardHudLabel{
    display:none!important;
  }

  #game #boardHudCards{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:3px!important;

    width:auto!important;

    margin:0!important;
    padding:0!important;

    transform:none!important;

    overflow:visible!important;
  }

  #game #boardHudCards .miniCard{
    width:42px!important;
    height:59px!important;

    border-radius:5px!important;
  }


  /* ==========================================================
     POT + TURN STATUS
     ========================================================== */

  #game #hudBottom{
    position:relative!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:5px!important;

    width:auto!important;
    max-width:calc(100vw - 16px)!important;

    min-height:0!important;

    margin:1px 0!important;
    padding:0!important;

    transform:none!important;

    overflow:visible!important;

    z-index:4!important;
  }

  #game #potHud,
  #game #turnHud{
    position:relative!important;

    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;

    transform:none!important;

    min-height:25px!important;

    margin:0!important;
    padding:4px 7px!important;

    border-radius:999px!important;

    font-size:.60rem!important;
    line-height:1.05!important;

    white-space:nowrap!important;
  }

  #game #turnHud{
    max-width:min(66vw,330px)!important;

    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  #game #actionFeed{
    display:none!important;
  }


  /* ==========================================================
     YOUR CARDS
     ========================================================== */

  #game .heroLabel{
    position:relative!important;

    transform:none!important;

    display:block!important;

    min-height:0!important;

    margin:1px 0 0!important;
    padding:2px 7px!important;

    border-radius:999px!important;

    font-size:.52rem!important;
    line-height:1!important;

    z-index:5!important;
  }

  #game #heroCards{
    position:relative!important;

    transform:none!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    gap:5px!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;

    z-index:5!important;
  }

  #game #heroCards .miniCard{
    width:58px!important;
    height:81px!important;

    border-radius:6px!important;
  }


  /* ==========================================================
     TURN TIMER
     Always belongs to the PLAYER HUD, never the action dock.
     ========================================================== */

  #game .heroTurnTimer{
    position:relative!important;

    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;

    transform:none!important;

    display:block;

    width:min(270px,76vw)!important;
    max-width:270px!important;

    min-height:31px!important;

    margin:3px 0 0!important;
    padding:5px 7px 6px!important;

    border-radius:8px!important;

    box-sizing:border-box!important;

    overflow:visible!important;

    z-index:6!important;

    pointer-events:none!important;
  }

  #game .heroTurnTimer[hidden]{
    display:none!important;
  }

  #game .heroTimerText{
    margin:0 0 3px!important;

    font-size:.63rem!important;
    line-height:1.05!important;
  }

  #game .heroTimerTrack{
    display:block!important;

    width:100%!important;
    height:7px!important;
    min-height:7px!important;

    margin:0!important;

    overflow:hidden!important;
  }


  /* ==========================================================
     TURN ACTION DOCK

     The JS already:
       turnDock.hidden = !myTurn

     Do not duplicate turn-state behavior here.
     ========================================================== */

  #game #turnActionDock[hidden]{
    display:none!important;
  }

  #game #turnActionDock:not([hidden]){
    position:fixed!important;

    z-index:10060!important;

    left:6px!important;
    right:6px!important;
    top:auto!important;

    bottom:
      calc(
        var(--mobile-nav-height) +
        5px +
        env(safe-area-inset-bottom,0)
      )!important;

    transform:none!important;

    display:block!important;

    width:auto!important;
    max-width:none!important;

    min-width:0!important;
    min-height:0!important;
    max-height:42dvh!important;

    margin:0!important;
    padding:0!important;

    border:1px solid rgba(83,144,123,.42)!important;
    border-radius:12px!important;

    background:rgba(3,14,11,.97)!important;

    box-shadow:
      0 8px 30px rgba(0,0,0,.58)!important;

    overflow:hidden!important;

    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }

  #game #turnActionDock .turnDockPanel{
    width:100%!important;
    min-width:0!important;

    margin:0!important;
    padding:8px!important;

    border:0!important;
    border-radius:0!important;

    background:transparent!important;

    box-shadow:none!important;

    overflow:visible!important;
  }

  #game #turnActionDock .turnDockTitle{
    display:none!important;
  }


  /* ==========================================================
     ACTION BUTTONS
     ========================================================== */

  #game #turnActionDock #controls{
    display:grid!important;

    grid-template-columns:repeat(5,minmax(0,1fr))!important;

    gap:5px!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;
  }

  #game #turnActionDock
  #controls > [data-action-priority="primary"]{
    display:contents!important;
  }

  #game #turnActionDock
  #controls button[data-action]{
    width:100%!important;

    min-width:0!important;
    min-height:43px!important;
    height:43px!important;

    margin:0!important;
    padding:5px 3px!important;

    border-radius:8px!important;

    font-size:.68rem!important;
    font-weight:950!important;

    white-space:nowrap!important;
  }

  #game #turnActionDock
  #controls .raiseBox{
    grid-column:1 / -1!important;
    grid-row:auto!important;

    order:20!important;

    display:grid!important;

    grid-template-columns:
      76px
      minmax(0,1fr)
      76px!important;

    align-items:center!important;

    gap:6px!important;

    width:100%!important;

    margin:1px 0 0!important;
    padding:0!important;
  }

  #game #turnActionDock #raiseAmount{
    width:76px!important;
    min-width:0!important;

    height:38px!important;
    min-height:38px!important;

    margin:0!important;
    padding:4px 6px!important;

    font-size:.70rem!important;
  }

  #game #turnActionDock #raiseSlider{
    width:100%!important;
    min-width:0!important;

    margin:0!important;
  }

  #game #turnActionDock #clearBetChipsBtn{
    width:76px!important;
    min-width:0!important;

    height:38px!important;
    min-height:38px!important;

    margin:0!important;
    padding:4px!important;

    border-radius:7px!important;

    font-size:.58rem!important;
    font-weight:900!important;
  }

  #game #turnActionDock #status{
    width:100%!important;

    min-height:14px!important;

    margin:4px 0 0!important;
    padding:0!important;

    font-size:.54rem!important;
    line-height:1.1!important;

    text-align:center!important;

    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  #game .turnDockChips .chipBetBuilder{
    display:block!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;

    border:0!important;

    background:transparent!important;
  }

  #game .turnDockChips .chipBetBuilder > div:first-child{
    width:100%!important;
  }

  #game .turnDockChips .controlLabel{
    margin:0 0 4px!important;

    font-size:.52rem!important;
  }

  #game .turnDockChips #chipWallet{
    display:grid!important;

    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-auto-flow:row!important;
    grid-auto-rows:47px!important;

    gap:5px!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;

    overflow:visible!important;
  }

  #game .turnDockChips
  #chipWallet > .denominationChip{
    position:relative!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:47px!important;
    min-height:47px!important;
    max-height:47px!important;

    margin:0!important;

    padding:4px 4px 4px 34px!important;

    border-radius:8px!important;

    font-size:.65rem!important;
    line-height:1!important;

    overflow:hidden!important;
  }

  #game .turnDockChips
  #chipWallet > .denominationChip::before{
    left:5px!important;

    width:25px!important;
    height:25px!important;

    border-width:2px!important;

    font-size:.50rem!important;
  }

  #game .turnDockChips
  #chipWallet > .denominationChip small{
    display:block!important;

    font-size:.44rem!important;
    line-height:1!important;

    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  #game .turnDockChips .betBreakdownBox{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;

    gap:5px!important;

    width:100%!important;
    min-height:29px!important;

    margin:6px 0 0!important;
    padding:5px 7px!important;

    border-radius:7px!important;

    overflow:hidden!important;
  }

  #game .turnDockChips
  .betBreakdownBox > .controlLabel{
    display:none!important;
  }

  #game .turnDockChips #betBreakdown{
    display:block!important;

    width:100%!important;

    font-size:.55rem!important;
    line-height:1.1!important;

    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }


  /* ==========================================================
     TABLE TAB

     Existing social/table tools become a fullscreen-ish sheet.
     ========================================================== */

  #game #socialPanel{
    display:none!important;
  }


  /* ==========================================================
     AUTO CALL

     Preserve existing mobile behavior without letting it cover
     the new navigation/action dock.
     ========================================================== */

  #game #autoCallDock.autoCallArmedMobile{
    z-index:10080!important;

    bottom:
      calc(
        var(--mobile-nav-height) +
        8px +
        env(safe-area-inset-bottom,0)
      )!important;
  }
}


/* ============================================================
   MOBILE LANDSCAPE / VERY SHORT PHONE
   Still uses the exact phone breakpoint.
   ============================================================ */

@media (max-width:900px) and (max-height:500px){

  #game:not([hidden]){
    --mobile-nav-height:46px;
  }

  #game #mobileGameTabs{
    padding:
      3px
      5px
      calc(3px + env(safe-area-inset-bottom,0))!important;
  }

  #game #mobileGameTabs button{
    min-height:34px!important;

    padding:4px!important;

    font-size:.62rem!important;
  }

  #game #playerHud{
    max-width:500px!important;

    gap:1px!important;
  }

  #game #boardHudCards .miniCard{
    width:31px!important;
    height:44px!important;
  }

  #game #heroCards .miniCard{
    width:45px!important;
    height:63px!important;
  }

  #game .heroLabel{
    margin:0!important;
  }

  #game #potHud,
  #game #turnHud{
    min-height:21px!important;

    padding:3px 6px!important;

    font-size:.52rem!important;
  }

  #game .heroTurnTimer{
    width:min(230px,48vw)!important;

    min-height:27px!important;

    margin-top:2px!important;
    padding:4px 6px 5px!important;
  }

  #game #turnActionDock:not([hidden]){
    left:5px!important;
    right:5px!important;

    max-height:45dvh!important;
  }

  #game #turnActionDock .turnDockPanel{
    padding:5px!important;
  }

  #game #turnActionDock
  #controls button[data-action]{
    height:36px!important;
    min-height:36px!important;

    font-size:.60rem!important;
  }

  #game #turnActionDock
  #controls .raiseBox{
    grid-template-columns:
      68px
      minmax(0,1fr)
      68px!important;
  }

  #game #turnActionDock #raiseAmount,
  #game #turnActionDock #clearBetChipsBtn{
    width:68px!important;

    height:32px!important;
    min-height:32px!important;
  }

  #game .turnDockChips #chipWallet{
    grid-auto-rows:39px!important;

    gap:4px!important;
  }

  #game .turnDockChips
  #chipWallet > .denominationChip{
    height:39px!important;
    min-height:39px!important;
    max-height:39px!important;

    padding-left:30px!important;

    font-size:.57rem!important;
  }

  #game .turnDockChips
  #chipWallet > .denominationChip::before{
    width:22px!important;
    height:22px!important;
  }
}
/* ============================================================
   POKER3D_MOBILE_JOIN_NO_SCROLL_V1
   Phone-only landing / pre-seat primary-action owner.

   Goal:
   - Quick Join is reachable without scrolling.
   - Take My Seat is reachable without scrolling.
   - Optional content may scroll behind the primary action.
   - Desktop is untouched.
   ============================================================ */

@media (max-width:700px),
       (max-width:900px) and (max-height:500px){

  /* ----------------------------------------------------------
     LANDING SCREEN
     ---------------------------------------------------------- */

  body #landing{
    height:100dvh!important;
    min-height:0!important;
    max-height:100dvh!important;
    overflow:hidden!important;
  }

  body #landing .landingContent{
    box-sizing:border-box!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100dvh!important;

    /*
      Leave room for the persistent primary button.
    */
    padding-bottom:82px!important;

    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
  }

  /* Reduce unnecessary vertical dead space on phones. */
  body #landing .firstRunEyebrow{
    margin-bottom:5px!important;
  }

  body #landing .landingPlayHint{
    margin-top:4px!important;
    margin-bottom:4px!important;
    font-size:.72rem!important;
    line-height:1.25!important;
  }

  body #landing .landingTableActions{
    gap:6px!important;
    margin-top:6px!important;
  }

  body #landing .landingMoreOptions{
    margin-top:4px!important;
  }

  body #landing .landingSessionBar{
    margin-top:5px!important;
    margin-bottom:5px!important;
  }

  body #landing .roomBrowser{
    margin-top:7px!important;
  }


  /* ----------------------------------------------------------
     QUICK JOIN
     Always reachable on the normal mobile landing screen.
     ---------------------------------------------------------- */

  body #landing #quickConnectBtn{
    position:fixed!important;

    left:12px!important;
    right:12px!important;
    bottom:12px!important;

    width:auto!important;
    min-height:52px!important;

    margin:0!important;

    z-index:10050!important;

    font-size:1rem!important;
    font-weight:900!important;

    box-shadow:
      0 -6px 22px rgba(0,0,0,.34),
      0 6px 20px rgba(0,0,0,.42)!important;
  }


  /* ----------------------------------------------------------
     PRE-SEAT / CUSTOMIZE SCREEN
     ---------------------------------------------------------- */

  body #joinArea:not([hidden]){
    box-sizing:border-box!important;

    min-height:0!important;

    /*
      Reserve space for TAKE MY SEAT.
    */
    padding-bottom:76px!important;
  }

  body #joinArea .joinWelcome{
    margin-bottom:5px!important;
  }

  body #joinArea .joinWelcome h2{
    margin-top:0!important;
    margin-bottom:3px!important;

    font-size:1.08rem!important;
    line-height:1.15!important;
  }

  body #joinArea .joinPrivacyStatus{
    margin-top:3px!important;
  }

  body #joinArea .joinOptionalControls{
    margin-top:5px!important;
    margin-bottom:5px!important;
    gap:5px!important;
  }

  body #joinArea .avatarCustomizer{
    margin-top:5px!important;
    margin-bottom:5px!important;
    gap:5px!important;
  }

  body #joinArea .accountCard{
    margin-top:5px!important;
    margin-bottom:5px!important;
  }


  /* ----------------------------------------------------------
     TAKE MY SEAT
     Permanent phone CTA.
     ---------------------------------------------------------- */

  body #joinArea:not([hidden]) #joinBtn{
    position:fixed!important;

    left:12px!important;
    right:12px!important;
    bottom:12px!important;

    width:auto!important;
    min-height:52px!important;

    margin:0!important;

    z-index:10060!important;

    font-size:1rem!important;
    font-weight:900!important;

    box-shadow:
      0 -6px 22px rgba(0,0,0,.34),
      0 6px 20px rgba(0,0,0,.42)!important;
  }


  /*
    Once the pre-seat screen is active, Quick Join must not sit
    underneath the Take My Seat button.
  */
  body:has(#joinArea:not([hidden])) #quickConnectBtn{
    display:none!important;
  }
}


/* ------------------------------------------------------------
   EXTRA COMPACTION FOR SHORT LANDSCAPE PHONES
   ------------------------------------------------------------ */

@media (max-width:900px) and (max-height:500px){

  body #landing .landingContent{
    padding-bottom:62px!important;
  }

  body #landing #quickConnectBtn,
  body #joinArea:not([hidden]) #joinBtn{
    left:8px!important;
    right:8px!important;
    bottom:7px!important;

    min-height:44px!important;

    font-size:.9rem!important;
  }

  body #joinArea:not([hidden]){
    padding-bottom:58px!important;
  }

  body #joinArea .joinWelcome h2{
    font-size:.96rem!important;
  }
}

/* ============================================================
   POKER3D_MOBILE_CONSOLIDATED_FLOW_V4

   ONE AUTHORITATIVE MOBILE GEOMETRY OWNER

   Existing MOBILE_GUI_OWNER_V1 continues to provide component
   behavior and appearance:
     - Play / Chips / Table behavior
     - action-button structure
     - chip wallet structure
     - social/table tools
     - mobile menu

   V4 alone owns viewport geometry and gameplay stacking.

   Screen flow:

     3D POKER VIEW
     --------------------------
     COMMUNITY CARDS
     POT / TURN
     YOUR CARDS
     TIMER
     --------------------------
     ACTIONS / CHIP TRAY
     --------------------------
     PLAY | CHIPS | TABLE

   Nothing essential overlaps another region.
   Desktop is untouched.
   ============================================================ */

@media (max-width:700px),
       (max-width:900px) and (max-height:500px){

  html,
  body{
    width:100%!important;

    height:
      var(
        --poker3d-mobile-vh,
        100dvh
      )!important;

    min-height:0!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;
  }


  /* ==========================================================
     LANDING = PHONE
     ========================================================== */

  body #landing{
    position:fixed!important;
    inset:0!important;

    box-sizing:border-box!important;

    width:100%!important;
    height:
      var(
        --poker3d-mobile-vh,
        100dvh
      )!important;

    min-height:0!important;
    max-width:none!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;

    border:0!important;
    border-radius:0!important;

    background:transparent!important;
    box-shadow:none!important;

    overflow:hidden!important;
  }

  body #landing .landingContent{
    position:absolute!important;
    inset:0!important;

    box-sizing:border-box!important;

    display:flex!important;
    flex-direction:column!important;

    width:100%!important;
    height:100%!important;

    min-height:0!important;
    max-width:none!important;
    max-height:none!important;

    margin:0!important;

    padding:
      calc(
        10px +
        env(safe-area-inset-top,0)
      )
      10px
      calc(
        68px +
        env(safe-area-inset-bottom,0)
      )!important;

    gap:5px!important;

    border:0!important;
    border-radius:0!important;

    background:
      linear-gradient(
        180deg,
        rgba(1,8,6,.42),
        rgba(1,10,8,.72) 30%,
        rgba(1,12,9,.96) 65%,
        rgba(1,12,9,.99)
      )!important;

    box-shadow:none!important;

    overflow:hidden!important;
  }

  body #landing .landingServerBrowser{
    flex:1 1 auto!important;

    min-height:0!important;
    max-height:none!important;

    overflow:auto!important;

    overscroll-behavior:contain!important;
  }

  body #landing #quickConnectBtn{
    position:fixed!important;

    left:10px!important;
    right:10px!important;

    bottom:
      calc(
        9px +
        env(safe-area-inset-bottom,0)
      )!important;

    min-height:50px!important;

    z-index:10100!important;
  }


  /* ==========================================================
     CUSTOMIZATION / PRE-SEAT = PHONE
     ========================================================== */

  body #joinArea:not([hidden]){
    position:fixed!important;
    inset:0!important;

    z-index:10045!important;

    box-sizing:border-box!important;

    display:flex!important;
    flex-direction:column!important;

    width:100%!important;
    height:
      var(
        --poker3d-mobile-vh,
        100dvh
      )!important;

    min-height:0!important;
    max-width:none!important;
    max-height:none!important;

    margin:0!important;

    padding:
      calc(
        10px +
        env(safe-area-inset-top,0)
      )
      10px
      calc(
        68px +
        env(safe-area-inset-bottom,0)
      )!important;

    gap:5px!important;

    border:0!important;
    border-radius:0!important;

    background:
      linear-gradient(
        180deg,
        rgba(1,8,6,.94),
        rgba(1,13,10,.995)
      )!important;

    box-shadow:none!important;

    overflow:hidden!important;
  }

  body #joinArea .avatarCustomizer{
    flex:1 1 auto!important;

    min-height:0!important;
    max-height:none!important;

    overflow:auto!important;

    overscroll-behavior:contain!important;
  }

  body #joinArea #joinBtn{
    position:fixed!important;

    left:10px!important;
    right:10px!important;

    bottom:
      calc(
        9px +
        env(safe-area-inset-bottom,0)
      )!important;

    min-height:50px!important;

    z-index:10110!important;
  }


  /* ==========================================================
     ROOT GAME VIEWPORT
     ========================================================== */

  body:has(#game:not([hidden])){
    width:100%!important;

    height:
      var(
        --poker3d-mobile-vh,
        100dvh
      )!important;

    min-height:0!important;

    overflow:hidden!important;
  }

  #game:not([hidden]){
    --mobile-v4-gap:5px;

    /*
      These three values are supplied by app.js and continually
      track the real rendered components.
    */
    --mobile-v4-nav:
      var(
        --mobile-nav-live-h,
        52px
      );

    --mobile-v4-actions:
      var(
        --mobile-action-live-h,
        0px
      );

    --mobile-v4-hud:
      var(
        --mobile-hud-live-h,
        185px
      );

    position:fixed!important;
    inset:0!important;

    box-sizing:border-box!important;

    display:block!important;

    width:100%!important;

    height:
      var(
        --poker3d-mobile-vh,
        100dvh
      )!important;

    min-height:0!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;

    border:0!important;
    border-radius:0!important;

    overflow:hidden!important;
  }


  /* ==========================================================
     3D VIEW

     This is the major architectural change.

     The Three.js canvas NO LONGER fills space underneath the
     poker HUD and controls.

     It receives only the portion of the phone that remains after
     reserving HUD + actions + navigation.
     ========================================================== */

  #game #tableStage{
    position:absolute!important;

    top:0!important;
    left:0!important;
    right:0!important;

    bottom:
      calc(
        var(--mobile-v4-nav) +
        var(--mobile-v4-actions) +
        var(--mobile-v4-hud) +
        (var(--mobile-v4-gap) * 3) +
        env(safe-area-inset-bottom,0)
      )!important;

    width:auto!important;
    height:auto!important;

    min-height:160px!important;
    max-width:none!important;
    max-height:none!important;

    margin:0!important;

    overflow:hidden!important;
  }

  #game #scene{
    position:absolute!important;
    inset:0!important;

    display:block!important;

    width:100%!important;
    height:100%!important;

    max-width:none!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;
  }


  /* ==========================================================
     BOTTOM NAVIGATION
     ========================================================== */

  #game #mobileGameTabs{
    position:fixed!important;

    left:0!important;
    right:0!important;
    bottom:0!important;

    z-index:10120!important;

    box-sizing:border-box!important;

    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;

    width:100%!important;

    height:
      max(
        48px,
        var(--mobile-v4-nav)
      )!important;

    min-height:48px!important;

    margin:0!important;

    padding:
      4px
      6px
      calc(
        4px +
        env(safe-area-inset-bottom,0)
      )!important;

    border-radius:0!important;

    background:
      rgba(2,10,8,.99)!important;

    box-shadow:
      0 -5px 18px rgba(0,0,0,.52)!important;

    overflow:hidden!important;
  }

  #game #mobileGameTabs button{
    min-width:0!important;
    min-height:0!important;

    height:100%!important;

    margin:0!important;

    padding:4px!important;

    font-size:
      clamp(
        .66rem,
        1.5dvh,
        .76rem
      )!important;
  }


  /* ==========================================================
     TURN ACTIONS

     Actions live directly above navigation.
     ========================================================== */

  #game #turnActionDock[hidden]{
    display:none!important;
  }

  #game #turnActionDock:not([hidden]){
    position:fixed!important;

    z-index:10100!important;

    left:5px!important;
    right:5px!important;

    top:auto!important;

    bottom:
      calc(
        var(--mobile-v4-nav) +
        var(--mobile-v4-gap) +
        env(safe-area-inset-bottom,0)
      )!important;

    box-sizing:border-box!important;

    width:auto!important;

    max-height:
      min(
        38dvh,
        300px
      )!important;

    margin:0!important;

    padding:0!important;

    overflow:hidden!important;
  }

  #game #turnActionDock .turnDockPanel{
    box-sizing:border-box!important;

    width:100%!important;

    margin:0!important;
    padding:6px!important;
  }

  #game #turnActionDock #controls{
    display:grid!important;

    grid-template-columns:
      repeat(5,minmax(0,1fr))!important;

    gap:4px!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;
  }

  #game #turnActionDock
  #controls button[data-action]{
    width:100%!important;

    min-width:0!important;
    min-height:38px!important;
    height:38px!important;

    padding:4px 2px!important;

    font-size:
      clamp(
        .58rem,
        1.35dvh,
        .67rem
      )!important;

    white-space:nowrap!important;
  }

  #game #turnActionDock
  #controls .raiseBox{
    grid-column:1 / -1!important;

    display:grid!important;

    grid-template-columns:
      68px
      minmax(0,1fr)
      68px!important;

    gap:5px!important;

    margin:2px 0 0!important;
  }

  #game #turnActionDock #raiseAmount,
  #game #turnActionDock #clearBetChipsBtn{
    width:68px!important;

    min-width:0!important;

    height:34px!important;
    min-height:34px!important;

    font-size:.60rem!important;
  }


  /* ==========================================================
     PLAYER HUD

     HUD sits above measured actions + navigation.

     Its actual height is then measured and fed back into the
     tableStage calculation above.
     ========================================================== */

  #game #playerHud{
    position:fixed!important;

    z-index:10090!important;

    left:5px!important;
    right:5px!important;

    top:auto!important;

    bottom:
      calc(
        var(--mobile-v4-nav) +
        var(--mobile-v4-actions) +
        (var(--mobile-v4-gap) * 2) +
        env(safe-area-inset-bottom,0)
      )!important;

    box-sizing:border-box!important;

    display:block!important;

    width:auto!important;
    max-width:none!important;

    max-height:
      min(
        34dvh,
        290px
      )!important;

    margin:0!important;
    padding:0!important;

    transform:none!important;

    overflow:hidden!important;

    pointer-events:none!important;
  }

  #game #bottomInfoDock{
    box-sizing:border-box!important;

    display:grid!important;

    grid-template-columns:1fr!important;
    grid-auto-rows:auto!important;

    justify-items:center!important;

    width:100%!important;
    height:auto!important;

    min-height:0!important;

    gap:3px!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;
  }


  /* ==========================================================
     COMMUNITY CARDS
     ========================================================== */

  #game #boardHud{
    display:flex!important;

    flex-direction:column!important;

    align-items:center!important;
    justify-content:center!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;
  }

  #game #boardHud .boardHudLabel{
    display:none!important;
  }

  #game #boardHudCards{
    display:flex!important;

    align-items:center!important;
    justify-content:center!important;

    gap:3px!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;
  }

  #game #boardHudCards .miniCard{
    width:
      clamp(
        39px,
        5.4dvh,
        50px
      )!important;

    height:
      clamp(
        55px,
        7.6dvh,
        70px
      )!important;

    flex:0 0 auto!important;
  }


  /* ==========================================================
     POT / TURN
     ========================================================== */

  #game #hudBottom{
    display:flex!important;

    align-items:center!important;
    justify-content:center!important;

    gap:4px!important;

    width:100%!important;

    min-height:0!important;

    margin:0!important;
    padding:0!important;
  }

  #game #potHud,
  #game #turnHud{
    min-height:
      clamp(
        23px,
        3.2dvh,
        28px
      )!important;

    padding:3px 7px!important;

    font-size:
      clamp(
        .57rem,
        1.35dvh,
        .68rem
      )!important;

    line-height:1!important;
  }


  /* ==========================================================
     HERO CARDS
     ========================================================== */

  #game .heroLabel{
    margin:0!important;

    padding:2px 7px!important;

    font-size:
      clamp(
        .50rem,
        1.15dvh,
        .60rem
      )!important;
  }

  #game #heroCards{
    display:flex!important;

    align-items:center!important;
    justify-content:center!important;

    gap:5px!important;

    width:100%!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;
  }

  #game #heroCards .miniCard{
    width:
      clamp(
        49px,
        7dvh,
        63px
      )!important;

    height:
      clamp(
        69px,
        9.8dvh,
        88px
      )!important;

    flex:0 0 auto!important;
  }


  /* ==========================================================
     TURN TIMER
     ========================================================== */

  #game .heroTurnTimer{
    width:
      min(
        280px,
        76vw
      )!important;

    max-width:280px!important;

    min-height:27px!important;

    margin:1px 0 0!important;

    padding:3px 6px 4px!important;
  }

  #game .heroTimerTrack{
    height:6px!important;
    min-height:6px!important;
  }


  /* ==========================================================
     SECONDARY HUD CONTENT
     Essential poker information wins.
     ========================================================== */

  #game #actionFeed{
    display:none!important;
  }

  #game #pokerCoinBalance{
    display:none!important;
  }

  #game .turnDockChips #chipWallet{
    grid-template-columns:
      repeat(4,minmax(0,1fr))!important;

    grid-auto-rows:42px!important;

    gap:4px!important;
  }

  #game .turnDockChips
  #chipWallet > .denominationChip{
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
  }


  /* ==========================================================
     TABLE TAB

     Full available interior becomes an internally scrolling sheet.
     ========================================================== */

  #game #socialPanel{
    display:none!important;
  }

  /*
    On Table tab the HUD/action measurements collapse to zero via
    ResizeObserver, allowing the 3D scene to recover the space.
  */


  /* ==========================================================
     MOBILE MENU
     ========================================================== */

  #game #mobileMenuBtn{
    position:fixed!important;

    z-index:10130!important;

    top:
      calc(
        6px +
        env(safe-area-inset-top,0)
      )!important;

    right:6px!important;

    min-width:70px!important;
    min-height:35px!important;
  }
}


/* ============================================================
   SHORT / LANDSCAPE MOBILE

   Same architecture. Only dimensions compress.
   ============================================================ */

@media (max-width:900px) and (max-height:500px){

  #game:not([hidden]){
    --mobile-v4-gap:3px;
  }

  body #landing .landingContent,
  body #joinArea:not([hidden]){
    padding:
      calc(
        6px +
        env(safe-area-inset-top,0)
      )
      7px
      calc(
        53px +
        env(safe-area-inset-bottom,0)
      )!important;

    gap:3px!important;
  }

  body #landing #quickConnectBtn,
  body #joinArea #joinBtn{
    left:7px!important;
    right:7px!important;

    bottom:6px!important;

    min-height:42px!important;
  }

  #game #tableStage{
    min-height:125px!important;
  }

  #game #mobileGameTabs{
    min-height:42px!important;

    padding:
      3px
      5px
      calc(
        3px +
        env(safe-area-inset-bottom,0)
      )!important;
  }

  #game #mobileGameTabs button{
    font-size:.60rem!important;
  }

  #game #playerHud{
    max-height:42dvh!important;
  }

  #game #boardHudCards .miniCard{
    width:
      clamp(
        34px,
        9.2dvh,
        43px
      )!important;

    height:
      clamp(
        48px,
        12.9dvh,
        60px
      )!important;
  }

  #game #heroCards .miniCard{
    width:
      clamp(
        43px,
        11.8dvh,
        53px
      )!important;

    height:
      clamp(
        60px,
        16.4dvh,
        74px
      )!important;
  }

  #game #potHud,
  #game #turnHud{
    min-height:20px!important;

    padding:2px 5px!important;

    font-size:.52rem!important;
  }

  #game #turnActionDock
  #controls button[data-action]{
    height:34px!important;
    min-height:34px!important;

    font-size:.56rem!important;
  }

  #game #turnActionDock
  #controls .raiseBox{
    grid-template-columns:
      62px
      minmax(0,1fr)
      62px!important;
  }

  #game #turnActionDock #raiseAmount,
  #game #turnActionDock #clearBetChipsBtn{
    width:62px!important;

    height:30px!important;
    min-height:30px!important;
  }
}


/* ============================================================
   POKER3D_MOBILE_VIEWPORT_CUTOFF_FIX_V1

   The Play / Chips / Table mobile tabs were intentionally
   removed. The old empty navigation anchor must occupy zero
   screen space.

   This final phone-only override also prevents the gameplay HUD
   from being vertically clipped and restores readable board
   cards after older compact-layout rules.
   ============================================================ */

@media (max-width:700px),
       (max-width:900px) and (max-height:500px){

  /* ----------------------------------------------------------
     DEAD BOTTOM NAVIGATION

     Keep the DOM anchor for existing viewport measurement code,
     but it must consume zero pixels.
     ---------------------------------------------------------- */

  #game #mobileGameTabs{
    display:none!important;

    width:0!important;
    height:0!important;

    min-width:0!important;
    min-height:0!important;

    max-width:0!important;
    max-height:0!important;

    margin:0!important;
    padding:0!important;

    border:0!important;

    overflow:hidden!important;
  }

  #game{
    --mobile-nav-height:0px!important;
    --mobile-nav-live-h:0px!important;
  }


  /* ----------------------------------------------------------
     PLAYER HUD

     Do not crop YOUR CARDS / community cards against an old
     mobile-height ceiling.

     When the action dock appears, measured action height keeps
     this HUD directly above it.
     ---------------------------------------------------------- */

  #game #playerHud{
    bottom:
      calc(
        var(--mobile-action-live-h,0px) +
        8px +
        env(safe-area-inset-bottom,0px)
      )!important;

    max-height:none!important;

    overflow:visible!important;
  }

  #game:not(.turnControlsVisible) #playerHud{
    bottom:
      calc(
        8px +
        env(safe-area-inset-bottom,0px)
      )!important;
  }

  #game #bottomInfoDock,
  #game #boardHud,
  #game #boardHudCards,
  #game #heroCards{
    overflow:visible!important;
  }


  /* ----------------------------------------------------------
     READABLE COMMUNITY CARDS

     This is deliberately placed after every older mobile
     compaction rule so those rules cannot shrink the board back
     to ~30-40px cards.
     ---------------------------------------------------------- */

  #game #boardHudCards{
    gap:5px!important;
  }

  #game #boardHudCards .miniCard{
    width:
      clamp(
        54px,
        14.5vw,
        60px
      )!important;

    height:
      clamp(
        76px,
        20.5vw,
        84px
      )!important;

    font-size:
      clamp(
        1.10rem,
        4.7vw,
        1.35rem
      )!important;

    font-weight:900!important;

    border-width:2px!important;
    border-radius:7px!important;
  }


  /* ----------------------------------------------------------
     YOUR CARDS

     Keep the player's private cards large and fully visible.
     ---------------------------------------------------------- */

  #game #heroCards{
    gap:6px!important;
  }

  #game #heroCards .miniCard{
    width:
      clamp(
        58px,
        15.5vw,
        66px
      )!important;

    height:
      clamp(
        82px,
        22vw,
        92px
      )!important;

    font-size:1.15rem!important;

    border-width:2px!important;
  }


  /* ----------------------------------------------------------
     TURN ACTION DOCK

     It now owns the real bottom edge because the obsolete nav
     no longer exists.

     Buttons remain comfortably finger-sized.
     ---------------------------------------------------------- */

  #game #turnActionDock:not([hidden]){
    bottom:
      calc(
        6px +
        env(safe-area-inset-bottom,0px)
      )!important;

    max-height:40dvh!important;
  }

  #game #turnActionDock #controls{
    gap:5px!important;
  }

  #game #turnActionDock
  #controls button[data-action]{
    height:44px!important;
    min-height:44px!important;

    padding:5px 3px!important;

    font-size:.72rem!important;
    font-weight:950!important;
  }

  #game #turnActionDock
  #controls .raiseBox{
    gap:5px!important;
  }

  #game #turnActionDock #raiseAmount,
  #game #turnActionDock #clearBetChipsBtn{
    height:36px!important;
    min-height:36px!important;
  }
}


/* Short landscape phones still need readable cards, but conserve
   additional vertical space. */

@media (max-width:900px)
       and (max-height:500px)
       and (orientation:landscape){

  #game #boardHudCards .miniCard{
    width:50px!important;
    height:70px!important;
    font-size:1.05rem!important;
  }

  #game #heroCards .miniCard{
    width:52px!important;
    height:74px!important;
  }

  #game #turnActionDock
  #controls button[data-action]{
    height:40px!important;
    min-height:40px!important;
    font-size:.66rem!important;
  }
}

/* ============================================================
POKER3D_MOBILE_READABILITY_BOOST_V1

Goal:
- Make the phone GUI easier to read.
- Increase the size of the most important gameplay text.
- Keep changes mobile-only.
- Do not disturb desktop layout.
============================================================ */

@media (max-width:700px),
       (max-width:900px) and (max-height:500px){

  /* ----------------------------------------------------------
     GLOBAL MOBILE TYPE / TOUCH TARGETS
     ---------------------------------------------------------- */

  #game{
    font-size:16px!important;
  }

  #game button{
    letter-spacing:.02em!important;
  }

  /* ----------------------------------------------------------
     TOP-LEFT STACK / TABLE / CALL STATUS
     ---------------------------------------------------------- */

  #game #betPanel .betSummary{
    gap:8px!important;
    padding:10px 12px!important;
    font-size:.88rem!important;
    line-height:1.2!important;
  }

  #game #betPanel .betSummary span,
  #game #betPanel .betSummary b{
    font-size:.88rem!important;
  }

  /* ----------------------------------------------------------
     TOP BUTTONS / MENU / HISTORY / CHAT
     ---------------------------------------------------------- */

  #game #menuBtn,
  #game #handHistoryBtn,
  #game #chatToggleBtn,
  #game #socialPanel button,
  #game #socialPanel .tabButton,
  #game .tableChipToggle,
  #game .socialToggle,
  #game .shopToggle,
  #game .gameToggle,
  #game .playersToggle{
    min-height:42px!important;
    padding:8px 12px!important;
    font-size:.84rem!important;
    font-weight:900!important;
    border-radius:14px!important;
  }

  #game #chatToggleBtn,
  #game .chatToggle,
  #game .chatBtn{
    min-width:84px!important;
    font-size:.92rem!important;
  }

  /* Fallback for the small top-center nav cluster visible in screenshots */
  #game .floatingTabBar button,
  #game .tableTools button,
  #game .topPillRow button,
  #game .hudPillButton{
    min-height:40px!important;
    padding:7px 10px!important;
    font-size:.80rem!important;
    font-weight:850!important;
  }

  /* ----------------------------------------------------------
     POT / TURN / LABEL TEXT
     ---------------------------------------------------------- */

  #game #potHud,
  #game #turnHud{
    min-height:26px!important;
    padding:4px 9px!important;
    font-size:.78rem!important;
    line-height:1.15!important;
    font-weight:900!important;
  }

  #game .heroLabel,
  #game .boardHudLabel,
  #game .winnerHudLabel{
    font-size:.72rem!important;
    line-height:1!important;
    padding:4px 10px!important;
    letter-spacing:.10em!important;
  }

  #game #winnerHud,
  #game #winnerHudHands{
    font-size:.82rem!important;
  }

  /* ----------------------------------------------------------
     COMMUNITY CARDS / HERO CARDS
     ---------------------------------------------------------- */

  #game #boardHudCards{
    gap:7px!important;
  }

  #game #boardHudCards .miniCard{
    width:clamp(58px,15.5vw,66px)!important;
    height:clamp(82px,22vw,92px)!important;
    font-size:clamp(1.18rem,5vw,1.42rem)!important;
    font-weight:900!important;
    border-width:2px!important;
    border-radius:8px!important;
  }

  #game #heroCards{
    gap:8px!important;
  }

  #game #heroCards .miniCard{
    width:clamp(64px,17vw,74px)!important;
    height:clamp(90px,24vw,104px)!important;
    font-size:1.22rem!important;
    font-weight:900!important;
    border-width:2px!important;
    border-radius:8px!important;
  }

  /* ----------------------------------------------------------
     TURN TIMER
     ---------------------------------------------------------- */

  #game .heroTurnTimer{
    width:min(320px,88vw)!important;
    padding:8px 10px 9px!important;
  }

  #game .heroTurnTimer .heroTimerText{
    font-size:.88rem!important;
    font-weight:900!important;
    line-height:1.1!important;
  }

  #game .heroTurnTimer .heroTimerTrack{
    height:10px!important;
    min-height:10px!important;
  }

  /* ----------------------------------------------------------
     PRIMARY ACTION DOCK
     ---------------------------------------------------------- */

  #game #turnActionDock .turnDockPanel{
    padding:8px!important;
  }

  #game #turnActionDock #controls{
    gap:6px!important;
  }

  #game #turnActionDock #controls button[data-action]{
    height:48px!important;
    min-height:48px!important;
    padding:6px 4px!important;
    font-size:.84rem!important;
    font-weight:950!important;
    border-radius:10px!important;
  }

  #game #turnActionDock #raiseAmount,
  #game #turnActionDock #clearBetChipsBtn{
    height:40px!important;
    min-height:40px!important;
    font-size:.82rem!important;
  }

  #game #turnActionDock #raiseSlider{
    min-height:34px!important;
  }

  #game #turnActionDock #status{
    min-height:18px!important;
    margin-top:6px!important;
    font-size:.74rem!important;
    line-height:1.15!important;
    font-weight:800!important;
  }

  /* ----------------------------------------------------------
     CHIP GRID / SECONDARY HUD
     ---------------------------------------------------------- */

  #game .turnDockChips .controlLabel,
  #game .playerChipCountSection .controlLabel{
    font-size:.68rem!important;
    line-height:1.1!important;
  }

  #game .turnDockChips #chipWallet{
    grid-auto-rows:46px!important;
    gap:5px!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip{
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    font-size:.68rem!important;
    padding-left:34px!important;
  }

  #game .turnDockChips #chipWallet > .denominationChip::before{
    width:24px!important;
    height:24px!important;
    font-size:.54rem!important;
  }

  #game .turnDockChips #betBreakdown{
    font-size:.66rem!important;
    line-height:1.15!important;
  }

  /* ----------------------------------------------------------
     KEEP HUD BREATHABLE
     ---------------------------------------------------------- */

  #game #playerHud{
    left:6px!important;
    right:6px!important;
  }

  #game #bottomInfoDock{
    row-gap:6px!important;
  }
}

/* ------------------------------------------------------------
   EXTRA COMPACTION FOR SHORT LANDSCAPE PHONES
   Still larger than before, but conservative vertically.
------------------------------------------------------------ */

@media (max-width:900px) and (max-height:500px) and (orientation:landscape){

  #game #boardHudCards .miniCard{
    width:52px!important;
    height:74px!important;
    font-size:1.08rem!important;
  }

  #game #heroCards .miniCard{
    width:56px!important;
    height:80px!important;
    font-size:1.10rem!important;
  }

  #game #turnActionDock #controls button[data-action]{
    height:42px!important;
    min-height:42px!important;
    font-size:.74rem!important;
  }

  #game #potHud,
  #game #turnHud{
    font-size:.70rem!important;
  }
}
/* POKER3D_MOBILE_CUSTOMIZE_STREAMLINE_V2_START
   Mobile-only pre-seat cleanup.
   Flow: name -> preview -> color -> Take My Seat.
   Desktop intentionally untouched.
*/
@media (max-width:700px){

  /* -------- overall pre-seat density -------- */

  body #joinArea:not([hidden]){
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    padding-left:10px!important;
    padding-right:10px!important;
    padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))!important;
    overflow-x:hidden!important;
  }

  body #joinArea .joinWelcome{
    margin:0 0 5px!important;
  }

  body #joinArea .joinWelcome h2{
    margin:1px 0 2px!important;
    font-size:1.02rem!important;
    line-height:1.1!important;
  }

  body #joinArea .joinWelcome p{
    margin:0!important;
    max-width:none!important;
    font-size:.72rem!important;
    line-height:1.25!important;
  }

  body #joinArea .roomline{
    margin-top:7px!important;
    margin-bottom:0!important;
    font-size:.72rem!important;
    line-height:1.1!important;
  }

  body #joinArea .roomline b{
    font-size:.92rem!important;
    letter-spacing:.025em!important;
  }

  body #joinArea .joinPrivacyStatus{
    margin:2px 0 7px!important;
    font-size:.66rem!important;
    line-height:1.1!important;
  }

  /* -------- name first -------- */

  body #joinArea > #nameInput{
    box-sizing:border-box!important;
    min-height:44px!important;
    height:44px!important;
    margin:0 0 8px!important;
    padding:8px 12px!important;
    border-radius:12px!important;
    font-size:.92rem!important;
  }

  /* -------- compact avatar preview -------- */

  body #joinArea .characterPreviewCard{
    width:100%!important;
    margin:0 0 8px!important;
    padding:8px!important;
    border-radius:14px!important;
  }

  body #joinArea .characterPreviewHeading{
    min-height:0!important;
    padding:0 3px 6px!important;
    gap:8px!important;
  }

  body #joinArea .characterPreviewHeading small{
    font-size:.58rem!important;
    letter-spacing:.13em!important;
  }

  body #joinArea .characterPreviewHeading b{
    margin-top:0!important;
    font-size:.88rem!important;
    line-height:1.05!important;
  }

  body #joinArea .characterPreviewHeading > span{
    font-size:.60rem!important;
    white-space:nowrap!important;
  }

  body #joinArea .characterPreviewHeading > span::before{
    font-size:.78rem!important;
  }

  body #joinArea .characterPreviewStage{
    height:170px!important;
    min-height:170px!important;
    max-height:170px!important;
    border-radius:11px!important;
  }

  body #joinArea .characterPreviewStage::after{
    bottom:7px!important;
    height:18px!important;
  }

  body #joinArea .characterPreviewLoading{
    bottom:8px!important;
    padding:4px 8px!important;
    font-size:.62rem!important;
  }

  /* -------- dense color studio -------- */

  body #joinArea .avatarCustomizer{
    box-sizing:border-box!important;
    width:100%!important;
    margin:0 0 7px!important;
    padding:8px 9px!important;
    gap:6px!important;
    border-radius:12px!important;
  }

  body #joinArea .avatarColorTopline{
    gap:7px!important;
  }

  body #joinArea .avatarColorTopline > span{
    font-size:.63rem!important;
    letter-spacing:.055em!important;
  }

  body #joinArea #avatarColorHex{
    padding:3px 6px!important;
    font-size:.60rem!important;
  }

  body #joinArea .avatarColorSwatches{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:5px!important;
  }

  body #joinArea .avatarColorSwatches button{
    min-height:30px!important;
    height:30px!important;
    border-radius:7px!important;
  }

  body #joinArea .avatarColorSwatches button.selected::after{
    right:2px!important;
    bottom:2px!important;
    width:12px!important;
    height:12px!important;
    font-size:.48rem!important;
  }

  body #joinArea .avatarColorMixer{
    gap:4px!important;
    padding:6px 8px!important;
    border-radius:9px!important;
  }

  body #joinArea .avatarColorMixer label{
    grid-template-columns:66px minmax(0,1fr)!important;
    gap:7px!important;
    min-height:22px!important;
    font-size:.56rem!important;
    line-height:1!important;
  }

  body #joinArea .avatarColorMixer input[type="range"]{
    height:6px!important;
    min-height:6px!important;
  }

  body #joinArea .avatarColorMixer input[type="range"]::-webkit-slider-thumb{
    width:15px!important;
    height:15px!important;
  }

  body #joinArea .avatarColorMixer input[type="range"]::-moz-range-thumb{
    width:13px!important;
    height:13px!important;
  }

  /* -------- permanent primary action -------- */

  body #joinArea:not([hidden]) #joinBtn{
    left:10px!important;
    right:10px!important;
    bottom:calc(8px + env(safe-area-inset-bottom,0px))!important;
    min-height:52px!important;
    border-radius:12px!important;
  }

  /* Dev launcher must never cover pre-seat controls on phones. */
  body:has(#joinArea:not([hidden])) #devConsoleLauncher{
    display:none!important;
  }
}

/* Extra tightening for 390px-class and narrower phones. */
@media (max-width:420px){

  body #joinArea:not([hidden]){
    padding-left:9px!important;
    padding-right:9px!important;
  }

  body #joinArea .characterPreviewStage{
    height:164px!important;
    min-height:164px!important;
    max-height:164px!important;
  }

  body #joinArea .avatarColorSwatches{
    gap:4px!important;
  }

  body #joinArea .avatarColorSwatches button{
    height:29px!important;
    min-height:29px!important;
  }

  body #joinArea .avatarColorMixer{
    padding:5px 7px!important;
  }
}
/* POKER3D_MOBILE_CUSTOMIZE_STREAMLINE_V2_END */

/* ============================================================
   POKER3D_PUBLIC_HUD_POLISH_V1
   Public gameplay should look like a game, not a dev toolbar.
   ============================================================ */

#game .gameHeader{
  position:fixed !important;
  top:10px !important;
  left:10px !important;
  right:auto !important;
  width:auto !important;
  max-width:min(520px,calc(100vw - 92px)) !important;
  min-height:46px !important;
  height:auto !important;
  max-height:none !important;
  padding:8px 14px !important;
  margin:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  overflow:visible !important;
  border:1px solid rgba(255,255,255,.10) !important;
  border-radius:14px !important;
  background:rgba(7,12,17,.74) !important;
  backdrop-filter:blur(14px) !important;
  box-shadow:0 8px 30px rgba(0,0,0,.28) !important;
  z-index:16020 !important;
}

#game .gameHeader .titleBlock{
  min-width:0 !important;
  display:flex !important;
  flex-direction:row !important;
  align-items:baseline !important;
  gap:10px !important;
  padding:0 !important;
  margin:0 !important;
}

#game .gameHeader .titleBlock>b{
  font-size:1rem !important;
  line-height:1 !important;
  letter-spacing:.02em !important;
  white-space:nowrap !important;
}

#game .gameHeader #phase{
  min-width:0 !important;
  max-width:300px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  opacity:.78 !important;
  font-size:.78rem !important;
  line-height:1.2 !important;
}

#game .cameraControls{
  display:none !important;
}

#game .legacyHiddenControls{
  display:none !important;
}

#game #mobileMenuBtn{
  display:flex !important;
  position:fixed !important;
  top:10px !important;
  right:10px !important;
  left:auto !important;
  width:auto !important;
  min-width:82px !important;
  min-height:46px !important;
  align-items:center !important;
  justify-content:center !important;
  padding:8px 13px !important;
  margin:0 !important;
  border-radius:14px !important;
  border:1px solid rgba(255,255,255,.12) !important;
  background:rgba(7,12,17,.82) !important;
  backdrop-filter:blur(14px) !important;
  box-shadow:0 8px 30px rgba(0,0,0,.28) !important;
  font-size:.78rem !important;
  font-weight:800 !important;
  letter-spacing:.03em !important;
  z-index:16040 !important;
}

#game .playerMenuControls{
  display:none !important;
}

#game.mobile-menu-open .playerMenuControls{
  position:fixed !important;
  top:66px !important;
  right:10px !important;
  left:auto !important;
  bottom:auto !important;
  width:min(310px,calc(100vw - 20px)) !important;
  max-width:none !important;
  max-height:calc(100vh - 78px) !important;
  overflow:auto !important;
  padding:10px !important;
  margin:0 !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:5px !important;
  border:1px solid rgba(255,255,255,.12) !important;
  border-radius:16px !important;
  background:rgba(9,14,20,.96) !important;
  backdrop-filter:blur(18px) !important;
  box-shadow:0 18px 50px rgba(0,0,0,.48) !important;
  z-index:16050 !important;
}

#game.mobile-menu-open .gameHeader{
  width:auto !important;
  height:auto !important;
  max-height:none !important;
  padding:8px 14px !important;
  background:rgba(7,12,17,.82) !important;
}

#game .playerMenuHeading{
  display:flex !important;
  align-items:baseline !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:5px 7px 9px !important;
  margin:0 0 2px !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
}

#game .playerMenuHeading strong{
  font-size:.9rem !important;
}

#game .playerMenuHeading small{
  opacity:.55 !important;
  font-size:.68rem !important;
}

#game .playerMenuItem{
  min-height:42px !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:10px !important;
  padding:5px 6px 5px 11px !important;
  border-radius:10px !important;
}

#game .playerMenuItem:hover{
  background:rgba(255,255,255,.04) !important;
}

#game .playerMenuItem>span{
  font-size:.79rem !important;
  font-weight:700 !important;
  opacity:.82 !important;
}

#game .playerMenuItem>button{
  width:auto !important;
  min-width:72px !important;
  min-height:32px !important;
  padding:5px 10px !important;
  margin:0 !important;
  border-radius:8px !important;
  font-size:.76rem !important;
  white-space:nowrap !important;
}

#game .playerMenuWeapon{
  display:none !important;
}

@media (pointer:coarse){
  #game .playerMenuWeapon{
    display:grid !important;
  }
}

#game #mobileMenuBackdrop{
  position:fixed !important;
  inset:0 !important;
  background:rgba(0,0,0,.38) !important;
  backdrop-filter:blur(2px) !important;
  opacity:0 !important;
  visibility:hidden !important;
  pointer-events:none !important;
  transition:opacity .14s ease !important;
  z-index:16010 !important;
}

#game.mobile-menu-open #mobileMenuBackdrop{
  opacity:1 !important;
  visibility:visible !important;
  pointer-events:auto !important;
}

/* The board overlay remains available automatically, but the old manual
   2D/camera-control presentation is no longer exposed to players. */

#game .orbitHint{
  display:none !important;
}

/* Keep player graphics settings simple. Internal advanced tuning remains
   available in code/DEV tooling without looking like a renderer console. */

#graphicsDialog .graphicsAdvanced{
  display:none !important;
}

/* Remove obsolete public-toolbar presentation regardless of older
   responsive rules elsewhere in the stylesheet. */

#game .gameHeader .controlLabel,
#game .gameHeader #zoomLabel,
#game .gameHeader #resetCameraBtn,
#game .gameHeader #orbitBtn,
#game .gameHeader #boardHudBtn,
#game .gameHeader #zoomOutBtn,
#game .gameHeader #zoomInBtn,
#game .gameHeader #resetZoomBtn,
#game .gameHeader #testSoundBtn{
  display:none !important;
}

@media (max-width:700px){
  #game .gameHeader{
    top:8px !important;
    left:8px !important;
    max-width:calc(100vw - 104px) !important;
    min-height:42px !important;
    padding:7px 10px !important;
    border-radius:12px !important;
  }

  #game #mobileMenuBtn{
    top:8px !important;
    right:8px !important;
    min-height:42px !important;
    min-width:82px !important;
    border-radius:12px !important;
  }

  #game.mobile-menu-open .playerMenuControls{
    top:58px !important;
    right:8px !important;
    width:calc(100vw - 16px) !important;
    max-height:calc(100dvh - 68px) !important;
  }

  #game .gameHeader #phase{
    max-width:42vw !important;
  }
}
/* ============================================================
   POKER3D_MENU_CONSOLIDATION_V1
   One player menu replaces the old floating utility toolbar.
   ============================================================ */

#overlayUtilityButtons{
  display:none !important;
}

#game .playerMenuSectionLabel{
  margin:8px 6px 2px !important;
  padding:5px 5px 4px !important;
  border-bottom:1px solid rgba(255,255,255,.07) !important;
  color:rgba(174,205,194,.66) !important;
  font-size:.61rem !important;
  font-weight:900 !important;
  letter-spacing:.15em !important;
}

#game .playerMenuHeading + .playerMenuSectionLabel{
  margin-top:1px !important;
}

#game .playerMenuItem{
  transition:
    background .12s ease,
    transform .12s ease !important;
}

#game .playerMenuItem:has(button:not(:disabled)):hover{
  background:rgba(255,255,255,.055) !important;
}

#game .playerMenuItem>button{
  min-width:76px !important;
  border:1px solid rgba(255,255,255,.11) !important;
  background:rgba(255,255,255,.055) !important;
}

#game .playerMenuItem>button:hover:not(:disabled){
  background:rgba(255,255,255,.10) !important;
}

#game .playerMenuItem>button[aria-expanded="true"]{
  background:rgba(102,190,154,.18) !important;
  border-color:rgba(118,215,176,.38) !important;
}

#game.mobile-menu-open .playerMenuControls{
  width:min(330px,calc(100vw - 20px)) !important;
}

/* Management and social tools belong in their overlay panels,
   never as permanent blocks over the table. */

#socialPanel{
  pointer-events:none;
}

#socialPanel>*{
  pointer-events:auto;
}

#socialPanel:empty{
  display:none !important;
}

@media (max-width:700px){
  #game.mobile-menu-open .playerMenuControls{
    width:calc(100vw - 16px) !important;
  }

  #game .playerMenuItem{
    min-height:46px !important;
  }

  #game .playerMenuItem>button{
    min-height:36px !important;
  }
}
/* ============================================================
   POKER3D_GAMEPLAY_HUD_POLISH_V1
   Keep the actual poker decision surface primary.
   ============================================================ */

/* Recent actions are duplicated by Hand History and do not need to
   permanently consume the center of the gameplay HUD. */
#game #actionFeed{
  display:none !important;
}

/* Denomination-by-denomination chip construction is an advanced control.
   Normal users can bet with the amount field and slider. The DOM and
   automatic chip-selection engine remain intact. */
#game .chipBetBuilder{
  display:none !important;
}

/* Compact bankroll / current-bet / call information. */
#game #playerStatsOverlay{
  padding:5px 9px !important;
  border:1px solid rgba(255,255,255,.07) !important;
  border-radius:10px !important;
  background:rgba(7,12,17,.52) !important;
  box-shadow:none !important;
  backdrop-filter:blur(8px) !important;
  opacity:.84 !important;
}

#game #playerStatsOverlay .betSummary{
  gap:10px !important;
  margin:0 !important;
  font-size:.67rem !important;
  line-height:1.15 !important;
}

#game #playerStatsOverlay .betSummary span{
  white-space:nowrap !important;
}

/* Auto Call stays available but reads as an optional helper rather than
   another major gameplay subsystem. */
#game #autoCallDock{
  width:auto !important;
  min-width:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}

#game #autoCallDock .controlLabel{
  display:none !important;
}

#game #autoCallDock #autoCallBtn{
  min-width:0 !important;
  min-height:28px !important;
  padding:4px 8px !important;
  border-radius:8px !important;
  font-size:.66rem !important;
  font-weight:800 !important;
  opacity:.68 !important;
}

#game #autoCallDock #autoCallBtn[aria-pressed="true"]{
  opacity:1 !important;
}

/* PokerCoins remain visible, but they should not compete with the hand. */
#game #pokerCoinBalance{
  font-size:.64rem !important;
  opacity:.60 !important;
  padding:4px 7px !important;
  border-radius:8px !important;
}

#game #pokerCoinBalance:hover{
  opacity:.90 !important;
}

/* Empty status space is removed. Errors still become visible normally. */
#game #status:empty{
  display:none !important;
}

#game #status:not(:empty){
  min-height:0 !important;
  margin-top:4px !important;
  padding:5px 8px !important;
  border-radius:8px !important;
  background:rgba(8,13,18,.74) !important;
  font-size:.72rem !important;
}

/* ------------------------------------------------------------
   HAND HISTORY
   ------------------------------------------------------------ */

#persistentHandHistory[hidden]{
  display:none !important;
}

#persistentHandHistory.menu-open{
  display:flex !important;
  position:fixed !important;
  top:66px !important;
  right:10px !important;
  left:auto !important;
  bottom:auto !important;
  width:min(360px,calc(100vw - 20px)) !important;
  max-height:min(70vh,620px) !important;
  flex-direction:column !important;
  overflow:hidden !important;
  padding:0 !important;
  margin:0 !important;
  border:1px solid rgba(255,255,255,.12) !important;
  border-radius:16px !important;
  background:rgba(8,13,19,.96) !important;
  backdrop-filter:blur(18px) !important;
  box-shadow:0 18px 50px rgba(0,0,0,.48) !important;
  z-index:16055 !important;
}

#persistentHandHistory.menu-open #persistentHandHistoryHeader{
  flex:0 0 auto !important;
  min-height:44px !important;
  padding:10px 12px !important;
  cursor:pointer !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
}

#persistentHandHistory.menu-open #persistentHandHistoryHeader span{
  opacity:.55 !important;
}

#persistentHandHistory.menu-open #persistentHandHistoryBody{
  display:block !important;
  flex:1 1 auto !important;
  overflow:auto !important;
  max-height:none !important;
  padding:8px 10px 12px !important;
}

/* Old hand-history positioning rules must never win while closed. */
#persistentHandHistory:not(.menu-open){
  pointer-events:none !important;
}

/* Primary poker actions retain full prominence. */
#game #controls button[data-action]{
  font-weight:850 !important;
}

#game #controls button[data-action].legalAction:not(:disabled){
  opacity:1 !important;
}

/* Remove another obsolete camera-era hint from every responsive layout. */
#game .orbitHint{
  display:none !important;
}

@media (max-width:700px),
       (max-width:900px) and (max-height:500px){

  #persistentHandHistory.menu-open{
    top:58px !important;
    right:8px !important;
    left:8px !important;
    width:auto !important;
    max-height:calc(100dvh - 68px) !important;
    border-radius:14px !important;
  }

  #game #playerStatsOverlay .betSummary{
    gap:7px !important;
    font-size:.62rem !important;
  }

  #game #pokerCoinBalance{
    font-size:.60rem !important;
  }
}
/* ============================================================
   POKER3D_LANDING_UX_POLISH_V1
   Make joining a game the obvious path.
   ============================================================ */

/* Identity selection remains the first decision. */
#landing .landingIdentityActions{
  display:grid !important;
  grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) !important;
  gap:8px !important;
}

#landing .landingGuestPrimary{
  min-height:54px !important;
  font-size:1rem !important;
  font-weight:950 !important;
}

#landing .landingLoginChoice{
  min-height:54px !important;
  background:rgba(255,255,255,.035) !important;
  border-color:rgba(255,255,255,.11) !important;
  color:rgba(225,237,232,.78) !important;
}

/* Once identity is selected, Quick Join owns the visual hierarchy. */
#landing .landingTableActions{
  display:block !important;
  width:100% !important;
}

#landing #quickConnectBtn{
  display:block !important;
  width:100% !important;
  min-height:60px !important;
  margin:0 !important;
  border-radius:14px !important;
  font-size:1.08rem !important;
  font-weight:950 !important;
}

#landing .landingPlayHint{
  margin:8px 4px 5px !important;
  color:rgba(166,190,181,.66) !important;
  font-size:.69rem !important;
}

/* Secondary table-selection paths stay closed until explicitly requested. */
#landing #roomBrowser.landingMorePlayDeferred,
#landing #createTableBtn.landingMorePlayDeferred,
#landing #friendsEntryPanel.landingMorePlayDeferred{
  display:none !important;
}

body.landingMoreOpen #landing #roomBrowser.landingMorePlayDeferred{
  display:block !important;
}

body.landingMoreOpen #landing #createTableBtn.landingMorePlayDeferred{
  display:block !important;
}

body.landingMoreOpen #landing #friendsEntryPanel.landingMorePlayDeferred{
  display:grid !important;
}

/* Private-table setup takes over the secondary-options area cleanly. */
body.friendSetupOpen #landing #createTableBtn.landingMorePlayDeferred{
  display:block !important;
}

body.friendSetupOpen #landing #roomBrowser.landingMorePlayDeferred,
body.friendSetupOpen #landing #friendsEntryPanel.landingMorePlayDeferred{
  display:none !important;
}

/* More ways to play should read like disclosure, not another CTA. */
#landing #morePlayOptionsBtn{
  display:block !important;
  width:max-content !important;
  min-height:32px !important;
  margin:10px auto 0 !important;
  padding:5px 9px !important;
  border-color:transparent !important;
  background:transparent !important;
  box-shadow:none !important;
  color:rgba(177,199,191,.66) !important;
  font-size:.69rem !important;
  font-weight:800 !important;
}

#landing #morePlayOptionsBtn:hover,
body.landingMoreOpen #landing #morePlayOptionsBtn{
  border-color:rgba(113,190,165,.16) !important;
  background:rgba(255,255,255,.035) !important;
  color:#d3e4de !important;
}

/* Public Games is now a secondary browser rather than the landing focus. */
body.landingMoreOpen #landing #roomBrowser{
  margin-top:10px !important;
  border-color:rgba(255,255,255,.09) !important;
  background:rgba(4,11,9,.56) !important;
  box-shadow:none !important;
}

body.landingMoreOpen #landing #roomBrowser .roomBrowserHeading{
  min-height:36px !important;
  padding:7px 9px !important;
}

body.landingMoreOpen #landing #roomBrowser .roomBrowserHeading b{
  font-size:.74rem !important;
}

body.landingMoreOpen #landing #roomBrowser .roomBrowserHeading span{
  font-size:.62rem !important;
  opacity:.70 !important;
}

body.landingMoreOpen #landing #roomBrowserList{
  max-height:190px !important;
  padding:6px !important;
}

body.landingMoreOpen #landing .roomBrowserItem{
  min-height:0 !important;
  padding:8px 9px !important;
  border-radius:9px !important;
}

/* Private Table is important, but not equal to Quick Join. */
#landing #createTableBtn.landingMorePlayDeferred{
  min-height:48px !important;
  margin:8px 0 0 !important;
  padding:8px 12px 8px 42px !important;
  border-radius:10px !important;
  box-shadow:none !important;
  font-size:.78rem !important;
}

#landing #createTableBtn.landingMorePlayDeferred::before{
  left:12px !important;
  width:20px !important;
  height:20px !important;
  font-size:.82rem !important;
}

#landing #createTableBtn.landingMorePlayDeferred::after{
  font-size:.62rem !important;
}

/* Join code becomes one compact row inside More ways to play. */
#landing #friendsEntryPanel.landingMorePlayDeferred{
  grid-template-columns:auto minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:6px !important;
  margin-top:8px !important;
}

#landing #friendsEntryPanel.landingMorePlayDeferred > span{
  font-size:.62rem !important;
  opacity:.45 !important;
}

#landing #roomCodeInput{
  min-width:0 !important;
  min-height:38px !important;
}

#landing #joinCodeBtn{
  min-height:38px !important;
  white-space:nowrap !important;
  font-size:.72rem !important;
}

/* Logged-in identity is status, not another large panel. */
#landing .landingSessionBar{
  min-height:0 !important;
  margin:0 0 8px !important;
  padding:5px 7px !important;
  border-color:rgba(255,255,255,.06) !important;
  background:rgba(255,255,255,.02) !important;
  font-size:.67rem !important;
  opacity:.78 !important;
}

#landing #landingLogoutBtn{
  min-height:28px !important;
  padding:3px 7px !important;
  font-size:.64rem !important;
}

/* Settings is a quiet utility rather than a competing landing action. */
#landing #landingGraphicsBtn{
  display:block !important;
  width:max-content !important;
  min-height:28px !important;
  margin:12px 0 0 auto !important;
  padding:4px 8px !important;
  border-color:transparent !important;
  background:transparent !important;
  box-shadow:none !important;
  color:rgba(176,198,190,.58) !important;
  font-size:.65rem !important;
  font-weight:750 !important;
  opacity:.75 !important;
}

#landing #landingGraphicsBtn:hover{
  opacity:1 !important;
  color:#d3e5de !important;
  background:rgba(255,255,255,.035) !important;
}

/* Seat confirmation remains simple: seat first, optional customization second. */
#joinArea .joinOptionalControls{
  display:flex !important;
  justify-content:flex-end !important;
  gap:6px !important;
  margin:7px 0 0 !important;
}

#joinArea .joinOptionalControls button{
  min-height:30px !important;
  padding:4px 8px !important;
  border-color:rgba(255,255,255,.08) !important;
  background:rgba(255,255,255,.025) !important;
  color:rgba(205,221,215,.68) !important;
  font-size:.66rem !important;
}

#joinArea #joinBtn{
  min-height:58px !important;
  font-size:1rem !important;
  font-weight:950 !important;
}

@media (max-width:600px){

  #landing .landingIdentityActions{
    grid-template-columns:1fr !important;
  }

  #landing .landingGuestPrimary{
    min-height:56px !important;
  }

  #landing .landingLoginChoice{
    min-height:40px !important;
  }

  #landing #quickConnectBtn{
    min-height:58px !important;
  }

  body.landingMoreOpen #landing #roomBrowserList{
    max-height:165px !important;
  }

  #landing #friendsEntryPanel.landingMorePlayDeferred{
    grid-template-columns:1fr !important;
  }

  #landing #friendsEntryPanel.landingMorePlayDeferred > span{
    display:none !important;
  }

  #landing #joinCodeBtn,
  #landing #roomCodeInput{
    width:100% !important;
  }
}
/* ============================================================
   POKER3D_MENU_VIEWPORT_FIX_V1
   Keep the consolidated game menu inside the visible viewport.
   ============================================================ */

#game .playerMenuControls{
  box-sizing:border-box !important;

  max-height:
    calc(
      100dvh -
      env(safe-area-inset-top,0px) -
      env(safe-area-inset-bottom,0px) -
      20px
    ) !important;

  overflow-x:hidden !important;
  overflow-y:auto !important;

  overscroll-behavior:contain !important;
  scrollbar-width:thin;

  padding-bottom:
    max(
      10px,
      env(safe-area-inset-bottom,0px)
    ) !important;
}

#game .playerMenuControls::-webkit-scrollbar{
  width:7px;
}

#game .playerMenuControls::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:rgba(185,215,204,.28);
}

#game .playerMenuControls::-webkit-scrollbar-track{
  background:transparent;
}

/*
  When the collapsible menu is open, pin the panel inside the screen
  instead of allowing older header positioning rules to push it out.
*/
#game.mobile-menu-open .playerMenuControls{
  position:fixed !important;

  top:
    max(
      58px,
      calc(env(safe-area-inset-top,0px) + 58px)
    ) !important;

  right:
    max(
      8px,
      env(safe-area-inset-right,0px)
    ) !important;

  bottom:auto !important;
  left:auto !important;

  width:min(330px,calc(100vw - 16px)) !important;

  max-height:
    calc(
      100dvh -
      max(
        58px,
        calc(env(safe-area-inset-top,0px) + 58px)
      ) -
      env(safe-area-inset-bottom,0px) -
      8px
    ) !important;

  overflow-y:auto !important;

  z-index:17000 !important;
}

/* Keep section labels visible while scrolling through a long menu. */
#game.mobile-menu-open .playerMenuSectionLabel{
  position:sticky !important;
  top:0 !important;
  z-index:2 !important;

  background:rgba(8,13,19,.96) !important;
  backdrop-filter:blur(12px) !important;
}

/* Short displays and landscape phones need an even tighter panel. */
@media (max-height:650px){

  #game.mobile-menu-open .playerMenuControls{
    top:
      max(
        48px,
        calc(env(safe-area-inset-top,0px) + 48px)
      ) !important;

    max-height:
      calc(
        100dvh -
        max(
          48px,
          calc(env(safe-area-inset-top,0px) + 48px)
        ) -
        env(safe-area-inset-bottom,0px) -
        6px
      ) !important;
  }

  #game .playerMenuHeading{
    padding-top:6px !important;
    padding-bottom:6px !important;
  }

  #game .playerMenuItem{
    min-height:38px !important;
  }
}

@media (max-width:700px){

  #game.mobile-menu-open .playerMenuControls{
    right:8px !important;
    left:8px !important;
    width:auto !important;
  }
}
/* ============================================================
   POKER3D_MENU_VIEWPORT_FIX_V1_1
   Cancel legacy menu offsets/transforms and force the open menu
   completely inside the browser viewport.
   ============================================================ */

#game.mobile-menu-open #playerMenuPanel.playerMenuControls{
  position:fixed !important;

  top:
    max(
      58px,
      calc(env(safe-area-inset-top,0px) + 58px)
    ) !important;

  right:
    max(
      8px,
      env(safe-area-inset-right,0px)
    ) !important;

  left:auto !important;
  bottom:auto !important;

  width:min(280px,calc(100vw - 16px)) !important;
  min-width:0 !important;
  max-width:calc(100vw - 16px) !important;

  margin:0 !important;

  transform:none !important;
  translate:none !important;

  inset-inline-start:auto !important;
  inset-inline-end:
    max(
      8px,
      env(safe-area-inset-right,0px)
    ) !important;

  box-sizing:border-box !important;

  max-height:
    calc(
      100dvh -
      max(
        58px,
        calc(env(safe-area-inset-top,0px) + 58px)
      ) -
      env(safe-area-inset-bottom,0px) -
      8px
    ) !important;

  overflow-x:hidden !important;
  overflow-y:auto !important;

  visibility:visible !important;

  z-index:17000 !important;
}

/* Never allow individual menu rows to make the panel wider. */
#game.mobile-menu-open #playerMenuPanel .playerMenuItem{
  min-width:0 !important;
  max-width:100% !important;
  box-sizing:border-box !important;
}

#game.mobile-menu-open #playerMenuPanel .playerMenuItem > span{
  min-width:0 !important;
  overflow-wrap:anywhere !important;
}

#game.mobile-menu-open #playerMenuPanel .playerMenuItem > button{
  flex:0 0 auto !important;
  max-width:110px !important;
}

/* Short screens: move slightly closer to the top and retain scrolling. */
@media (max-height:650px){

  #game.mobile-menu-open #playerMenuPanel.playerMenuControls{
    top:
      max(
        48px,
        calc(env(safe-area-inset-top,0px) + 48px)
      ) !important;

    max-height:
      calc(
        100dvh -
        max(
          48px,
          calc(env(safe-area-inset-top,0px) + 48px)
        ) -
        env(safe-area-inset-bottom,0px) -
        6px
      ) !important;
  }
}

/* Phones get the same bounded panel; it remains narrow enough that the
   table is still visible behind it. */
@media (max-width:700px){

  #game.mobile-menu-open #playerMenuPanel.playerMenuControls{
    right:8px !important;
    left:auto !important;

    width:min(280px,calc(100vw - 16px)) !important;
    max-width:calc(100vw - 16px) !important;

    transform:none !important;
    translate:none !important;
  }
}
/* ============================================================
   POKER3D_MENU_CONTAINING_BLOCK_FIX_V1

   playerMenuPanel is a child of gameHeader.

   Transform/filter/backdrop-filter on gameHeader creates a
   containing block for fixed descendants, causing the menu's
   right/top coordinates to be measured against the small header
   instead of the browser viewport.

   Disable those containing-block properties only while the menu
   is open. The menu itself retains its blur and presentation.
   ============================================================ */

#game.mobile-menu-open > .gameHeader{
  transform:none !important;
  translate:none !important;

  filter:none !important;
  -webkit-filter:none !important;

  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;

  perspective:none !important;
  contain:none !important;
  will-change:auto !important;

  /*
    Header remains visually solid while its backdrop blur is
    temporarily disabled.
  */
  background:rgba(7,12,17,.97) !important;
}

/*
  Final authoritative viewport anchor.
  With gameHeader no longer establishing the fixed containing
  block, these coordinates are relative to the real viewport.
*/
#game.mobile-menu-open > .gameHeader > #playerMenuPanel.playerMenuControls{
  position:fixed !important;

  top:
    max(
      58px,
      calc(env(safe-area-inset-top,0px) + 58px)
    ) !important;

  right:
    max(
      8px,
      env(safe-area-inset-right,0px)
    ) !important;

  bottom:auto !important;
  left:auto !important;

  margin:0 !important;

  width:min(280px,calc(100vw - 16px)) !important;
  min-width:0 !important;
  max-width:calc(100vw - 16px) !important;

  transform:none !important;
  translate:none !important;

  max-height:
    calc(
      100dvh -
      max(
        58px,
        calc(env(safe-area-inset-top,0px) + 58px)
      ) -
      env(safe-area-inset-bottom,0px) -
      8px
    ) !important;

  overflow-x:hidden !important;
  overflow-y:auto !important;

  z-index:17000 !important;
}

@media (max-height:650px){

  #game.mobile-menu-open > .gameHeader > #playerMenuPanel.playerMenuControls{
    top:
      max(
        48px,
        calc(env(safe-area-inset-top,0px) + 48px)
      ) !important;

    max-height:
      calc(
        100dvh -
        max(
          48px,
          calc(env(safe-area-inset-top,0px) + 48px)
        ) -
        env(safe-area-inset-bottom,0px) -
        6px
      ) !important;
  }
}

@media (max-width:700px){

  #game.mobile-menu-open > .gameHeader > #playerMenuPanel.playerMenuControls{
    right:8px !important;
    left:auto !important;

    width:min(280px,calc(100vw - 16px)) !important;
    max-width:calc(100vw - 16px) !important;
  }
}
/* POKER3D_LANDING_SPACE_BACKGROUND_V1 */
#landingSpaceScene{
  position:fixed;
  inset:0;
  z-index:0;
  width:100%;
  height:100%;
  display:block;
  pointer-events:none;
  background:#020506;
}

#landingSpaceScene[hidden]{
  display:none;
}

/* POKER3D_LANDING_CANVAS_GAME_HANDOFF_V1
   The fixed landing canvas must never share the game's stacking context. */
body:has(#game:not([hidden])) #landingSpaceScene{
  display:none!important;
  visibility:hidden!important;
}

#landing{
  position:relative;
  z-index:1;
  isolation:isolate;
  background:rgba(6,10,10,.82);
  box-shadow:
    0 22px 80px rgba(0,0,0,.48),
    inset 0 0 55px rgba(55,210,160,.025);
}

#landing .landingContent{
  position:relative;
  z-index:2;
}

@media (max-width:700px),
       (max-width:900px) and (max-height:500px){
  #landing{
    background:transparent;
  }

  body #landing .landingContent{
    background:transparent!important;
    background-image:none!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }

  /* The full-screen seat customizer replaces the landing content; keep the
     shared space canvas visible rather than dimming it behind another panel. */
  body:has(#joinArea:not([hidden])) #landing .firstRunHero{
    display:none!important;
  }

  body #joinArea:not([hidden]){
    background:transparent!important;
  }

  /* Leave room for the fixed DEV tab on the right edge. */
  body #landing #landingGraphicsBtn{
    margin-right:34px!important;
  }

  /* Auto Call belongs with the player's action controls, never the header. */
  #game #betPanel #autoCallDock{
    position:static!important;
    display:flex!important;
    width:100%!important;
    margin:0 0 6px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }

  #game #betPanel #autoCallDock #autoCallBtn{
    width:100%!important;
    min-height:36px!important;
    opacity:.9!important;
  }

  /* POKER3D_MOBILE_LANDING_LAYOUT_RECOVERY_V1
     Some mobile browser chrome turns fixed children of the transformed landing
     surface into an in-flow overlay. Keep the call-to-action in normal flow. */
  body #landing #quickConnectBtn{
    position:static!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    width:100%!important;
    margin:7px 0 0!important;
    z-index:auto!important;
  }

  body #landing .landingPlayHint{
    position:static!important;
    margin:6px 3px 4px!important;
  }

  /* Settings is text-only on phones: its inherited decorative glyph was
     occupying the same small hit target. */
  body #landing #landingGraphicsBtn::before,
  body #landing #landingGraphicsBtn::after{
    display:none!important;
  }

  body #landing #landingGraphicsBtn{
    padding:5px 8px!important;
    margin-right:34px!important;
  }

  /* The joining card remains readable while the animated landing sky stays
     visible behind it. */
  #gameLoadingScreen{
    background:rgba(2,5,7,.42)!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }

  .poker3dLoadingCard{
    background:rgba(8,13,15,.84)!important;
  }
}

/* POKER3D_AUTO_CALL_BOTTOM_PLAYER_DOCK_V1
   Keep Auto Call clear of the title/stats cluster and beside the player's
   lower HUD. It is a direct game overlay, so legacy bet-panel positioning can
   no longer pull it underneath the top-left header. */
#game > #autoCallDock{
  position:fixed!important;
  top:auto!important;
  right:auto!important;
  bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
  left:12px!important;
  z-index:10070!important;
  display:flex!important;
  width:auto!important;
  margin:0!important;
  padding:3px!important;
  border:1px solid rgba(105,202,164,.34)!important;
  border-radius:10px!important;
  background:rgba(5,13,11,.9)!important;
  box-shadow:0 4px 18px rgba(0,0,0,.42)!important;
  backdrop-filter:blur(8px)!important;
}

#game.turnControlsVisible > #autoCallDock{
  bottom:clamp(170px,25vh,270px)!important;
}

@media(max-width:700px){
  #game > #autoCallDock{
    left:8px!important;
    bottom:calc(54px + env(safe-area-inset-bottom,0px))!important;
  }

  #game.turnControlsVisible > #autoCallDock{
    bottom:calc(31dvh + 10px + env(safe-area-inset-bottom,0px))!important;
  }
}

/* POKER3D_DIRECT_GAME_HUD_LAYOUT_V1
   Keep identity, fullscreen, and bankroll information out of the table view. */
#game > #fullscreenBtn.gameFullscreenBtn{
  display:flex!important;
  position:fixed!important;
  top:max(10px,env(safe-area-inset-top,0px))!important;
  left:max(10px,env(safe-area-inset-left,0px))!important;
  right:auto!important;
  width:46px!important;
  min-width:46px!important;
  height:46px!important;
  min-height:46px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  margin:0!important;
  border-radius:14px!important;
  border:1px solid rgba(255,255,255,.12)!important;
  background:rgba(7,12,17,.82)!important;
  backdrop-filter:blur(14px)!important;
  box-shadow:0 8px 30px rgba(0,0,0,.28)!important;
  font-size:1rem!important;
  z-index:16040!important;
}

#game > #gameplayFirstPersonBtn.gameCameraBtn{
  display:flex!important;
  position:fixed!important;
  top:max(10px,env(safe-area-inset-top,0px))!important;
  left:66px!important;
  width:46px!important;
  min-width:46px!important;
  height:46px!important;
  min-height:46px!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  margin:0!important;
  border-radius:14px!important;
  border:1px solid rgba(255,255,255,.12)!important;
  background:rgba(7,12,17,.82)!important;
  color:#eef8f4!important;
  backdrop-filter:blur(14px)!important;
  box-shadow:0 8px 30px rgba(0,0,0,.28)!important;
  font-size:1rem!important;
  z-index:16040!important;
}

#game > #gameplayFirstPersonBtn.gameCameraBtn.active{
  color:#ffe06b!important;
  border-color:rgba(255,224,107,.8)!important;
  box-shadow:0 0 0 2px rgba(64,226,181,.18),0 8px 30px rgba(0,0,0,.28)!important;
}

#game > .gameHeader{
  left:auto!important;
  right:104px!important;
  max-width:calc(100vw - 178px)!important;
}

#game #bottomInfoDock > #playerStatsOverlay{
  position:static!important;
  inset:auto!important;
  align-self:center!important;
  width:auto!important;
  max-width:100%!important;
  margin:4px auto!important;
  padding:0!important;
  z-index:auto!important;
  pointer-events:none!important;
}

#game #bottomInfoDock > #playerStatsOverlay .betSummary{
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:5px 10px!important;
  padding:5px 9px!important;
  font-size:.67rem!important;
}

@media(max-width:700px){
  #game > #fullscreenBtn.gameFullscreenBtn{
    top:max(8px,env(safe-area-inset-top,0px))!important;
    left:max(8px,env(safe-area-inset-left,0px))!important;
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    border-radius:12px!important;
  }

  #game > #gameplayFirstPersonBtn.gameCameraBtn{
    top:max(8px,env(safe-area-inset-top,0px))!important;
    left:58px!important;
    width:42px!important;
    min-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    border-radius:12px!important;
  }

  #game > .gameHeader{
    left:auto!important;
    right:98px!important;
    max-width:calc(100vw - 158px)!important;
  }

  #game #bottomInfoDock > #playerStatsOverlay{
    margin:3px auto!important;
  }

  #game #bottomInfoDock > #playerStatsOverlay .betSummary{
    gap:4px 8px!important;
    padding:4px 7px!important;
    font-size:.61rem!important;
  }
}


/* ==========================================================
   POKER3D_PERFORMANCE_V10_RETRO_GUI_ULTRALIGHT
   Flat Raspberry Pi HUD for maximum practical frame rate.
   ========================================================== */

html[data-graphics="retro"] #hudTop > *,
html[data-graphics="retro"] #playerHud,
html[data-graphics="retro"] #playerHud .heroLabel,
html[data-graphics="retro"] #playerHud .miniCard,
html[data-graphics="retro"] #boardHud,
html[data-graphics="retro"] #boardHud .miniCard,
html[data-graphics="retro"] .heroTurnTimer,
html[data-graphics="retro"] .lastHandBanner,
html[data-graphics="retro"] .winnerHandCards .miniCard,
html[data-graphics="retro"] .actionFeedItem,
html[data-graphics="retro"] #status {
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  filter:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
  animation:none !important;
  transition:none !important;
  will-change:auto !important;
}

html[data-graphics="retro"] #tableStage::before,
html[data-graphics="retro"] #tableStage::after {
  display:none !important;
  content:none !important;
}

html[data-graphics="retro"] button:hover {
  filter:none !important;
  transform:none !important;
}

html[data-graphics="retro"] #playerHud.yourTurn .miniCard {
  border-color:#d9b847 !important;
  box-shadow:none !important;
  animation:none !important;
  transform:none !important;
}

html[data-graphics="retro"] #playerHud.timerUrgent .miniCard {
  border-color:#c84b4b !important;
  box-shadow:none !important;
  animation:none !important;
  transform:none !important;
}

html[data-graphics="retro"] .retroTextMiniCard {
  display:grid;
  place-items:center;
  background:#eee8d6 !important;
  color:#111 !important;
  font-family:monospace;
  font-weight:900;
  line-height:1;
  letter-spacing:-.08em;
  border-radius:2px !important;
  border-width:2px !important;
  image-rendering:pixelated;
}

html[data-graphics="retro"] .retroTextMiniCard.red {
  color:#b62020 !important;
}

html[data-graphics="retro"] .retroTextMiniCard.back {
  color:transparent !important;
  background:#16222c !important;
}

html[data-graphics="retro"] .heroTimerFill {
  background:#b79b42 !important;
}



/* ==========================================================
   POKER3D_PERFORMANCE_V10_1_PI_MAXFPS_UI
   Pi/Retro: maximum practical FPS.
   ========================================================== */

html[data-graphics="retro"] #game,
html[data-graphics="retro"] #game * {
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  filter:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
  animation:none !important;
  transition:none !important;
  will-change:auto !important;
}

/* Giant readable cards without container-query calculations. */

html[data-graphics="retro"] .retroTextMiniCard {
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0 !important;
  overflow:hidden;
  padding:0 !important;
  background:#f0ead8 !important;
  border-radius:2px !important;
  letter-spacing:0 !important;
}

html[data-graphics="retro"] .retroTextMiniCard .retroCardRank {
  display:block;
  margin:0;
  padding:0;
  font-family:monospace;
  font-size:38px;
  font-weight:1000;
  line-height:.72;
}

html[data-graphics="retro"] .retroTextMiniCard .retroCardRankTen {
  font-size:29px;
  letter-spacing:-4px;
}

html[data-graphics="retro"] .retroTextMiniCard .retroCardSuit {
  display:block;
  margin:-1px 0 0;
  padding:0;
  font-family:serif;
  font-size:34px;
  font-weight:1000;
  line-height:.72;
}

html[data-graphics="retro"] .retroTextMiniCard.back {
  background:#111c24 !important;
}

/* Turn dock / controls: flat solid-color pixels only. */

html[data-graphics="retro"] #turnActionDock,
html[data-graphics="retro"] #betPanel,
html[data-graphics="retro"] #autoCallDock,
html[data-graphics="retro"] #controls,
html[data-graphics="retro"] .raiseBox,
html[data-graphics="retro"] .chipBetBuilder,
html[data-graphics="retro"] .playerChipCountSection,
html[data-graphics="retro"] .chipWallet,
html[data-graphics="retro"] .betBreakdownBox,
html[data-graphics="retro"] .betSummary {
  background-image:none !important;
  border-radius:0 !important;
  filter:none !important;
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}

html[data-graphics="retro"] #turnActionDock {
  background:#080d0c !important;
  border:1px solid #293a34 !important;
}

html[data-graphics="retro"] #controls button,
html[data-graphics="retro"] #autoCallBtn,
html[data-graphics="retro"] #raiseAmount {
  background:#111a17 !important;
  background-image:none !important;
  border:1px solid #3d5149 !important;
  border-radius:2px !important;
  color:#eef5f2 !important;
  outline:none !important;
}

html[data-graphics="retro"] #controls button[data-action].legalAction:not(:disabled) {
  background:#17452f !important;
  border-color:#4b8a6e !important;
}

html[data-graphics="retro"] #controls button[data-action="fold"].legalAction:not(:disabled) {
  background:#512424 !important;
  border-color:#8e4848 !important;
}

html[data-graphics="retro"] #controls button[data-action="allin"].legalAction:not(:disabled) {
  background:#594517 !important;
  border-color:#9a7a32 !important;
}

html[data-graphics="retro"] #controls button:disabled,
html[data-graphics="retro"] #raiseAmount:disabled {
  background:#0b0e0d !important;
  border-color:#252d2a !important;
  color:#626c68 !important;
  opacity:.58 !important;
}

html[data-graphics="retro"] #raiseSlider {
  filter:none !important;
  box-shadow:none !important;
  accent-color:#6f9d87;
}

html[data-graphics="retro"] .heroTimerFill {
  background:#b29945 !important;
  background-image:none !important;
}

html[data-graphics="retro"] .denominationChip,
html[data-graphics="retro"] .playerChipCount {
  box-shadow:none !important;
  filter:none !important;
  background-image:none !important;
  border-radius:2px !important;
}

html[data-graphics="retro"] #game button:hover,
html[data-graphics="retro"] #game button:active,
html[data-graphics="retro"] #game button:focus {
  filter:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
  transform:none !important;
}


/* POKER3D_PERFORMANCE_V12_PI_FLAT_GUI
   Final Retro/Pi override: cheapest practical browser GUI. */

html[data-graphics="retro"] *,
html[data-graphics="retro"] *::before,
html[data-graphics="retro"] *::after{
  animation:none!important;
  transition:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  filter:none!important;
  box-shadow:none!important;
  text-shadow:none!important;
  will-change:auto!important;
}

html[data-graphics="retro"] #game,
html[data-graphics="retro"] #landing{
  background:#050708!important;
  background-image:none!important;
}

html[data-graphics="retro"] #game *,
html[data-graphics="retro"] #game *::before,
html[data-graphics="retro"] #game *::after,
html[data-graphics="retro"] #landing *,
html[data-graphics="retro"] #landing *::before,
html[data-graphics="retro"] #landing *::after{
  background-image:none!important;
}

html[data-graphics="retro"] button,
html[data-graphics="retro"] input,
html[data-graphics="retro"] select,
html[data-graphics="retro"] textarea,
html[data-graphics="retro"] dialog,
html[data-graphics="retro"] .panel,
html[data-graphics="retro"] .hudPanel,
html[data-graphics="retro"] .gameHeader,
html[data-graphics="retro"] #turnControls,
html[data-graphics="retro"] #playerHud,
html[data-graphics="retro"] #mobileGameTabs,
html[data-graphics="retro"] #turnActionDock{
  background:#0a0d0f!important;
  background-image:none!important;
  border-radius:2px!important;
  box-shadow:none!important;
}

html[data-graphics="retro"] canvas,
html[data-graphics="retro"] #scene{
  image-rendering:pixelated!important;
  image-rendering:crisp-edges;
  filter:none!important;
}

html[data-graphics="retro"] #spacePistolAimReticle{
  width:18px!important;
  height:18px!important;
  border:1px solid #d8ffff!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
  filter:none!important;
}

html[data-graphics="retro"] #spacePistolAimReticle::before,
html[data-graphics="retro"] #spacePistolAimReticle::after{
  content:""!important;
  position:absolute!important;
  display:block!important;
  background:#d8ffff!important;
  box-shadow:none!important;
  filter:none!important;
}

html[data-graphics="retro"] #spacePistolAimReticle::before{
  width:8px!important;
  height:1px!important;
  left:4px!important;
  top:8px!important;
}

html[data-graphics="retro"] #spacePistolAimReticle::after{
  width:1px!important;
  height:8px!important;
  left:8px!important;
  top:4px!important;
}



/* ==========================================================
   POKER3D_PERFORMANCE_V12_1_PI_TRANSPARENT_GUI
   Remove giant opaque Retro GUI slabs while keeping the
   cheap / fast Pi-friendly controls themselves visible.
   ========================================================== */

html[data-graphics="retro"] #playerHud,
html[data-graphics="retro"] #boardHud,
html[data-graphics="retro"] #actionFeed,
html[data-graphics="retro"] #turnActionDock,
html[data-graphics="retro"] #betPanel,
html[data-graphics="retro"] #autoCallDock,
html[data-graphics="retro"] #controls,
html[data-graphics="retro"] .raiseBox,
html[data-graphics="retro"] .chipBetBuilder,
html[data-graphics="retro"] .playerChipCountSection,
html[data-graphics="retro"] .chipWallet,
html[data-graphics="retro"] .betBreakdownBox,
html[data-graphics="retro"] .panel,
html[data-graphics="retro"] .hudPanel,
html[data-graphics="retro"] .bottomHudPanel,
html[data-graphics="retro"] .topHudPanel {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-graphics="retro"] #playerHud::before,
html[data-graphics="retro"] #boardHud::before,
html[data-graphics="retro"] #actionFeed::before,
html[data-graphics="retro"] #turnActionDock::before,
html[data-graphics="retro"] #betPanel::before,
html[data-graphics="retro"] #autoCallDock::before,
html[data-graphics="retro"] #controls::before,
html[data-graphics="retro"] .raiseBox::before,
html[data-graphics="retro"] .chipBetBuilder::before,
html[data-graphics="retro"] .playerChipCountSection::before,
html[data-graphics="retro"] .chipWallet::before,
html[data-graphics="retro"] .betBreakdownBox::before,
html[data-graphics="retro"] .panel::before,
html[data-graphics="retro"] .hudPanel::before,
html[data-graphics="retro"] .bottomHudPanel::before,
html[data-graphics="retro"] .topHudPanel::before,
html[data-graphics="retro"] #playerHud::after,
html[data-graphics="retro"] #boardHud::after,
html[data-graphics="retro"] #actionFeed::after,
html[data-graphics="retro"] #turnActionDock::after,
html[data-graphics="retro"] #betPanel::after,
html[data-graphics="retro"] #autoCallDock::after,
html[data-graphics="retro"] #controls::after,
html[data-graphics="retro"] .raiseBox::after,
html[data-graphics="retro"] .chipBetBuilder::after,
html[data-graphics="retro"] .playerChipCountSection::after,
html[data-graphics="retro"] .chipWallet::after,
html[data-graphics="retro"] .betBreakdownBox::after,
html[data-graphics="retro"] .panel::after,
html[data-graphics="retro"] .hudPanel::after,
html[data-graphics="retro"] .bottomHudPanel::after,
html[data-graphics="retro"] .topHudPanel::after {
  content: none !important;
  display: none !important;
}

/* Keep the actual interactive pieces readable/clickable. */
html[data-graphics="retro"] #controls button,
html[data-graphics="retro"] #autoCallBtn,
html[data-graphics="retro"] #raiseAmount,
html[data-graphics="retro"] .denominationChip,
html[data-graphics="retro"] .playerChipCount,
html[data-graphics="retro"] .miniCard,
html[data-graphics="retro"] .retroTextMiniCard,
html[data-graphics="retro"] .heroTurnTimer,
html[data-graphics="retro"] #heroTurnTimer {
  box-shadow: none !important;
}

/* Make list/feed rows transparent too if they inherited slabs. */
html[data-graphics="retro"] #actionFeed .actionItem,
html[data-graphics="retro"] .actionFeedItem,
html[data-graphics="retro"] .handHistoryRow,
html[data-graphics="retro"] .playerRow {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border-color: transparent !important;
}



/* ==========================================================
   POKER3D_LANDING_CUSTOMIZE_RESPONSIVE_V12_8

   Fixes:
   - invisible/dark landing text on dark background
   - Quick Join label contrast
   - Poker 3D title contrast
   - customize text contrast
   - player preview / color panels clipping off-screen
   - automatic responsive panel organization
   ========================================================== */

#landing,
#landing .landingContent{
  color:#eefaf5;
}

#landing .firstRunHero h1{
  color:#f7fffc !important;
  text-shadow:none;
}

#landing .firstRunHero p,
#landing .landingPlayHint,
#landing .joinWelcome p,
#landing .roomBrowserStatus,
#landing .roomBrowserPlayers{
  color:#b8cec5 !important;
}

#landing .firstRunEyebrow,
#landing .joinWelcome>span,
#landing .characterPreviewHeading small,
#landing .settingsEyebrow{
  color:#68e0b1 !important;
}

#landing .landingSessionBar,
#landing .landingSessionBar span,
#landing .roomline,
#landing .joinPrivacyStatus,
#landing .accountStatus,
#landing .characterPreviewHeading,
#landing .characterPreviewHeading b,
#landing .characterPreviewHeading>span,
#landing .avatarColorTopline,
#landing .avatarColorMixer label,
#landing .avatarColorMixer label>span,
#landing .avatarColorCustomRow,
#landing .privateTableToggle,
#landing .roomBrowserHeading,
#landing .roomBrowserTop,
#landing .roomBrowserCounts{
  color:#e8f7f1 !important;
}

#landing button,
#landing .secondaryButton,
#landing button.secondaryButton{
  color:#f1fff9 !important;
}

#landing button:disabled{
  color:#8da49b !important;
}

#landing #quickConnectBtn.playNowPrimary{
  color:#f7fffc !important;
  background:#10271f !important;
  border:1px solid #68e0b1 !important;
  box-shadow:none !important;
  text-shadow:none !important;
  font-weight:950 !important;
  letter-spacing:.035em;
}

#landing #quickConnectBtn.playNowPrimary:hover,
#landing #quickConnectBtn.playNowPrimary:focus-visible{
  color:#ffffff !important;
  background:#17372c !important;
  border-color:#8af0c7 !important;
}

#landing input,
#landing select,
#landing textarea{
  color:#f2fff9 !important;
  background:#091310 !important;
  border-color:#38584c !important;
}

#landing input::placeholder,
#landing textarea::placeholder{
  color:#8fa79e !important;
  opacity:1;
}

#landing output{
  color:#effff9 !important;
}

#landing .characterPreviewCard,
#landing .avatarCustomizer,
#landing .accountCard{
  color:#eaf8f2 !important;
}


/* ==========================================================
   RESPONSIVE CHARACTER CUSTOMIZER

   Wide:
     LEFT   = normal seat/account controls
     CENTER = Player Preview
     RIGHT  = Character Color

   Medium:
     LEFT   = normal controls
     RIGHT  = preview + color stacked

   Small:
     everything stacks in one column
   ========================================================== */

#landing .landingContent:has(#joinArea.characterOptionsOpen){
  width:min(96vw,1380px);
  max-width:1380px;
}

#joinArea.characterOptionsOpen{
  display:grid;
  grid-template-columns:
    minmax(240px,.78fr)
    minmax(300px,1.05fr)
    minmax(300px,1.05fr);
  gap:16px;
  align-items:start;
  width:100%;
  min-width:0;
}

#joinArea.characterOptionsOpen >
*:not(.characterPreviewCard):not(.avatarCustomizer){
  grid-column:1;
  min-width:0;
}

#joinArea.characterOptionsOpen >
.characterPreviewCard.onboardingDeferred{
  position:static !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  grid-column:2;
  grid-row:1 / span 30;
  display:block !important;
  width:100% !important;
  max-width:none !important;
  max-height:none !important;
  min-width:0 !important;
  margin:0 !important;
  transform:none !important;
  overflow:hidden !important;
}

#joinArea.characterOptionsOpen >
.avatarCustomizer.onboardingDeferred{
  position:static !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  grid-column:3;
  grid-row:1 / span 30;
  display:block !important;
  width:100% !important;
  max-width:none !important;
  max-height:none !important;
  min-width:0 !important;
  margin:0 !important;
  transform:none !important;
  overflow:visible !important;
}

#joinArea.characterOptionsOpen .characterPreviewStage{
  width:100%;
  height:clamp(230px,43vh,520px) !important;
  min-height:220px;
  max-height:520px;
}

#joinArea.characterOptionsOpen #characterPreviewCanvas{
  width:100% !important;
  height:100% !important;
  max-width:100%;
  display:block;
}

#joinArea.characterOptionsOpen .avatarColorSwatches{
  display:grid !important;
  grid-template-columns:
    repeat(auto-fit,minmax(30px,1fr)) !important;
  gap:8px !important;
  width:100%;
  min-width:0;
}

#joinArea.characterOptionsOpen
.avatarColorSwatches button{
  width:100% !important;
  min-width:28px;
  max-width:54px;
  aspect-ratio:1 / 1;
  justify-self:center;
}

#joinArea.characterOptionsOpen .avatarColorMixer{
  display:grid !important;
  grid-template-columns:
    repeat(auto-fit,minmax(150px,1fr)) !important;
  gap:10px !important;
  width:100%;
  min-width:0;
}

#joinArea.characterOptionsOpen .avatarColorMixer label{
  min-width:0;
}

#joinArea.characterOptionsOpen .avatarColorMixer input{
  width:100% !important;
  min-width:0;
  margin:0 !important;
}

#joinArea.characterOptionsOpen .avatarColorCustomRow{
  display:grid !important;
  grid-template-columns:
    auto
    minmax(90px,1fr)
    auto;
  gap:9px;
  align-items:center;
  min-width:0;
}

#joinArea.characterOptionsOpen
.avatarColorCustomRow input{
  min-width:0;
  width:100% !important;
  margin:0 !important;
}


/* Medium desktop / laptop */
@media (max-width:1199px) and (min-width:761px){

  #landing .landingContent:has(#joinArea.characterOptionsOpen){
    width:min(96vw,960px);
    max-width:960px;
  }

  #joinArea.characterOptionsOpen{
    grid-template-columns:
      minmax(240px,.78fr)
      minmax(340px,1.22fr);
  }

  #joinArea.characterOptionsOpen >
  .characterPreviewCard.onboardingDeferred{
    grid-column:2;
    grid-row:1 / span 13;
  }

  #joinArea.characterOptionsOpen >
  .avatarCustomizer.onboardingDeferred{
    grid-column:2;
    grid-row:14 / span 20;
    margin-top:12px !important;
  }

  #joinArea.characterOptionsOpen .characterPreviewStage{
    height:clamp(230px,38vh,390px) !important;
  }
}


/* Narrow / tablet / phone */
@media (max-width:760px){

  #landing .landingContent:has(#joinArea.characterOptionsOpen){
    width:min(100%,560px);
    max-width:560px;
  }

  #joinArea.characterOptionsOpen{
    display:block;
  }

  #joinArea.characterOptionsOpen >
  .characterPreviewCard.onboardingDeferred,
  #joinArea.characterOptionsOpen >
  .avatarCustomizer.onboardingDeferred{
    position:static !important;
    width:100% !important;
    max-width:none !important;
    max-height:none !important;
    margin:12px 0 !important;
    overflow:visible !important;
  }

  #joinArea.characterOptionsOpen .characterPreviewStage{
    height:clamp(220px,42vh,340px) !important;
  }

  #joinArea.characterOptionsOpen .avatarColorMixer{
    grid-template-columns:1fr !important;
  }
}


/* Very short desktop windows */
@media (min-width:761px) and (max-height:650px){

  #landing .landingContent:has(#joinArea.characterOptionsOpen){
    align-self:start;
  }

  #joinArea.characterOptionsOpen .characterPreviewStage{
    height:clamp(190px,39vh,300px) !important;
    min-height:190px;
  }

  #landing.panel{
    overflow:auto !important;
  }
}



/* ==========================================================
   POKER3D_LANDING_VISIBILITY_V12_8_1
   ========================================================== */


/* ----------------------------------------------------------
   POKER 3D TITLE

   Kill old transparent text / clipping / background treatments.
   ---------------------------------------------------------- */

#landing .firstRunHero h1,
#landing .firstRunHero h1 *,
#landing h1{
  color:#f7fffc !important;
  -webkit-text-fill-color:#f7fffc !important;
  -webkit-text-stroke:0 transparent !important;

  background:transparent !important;
  background-color:transparent !important;
  background-image:none !important;

  -webkit-background-clip:border-box !important;
  background-clip:border-box !important;

  mix-blend-mode:normal !important;
  filter:none !important;
  opacity:1 !important;

  text-shadow:none !important;
}


/* ----------------------------------------------------------
   CHARACTER COLOR SWATCHES
   ---------------------------------------------------------- */

#landing #avatarColorSwatches,
#joinArea #avatarColorSwatches{
  opacity:1 !important;
  filter:none !important;
}

#landing #avatarColorSwatches button[data-avatar-color],
#joinArea #avatarColorSwatches button[data-avatar-color]{
  opacity:1 !important;
  filter:none !important;

  border:1px solid rgba(235,255,247,.34) !important;

  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.25) !important;

  min-width:30px !important;
  min-height:30px !important;
}

#landing #avatarColorSwatches button[data-avatar-color]:hover,
#joinArea #avatarColorSwatches button[data-avatar-color]:hover{
  border-color:#ffffff !important;
}

#landing #avatarColorSwatches button[data-avatar-color][aria-pressed="true"],
#joinArea #avatarColorSwatches button[data-avatar-color][aria-pressed="true"],
#landing #avatarColorSwatches button[data-avatar-color].selected,
#joinArea #avatarColorSwatches button[data-avatar-color].selected{
  outline:2px solid #71e9bd !important;
  outline-offset:2px !important;
}


/* ----------------------------------------------------------
   COLOR MIXER TRACKS
   ---------------------------------------------------------- */

#avatarHue,
#avatarSaturation,
#avatarLightness{
  -webkit-appearance:none !important;
  appearance:none !important;

  height:14px !important;
  min-height:14px !important;

  border:0 !important;
  border-radius:999px !important;

  opacity:1 !important;
  filter:none !important;
}

#avatarHue{
  background:
    linear-gradient(
      90deg,
      #ff0000 0%,
      #ffff00 16.67%,
      #00ff00 33.33%,
      #00ffff 50%,
      #0000ff 66.67%,
      #ff00ff 83.33%,
      #ff0000 100%
    ) !important;
}

#avatarSaturation{
  background:
    linear-gradient(
      90deg,
      #777777 0%,
      var(
        --poker3d-avatar-live-color,
        #20a9b8
      ) 100%
    ) !important;
}

#avatarLightness{
  background:
    linear-gradient(
      90deg,
      #000000 0%,
      var(
        --poker3d-avatar-live-color,
        #20a9b8
      ) 50%,
      #ffffff 100%
    ) !important;
}

#avatarHue::-webkit-slider-runnable-track,
#avatarSaturation::-webkit-slider-runnable-track,
#avatarLightness::-webkit-slider-runnable-track{
  height:14px !important;
  border-radius:999px !important;
  background:transparent !important;
}

#avatarHue::-webkit-slider-thumb,
#avatarSaturation::-webkit-slider-thumb,
#avatarLightness::-webkit-slider-thumb{
  -webkit-appearance:none !important;

  width:20px !important;
  height:20px !important;

  margin-top:-3px !important;

  border:2px solid #eafff7 !important;
  border-radius:50% !important;

  background:#13221d !important;

  box-shadow:
    0 0 0 2px rgba(74,228,174,.28) !important;
}


/* ----------------------------------------------------------
   RENDER RESOLUTION

   V12.2 markup already exists locally.
   Force the containing graphics row and select to render even
   when older Retro graphics CSS attempts to hide sliders.
   ---------------------------------------------------------- */

.graphicsSlider:has(#graphicsResolutionScale),
label:has(#graphicsResolutionScale){
  display:grid !important;
  visibility:visible !important;
  opacity:1 !important;

  pointer-events:auto !important;

  gap:8px !important;

  width:100% !important;
  max-width:none !important;
}

.graphicsSlider:has(#graphicsResolutionScale)>span,
label:has(#graphicsResolutionScale)>span{
  display:block !important;

  color:#eafff7 !important;

  font-weight:900 !important;
  letter-spacing:.04em;
}

#graphicsResolutionScale,
select#graphicsResolutionScale,
[data-graphics-resolution]{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;

  width:100% !important;
  min-width:0 !important;
  min-height:44px !important;

  pointer-events:auto !important;

  color:#f4fff9 !important;
  -webkit-text-fill-color:#f4fff9 !important;

  background:#0b1713 !important;

  border:1px solid #4c806c !important;
  border-radius:7px !important;

  padding:8px 10px !important;
}

#graphicsResolutionScale option{
  color:#f4fff9 !important;
  background:#0b1713 !important;
}

/* POKER3D_VISIBLE_SHOP_WALLET_V1
   Persistent wallet/progression entry point: useful, compact, and one tap
   from the store without opening the general-purpose menu. */
#game > #shopQuickAccessBtn{
  display:flex!important;
  position:fixed!important;
  top:max(10px,env(safe-area-inset-top,0px))!important;
  left:122px!important;
  width:auto!important;
  max-width:min(330px,calc(100vw - 430px))!important;
  min-height:46px!important;
  align-items:center!important;
  gap:8px!important;
  padding:6px 10px!important;
  border:1px solid rgba(255,213,90,.48)!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,rgba(24,22,10,.94),rgba(7,16,14,.92))!important;
  color:#fff4ba!important;
  box-shadow:0 8px 30px rgba(0,0,0,.30)!important;
  backdrop-filter:blur(14px)!important;
  z-index:16041!important;
}

#game > #shopQuickAccessBtn:hover,
#game > #shopQuickAccessBtn.canSpend{
  border-color:#ffe06b!important;
  box-shadow:0 0 0 2px rgba(255,211,72,.13),0 8px 30px rgba(0,0,0,.32)!important;
}

#game .shopQuickCoin{
  display:grid!important;
  place-items:center!important;
  flex:0 0 28px!important;
  width:28px!important;
  height:28px!important;
  border-radius:50%!important;
  background:#e5ae24!important;
  color:#171006!important;
  font-size:1rem!important;
  font-weight:1000!important;
}

#game .shopQuickCopy{
  display:grid!important;
  min-width:112px!important;
  gap:1px!important;
  text-align:left!important;
  line-height:1.05!important;
}

#game .shopQuickCopy b{
  overflow:hidden!important;
  color:#fff1a8!important;
  font-size:.76rem!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

#game .shopQuickCopy small{
  overflow:hidden!important;
  color:#b9cabf!important;
  font-size:.56rem!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}

#game .shopQuickProgressTrack{
  display:block!important;
  width:100%!important;
  height:3px!important;
  overflow:hidden!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.10)!important;
}

#game .shopQuickProgressTrack i{
  display:block!important;
  width:0;
  height:100%!important;
  border-radius:inherit!important;
  background:linear-gradient(90deg,#42d9ae,#ffe06b)!important;
  transition:width .35s ease!important;
}

#game .shopQuickCta{
  color:#ffe06b!important;
  font-size:.61rem!important;
  font-weight:1000!important;
  letter-spacing:.09em!important;
}

@media(max-width:700px){
  #game > #shopQuickAccessBtn{
    top:58px!important;
    left:max(8px,env(safe-area-inset-left,0px))!important;
    max-width:min(230px,calc(100vw - 16px))!important;
    min-height:39px!important;
    padding:5px 8px!important;
    border-radius:11px!important;
  }

  #game .shopQuickCoin{
    flex-basis:24px!important;
    width:24px!important;
    height:24px!important;
    font-size:.84rem!important;
  }

  #game .shopQuickCopy{
    min-width:104px!important;
  }

  #game .shopQuickCopy b{
    font-size:.69rem!important;
  }

  #game .shopQuickCopy small{
    font-size:.52rem!important;
  }
}

@media(max-width:390px){
  #game .shopQuickCta{
    display:none!important;
  }
}
#gamepadStatus{
  position:fixed;
  left:50%;
  bottom:max(10px,env(safe-area-inset-bottom));
  z-index:1600;
  transform:translateX(-50%);
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 12px;
  color:#dfffee;
  background:#06110fe8;
  border:1px solid #54efbd;
  font:700 11px/1.2 monospace;
  pointer-events:none;
}
#gamepadStatus[hidden]{display:none}
#gamepadStatus b{color:#54efbd}
#gamepadStatus span{opacity:.82}
#gamepadRotatePrompt{display:none}
.gamepadActive :focus-visible{
  outline:3px solid #54efbd!important;
  outline-offset:3px!important;
}
@media (orientation:portrait) and (pointer:coarse){
  .gamepadActive #gamepadRotatePrompt{
    position:fixed;
    inset:0;
    z-index:10000;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
    color:#eafff6;
    background:#020706f5;
    font:800 18px/1.2 monospace;
  }
  .gamepadActive #gamepadRotatePrompt span{
    color:#54efbd;
    font-size:12px;
  }
}
@media (orientation:landscape) and (max-height:600px){
  .gamepadActive #gamepadStatus{bottom:5px;padding:4px 9px;font-size:9px}
  .gamepadActive #spacePistolTouchFireBtn{right:max(18px,env(safe-area-inset-right));bottom:18px}
}

/* S9 / landscape handheld layout: keep the table clear and place only the
   actionable poker strip along the bottom safe edge. */
@media (orientation:landscape) and (max-height:650px){
  .gamepadActive #mobileGameTabs,
  .gamepadActive #boardHud,
  .gamepadActive #actionFeed,
  .gamepadActive #playerHud .heroLabel,
  .gamepadActive #autoCallDock{
    display:none!important;
  }
  .gamepadActive #playerHud{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:8px!important;
    width:auto!important;
    max-width:62vw!important;
    margin:0!important;
    padding:0!important;
    transform:translateX(-50%)!important;
    z-index:10040!important;
    pointer-events:none!important;
  }
  .gamepadActive #bottomInfoDock{
    display:flex!important;
    flex-direction:row!important;
    align-items:flex-end!important;
    justify-content:center!important;
    gap:7px!important;
    width:auto!important;
  }
  .gamepadActive #hudBottom{
    display:flex!important;
    flex-direction:column!important;
    gap:3px!important;
    max-width:230px!important;
  }
  .gamepadActive #potHud,
  .gamepadActive #turnHud{
    min-height:0!important;
    padding:4px 8px!important;
    font-size:10px!important;
    line-height:1.1!important;
    white-space:nowrap!important;
  }
  .gamepadActive #heroCards{
    display:flex!important;
    gap:3px!important;
  }
  .gamepadActive #heroCards .miniCard{
    width:38px!important;
    height:53px!important;
    font-size:15px!important;
  }
  .gamepadActive #heroTurnTimer{
    width:180px!important;
    min-height:24px!important;
    margin:0!important;
    padding:3px 6px!important;
  }
  .gamepadActive #gamepadStatus{
    left:auto!important;
    right:8px!important;
    bottom:7px!important;
    transform:none!important;
    padding:4px 7px!important;
    font-size:8px!important;
  }
  .gamepadActive #gamepadStatus span{display:none!important}
  .gamepadActive #turnActionDock:not([hidden]){
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:8px!important;
    width:min(760px,82vw)!important;
    max-width:82vw!important;
    max-height:112px!important;
    transform:translateX(-50%)!important;
    overflow:visible!important;
    z-index:10120!important;
  }
  .gamepadActive #turnActionDock .turnDockPanel{
    padding:5px!important;
    gap:4px!important;
  }
  .gamepadActive #turnActionDock .turnDockTitle,
  .gamepadActive #turnActionDock .turnDockChips,
  .gamepadActive #turnActionDock .playerChipCountSection,
  .gamepadActive #turnActionDock .chipBetBuilder,
  .gamepadActive #turnActionDock .chipWallet,
  .gamepadActive #turnActionDock .betBreakdownBox{
    display:none!important;
  }
  .gamepadActive #turnActionDock #controls{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
  }
  .gamepadActive #turnActionDock #controls > div{
    display:contents!important;
  }
  .gamepadActive #turnActionDock #controls button[data-action]{
    width:112px!important;
    height:42px!important;
    min-height:42px!important;
    padding:5px 8px!important;
    font-size:11px!important;
  }
  .gamepadActive #turnActionDock .raiseBox{
    display:flex!important;
    width:120px!important;
  }
  .gamepadActive #turnActionDock #raiseAmount{
    width:58px!important;
    height:36px!important;
  }
  .gamepadActive #turnActionDock #raiseSlider{display:none!important}
  .gamepadActive #turnActionDock #status{
    min-height:14px!important;
    font-size:9px!important;
  }
  .gamepadActive #quickPistolAimBtn,
  .gamepadActive #quickRockRangeBtn{
    bottom:10px!important;
  }
}
