/* HTNS v260 — stable login layout.
   The login screen stays in normal document flow. No fixed/absolute Install App
   positioning and no dynamic-viewport height lock, eliminating iPhone/PWA jumps. */
html.login-screen-active,
body.login-screen-active{
  width:100% !important;
  min-height:100% !important;
  height:auto !important;
  max-height:none !important;
  overflow:hidden !important;
  overscroll-behavior:none !important;
}

#gate.gate{
  position:relative !important;
  inset:auto !important;
  box-sizing:border-box !important;
  width:100% !important;
  min-height:100svh !important;
  height:auto !important;
  max-height:none !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior-y:contain !important;
  -webkit-overflow-scrolling:touch !important;
  padding:max(10px, env(safe-area-inset-top)) 15px max(10px, env(safe-area-inset-bottom)) !important;
  gap:8px !important;
  align-items:center !important;
  align-content:initial !important;
  justify-content:flex-start !important;
}

#gate .panel{
  flex:0 0 auto !important;
  width:min(calc(100vw - 30px),390px) !important;
  max-width:390px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

#gate #btnInstallApp.login-install-btn{
  position:relative !important;
  inset:auto !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  transform:none !important;
  width:min(calc(100vw - 30px),390px) !important;
  max-width:390px !important;
  min-width:0 !important;
  height:40px !important;
  min-height:40px !important;
  max-height:none !important;
  margin:2px auto 0 !important;
  padding:0 14px !important;
  box-sizing:border-box !important;
  flex:0 0 auto !important;
  z-index:2 !important;
}
#gate #btnInstallApp.login-install-btn:active{
  transform:none !important;
}

#gate #gHint{
  position:relative !important;
  inset:auto !important;
  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;
  transform:none !important;
  width:min(calc(100vw - 30px),520px) !important;
  max-width:520px !important;
  margin:auto auto 0 !important;
  padding:4px 0 0 !important;
  flex:0 0 auto !important;
  z-index:1 !important;
  pointer-events:none !important;
}

@media(max-width:430px){
  #gate.gate{
    padding-left:12px !important;
    padding-right:12px !important;
    gap:7px !important;
  }
  #gate .panel,
  #gate #btnInstallApp.login-install-btn{
    width:min(calc(100vw - 24px),390px) !important;
  }
  #gate #btnInstallApp.login-install-btn{
    height:38px !important;
    min-height:38px !important;
    font-size:12.5px !important;
  }
  #gate #gHint{width:calc(100vw - 24px) !important;}
}
