/* ===== 11/5 V1 이용약관 · 개인정보처리방침 공용 (공유 메모 'V1 공통 규칙') =====
   본문 글은 그대로 두고 겉모양만: 히어로 + 넓은 화면은 왼쪽 목차(따라 내려옴) · 휴대폰은 접힌 목차 + 머리글 아래 '지금 조항' 띠.
   채운 면은 목차의 현재 항목 하나. 동작은 assets/legal.js */
/* 색·글꼴 값은 본문(.lgp)과 body 에 붙는 띠·시트가 함께 써요 */
.lgp, .lg-bar, .lg-sheet { --lg-line: #d3e1f4; --lg-soft: #eef5ff; --lg-field: #f5f9ff; --lg-ink: #1f2d4a; --lg-sub: #4e6082; --lg-pri: #335da9; --lg-pri-d: #24519c;
       --lg-head: 'Plus Jakarta Sans', 'Pretendard Variable', Pretendard, sans-serif;
       --lg-body: Inter, 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
.lgp { font-family: var(--lg-body); color: var(--lg-ink); word-break: keep-all; }
.page.lgp { max-width: 1200px; padding: 20px 16px 48px; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; }
.lgp [hidden] { display: none !important; }
.lgp a:focus-visible, .lgp button:focus-visible, .lgp summary:focus-visible, .lg-sheet a:focus-visible, .lg-bar:focus-visible { outline: 2px solid var(--lg-pri); outline-offset: 2px; }
.lgp svg { flex: none; }

/* --- 히어로 --- */
.lg-hero { position: relative; display: flex; flex-direction: column; gap: 10px; }
.lg-eyebrow { margin: 0; font: 700 11px/1.4 var(--lg-body); letter-spacing: .08em; text-transform: uppercase; color: var(--lg-pri); }
.lg-hero h1 { margin: 0; font: 800 28px/1.28 var(--lg-head); letter-spacing: -.02em; color: var(--lg-ink); }
.lg-lead { margin: 0; max-width: 640px; font-size: 14px; line-height: 1.7; color: var(--lg-sub); }
.lg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.lg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--lg-line); font-size: 11px; font-weight: 600; color: var(--lg-ink); }
.lg-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--lg-pri); }
.lg-chip.count { display: none; }
.lg-link { min-height: 44px; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--lg-pri); text-decoration: none; }
.lg-link:hover { color: var(--lg-pri-d); text-decoration: underline; }
.lg-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lg-sky { display: none; }

/* --- 휴대폰 목차 (처음엔 접힘) --- */
.lg-toc-m { background: #fff; border: 1px solid var(--lg-line); border-radius: 16px; }
.lg-toc-m summary { min-height: 52px; padding: 0 16px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--lg-ink); }
.lg-toc-m summary::-webkit-details-marker { display: none; }
.lg-toc-m summary::after { content: ''; flex: none; width: 18px; height: 18px; transition: transform .2s;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e6082' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.lg-toc-m[open] summary::after { transform: rotate(180deg); }
.lg-toc-m ol { margin: 0; padding: 0 8px 8px; list-style: none; }

/* 목차 줄 (휴대폰 목차 · 아래 시트 · 넓은 화면 목차 공용) */
.lg-toc-list a { min-height: 44px; padding: 10px 8px; box-sizing: border-box; border-radius: 10px; display: flex; align-items: flex-start; gap: 4px; font-size: 14px; line-height: 1.45; color: var(--lg-ink); text-decoration: none; }
.lg-toc-list a:hover { background: var(--lg-field); }
.lg-toc-list .n { flex: none; width: 24px; color: var(--lg-sub); font-variant-numeric: tabular-nums; }

/* 휴대폰: 목차를 지나 내려가면 머리글 아래에 '지금 조항' 띠 → 누르면 아래 시트 */
.lg-bar { position: fixed; left: 0; right: 0; top: 57px; z-index: 45;   /* top 은 legal.js 가 머리글 높이에 맞춰 다시 정해요 */ height: 44px; padding: 0 16px; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--lg-line); background: #fff;
          display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; cursor: pointer; font: 700 14px/1.2 var(--lg-body); color: var(--lg-ink); text-align: left; }
.lg-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-bar svg { width: 18px; height: 18px; fill: none; stroke: var(--lg-sub); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lg-sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(20, 35, 74, .32); }
.lg-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 72vh; overflow-y: auto; padding: 24px 16px calc(16px + env(safe-area-inset-bottom)); box-sizing: border-box;
            border-radius: 24px 24px 0 0; background: #fff; border-top: 1px solid var(--lg-line); font-family: var(--lg-body); color: var(--lg-ink); word-break: keep-all; }
.lg-sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 999px; background: var(--lg-line); }
.lg-sheet[hidden], .lg-sheet-back[hidden], .lg-bar[hidden] { display: none; }
.lg-sheet-t { margin: 0 8px 8px; font: 700 11px/1.4 var(--lg-body); letter-spacing: .08em; text-transform: uppercase; color: var(--lg-pri); }
.lg-sheet ol { margin: 0; padding: 0; list-style: none; }
.lg-sheet a[aria-current="location"] { background: var(--lg-soft); color: var(--lg-pri); font-weight: 700; }
.lg-sheet a[aria-current="location"] .n { color: var(--lg-pri); }

/* --- 목차 + 본문 --- */
.lg-layout { display: block; }
.lg-toc { display: none; }
.lg-body { min-width: 0; }

