/* =========================================================
   송장 도우미 웹사이트
   색과 모양은 앱의 디자인 토큰(앱 소스의 ui/Theme.kt)을 따릅니다.
   흰 바탕, 회색 띠로 구역 구분, 포인트색 하나(#6A3DE8), 모서리 8px, 이모지 없음.
   외부 스크립트·외부 글꼴 없음(다른 사이트로 나가는 요청이 없습니다). 글꼴은 휴대폰·PC의 기본 한글 글꼴을 씁니다.
   ========================================================= */

:root {
  --bg: #FFFFFF;
  --band: #F4F5F7;
  --surface: #FFFFFF;
  --line: #EEEEEE;
  --field-line: #DADCE0;
  --text: #111111;
  --text-2: #555555;
  --text-3: #6B6B6B;          /* 앱의 #999999는 본문 대비가 부족해 웹에서는 진하게 */
  --brand: #6A3DE8;
  --brand-fill: #6A3DE8;
  --brand-soft: #F3EFFE;
  --on-brand: #FFFFFF;
  --green: #0B7A45;
  --orange: #A64B00;
  --orange-soft: #FFF7ED;
  --todo-bg: #FFF3BF;
  --todo-line: #B08900;
  --todo-text: #4A3600;
  --shot-bg: #FFFFFF;
  --radius: 8px;
  --radius-tag: 4px;
  --radius-shot: 14px;
  --maxw: 1040px;
  --docw: 760px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214;
    --band: #1C1C1F;
    --surface: #1C1C1F;
    --line: #2C2C31;
    --field-line: #3A3A40;
    --text: #F2F2F4;
    --text-2: #B4B4BA;
    --text-3: #9A9AA2;
    --brand: #9D7BFF;
    --brand-fill: #6A3DE8;
    --brand-soft: #26203A;
    --on-brand: #FFFFFF;
    --green: #3DD68C;
    --orange: #FFA94D;
    --orange-soft: #2E241A;
    --todo-bg: #3D3300;
    --todo-line: #E0B400;
    --todo-text: #FFE58A;
    --shot-bg: #1C1C1F;
  }
}

*, *::before, *::after { box-sizing: border-box; }
/* scroll-padding-top: 붙어 있는 머리줄(57px)이 #main·#restricted 같은 이동 대상을 가리지 않도록 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; line-height: 1.35; letter-spacing: -0.02em; color: var(--text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  background: var(--brand-fill); color: var(--on-brand); padding: 10px 14px; border-radius: var(--radius);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 8px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 머리줄 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
/* 화면이 좁으면(글꼴에 따라 약 320~340px 이하) 메뉴가 둘째 줄로 내려갑니다. 이때 머리줄은 붙지 않습니다(아래 360px 미만 규칙). */
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 56px; gap: 0 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; overflow-wrap: normal;
  color: var(--text); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  color: var(--text-2); font-size: 15px; font-weight: 600; text-decoration: none; border-radius: var(--radius);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--band); }
.nav-links a[aria-current="page"] { color: var(--brand); }

/* ---------- 공통 구역 ---------- */
.section { padding: 56px 0; }
.band { background: var(--band); }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--brand); margin-bottom: 10px; }
.sec-title { font-size: clamp(24px, 5.4vw, 32px); font-weight: 800; }
.sec-desc { margin-top: 12px; color: var(--text-2); max-width: 680px; }
.note { margin-top: 16px; font-size: 15px; color: var(--text-3); }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: var(--radius);
  border: 1px solid transparent; font-size: 17px; font-weight: 700; line-height: 1.3;
  text-decoration: none; text-align: center;
}
.btn-primary { background: var(--brand-fill); color: var(--on-brand); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--field-line); }
.btn-secondary:hover { border-color: var(--text-3); }
/* Google Play 자리. 출시 전에는 링크가 아닌 표시(span)이고, 출시 뒤 a 로 바꾸면 채움 버튼이 됩니다. */
.btn-play { background: var(--brand-fill); color: var(--on-brand); flex-direction: column; gap: 0; padding: 6px 22px; }
.btn-play .play-label { font-size: 13px; font-weight: 600; opacity: 0.9; }
.btn-play .play-state { font-size: 17px; font-weight: 700; }
.btn-play.is-pending {
  background: var(--band); color: var(--text-2); border: 1px dashed var(--field-line); cursor: default;
}
.band .btn-play.is-pending { background: var(--surface); }

