:root {
  color-scheme: light dark;
  --bg: #f4f5f9;
  --surface: #ffffff;
  --ink: #171a2e;
  --muted: #5b6178;
  --line: #dcdfea;
  --accent: #3347ff;
  --accent-ink: #ffffff;
  --code: #e9ebf4;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e1b;
    --surface: #14172a;
    --ink: #e9ecfa;
    --muted: #9aa1bd;
    --line: #262a44;
    --accent: #8795ff;
    --accent-ink: #0c0e1b;
    --code: #1c2038;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; }
.foot { margin-top: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ── 상단 바 ── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 24px;
}
.brand {
  font-weight: 800; font-size: 18px; letter-spacing: -0.04em;
  color: var(--ink); text-decoration: none;
}
.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a {
  position: relative; padding: 8px 12px; font-size: 15px; font-weight: 500;
  color: var(--muted); text-decoration: none; transition: color .15s;
}
.topnav a:hover { color: var(--ink); }
.topnav a[aria-current] { color: var(--ink); font-weight: 700; }
.topnav a[aria-current]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; background: var(--accent); border-radius: 2px;
}

/* ── 레이아웃 ── */
.page { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.doc { max-width: 720px; margin: 0 auto; padding: 36px 24px 96px; }

/* ── 홈: 큰 로고 글자 ── */
.hero { padding: clamp(48px, 10vw, 112px) 0 clamp(40px, 7vw, 72px); }
.wordmark {
  margin: 0; font-weight: 800; line-height: 0.92;
  font-size: clamp(64px, 17vw, 200px); letter-spacing: -0.065em;
  animation: settle .8s cubic-bezier(.2,.7,.2,1) both;
}
.tagline { margin: clamp(28px, 4vw, 44px) 0 0; display: grid; gap: 6px; max-width: 28em; }
.tagline-en { font-size: clamp(26px, 4.4vw, 48px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.15; }
.tagline-ko { font-size: clamp(16px, 2vw, 20px); color: var(--muted); letter-spacing: -0.02em; }
.lede { margin: 28px 0 0; font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 30em; line-height: 1.6; }
@keyframes settle { from { opacity: 0; letter-spacing: -0.02em; transform: translateY(8px); } to { opacity: 1; } }

.tagline { animation: settle .8s .15s cubic-bezier(.2,.7,.2,1) both; }
.section-title { margin: 0; padding: 14px 0; font-size: 14px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--ink); }

/* 목록 행 */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-bottom: 1px solid var(--line); }
.rows a {
  display: grid; grid-template-columns: minmax(120px, 220px) 1fr 20px; gap: 16px; align-items: center;
  padding: 26px 4px; color: var(--ink); text-decoration: none;
  transition: padding .2s, background .2s;
}
.rows a:hover { padding-left: 14px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.rows .name { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -0.035em; }
.rows .desc { color: var(--muted); font-size: 15px; line-height: 1.5; }
.rows a::after {
  content: ""; width: 9px; height: 9px; justify-self: end;
  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg);
}
.block { padding-bottom: clamp(40px, 7vw, 72px); }

.mail {
  display: inline-block; margin-top: 20px; color: var(--ink); text-decoration: none;
  font-size: clamp(24px, 5vw, 44px); font-weight: 800; letter-spacing: -0.04em;
  border-bottom: 3px solid var(--accent); line-height: 1.3;
}
.mail:hover { color: var(--accent); }

/* ── 문서 페이지 ── */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.subnav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 36px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.subnav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.subnav a:hover { color: var(--ink); }
.subnav a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: 0 2px 0 var(--accent); }

