/* Summit Society authentication interaction guard.
   The auth shell must remain the top interactive surface even if another member module
   accidentally leaves a fixed modal/sheet mounted during bootstrap.
   Mobile rules also keep long signup content scroll-reachable and reserve PWA safe areas. */
.member-auth:not([hidden]){
  position:fixed!important;
  inset:0!important;
  width:100%!important;
  min-height:100vh!important;
  min-height:100dvh!important;
  box-sizing:border-box!important;
  z-index:2147483647!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  padding-top:calc(22px + env(safe-area-inset-top,0px))!important;
  padding-right:calc(22px + env(safe-area-inset-right,0px))!important;
  padding-bottom:calc(22px + env(safe-area-inset-bottom,0px))!important;
  padding-left:calc(22px + env(safe-area-inset-left,0px))!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  isolation:isolate!important;
}
.member-auth:not([hidden]) .member-auth-card{
  position:relative!important;
  z-index:1!important;
  flex:0 0 auto!important;
  margin-block:auto!important;
  pointer-events:auto!important;
}
.member-auth:not([hidden]) #memberLoginForm,
.member-auth:not([hidden]) #memberLoginForm input,
.member-auth:not([hidden]) #memberLoginForm button,
.member-auth:not([hidden]) .auth-tabs,
.member-auth:not([hidden]) .auth-tabs button,
.member-auth:not([hidden]) #memberSignupForm,
.member-auth:not([hidden]) #memberSignupForm>input,
.member-auth:not([hidden]) #memberSignupForm>button,
.member-auth:not([hidden]) .signup-avatar-choice,
.member-auth:not([hidden]) .signup-terms-row label,
.member-auth:not([hidden]) .signup-terms-row button,
.member-auth:not([hidden]) a{
  pointer-events:auto!important;
}
.member-auth:not([hidden]) #memberLoginForm input,
.member-auth:not([hidden]) #memberSignupForm>input{
  user-select:text!important;
  -webkit-user-select:text!important;
  touch-action:manipulation!important;
}
#memberAuth:not([hidden])~#memberApp{
  pointer-events:none!important;
}

/* Keep the signup return action visually centered under the active form. */
#guestBackHome{
  display:block!important;
  width:max-content!important;
  max-width:100%!important;
  margin:14px auto 0!important;
  padding:10px 14px!important;
  border:0!important;
  background:transparent!important;
  color:#7c6b56!important;
  font:inherit!important;
  font-size:12px!important;
  line-height:1.4!important;
  text-align:center!important;
  cursor:pointer!important;
}

/* The PHOTO option makes the native picker input available without exposing it visually. */
#memberAuth .signup-photo-input:not([hidden]){
  display:block!important;
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  overflow:hidden!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  pointer-events:none!important;
}

/* PWA / iPhone home-indicator clearance for the persistent member navigation. */
.app{
  padding-bottom:calc(74px + env(safe-area-inset-bottom,0px))!important;
}
.bottom{
  height:calc(68px + env(safe-area-inset-bottom,0px))!important;
  box-sizing:border-box!important;
  padding-bottom:env(safe-area-inset-bottom,0px)!important;
}

/* Keep the legacy terms modal inside the dynamic viewport when it is used. */
.terms-modal{
  box-sizing:border-box!important;
  padding-top:calc(10px + env(safe-area-inset-top,0px))!important;
  padding-right:calc(10px + env(safe-area-inset-right,0px))!important;
  padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;
  padding-left:calc(10px + env(safe-area-inset-left,0px))!important;
}
@supports (height:100dvh){
  .terms-modal-card{max-height:min(92dvh,860px)!important}
}
