.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 16, 12, .68);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.auth-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(16, 34, 24, .12);
  border-radius: 8px;
  background: #fffaf2;
  color: var(--ink, #102218);
  box-shadow: 0 32px 120px rgba(5, 11, 8, .32);
}

.auth-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 122, 26, .5);
  border-radius: 999px;
  background: #fffaf2;
  color: var(--ink, #102218);
  cursor: pointer;
}

.auth-modal-copy {
  display: grid;
  gap: 12px;
  padding-right: 76px;
}

.auth-modal-copy .eyebrow {
  margin: 0;
}

.auth-modal-copy h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-modal-copy p {
  margin: 0;
  color: var(--muted, #4f6053);
  line-height: 1.55;
}

.auth-modal-google {
  display: grid;
  gap: 12px;
}

.auth-modal-google-button {
  min-height: 42px;
}

.auth-modal-feedback {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted, #4f6053);
  line-height: 1.5;
}

.auth-modal-feedback.danger {
  color: #9f1d12;
}

body.auth-modal-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .auth-modal {
    align-items: end;
    padding: 0;
  }

  .auth-modal-panel {
    width: 100%;
    max-height: 88vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
    padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  }

  .auth-modal-copy {
    padding-right: 74px;
  }
}
