/* FRBC V35.2.1 — iOS reconnect: restore true viewport scroll for welcome and online salon.
 * Loaded AFTER existing V35.2 rules. Mobile portrait only; no changes to 3D,
 * game logic, SHOP styling, desktop or landscape dock. */
@media screen and (orientation:portrait) and (max-width:700px) {
 html:is(.frbc-v28-demo,.frbc-v28-portrait-demo) :is(
  #menu-modal,#frbc-lobby-modal
 ):not([hidden]) {
  position:fixed!important;
  inset:0!important;
  width:100%!important;
  height:100dvh!important;
  max-height:100dvh!important;
  min-height:0!important;
  box-sizing:border-box!important;
  padding:calc(env(safe-area-inset-top,0px) + 8px)
          calc(env(safe-area-inset-right,0px) + 8px)
          calc(env(safe-area-inset-bottom,0px) + 8px)
          calc(env(safe-area-inset-left,0px) + 8px)!important;
  align-items:stretch!important;
  justify-content:center!important;
  overflow:hidden!important;
 }
 html:is(.frbc-v28-demo,.frbc-v28-portrait-demo) :is(
  #menu-modal>.menu-card,#frbc-lobby-modal>.frbc-lobby
 ) {
  display:block!important;
  flex:none!important;
  position:relative!important;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  max-height:100%!important;
  min-height:0!important;
  box-sizing:border-box!important;
  margin:auto!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
 }
 html:is(.frbc-v28-demo,.frbc-v28-portrait-demo) #frbc-lobby-modal #frbc-lobby-players {
  max-height:min(36dvh,340px)!important;
  min-height:0!important;
  overflow-y:auto!important;
 }
 html:is(.frbc-v28-demo,.frbc-v28-portrait-demo) #frbc-lobby-close,
 html:is(.frbc-v28-demo,.frbc-v28-portrait-demo) #menu-close {
  min-width:48px!important;
  min-height:48px!important;
  touch-action:manipulation;
 }
}
