/* Keep the auth form scrollable and reserve a separate row for legal links.
   Scoped to authentication: chat and forum viewport geometry is unchanged. */
html:has(.auth-page) body {
  display: flex;
  flex-direction: column;
  height: 100dvh;
}
html:has(.auth-page) #root {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}
html:has(.auth-page) .auth-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}
html:has(.auth-page) .auth-form-panel {
  height: auto;
  min-height: 100%;
  padding-block: 24px;
}
html:has(.auth-page) .auth-card {
  flex-shrink: 0;
  margin-block: auto;
}
html:has(.auth-page) .auth-page::after { display: none; }
html:has(.auth-page) .benty-legal-dock {
  position: static;
  flex: 0 0 auto;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 4px max(8px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
html:has(.auth-page) .benty-legal-dock a {
  min-height: 44px;
  padding-inline: 10px;
  font-size: 12px;
}
.auth-primary { min-height: 44px; }
.auth-register-link button, .auth-submit-group p button,
.auth-password-bottom > p button { min-height: 44px; }
.auth-input-shell:focus-within {
  border-color: #8bbfff;
  box-shadow: 0 0 0 2px #8bbfff26;
}
.auth-card :is(button, input, a):focus-visible,
.benty-legal-dock a:focus-visible { outline: 2px solid #8bbfff; outline-offset: 3px; }
@media (max-width: 720px) {
  .auth-input-shell input { font-size: 16px; }
  .auth-header h1 { width: auto; overflow-wrap: anywhere; }
}
