.sw-leave-guard {
  position: fixed;
  inset: 0;
  z-index: 2380;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 52%, rgba(120, 231, 255, .22), transparent 34%),
    radial-gradient(circle at 72% 28%, rgba(255, 202, 118, .16), transparent 30%),
    rgba(4, 11, 20, .72);
  backdrop-filter: blur(16px) saturate(128%);
}

.sw-leave-guard[hidden] {
  display: none !important;
}

.sw-leave-guard-open {
  overflow: hidden;
}

.sw-leave-guard__panel {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid rgba(164, 224, 255, .28);
  border-radius: 30px;
  padding: 28px;
  color: #eef8ff;
  background:
    linear-gradient(145deg, rgba(12, 27, 44, .96), rgba(6, 15, 28, .98)),
    radial-gradient(circle at 20% 0%, rgba(111, 239, 255, .18), transparent 36%);
  box-shadow:
    0 28px 82px rgba(0, 0, 0, .58),
    0 0 46px rgba(93, 224, 255, .18),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.sw-leave-guard__glow {
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background:
    conic-gradient(from 110deg, transparent 0deg, rgba(104, 238, 255, .18) 60deg, transparent 122deg, rgba(255, 227, 135, .13) 190deg, transparent 260deg);
  animation: swLeaveGuardDrift 9s linear infinite;
}

.sw-leave-guard__panel > *:not(.sw-leave-guard__glow) {
  position: relative;
  z-index: 1;
}

.sw-leave-guard__kicker {
  margin-bottom: 10px;
  color: #8beaff;
  font: 800 11px/1.2 "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(139, 234, 255, .6);
}

.sw-leave-guard__title {
  margin: 0 0 12px;
  max-width: 470px;
  font: 900 clamp(30px, 5vw, 48px)/.94 "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -.05em;
}

.sw-leave-guard__text {
  margin: 0;
  color: rgba(232, 244, 255, .9);
  font: 700 16px/1.55 "Manrope", sans-serif;
}

.sw-leave-guard__note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(126, 229, 255, .18);
  border-radius: 18px;
  color: rgba(214, 234, 245, .82);
  background: rgba(255, 255, 255, .055);
  font: 700 13px/1.45 "Manrope", sans-serif;
}

.sw-leave-guard__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.sw-leave-guard__btn {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  padding: 13px 16px;
  cursor: pointer;
  color: #f2fbff;
  background: rgba(255, 255, 255, .08);
  font: 900 14px/1.15 "Manrope", sans-serif;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.sw-leave-guard__btn:hover {
  transform: translateY(-1px);
}

.sw-leave-guard__btn:focus-visible {
  outline: 3px solid rgba(128, 236, 255, .48);
  outline-offset: 3px;
}

.sw-leave-guard__btn:disabled {
  cursor: progress;
  opacity: .72;
  transform: none;
}

.sw-leave-guard__btn--primary {
  grid-column: 1 / -1;
  color: #062034;
  border-color: rgba(156, 255, 242, .72);
  background: linear-gradient(135deg, #9afff1, #74d8ff 48%, #ffe39c);
  box-shadow: 0 16px 42px rgba(105, 229, 255, .3);
}

.sw-leave-guard__btn--ghost {
  background: rgba(117, 191, 221, .16);
}

.sw-leave-guard__btn--quiet {
  color: rgba(230, 241, 250, .82);
  background: rgba(255, 255, 255, .055);
}

.sw-leave-guard__btn--danger {
  color: #ffeef0;
  border-color: rgba(255, 119, 136, .4);
  background: rgba(255, 77, 101, .15);
}

@keyframes swLeaveGuardDrift {
  from { transform: rotate(0deg) scale(1.05); }
  to { transform: rotate(360deg) scale(1.05); }
}

@media (max-width: 560px) {
  .sw-leave-guard {
    padding: 14px;
  }

  .sw-leave-guard__panel {
    border-radius: 24px;
    padding: 24px 18px;
  }

  .sw-leave-guard__actions {
    grid-template-columns: 1fr;
  }

  .sw-leave-guard__btn--primary {
    grid-column: auto;
  }
}
