.kc-auth-surface {
  color: #171a22;
  font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color-scheme: light;
}
.kc-auth-dialog {
  box-sizing: border-box;
  width: min(100% - 2rem, 28rem);
  max-width: none;
  max-height: calc(100% - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid #e1e5ed;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 20px 64px #141a3026;
  overflow: hidden;
  overscroll-behavior: contain;
}
.kc-auth-dialog[open] { animation: kc-auth-enter 170ms ease-out both; }
.kc-auth-dialog::backdrop {
  background: #0c122561;
  backdrop-filter: blur(5px);
  animation: kc-auth-dim 170ms ease-out both;
}
.kc-auth-sheet {
  box-sizing: border-box;
  max-height: calc(100dvh - 2rem - 2px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1.5rem clamp(1.25rem, 5vw, 2rem) 1rem;
}
.kc-auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
/* Same light-surface wordmark treatment used by the storefront. */
.kc-auth-logo { display: block; position: relative; width: 8.5rem; max-width: 100%; }
.kc-auth-logo img { display: block; width: 100%; height: auto; }
.kc-auth-logo .kc-auth-logo-ink { position: absolute; inset: 0; filter: brightness(0); clip-path: inset(0 23.9% 0 0); }
.kc-auth-surface .cl-socialButtons { grid-template-columns: minmax(0, 1fr); }

.kc-auth-close {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 2.75rem; height: 2.75rem; padding: 0;
  color: #293142; background: #f4f6fa;
  border: 1px solid #e6e9ef; border-radius: 50%; cursor: pointer;
}
.kc-auth-close:hover { background: #e9eef9; }
.kc-auth-close:focus-visible, .kc-auth-fallback:focus-visible { outline: 2px solid #064bdc; outline-offset: 3px; }
.kc-auth-loading { color: #565d69; padding-block: .7rem; }
.kc-auth-loading:empty { display: none; }
.kc-auth-fallback { color: #064bdc; text-decoration: underline; }
.kc-auth-surface .cl-rootBox, .kc-auth-surface .cl-cardBox,
.kc-auth-surface .kc-clerk-root, .kc-auth-surface .kc-clerk-box {
  width: 100%; max-width: none; min-width: 0; box-shadow: none; border: 0; background: transparent;
}
.kc-auth-surface .cl-card, .kc-auth-surface .kc-clerk-card {
  width: 100%; max-width: none; min-width: 0; padding: .25rem 0 0;
  box-shadow: none; border: 0; border-radius: 0; background: transparent;
}
.kc-auth-surface .cl-headerTitle, .kc-auth-surface .kc-clerk-title {
  font: 650 clamp(1.55rem, 5vw, 1.85rem)/1.14 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  letter-spacing: -.035em;
}
.kc-auth-surface .cl-headerSubtitle, .kc-auth-surface .kc-clerk-subtitle {
  color: #565d69; font-size: .925rem; line-height: 1.45;
}
.kc-auth-surface .cl-footer, .kc-auth-surface .kc-clerk-footer {
  background: transparent; border: 0; box-shadow: none;
}
.kc-auth-surface .cl-formFieldInput { min-height: 44px; font-size: 16px; }
.kc-auth-surface .cl-formButtonPrimary, .kc-auth-surface .cl-socialButtonsBlockButton { min-height: 44px; }
@media (max-width: 560px) {
  .kc-auth-dialog {
    width: 100%; margin: auto 0 0;
    bottom: var(--kc-auth-bottom, 0px);
    max-height: calc(var(--kc-auth-viewport, 100dvh) - max(12px, env(safe-area-inset-top)));
    border-radius: 1.35rem 1.35rem 0 0;
  }
  .kc-auth-sheet {
    max-height: calc(var(--kc-auth-viewport, 100dvh) - max(12px, env(safe-area-inset-top)) - 2px);
    padding: .85rem max(1.125rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1.125rem, env(safe-area-inset-left));
  }
}
@keyframes kc-auth-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes kc-auth-dim { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .kc-auth-dialog[open], .kc-auth-dialog::backdrop { animation: none; }
}
