.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 7, 40, .62);
  backdrop-filter: blur(8px);
}

.legal-modal.is-open {
  display: flex;
}

.legal-modal__panel {
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(123, 74, 226, .18);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(18, 7, 40, .28);
  color: #1e1238;
}

.legal-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(123, 74, 226, .14);
  background: linear-gradient(180deg, #fbf9ff, #fff);
}

.legal-modal__eyebrow {
  margin: 0 0 4px;
  color: #7b4ae2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legal-modal__head h2 {
  margin: 0;
  color: #1e1238;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.legal-modal__close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(123, 74, 226, .22);
  border-radius: 50%;
  background: #f6f1ff;
  color: #4d2da8;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.legal-modal__body {
  overflow: auto;
  padding: 22px 24px;
  color: #4b4160;
  font-size: 14px;
  line-height: 1.65;
}

.legal-modal__body h3 {
  margin: 22px 0 6px;
  color: #1e1238;
  font-size: 15px;
  line-height: 1.3;
}

.legal-modal__body p {
  margin: 0 0 12px;
}

.legal-date {
  color: #7b4ae2;
  font-size: 12px;
  font-weight: 700;
}

.legal-modal__foot {
  display: flex;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid rgba(123, 74, 226, .14);
  background: #fbf9ff;
}

.legal-btn {
  min-width: 120px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #7b4ae2, #5b6cf6);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(91, 108, 246, .28);
}

@media (max-width: 640px) {
  .legal-modal {
    padding: 12px;
  }

  .legal-modal__panel {
    max-height: 88vh;
  }

  .legal-modal__head,
  .legal-modal__body,
  .legal-modal__foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .legal-modal__head h2 {
    font-size: 20px;
  }
}
