/* Shared sign-in geometry for the homepage and app. Keep help text in the
   normal flow, including long addresses and enlarged browser text. */
#auth-pop .auth-card {
  max-height: min(86dvh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

#auth-signin .auth-note,
#auth-signin .wz-error {
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#email-step-send,
#email-step-verify {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem .5rem;
}

#email-alt :is(#email-input, #email-code, #email-sent-note) {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
}

#email-alt button {
  max-width: 100%;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
}

#email-code { scroll-margin-block: 1rem; }

/* Quiet optional paths, shared by landing-page and app sign-in. */
#auth-signin .auth-disclosure { width: 100%; text-align: left; }
#auth-signin .auth-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 44px;
  padding: .5rem 0;
  cursor: pointer;
  list-style: none;
  font-size: .9rem;
}
#auth-signin .auth-disclosure summary::-webkit-details-marker { display: none; }
#auth-signin .auth-disclosure summary::after { content: '+'; font-size: 1.15rem; color: var(--muted, #777); }
#auth-signin .auth-disclosure[open] summary::after { content: '−'; }
#auth-signin .auth-disclosure summary:focus-visible { outline: 2px solid var(--blue, blue); outline-offset: 3px; }
#auth-signin .auth-disclosure-body { padding: .5rem 0 .75rem; text-align: center; }
#auth-signin #invite-options .auth-disclosure-body { display: flex; flex-direction: column; gap: .75rem; align-items: center; }
#auth-signin #invite-options .auth-note { margin: 0; }
#auth-signin #invite-gate { margin: .5rem 0; gap: .25rem; }
#auth-signin #invite-change { display: none; min-height: 44px; font-size: .8rem; }
#auth-signin.invite-ready #invite-options { display: none; }
#auth-signin.invite-ready #invite-change { display: inline-block; }
#auth-signin .wz-error:empty { display: none; }
#auth-signin #gsi-button { margin: .75rem 0; }
#auth-signin #email-alt { border-block: 1px solid var(--line, #e3e3e3); }
#auth-signin #demo-view-btn { margin-top: 1.25rem; min-height: 44px; }
#auth-pop #auth-close { width: 44px; height: 44px; top: 2px; right: 2px; }
/* The faded-out homepage nudge must not intercept taps through the dialog. */
body.modal-open #signin-hint { visibility: hidden; }
