/* Dome Duel ONLY — approved simple gold-framed red and blue choice modal.
   The shared #onlineOptions is also used by Dome Blitz: all styling here
   requires .wd-duel-setup and cannot affect Blitz or Dome Dynasty. */
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup{
 box-sizing:border-box!important;
 width:min(92vw,640px)!important;
 max-width:calc(100vw - 20px)!important;
 max-height:calc(100dvh - 24px)!important;
 overflow-y:auto!important;
 padding:clamp(21px,3.6vw,36px) clamp(18px,3vw,33px)!important;
 border:3px solid #f5bc42!important;
 border-radius:24px!important;
 background:linear-gradient(155deg,#061840 0%,#111749 44%,#310b38 100%)!important;
 color:#fff2d8!important;
 text-align:center!important;
 box-shadow:inset 0 0 0 2px #b27824,inset 0 0 16px #080d25,0 14px 48px #08091dcc,0 0 12px #f9b62f6a!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > h2{
 margin:0!important;
 padding:0!important;
 color:#ffd76c!important;
 font:bold clamp(26px,4vw,43px)/1.13 Georgia,'Times New Roman',serif!important;
 letter-spacing:.025em!important;
 text-shadow:0 2px 2px #101335!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > h2::after{
 content:"";
 display:block;
 width:min(80%,390px);
 height:18px;
 margin:15px auto 32px;
 background:
  linear-gradient(45deg,#f9df7d,#b27b12) center/13px 13px no-repeat,
  linear-gradient(90deg,transparent,#ffce5c 25%,transparent 44%,transparent 56%,#ffce5c 75%,transparent) center/100% 2px no-repeat;
}
/* Players already know what the two choices mean. This is presentation-only;
   leave all existing mode-choice logic and room/settings data unchanged. */
#onlineOptions.wd-duel-setup > .online-options-intro,
#onlineOptions.wd-duel-setup > .wd-duel-entry-note{display:none!important}
#onlineOptions.wd-duel-setup > .wd-entry-modes{
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 align-items:stretch!important;
 gap:clamp(10px,2.2vw,20px)!important;
 width:100%!important;
 margin:0 auto clamp(29px,5vw,45px)!important;
}
#onlineOptions.wd-duel-setup > .wd-entry-modes > button{
 box-sizing:border-box!important;
 display:flex!important;
 align-items:center!important;
 justify-content:center!important;
 width:100%!important;
 min-width:0!important;
 min-height:clamp(94px,12vw,124px)!important;
 margin:0!important;
 padding:13px 12px!important;
 border:3px solid #ffc957!important;
 border-radius:20px!important;
 font:bold clamp(16px,2.2vw,26px)/1.14 Georgia,'Times New Roman',serif!important;
 white-space:normal!important;
 cursor:pointer!important;
 box-shadow:inset 0 2px 3px #fff9c98c,inset 0 -4px 6px #150a33aa,0 4px 8px #080b2488!important;
 transition:filter .15s ease,box-shadow .15s ease!important;
}
#onlineOptions.wd-duel-setup > .wd-entry-modes > #duelComputerMode,
#onlineOptions.wd-duel-setup > .wd-entry-modes > #duelComputerMode[aria-pressed="true"]{
 background:linear-gradient(180deg,#3492eb 0%,#115bb7 45%,#052c72 100%)!important;
 color:#ffe48f!important;
 -webkit-text-fill-color:#ffe48f!important;
}
#onlineOptions.wd-duel-setup > .wd-entry-modes > #duelTwoPlayerMode,
#onlineOptions.wd-duel-setup > .wd-entry-modes > #duelTwoPlayerMode[aria-pressed="true"]{
 background:linear-gradient(180deg,#d55259 0%,#a92237 48%,#5e1026 100%)!important;
 color:#ffe48f!important;
 -webkit-text-fill-color:#ffe48f!important;
}
#onlineOptions.wd-duel-setup > .wd-entry-modes > button:hover{filter:brightness(1.12)!important}
/* Match Dynasty's dark, movable selection frame while leaving Duel's
   approved blue and red button backgrounds untouched. */
#onlineOptions.wd-duel-setup > .wd-entry-modes > button[aria-pressed="true"]{
 border:6px solid #1b0b24!important;
 outline:2px solid #f7cf69!important;
 outline-offset:1px!important;
 box-shadow:inset 0 0 0 2px #d9a648,0 0 0 4px #1b0b24,0 4px 12px #0c0415b8!important;
}
#onlineOptions.wd-duel-setup > .wd-entry-modes > button:focus-visible,
#onlineOptions.wd-duel-setup > .online-options-back:focus-visible{
 outline:3px solid #fff4b7!important;
 outline-offset:3px!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > .online-options-back{
 box-sizing:border-box!important;
 display:block!important;
 width:auto!important;
 max-width:100%!important;
 min-height:51px!important;
 margin:0 auto!important;
 padding:11px clamp(15px,3vw,28px)!important;
 border:3px solid #f8c453!important;
 border-radius:15px!important;
 background:linear-gradient(180deg,#305ca8 0%,#0f3273 47%,#081846 100%)!important;
 color:#ffe18a!important;
 font:bold clamp(14px,2vw,22px)/1.16 Georgia,'Times New Roman',serif!important;
 box-shadow:inset 0 2px 2px #fff3a366,0 3px 7px #080e2980!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > .online-options-back:hover{filter:brightness(1.1)!important}
/* Chosen modes keep the same settings underneath, just shrink the
   selection cards so goal, timer, difficulty, and room controls stay usable. */
#onlineOptions.wd-duel-setup:not(.wd-duel-await-choice) > h2::after{margin:9px auto 14px}
#onlineOptions.wd-duel-setup:not(.wd-duel-await-choice) > .wd-entry-modes{
 gap:10px!important;
 margin-bottom:12px!important;
}
#onlineOptions.wd-duel-setup:not(.wd-duel-await-choice) > .wd-entry-modes > button{
 min-height:58px!important;
 padding:9px 8px!important;
 font-size:clamp(14px,1.7vw,18px)!important;
 border-radius:12px!important;
}
@media(max-width:480px){
 body.wd-grand-hall-modal #onlineOptions.wd-duel-setup{
  width:calc(100vw - 22px)!important;
  padding:22px 14px!important;
  border-radius:18px!important;
 }
 body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > h2{font-size:clamp(23px,6vw,30px)!important}
 #onlineOptions.wd-duel-setup > h2::after{margin:10px auto 24px}
 #onlineOptions.wd-duel-setup > .wd-entry-modes{gap:9px!important;margin-bottom:27px!important}
 #onlineOptions.wd-duel-setup > .wd-entry-modes > button{
  min-height:90px!important;
  padding:10px 7px!important;
  border-radius:13px!important;
  font-size:clamp(14px,4vw,19px)!important;
 }
 body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > .online-options-back{font-size:clamp(13px,3.7vw,17px)!important}
}
@media(prefers-reduced-motion:reduce){
 #onlineOptions.wd-duel-setup > .wd-entry-modes > button{transition:none!important}
}

