/* The game owns the viewport; menus and modal contents retain their own scrolling. */
@layer studio {
@media (min-height:601px) {
 body.studio-3d #gameApp .table .player-left::after,
 body.studio-3d #gameApp .table .player-right::after {
  position:absolute!important;top:calc(100% + 28px)!important;bottom:auto!important;
  left:50%!important;right:auto!important;transform:translateX(-50%)!important;
  translate:none!important;margin:0!important;z-index:10!important;
  width:max-content!important;white-space:nowrap!important;
 }
}
@media (min-width:1100px) and (min-height:650px) {
 body.studio-3d #gameApp .table .player .avatar {
  width:clamp(64px,8vh,84px)!important;height:clamp(64px,8vh,84px)!important;
  min-width:clamp(64px,8vh,84px)!important;max-height:84px!important;
  flex:0 0 auto!important;border-width:3px!important;
 }
 body.studio-3d #gameApp .table .player-info {padding:6px 10px!important;}
 body.studio-3d #gameApp .table .player-info span {font-size:14px!important;line-height:1.2!important;}
 body.studio-3d #gameApp .hand-panel .hand-heading {flex-basis:34px!important;}
 body.studio-3d #gameApp .hand-panel .hand-heading #userAvatar {
  width:64px!important;height:64px!important;min-width:64px!important;max-height:64px!important;
  flex:0 0 64px!important;margin-top:-32px!important;margin-bottom:0!important;
  border:3px solid #d8bd7d!important;box-sizing:border-box!important;
  position:relative!important;z-index:9!important;
 }
 body.studio-3d #gameApp .hand-panel .hand-heading .your-player-label {gap:10px!important;}
}
body.studio-3d #gameApp .table-chat-form input {display:block!important;flex:1 1 0!important;width:0!important;min-width:0!important;}
body.studio-3d #gameApp .table-chat-form button {width:auto!important;min-width:55px!important;max-width:80px!important;flex:0 0 auto!important;}
body.studio-3d #gameApp .status-grid {flex:0 0 auto!important;max-width:none!important;}
body.studio-3d #gameApp .status-pill {width:auto!important;max-width:none!important;flex:0 0 auto!important;}
body.studio-3d #gameApp .status-pill strong {width:auto!important;max-width:none!important;text-overflow:clip!important;white-space:nowrap!important;}
body.studio-3d #gameApp .score-actions button,body.studio-3d #gameApp .score-card span {white-space:normal!important;text-overflow:clip!important;overflow:visible!important;line-height:1.15!important;}
body.studio-3d #gameApp #playerHand.hand {position:relative!important;inset:auto!important;transform:none!important;float:none!important;}
body.studio-3d #gameApp .status-grid {display:flex!important;align-items:center!important;gap:4px!important;height:100%!important;}
body.studio-3d #gameApp .status-pill {height:auto!important;max-height:100%!important;line-height:1.1!important;}
body.studio-3d #gameApp .status-pill>span {display:block!important;font-size:10px!important;}
body.studio-3d #gameApp .status-pill strong {font-size:14px!important;}
body.studio-3d #gameApp .trump-status-icon {width:28px!important;height:32px!important;font-size:23px!important;}
body.studio-3d #gameApp .hand-heading .your-player-label {display:flex!important;align-items:center!important;gap:5px!important;position:static!important;}
body.studio-3d #gameApp .hand-heading .avatar {position:static!important;transform:none!important;}
body.studio-3d #gameApp .score-card>span {display:block!important;}
body.studio-3d #gameApp .score-actions button:not([hidden]) {display:block!important;}
body.studio-3d #gameApp .score-actions button[hidden] {display:none!important;}
body.studio-3d #gameApp .score-board,body.studio-3d #gameApp .score-actions {height:auto!important;max-height:none!important;overflow:visible!important;}
body.studio-3d #gameApp .score-card {display:block!important;flex:none!important;min-height:0!important;}
body.studio-3d #gameApp .score-actions {flex:none!important;}
body.studio-3d #gameApp .player .avatar {min-height:0!important;box-sizing:border-box!important;}
body.studio-3d #gameApp .trump-status {display:flex!important;align-items:center!important;gap:4px!important;}
body.studio-3d #gameApp .trump-status>span {display:none!important;}
body.studio-3d #gameApp .trump-status-content {display:flex!important;align-items:center!important;gap:3px!important;}
body.studio-3d #gameApp .trump-status::before,body.studio-3d #gameApp .trump-status::after {display:none!important;}
body.studio-3d #gameApp .status-grid {width:auto!important;position:static!important;transform:none!important;}
body.studio-3d #gameApp .status-pill {box-sizing:border-box!important;overflow:visible!important;}
body.studio-3d #gameApp .player .avatar {aspect-ratio:1!important;object-fit:cover!important;max-height:44px!important;}
html:has(body.studio-3d.game-active), body.studio-3d.game-active {height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important;}
body.studio-3d #gameApp:not([hidden]) {box-sizing:border-box!important;display:grid!important;position:fixed!important;inset:0!important;height:100dvh!important;min-height:0!important;max-height:100dvh!important;max-width:1600px!important;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))!important;grid-template-columns:145px minmax(0,1fr)!important;grid-template-rows:54px 24px minmax(0,1fr) 172px 22px!important;gap:6px!important;overflow:hidden!important;}
body.studio-3d #gameApp .top-bar {grid-column:1/-1!important;grid-row:1!important;min-height:0!important;height:100%!important;padding:4px 10px!important;flex-wrap:nowrap!important;gap:6px!important;}
body.studio-3d #gameApp .top-bar h1 {font-size:20px!important;margin:0!important;}
body.studio-3d #gameApp .status-pill {padding:4px 8px!important;min-width:0!important;}
body.studio-3d #gameApp .studio-camera {grid-column:2!important;grid-row:2!important;min-height:0!important;}
body.studio-3d #gameApp .score-board {grid-column:1!important;grid-row:2/5!important;min-height:0!important;}
body.studio-3d #gameApp .score-card {padding:8px!important;}
body.studio-3d #gameApp .score-card strong {font-size:23px!important;}
body.studio-3d #gameApp .table {grid-column:2!important;grid-row:3!important;min-height:0!important;height:100%!important;max-height:100%!important;}
body.studio-3d #gameApp .hand-panel {grid-column:2!important;grid-row:4!important;height:100%!important;max-height:100%!important;min-height:0!important;box-sizing:border-box!important;padding:5px 8px!important;display:flex!important;flex-direction:column!important;}
body.studio-3d #gameApp .hand-heading {flex:0 0 23px!important;min-height:0!important;margin:0!important;align-items:center!important;}
body.studio-3d #gameApp .hand-heading h2 {font-size:14px!important;}
body.studio-3d #gameApp .hand-heading .avatar {width:22px!important;height:22px!important;}
body.studio-3d #gameApp #playerHand.hand {flex:1!important;min-height:0!important;height:0!important;padding:8px 2px 2px!important;align-items:stretch!important;gap:0!important;}
body.studio-3d #gameApp .hand>.card {height:100%!important;width:auto!important;flex:0 1 88px!important;min-width:0!important;max-width:88px!important;margin:0 2px!important;}
body.studio-3d #gameApp .game-events {grid-column:2!important;grid-row:5!important;min-height:0!important;margin:0!important;padding:0!important;font-size:12px!important;overflow:hidden!important;}
body.studio-3d #gameApp .bid-panel:not([hidden]) {position:absolute!important;z-index:30!important;inset:70px 12px auto auto!important;width:min(450px,calc(100% - 24px))!important;max-height:calc(100dvh - 100px)!important;overflow:auto!important;}
body.studio-3d #gameApp .table-chat {display:none!important;position:absolute!important;z-index:40!important;inset:auto 12px 40px auto!important;width:min(330px,calc(100% - 24px))!important;height:min(420px,calc(100dvh - 95px))!important;min-height:0!important;max-height:calc(100dvh - 95px)!important;padding:14px!important;grid-area:auto!important;}
body.studio-3d #gameApp.studio-chat-open .table-chat {display:flex!important;}
body.studio-3d #gameApp .table-chat {box-sizing:border-box!important;overflow:hidden!important;gap:10px!important;}
body.studio-3d #gameApp .table-chat-header,
body.studio-3d #gameApp .table-chat > label,
body.studio-3d #gameApp .table-chat-form {flex:0 0 auto!important;height:auto!important;min-height:0!important;max-height:none!important;}
body.studio-3d #gameApp .table-chat-log {flex:1 1 0!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;touch-action:pan-y;}
body.studio-3d #gameApp .table-chat-log {display:flex!important;flex-direction:column!important;justify-content:flex-start!important;gap:8px!important;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#bba46d #102219;cursor:auto!important;}
body.studio-3d #gameApp .table-chat-log .chat-line {flex:0 0 auto!important;max-height:none!important;}
body.studio-3d #gameApp .table-chat-log .chat-line span {white-space:normal!important;overflow:visible!important;max-height:none!important;-webkit-line-clamp:unset!important;overflow-wrap:anywhere;}
body.studio-3d #gameApp .studio-chat-toggle {position:absolute;z-index:41;right:14px;bottom:max(8px,env(safe-area-inset-bottom));border:1px solid #bea66c;border-radius:20px;background:#18372b;color:#f1e5c8;padding:6px 14px;font:13px Arial;}
body.studio-3d #gameApp .player .avatar {width:44px!important;height:44px!important;min-width:0!important;}
body.studio-3d #gameApp .player-info {padding:4px 7px!important;}
body.studio-3d #gameApp .player-top .opponent-card-fan {top:12px!important;width:58px!important;height:40px!important;}
@media(max-width:760px) and (orientation:portrait) {
 body.studio-3d #gameApp .player-top {top:1%!important;}
 body.studio-3d #gameApp .player-left,body.studio-3d #gameApp .player-right {top:50%!important;transform:translateY(-50%)!important;bottom:auto!important;}
 body.studio-3d #gameApp .player-left {left:2%!important;}
 body.studio-3d #gameApp .player-right {right:2%!important;}
 body.studio-3d #gameApp:not([hidden]) {grid-template-columns:minmax(0,1fr)!important;grid-template-rows:48px 86px minmax(0,1fr) 142px 26px!important;gap:4px!important;padding-left:6px!important;padding-right:6px!important;}
 body.studio-3d #gameApp .top-bar h1 {font-size:14px!important;}
 body.studio-3d #gameApp .eyebrow {display:none!important;}
 body.studio-3d #gameApp .status-pill {font-size:10px!important;padding:3px!important;}
 body.studio-3d #gameApp .score-board {grid-column:1!important;grid-row:2!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;}
 body.studio-3d #gameApp .score-card {padding:3px 5px!important;}
 body.studio-3d #gameApp .score-card strong {font-size:18px!important;}
 body.studio-3d #gameApp .score-card span {font-size:9px!important;letter-spacing:0!important;}
 body.studio-3d #gameApp .score-actions {grid-column:1/-1!important;flex-direction:row!important;gap:6px!important;}
 body.studio-3d #gameApp .score-actions button {padding:5px 10px!important;min-height:28px!important;}
 body.studio-3d #gameApp .studio-camera {display:none!important;}
 body.studio-3d #gameApp .table {grid-column:1!important;grid-row:3!important;}
 body.studio-3d #gameApp .hand-panel {grid-column:1!important;grid-row:4!important;}
 body.studio-3d #gameApp .game-events {grid-column:1!important;grid-row:5!important;padding-right:90px!important;font-size:10px!important;}
 body.studio-3d #gameApp .hand>.card {margin-left:-12px!important;flex-basis:66px!important;max-width:66px!important;}
 body.studio-3d #gameApp .hand>.card:first-child {margin-left:0!important;}
 body.studio-3d #gameApp .player-info span {font-size:10px!important;}
 body.studio-3d #gameApp .hand-heading {font-size:10px!important;}
}
@media(max-height:600px) and (orientation:landscape) {
 body.studio-3d #gameApp:not([hidden]) {grid-template-columns:112px minmax(0,1fr)!important;grid-template-rows:38px minmax(0,1fr) 106px 20px!important;gap:3px!important;padding-top:max(4px,env(safe-area-inset-top))!important;padding-bottom:max(4px,env(safe-area-inset-bottom))!important;}
 body.studio-3d #gameApp .top-bar h1 {font-size:15px!important;}
 body.studio-3d #gameApp .eyebrow,body.studio-3d #gameApp .studio-camera {display:none!important;}
 body.studio-3d #gameApp .score-board {display:flex!important;grid-row:2/4!important;gap:3px!important;}
 body.studio-3d #gameApp .score-card {padding:3px 6px!important;}
 body.studio-3d #gameApp .score-card strong {font-size:17px!important;}
 body.studio-3d #gameApp .score-actions {flex-direction:column!important;gap:3px!important;}
 body.studio-3d #gameApp .score-actions button {padding:5px!important;font-size:10px!important;}
 body.studio-3d #gameApp .table {grid-row:2/4!important;}
 body.studio-3d #gameApp .hand-panel {grid-row:3!important;z-index:12!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0 8px!important;}
 body.studio-3d #gameApp .hand-heading {display:none!important;}
 body.studio-3d #gameApp #playerHand.hand {padding:0 0 3px!important;justify-content:center!important;}
 body.studio-3d #gameApp .player-top {top:3%!important;left:50%!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:5px!important;transform:translateX(-50%)!important;}
 body.studio-3d #gameApp .player-top .player-info {position:static!important;transform:none!important;width:auto!important;min-width:65px!important;}
 body.studio-3d #gameApp .player-left,body.studio-3d #gameApp .player-right {top:36%!important;bottom:auto!important;transform:translateY(-50%)!important;}
 body.studio-3d #gameApp .player-left {left:3%!important;}
 body.studio-3d #gameApp .player-right {right:3%!important;}
 body.studio-3d #gameApp .trick-area {position:absolute!important;inset:55px 22% 110px!important;width:auto!important;height:auto!important;transform:none!important;}
 body.studio-3d #gameApp .trick-area:not(.collecting) .played-card.seat-partner {top:25%!important;}
 body.studio-3d #gameApp .trick-area:not(.collecting) .played-card.seat-user {top:75%!important;}
 body.studio-3d #gameApp .trick-area:not(.collecting) .played-card.seat-left {top:50%!important;left:24%!important;}
 body.studio-3d #gameApp .trick-area:not(.collecting) .played-card.seat-right {top:50%!important;left:76%!important;}
 body.studio-3d #gameApp .hand-heading {flex-basis:16px!important;font-size:10px!important;}
 body.studio-3d #gameApp .hand-heading h2 {font-size:11px!important;}
 body.studio-3d #gameApp .hand>.card {max-width:59px!important;flex-basis:59px!important;}
 body.studio-3d #gameApp .hand>.card .corner {font-size:16px!important;top:3px!important;left:3px!important;}
 body.studio-3d #gameApp .game-events {grid-row:4!important;font-size:10px!important;padding-right:90px!important;}
 body.studio-3d #gameApp .player .avatar {width:28px!important;height:28px!important;}
 body.studio-3d #gameApp .player-info {padding:2px 5px!important;}
 body.studio-3d #gameApp .player-info span {font-size:9px!important;}
 body.studio-3d #gameApp .opponent-card-fan {display:none!important;}
 body.studio-3d #gameApp .trick-area .played-card,body.studio-3d #gameApp .trick-area .played-card .mini-card {width:38px!important;min-width:38px!important;max-width:38px!important;}
 body.studio-3d #gameApp .trick-area .played-card .mini-card {height:54px!important;min-height:54px!important;max-height:54px!important;}
 body.studio-3d #gameApp .trick-area .mini-card .corner {font-size:13px!important;}
 body.studio-3d #gameApp .trick-area .mini-card .suit {font-size:22px!important;padding-top:8px!important;}
}
}