/* ---------- 히어로 ---------- */
.hero { padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(28px, 7vw, 44px); font-weight: 800; line-height: 1.3; }
.hero .lead { margin-top: 16px; font-size: 18px; color: var(--text-2); max-width: 560px; }
.cta-row { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; max-width: 420px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; list-style: none; }
.facts li {
  font-size: 14px; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--field-line); border-radius: var(--radius-tag); padding: 4px 10px; background: var(--surface);
}
.hero-shot { justify-self: center; width: 100%; max-width: 280px; }

/* ---------- 화면 사진 ---------- */
.shot img {
  border: 1px solid var(--field-line); border-radius: var(--radius-shot); background: var(--shot-bg);
}
.shot figcaption { margin-top: 12px; font-size: 15px; color: var(--text-2); line-height: 1.6; }
/* 구역 안에 화면 사진 한 장을 가운데에 둘 때(사용 방법) */
.shot-center { max-width: 300px; margin: 40px auto 0; }

/* ---------- 불편 / 기능 / 안전 목록 ---------- */
.card-list { display: grid; gap: 12px; margin-top: 28px; list-style: none; }
.card-list > li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
}
.card-list h3 { font-size: 18px; font-weight: 700; }
.card-list p { margin-top: 6px; color: var(--text-2); font-size: 16px; }

.feature-list { display: grid; gap: 0; margin-top: 28px; list-style: none; border-top: 1px solid var(--field-line); }
.feature-list > li { padding: 20px 0; border-bottom: 1px solid var(--field-line); }
.feature-list h3 { font-size: 18px; font-weight: 700; }
.feature-list p { margin-top: 6px; color: var(--text-2); font-size: 16px; }

