/* Signed-in homepage only: approved flat-arch Grand Hall Rotunda Entrance
   background, with doors and carpet baked into the image. No duplicate artwork. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]){
  background:#061638 url('/Grand%20Hall%20Rotunda%20Entrance.png?v=grand-hall-rotunda-entrance-20261101') center top / cover no-repeat!important;
}
/* Preserve the real navigation button, but make it an invisible, accurately
   positioned hotspot over the doors already painted into the wallpaper.
   Geometry is computed from the cover scaling in home-celestial-entrance.js. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card > #wdGrandEntrance{
  --wd-grand-simple-link:1;
  display:block!important;position:absolute!important;visibility:visible!important;
  left:var(--wd-celestial-door-left,42vw)!important;
  top:var(--wd-celestial-door-top,46dvh)!important;
  width:var(--wd-celestial-door-width,16vw)!important;
  height:var(--wd-celestial-door-height,18dvh)!important;
  min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;
  aspect-ratio:auto!important;
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  transform:none!important;translate:none!important;scale:1!important;zoom:1!important;
  background:transparent!important;box-shadow:none!important;filter:none!important;
  overflow:visible!important;pointer-events:auto!important;cursor:pointer!important;
  z-index:4!important;
}
/* Don't expose a temporary misplaced link before the background dimensions
   are known. Still keep keyboard focus outlines and the accessible label. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card > #wdGrandEntrance:not([data-wd-celestial-positioned="true"]){
  visibility:hidden!important;
}
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card > #wdGrandEntrance :is(.wd-grand-entrance-art,.wd-home-royal-entrance-art,.wd-grand-open-interior,.wd-grand-leaf){
  display:none!important;visibility:hidden!important;
}
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card > #wdGrandEntrance:hover{
  background:transparent!important;box-shadow:none!important;
}


/* Raise only the complete avatar profile 15% of its actual outer frame height.
   All four live profile layers move together; logo, dome, doorway and menus
   retain their current coordinates. The frame is 1.071509 times the base height. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card{
 --wd-avatar-panel-rise:calc(var(--wd-regal-height) * .16072635 + var(--wd-avatar-logo-pair-rise));
}
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card::before,
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card > .wd-home-identity-row,
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card > .avatar-section,
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card > #wdRoyalMemberPreview:not([hidden]){
 translate:0 calc(-1 * var(--wd-avatar-panel-rise))!important;
}

/* Shrink ONLY the decorative background frame by 10%, anchored around its
   existing center after the approved upward movement. Do not scale or move
   live name/rating, membership crest, avatar tile or chooser button. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card::before{
 scale:.9!important;
 transform-origin:center center!important;
}

/* Lower the Word Dome logo and entire avatar selector in tandem another 2%
   of the CURRENT 90%-scaled decorative avatar frame height. Previously,
   their shared offset was zero. A 2% downward movement means a negative
   upward offset of -.02 * 1.071509 * .90 = -.019287162 base profile heights.
   The avatar's original separate 15% upward offset remains unchanged.
   Both elements use the exact same responsive pixel distance. */
html:not(.wd-home-flow-test)
body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]){
 --wd-avatar-logo-pair-rise:calc(clamp(440px,41vw,700px) * .341615 * -.019287162);
}
/* The profile's approved 85% perspective reduction is desktop mouse-only. */
@media (min-width:1151px) and (hover:hover) and (pointer:fine){
 html:not(.wd-home-flow-test)
 body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]){
  --wd-avatar-logo-pair-rise:calc(clamp(440px,41vw,700px) * .85 * .341615 * -.019287162);
 }
}
@media (max-width:850px){
 html:not(.wd-home-flow-test)
 body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]){
  --wd-avatar-logo-pair-rise:calc(min(95vw,620px) * .341615 * -.019287162);
 }
}
@media (max-width:480px){
 html:not(.wd-home-flow-test)
 body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]){
  --wd-avatar-logo-pair-rise:calc(96vw * .341615 * -.019287162);
 }
}
/* Maintain the logo's exact existing translation as a baseline.
   Change only its Y offset, by the very same number of CSS pixels used
   for the avatar frame/name/rating/crest/avatar/chooser. */
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{
 translate:0 calc(-98% - 8dvh - var(--wd-avatar-logo-pair-rise))!important;
}
@media (min-width:1151px) and (hover:hover) and (pointer:fine){
 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{
  translate:0 calc(-90.775% - 13dvh - var(--wd-avatar-logo-pair-rise))!important;
 }
}


