/* 키플그로우 안내 문서 페이지(개인정보처리방침·이용약관·고객 지원·계정 삭제) — styles.css의 토큰·글꼴을 그대로 쓰고,
   긴 글을 읽기 좋은 한 단 배치만 더한다. 홈페이지와 같은 세계: 구름 띠, 흰 판 + 같은 색 받침, Jua 한 글꼴. */

.doc-body { background: var(--page); }

/* 위 막대: 로고(홈으로) + 문서 메뉴 */
.doc-top {
  position: relative;
  background: var(--cloud);
  padding: 14px var(--pad-x) 0;
}
.doc-top-row {
  width: min(1180px, 100%);
  margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px;
}
.doc-logo { display: block; width: clamp(140px, 14vw, 190px); }
.doc-logo img { width: 100%; height: auto; }
.doc-nav { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.doc-nav a {
  padding: 0.55em 0.95em 0.5em;
  border-radius: 99px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.2;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.doc-nav a:hover { background: var(--mint); color: var(--green-edge); }
.doc-nav a[aria-current="page"] {
  background: var(--green-ink);
  box-shadow: 0 3px 0 var(--green-ink-edge);
  color: #fff;
}
/* 첫 화면과 같은 구름 띠로 위 막대를 닫는다 */
.doc-clouds {
  height: clamp(70px, 9vw, 130px);
  margin-top: 6px;
  background: url('assets/plates/clouds.90293368.webp') 50% 0 / max(1400px, 100%) auto no-repeat;
  /* 구름 띠 아래쪽은 바탕으로 흐려지게(일자로 잘리지 않게) */
  -webkit-mask: linear-gradient(#000 45%, transparent);
          mask: linear-gradient(#000 45%, transparent);
}

/* 제목 줄 */
.doc-head {
  width: min(1180px, 100% - var(--pad-x) * 2);
  margin: clamp(24px, 4vw, 48px) auto 0;
}
.doc-head .sec-title { font-size: clamp(2rem, 1.2rem + 2.4vw, 3.2rem); }
.doc-meta { margin: 0.7em 0 0; color: var(--ink-soft); font-size: 1rem; }

/* 초안 안내: 노랑 판(정해지면 채울 곳·출시 전 확인할 곳) */
.draft-note {
  margin: clamp(18px, 2.4vw, 28px) 0 0;
  padding: 1em 1.2em 1.05em;
  border: 2px solid var(--yellow);
  border-radius: 20px;
  background: var(--lemon);
  box-shadow: 0 4px 0 var(--yellow);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.6;
}
.draft-note strong { display: block; font-weight: 400; color: var(--orange-ink); font-size: 1.08em; margin-bottom: 0.25em; }
.draft-note ul { margin: 0.4em 0 0; padding-left: 1.2em; }
.draft-note li + li { margin-top: 0.2em; }
.fill { padding: 0 0.45em; border-radius: 99px; background: var(--lemon); box-shadow: inset 0 0 0 1px var(--yellow); color: var(--orange-ink); white-space: nowrap; }

/* 본문 배치: 넓은 화면은 왼쪽 목차 + 오른쪽 본문 */
.doc-layout {
  width: min(1180px, 100% - var(--pad-x) * 2);
  margin: clamp(28px, 4vw, 48px) auto var(--sec-y);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.doc-layout.has-toc { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); }
.doc-toc {
  position: sticky; top: 20px;
  padding: 18px 18px 16px;
  border: 2px solid var(--mint);
  border-radius: 20px;
  background: #fff;
}
.doc-toc summary { cursor: pointer; color: var(--outline); font-size: 1.08rem; list-style: none; }
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc ol { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: toc; }
.doc-toc li + li { margin-top: 2px; }
.doc-toc a {
  display: block;
  padding: 0.35em 0.5em;
  border-radius: 99px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.35;
}
.doc-toc a:hover { background: var(--page); color: var(--green-edge); }

/* 글: 한 줄 약 40자(한국어) */
.doc-text { max-width: 44em; color: var(--ink); }
.doc-text > section { scroll-margin-top: 20px; }
.doc-text > section + section { margin-top: clamp(32px, 4vw, 44px); }
.doc-text h2 {
  margin: 0 0 0.6em;
  font-weight: 400;
  font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem);
  line-height: 1.3;
  color: var(--outline);
}
.doc-text h3 { margin: 1.3em 0 0.4em; font-weight: 400; font-size: 1.15rem; color: var(--ink); }
.doc-text p, .doc-text li, .doc-text td, .doc-text th, .doc-text dd { font-size: var(--body); line-height: 1.8; }
.doc-text p { margin: 0.6em 0 0; color: var(--ink-soft); text-wrap: pretty; }
.doc-text ul, .doc-text ol { margin: 0.6em 0 0; padding-left: 1.3em; color: var(--ink-soft); }
.doc-text li + li { margin-top: 0.3em; }
.doc-text a { color: var(--green-edge); text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 0.2em; }
.doc-text a:hover { text-decoration-thickness: 2px; }
.doc-text strong { font-weight: 400; color: var(--ink); background: linear-gradient(transparent 62%, var(--mint) 62%); }

/* 표(수집 항목 등): 좁은 화면에서는 가로로 밀어 본다 */
.table-wrap { margin-top: 0.9em; overflow-x: auto; border: 2px solid var(--mint); border-radius: 20px; background: #fff; }
.doc-text table { width: 100%; min-width: 560px; border-collapse: collapse; }
.doc-text th, .doc-text td { padding: 0.75em 0.9em; text-align: left; vertical-align: top; border-bottom: 1px solid var(--mint); }
.doc-text th { background: var(--page); color: var(--outline); font-weight: 400; white-space: nowrap; }
.doc-text tr:last-child td { border-bottom: 0; }
.doc-text td:first-child { color: var(--ink); white-space: nowrap; }

/* 흰 판(단계 안내·문의 등) */
.doc-card {
  margin-top: 1em;
  padding: clamp(18px, 2.4vw, 28px);
  border: 3px solid var(--green);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 5px 0 var(--green);
}
.doc-card > :first-child { margin-top: 0; }
.steps-list { counter-reset: s; list-style: none; padding-left: 0 !important; }
.steps-list > li { position: relative; padding-left: 2.6em; min-height: 2em; }
.steps-list > li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute; left: 0; top: 0.1em;
  display: grid; place-items: center;
  width: 1.8em; height: 1.8em;
  border-radius: 50%;
  background: var(--green-ink);
  box-shadow: 0 0.14em 0 var(--green-ink-edge);
  color: #fff;
  font-size: 0.9em;
  line-height: 1;
}
.steps-list > li + li { margin-top: 0.8em; }

/* 지워지는 것 / 남는 것 두 칸 */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 1em; }
.two-col .doc-card { margin-top: 0; }
.doc-card.keep { border-color: var(--yellow); box-shadow: 0 5px 0 var(--yellow); }
.doc-card h3 { margin-top: 0; }

/* 자주 묻는 질문: 펼치기 */
.faq { margin-top: 1em; display: grid; gap: 12px; }
.faq details {
  border: 2px solid var(--mint);
  border-radius: 20px;
  background: #fff;
  transition: border-color 160ms ease-out;
}
.faq details[open] { border-color: var(--green); box-shadow: 0 4px 0 var(--green); }
.faq summary {
  position: relative;
  padding: 0.95em 3em 0.9em 1.1em;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  position: absolute; right: 1.2em; top: 50%;
  width: 0.55em; height: 0.55em;
  background: linear-gradient(var(--green-edge), var(--green-edge)) 0 100% / 100% 3px no-repeat, linear-gradient(var(--green-edge), var(--green-edge)) 100% 0 / 3px 100% no-repeat;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq summary:focus-visible { outline: 3px solid var(--green-edge); outline-offset: 2px; border-radius: 20px; }
.faq .a { padding: 0 1.1em 1em; }
.faq .a > :first-child { margin-top: 0; }

/* ── 고객지원(support.html): 유형 카드 · 양식 · 접수 완료 ── */
.sp-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sp-tab {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px 16px;
  border: 3px solid var(--mint);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 5px 0 var(--mint);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 90ms ease-out, box-shadow 90ms ease-out, border-color 160ms ease-out;
}
.sp-tab:hover { border-color: var(--green); }
.sp-tab:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--mint); }
.sp-tab[aria-selected="true"] { border-color: var(--green); background: var(--page); box-shadow: 0 5px 0 var(--green); }
.sp-tab:focus-visible { outline: 3px solid var(--green-edge); outline-offset: 3px; }
.sp-ico {
  flex: none; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--mint); color: var(--green-edge);
}
.sp-tab[aria-selected="true"] .sp-ico { background: var(--green-ink); color: #fff; }
.sp-ico svg { width: 28px; height: 28px; }
.sp-tab-text b { display: block; font-weight: 400; font-size: 1.3rem; line-height: 1.3; }
.sp-tab-text small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.4; }
.doc-text.sp { max-width: 52em; }
.sp-panel { margin-top: clamp(24px, 3vw, 36px); }
.sp-panel > h2 { margin-top: clamp(32px, 4vw, 44px); }
.sp-panel > h2:first-child { margin-top: 0; }
.sp-panel[hidden], .sp-form[hidden] { display: none !important; }