/* ---------- 사용 방법 단계 ---------- */
.steps { list-style: none; counter-reset: step; margin-top: 28px; display: grid; gap: 20px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.steps > li::before {
  content: counter(step);
  width: 36px; height: 36px; border-radius: var(--radius);
  background: var(--brand-fill); color: var(--on-brand);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
}
.steps h3 { font-size: 18px; font-weight: 700; padding-top: 4px; }
.steps p { margin-top: 4px; color: var(--text-2); font-size: 16px; }

/* ---------- 다음 업데이트(준비 중) ---------- */
.tag {
  display: inline-block; font-size: 14px; font-weight: 700; line-height: 1.4;
  padding: 3px 9px; border-radius: var(--radius-tag);
}
.tag-pending { background: var(--orange-soft); color: var(--orange); border: 1px solid currentColor; }
.next-box { margin-top: 28px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--surface); }
.next-box > ul { list-style: none; }
.next-box > ul > li { padding: 20px; border-bottom: 1px solid var(--line); }
.next-box > ul > li:last-child { border-bottom: 0; }
.next-box h3 { font-size: 18px; font-weight: 700; }
.next-box p { margin-top: 6px; color: var(--text-2); font-size: 16px; }
.next-box .next-foot { padding: 16px 20px; border-top: 1px solid var(--line); background: var(--band); color: var(--text-2); font-size: 15px; border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- 개인정보와 안전 ---------- */
.more-link { display: inline-block; margin-top: 20px; font-weight: 700; }

/* ---------- 자주 묻는 질문 ---------- */
.faq { margin-top: 24px; border-top: 1px solid var(--field-line); }
.faq details { border-bottom: 1px solid var(--field-line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-size: 18px; font-weight: 700; line-height: 1.5;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg) translateY(-3px);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .answer { padding: 0 0 20px; color: var(--text-2); font-size: 16px; }
.faq .answer p + p { margin-top: 8px; }

/* ---------- 이용 정보(가격·휴대폰·문의) ---------- */
.info-grid { display: grid; gap: 12px; margin-top: 28px; list-style: none; }
.info-grid > li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-grid h3 { font-size: 16px; font-weight: 700; color: var(--text-2); }
.info-grid .big { margin-top: 4px; font-size: 22px; font-weight: 800; color: var(--text); }
.info-grid p { margin-top: 6px; color: var(--text-2); font-size: 16px; }

/* 게시 전에 채워야 하는 자리(오너 확인용). 지나치기 어렵게 표시합니다. */
mark.todo {
  background: var(--todo-bg); color: var(--todo-text); border: 1px dashed var(--todo-line);
  border-radius: var(--radius-tag); padding: 0 4px; font-weight: 700;
}

/* ---------- 바닥글 ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; background: var(--bg); }
.foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.foot-brand img { width: 24px; height: 24px; border-radius: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 16px; list-style: none; }
.foot-links a { display: inline-flex; min-height: 44px; align-items: center; color: var(--text); font-size: 15px; font-weight: 600; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-meta { margin-top: 8px; font-size: 14px; color: var(--text-3); }

/* ---------- 문서 페이지(사용 안내·개인정보처리방침·404) ---------- */
.doc { max-width: var(--docw); margin: 0 auto; padding: 36px 16px 64px; }
.doc .kicker { font-size: 15px; font-weight: 700; color: var(--brand); }
.doc h1 { font-size: clamp(26px, 6vw, 36px); font-weight: 800; margin-top: 6px; }
.doc .doc-meta { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.doc section { margin-top: 44px; }
.doc h2 { font-size: clamp(21px, 4.6vw, 26px); font-weight: 800; padding-top: 20px; border-top: 1px solid var(--field-line); }
.doc h3 { font-size: 18px; font-weight: 700; margin-top: 24px; }
.doc p { margin-top: 12px; color: var(--text-2); }
.doc ul, .doc ol { margin-top: 12px; padding-left: 22px; color: var(--text-2); }
.doc li { margin-top: 8px; }
.doc li::marker { color: var(--text-3); }
.doc strong, .doc b { color: var(--text); }
.doc .play-row { margin-top: 16px; max-width: 360px; display: flex; flex-direction: column; }

.toc { margin-top: 24px; background: var(--band); border-radius: var(--radius); padding: 16px 20px; }
.toc h2 { border: 0; padding: 0; font-size: 16px; color: var(--text-2); }
.toc ol { margin-top: 8px; padding-left: 22px; }
.toc li { margin-top: 4px; }
.toc a { font-weight: 600; }

.howto > li { padding-left: 4px; }
.howto b { display: block; color: var(--text); }

.callout { margin-top: 20px; background: var(--band); border-left: 4px solid var(--brand-fill); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 18px; }
.callout h3 { margin-top: 0; font-size: 17px; }
.callout p { margin-top: 6px; }

/* 개인정보처리방침 표 */
.policy table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 16px; }
.policy th, .policy td { border: 1px solid var(--field-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.policy th { width: 28%; background: var(--band); color: var(--text); font-weight: 700; }
.policy td { color: var(--text-2); }
.policy .sub { margin-top: 10px; font-size: 15px; color: var(--text-3); }
.policy .doc-end { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--field-line); }

.notfound { text-align: left; }
.notfound .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; max-width: 360px; }

/* ---------- 넓은 화면 ---------- */
@media (min-width: 560px) {
  .cta-row { flex-direction: row; flex-wrap: wrap; max-width: none; }
  .cta-row .btn { min-width: 200px; }
}
@media (max-width: 559px) {
  .policy table, .policy tbody, .policy tr, .policy th, .policy td { display: block; width: 100%; }
  .policy tr { margin-top: 12px; border: 1px solid var(--field-line); border-radius: var(--radius); overflow: hidden; }
  .policy th, .policy td { border: 0; }
  .policy th { border-bottom: 1px solid var(--field-line); }
}
/* 360px 미만(큰 글자 설정으로 화면이 확대된 경우 포함): 머리줄이 두 줄이 되어 높아질 수 있으므로 화면 위에 붙이지 않습니다.
   붙어 있으면 #main 같은 이동 대상을 가립니다. */
@media (max-width: 359.98px) {
  html { scroll-padding-top: 16px; }
  .site-header { position: static; }
  .header-row { padding-top: 6px; padding-bottom: 6px; }
}
@media (min-width: 720px) {
  .card-list.three { grid-template-columns: repeat(3, 1fr); }
  .card-list.two, .info-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid.three { grid-template-columns: repeat(3, 1fr); }
  .feature-list { grid-template-columns: 1fr 1fr; column-gap: 40px; border-top: 0; }
  .feature-list > li { border-top: 1px solid var(--field-line); border-bottom: 0; }
}
@media (min-width: 900px) {
  .section { padding: 88px 0; }
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: 1.25fr 0.75fr; gap: 56px; }
  .hero-shot { max-width: 320px; }
  .steps { grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 28px; }
  .doc { padding-top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
@media print {
  .skip { display: none; }
  .site-header { position: static; }
  .site-header nav, .foot-links { display: none; }
  body { font-size: 12pt; }
}
