/* ============================================================
   법적 고지 페이지 (이용약관 · 개인정보처리방침)
   앱 디자인 시스템(main.css)과 같은 언어로 — 카드·라운드·브랜드색.
   색·반경·그림자는 전부 토큰이라 라이트/다크가 자동으로 따라온다.
   ============================================================ */

/* 읽은 만큼 차오르는 상단 진행바 */
.lg-progress {
    position: fixed; top: 0; left: 0; z-index: 300;
    height: 3px; width: 0;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
    transition: width .08s linear;
}

/* 배경색은 main.css 의 body 규칙(var(--bg))이 이미 처리한다 */
.lg-wrap { max-width: 960px; margin: 0 auto; padding: 0 16px 80px; }

/* ── 표지 ── */
.lg-hero { padding: 28px 4px 20px; }
.lg-eyebrow {
    display: inline-block;
    padding: 5px 11px; border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-size: .72rem; font-weight: 700; letter-spacing: .02em;
}
.lg-title {
    font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em;
    line-height: 1.25; margin: 14px 0 0; color: var(--text);
}
.lg-date {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 10px; font-size: .84rem; color: var(--text-sub);
}
.lg-date::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: var(--success);
}
.lg-lead {
    margin-top: 16px;
    font-size: .96rem; line-height: 1.7; color: var(--text-sub);
}

/* ── 본문 + 목차 ── */
.lg-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.lg-toc { display: none; }

@media (min-width: 1000px) {
    .lg-body { grid-template-columns: minmax(0, 1fr) 208px; gap: 28px; align-items: start; }
    .lg-toc {
        display: block; position: sticky; top: calc(var(--nav-h) + 20px);
        background: var(--surface); border: 1px solid var(--border);
        border-radius: var(--radius); box-shadow: var(--shadow);
        padding: 14px 12px;
    }
    .lg-toc-m { display: none; }
}
.lg-toc-label {
    font-size: .72rem; font-weight: 700; color: var(--text-sub);
    padding: 0 6px 10px;
}
.lg-toc a {
    display: block; padding: 8px 10px; margin-bottom: 2px;
    font-size: .84rem; line-height: 1.4; border-radius: var(--radius-sm);
    color: var(--text-sub); text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.lg-toc a:hover { background: var(--bg); color: var(--text); }
.lg-toc a.on { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); font-weight: 600; }

/* 모바일 목차 — 카드로 접어둔다 */
.lg-toc-m {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    margin-bottom: 14px; overflow: hidden;
}
.lg-toc-m > summary {
    padding: 15px 16px; font-size: .92rem; font-weight: 700; color: var(--text);
    cursor: pointer; list-style: none;
    display: flex; align-items: center; justify-content: space-between;
}
.lg-toc-m > summary::-webkit-details-marker { display: none; }
.lg-toc-m > summary::after {
    content: ''; width: 7px; height: 7px; flex-shrink: 0;
    border-right: 2px solid var(--text-sub); border-bottom: 2px solid var(--text-sub);
    transform: rotate(45deg) translateY(-2px); transition: transform .18s ease;
}
.lg-toc-m[open] > summary::after { transform: rotate(-135deg) translateY(1px); }
.lg-toc-m ol { list-style: none; padding: 0 8px 8px; margin: 0; }
.lg-toc-m a {
    display: flex; gap: 10px; align-items: center;
    padding: 10px 8px; border-radius: var(--radius-sm);
    font-size: .92rem; color: var(--text); text-decoration: none;
}
.lg-toc-m a:active { background: var(--bg); }
.lg-toc-m a .n {
    flex: 0 0 22px; height: 22px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bg); color: var(--text-sub);
    font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* ── 조항 = 카드 ── */
.lg-sec {
    scroll-margin-top: calc(var(--nav-h) + 16px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 18px;
    margin-bottom: 12px;
}
.lg-sec > h2 {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.08rem; font-weight: 700; letter-spacing: -.02em;
    color: var(--text); margin-bottom: 14px;
}
.lg-num {
    flex: 0 0 26px; height: 26px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* 본문(슈퍼어드민이 편집한 HTML이 그대로 들어오는 자리) */
.lg-rt { overflow-x: auto; }
.lg-rt p { font-size: .96rem; line-height: 1.75; color: var(--text); }
.lg-rt p + p { margin-top: 12px; }
.lg-rt ul, .lg-rt ol { margin: 0; padding: 0; list-style: none; }
.lg-rt ol { counter-reset: lgli; }
.lg-rt li {
    position: relative; padding-left: 20px; margin: 10px 0;
    font-size: .96rem; line-height: 1.7; color: var(--text);
}
.lg-rt ul > li::before {
    content: ''; position: absolute; left: 4px; top: .72em;
    width: 5px; height: 5px; border-radius: 50%; background: var(--primary);
}
.lg-rt ol > li::before {
    counter-increment: lgli; content: counter(lgli) '.';
    position: absolute; left: 0; top: 0;
    font-size: .9rem; font-weight: 700; color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.lg-rt a { color: var(--primary); text-decoration: none; font-weight: 600; }
.lg-rt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.lg-rt b, .lg-rt strong { font-weight: 700; }

/* 표 */
.lg-rt table {
    width: 100%; min-width: 420px; border-collapse: collapse;
    margin: 4px 0; border-radius: var(--radius-sm); overflow: hidden;
}
.lg-rt th, .lg-rt td {
    border-bottom: 1px solid var(--border); padding: 11px 12px;
    text-align: left; vertical-align: top;
    font-size: .9rem; line-height: 1.6;
}
.lg-rt th {
    background: var(--bg);
    font-size: .78rem; font-weight: 700; color: var(--text-sub);
    border-bottom-color: var(--border);
}
.lg-rt tr:last-child td { border-bottom: none; }

/* 보호책임자 연락처 */
.lg-contact-row {
    display: flex; gap: 14px; padding: 12px 0;
    border-bottom: 1px solid var(--border); font-size: .94rem; color: var(--text);
}
.lg-contact-row:last-child { border-bottom: none; padding-bottom: 0; }
.lg-contact-row .k { flex: 0 0 84px; color: var(--text-sub); font-size: .88rem; }

/* ── 하단 ── */
.lg-foot {
    margin-top: 6px;
    display: flex; flex-wrap: wrap; gap: 8px;
}
.lg-foot a {
    flex: 1 1 auto; min-width: 140px;
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 46px; padding: 0 18px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    font-size: .94rem; font-weight: 600; color: var(--text); text-decoration: none;
    transition: transform .15s ease, border-color .15s ease;
}
.lg-foot a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.lg-foot a:active { transform: scale(.98); }
.lg-copy {
    margin-top: 22px; text-align: center;
    font-size: .78rem; color: var(--text-sub);
}

/* 맨 위로 */
.lg-top {
    position: fixed; right: 16px; bottom: 16px; z-index: 90;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    color: var(--text); cursor: pointer; font-size: 1.05rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .15s ease;
}
.lg-top.on { opacity: 1; pointer-events: auto; }
.lg-top:active { transform: scale(.92); }

@media (min-width: 640px) {
    .lg-wrap { padding: 0 24px 88px; }
    .lg-hero { padding: 36px 4px 24px; }
    .lg-title { font-size: 2.3rem; }
    .lg-lead { font-size: 1.02rem; }
    .lg-sec { padding: 24px 22px; margin-bottom: 14px; }
    .lg-sec > h2 { font-size: 1.15rem; }
}