/* iPad-only Dome Duel setup: match the already-approved compact PC controls.
   The iPad's synthetic select wrappers normally stretch to the modal's width.
   Limit Computer Level and Room Type to their desktop 282px footprint.
   Keep Goal + Timer (310px combined), the 310px room code, room actions,
   artwork, button hit areas and the actual select values/handlers unchanged. */
@media (min-width:700px) and (pointer:coarse) {
  body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > .wd-duel-level {
    box-sizing:border-box!important;
    display:block!important;
    width:min(100%,282px)!important;
    max-width:282px!important;
    margin:0 auto 10px!important;
  }
  body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > .wd-duel-level > .wd-touch-select-wrap {
    width:100%!important;
    max-width:100%!important;
  }
  body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > label[for="onlineRated"] + .wd-touch-select-wrap {
    box-sizing:border-box!important;
    display:block!important;
    width:min(100%,282px)!important;
    max-width:282px!important;
    margin:7px auto 5px!important;
  }
}

/* Dome Duel's uploaded 3D blue/red wordmark replaces the old setup text
   and ornamental divider. Keep the real h2 in the accessible DOM and use
   the single PNG as visible art. This rule is scoped off of Dome Blitz. */
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > h2#grandHallSetupTitle{
 box-sizing:border-box!important;
 display:block!important;
 width:min(100%,520px)!important;
 height:clamp(105px,16vw,155px)!important;
 min-height:0!important;
 margin:0 auto clamp(14px,2.5vw,22px)!important;
 padding:0!important;
 font-size:0!important;
 line-height:0!important;
 color:transparent!important;
 background:transparent url("/Dome%20Duel%203D%20Logo.png?v=duel-3d-logo-20261103") center / contain no-repeat!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > h2#grandHallSetupTitle::after{
 content:none!important;
 display:none!important;
}
@media(max-width:480px){
 body.wd-grand-hall-modal #onlineOptions.wd-duel-setup > h2#grandHallSetupTitle{
  height:clamp(82px,24vw,118px)!important;
  margin-bottom:12px!important;
 }
}


/* Duel computer setup only: room rating is inherently unrated for a
   computer opponent. Preserve #onlineRated and its value for the launch
   handler, while removing the redundant field (and its iPad touch wrapper)
   from the visible layout. Two-player room types remain selectable. */
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup.wd-duel-computer-choice > label[for="onlineRated"],
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup.wd-duel-computer-choice > #onlineRated,
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup.wd-duel-computer-choice > label[for="onlineRated"] + .wd-touch-select-wrap,
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup.wd-duel-computer-choice .wd-touch-select-wrap:has(#onlineRated){
 display:none!important;
}
/* Equal-width launch/navigation buttons and equal 20px vertical gaps.
   Do not move or modify buttons in the Duel 2-player or Blitz setup. */
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup.wd-duel-computer-choice > .wd-duel-level{
 margin:0 auto!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup.wd-duel-computer-choice > .online-options-actions{
 display:flex!important;
 justify-content:center!important;
 margin:20px auto!important;
}
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup.wd-duel-computer-choice > .online-options-actions > #duelSetupComputer,
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup.wd-duel-computer-choice > .online-options-back{
 box-sizing:border-box!important;
 width:min(100%,355px)!important;
 max-width:100%!important;
 min-height:51px!important;
 margin:0 auto!important;
}

/* Dome Duel 2-player entry: Create Room, Join Room and Return to
   The Grand Hall share a 355px width. Match the computer entry's
   responsive button width without affecting either game mode's logic. */
body.wd-grand-hall-modal #onlineOptions.wd-duel-setup:not(.wd-duel-computer-choice):not(.wd-duel-await-choice) :is(#create,#join,#backToAvatar){
 box-sizing:border-box!important;
 width:min(100%,355px)!important;
 max-width:100%!important;
 display:block!important;
 margin-left:auto!important;
 margin-right:auto!important;
}
