/* duruwap studio 공통 스타일 — 개인정보 처리방침·지원 페이지(모든 서비스·언어)가 함께 쓴다 */
:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --fg: #1b2330;
  --muted: #5d6676;
  --line: #e4e8ee;
  --brand: #2f4be0;
  --brand-dot: #ffd43b;
  --accent: #2f4be0;
  --accent-strong: #2135ad;
  --accent-soft: #eef1fd;
  --radius: 12px;
  --wrap: 760px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e131c;
    --surface: #151c28;
    --fg: #e4e8ef;
    --muted: #98a2b3;
    --line: #253043;
    --accent: #8fb0ff;
    --accent-strong: #b5ccff;
    --accent-soft: #18243d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: "Pretendard Variable", "Pretendard JP Variable", "Pretendard", "Apple SD Gothic Neo",
    "Noto Sans KR", "Noto Sans JP", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.75; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }
html:lang(ko) body { word-break: keep-all; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
a:hover { color: var(--accent-strong); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

/* 머리글: 브랜드 + 언어 선택 */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; min-height: 60px; padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--fg); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
}
.brand:hover { color: var(--fg); }
.brand-mark { flex: none; display: block; width: 28px; height: 28px; }

.langs { display: flex; gap: 2px; padding: 3px; background: var(--surface); border-radius: 10px; }
.langs a {
  padding: 5px 12px; border-radius: 7px; color: var(--muted);
  text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.4;
}
.langs a:hover { color: var(--fg); }
.langs a[aria-current] {
  background: var(--bg); color: var(--accent); font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px var(--line);
}

