:root {
  color-scheme: light;
  --color-bg: #f4f6f8;
  --color-surface: #ffffff;
  --color-text: #20242a;
  --color-muted: #5b6470;
  --color-border: #d7dce2;
  --color-accent: #1463d6;
  --color-accent-soft: #eaf2ff;
  --color-warning-bg: #fff7e0;
  --color-warning-border: #e8c55f;
  --color-warning-text: #5a4300;
  --content-width: 880px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: Pretendard, SUIT, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid #8eb7f0;
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10;
  padding: 10px 14px;
  color: #ffffff;
  background: #20242a;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.96);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 40px, var(--content-width));
  min-height: 68px;
  margin: 0 auto;
}

.brand {
  color: var(--color-text);
  font-size: 17px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.legal-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 22px;
}

.legal-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.legal-nav a[aria-current="page"] {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.page-shell {
  width: min(100% - 40px, var(--content-width));
  margin: 40px auto 72px;
}

.draft-notice {
  margin-bottom: 16px;
  padding: 16px 18px;
  color: var(--color-warning-text);
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  border-radius: 8px;
}

.draft-notice strong {
  display: block;
  margin-bottom: 2px;
}

.legal-content {
  padding: 52px 64px 64px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.document-header {
  padding-bottom: 28px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--color-border);
}

.document-label {
  margin: 0 0 6px;
  color: var(--color-accent);
  font-size: 14px;
  font-weight: 700;
}

.legal-content h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.3;
  text-wrap: balance;
}

.document-meta {
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 14px;
}

.legal-content h2 {
  margin: 44px 0 14px;
  font-size: 22px;
  line-height: 1.45;
  text-wrap: balance;
}

.legal-content h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  line-height: 1.5;
}

.legal-content p,
.legal-content ul,
.legal-content ol,
.legal-content table,
.legal-content blockquote {
  margin-top: 0;
  margin-bottom: 18px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
}

.legal-content li + li {
  margin-top: 7px;
}

.legal-content strong {
  font-weight: 750;
}

.legal-content blockquote {
  padding: 14px 16px;
  color: #334155;
  background: var(--color-accent-soft);
  border-left: 4px solid var(--color-accent);
}

.legal-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 14px;
}

.legal-content th,
.legal-content td {
  min-width: 130px;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--color-border);
}

.legal-content th {
  background: #f7f9fb;
  font-weight: 700;
}

.site-footer {
  padding: 26px 20px calc(26px + env(safe-area-inset-bottom));
  color: var(--color-muted);
  text-align: center;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.site-footer p {
  margin: 0;
  font-size: 13px;
}

@media (max-width: 700px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    width: min(100% - 32px, var(--content-width));
    padding-top: 14px;
  }

  .legal-nav {
    width: 100%;
    gap: 20px;
  }

  .legal-nav a {
    min-height: 48px;
  }

  .page-shell {
    width: min(100% - 24px, var(--content-width));
    margin-top: 24px;
    margin-bottom: 44px;
  }

  .legal-content {
    padding: 34px 22px 42px;
  }

  .legal-content h1 {
    font-size: 27px;
  }

  .legal-content h2 {
    margin-top: 38px;
    font-size: 20px;
  }
}

@media (max-width: 380px) {
  .legal-nav {
    gap: 14px;
  }

  .legal-nav a {
    font-size: 13px;
  }

  .legal-content {
    padding-inline: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .site-header,
  .site-footer,
  .draft-notice,
  .skip-link {
    display: none;
  }

  .page-shell {
    width: 100%;
    margin: 0;
  }

  .legal-content {
    padding: 0;
    border: 0;
  }
}
