
/* Responsive authentication views: applied only on phone screens. */
@media screen and (max-width:767px){
 html,body.auth-page{width:100%!important;min-width:0!important;max-width:100%!important;overflow-x:hidden!important;box-sizing:border-box!important}
 body.auth-page{min-height:100dvh!important;margin:0!important;padding:16px 12px 26px!important;display:flex!important;align-items:flex-start!important;justify-content:center!important}
 body.auth-page .auth-card{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;margin:0 auto!important;padding:clamp(16px,4vw,24px)!important;border-radius:16px!important}
 body.auth-page .login-brand img{max-width:min(240px,75vw)!important;width:auto!important;height:auto!important;object-fit:contain!important}
 body.auth-page .form-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 body.auth-page form,body.auth-page fieldset,body.auth-page label,body.auth-page .google-registration-panel{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
 body.auth-page input:not([type=checkbox]):not([type=radio]),body.auth-page select,body.auth-page textarea{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;font-size:16px!important}
 body.auth-page button[type=submit],body.auth-page .google-auth-button{max-width:100%!important;min-height:44px!important}
 body.auth-page fieldset{padding:12px!important;margin:12px 0!important}
 body.auth-page h1{font-size:clamp(22px,6vw,28px)!important}
 body.auth-page h2{font-size:clamp(19px,5vw,23px)!important}
 body.auth-page label:has(input[type=checkbox]){display:flex!important;align-items:flex-start!important;gap:9px!important}
 body.auth-page label input[type=checkbox]{flex:0 0 auto!important;margin-top:4px!important}
}

/* v6: override prior align-items:flex-start; only login vertically centered */
@media screen and (max-width:767px){
  html:has(body.auth-page .login-brand),body.auth-page:has(.login-brand){min-height:100%!important}
  body.auth-page:has(.login-brand):not(:has(#regform)){
    min-height:100vh!important;min-height:100dvh!important;
    display:flex!important;flex-direction:column!important;
    justify-content:center!important;align-items:center!important;
    padding:14px 12px!important;box-sizing:border-box!important;
  }
  body.auth-page:not(:has(#regform)) .auth-card{
    margin:auto!important;flex:0 0 auto!important;
    max-height:calc(100dvh - 28px)!important;overflow-y:auto!important;
  }
  body.auth-page #regform > label:has(input[type=checkbox]){
    display:flex!important;flex-direction:row!important;
    align-items:flex-start!important;justify-content:flex-start!important;
    gap:12px!important;width:100%!important;min-width:0!important;
    white-space:normal!important;overflow-wrap:break-word!important;
    line-height:1.45!important;margin:16px 0!important;text-align:left!important;
  }
  body.auth-page #regform > label:has(input[type=checkbox]) input[type=checkbox]{
    display:block!important;position:static!important;flex:0 0 18px!important;
    width:18px!important;height:18px!important;min-width:18px!important;
    margin:2px 0 0!important;transform:none!important;
  }
}
