/* ==========================================================================
   legal-pages.css — 이용약관 · 개인정보처리방침 공개 페이지 전용 스타일
   --------------------------------------------------------------------------
   · 아우소 웹앱과 같은 색 토큰(app.css/design2.css의 값)을 그대로 쓴다.
   · 다른 화면 CSS(app.css·design2.css·logo-pwa.css·chat-wm.css·compact.css)는
     건드리지 않는다. 이 파일 하나만 약관·정책 페이지가 불러온다.
   · 다크가 기본, 라이트는 html[data-theme="light"](legal-pages.js가 기억).
   · 본문 17px / 줄길이 46rem 이하 / 본문 대비 4.5:1 이상(WCAG AA).
   ========================================================================== */

:root{
  color-scheme: dark;
  --lp-bg:#0B0D13;
  --lp-surface:#161A24;
  --lp-surface-2:#1C202C;
  --lp-line:rgba(255,255,255,.09);
  --lp-line-2:rgba(255,255,255,.16);
  --lp-text:#F2F3F8;
  --lp-muted:#A6ACBE;
  --lp-faint:#8A90A4;
  --lp-green:#03C75A;
  --lp-green-soft:rgba(3,199,90,.14);
  --lp-green-line:rgba(3,199,90,.42);
  --lp-th:#1A1F2B;
  --lp-mark:rgba(3,199,90,.20);
  --lp-shadow:0 24px 60px -34px rgba(0,0,0,.9);
  --lp-font:"Pretendard","Pretendard Variable",-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",system-ui,sans-serif;
}

html[data-theme="light"]{
  color-scheme: light;
  --lp-bg:#F5F6FB;
  --lp-surface:#FFFFFF;
  --lp-surface-2:#F7F8FD;
  --lp-line:#E1E4F0;
  --lp-line-2:#CDD2E4;
  --lp-text:#13141B;
  --lp-muted:#4C5163;
  --lp-faint:#666C80;
  --lp-green:#06795C;
  --lp-green-soft:#E6F6EF;
  --lp-green-line:#9AD8C0;
  --lp-th:#EEF1F9;
  --lp-mark:#D6F3E6;
  --lp-shadow:0 18px 44px -30px rgba(19,20,35,.35);
}

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

html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  background:var(--lp-bg);
  color:var(--lp-text);
  font-family:var(--lp-font);
  font-size:17px;
  line-height:1.8;
  word-break:keep-all;
  overflow-wrap:anywhere;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; height:auto; }

a{ color:var(--lp-green); text-decoration:underline; text-underline-offset:2px; }
a:hover{ text-decoration-thickness:2px; }

:focus-visible{
  outline:2px solid var(--lp-green);
  outline-offset:2px;
  border-radius:6px;
}

/* ---------- 건너뛰기 ---------- */
.lp-skip{
  position:absolute; left:12px; top:-56px;
  background:var(--lp-green); color:#06120C;
  padding:10px 16px; border-radius:10px; font-weight:800;
  text-decoration:none; z-index:20; transition:top .15s ease;
}
.lp-skip:focus{ top:12px; }