/* 문서 */
main { padding-top: 44px; padding-bottom: 64px; }
.eyebrow {
  margin: 0 0 8px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .02em;
}
h1 { margin: 0; font-size: 32px; line-height: 1.3; font-weight: 800; letter-spacing: -0.025em; }
.meta { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.lead {
  margin: 28px 0 0; padding: 18px 22px; background: var(--surface);
  border-left: 3px solid var(--accent); border-radius: 4px var(--radius) var(--radius) 4px;
}

section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
h2 {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 14px; font-size: 20px; line-height: 1.4; font-weight: 700; letter-spacing: -0.015em;
}
h2 .num {
  flex: none; color: var(--accent); font-size: 15px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
p, ul { margin: 0 0 12px; }
p:last-child, ul:last-child { margin-bottom: 0; }
ul { padding-left: 1.2em; }
li { margin-bottom: 8px; padding-left: 2px; }
li::marker { color: var(--accent); }
strong { color: var(--accent-strong); font-weight: 700; }

/* 표 — 좁은 화면에서는 행마다 카드로 바뀐다 */
.table-wrap { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.6; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .01em; }
td:first-child { font-weight: 600; width: 28%; }
td:last-child { width: 26%; }

@media (max-width: 600px) {
  .site-header .langs { flex: 1 1 100%; }
  .site-header .langs a { flex: 1; text-align: center; padding-left: 4px; padding-right: 4px; }
  .toc { display: none; }
  main { padding-top: 32px; padding-bottom: 48px; }
  h1 { font-size: 27px; }
  .lead { padding: 16px; }
  section { margin-top: 32px; padding-top: 28px; }
  h2 { font-size: 18px; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: auto !important; }
  tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  tr:last-child { border-bottom: 0; }
  td { padding: 0; border: 0; }
  td + td { margin-top: 8px; }
  td:first-child { font-size: 16px; margin-bottom: 4px; }
  td[data-label]:not(:first-child)::before {
    content: attr(data-label); display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .02em;
  }
}

/* 이동 경로: 앱 지원 / 앱 이름 */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.crumbs a { color: var(--accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--line); font-weight: 400; }

/* 앱 목록 · 문서 목록 */
.list-label {
  margin: 40px 0 12px; color: var(--muted); font-size: 13px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc-list li { margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.doc-list a {
  display: flex; align-items: center; gap: 18px; padding: 22px 8px;
  color: var(--fg); text-decoration: none; transition: background-color .15s;
}
.doc-list a:hover { background: var(--surface); color: var(--fg); }
.doc-list a:hover .title { color: var(--accent); }
.doc-list a:hover .arrow { transform: translateX(3px); }
.doc-list a:focus-visible { outline-offset: -2px; }
.doc-text { flex: 1; min-width: 0; }
.doc-list .title { display: block; font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; transition: color .15s; }
.doc-list .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.doc-meta { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.doc-num {
  flex: none; align-self: flex-start; padding-top: 3px; min-width: 2em;
  color: var(--accent); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.doc-list .arrow { flex: none; color: var(--accent); font-size: 20px; line-height: 1; transition: transform .15s; }

/* 첫 화면: 앱마다 오른쪽에 문서 버튼 */
.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.app-list > li {
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; margin: 0;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
}
.app-name { flex: 1 1 220px; min-width: 0; color: var(--fg); text-decoration: none; }
.app-name:hover { color: var(--fg); }
.app-name:hover .title { color: var(--accent); }
.app-list .title { display: block; font-size: 17px; font-weight: 700; line-height: 1.4; transition: color .15s; }
.app-list .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.app-links { display: flex; gap: 8px; }
.app-links a {
  padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  color: var(--fg); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s;
}
.app-links a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* 고객 지원 */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq details:last-child .answer { padding-bottom: 0; }
.faq summary {
  position: relative; padding: 15px 40px 15px 0; cursor: pointer;
  font-weight: 600; line-height: 1.55; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 22px; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}
.faq details[open] summary::after { top: 26px; transform: rotate(-135deg); border-color: var(--accent); }
.faq summary:hover, .faq details[open] summary { color: var(--accent); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.faq .answer { padding: 0 0 18px; color: var(--fg); }
.faq b { color: var(--accent-strong); font-weight: 700; }

.contact {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px;
  margin: 18px 0 24px; padding: 18px 22px; background: var(--surface);
  border-left: 3px solid var(--accent); border-radius: 4px var(--radius) var(--radius) 4px;
}
.contact-label { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.contact-mail { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border-radius: 10px; background: var(--accent); color: var(--bg); font-size: 15px; font-weight: 700; text-decoration: none;
}
.btn:hover { background: var(--accent-strong); color: var(--bg); }
.sub-title { margin-bottom: 8px; font-weight: 700; }

table.kv th {
  width: 30%; background: var(--surface); color: var(--muted);
  font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--line);
}
table.kv td { width: auto; font-weight: 400; }
table.kv tr:last-child th { border-bottom: 0; }

.store-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.store-links[hidden], .store-btn[hidden] { display: none; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 7px 18px 7px 14px;
  border-radius: 10px; background: var(--fg); color: var(--bg); text-decoration: none; line-height: 1.15; white-space: nowrap;
}
.store-btn { position: relative; }
.store-btn:hover { color: var(--bg); opacity: .88; }
/* 출시 전: 버튼을 흐리게 하고 '출시 예정' 표시를 오른쪽 위에 겹친다. 문구는 페이지 언어를 따른다 */
.store-btn.is-soon { cursor: pointer; }
.store-btn.is-soon > svg, .store-btn.is-soon > span { opacity: .4; }
.store-btn.is-soon:hover { opacity: 1; }
.store-btn.is-soon::after {
  content: "Coming soon"; position: absolute; top: -9px; right: -8px;
  padding: 2px 9px; border-radius: 999px; background: var(--brand-dot); color: #1b2330;
  font-size: 11px; font-weight: 800; line-height: 1.6; letter-spacing: .01em;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .25);
}
:lang(ko) .store-btn.is-soon::after { content: "출시 예정"; }
:lang(zh) .store-btn.is-soon::after { content: "即将推出"; }
:lang(ja) .store-btn.is-soon::after { content: "近日公開"; }
.store-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.store-btn svg { flex: none; width: 24px; height: 24px; }
.store-btn small { display: block; font-size: 11px; opacity: .8; }
.store-btn b { display: block; font-size: 17px; font-weight: 700; color: inherit; }

/* 문서 끝: 같은 앱의 다른 문서 */
.related {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 48px; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--fg); text-decoration: none; transition: border-color .15s, background-color .15s;
}
.related:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); }
.related-label { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.related-title { display: block; margin-top: 2px; font-size: 17px; font-weight: 700; }
.related-desc { display: block; color: var(--muted); font-size: 14px; }
.related .arrow { flex: none; color: var(--accent); font-size: 20px; }

@media (max-width: 600px) {
  .list-label { margin-top: 32px; }
  .doc-list a { gap: 14px; padding: 18px 4px; }
  .doc-list .title { font-size: 17px; }
  .doc-list .sub { font-size: 14px; }
  .contact { padding: 16px; }
  .contact .btn { flex: 1 1 100%; }
  table.kv th, table.kv td { display: block; width: auto; }
  table.kv tr { padding: 12px 16px; }
  table.kv th { padding: 0 0 2px; background: none; border: 0; font-size: 12px; }
  .store-btn { flex: 1 1 140px; justify-content: center; }
  .related { margin-top: 40px; padding: 16px 18px; }
  .app-list > li { padding: 16px; }
  .app-links { flex: 1 1 100%; }
  .app-links a { flex: 1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .doc-list a, .doc-list .arrow, .doc-list .title { transition: none; } }

/* 바닥글 */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px;
  padding-top: 24px; padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }

@media print {
  .site-header .langs, .site-footer, .store-links, .related { display: none; }
  .faq details > .answer { display: block; }
  body { font-size: 12pt; }
  a { color: inherit; }
}

/* 목차 — 넓은 화면에서만 왼쪽에 고정 */
.toc { display: none; }
@media (min-width: 1100px) {
  body.doc { --wrap: 1080px; }
  main.has-toc { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 0 80px; }
  .toc {
    display: block; position: sticky; top: 32px; align-self: start;
    padding-top: 6px; font-size: 14px; line-height: 1.5;
  }
  .toc-title { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
  .toc li { margin: 0; padding: 0; }
  .toc a {
    display: flex; gap: 10px; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent;
    color: var(--muted); text-decoration: none;
  }
  .toc a:hover { color: var(--fg); border-left-color: var(--line); }
  .toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
  .toc .num { flex: none; min-width: 1.5em; color: inherit; opacity: .7; font-variant-numeric: tabular-nums; }
}

/* 문서 안 번호 목록과 문서 끝 언어 안내 */
article ol { margin: 0 0 12px; padding-left: 1.4em; }
article ol li::marker { color: var(--accent); font-weight: 700; }
.lang-note { margin: 28px 0 0; color: var(--muted); font-size: 14px; }

/* 사이트 첫 화면(https://duruwap.github.io/) */
.hero { margin: 0; padding: 0; border: 0; background: var(--brand); color: #fff; }
.hero .wrap { display: flex; align-items: center; gap: 28px; padding-top: 64px; padding-bottom: 64px; }
.hero-mark { flex: none; width: 112px; height: 112px; }
.hero h1 { color: #fff; font-size: 52px; line-height: 1.05; letter-spacing: -0.035em; }
.hero p { margin: 12px 0 0; color: rgba(255, 255, 255, .8); font-size: 18px; line-height: 1.55; }
main.home { padding-top: 8px; }
.home-apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.home-app {
  margin: 0; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg);
}
.home-app-head { display: flex; align-items: center; gap: 16px; color: var(--fg); text-decoration: none; }
.home-app-head:hover { color: var(--fg); }
.home-app-head:hover .title { color: var(--accent); }
.app-icon { flex: none; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(15, 23, 42, .08); }
.home-app .title { display: block; font-size: 20px; font-weight: 800; line-height: 1.35; letter-spacing: -0.015em; transition: color .15s; }
.home-app .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.home-app .store-links { margin-top: 20px; }
.home-app .store-btn { min-width: 168px; }
.home-docs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.home-docs a { color: var(--muted); font-weight: 600; text-decoration: none; }
.home-docs a:hover { color: var(--accent); text-decoration: underline; }
@media (min-width: 900px) {
  body.home-page { --wrap: 960px; }
  .home-apps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .hero .wrap { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 40px; padding-bottom: 44px; }
  .hero-mark { width: 72px; height: 72px; }
  .hero h1 { font-size: 40px; }
  .hero p { font-size: 16px; }
  .home-app { padding: 20px 18px; }
  .home-app .store-btn { min-width: 0; }
}
