.legal-mini-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 2rem auto 0;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid #e6ddf8;
  color: #625b70;
  font-family: Inter, Manrope, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
}

.legal-mini-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
}

.legal-mini-footer a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.legal-mini-footer a:hover,
.legal-mini-footer a:focus-visible {
  color: #6d28d9;
}

.legal-mini-footer p {
  margin: 0.6rem 0 0;
}

.legal-document-modal {
  width: min(920px, calc(100vw - 3rem));
  height: min(92vh, 960px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(230, 221, 248, 0.9);
  border-radius: 22px;
  background: #fff;
  color: #0b0b12;
  box-shadow: 0 30px 90px rgba(11, 11, 18, 0.28);
}

.legal-document-modal::backdrop {
  background: rgba(11, 11, 18, 0.48);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.legal-document-modal-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
}

.legal-document-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e6ddf8;
  background: rgba(255, 255, 255, 0.96);
}

.legal-document-modal-header span {
  display: block;
  color: #6d28d9;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.legal-document-modal-header h2 {
  margin: 0.1rem 0 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.legal-document-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legal-document-modal-actions a {
  color: #6d28d9;
  font-size: 12px;
  font-weight: 750;
}

.legal-document-modal-actions button {
  width: 42px;
  height: 42px;
  border: 1px solid #e6ddf8;
  border-radius: 50%;
  background: #f7f4ff;
  color: #0b0b12;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.legal-document-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.legal-modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .legal-document-modal {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .legal-document-modal-header {
    padding: 0.8rem;
  }

  .legal-document-modal-actions a {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-document-modal {
    scroll-behavior: auto;
  }
}
