.pt-referral-modal {
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: grid;
  align-items: center;
  overflow: auto;
  padding: clamp(12px, 3vw, 32px);
  background: rgba(0, 8, 22, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overscroll-behavior: contain;
}

.pt-referral-modal[hidden] {
  display: none !important;
}

.pt-referral-modal > .pt-shell {
  width: min(1120px, 100%);
  max-height: calc(100dvh - clamp(24px, 6vw, 64px));
  overflow: auto;
  margin: auto;
  padding: clamp(14px, 2.5vw, 28px);
  border: 1px solid rgba(87, 166, 255, .24);
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 0, rgba(24, 112, 218, .20), transparent 34%),
    linear-gradient(145deg, #071c38, #020f21 72%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .58);
}

.pt-referral-modal .pt-referral-section__top {
  position: sticky;
  top: -1px;
  z-index: 4;
  margin: -4px -4px 14px;
  padding: 6px 4px 10px;
  background: linear-gradient(180deg, #071c38 75%, transparent);
}

.pt-referral-modal .pt-referral-section__top strong {
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.pt-referral-modal .pt-referral-section__top button {
  flex: 0 0 42px;
}

.pt-referral-modal .pt-referral-wrap {
  padding: 0;
}

@media (max-width: 720px) {
  .pt-referral-modal {
    align-items: end;
    padding: 0;
  }

  .pt-referral-modal > .pt-shell {
    width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    padding: 16px 14px 24px;
    border-width: 1px 0 0;
    border-radius: 24px 24px 0 0;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pt-referral-modal.is-open > .pt-shell {
    animation: pt-referral-modal-in .22s ease-out both;
  }

  @keyframes pt-referral-modal-in {
    from { opacity: 0; transform: translateY(18px) scale(.985); }
    to { opacity: 1; transform: none; }
  }
}
