.stp-modal-overlay {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(13, 14, 16, 0.62);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; visibility: hidden; transition: opacity .18s ease;
}
.stp-modal-overlay.stp-open { opacity: 1; visibility: visible; }
.stp-modal-dialog {
  position: relative; background: #fff; border-radius: 12px;
  border: 0;
  width: 100%; max-width: 640px; max-height: 94vh;
  box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(8px); transition: transform .18s ease;
}
.stp-modal-overlay.stp-open .stp-modal-dialog { transform: none; }
.stp-modal-close {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.06); color: #111827; font-size: 22px; line-height: 1;
  cursor: pointer;
}
.stp-modal-close:hover, .stp-modal-close:focus-visible { background: rgba(0,0,0,.12); }
/* Desktop: JS sets an explicit height from the form's content so the whole form
   shows without inner scroll. Mobile: the media query below makes it fill the screen. */
.stp-modal-frame { border: 0; width: 100%; height: 640px; min-height: 480px; background: #fff; }
.stp-modal-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #6b7280; font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body.stp-modal-lock { overflow: hidden; }
@media (max-width: 600px) {
  .stp-modal-overlay { padding: 0; }
  .stp-modal-dialog { max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .stp-modal-frame { height: auto; min-height: 0; flex: 1 1 auto; }
}
/* Visual refresh (Plan H, mockup v3/contact.html ?modal=1): a 560 px card, square close button. */
body.stp-shell .stp-modal-overlay { background: rgba(14, 15, 18, .55); padding: 16px; }
body.stp-shell .stp-modal-dialog { max-width: 560px; border-radius: var(--stp-r-lg, 18px); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
body.stp-shell .stp-modal-close { top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; background: transparent;
  color: var(--stp-muted, #6b6f76); font-size: 26px; font-weight: 300; }
body.stp-shell .stp-modal-close:hover, body.stp-shell .stp-modal-close:focus-visible { background: var(--stp-surface-2, #f7f6f2); color: var(--stp-ink, #16181c); }
body.stp-shell .stp-modal-loading { font-family: var(--stp-font, sans-serif); color: var(--stp-muted, #6b6f76); }
@media (max-width: 600px) {
  body.stp-shell .stp-modal-overlay { padding: 0; }
  body.stp-shell .stp-modal-dialog { max-width: 100%; border-radius: 0; }
  body.stp-shell .stp-modal-close { top: 10px; right: 10px; }
}
