.modal {
  display: none;
}

.modal.show,
.modal.active,
.modal.modal-open {
  display: flex;
}

.auth-modal-overlay,
.zoom-modal-overlay {
  align-items: center;
  background: rgba(24, 18, 12, 0.62);
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 1000;
}

.auth-modal-content {
  background: #fffdf8;
  border: 1px solid var(--sf-border);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.25);
  max-height: calc(100vh - 40px);
  max-width: 430px;
  overflow: auto;
  padding: 20px;
  width: 100%;
}

.modal-header-row {
  align-items: center;
  border-bottom: 1px dashed var(--sf-border-strong);
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.modal-title {
  color: var(--sf-brand-dark);
  font-family: var(--sf-font-serif);
  font-size: 1.55rem;
  line-height: 1;
  margin: 0;
}

.modal-close,
.zoom-modal-close {
  color: var(--sf-muted);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.modal-close:hover,
.zoom-modal-close:hover {
  color: var(--sf-brand-dark);
}

.auth-checkout-notice {
  background: #fffbf2;
  border: 1px solid #e8d5a8;
  border-radius: 8px;
  color: #5a3e0a;
  font-size: 0.88rem;
  line-height: 1.42;
  margin-bottom: 14px;
  padding: 10px 12px;
}

.auth-login-error {
  background: #fdf2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: 0.86rem;
  margin-bottom: 14px;
  padding: 9px 11px;
}

.auth-turnstile-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 14px;
  min-height: 65px;
}

.auth-section-hidden {
  display: none;
}

.modal-footer-note {
  color: var(--sf-muted);
  font-size: 0.84rem;
  margin: 13px 0 0;
  text-align: center;
}

.modal-link-alt {
  color: var(--sf-brand-dark);
  font-weight: 800;
  text-decoration: none;
}

.modal-link-alt:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.zoom-modal-overlay {
  z-index: 1100;
}

.zoom-modal-close {
  color: #fff;
  position: fixed;
  right: 24px;
  top: 18px;
  z-index: 1110;
}

.zoom-modal-content {
  align-items: center;
  display: flex;
  justify-content: center;
  max-height: calc(100vh - 70px);
  max-width: min(980px, calc(100vw - 36px));
}

.zoom-modal-content img {
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  max-height: calc(100vh - 80px);
  object-fit: contain;
  width: auto;
}
