/* ─────────────────────────────────────────────────────────────
   피오디맨 법적 고지 3페이지 전용 (privacy · terms · refund) — 2026-09-21
   site.css 다음에 불러온다. site.css 의 토큰(--ink · --line · --mist · --navy · --gold)을 그대로 쓴다.
   규율(디자인/VEED/DESIGN.md): 흰 캔버스 · 헤어라인 #e6e6e7 · 라운드 10/16 · 그림자 없음 · Pretendard 단일.
   ───────────────────────────────────────────────────────────── */

:root { --todo-bg: #fff3cc; --todo-line: #FCB502; }

/* ── 상단 (page-hero 재사용 + 문서 정보) ─────────────── */
.legal-hero { padding-bottom: 56px; }
.legal-hero .lead { margin-top: 24px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.legal-meta b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 2px; }
.legal-docs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.legal-docs a { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--ink-2); background: var(--paper); transition: border-color .15s, color .15s; }
.legal-docs a:hover { border-color: var(--ink-2); color: var(--ink); }
.legal-docs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── 본문 그리드: 목차 220 + 본문 720 ─────────────────── */
.legal { padding-bottom: var(--section); }
.legal-grid { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 72px; align-items: start; border-top: 1px solid var(--line); padding-top: 48px; }
.legal-toc { position: sticky; top: 88px; max-height: calc(100vh - 112px); overflow-y: auto; scrollbar-width: thin; }
.legal-toc .t { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.legal-toc ol { display: grid; gap: 1px; counter-reset: toc; }
.legal-toc a { display: grid; grid-template-columns: 30px 1fr; gap: 4px; padding: 7px 10px 7px 8px; border-left: 2px solid transparent; font-size: 13px; line-height: 1.45; color: var(--muted); border-radius: 0 6px 6px 0; }
.legal-toc a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font-size: 11px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); padding-top: 2px; }
.legal-toc a:hover { color: var(--ink); background: var(--mist); }
.legal-toc a.on { color: var(--ink); font-weight: 600; border-left-color: var(--navy); }
.legal-toc a.on::before { color: var(--navy); }

/* ── 조항 ─────────────────────────────────────────────── */
.legal-body { min-width: 0; font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.legal-body .intro { font-size: 17px; line-height: 1.7; color: var(--ink); padding-bottom: 8px; }
.art { padding: 40px 0; border-top: 1px solid var(--line); scroll-margin-top: 88px; }
.art:first-of-type { border-top: 0; padding-top: 24px; }
.art h2 { display: flex; align-items: baseline; gap: 12px; font-size: 22px; font-weight: 700; line-height: 1.3; letter-spacing: -0.025em; color: var(--ink); }
.art h2 .no { flex: none; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--navy); min-width: 44px; }
.art h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.016em; color: var(--ink); margin-top: 28px; }
.art p { margin-top: 14px; }
.art .gist { margin-top: 14px; padding: 12px 16px; border-left: 2px solid var(--navy); background: var(--mist); border-radius: 0 var(--r-btn) var(--r-btn) 0; font-size: 15px; line-height: 1.6; color: var(--ink); }
.art .gist b { font-weight: 600; color: var(--navy); margin-right: 6px; }

/* 항 · 호 */
.art ol.cl, .art ul.dot { margin-top: 14px; display: grid; gap: 10px; }
.art ol.cl { counter-reset: cl; }
.art ol.cl > li { counter-increment: cl; position: relative; padding-left: 30px; }
.art ol.cl > li::before { content: counter(cl); position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; color: var(--ink-2); background: var(--paper); }
.art ul.dot > li { position: relative; padding-left: 16px; }
.art ul.dot > li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 4px; height: 4px; border-radius: 50%; background: var(--slate); }
.art li > ul.dot, .art li > ol.cl { margin-top: 8px; gap: 6px; }
.art li > ul.dot > li { font-size: 15px; }
.legal-body a.ln { color: var(--navy); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.legal-body a.ln:hover { color: var(--navy-hover); }
.art code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; background: var(--mist); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--ink); overflow-wrap: anywhere; }
.art .fine { font-size: 14px; line-height: 1.65; color: var(--muted); }

/* 확정 후 기재 — 비어 있는 자리가 눈에 띄도록 연한 골드 */
.todo { display: inline-block; background: var(--todo-bg); border: 1px solid var(--todo-line); border-radius: 4px; padding: 0 7px; font-size: 0.875em; font-weight: 600; line-height: 1.6; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; vertical-align: 1px; }

