/* Single owner for mobile modal / dock geometry. Load after game themes.
   A fixed child outside a short, scrolling <dialog> can be clipped on WebKit.
   Keep the entire dock INSIDE the full-height modal, with scroll space below
   the table. Do not shrink the dialog by the dock height. */
@media (max-width:760px) {
  .game-dialog:is(#game-dialog,#house-dialog,#multi-dialog,#pvp-dialog,#blackjack-dialog,#baccarat-dialog,#roulette-dialog) {
    position:fixed;
    top:var(--game-viewport-top,0px);
    right:0;
    bottom:auto;
    left:0;
    margin:0;
    width:100%;
    max-width:100%;
    height:100vh;
    max-height:100vh;
    height:var(--game-viewport-height,100dvh);
    max-height:var(--game-viewport-height,100dvh);
    min-height:0;
    box-sizing:border-box;
    border:0;
    border-radius:0;
    isolation:auto;
    overflow-x:hidden;
    overflow-y:auto;
    overflow-anchor:none;
    scrollbar-gutter:auto;
    padding-bottom:calc(var(--game-dock-height,240px) + 24px + env(safe-area-inset-bottom,0px));
    scroll-padding-bottom:calc(var(--game-dock-height,240px) + 24px + env(safe-area-inset-bottom,0px));
  }
  .game-dialog .mobile-game-dock,
  .game-dialog .r-mobile-actions {
    position:fixed;
    bottom:calc(var(--dock-keyboard-inset,0px) + max(10px,env(safe-area-inset-bottom,0px)));
    max-height:58vh;
    max-height:calc(var(--game-viewport-height,100dvh) * .58);
    box-sizing:border-box;
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    scroll-padding-block:8px;
    z-index:30;
  }
  #baccarat-dialog .mobile-game-dock.baccarat-dock {
    bottom:var(--dock-keyboard-inset,0px);
    max-height:58vh;
    max-height:calc(var(--game-viewport-height,100dvh) * .58);
  }
}
