/* 처리방침·이용약관 공통 모양(빌드가 /legal.css로 복사). 분석 스크립트 없음 · 글꼴은 사이트가 직접 전달하는 Jua·Gowun Dodum(외부 요청 0) */
:root {
  --bg: #f2f2f3;
  --paper: #ffffff;
  --ink: #17171c;
  --muted: #5f5f66;
  --line: #e2e2e4;
  --chip: #f2f2f3;
  --chip-on: #17171c;
  --chip-on-ink: #ffffff;
  --soft: #fde9f0;
  --link: #af4375;
  --display: "Jua", system-ui, sans-serif;
  --body:
    "Gowun Dodum", system-ui, -apple-system, "Apple SD Gothic Neo",
    "Malgun Gothic", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1e21;
    --paper: #2a2a2e;
    --ink: #f0f0f2;
    --muted: #a6a6ac;
    --line: #404046;
    --chip: #2c2c30;
    --chip-on: #f0f0f2;
    --chip-on-ink: #1c1c1f;
    --soft: #44353a;
    --link: #e885ae;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.8 var(--body);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a {
  color: var(--link);
  text-underline-offset: 3px;
}
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: 6px;
}
b {
  font-weight: 700;
}

/* 위 줄: 사이트로 돌아가기 · 언어 */
.bar,
.layout,
.foot {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
}
.home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font: 400 1.1rem/1 var(--display);
}
.home img {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}
.home::before {
  content: "‹";
  font-size: 1.4rem;
  color: var(--muted);
  margin-right: -2px;
}
.lang {
  font: 400 0.9rem/1 var(--display);
  color: var(--ink);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--chip);
}

/* 제목 · 두 문서 오가기 */
.head {
  padding-top: 24px;
  max-width: 68ch;
}
.docs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--chip);
  margin-bottom: 20px;
}
.docs a {
  font: 400 0.9rem/1 var(--display);
  color: var(--ink);
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 999px;
}
.docs a[aria-current] {
  background: var(--chip-on);
  color: var(--chip-on-ink);
}
h1 {
  font: 400 clamp(2.1rem, 7vw, 3rem)/1.15 var(--display);
  margin: 0;
  letter-spacing: -0.01em;
}
.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}

/* 한눈에: 이 페이지에서 단 하나 눈에 띄는 것 — 말랑한 장난감 겉면처럼 둥글고 윤이 나는 덩어리 */
.glance {
  position: relative;
  margin: 28px 0 8px;
  padding: 22px 24px 20px;
  border-radius: 32px;
  background:
    radial-gradient(
      120% 90% at 12% 0%,
      rgba(255, 255, 255, 0.7),
      transparent 55%
    ),
    var(--soft);
}
@media (prefers-color-scheme: dark) {
  .glance {
    background:
      radial-gradient(
        120% 90% at 12% 0%,
        rgba(255, 255, 255, 0.08),
        transparent 55%
      ),
      var(--soft);
  }
}
.glance h2 {
  font: 400 1.15rem/1.3 var(--display);
  margin: 0 0 10px;
  border: 0;
  padding: 0;
}
.glance ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.glance li {
  position: relative;
  padding-left: 30px;
  margin: 0;
  line-height: 1.6;
}
.glance li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--link);
}
.glance li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.2em + 4px);
  width: 5px;
  height: 9px;
  border: solid var(--soft);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* 목차(넓은 화면 = 왼쪽 기둥, 좁은 화면 = 접힘) + 본문 */
.layout {
  display: grid;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 48px;
}
.toc {
  font-size: 0.95rem;
}
.toc summary {
  font: 400 1rem/1 var(--display);
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--chip);
  list-style-position: inside;
}
.toc ol {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.toc li {
  margin: 0;
}
.toc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 6px 12px;
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.4;
}
.toc a:hover {
  background: var(--chip);
}
.toc a[aria-current] {
  background: var(--chip-on);
  color: var(--chip-on-ink);
}
.toc .n {
  font: 400 0.8rem/1 var(--display);
  color: inherit;
  opacity: 0.6;
  min-width: 1.2em;
}
article {
  min-width: 0;
  max-width: 68ch;
}
article > p:first-child {
  font-size: 1.125rem;
}
@media (min-width: 960px) {
  /* 머리·본문 = 오른쪽 한 기둥(왼쪽 끝이 같은 선), 목차 = 본문 옆 */
  .layout {
    grid-template-columns: 232px 1fr;
    grid-template-areas: "toc head" "toc article";
    column-gap: 56px;
  }
  .head {
    grid-area: head;
  }
  .toc {
    grid-area: toc;
  }
  article {
    grid-area: article;
  }
  .toc {
    margin-top: 24px;
    position: sticky;
    top: 20px;
    align-self: start;
    max-height: calc(100vh - 40px);
    overflow: auto;
  }
  .toc summary {
    pointer-events: none;
    background: none;
    padding: 0 12px 4px;
    list-style: none;
    color: var(--muted);
    font-size: 0.9rem;
  }
  .toc summary::-webkit-details-marker {
    display: none;
  }
}

/* 본문 장: 번호 = 사이트 칸처럼 둥근 원(번호로 서로 가리키므로 실제 순서) */
article h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 1.35rem/1.3 var(--display);
  margin: 48px 0 12px;
  scroll-margin-top: 20px;
}
article h2 .n {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--chip);
  font-size: 1rem;
}
p,
li {
  margin: 8px 0;
}
ul {
  padding-left: 22px;
}
li::marker {
  color: var(--muted);
}

/* 표: 둥근 종이 위에, 좁으면 옆으로 넘김 */
.scroll {
  overflow-x: auto;
  margin: 12px 0;
  border-radius: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.6;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
}
th {
  font: 400 0.9rem/1.3 var(--display);
  color: var(--muted);
  background: var(--chip);
  white-space: nowrap;
}
td {
  border-top: 1px solid var(--line);
}
td:first-child {
  font-family: var(--display);
  white-space: nowrap;
}
@media (min-width: 600px) {
  .scroll table:has(th:nth-child(4)) {
    min-width: 560px;
  }
}
/* 좁은 화면: 표 한 줄 = 카드 하나, 칸마다 머리 이름을 붙여 위아래로(legal.js가 data-label을 붙임 — 없으면 옆으로 넘김) */
@media (max-width: 599px) {
  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td {
    display: block;
  }
  table.stack tr:has(th) {
    display: none;
  }
  table.stack tr + tr {
    border-top: 1px solid var(--line);
  }
  table.stack td {
    border: 0;
    padding: 4px 16px;
    white-space: normal;
  }
  table.stack td:first-child {
    padding-top: 14px;
  }
  table.stack td:last-child {
    padding-bottom: 14px;
  }
  table.stack td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    font: 400 0.8rem/1.4 var(--display);
    color: var(--muted);
  }
}

details.history {
  margin-top: 16px;
}
details.history summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.95rem;
}
.note {
  color: var(--muted);
  font-size: 0.9rem;
}

.foot {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.foot a {
  color: inherit;
}
