.temple-donation-modal {
  width: min(760px, calc(100% - 32px));
  max-width: 760px;
  max-height: min(90vh, 900px);
  max-height: min(90dvh, 900px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.temple-donation-modal::backdrop {
  background: rgba(20, 33, 24, .72);
  backdrop-filter: blur(3px);
}

.temple-donation-modal-shell {
  position: relative;
  max-height: min(90vh, 900px);
  max-height: min(90dvh, 900px);
  overflow: auto;
  border-radius: 8px;
  background: var(--paper, #faf8f1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.temple-donation-modal .temple-donation-panel {
  margin: 0;
  padding: 38px 42px 34px;
  border: 0;
  border-top: 4px solid var(--gold);
}

.temple-donation-modal-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line, #e5dfd0);
  border-radius: 50%;
  background: #fff;
  color: var(--ink, #273329);
  font: 28px/1 Arial, sans-serif;
  cursor: pointer;
}

.temple-donation-modal-close:hover,
.temple-donation-modal-close:focus-visible {
  border-color: var(--pine, #395640);
  outline: 2px solid var(--pine, #395640);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .temple-donation-modal {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
  }

  .temple-donation-modal-shell {
    max-height: calc(100dvh - 16px);
  }

  .temple-donation-modal .temple-donation-panel {
    padding: 34px 18px 24px;
  }

  .temple-donation-modal-close {
    top: 8px;
    right: 8px;
  }
}
