/* Dome Duel, Dome Blitz, Dome Dynasty — approved question-only rematch
   prompt. The full board, winner announcement, final-word glow and both
   player score panels remain outside this compact decision card. 2026-11-05. */

/* These elements remain in the DOM only for the existing, shared game-state
   renderers; they must never appear in the rematch box. */
body:has(#game:not([hidden])) #replayModal.wd-unified-victory .victory-finalists,
#dynastyRoomStage #replayDialog.wd-unified-victory .victory-finalists,
body:has(#game:not([hidden])) #replayModal.wd-unified-victory #replayCountdown,
#dynastyRoomStage #replayDialog.wd-unified-victory #replayCountdown{
 display:none!important;
 visibility:hidden!important;
}

/* Match the same clean blue-and-gold prompt in the Duel/Blitz result overlay. */
body:has(#game:not([hidden])) #replayModal.wd-unified-victory .replay-dialog{
 box-sizing:border-box!important;
 display:flex!important;
 flex-direction:column!important;
 justify-content:center!important;
 align-items:center!important;
 gap:18px!important;
 width:min(560px,calc(100vw - 24px))!important;
 max-width:calc(100vw - 24px)!important;
 min-height:146px!important;
 height:auto!important;
 padding:22px clamp(16px,3vw,28px)!important;
 overflow:visible!important;
}

/* Dynasty's result stays in normal flow directly below its board, with no
   vacant left-hand finalist track and no sideways overlap or clipping. */
#dynastyRoomStage #replayDialog.wd-unified-victory[open]{
 box-sizing:border-box!important;
 display:flex!important;
 flex-direction:column!important;
 justify-content:center!important;
 align-items:center!important;
 gap:18px!important;
 grid-template-columns:none!important;
 grid-template-rows:none!important;
 grid-template-areas:none!important;
 width:min(560px,100%)!important;
 max-width:100%!important;
 min-height:146px!important;
 height:auto!important;
 left:auto!important;
 right:auto!important;
 transform:none!important;
 margin:12px auto 10px!important;
 padding:22px clamp(12px,3vw,28px)!important;
 overflow:visible!important;
}

/* The only visible copy inside the box. */
body:has(#game:not([hidden])) #replayModal.wd-unified-victory .replay-question,
#dynastyRoomStage #replayDialog.wd-unified-victory .replay-question{
 display:block!important;
 position:static!important;
 grid-area:auto!important;
 align-self:center!important;
 width:100%!important;
 margin:0!important;
 padding:0!important;
 text-align:center!important;
 color:#fff5d7!important;
 font:700 clamp(18px,2.2vw,25px)/1.22 Georgia,serif!important;
 text-shadow:0 1px 2px #08172b!important;
}

body:has(#game:not([hidden])) #replayModal.wd-unified-victory .replay-actions,
#dynastyRoomStage #replayDialog.wd-unified-victory .replay-actions{
 grid-area:auto!important;
 display:flex!important;
 flex-wrap:nowrap!important;
 align-self:center!important;
 justify-content:center!important;
 align-items:center!important;
 width:min(360px,100%)!important;
 max-width:100%!important;
 min-width:0!important;
 gap:14px!important;
 margin:0!important;
 padding:0!important;
}

body:has(#game:not([hidden])) #replayModal.wd-unified-victory .replay-actions > button,
#dynastyRoomStage #replayDialog.wd-unified-victory .replay-actions > button{
 box-sizing:border-box!important;
 flex:1 1 0!important;
 min-width:0!important;
 max-width:170px!important;
 min-height:44px!important;
 margin:0!important;
 padding:8px 12px!important;
 font-size:clamp(15px,1.6vw,19px)!important;
}

@media(max-width:480px){
 body:has(#game:not([hidden])) #replayModal.wd-unified-victory .replay-dialog,
 #dynastyRoomStage #replayDialog.wd-unified-victory[open]{
  min-height:132px!important;
  gap:14px!important;
  padding:16px 12px!important;
 }
}

/* Dynasty only: reduce the approved question-only rematch card AND both
   answer buttons to 80% of their previous authored dimensions.
   Do not change Duel/Blitz or the large winner banner above the board. */
#dynastyRoomStage #replayDialog.wd-unified-victory[open]{
 width:min(448px,80%)!important;  /* 560px × .8; also shrinks with narrow boards */
 max-width:80%!important;
 min-height:116.8px!important;  /* 146px × .8 */
 gap:14.4px!important;         /* 18px × .8 */
 padding:17.6px clamp(9.6px,2.4vw,22.4px)!important;
}
#dynastyRoomStage #replayDialog.wd-unified-victory .replay-question{
 font-size:clamp(14.4px,1.76vw,20px)!important;
}
#dynastyRoomStage #replayDialog.wd-unified-victory .replay-actions{
 width:min(288px,100%)!important;
 gap:11.2px!important;
}
#dynastyRoomStage #replayDialog.wd-unified-victory .replay-actions > button{
 max-width:136px!important;   /* 170px × .8 */
 min-height:35.2px!important; /* 44px × .8 */
 padding:6.4px 9.6px!important;
 font-size:clamp(12px,1.28vw,15.2px)!important;
}
@media(max-width:480px){
 #dynastyRoomStage #replayDialog.wd-unified-victory[open]{
  min-height:105.6px!important; /* compact 132px × .8 */
  gap:11.2px!important;
  padding:12.8px 9.6px!important;
 }
}

/* Dome Dynasty only — thinner approved gold Play Again / waiting frame.
   Preserve the card's blue fill, size, typography, buttons and placement;
   Duel and Blitz rematch frames are unchanged. */
#dynastyRoomStage #replayDialog.wd-unified-victory[open]{
 border:2px solid #ffe188!important; /* previous outer stroke: 4px */
 box-shadow:inset 0 0 0 1px #a86910,0 17px 57px #000d!important; /* inner: 2px to 1px */
}

/* Dome Dynasty: restore the original server-synchronized 20-second
   Play Again decision countdown, between the question and YES/NO.
   The question-only card still omits avatars, scores and trophies; this
   override does not expose the countdown in Dome Duel or Dome Blitz. */
#dynastyRoomStage #replayDialog.wd-unified-victory[open] #replayCountdown{
 display:block!important;
 visibility:visible!important;
 position:static!important;
 grid-area:auto!important;
 align-self:center!important;
 width:100%!important;
 max-width:100%!important;
 margin:0!important;
 padding:0!important;
 text-align:center!important;
 font:700 clamp(13px,1.45vw,16px)/1.2 Georgia,serif!important;
 color:#ffe6a5!important;
 text-shadow:0 1px 2px #07152c!important;
}
