/* Bark & Style public authentication dialog. */
@media (max-width: 680px) {
  #screen-auth .landing-page .landing-topbar-actions .landing-link-btn {
    display: inline-flex;
  }
}

#landing-auth-modal {
  padding: 24px;
  overflow-y: auto;
  background: rgba(37, 31, 27, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

#landing-auth-modal .auth-panel {
  width: min(100%, 460px);
  max-width: 460px;
  min-height: 0;
  max-height: calc(100vh - 48px);
  justify-content: flex-start;
  padding: 34px 36px 32px;
  overflow-y: auto;
  border: 1px solid rgba(91, 64, 49, 0.08);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(44, 31, 24, 0.22);
  scrollbar-width: thin;
  scrollbar-color: #ddd3cc transparent;
}

#landing-auth-modal .auth-panel::after { display: none; }

#landing-auth-modal.show .auth-panel {
  animation: auth-panel-enter 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes auth-panel-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

#landing-auth-modal .landing-auth-modal-close {
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f8f4f1;
  color: #6f625a;
  box-shadow: none;
  transition: background 160ms ease, color 160ms ease;
}

#landing-auth-modal .landing-auth-modal-close:hover {
  color: #c54122;
  background: #fff0e9;
}

#landing-auth-modal .landing-auth-modal-close:focus-visible,
#landing-auth-modal button:focus-visible,
#landing-auth-modal a:focus-visible {
  outline: 3px solid rgba(227, 77, 40, 0.18);
  outline-offset: 2px;
}

#landing-auth-modal .auth-brand {
  min-height: 52px;
  margin: 0 52px 26px 0;
}

#landing-auth-modal .auth-brand-logo {
  display: block;
  width: 76px;
  height: auto;
  object-fit: contain;
}

#landing-auth-modal .auth-heading {
  margin: 0 0 7px;
  color: #28221e;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

#landing-auth-modal .auth-sub {
  max-width: 360px;
  margin: 0 0 25px;
  color: #71665f;
  font-size: 13.5px;
  line-height: 1.55;
}

#landing-auth-modal .auth-form-body { width: 100%; }
#landing-auth-modal .frow { gap: 12px; }
#landing-auth-modal .fgroup { margin-bottom: 15px; }

#landing-auth-modal .fgroup label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  color: #584f49;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.055em;
}

#landing-auth-modal .auth-optional {
  color: #9b8f87;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

#landing-auth-modal .fgroup input,
#landing-auth-modal .fgroup select {
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid #e5ddd7;
  border-radius: 12px;
  color: #302923;
  background: #fbf9f7;
  box-shadow: none;
}

#landing-auth-modal .fgroup input::placeholder { color: #9e958e; }

#landing-auth-modal .fgroup input:hover,
#landing-auth-modal .fgroup select:hover {
  border-color: #d8cdc5;
  background: #fff;
}

#landing-auth-modal .fgroup input:focus,
#landing-auth-modal .fgroup select:focus {
  border-color: #e34d28;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(227, 77, 40, 0.1);
}

#landing-auth-modal .password-toggle {
  right: 7px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

#landing-auth-modal .password-toggle:hover {
  color: #c54122;
  background: #fff0e9;
}

#landing-auth-modal .btn-auth,
#landing-auth-modal .auth-otp-verify-btn {
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #e34d28;
  box-shadow: 0 9px 20px rgba(227, 77, 40, 0.18);
  font-size: 14px;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

#landing-auth-modal .btn-auth:hover,
#landing-auth-modal .auth-otp-verify-btn:hover {
  transform: translateY(-1px);
  background: #c54122;
  box-shadow: 0 11px 24px rgba(197, 65, 34, 0.22);
}

#landing-auth-modal .btn-auth:disabled,
#landing-auth-modal .auth-otp-verify-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

#landing-auth-modal .auth-switch {
  margin-top: 13px;
  color: #81766e;
  font-size: 12px;
}

#landing-auth-modal .auth-switch a {
  color: #cf4626;
  font-weight: 800;
}

#landing-auth-modal .auth-recovery-link { text-align: right; }

#landing-auth-modal .msg-error {
  margin-bottom: 15px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: #a52f20;
  background: #fff0ed;
  font-size: 12px;
  line-height: 1.45;
}

/* Verification stays inside same calm surface. */
#landing-auth-modal .auth-otp-stage { margin: 0; }

#landing-auth-modal .auth-otp-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#landing-auth-modal .auth-otp-hero {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: #cf4626;
  background: #fff0e9;
  box-shadow: none;
  font-size: 18px;
}

#landing-auth-modal .auth-otp-card-title {
  margin-bottom: 7px;
  color: #28221e;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.025em;
}

#landing-auth-modal .auth-otp-card-copy {
  margin-bottom: 20px;
  color: #71665f;
  font-size: 13px;
  line-height: 1.55;
}

#landing-auth-modal .auth-otp-inline {
  margin-bottom: 14px;
  font-size: 12px;
}

#landing-auth-modal .auth-otp-inline-left {
  color: #584f49;
  font-size: 12px;
}

#landing-auth-modal .auth-otp-inline-left strong,
#landing-auth-modal .auth-otp-inline-right { color: #cf4626; }
#landing-auth-modal .auth-otp-inline-right { font-size: 12px; }

#landing-auth-modal .auth-otp-digits {
  gap: 8px;
  margin-bottom: 16px;
}

#landing-auth-modal .auth-otp-digit {
  height: 52px;
  border: 1px solid #e5ddd7;
  border-radius: 11px;
  color: #302923;
  background: #fbf9f7;
  font-size: 22px;
}

#landing-auth-modal .auth-otp-digit:focus {
  border-color: #e34d28;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(227, 77, 40, 0.1);
}

#landing-auth-modal .auth-otp-link {
  color: #71665f;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

#landing-auth-modal .auth-otp-link:hover { color: #cf4626; }

#landing-auth-modal .otp-auth-meta {
  color: #81766e;
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 560px) {
  #landing-auth-modal {
    align-items: center;
    padding: 12px;
  }

  #landing-auth-modal .auth-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 28px 22px 24px;
    border-radius: 22px;
  }

  #landing-auth-modal .auth-brand { margin-bottom: 22px; }
  #landing-auth-modal .auth-brand-logo { width: 68px; }
  #landing-auth-modal .auth-heading { font-size: 25px; }
  #landing-auth-modal .frow { display: block; }
  #landing-auth-modal .auth-otp-digits { gap: 5px; }

  #landing-auth-modal .auth-otp-digit {
    height: 46px;
    border-radius: 9px;
    font-size: 19px;
  }
}

@media (max-width: 560px) and (max-height: 700px) {
  #landing-auth-modal .auth-panel {
    padding: 20px;
  }

  #landing-auth-modal .auth-brand {
    min-height: 44px;
    margin-bottom: 14px;
  }

  #landing-auth-modal .auth-brand-logo { width: 60px; }
  #landing-auth-modal .auth-heading { font-size: 23px; }
  #landing-auth-modal .auth-sub { margin-bottom: 18px; }
  #landing-auth-modal .fgroup { margin-bottom: 11px; }

  #landing-auth-modal .fgroup input,
  #landing-auth-modal .fgroup select,
  #landing-auth-modal .btn-auth {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #landing-auth-modal.show .auth-panel { animation: none; }

  #landing-auth-modal .btn-auth,
  #landing-auth-modal .auth-otp-verify-btn { transition: none; }
}
