/* 법률 문서 공용 스타일 — privacy-policy / terms-of-service / delete-account / index.
   iframe 풀스크린 오버레이와 일반 브라우저 양쪽에서 모두 보기 좋게 설계.
   변경 시 모든 페이지에 일괄 반영됨. */

* { box-sizing: border-box; margin: 0; padding: 0; }

/* iframe 오버레이 안에서도 스크롤바를 항상 노출해 스크롤 가능함을 시각적으로 알린다. */
html {
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
  overflow-y: scroll;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK KR",
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.75;
  color: #1f2940;
  background: transparent;
  word-break: keep-all;
  overflow-wrap: anywhere;
  /* iframe 풀스크린 오버레이일 때 닫기(✕) 버튼(44px)이 우상단을 가리므로 top 여백을 넉넉히.
     safe-area도 함께 반영해 노치·홈인디케이터 영역을 피한다. */
  padding:
    max(calc(env(safe-area-inset-top, 0px) + 64px), 72px)
    max(env(safe-area-inset-right, 0px), 16px)
    max(env(safe-area-inset-bottom, 0px), 80px)
    max(env(safe-area-inset-left, 0px), 16px);
}

main {
  max-width: 760px;
  margin: 0 auto;
  background: transparent;
  padding: 0;
}

/* ── 제목 계층 ─────────────────────────────────────────────── */

h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: #0f172a;
  line-height: 1.35;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 48px 0 16px;
  padding-top: 32px;
  border-top: 2px solid #d6e2f1;
  color: #1f3a8a;
  line-height: 1.4;
}
h2:first-of-type { border-top: none; padding-top: 0; margin-top: 32px; }

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: #1f3a8a;
  line-height: 1.45;
}

/* ── 본문 요소 ─────────────────────────────────────────────── */

p, ul, ol, table { margin: 14px 0; }
p { color: #1f2940; }

ul, ol {
  padding-left: 28px;
}
li {
  margin: 8px 0;
}
li::marker { color: #64748b; }

strong { color: #0f172a; font-weight: 700; }
em { color: #1f3a8a; font-style: normal; font-weight: 600; }

a {
  color: #1f3a8a;
  text-decoration: underline;
  text-decoration-color: rgba(31, 58, 138, 0.4);
  text-underline-offset: 3px;
  word-break: break-all;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover, a:focus {
  color: #16297a;
  text-decoration-color: currentColor;
}

/* ── 표 ─────────────────────────────────────────────────────── */

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.95rem;
  border: 1px solid #cfdcef;
  border-radius: 10px;
  overflow: hidden;
}
th, td {
  border-bottom: 1px solid #dde6f3;
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
}
th {
  background: #eaf2ff;
  color: #1f3a8a;
  font-weight: 700;
}
tbody tr:nth-child(even) td { background: #f5f9fd; }
tbody tr:last-child td { border-bottom: none; }

/* ── 코드 / 구분선 / 푸터 ─────────────────────────────────── */

code {
  background: #e8f0fc;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: #1f3a8a;
}
hr { border: none; border-top: 1px solid #dde6f3; margin: 32px 0; }

footer {
  max-width: 760px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* ── 문서 메타 카드 (시행일·개정일·언어 링크) ───── */
/* HTML 측에서 <ul class="doc-meta">로 표시한 ul만 카드로 시각화. */

.doc-meta {
  background: #f0f5fc;
  border: 1px solid #d6e2f1;
  border-radius: 10px;
  padding: 14px 20px;
  margin: 20px 0 32px;
  list-style: none;
}
.doc-meta li {
  margin: 4px 0;
  font-size: 0.92rem;
  color: #475569;
}
.doc-meta li::before {
  content: "•";
  color: #94a3b8;
  margin-right: 8px;
}
.doc-meta a {
  word-break: break-all;
}

/* ── 인덱스 페이지 전용 ──────────────────────────────────── */

main h2 + ul {
  list-style: none;
  padding-left: 0;
}
main h2 + ul li {
  margin: 12px 0;
}
main h2 + ul li a {
  display: inline-block;
  padding: 4px 0;
  font-size: 1.05rem;
}

/* ── 모바일 ───────────────────────────────────────────────── */

@media (max-width: 540px) {
  html { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.2rem; margin-top: 36px; padding-top: 24px; }
  h3 { font-size: 1.02rem; }
  table { font-size: 0.88rem; }
  th, td { padding: 8px 10px; }
}
