/* legal.bibong.dev — 공통 모양은 www.bibong.dev 의 core-ui.css·site-pages.css 를 그대로 쓰고, 여기에는 문서 목록과 본문의 빈 곳만 채운다 */
.lg-lead { font-size: 16px; line-height: 1.75; color: var(--muted); margin: 0 0 8px; }
.lg-lead a, .lg-crumbs a { color: var(--focus); text-decoration: underline; text-underline-offset: 3px; }
.lg-crumbs { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.lg-group { padding: 24px 0; border-top: 1px solid var(--border); }
.lg-group:first-of-type { border-top: 0; padding-top: 8px; }
.lg-group h2 { font-size: 20px; margin: 0 0 12px; }
.lg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lg-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.lg-list a:hover { border-color: var(--brand); color: var(--focus); }
.lg-list strong { font-size: 16px; font-weight: 600; }
.lg-list span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.lg-body h3 { font-size: 16px; margin: 16px 0 8px; }
.lg-body p + p { margin-top: 8px; }
.lg-body p { white-space: pre-line; }
.lg-history { padding: 28px 0; border-top: 1px solid var(--border); }
.lg-history h2 { margin-bottom: 12px; }

/* ── 디자인 검토(2026/11/11) 반영. 공통 CSS 는 다른 사이트도 쓰므로 legal 에서만 덮어쓴다 ── */
/* D06 본문도 제목 줄과 같은 1112px 영역을 채운다 */
.sp-doc { max-width: none; }
/* 실패 안내의 할 일 버튼 */
.lg-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lg-partial { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 8px; }
.lg-when-short { display: none; }
.lg-crumbs [aria-current] { color: var(--text); }
.lg-back { display: none; }
.lg-titlebar .lg-listbtn { flex: none; }

/* 표 — 본문 표·목록 표·개정 이력 표 모두 영역 전체 폭을 쓴다(공통 CSS 의 display:block 때문에 반쯤에서 끝나던 문제) */
.lg-body .doc-section table, .lg-table { display: table; width: 100%; overflow: visible; }
.lg-table { margin-top: 4px; border: 1px solid var(--border); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.lg-table th, .lg-table td { text-align: left; vertical-align: middle; font-size: 14px; line-height: 1.6; }
.lg-table a:not(.button) { color: var(--text); font-weight: 600; text-decoration: none; }
.lg-table a:not(.button):hover { color: var(--focus); text-decoration: underline; text-underline-offset: 3px; }
.lg-index td:nth-child(n+2), .lg-index th:nth-child(n+2) { width: 200px; white-space: nowrap; color: var(--muted); }
.lg-index td:first-child a { display: block; }
.lg-group .lg-list { display: none; }
.lg-cell-action { text-align: right !important; white-space: nowrap; width: 1%; }
.lg-here { font-size: 14px; color: var(--muted); }

/* 휴대폰(800px 미만) — 헤더·푸터 없이 제목 줄로 시작, 제목 20 · 섹션 16 · 본문 14 · 보조 12, 줄 목록, 뒤로 가기(신 모바일 규칙) */
@media (max-width: 799px) {
  .cu-header, .cu-footer { display: none !important; }
  body { padding-top: 0 !important; }
  .cu-pagebar { position: sticky; top: 0; z-index: 20; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
  .cu-pagebar h1 { font-size: 20px; font-weight: 700; line-height: 1.4; }
  .lg-titlebar { justify-content: flex-start; gap: 4px; }
  .lg-back { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -8px 0 -8px -12px; border-radius: var(--radius); color: var(--text); flex: none; }
  .lg-back:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
  .cu-main { padding: 16px 16px 24px; }
  .lg-crumbs { display: none; }

  .lg-lead { font-size: 14px; line-height: 1.7; }
  .lg-group { padding: 16px 0; }
  .lg-group h2 { font-size: 16px; margin: 0 0 4px; }
  .lg-list { gap: 0; }
  .lg-list li + li a { border-top: 1px solid var(--border); }
  .lg-list a { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 56px; padding: 8px 0; border: 0; border-radius: 0; }
  .lg-list strong { font-size: 14px; font-weight: 600; }
  .lg-list span { font-size: 12px; }
  .lg-when-full { display: none; }
  .lg-when-short { display: inline; }

  .sp-doc-meta { font-size: 12px; }
  .lg-body .doc-section { padding: 20px 0; }
  .lg-body .doc-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
  .lg-body h3 { font-size: 14px; }
  .lg-body .doc-section p, .lg-body .doc-section li { font-size: 14px; line-height: 1.7; }
  .lg-history { padding: 20px 0; }
  .lg-history h2 { font-size: 16px; }
  .lg-titlebar .lg-listbtn { display: none; }
  .lg-group .lg-index { display: none; }
  .lg-group .lg-list { display: grid; }
  .lg-history .lg-table, .lg-history .lg-table tbody, .lg-history .lg-table tr, .lg-history .lg-table td { display: block; }
  .lg-history .lg-table { border: 0; border-radius: 0; }
  .lg-history .lg-table thead { display: none; }
  .lg-history .lg-table tr { position: relative; min-height: 56px; padding: 10px 0; border-top: 1px solid var(--border); }
  .lg-history .lg-table tr:last-child { border-bottom: 1px solid var(--border); }
  .lg-history .lg-table td { padding: 0; border: 0; background: none; font-size: 12px; color: var(--muted); }
  .lg-history .lg-table td:first-child { font-size: 14px; color: var(--text); }
  .lg-history .lg-table td:nth-child(3) { margin-top: 4px; }
  .lg-history .lg-table .lg-cell-action { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: auto; }
  .lg-history .lg-table .button { min-height: 44px; }

  /* D05 표는 가로로 밀지 않고 행마다 '항목 이름: 값' 줄 목록으로 — 내용은 그대로 둔다 */
  .lg-body .doc-section table { display: block; border: 0; border-radius: 0; overflow: visible; margin-top: 8px; }
  .lg-body .doc-section thead { display: none; }
  .lg-body .doc-section tbody, .lg-body .doc-section tr { display: block; }
  .lg-body .doc-section tr { padding: 12px 0; border-top: 1px solid var(--border); }
  .lg-body .doc-section tr:last-child { border-bottom: 1px solid var(--border); }
  .lg-body .doc-section td { display: block; min-width: 0; padding: 2px 0; border: 0; font-size: 14px; line-height: 1.6; background: none; }
  .lg-body .doc-section td:first-child { font-weight: 600; }
  .lg-body .doc-section td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
}
