.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

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

.legal-modal {
  width: min(520px, 100%);
  max-height: min(85dvh, 640px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.legal-modal-head h2 {
  margin: 0;
  font-size: 17px;
}

.legal-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  font-size: 20px;
  cursor: pointer;
}

.legal-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
}

.legal-modal-body h3 {
  margin: 16px 0 8px;
  font-size: 15px;
  color: #0f172a;
}

.legal-modal-body h3:first-child {
  margin-top: 0;
}

.legal-modal-body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal-modal-body li {
  margin: 4px 0;
}

.legal-muted {
  font-size: 12px;
  color: #64748b;
  margin-top: 16px;
}

.legal-modal-foot {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  text-align: right;
}

.legal-page-body {
  background: #f8fafc;
  min-height: 100dvh;
}

.legal-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.legal-page h1 {
  margin: 16px 0 20px;
  font-size: 24px;
}

.legal-page-content {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
}

.legal-page-content h3 {
  margin: 16px 0 8px;
  font-size: 15px;
}

.legal-page-content ul {
  padding-left: 20px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.consent-row input {
  margin-top: 3px;
  flex-shrink: 0;
}

.consent-row label {
  margin: 0;
  font-weight: 500;
  flex: 1;
}

.consent-link {
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.consent-link:hover {
  text-decoration: underline;
}

.auth-privacy-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #166534;
}

.account-danger-zone {
  border-color: #fecaca;
  background: #fffbfb;
}

.account-danger-zone h3 {
  color: #b91c1c;
}
