/* InazumArcade v402 · FF Online mobile host-transfer visibility hardfix.
   The v401 rule depended on html.ia-real-phone-mode. Some landscape phones
   expose a desktop-like viewport and never receive that class, so DAI HOST
   could be present but squeezed/clipped by the member action rail. */

/* Never allow a theme or old mobile rule to suppress the host-transfer control. */
#screen-lobby .ia400-host-btn{
  display:inline-flex!important;
  visibility:visible!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
  flex:0 0 auto!important;
  width:auto!important;
  max-width:none!important;
  min-width:88px!important;
  min-height:32px!important;
  margin:0!important;
  position:relative!important;
  inset:auto!important;
  z-index:2!important;
  opacity:1!important;
  white-space:nowrap!important;
}
#screen-lobby .ia400-host-btn:disabled{
  display:inline-flex!important;
  visibility:visible!important;
  opacity:.48!important;
}

/* Real phones can report very wide CSS viewports in landscape. Detect touch
   capability too, rather than relying only on width or ia-real-phone-mode. */
@media (hover:none), (pointer:coarse){
  #screen-lobby #lobbyMembers{
    overflow:visible!important;
  }
  #screen-lobby .member-row.ia397-member-row{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:start!important;
    gap:7px!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
    padding-top:10px!important;
    padding-bottom:10px!important;
  }
  #screen-lobby .member-row.ia397-member-row>span:first-child{
    min-width:0!important;
    max-width:100%!important;
    overflow-wrap:anywhere!important;
  }
  #screen-lobby .ia397-member-actions{
    display:flex!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    align-items:center!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
    gap:6px!important;
    overflow:visible!important;
  }
  #screen-lobby .ia400-host-btn,
  #screen-lobby .ia397-kick-btn{
    flex:0 0 auto!important;
    min-width:88px!important;
    min-height:32px!important;
    margin:0!important;
  }
}

/* Landscape-phone compacting: controls stay on a visible second line instead
   of being clipped from the right edge. */
@media (hover:none) and (orientation:landscape) and (max-height:620px),
       (pointer:coarse) and (orientation:landscape) and (max-height:620px){
  #screen-lobby .member-row.ia397-member-row{
    padding-top:7px!important;
    padding-bottom:7px!important;
    gap:5px!important;
  }
  #screen-lobby .ia397-member-actions{gap:5px!important}
  #screen-lobby .ia400-host-btn,
  #screen-lobby .ia397-kick-btn{
    min-width:82px!important;
    min-height:30px!important;
    font-size:9px!important;
    padding:5px 8px!important;
  }
}