/* Homepage profile width +15% (November 2, 2026).
   Only the decorative box changes. The original interior PNG content stays
   pixel-for-pixel in its previous position via five-slice rendering. The
   two outer sides each move outward by 7.5% of the old displayed width.
   Keep all live elements, height, vertical position, trophy, door and tabs fixed.
   Keep the existing phone-width layout to prevent side clipping. */
@media (min-width:700px){
 html:not(.wd-home-flow-test)
 body:not(.wd-gate):has(#lobby:not([hidden])):has(#game[hidden]) #lobby.card::before{
  width:calc(var(--wd-regal-width) * 1.220035)!important;
  left:calc(var(--wd-regal-left) - var(--wd-regal-width) * .1100175)!important;
  background-image:url('/home-avatar-panel-extended-115.svg')!important;
 }
}


/* Two-second Grand Hall entry: ONLY the two door leaves swing.
   This fixed, noninteractive snapshot covers the existing painted doors,
   leaving the sign, arch, profile, trophy and all homepage controls untouched. */
.wd-home-grand-hall-opening{
 position:fixed;z-index:2147483000;pointer-events:none;
 padding:0;margin:0;border:0;overflow:visible;isolation:isolate;
 perspective:1000px;transform-style:preserve-3d;
}
/* The original homepage and its double doors remain untouched. During the
   two-second door swing only, reveal the INTERIOR of the actual user-approved
   'Word Dome Grand Hall Carpet Continuity.png'. Never show the PNG's static
   avatar, rating, sign or logo over the live homepage.
   Source image: 1477 × 1065. Map pixel rectangle x=534..870 (336px),
   y=522..719 (197px) into the original door opening. This aligns both
   gold border bands with the foreground runner and ends on plain blue
   carpet, above the next ornament's tip that previously became a yellow dot.
   Keep the original wallpaper, opening geometry and door leaves unchanged.
   background-size = source/crop; position = crop origin/(source-crop). */
.wd-home-grand-hall-interior{
 position:absolute;inset:0;z-index:0;
 background-image:url('/Word%20Dome%20Grand%20Hall%20Carpet%20Continuity.png?v=approved-door-carpet-20261102');
 background-repeat:no-repeat;
 background-size:439.583333% 540.609137%;
 background-position:46.801052% 60.138249%;
 background-color:#09122b;
 box-shadow:inset 0 0 10px 2px rgba(2,9,29,.18);
}

.wd-home-grand-hall-leaf{
 display:block;position:absolute;top:0;height:100%;width:50%;
 padding:0;margin:0;border:0;backface-visibility:hidden;
 transform:rotateY(0deg);transform-style:preserve-3d;
 transition:transform 1.8s cubic-bezier(.24,.72,.23,1);
 will-change:transform;
}
.wd-home-grand-hall-left{left:0;transform-origin:left center;z-index:2}
.wd-home-grand-hall-right{right:0;transform-origin:right center;z-index:2}
.wd-home-grand-hall-swinging .wd-home-grand-hall-left{transform:rotateY(-87deg)}
.wd-home-grand-hall-swinging .wd-home-grand-hall-right{transform:rotateY(87deg)}
@media(prefers-reduced-motion:reduce){
 .wd-home-grand-hall-leaf{transition-duration:0s}
}

/* Supersede the earlier approximate SVG trapezoid: the complete carpet
   pattern is now taken directly from the user's approved PNG crop. */
.wd-home-grand-hall-interior::after{
 content:none!important;display:none!important;
}