/* ── 표 ───────────────────────────────────────────────── */
.ltable-wrap { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.ltable { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; table-layout: fixed; }
.ltable caption { caption-side: top; text-align: left; padding: 12px 16px; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--paper); }
.ltable th, .ltable td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.ltable thead th { background: var(--mist); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.ltable tbody th { font-weight: 600; color: var(--ink); background: var(--paper); }
.ltable tbody tr:last-child th, .ltable tbody tr:last-child td { border-bottom: 0; }
.ltable td + td, .ltable th + td, .ltable th + th { border-left: 1px solid var(--line); }
.ltable .w-18 { width: 18%; } .ltable .w-22 { width: 22%; } .ltable .w-26 { width: 26%; } .ltable .w-30 { width: 30%; }

/* 사업자 정보 카드 */
.biz { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.biz .row { display: grid; grid-template-columns: 168px 1fr; border-bottom: 1px solid var(--line); }
.biz .row:last-child { border-bottom: 0; }
.biz .k { background: var(--mist); padding: 12px 16px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.biz .v { padding: 12px 16px; font-size: 14px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }

/* 단계 (주문 계약 · 환불 절차) */
.steps { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: st; }
.steps > div { border: 1px solid var(--line); border-radius: var(--r-btn); padding: 16px; background: var(--paper); }
.steps > div::before { counter-increment: st; content: counter(st, decimal-leading-zero); display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--navy); margin-bottom: 8px; }
.steps b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.016em; color: var(--ink); }
.steps span { display: block; font-size: 13px; line-height: 1.55; color: var(--muted); margin-top: 4px; }

/* ── 본문 구분 띠 이미지 ──────────────────────────────── */
.legal-band { margin: 8px 0 0; border-radius: var(--r-card); overflow: hidden; background: var(--mist); aspect-ratio: 2 / 1; }
.legal-band img { width: 100%; height: 100%; object-fit: cover; display: block; }
.legal-band + .art { border-top: 0; }

/* 하단 문의 */
.legal-end { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: var(--mist); }
.legal-end p { font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 440px; }

/* ── 반응형 ───────────────────────────────────────────── */
@media (max-width: 1040px) {
  .legal-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .legal-body { max-width: 720px; }
  .legal-toc { position: static; max-height: none; overflow: visible; border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; max-width: 720px; }
  .legal-toc ol { grid-template-columns: 1fr 1fr; gap: 0 16px; }
  .legal-toc a { border-left: 0; border-radius: 6px; padding: 8px; }
  .legal-toc a.on { font-weight: 400; color: var(--muted); }
  .legal-toc a.on::before { color: var(--muted); }
}
@media (max-width: 640px) {
  .legal-hero { padding-bottom: 40px; }
  .legal-toc { padding: 16px; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-body { font-size: 15.5px; }
  .legal-body .intro { font-size: 16px; }
  .art { padding: 32px 0; scroll-margin-top: 72px; }
  .art h2 { font-size: 20px; flex-direction: column; gap: 4px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .biz .row { grid-template-columns: 112px 1fr; }

  /* 표 → 카드: 가로로 넘치지 않게 행을 세로로 쌓는다 */
  .ltable, .ltable tbody, .ltable tr, .ltable th, .ltable td { display: block; width: 100% !important; }
  .ltable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ltable caption { display: block; }
  .ltable tbody tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  .ltable tbody tr:last-child { border-bottom: 0; }
  .ltable tbody th, .ltable tbody td { border: 0 !important; padding: 6px 16px; }
  .ltable tbody th { font-size: 15px; padding-top: 10px; }
  .ltable tbody td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); margin-bottom: 1px; }
  .ltable tbody td:last-child { padding-bottom: 10px; }
}
@media (max-width: 340px) { .steps { grid-template-columns: 1fr; } }

/* ── 인쇄 ─────────────────────────────────────────────── */
@media print {
  @page { margin: 18mm 16mm; }
  html { scroll-behavior: auto; }
  body { font-size: 10.5pt; line-height: 1.6; color: #000; background: #fff; }
  .site-header, .site-footer, .legal-toc, .legal-docs, .legal-band, .legal-end, .legal-hero .media, .nav-toggle { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .page-hero.legal-hero { padding: 0 0 12pt; }
  .page-hero.legal-hero .wrap { display: block; }
  .legal-hero .display { font-size: 22pt; line-height: 1.2; letter-spacing: -0.02em; }
  .legal-hero .lead { font-size: 10.5pt; max-width: none; color: #333; margin-top: 8pt; }
  .legal-hero .eyebrow { margin-bottom: 6pt; }
  .legal-meta { margin-top: 10pt; padding-top: 8pt; font-size: 9pt; }
  .legal-meta b { font-size: 9.5pt; }
  .legal { padding-bottom: 0; }
  .legal-grid { display: block; border-top: 1px solid #999; padding-top: 10pt; }
  .legal-body { max-width: none; font-size: 10.5pt; color: #111; }
  .legal-body .intro { font-size: 10.5pt; }
  .art { padding: 12pt 0; border-top: 1px solid #ccc; break-inside: auto; }
  .art h2 { font-size: 13pt; break-after: avoid; }
  .art h3 { font-size: 11pt; break-after: avoid; margin-top: 12pt; }
  .art .gist { background: none; border-left: 2px solid #000; padding: 4pt 10pt; font-size: 10pt; }
  .art .gist b, .art h2 .no { color: #000; }
  .legal-body a.ln { color: #000; border-bottom: 0; }
  .ltable-wrap, .biz { border-radius: 0; border-color: #999; break-inside: avoid; }
  .ltable { font-size: 9.5pt; }
  .ltable th, .ltable td, .biz .row, .biz .k { border-color: #999 !important; }
  .ltable thead th, .biz .k { background: #eee; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 6pt; break-inside: avoid; }
  .steps > div { border-color: #999; padding: 8pt; }
  .steps > div::before { color: #000; }
  .todo { background: #fff3cc; border-color: #999; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
