/* Winner result card — reach over both player side panels in all three games.
   Scope layout only: preserve the approved card artwork, trophy, score cards,
   rematch controls and winner-left ordering. 2026-11-04. */

/* Dome Duel and Dome Blitz share #replayModal. Its existing fixed overlay is
   viewport-centered; widen only its bordered card, not the game board/panels. */
body:has(#game:not([hidden])) #replayModal.wd-unified-victory .replay-dialog{
  box-sizing:border-box!important;
  width:min(910px,calc(100vw - 24px))!important;
  max-width:none!important;
}

/* Dome Dynasty inserts #replayDialog in normal flow immediately below the
   board. Let it extend equally to the left and right over both player panels,
   without lifting it onto the playing surface or resizing the center track. */
#dynastyRoomStage .room > .center:has(#replayDialog[open]){
  position:relative;
  z-index:20;
  overflow:visible;
}
#dynastyRoomStage #replayDialog.wd-unified-victory[open]{
  box-sizing:border-box!important;
  width:min(calc(100% + clamp(160px,22vw,280px)),calc(100vw - 24px))!important;
  max-width:none!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  z-index:21!important;
}

/* When the two Dynasty player panels stack ABOVE the board, keep the result
   within the board column. Only side-by-side layouts need horizontal overlap. */
@media(max-width:1050px){
  #dynastyRoomStage #replayDialog.wd-unified-victory[open]{
    width:100%!important;
    left:auto!important;
    transform:none!important;
  }
}

/* A completed game has replaced the rack with its result card. Hide the
   obsolete six play buttons instead of allowing their historical negative
   rack-gap margin to position them over the board or result. */
#dynastyRoomStage .center:has(#replayDialog[open]) > .controls{
  display:none!important;
  margin-top:0!important;
}