.doc h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.2; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 12px; }
.doc h2 { font-size: 22px; line-height: 1.35; letter-spacing: -0.03em; font-weight: 700; margin: 52px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 17px; font-weight: 700; margin: 28px 0 8px; letter-spacing: -0.02em; }
.doc p, .doc li { font-size: 16px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li::marker { color: var(--muted); }
.doc hr { display: none; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.doc blockquote { margin: 20px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.doc blockquote p { margin: 8px 0; }
.doc code { background: var(--code); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.doc table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.doc th, .doc td { padding: 10px 14px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.doc .rows a { padding-left: 4px; }

/* ── 푸터 ── */
.foot { border-top: 1px solid var(--line); }
.foot .inner { max-width: 1080px; margin: 0 auto; padding: 28px 24px 56px; color: var(--muted); font-size: 14px; line-height: 1.7; display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
.foot a { color: var(--ink); }

@media (max-width: 640px) {
  .topbar .inner { padding: 0 16px; gap: 8px; }
  .page, .foot .inner { padding-left: 16px; padding-right: 16px; }
  .doc { padding: 28px 16px 72px; }
  .rows a { grid-template-columns: 1fr 20px; row-gap: 4px; }
  .rows .desc { grid-column: 1; grid-row: 2; }
  .rows a::after { grid-column: 2; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark, .tagline { animation: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ── 앱 소개/가이드 ── */
.wide { max-width: 960px; }
.lead { font-size: clamp(18px, 2.4vw, 21px); color: var(--muted); line-height: 1.65; margin: 0 0 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; list-style: none; padding: 0 !important; margin: 24px 0; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; line-height: 1.5; }
.facts strong { display: block; font-size: 15px; margin-bottom: 4px; }
.facts span { color: var(--muted); font-size: 14.5px; }

/* 이미지 자리: 실제 이미지가 준비되면 <img class="shot-img">로 교체 */
.shot { margin: 24px 0; }
.shot-frame {
  display: grid; place-items: center; text-align: center; padding: 16px;
  aspect-ratio: 9 / 16; max-width: 240px; margin: 0 auto;
  border: 2px dashed var(--line); border-radius: 28px; background: var(--code);
  color: var(--muted); font-size: 13px; line-height: 1.5;
}
.shot-frame.landscape { aspect-ratio: 16 / 9; max-width: 100%; border-radius: 16px; }
.shot-img { display: block; width: 100%; height: auto; max-width: 240px; margin: 0 auto; border-radius: 28px; border: 1px solid var(--line); }
.shot figcaption { margin-top: 10px; text-align: center; font-size: 14px; color: var(--muted); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; margin: 24px 0; }
.shots .shot { margin: 0; }

.steps { list-style: none; counter-reset: step; padding: 0 !important; margin: 0; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 0 16px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.steps > li::before {
  content: counter(step); grid-row: 1 / span 3; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px;
}
.steps h3 { margin: 4px 0 6px; }
.steps p { margin: 0 0 8px; }
.steps .shot { margin: 12px 0 0; }
.steps .shot-frame, .steps .shot-img { margin-left: 0; }
.steps .shot figcaption { text-align: left; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16.5px; list-style-position: outside; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.cta { display: inline-block; margin: 12px 12px 0 0; padding: 12px 22px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; }
.cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

/* ── 스토어 배지 ── */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 0; padding: 0 !important; list-style: none; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-width: 188px; padding: 10px 20px 10px 16px;
  background: #0b0b0f; color: #fff; text-decoration: none; border: 1px solid #3a3a44; border-radius: 12px;
  transition: transform .15s, border-color .15s;
}
.store:hover { transform: translateY(-2px); border-color: #fff; }
.store img { width: 28px; height: 28px; flex: none; }
.store span { display: grid; line-height: 1.2; text-align: left; }
.store small { font-size: 11px; opacity: .8; letter-spacing: 0; }
.store strong { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }

/* 앱 목록 아이콘 */
.rows .name { display: flex; align-items: center; gap: 16px; }
.app-icon { width: 56px; height: 56px; border-radius: 22%; flex: none; box-shadow: 0 0 0 1px var(--line); }

/* 로고 · 소셜 */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { height: 24px; width: auto; display: block; }
.social, .social-lg { display: flex; flex-wrap: wrap; gap: 10px; }
.social-lg { margin: 20px 0 0; }
.soc {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink) !important; text-decoration: none; font-weight: 600; font-size: 15px;
  transition: border-color .15s, transform .15s;
}
.soc:hover { border-color: var(--accent); transform: translateY(-1px); }
.soc i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; }
.soc-ig i { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.soc-th i { background: #000; box-shadow: 0 0 0 1px #3a3a44; }
.foot .soc { font-size: 14px; padding: 4px 14px 4px 4px; }
.foot .soc i { width: 28px; height: 28px; }
.foot .soc img { width: 15px; height: 15px; }

/* 언어 전환 · 다국어 이미지 */
.subnav-langs { margin-left: auto; display: flex; gap: 14px; }
.subnav-langs a[aria-current] { color: var(--ink); font-weight: 700; box-shadow: 0 2px 0 var(--accent); }
.hero-shot { margin: 28px 0 8px; }
.hero-shot .shot-img { max-width: 100%; margin: 0; }
.shot-img { border-radius: 16px; }
.shots .shot-img { max-width: 100%; }
.steps .shot-img { max-width: 320px; }
