/* Stable, scroll-contained sign-in experience for mobile and short screens. */
#onlineGate {
  position: fixed;
  inset: 0;
  z-index: 200000;
  box-sizing: border-box;
  display: none;
  min-height: 0;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  align-items: safe center;
  justify-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: linear-gradient(155deg, #f7f1e8 0%, #eee2d2 100%);
  color: #34251d;
  scroll-padding-block: 16px;
}
#onlineGate.show,
.app-auth-pending #onlineGate { display: grid; }
#onlineGate .og-card {
  box-sizing: border-box;
  width: min(100%, 440px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: auto;
  padding: clamp(18px, 5vw, 28px);
  border: 1px solid #e1d1bd;
  border-radius: 20px;
  background: #fffdf9;
  box-shadow: 0 18px 50px rgba(57, 40, 30, .14);
  transform: none !important;
  animation: none !important;
}
#onlineGate .og-card h1 { color: #39281e; line-height: 1.22; }
#onlineGate .og-card p { color: #716052; }
#onlineGate .og-brand-mark { background: #39281e; color: #e8d3ad; }
#onlineGate .og-eyebrow { color: #8a6144 !important; }
#onlineGate .og-form { gap: 10px; }
#onlineGate .og-form input,
#onlineGate .og-form select,
#onlineGate .og-form textarea {
  box-sizing: border-box;
  min-height: 46px;
  border-color: #ddcdbb;
  background: #fff;
  color: #34251d;
}
#onlineGate .og-form input:focus,
#onlineGate .og-form select:focus,
#onlineGate .og-form textarea:focus {
  outline: 3px solid rgba(138, 97, 68, .18);
  border-color: #8a6144;
}
#onlineGate .og-form button:not(.og-google),
#onlineGate .og-button {
  min-height: 46px;
  background: #68432f;
  color: #fffaf3;
}
#onlineGate .og-form button:not(.og-google):hover,
#onlineGate .og-button:hover { background: #503222; }
#onlineGate .og-google {
  min-height: 46px;
  border-color: #ddcdbb !important;
  background: #fffdf9 !important;
  color: #39281e !important;
}
#onlineGate .og-admin-link { color: #68432f; }
#onlineGate .og-error { color: #a33e32; }
#onlineGate [hidden] { display: none !important; }
@media (max-height: 680px) {
  #onlineGate { align-items: start; }
  #onlineGate .og-card { margin-block: 0; }
}
@media (max-width: 760px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .topbar > .crumb,
  .topbar > .top-actions { width: 100%; flex: 0 0 auto; }
  .topbar > .top-actions { display: flex; align-items: stretch; }
  #accountTrialStatus:not([hidden]) {
    order: -1;
    display: block !important;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.4;
    padding: 10px 12px;
    border-color: #68432f !important;
    background: #68432f !important;
    color: #fffaf3 !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #onlineGate *, #onlineGate *::before, #onlineGate *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
