/*
 * Dome Duel: 25% larger width and height for all three existing header boxes.
 * Scope: active game board only; Home, Grand Hall and room setup unchanged.
 *
 * 821px+ / tall: previous 480px group, 10px gaps, 153⅓px boxes -> 600px,
 *   12.5px gaps, 191⅔px boxes. 45.6px tall -> 57px.
 * 700–820px: previous 145px boxes + 12px gaps -> 181.25px + 15px gaps.
 * 821px+ / short: previous 180px boxes + 12px gaps -> 225px + 15px gaps.
 * Under 700px: previous 25% width and 26.4px tall -> 31.25% and 33px.
 */
@media(min-width:700px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info{
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:center!important;
  width:600px!important;
  max-width:calc(100vw - 24px)!important;
  gap:12.5px!important;
  margin-left:auto!important;
  margin-right:auto!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > :is(.top-goal,.top-mode,.wd-room-info){
  box-sizing:border-box!important;
  flex:0 0 calc(33.333333% - 8.333333px)!important;
  width:calc(33.333333% - 8.333333px)!important;
  min-width:0!important;
  height:57px!important;
  min-height:57px!important;
  max-height:57px!important;
 }
}
@media(min-width:700px) and (max-width:820px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info{
  width:573.75px!important;
  gap:15px!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > :is(.top-goal,.top-mode,.wd-room-info){
  flex-basis:181.25px!important;
  width:181.25px!important;
 }
}
@media(min-width:821px) and (max-height:699px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info{
  width:705px!important;
  gap:15px!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > :is(.top-goal,.top-mode,.wd-room-info){
  flex-basis:225px!important;
  width:225px!important;
 }
}
@media(max-width:699px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info{
  width:100%!important;
  max-width:100%!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:center!important;
  gap:7.5px!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > :is(.top-goal,.top-mode,.wd-room-info){
  box-sizing:border-box!important;
  flex:0 0 31.25%!important;
  width:31.25%!important;
  min-width:0!important;
  height:33px!important;
  min-height:33px!important;
  max-height:33px!important;
 }
}


/* Reduce the outside Goal and Room boxes by another 20% from the
   previously reduced widths (now 64% of the original enlarged widths).
   Keep the center .top-mode box exactly unchanged. */
@media(min-width:821px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal,
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info{
  width:122.666666px!important;flex:0 0 122.666666px!important;
 }
}
@media(min-width:821px) and (max-height:699px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal,
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info{
  width:144px!important;flex:0 0 144px!important;
 }
}
@media(min-width:700px) and (max-width:820px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal,
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info{
  width:116px!important;flex:0 0 116px!important;
 }
}
@media(max-width:699px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal,
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info{
  width:20%!important;flex:0 0 20%!important;
 }
}


/* Dome Duel official 3D wordmark: reduce its rendered height by ~32% so it
   clears the Word Dome trophy, closer to the 3:1 PNG's natural proportions.
   Preserve the approved width (1.2x), centered position, neighboring Goal
   and Room Code boxes, and gameplay layout. Blitz overrides this separately. */
body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-mode{
 transform:scale(1.2,1.35)!important;
 transform-origin:center center!important;
}
body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-mode > :is(#centerRoomHeading,#modeDisplay){
 transform:scale(0.8333333333,0.5827505828)!important;
 transform-origin:center center!important;
}

/* Goal box typography only: increase GOAL and its numeric value by 25%.
   Do not alter the dimensions, position, borders or typography of adjacent boxes.
   The rules override earlier game-panel-order and mobile inline font sizes. */
@media(min-width:700px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal > span{
  font-size:12.9375px!important; /* 15% increase; GOAL label only */
 }
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal > strong#goalDisplay{
  font-size:21.25px!important; /* previous 17px */
 }
}
@media(max-width:699px){
 /* The narrowed Goal box is too small for enlarged text on one line. */
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal{
  flex-direction:column!important;
  gap:0!important;
  align-items:center!important;
  justify-content:center!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal > span{
  font-size:11.5px!important; /* 15% increase; GOAL label only */
 }
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal > strong#goalDisplay{
  font-size:16.25px!important; /* previous 13px */
 }
}


/* Official Dome Duel 3D Logo.png replaces ONLY the game header's center
   wordmark. The blue/red wordmark stays on a transparent PNG, and the real
   heading remains accessible without painting duplicate lettering. Preserve
   approved player, goal, room, and game-board geometry. */
body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-mode{
 background:transparent url("/Dome%20Duel%203D%20Logo.png?v=duel-3d-logo-20261103") center center / 100% 100% no-repeat!important;
 border:0!important;
 border-radius:0!important;
 box-shadow:none!important;
}
body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-mode > :is(#centerRoomHeading,#modeDisplay){
 opacity:0!important;
}

/* Maintain clearance for 20% wider center plaque at desktop, tablet and
   mobile sizes. The outside Goal and Room box dimensions stay unchanged;
   only horizontal separation grows enough to prevent artwork overlap. */
@media(min-width:821px) and (min-height:700px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info{gap:20px!important}
}
@media(min-width:821px) and (max-height:699px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info{gap:24px!important}
}
@media(min-width:700px) and (max-width:820px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info{gap:19px!important}
}
@media(max-width:699px){
 body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info{gap:3.25vw!important}
}

/* Use a single plaque image layer. The previous ::after duplicate caused
   visible gold fragments over the D and L at this aspect ratio. */
body:not(.wd-gate):has(#game:not([hidden])) #gameTopInfo.top-info > .top-mode::after{
 content:none!important;
}

/* Approved 2026-11-03 Dome Duel Gold Game Banner.
   One complete image replaces the old three floating headers and separate
   in-game wordmark. The baked GOAL and ROOM CODE labels are decorative only;
   the two values remain live text from the existing app state. The shared
   Word Dome trophy, rack, board, room state and Blitz UI are untouched.
   Nov 4 refinement: shrink the full illustrated banner 20% on desktop/iPad,
   with a gentler 10% phone reduction for legibility; keep original header
   flow height so board and rack remain at their approved positions. */
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info:not([hidden]){
 position:relative!important;
 display:block!important;
 isolation:isolate!important;
 width:min(520px,75.2vw)!important;
 max-width:75.2vw!important;
 height:57px!important;
 min-height:57px!important;
 max-height:57px!important;
 margin-left:auto!important;
 margin-right:auto!important;
 overflow:visible!important;
 background:none!important;
 border:0!important;
 box-shadow:none!important;
 transform:none!important;
}
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info::before{
 content:""!important;
 display:block!important;
 position:absolute!important;
 z-index:0!important;
 left:0!important;
 top:-44.5px!important;
 width:100%!important;
 height:140px!important;
 pointer-events:none!important;
 background:transparent url("/Dome%20Duel%20Gold%20Game%20Banner.png?v=duel-gold-header-20261103") center / 100% 100% no-repeat!important;
}
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > :is(.top-goal,.top-mode,.wd-room-info){
 position:absolute!important;
 z-index:1!important;
 top:0!important;
 height:57px!important;
 min-height:57px!important;
 max-height:57px!important;
 min-width:0!important;
 max-width:none!important;
 flex:none!important;
 margin:0!important;
 padding:0!important;
 transform:none!important;
 background:none!important;
 border:0!important;
 border-radius:0!important;
 outline:0!important;
 box-shadow:none!important;
}
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal{
 left:0!important;right:auto!important;width:31%!important;
}
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .top-mode{
 left:31%!important;right:auto!important;width:38%!important;
}
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info{
 right:0!important;left:auto!important;width:31%!important;
}
/* Image already prints these three labels: don't double-paint them. */
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal > span,
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info > #gameRoomHeading,
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .top-mode > :is(#centerRoomHeading,#modeDisplay){
 opacity:0!important;
}
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .top-mode::after{
 content:none!important;display:none!important;
}
/* The values are deliberately NOT part of the PNG: they change with the game. */
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal > #goalDisplay,
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info > #gameRoomName{
 display:block!important;
 position:absolute!important;
 top:64%!important;
 left:50%!important;
 width:96%!important;
 max-width:96%!important;
 height:auto!important;
 margin:0!important;
 padding:0!important;
 transform:translate(-50%,-50%)!important;
 color:#fffdf5!important;
 -webkit-text-fill-color:#fffdf5!important;
 text-align:center!important;
 text-shadow:0 2px 4px #061126,0 0 5px #06112699!important;
 font-size:clamp(12px,1.6vw,20px)!important;
 font-weight:900!important;
 line-height:1.05!important;
 white-space:nowrap!important;
 letter-spacing:.01em!important;
 overflow:visible!important;
}
body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info > #gameRoomName{
 font-family:"Courier New",Courier,monospace!important;
 font-size:clamp(11px,1.45vw,18px)!important;
 letter-spacing:.015em!important;
}
@media(max-width:699px){
 body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info:not([hidden]){
  width:88vw!important;max-width:88vw!important;height:50px!important;min-height:50px!important;max-height:50px!important;
 }
 body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info::before{
  top:-22.5px!important;height:86px!important;
 }
 body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > :is(.top-goal,.top-mode,.wd-room-info){
  height:50px!important;min-height:50px!important;max-height:50px!important;
 }
 body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .top-goal > #goalDisplay{
  top:66%!important;font-size:clamp(12px,3.4vw,16px)!important;
 }
 body:not(.wd-gate):not([data-wd-game-type="blitz"]):has(#game:not([hidden])) #gameTopInfo.top-info > .wd-room-info > #gameRoomName{
  top:66%!important;font-size:clamp(10px,2.9vw,14px)!important;
 }
}