/* ---------- 머리 ---------- */
.lp-head{
  position:sticky; top:0; z-index:10;
  background:color-mix(in srgb, var(--lp-bg) 88%, transparent);
  border-bottom:1px solid var(--lp-line);
  backdrop-filter:saturate(140%) blur(12px);
  -webkit-backdrop-filter:saturate(140%) blur(12px);
}
@supports not (background: color-mix(in srgb, #000 50%, #fff)){
  .lp-head{ background:var(--lp-bg); }
}
.lp-bar{
  max-width:64rem; margin:0 auto; padding:10px 20px;
  display:flex; align-items:center; gap:14px;
  min-height:56px;
}
.lp-brand{
  display:inline-flex; align-items:center; gap:9px;
  font-weight:800; font-size:17px; letter-spacing:-.02em;
  color:var(--lp-text); text-decoration:none;
}
.lp-brand img{ width:28px; height:28px; border-radius:8px; }
.lp-brand:hover{ text-decoration:none; }

.lp-links{
  margin-left:auto;
  display:flex; align-items:center; gap:4px;
}
.lp-links a{
  display:inline-flex; align-items:center;
  padding:8px 12px; border-radius:999px;
  font-size:14px; font-weight:700; line-height:1.2;
  color:var(--lp-muted); text-decoration:none;
  border:1px solid transparent;
}
.lp-links a:hover{ color:var(--lp-text); background:var(--lp-surface-2); }
.lp-links a[aria-current="page"]{
  color:var(--lp-text);
  background:var(--lp-green-soft);
  border-color:var(--lp-green-line);
}

.lp-theme{
  flex:none;
  width:38px; height:38px; margin-left:6px;
  display:grid; place-items:center;
  border-radius:50%;
  border:1px solid var(--lp-line-2);
  background:var(--lp-surface);
  color:var(--lp-text);
  cursor:pointer;
}
.lp-theme svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.lp-theme:hover{ border-color:var(--lp-green-line); }

/* ---------- 본문 틀 ---------- */
.lp-main{
  max-width:64rem; margin:0 auto;
  padding:26px 20px 72px;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:26px;
}
.lp-intro{ max-width:46rem; }
.lp-body{ max-width:46rem; }

.lp-back{
  display:inline-flex; align-items:center; gap:6px;
  font-size:14.5px; font-weight:700;
  color:var(--lp-muted); text-decoration:none;
  padding:7px 12px 7px 10px; margin-bottom:6px;
  border:1px solid var(--lp-line); border-radius:999px;
  background:var(--lp-surface);
}
.lp-back:hover{ color:var(--lp-text); border-color:var(--lp-line-2); }

h1{
  font-size:clamp(26px,5.4vw,34px);
  line-height:1.32; letter-spacing:-.035em;
  margin:16px 0 8px;
}
.lp-meta{
  margin:0 0 4px; color:var(--lp-faint); font-size:14px;
}
.lp-lead{
  margin:14px 0 0; color:var(--lp-muted); font-size:16px;
  padding:14px 16px;
  border-left:3px solid var(--lp-green);
  background:var(--lp-surface);
  border-radius:0 12px 12px 0;
}

h2{
  font-size:20px; line-height:1.4; letter-spacing:-.02em;
  margin:44px 0 10px; padding-top:6px;
  scroll-margin-top:76px;
}
h2 .no{ color:var(--lp-green); font-weight:800; margin-right:8px; }
h3{
  font-size:16.5px; line-height:1.5;
  margin:22px 0 6px; letter-spacing:-.01em;
  scroll-margin-top:76px;
}
p{ margin:10px 0; }
ul,ol{ margin:10px 0; padding-left:22px; }
li{ margin:5px 0; }
li::marker{ color:var(--lp-faint); }
strong{ font-weight:800; }

.lp-note{
  margin:14px 0; padding:12px 15px;
  background:var(--lp-surface);
  border:1px solid var(--lp-line);
  border-radius:12px;
  font-size:15.5px; color:var(--lp-muted);
}
.lp-note b{ color:var(--lp-text); }

/* ---------- 목차 ---------- */
.lp-toc{
  background:var(--lp-surface);
  border:1px solid var(--lp-line);
  border-radius:16px;
  padding:16px 18px;
  box-shadow:var(--lp-shadow);
}
.lp-toc h2{
  margin:0 0 10px; padding:0; font-size:14px;
  letter-spacing:.04em; text-transform:uppercase;
  color:var(--lp-faint); font-weight:800;
}
.lp-toc ol{
  list-style:none; margin:0; padding:0;
  columns:1; column-gap:22px;
  font-size:15px; line-height:1.55;
}
.lp-toc li{ margin:0; }
.lp-toc a{
  display:block; padding:6px 0;
  color:var(--lp-muted); text-decoration:none;
  border-bottom:1px solid var(--lp-line);
}
.lp-toc li:last-child a{ border-bottom:0; }
.lp-toc a:hover{ color:var(--lp-green); }
.lp-toc .n{ color:var(--lp-faint); font-variant-numeric:tabular-nums; margin-right:7px; }

/* ---------- 표 ---------- */
.lp-table-wrap{
  margin:14px 0 18px;
  overflow-x:auto;
  border:1px solid var(--lp-line);
  border-radius:14px;
  background:var(--lp-surface);
  -webkit-overflow-scrolling:touch;
}
table{
  width:100%; border-collapse:collapse;
  font-size:15px; line-height:1.65;
  min-width:32rem;
}
caption{
  caption-side:top; text-align:left;
  padding:12px 14px 8px; font-size:14px; color:var(--lp-faint);
}
th,td{
  padding:10px 12px;
  text-align:left; vertical-align:top;
  border-bottom:1px solid var(--lp-line);
}
thead th{
  background:var(--lp-th);
  font-size:13.5px; font-weight:800; letter-spacing:.01em;
  color:var(--lp-muted);
  white-space:nowrap;
}
tbody tr:last-child th,
tbody tr:last-child td{ border-bottom:0; }
tbody th{ font-weight:700; width:9.5rem; }

/* ---------- 사업자 정보 ---------- */
.lp-biz{
  margin:48px 0 0;
  padding:18px 20px;
  background:var(--lp-surface-2);
  border:1px solid var(--lp-line);
  border-radius:16px;
  font-size:14.5px; line-height:1.75;
  color:var(--lp-muted);
}
.lp-biz h2{
  margin:0 0 10px; padding:0; font-size:15px;
  color:var(--lp-text); letter-spacing:-.01em;
}
.lp-biz dl{
  display:grid; grid-template-columns:7.5rem minmax(0,1fr);
  gap:4px 12px; margin:0;
}
.lp-biz dt{ color:var(--lp-faint); }
.lp-biz dd{ margin:0; color:var(--lp-text); }

.lp-foot{
  border-top:1px solid var(--lp-line);
  margin-top:40px;
  padding:22px 20px 40px;
  color:var(--lp-faint); font-size:13.5px;
  max-width:64rem; margin-left:auto; margin-right:auto;
}
.lp-foot nav{ display:flex; flex-wrap:wrap; gap:6px 16px; margin-bottom:8px; }

/* ---------- 큰 화면: 목차를 옆에 붙인다 ---------- */
@media (min-width:960px){
  .lp-main{
    grid-template-columns:minmax(0,1fr) 17rem;
    gap:0 40px;
    padding-top:34px;
    align-items:start;
  }
  .lp-intro{ grid-column:1; grid-row:1; }
  .lp-toc{
    position:sticky; top:78px;
    grid-column:2; grid-row:1 / span 2;
    margin-top:8px;
  }
  .lp-toc ol{ font-size:14px; }
  .lp-body{ grid-column:1; grid-row:2; margin-top:26px; }
}

/* ---------- 좁은 화면 ---------- */
@media (max-width:640px){
  body{ font-size:16.5px; line-height:1.78; }
  .lp-bar{ padding:8px 14px; gap:8px; min-height:52px; }
  .lp-brand{ font-size:16px; }
  .lp-brand img{ width:26px; height:26px; }
  .lp-links a{ padding:7px 9px; font-size:13px; }
  .lp-theme{ width:34px; height:34px; margin-left:2px; }
  .lp-main{ padding:18px 16px 56px; gap:18px; }
  /* 좁은 화면에서는 차례를 두 단으로 접어 본문이 빨리 나오게 한다 */
  .lp-toc{ padding:14px 16px; }
  .lp-toc ol{ columns:2; column-gap:16px; font-size:14px; }
  .lp-toc li{ break-inside:avoid; }
  .lp-toc a{ padding:5px 0; }
  .lp-toc .n{ margin-right:5px; }
  h1{ font-size:26px; margin-top:12px; }
  h2{ font-size:18.5px; margin-top:36px; }
  h3{ font-size:16px; }
  .lp-lead{ font-size:15.5px; }
  .lp-biz dl{ grid-template-columns:1fr; gap:0 0; }
  .lp-biz dt{ margin-top:6px; }
  table{ font-size:14.5px; min-width:28rem; }
  .lp-foot{ padding:18px 16px 36px; }
}

@media (max-width:400px){
  .lp-links a{ padding:7px 7px; font-size:12.5px; letter-spacing:-.01em; }
  .lp-brand span{ display:none; }
}

/* ---------- 움직임 줄이기 / 인쇄 ---------- */
@media (prefers-reduced-motion:reduce){
  *{ transition:none !important; animation:none !important; }
}

@media print{
  :root{ color-scheme:light; }
  body{ background:#fff; color:#000; font-size:11pt; }
  .lp-head,.lp-toc,.lp-theme,.lp-back,.lp-foot nav{ display:none !important; }
  .lp-main{ display:block; max-width:none; padding:0; }
  .lp-body{ max-width:none; }
  a{ color:#000; text-decoration:underline; }
  h2{ break-after:avoid; }
  .lp-table-wrap,.lp-biz{ break-inside:avoid; }
}
