@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.css");

/* 개인정보 처리방침·이용약관 공통: 흰 바탕 문서형 단일 열 */
:root {
  --ink: #0b0b0d;
  --body: rgba(0, 0, 0, 0.74);
  --muted: rgba(0, 0, 0, 0.45);
  --line: rgba(0, 0, 0, 0.08);
  --panel: #f5f5f7;
  --accent: #f2557f;
  --column: 712px;
  --gutter: clamp(20px, 5vw, 32px);
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 상단 막대 ---------- */

.legal-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: env(safe-area-inset-top) var(--gutter) 0;
  box-sizing: content-box;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.legal-brand,
.legal-switch a {
  white-space: nowrap;
  overflow-wrap: normal;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.legal-brand img {
  border-radius: 7px;
}

.legal-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 500;
}

.legal-nav a {
  white-space: nowrap;
  text-decoration: none;
  opacity: 0.72;
}

.legal-nav a:hover {
  opacity: 1;
}

@media (max-width: 560px) {
  /* 좁은 화면에서는 도움말만 남긴다. */
  .legal-nav a[href="/security"] {
    display: none;
  }
}

@media (max-width: 420px) {
  /* 휴대폰 폭에서는 언어 전환을 우선하고 사이트 링크는 바닥글로 넘긴다. */
  .legal-nav {
    display: none;
  }
}

.legal-switch {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--panel);
}

.legal-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.legal-switch a[aria-current="page"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ---------- 문서 ---------- */

.legal {
  padding: clamp(40px, 8vw, 72px) var(--gutter) clamp(64px, 10vw, 112px);
}

.legal-doc {
  max-width: var(--column);
  margin: 0 auto;
}

.legal-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.legal-date {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.legal-lead {
  margin: 24px 0 0;
  color: var(--body);
}

/* 목차: 조 제목에 이미 번호가 있어 목록 번호는 쓰지 않는다. */
.legal-toc {
  margin: 40px 0 0;
  padding: 24px 26px;
  border-radius: 20px;
  background: var(--panel);
}

.legal-toc h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.legal-toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc a {
  display: block;
  padding: 4px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
  text-decoration: none;
}

.legal-toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.legal-section {
  margin-top: 48px;
}

.legal-section h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.legal-section h3 {
  margin: 24px 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.legal-section p,
.legal-section li {
  color: var(--body);
}

.legal-section p {
  margin: 0;
}

.legal-section p + p {
  margin-top: 12px;
}

.legal-section ul,
.legal-section ol {
  margin: 12px 0 0;
  padding-left: 1.3em;
}

.legal-section li + li {
  margin-top: 6px;
}

.legal-section a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* 표가 들어오는 경우 가로 스크롤 */
.legal-table {
  margin: 16px 0 0;
  overflow-x: auto;
}

.legal-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.6;
}

.legal-table th,
.legal-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--body);
}

.legal-table th {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- 바닥글 ---------- */

.legal-footer {
  padding: 28px var(--gutter) calc(40px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

.legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  max-width: var(--column);
  margin: 0 auto;
  font-size: 13px;
}

.legal-footer a {
  color: var(--muted);
  text-decoration: none;
}

.legal-footer a:hover,
.legal-footer a[aria-current="page"] {
  color: var(--ink);
}

@media print {
  .legal-bar,
  .legal-footer,
  .skip-link {
    display: none;
  }

  .legal-toc {
    background: none;
    padding: 0;
  }
}
