/* Word Dome signed-in homepage reset — begin the new design from an empty canvas.
   Keep the existing Chandelier-Free Purple Royal Rotunda wallpaper and the
   uploaded Word Dome Royal Crown Emblem trophy centered on the staircase,
   plus the three previously approved right-side homepage shortcuts.
   All controls and routes remain in the DOM; only the HOME view is hidden.
   This must NOT affect sign-in, Grand Hall, game rooms, or other pages.
   The wd-home-flow-test class is used only to run the existing hidden
   gameplay/navigation regression tests without weakening their assertions. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > :not(header.brand.brand-art):not(:where(#rulesModal)),
html:not(.wd-home-flow-test)
/* The original three right-side shortcuts and their optional dialogs stay active.
   Their existing scripts still handle view changes; existing CSS retains exact positions. */
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) > :not(main):not(script):not(style):not(#wdHomeLeaderboards):not(#wdHomeFriends):not(#wdOptionsMobileToggle):not(#wdOptionsBanner):not(#wdOptionsPanelOverlay):not(#wdMessageModal):not(#wdContactOverlay):not(#avatarModal):not(.wd-home-grand-hall-opening){
 display:none!important;
 visibility:hidden!important;
 pointer-events:none!important;
}
/* The old showcase explicitly sets #lobby.card display:block!important.
   Override that more-specific legacy rule, otherwise its doorway leaks through. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > #lobby.card{
 display:none!important;
 visibility:hidden!important;
 pointer-events:none!important;
}
/* Only the approved trophy is displayed; duplicate legacy logo elements
   must not reserve space or move the official artwork. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > header.brand.brand-art{
 display:block!important;
 visibility:visible!important;
 /* Seat the trophy on the central staircase landing at 68% of the viewport
    height. Anchor the BOTTOM of the unchanged logo at that line on desktop,
    tablet and mobile, without changing its size or horizontal centering. */
 top:auto!important;
 bottom:32dvh!important;
 translate:none!important;
}
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > header.brand.brand-art > :is(img.wd-current-logo,img.wd-new-home-logo){
 display:none!important;
}
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > header.brand.brand-art > img.wd-approved-arch-logo{
 display:block!important;
 visibility:visible!important;
 opacity:1!important;
 /* Move only the homepage trophy 2% of its displayed height downward
    from its previous -100% - 8dvh position. Size and X stay identical. */
 translate:0 calc(-98% - 8dvh)!important;
}
/* Keep the existing approved rotunda wallpaper; clear profile overlays
   without introducing another background, graphic, or menu. */


/* Restore the approved avatar selector plus one basic staircase Grand Hall link.
   The Oct 30 logo-only reset still hides the old entrance, computer setup,
   and every other lobby control. Keep trophy/banner and right shortcuts as is.
   The lobby canvas is transparent and does not intercept other clicks. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > #lobby.card{
 display:block!important;visibility:visible!important;pointer-events:none!important;
}
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > #lobby.card > :not(.avatar-section):not(.wd-home-identity-row):not(#wdRoyalMemberPreview):not(#wdGrandEntrance){
 display:none!important;visibility:hidden!important;pointer-events:none!important;
}
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > #lobby.card > :is(.avatar-section,.wd-home-identity-row){
 display:flex!important;visibility:visible!important;pointer-events:auto!important;
}
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > #lobby.card > #wdRoyalMemberPreview:not([hidden]){
 display:flex!important;visibility:visible!important;pointer-events:none!important;
}
/* Keep existing signed-in avatar choice modal functional. The original reset
   hides all main children, so the modal needs this explicit exemption. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > #avatarModal:not([hidden]){
 display:flex!important;visibility:visible!important;pointer-events:auto!important;
 z-index:10010!important;
}

/* Keep the Rules overlay visible when selected from the homepage Options menu.
   The surrounding logo-only reset and hidden state remain unchanged. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) main > #rulesModal:not([hidden]){
 display:grid!important;visibility:visible!important;pointer-events:auto!important;
}
