/* A closing panel reveals already-mounted HOME controls in the same frame. */
body.ponder-panel-returning #appHomeScreen#appHomeScreen#appHomeScreen .ponder-home-shell,
body.ponder-panel-returning #appHomeScreen#appHomeScreen#appHomeScreen .ponder-home-shell > * {
 opacity:1!important;visibility:visible!important;transition:none!important;
}
body.ponder-panel-returning #appHomeScreen {pointer-events:none!important;}
/* Toolbar scale follows its 16:9 canvas, not the Fold's tall outer viewport. */
#handHistoryV2Modal .hhv2-shell {container-type:inline-size;grid-template-rows:clamp(28px,3.5cqw,38px) minmax(0,1fr)!important;}
#handHistoryV2Modal :is(.hr-tabs [data-mode],.hhv2-header-tools .hhv2-filter,.hhv2-close){height:100%!important;min-height:0!important;max-height:38px!important;line-height:1!important;padding-block:2px!important;box-sizing:border-box;}
#handHistoryV2Modal .hhv2-header-tools .hhv2-filter {font-size:clamp(10px,1.55cqw,18px)!important;}
#handHistoryV2Modal .hhv2-header-tools .hhv2-filter:last-child{font-size:clamp(14px,2cqw,22px)!important;}
#ponderHomeNotice,#rankedQueueHud{position:fixed;z-index:2147483000;left:50%;display:grid;grid-template-columns:1fr;width:max-content;max-width:min(90vw,42rem);pointer-events:none;transform:translateX(-50%);}
/* Ordinary game messages share the existing HOME no-room notice surface. */
#globalNotice{top:7.4%;bottom:auto;left:50%;right:auto;transform:translateX(-50%);z-index:2147483001;width:max-content;max-width:min(90vw,42rem);box-sizing:border-box;min-height:28px;padding:.34rem .72rem;border:1px solid rgba(102,190,255,.48);border-radius:999px;background:rgba(4,12,24,.90);color:#eaf8ff;box-shadow:0 0 18px rgba(91,164,255,.18);backdrop-filter:none;font-size:.72rem;letter-spacing:.05em;line-height:normal;text-align:center;pointer-events:none;}
body:has(#ponderHomeNotice) #rankedQueueHud,body:has(#globalNotice[style*="display: block"]) #rankedQueueHud{visibility:hidden;}
#globalNotice{font-weight:700;}
#ponderHomeNotice,#rankedQueueHud,#globalNotice{width:40vw;max-width:90vw;box-sizing:border-box;text-align:center;}
@media(max-width:760px),(max-height:440px){#globalNotice{top:4.5%;min-height:24px;padding:.25rem .52rem;font-size:.62rem;}}
@keyframes ponder-panel-control-enter {from {opacity:0;translate:0 -8px;}to {opacity:1;translate:0 0;}}
body.action-ui-v2.app-view-table.v2-my-turn #actionPanelV2 .v2-side-panel{animation:ponder-panel-control-enter 180ms ease-out;}
@media(prefers-reduced-motion:reduce){body.action-ui-v2.app-view-table.v2-my-turn #actionPanelV2 .v2-side-panel{animation:none;}}
/* Resolve all compact HOME typography against the same canvas height. Nested
   cards must not pick their own container units or retain desktop pixel minima. */
@container home-v2 (max-width:1280px) or (max-height:720px){
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .ponder-logo-main{font-size:calc(7.8 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .ponder-logo-sub{font-size:calc(3.1 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .ponder-home-tagline{font-size:calc(1.7 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 :is(.ponder-card-title,.home-custom-title){font-size:calc(3.6 * var(--ponder-home-u,1vh))!important;line-height:1.1!important;white-space:nowrap!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .ranked .ponder-card-title{font-size:calc(5.7 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 :is(.ponder-card-desc,.ponder-card-cta,.home-ranked-description){font-size:calc(1.85 * var(--ponder-home-u,1vh))!important;line-height:1.35!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .home-mode-cta{font-size:calc(2.2 * var(--ponder-home-u,1vh))!important;line-height:1!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .home-ranked-details small{font-size:calc(1.45 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .home-ranked-details strong{font-size:calc(2.8 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .ranked:not(.queue-active):not(.queue-pending):not(.queue-ready):not(.mode-exclusive-disabled) .ranked-queue-status::before{font-size:calc(4 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .ponder-live-board-kicker{font-size:calc(1.65 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .ponder-live-board-row{font-size:calc(1.35 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 .ponder-live-board-row strong{font-size:calc(3.4 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 :is(.ponder-player-name,.home-player-name){font-size:calc(3.4 * var(--ponder-home-u,1vh))!important;line-height:1.1!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 :is(.ponder-player-rating,.home-player-rating){font-size:calc(1.9 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 :is(.ponder-player-stats dt,.ponder-stat-label,.ponder-live-label){font-size:calc(1.6 * var(--ponder-home-u,1vh))!important;}
 body #appHomeScreen#appHomeScreen#appHomeScreen.ponder-home-v2 :is(.ponder-player-stats dd,.ponder-stat-value,.ponder-live-value){font-size:calc(3 * var(--ponder-home-u,1vh))!important;line-height:1.1!important;}
}

/* Each full-viewport panel owns its layout/paint; opening it cannot invalidate
   the mounted HOME/table tree behind it. Fixed descendants retain that viewport. */
#profile-v2-root,#handHistoryV2Modal {contain:layout style paint;}

/* Static skeleton only: hidden from input/accessibility and never user data. */
#profile-v2-root[data-profile-v2-preloaded][hidden]{display:grid!important;visibility:hidden!important;pointer-events:none!important;}

#handHistoryV2Modal[data-history-preloaded]:not(.open){display:flex!important;visibility:hidden!important;pointer-events:none!important;}

#ponderHomeNotice strong{white-space:normal;}

/* Keep prepared data and DOM, skip only the closed panel render subtrees
   while TABLE owns the viewport. Opening removes these exact predicates. */
body.app-view-table #profile-v2-root[data-profile-v2-preloaded][hidden],
body.app-view-table #handHistoryV2Modal[data-history-preloaded]:not(.open){content-visibility:hidden!important;}

/* Matching status only: 70% of the former 40vw, retaining readable padding. */
#rankedQueueHud{width:28vw;padding:.34rem .55rem;}
#rankedQueueHud strong{white-space:normal;overflow-wrap:normal;}

/* The dropdown is a direct stage child, so these percentages scale with the
   game canvas and its existing transform, including short landscape devices. */
#stage #mainMenuDropdown {
 box-sizing:border-box; width:max-content; min-width:min(132px,45%);
 min-height:min(44px,78%); max-width:45%; max-height:78%;
 overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain;
 padding:6px 8px; scrollbar-width:thin;
}
#stage #mainMenuDropdown .main-menu-title {min-width:0;margin-left:0;}
#stage #mainMenuDropdown .main-menu-btn {white-space:normal;height:auto;min-height:36px;line-height:1.25;padding:7px 8px;}
/* Keep the original placeholder in its fixed grid cell under the reveal.
   The moving/fading face alone owns boardIn; layout and stagger are unchanged. */
.board-reveal-slot {display:grid;position:relative;flex:none;}
.board-reveal-slot > .card-ui {grid-area:1 / 1;}
.board-reveal-slot > .card-empty-slot {pointer-events:none;}

