/* 정책 페이지 공통 디자인 — 2026-10-08 리뉴얼.
   본문(법적 문구)은 각 HTML 에 그대로 두고, 읽기 좋게 보이는 것만 여기서 맡는다.
   색은 홍보 메인(design.css)과 같다. 흰 글씨 버튼은 짙은 로즈 #A94F60. */
:root {
  --brand: #D58A95;
  --brand-strong: #BC6675;
  --brand-deep: #A94F60;
  --brand-bg: #F7EFF0;
  --brand-tint: #FBF5F6;
  --ink: #191F28;
  --text2: #4E5968;
  --text3: #6B7684;
  --line: #ECE6E8;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--brand-tint); color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 16px; line-height: 1.85; letter-spacing: -.015em;
  word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-deep); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brand-strong); outline-offset: 3px; border-radius: 4px; }
html { scroll-padding-top: 84px; }

/* 상단 바 */
.pol-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.pol-header-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; min-height: 64px; display: flex; align-items: center; gap: 20px; }
.pol-logo { font-size: 20px; font-weight: 900; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pol-logo span { font-size: 11px; font-weight: 800; color: var(--brand-strong); margin-left: 4px; }
.pol-tabs { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.pol-tabs::-webkit-scrollbar { display: none; }
.pol-tabs a { flex-shrink: 0; font-size: 14px; font-weight: 700; color: var(--text2); text-decoration: none; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.pol-tabs a:hover { background: var(--brand-tint); color: var(--ink); }
.pol-tabs a[aria-current="page"] { background: var(--brand-bg); color: var(--brand-deep); }
.pol-lang { flex-shrink: 0; font-size: 13px; font-weight: 700; color: var(--text2); text-decoration: none; border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; background: #fff; }
.pol-lang:hover { background: var(--brand-tint); }

/* 본문 배치 — JS 가 목차를 붙이면 .pol-layout 로 감싼다 */
.pol-layout { max-width: 1160px; margin: 0 auto; padding: 32px 24px 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.wrap, main { max-width: 860px; margin: 32px auto 0; background: #fff; border: 1px solid var(--line); border-radius: 28px; padding: 48px 56px 64px; }
.pol-layout > .wrap, .pol-layout > main { margin: 0; max-width: none; }

/* 목차 */
.pol-toc-wrap { position: sticky; top: 88px; }
.pol-toc { max-height: calc(100vh - 110px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px 12px; }
.pol-toc summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 800; color: var(--text3); padding: 0 10px 8px; display: flex; justify-content: space-between; }
.pol-toc summary::-webkit-details-marker { display: none; }
.pol-toc ol { list-style: none; margin: 0; padding: 0; }
.pol-toc a { display: block; font-size: 13px; line-height: 1.5; color: var(--text2); text-decoration: none; padding: 8px 10px; border-radius: 10px; }
.pol-toc a:hover { background: var(--brand-tint); color: var(--ink); }
.pol-toc a.active { background: var(--brand-bg); color: var(--brand-deep); font-weight: 800; }

/* 제목·메타 */
h1 { font-size: clamp(28px, 4vw, 36px); font-weight: 900; line-height: 1.3; letter-spacing: -.035em; margin: 0 0 8px; color: var(--ink); }
.sub { font-size: 14px; color: var(--text3); margin: 0 0 20px; }
.meta { background: var(--brand-tint); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; font-size: 14px; line-height: 1.85; color: var(--text2); margin: 16px 0 24px; }
h2 { font-size: 22px; font-weight: 900; line-height: 1.4; letter-spacing: -.03em; margin: 48px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--ink); }
h3 { font-size: 17px; font-weight: 800; line-height: 1.5; margin: 28px 0 8px; color: var(--ink); }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--brand-strong); }
strong, b { font-weight: 800; }

/* 요약 상자 */
.pol-summary { margin: 24px 0 8px; border: 2px solid var(--brand-bg); background: linear-gradient(180deg, #fff, var(--brand-tint)); border-radius: 22px; padding: 26px 28px 20px; }
.pol-summary h2 { margin: 0 0 14px; padding: 0; border: 0; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.pol-summary h2::before { content: ''; width: 26px; height: 26px; border-radius: 8px; background: var(--brand-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E") center / 15px no-repeat; }
.pol-summary ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pol-summary li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; margin: 0; padding: 12px 14px; background: #fff; border-radius: 14px; border: 1px solid var(--line); font-size: 15px; line-height: 1.7; }
.pol-summary li b { color: var(--brand-deep); font-size: 14px; }
.pol-summary-note { margin: 14px 2px 0; font-size: 13px; color: var(--text3); }

/* 기존 본문 요소 */
.card { background: var(--brand-tint); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin: 18px 0; }
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; padding-top: 0; border-top: 0; }
.notice { background: #fff; border: 1px solid #EDD3D8; border-left: 5px solid var(--brand-strong); }
.hl { background: var(--brand-tint); border: 1px solid #EDD3D8; border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 16px; margin: 14px 0; color: var(--text2); }
.muted { color: var(--text3); font-size: 14px; }
.button { display: inline-flex; align-items: center; min-height: 44px; background: var(--brand-deep); color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; padding: 10px 18px; border-radius: 12px; margin: 4px 8px 4px 0; }
.button:hover { background: #963F50; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.7; }
th, td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
th { background: var(--brand-bg); color: var(--ink); font-weight: 800; white-space: nowrap; }
.policy-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 16px 0; -webkit-overflow-scrolling: touch; }
.policy-table table { border: 0; min-width: 620px; margin: 0; }
.policy-table tr > :first-child { border-left: 0; }
.policy-table tr > :last-child { border-right: 0; }
.policy-table tr:first-child > * { border-top: 0; }
.policy-table tr:last-child > * { border-bottom: 0; }
.policy-table-hint { display: none; }
.back { display: none; }

/* 하단 */
.pol-footer { max-width: 1160px; margin: 0 auto; padding: 36px 24px 56px; font-size: 13px; line-height: 1.8; color: var(--text3); }
.pol-footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 10px; }
.pol-footer-links a { color: var(--text2); font-weight: 700; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.pol-footer-links a:hover { color: var(--brand-deep); }
.pol-top { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 18px; box-shadow: 0 10px 24px rgba(25, 31, 40, .12); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; }
.pol-top.show { opacity: 1; pointer-events: auto; }

/* 태블릿 이하 — 목차는 본문 위 접이식 */
@media (max-width: 1099px) {
  .pol-layout { display: block; max-width: 860px; padding-top: 24px; }
  .pol-toc-wrap { position: static; }
  .pol-toc { max-height: none; margin-bottom: 16px; }
}
@media (max-width: 760px) {
  body { font-size: 15px; background: #fff; }
  .pol-header-inner { flex-wrap: wrap; gap: 4px 12px; padding: 10px 16px 6px; min-height: 0; }
  .pol-tabs { order: 3; width: 100%; margin: 0 -4px; padding-bottom: 4px; }
  .pol-tabs a { font-size: 13px; padding: 7px 10px; }
  .pol-lang { margin-left: auto; padding: 5px 10px; }
  .pol-layout { padding: 12px 16px 0; }
  .wrap, main { margin: 0; border: 0; border-radius: 0; padding: 20px 16px 40px; }
  .pol-layout > .wrap, .pol-layout > main { padding: 8px 0 40px; }
  h2 { font-size: 19px; margin-top: 36px; padding-top: 22px; }
  h3 { font-size: 16px; }
  .meta { font-size: 13px; padding: 14px 16px; }
  .pol-summary { padding: 20px 16px 16px; border-radius: 18px; }
  .pol-summary li { grid-template-columns: 1fr; gap: 2px; padding: 12px; font-size: 14px; }
  .card { padding: 18px; }
  th, td { padding: 10px 12px; font-size: 13px; }
  .policy-table-hint { display: block; font-size: 12px; color: var(--text3); margin: 16px 0 4px; }
  .pol-footer { padding: 28px 16px 72px; }
  html { scroll-padding-top: 120px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .pol-top { transition: none; } }
@media print {
  body { background: #fff; font-size: 12px; }
  .pol-header, .pol-toc, .pol-top, .pol-footer-links { display: none !important; }
  .pol-layout { display: block; padding: 0; }
  .wrap, main { border: 0; padding: 0; margin: 0; max-width: none; }
  .policy-table { overflow: visible; } .policy-table table { min-width: 0; }
  .card, tr, .pol-summary li { break-inside: avoid; }
  a { color: #333; }
}
