/* Word Dome gameplay-only responsive sizing. No game logic or tile handlers changed. */
@media (min-width:1100px) {
 body:not(.wd-gate):has(#game:not([hidden])) .game-grid{grid-template-columns:minmax(165px,220px) minmax(0,min(68dvh,720px)) minmax(165px,220px)!important;gap:clamp(8px,1vw,16px)!important}
 body:not(.wd-gate):has(#game:not([hidden])) #board{width:100%!important;box-sizing:border-box!important}
 body:not(.wd-gate):has(#game:not([hidden])) .center-panel .rack-panel{width:100%!important;max-width:none!important;left:auto!important;transform:none!important;margin-top:4px!important}
 body:not(.wd-gate):has(#game:not([hidden])) .left-panel,
 body:not(.wd-gate):has(#game:not([hidden])) .right-panel{padding-top:0!important}
 body:not(.wd-gate):has(#game:not([hidden])) .score-card,
 body:not(.wd-gate):has(#game:not([hidden])) .turn-card,
 body:not(.wd-gate):has(#game:not([hidden])) .timer-card{padding:clamp(5px,.65dvh,10px)!important;margin-bottom:clamp(4px,.7dvh,9px)!important}
 body:not(.wd-gate):has(#game:not([hidden])) .bonus-card{margin-bottom:clamp(4px,.7dvh,9px)!important}
}
@media (min-width:1100px) and (max-height:850px){
 body:not(.wd-gate):has(#game:not([hidden])) .game-grid{grid-template-columns:minmax(150px,195px) minmax(0,min(65dvh,620px)) minmax(150px,195px)!important}
}
@media (min-width:700px) and (max-width:1099px){
 body:not(.wd-gate):has(#game:not([hidden])) .game-grid{display:grid!important;grid-template-columns:minmax(125px,1fr) minmax(0, min(62vw,63dvh)) minmax(125px,1fr)!important;gap:8px!important;align-items:start!important}
 body:not(.wd-gate):has(#game:not([hidden])) .left-panel,
 body:not(.wd-gate):has(#game:not([hidden])) .right-panel{display:block!important;width:auto!important;padding:0!important}
 body:not(.wd-gate):has(#game:not([hidden])) .center-panel{width:100%!important;min-width:0!important}
 body:not(.wd-gate):has(#game:not([hidden])) #board{width:100%!important;box-sizing:border-box!important}
 body:not(.wd-gate):has(#game:not([hidden])) .center-panel .rack-panel{width:100%!important;max-width:none!important;left:auto!important;transform:none!important}
 body:not(.wd-gate):has(#game:not([hidden])) .score-card,
 body:not(.wd-gate):has(#game:not([hidden])) .turn-card,
 body:not(.wd-gate):has(#game:not([hidden])) .timer-card{padding:6px!important;margin-bottom:6px!important}
 body:not(.wd-gate):has(#game:not([hidden])) .actions{gap:4px!important}
 body:not(.wd-gate):has(#game:not([hidden])) .actions button{padding:8px 3px!important}
}
@media (min-width:700px) and (max-width:1099px) and (orientation:portrait){
 body:not(.wd-gate):has(#game:not([hidden])) .game-grid{grid-template-columns:minmax(115px,1fr) minmax(0,64vw) minmax(115px,1fr)!important;gap:5px!important}
}
@media (max-width:699px){
 body:not(.wd-gate):has(#game:not([hidden])) .game-grid{gap:6px!important}
 body:not(.wd-gate):has(#game:not([hidden])) .center-panel .rack-panel{width:100%!important;max-width:100%!important;left:auto!important;transform:none!important}
 body:not(.wd-gate):has(#game:not([hidden])) .score-card,
 body:not(.wd-gate):has(#game:not([hidden])) .turn-card,
 body:not(.wd-gate):has(#game:not([hidden])) .timer-card{padding:6px!important}
}

/* Revision 2: override legacy fixed 676px board and opponent-rack dimensions.
   Keep the existing gameplay logo exactly as it is. */
@media (min-width:1100px){
 body:not(.wd-gate):has(#game:not([hidden])) .game-grid{
  grid-template-columns:minmax(165px,220px) minmax(0,min(53dvh,570px)) minmax(165px,220px)!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) #board{
  width:100%!important;max-width:100%!important;height:auto!important;
  aspect-ratio:1/1!important;margin:0 auto!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) .opponent-rack-panel{
  width:100%!important;max-width:100%!important;box-sizing:border-box!important;
  margin:2px auto 4px!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) .center-panel .rack-panel{
  margin:2px auto 0!important;
 }
}
@media (min-width:1100px) and (max-height:850px){
 body:not(.wd-gate):has(#game:not([hidden])) .game-grid{
  grid-template-columns:minmax(150px,195px) minmax(0,min(51dvh,510px)) minmax(150px,195px)!important;
 }
}
@media (min-width:700px) and (max-width:1099px){
 body:not(.wd-gate):has(#game:not([hidden])) #board{
  width:100%!important;max-width:100%!important;height:auto!important;aspect-ratio:1/1!important;margin:0 auto!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) .opponent-rack-panel{
  width:100%!important;max-width:100%!important;box-sizing:border-box!important;margin:2px auto 4px!important;
 }
 body:not(.wd-gate):has(#game:not([hidden])) .center-panel .rack-panel{margin:2px auto 0!important}
}
