/* v1.8.2.1 — scoped login safeguards; desktop artwork remains unchanged. */
.auth-login-page .auth-card { justify-content: center; justify-content: safe center; }
.auth-login-page .auth-card, .auth-login-page .google-button { min-width: 0; }
.auth-login-page .auth-card .notice { overflow-wrap: anywhere; }

/* A short landscape window must scroll rather than crop the login. */
@media (min-width: 821px) and (max-height: 560px) {
  .auth-login-page { height: auto; min-height: 100vh; overflow-y: auto; }
  .auth-login-page .auth-shell { height: auto; max-height: none; min-height: 0; }
  .auth-login-page .auth-visual, .auth-login-page .auth-card { overflow: visible; }
  .auth-login-page .auth-visual { overflow: hidden; }
}

/* The blue background belongs to the content panel, not 36% of the viewport. */
@media (max-width: 820px) {
  .auth-login-page {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    background: #eef3f9;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .auth-login-page .auth-shell {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    overflow: visible;
  }
  .auth-login-page .auth-visual {
    padding: 22px 20px 28px;
    display: grid;
    align-content: start;
    gap: 12px;
    background: linear-gradient(145deg, #0b2447, #124c83);
    overflow: hidden;
  }
  .auth-login-page .institution-logo { width: 200px; max-width: 90%; max-height: 60px; }
  .auth-login-page .auth-brand { margin: 0; gap: 12px; }
  .auth-login-page .auth-brand > img { width: 48px; height: 48px; flex-shrink: 0; }
  .auth-login-page .auth-brand h1 { font-size: 30px; }
  .auth-login-page .auth-brand span { font-size: 11px; }
  .auth-login-page .auth-visual > h2 {
    margin: 4px 0 0;
    font-size: 28px;
    line-height: 1.15;
    overflow-wrap: normal;
  }
  .auth-login-page .auth-visual > p { font-size: 14px; line-height: 1.5; color: #e4effb; }
  .auth-login-page .auth-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
  .auth-login-page .auth-feature-grid > div { padding: 10px; font-size: 13px; min-height: 44px; }
  .auth-login-page .auth-card {
    width: 100%;
    margin: 0;
    padding: 24px 20px;
    background: #fff;
    border-radius: 0 0 20px 20px;
    box-shadow: none;
    overflow: visible;
    justify-content: flex-start;
  }
  .auth-login-page .auth-card-head { margin-bottom: 20px; }
  .auth-login-page .auth-card h2 { font-size: 28px; }
  .auth-login-page .auth-card > p { font-size: 16px; }
  .auth-login-page .auth-card > p.auth-help { font-size: 13px; }
  .auth-login-page .text-link { min-height: 44px; display: flex; align-items: center; }
  .auth-login-page .a11y-tools {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-end;
    margin: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
  .auth-login-page .a11y-launcher { min-height: 44px; }
  .auth-login-page .a11y-panel { max-width: calc(100vw - 32px); max-height: 70svh; overflow-y: auto; }
}
@media (max-width: 360px) {
  .auth-login-page .auth-visual, .auth-login-page .auth-card { padding-left: 16px; padding-right: 16px; }
  .auth-login-page .auth-brand h1 { font-size: 27px; }
  .auth-login-page .auth-visual > h2 { font-size: 25px; }
  .auth-login-page .auth-card h2 { font-size: 25px; }
}