.sp-form { display: grid; gap: 14px; }
.sp-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.sp-field label, .sp-field legend { display: block; margin-bottom: 6px; padding: 0; color: var(--ink); font-size: 1.05rem; }
.sp-field em { margin-left: 4px; font-style: normal; font-size: 0.82rem; color: var(--green-edge); }
.sp-opt { margin-left: 4px; font-size: 0.82rem; color: var(--ink-soft); }
.sp-form input:not([type="checkbox"]):not([type="radio"]), .sp-form textarea {
  width: 100%; box-sizing: border-box;
  padding: 0.75em 0.95em;
  border: 2px solid var(--mint);
  border-radius: 16px;
  background: var(--page);
  color: var(--ink);
  font: inherit; font-size: 1.05rem;
  transition: border-color 140ms ease-out, background 140ms ease-out;
}
.sp-form textarea { resize: vertical; min-height: 6em; line-height: 1.6; }
.sp-form input:focus, .sp-form textarea:focus { outline: none; border-color: var(--green); background: #fff; }
.sp-form [aria-invalid="true"] { border-color: #d94a4a !important; }
.sp-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sp-chips label { margin: 0; cursor: pointer; }
.sp-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sp-chips span {
  display: inline-block; padding: 0.55em 1em 0.5em;
  border: 2px solid var(--mint); border-radius: 99px;
  background: #fff; color: var(--ink-soft); font-size: 1rem;
  transition: background 140ms ease-out, border-color 140ms ease-out;
}
.sp-chips input:checked + span { border-color: var(--green); background: var(--green-ink); color: #fff; }
.sp-chips input:focus-visible + span { outline: 3px solid var(--green-edge); outline-offset: 2px; }
.sp-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.sp-check input { flex: none; width: 22px; height: 22px; margin: 0.15em 0 0; accent-color: var(--green-ink); }
.sp-check b { font-weight: 400; color: var(--ink); }
.sp-hint, .sp-count { margin: 0 !important; color: var(--ink-soft); font-size: 0.9rem !important; }
.sp-count { text-align: right; margin-top: 4px !important; }
.sp-err { margin: 0 !important; color: #c23b3b !important; font-size: 0.95rem !important; line-height: 1.5 !important; }
.sp-err:empty { display: none; }
.sp-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sp-submit, .sp-again {
  justify-self: start;
  padding: 0.8em 1.6em 0.75em;
  border: 0; border-radius: 18px;
  background: var(--green-ink);
  box-shadow: 0 5px 0 var(--green-ink-edge);
  color: #fff; font: inherit; font-size: 1.12rem;
  cursor: pointer;
  transition: transform 90ms ease-out, box-shadow 90ms ease-out;
}
.sp-submit:active, .sp-again:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--green-ink-edge); }
.sp-submit:disabled { opacity: 0.7; cursor: progress; }
.sp-submit:focus-visible, .sp-again:focus-visible { outline: 3px solid var(--green-edge); outline-offset: 3px; }
.sp-done { text-align: center; }
.sp-done:focus { outline: none; }
.doc-text .sp-done-badge { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--green-ink); color: #fff; }
.sp-done-badge svg { width: 36px; height: 36px; }
.sp-done h3 { margin: 0.6em 0 0.2em; font-size: 1.4rem; }
.sp-ticket { font-weight: 400; color: var(--ink); letter-spacing: 0.04em; }
.sp-done .sp-again { justify-self: center; margin-top: 0.9em; }

/* 넓은 화면 아니면 목차는 위에서 접어 둔다 */
@media (max-width: 960px) {
  .doc-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; }
}
@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
  /* 표: 줄마다 카드처럼 세운다(첫 칸이 제목, 나머지는 칸 이름 + 값) */
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  .doc-text table { min-width: 0; }
  .doc-text thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .doc-text tbody, .doc-text tr, .doc-text td { display: block; }
  .doc-text tr { margin-bottom: 10px; padding: 0.7em 0.95em 0.8em; border: 2px solid var(--mint); border-radius: 20px; background: #fff; }
  .doc-text td { padding: 0.15em 0; border: 0; }
  .doc-text td:first-child { padding-bottom: 0.3em; color: var(--outline); white-space: normal; font-size: 1.08rem; }
  .doc-text td:not(:first-child)::before { content: attr(data-label); display: block; color: var(--green-edge); font-size: 0.85rem; line-height: 1.4; }
  .doc-nav a { font-size: 0.95rem; padding: 0.6em 0.8em 0.55em; }
  .sp-pick, .sp-row { grid-template-columns: 1fr; }
  .sp-tab { padding: 14px 16px 12px; }
  .sp-submit { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-tab, .sp-submit, .sp-again { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}
