:root {
  color-scheme: light dark;

  --page-bg: #ffffff;
  --text-main: #161616;
  --text-muted: rgb(0 0 0 / 0.55);
  --text-soft: rgb(0 0 0 / 0.4);

  --card-border: rgb(0 0 0 / 0.08);

  --glass-bg: rgb(200 200 200 / 0.35);
  --glass-bg-hover: rgb(0 0 0 / 1);
  --levitated-button-bg: rgb(241 241 241 / 0.6);

  --icon-filter: brightness(0) opacity(0.55);
  --icon-filter-hover: brightness(0) invert(1) opacity(0.8);

  --accent: #FF857A;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #0d0d0d;
    --text-main: #f5f5f5;
    --text-muted: rgb(255 255 255 / 0.6);
    --text-soft: rgb(255 255 255 / 0.4);

    --card-border: rgb(255 255 255 / 0.09);

    --glass-bg: rgb(120 120 120 / 0.28);
    --glass-bg-hover: rgb(255 255 255 / 1);
    --levitated-button-bg: rgb(42 42 42 / 0.6);

    --icon-filter: brightness(0) invert(1) opacity(0.65);
    --icon-filter-hover: brightness(0) opacity(0.85);

    --accent: #F0A2B7;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(96px, 12vw, 140px) clamp(20px, 5vw, 40px) 120px;
}

.back-actions {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);

  z-index: 70;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;

  height: 56px;
  padding: 0 20px 0 16px;

  border: 1px solid rgb(127 127 127 / 0.10);
  border-radius: 999px;
  background: var(--levitated-button-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);

  box-shadow:
    0 12px 30px rgb(0 0 0 / 0.10),
    0 4px 10px rgb(0 0 0 / 0.06);

  cursor: pointer;
  white-space: nowrap;

  font-size: 22px;
  font-weight: 400;
  text-decoration: none;
  color: var(--text-muted);

  opacity: 0;
  filter: blur(20px);
  transform: translateY(120px) scale(0);

  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1),
    background 240ms ease,
    color 240ms ease;
}

.back-link img {
  width: 16px;
  height: 22px;
  object-fit: contain;
  pointer-events: none;
  filter: var(--icon-filter);
}

.back-link.is-visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);

  transition-delay:
    1000ms,
    1000ms,
    1000ms,
    0ms,
    0ms;
}

.back-link:hover {
  background: var(--accent);
  color: var(--page-bg);
}

.back-link:hover img {
  filter: var(--icon-filter-hover);
}

.back-link.is-pressed,
.back-link:hover.is-pressed {
  transform: translateY(0) scale(0.85);

  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    background 240ms ease,
    color 240ms ease;
}

.legal-header {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.legal-icon {
  display: block;
  height: 80px;
  width: auto;
  margin: 0 auto 80px;
}

.legal-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 12px;
}

.updated {
  font-size: 15px;
  color: var(--text-soft);
  margin: 0;
}

.legal-body p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.legal-body h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin: 40px 0 14px;
}

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

.legal-body li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.legal-body li strong {
  color: var(--text-main);
}

.legal-body a {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body hr {
  border: none;
  border-top: 1px solid var(--card-border);
  margin: 40px 0;
}

.legal-closing {
  font-size: 14px;
  color: var(--text-soft);
}
