/* P401 — viewport-first adaptive HUD. Never scale the world/canvas. */
:root { --p401-available-width: 100vw; --p401-available-height: 100dvh; }
body[data-ui-profile] .hunter-footer {
  max-width:calc(100vw - 12px)!important;
}
body[data-ui-profile] .hunter-status,
body[data-ui-profile] .hunter-chat,
body[data-ui-profile] #chatWindow,
body[data-ui-profile] #huntAnalyzer,
body[data-ui-profile] #extraLootPanel {
  max-width:calc(100vw - 12px)!important;
  max-height:calc(100dvh - 64px)!important;
}
#r306bAuthGate {overflow:auto;padding:12px;}
#r306bAuthGate .r306b-auth-card {
  width:clamp(350px,23vw,430px);
  max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 24px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
@media (max-width:1650px), (max-height:900px) {
  #r306bAuthGate .r306b-auth-card{padding:16px;}
  #r306bAuthGate .r306b-auth-brand p{margin-bottom:12px;}
  #r306bAuthGate .r306b-auth-tabs{margin-bottom:10px;}
  #r306bAuthGate #r306bAuthForm{gap:8px;}
  #r306bAuthGate #r306bGoogleAuth{min-height:40px!important;margin:10px 0 9px!important;}
}
@media (max-width:1100px), (max-height:720px) {
  #r306bAuthGate .r306b-auth-card{padding:12px;}
  #r306bAuthGate .r306b-auth-brand h1{font-size:21px;}
  #r306bAuthGate #r306bAuthForm input{height:34px;}
  #r306bAuthGate .r306b-auth-submit{height:36px;}
}