/* 본문 (글은 그대로, 겉모양만) */
.lgp .doc { background: #fff; border: 1px solid var(--lg-line); border-radius: 16px; padding: 20px; font-size: 15px; line-height: 1.75; color: var(--lg-ink); }
.lgp .doc > p, .lgp .doc > ul, .lgp .doc > ol, .lgp .doc > h3 { max-width: 680px; }
.lgp .doc p { margin: 0 0 10px; }
.lgp .doc h2 { margin: 28px 0 8px; padding-top: 20px; border-top: 1px solid var(--lg-soft); font: 800 18px/1.4 var(--lg-head); color: var(--lg-ink); scroll-margin-top: 112px; }
.lgp .doc h3 { margin: 18px 0 6px; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--lg-ink); }
.lgp .doc h2 + h3 { margin-top: 0; }
.lgp .doc > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.lgp .doc strong { font-weight: 700; color: var(--lg-ink); }
.lgp .doc a { color: var(--lg-pri); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.lgp .doc a:hover { color: var(--lg-pri-d); }
.lgp .doc ul, .lgp .doc ol { margin: 0 0 12px; padding: 0; list-style: none; }
.lgp .doc li { position: relative; margin: 0 0 6px; padding-left: 16px; }
.lgp .doc ul > li::before { content: ''; position: absolute; left: 2px; top: .8em; width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: var(--lg-pri); }
.lgp .doc ol { counter-reset: lgnum; }
.lgp .doc ol > li { padding-left: 32px; counter-increment: lgnum; }
.lgp .doc ol > li::before { content: counter(lgnum); position: absolute; left: 0; top: .14em; width: 22px; height: 22px; border-radius: 50%; background: var(--lg-soft); color: var(--lg-pri);
                            display: grid; place-items: center; font-size: 11px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.lgp .doc .note { margin: 12px 0 16px; max-width: 680px; padding: 14px 16px; border-radius: 12px; background: var(--lg-field); border: 0; color: var(--lg-ink); }
.lgp .doc > .note:first-child { margin-top: 0; }
.lg-table { margin: 12px 0 16px; border-radius: 12px; background: var(--lg-field); overflow-x: auto; }
.lgp .doc table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.lgp .doc th, .lgp .doc td { padding: 10px 14px; border: 0; text-align: left; vertical-align: top; }
.lgp .doc th { font-weight: 700; color: var(--lg-ink); background: none; border-bottom: 1px solid var(--lg-line); white-space: nowrap; }
.lgp .doc tbody tr + tr td { border-top: 1px solid #e3ecf8; }
.lgp .doc td:first-child { font-weight: 600; }
.lgp .doc .date { margin: 28px 0 0; max-width: none; padding-top: 16px; border-top: 1px solid var(--lg-soft); font-size: 13px; line-height: 1.6; color: var(--lg-sub); }
html[lang="ko"] .lgp .doc[lang="en"], html[lang="en"] .lgp .doc[lang="ko"] { display: none; }

@media (min-width: 640px) {
  .lgp .doc { padding: 32px; }
}
@media (min-width: 1024px) {
  .page.lgp { padding: 32px 32px 96px; gap: 0; }
  .lg-hero { padding: 40px 48px; gap: 12px; border-radius: 24px; border: 1px solid var(--lg-line); background: linear-gradient(135deg, #eef5ff 0%, #e7f0ff 50%, #dcebff 100%); }
  .lg-hero h1 { font-size: 42px; line-height: 1.25; }
  .lg-lead { font-size: 16px; }
  .lg-meta { margin-top: 4px; gap: 8px 16px; }
  .lg-chip { padding: 4px 10px; font-size: 12px; }
  .lg-chip.count { display: inline-flex; }
  .lg-link { font-size: 14px; }
  .lg-sky { display: block; position: absolute; right: 120px; top: 64px; width: 170px; height: 70px; opacity: .35; pointer-events: none; }   /* 옅은 점선 별자리 */
  .lg-toc-m, .lg-bar, .lg-sheet, .lg-sheet-back { display: none !important; }
  .lg-layout { margin-top: 32px; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
  .lg-toc { display: block; position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow-y: auto; box-sizing: border-box; padding: 16px 8px 8px;
            background: #fff; border: 1px solid var(--lg-line); border-radius: 16px; scrollbar-width: thin; }
  .lg-toc-t { margin: 0 12px 8px; font: 700 11px/1.4 var(--lg-body); letter-spacing: .08em; text-transform: uppercase; color: var(--lg-pri); }
  .lg-toc ol { margin: 0; padding: 0; list-style: none; }
  .lg-toc .lg-toc-list a { min-height: 36px; padding: 8px 12px; font-size: 13px; line-height: 1.4; }
  .lg-toc a[aria-current="location"] { background: var(--lg-pri); color: #fff; font-weight: 700; }
  .lg-toc a[aria-current="location"] .n { color: #fff; }
  .lg-toc a[aria-current="location"]:hover { background: var(--lg-pri-d); }
  .lgp .doc { max-width: 800px; padding: 40px 48px; font-size: 16px; line-height: 1.8; }
  .lgp .doc h2 { margin: 40px 0 12px; padding-top: 24px; font-size: 20px; scroll-margin-top: 96px; }
  .lgp .doc h3 { margin-top: 20px; }
  .lgp .doc .note { padding: 14px 18px; }
  .lgp .doc ol > li::before { top: .22em; }
  .lgp .doc .date { margin-top: 40px; padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .lg-toc-m summary::after { transition: none; } }
