/* Buddy Run — legal pages (terms / privacy, ko/en). Clean, flat, editorial.
   No gradients / glows / pastel tints. Standalone static HTML; dark/light
   follows the OS. Classes kept: container, back-link, lang-switch, legal, meta. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1a1b20;
  --muted: #5b616e;
  --border: #e4e6ea;
  --accent: #6d28d9;
  --radius: 14px;
  --maxw: 760px;
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #16181d;
    --text: #e8e9ec;
    --muted: #9aa0ac;
    --border: #262a31;
    --accent: #b08bff;
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection {
  background: var(--accent);
  color: #fff;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 72px;
}

/* top bar: back link + language switch */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 150ms ease;
}
.back-link:hover {
  color: var(--accent);
}
.lang-switch {
  float: right;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color 150ms ease;
}
.lang-switch:hover {
  border-color: var(--muted);
}

/* legal document */
.legal {
  clear: both;
  margin-top: 22px;
  padding: clamp(26px, 4vw, 44px) clamp(22px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.legal h1 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.legal .meta {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.legal h2 {
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.15rem, 2.6vw, 1.3rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  scroll-margin-top: 24px;
}
.legal h3 {
  margin: 24px 0 8px;
  font-size: 1.02rem;
  font-weight: 700;
}

.legal p {
  margin: 0 0 16px;
}
.legal ul,
.legal ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}
.legal li {
  margin: 6px 0;
}
.legal strong {
  font-weight: 700;
}
.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* footer */
footer {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
footer a {
  color: var(--muted);
}

@media (max-width: 540px) {
  .lang-switch {
    float: none;
    margin-left: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
