/* Dotori Works — 한 장짜리 스타일시트
   색은 포치 앱 팔레트(Theme.kt)를 그대로 따른다. */

:root {
  color-scheme: light;
  --bg: #FBF7F0;
  --surface: #FFFFFF;
  --fg: #3A2F28;
  --ink: #26221F;
  --muted: #F1EBE2;
  --muted-fg: #6E6258;      /* 앱의 #8C8076 은 크림 위 3.6:1 이라 글자용으로 한 톤 진하게 */
  --muted-fg-soft: #8C8076; /* 장식·큰 글자 전용 */
  --border: #EAE1D4;
  --gold: #FFB020;
  --gold-lip: #E8920F;
  --gold-text: #9A5B00;     /* 크림 위 강조 글자 (5:1) */
  --gold-pale: #FCEBC8;
  --on-gold: #2B2622;
  --pill-bg: #26221F;
  --pill-fg: #FFB020;
  --red: #C2372D;
  --red-pale: #FEF2F2;
  --shadow-float: 0 8px 24px rgba(58, 47, 40, .08), 0 1px 2px rgba(58, 47, 40, .06);
  --glow: rgba(255, 176, 32, .22);

  --r-card: 24px;
  --r-card-sm: 16px;
  --r-btn: 16px;
  --gutter: 24px;
  --maxw: 1080px;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1C1714;
    --surface: #28211C;
    --fg: #F6EDE1;
    --ink: #F6EDE1;
    --muted: #362D27;
    --muted-fg: #B8AB9D;
    --muted-fg-soft: #9C8F82;
    --border: #41362E;
    --gold-text: #F5B342;
    --gold-pale: #4A3B1F;
    --pill-bg: #4A3D33;
    --pill-fg: #FFB020;
    --red: #FF7A70;
    --red-pale: #3B2220;
    --shadow-float: 0 8px 24px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .3);
    --glow: rgba(255, 176, 32, .12);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1C1714;
  --surface: #28211C;
  --fg: #F6EDE1;
  --ink: #F6EDE1;
  --muted: #362D27;
  --muted-fg: #B8AB9D;
  --muted-fg-soft: #9C8F82;
  --border: #41362E;
  --gold-text: #F5B342;
  --gold-pale: #4A3B1F;
  --pill-bg: #4A3D33;
  --pill-fg: #FFB020;
  --red: #FF7A70;
  --red-pale: #3B2220;
  --shadow-float: 0 8px 24px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .3);
  --glow: rgba(255, 176, 32, .12);
}

/* ---------- 바탕 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) { body { font-size: 17px; } }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.3; color: var(--fg); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--pill-bg); color: var(--pill-fg);
  padding: 12px 16px; border-radius: 12px; font-weight: 700; text-decoration: none;
  transition: top 160ms var(--ease);
}
.skip:focus { top: 12px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 40px; } }

/* ---------- 머리글 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 17px; min-height: 44px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand small { font-weight: 600; color: var(--muted-fg); font-size: 14px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px;
  text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted-fg);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.nav a:hover, .icon-btn:hover { background: var(--muted); color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 0; font: inherit; }
.icon-btn svg { width: 20px; height: 20px; }
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-dark { display: block; }
  :root:not([data-theme="light"]) .theme-icon-light { display: none; }
}
@media (max-width: 479px) { .nav .hide-sm { display: none; } }

/* ---------- 공통 조각 ---------- */
.section { padding: 64px 0; }
@media (min-width: 768px) { .section { padding: 112px 0; } }
.section + .section { border-top: 1px solid var(--border); }
.section.tight-top { padding-top: 0; border-top: 0; }

.eyebrow { display: block; font-size: 15px; font-weight: 700; color: var(--gold-text); margin-bottom: 12px; letter-spacing: -0.01em; }
.h-display { font-size: clamp(34px, 7.4vw, 60px); line-height: 1.22; letter-spacing: -0.03em; }
.h-section { font-size: clamp(26px, 4.6vw, 40px); line-height: 1.3; }
.h-card { font-size: 19px; line-height: 1.4; }
@media (min-width: 768px) { .h-card { font-size: 20px; } }
.lead { font-size: 17px; line-height: 1.6; color: var(--muted-fg); max-width: 34em; }
@media (min-width: 768px) { .lead { font-size: 19px; } }
.muted { color: var(--muted-fg); }
.sec-head { margin-bottom: 40px; max-width: 640px; }
.sec-head .lead { margin-top: 16px; }
@media (min-width: 768px) { .sec-head { margin-bottom: 56px; } }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--pill-bg); color: var(--pill-fg);
  font-size: 13px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; white-space: nowrap;
}
.pill.soft { background: var(--muted); color: var(--muted-fg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--muted-fg); white-space: nowrap;
}

/* 버튼 */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 24px; border-radius: var(--r-btn);
  font: inherit; font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 160ms var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary {
  background: var(--gold); color: var(--on-gold);
  box-shadow: 0 4px 0 var(--gold-lip);
  margin-bottom: 4px;
}
.btn-primary:hover { background: #FFB933; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-lip); }
.btn-secondary { background: var(--surface); color: var(--fg); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--muted); }
.btn-soon {
  background: var(--muted); color: var(--muted-fg);
  border-radius: 999px; cursor: not-allowed;
}
.btn-text {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px;
  font-weight: 700; text-decoration: none; color: var(--fg);
}
.btn-text svg { width: 18px; height: 18px; transition: transform 160ms var(--ease); }
.btn-text:hover svg { transform: translateX(3px); }
@media (max-width: 479px) {
  .btns .btn { flex: 1 1 100%; }
}

/* 카드 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 24px;
}
@media (min-width: 768px) { .card { padding: 32px; } }
.card p { color: var(--muted-fg); margin-top: 8px; }
.grid { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }

.ico {
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: var(--muted); color: var(--fg);
}
.ico svg { width: 24px; height: 24px; }

/* ---------- 홈 히어로 ---------- */
.hero { padding: 48px 0 64px; }
@media (min-width: 768px) { .hero { padding: 96px 0 112px; } }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; } }
.hero .lead { margin-top: 20px; }
.hero-art {
  position: relative; border-radius: 32px; aspect-ratio: 1 / 1; max-width: 440px; width: 100%; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center; overflow: hidden;
}
.hero-art::before {
  content: ""; position: absolute; inset: 12%;
  border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 70%);
}
.hero-art img { position: relative; width: 78%; }
.hero-art .pill { position: absolute; left: 20px; top: 20px; }
.hero-art .cap {
  position: absolute; left: 20px; right: 20px; bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--muted-fg); font-weight: 600;
}

/* ---------- 앱 카드 (홈) ---------- */
.app-card {
  display: grid; gap: 32px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px;
  padding: 24px;
}
@media (min-width: 768px) { .app-card { grid-template-columns: 1fr 300px; padding: 48px; gap: 48px; align-items: center; } }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.app-icon { width: 72px; height: 72px; border-radius: 18px; border: 1px solid var(--border); flex: none; }
.app-id h3 { font-size: 22px; }
.app-id .meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.app-id .meta span:not(.pill) { font-size: 14px; color: var(--muted-fg); font-weight: 600; }
.app-card .one-liner { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.45; color: var(--fg); }
@media (min-width: 768px) { .app-card .one-liner { font-size: 22px; } }
.app-card .desc { color: var(--muted-fg); margin-top: 12px; }
.app-card .chips { margin-top: 20px; }
.app-card .btns { margin-top: 28px; }
.app-shot {
  justify-self: center; width: min(260px, 80%);
  border-radius: 24px; overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-float);
}
@media (min-width: 768px) { .app-shot { width: 100%; margin-bottom: -96px; transform: translateY(-8px); } }

/* 가치 */
.values .num {
  font-size: 15px; font-weight: 700; color: var(--gold-text); margin-bottom: 16px; display: block;
}

/* 문의 */
.contact {
  display: grid; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 32px 24px;
}
@media (min-width: 768px) { .contact { grid-template-columns: 1fr auto; padding: 48px; } }
.contact .btns { margin-top: 0; }
.mail { font-weight: 700; font-size: 17px; margin-top: 12px; display: inline-block; color: var(--fg); text-underline-offset: 4px; }

/* ---------- 바닥글 ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 56px; font-size: 14px; color: var(--muted-fg); }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer h2 { font-size: 14px; color: var(--fg); margin-bottom: 8px; letter-spacing: -0.01em; }
.site-footer ul { list-style: none; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
.site-footer li a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .brand { color: var(--fg); margin-bottom: 8px; }
.site-footer .copy { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- 포치 제품 페이지 ---------- */
.p-hero { padding: 40px 0 64px; }
@media (min-width: 768px) { .p-hero { padding: 80px 0 104px; } }
.p-hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .p-hero-grid { grid-template-columns: 1.1fr .9fr; gap: 64px; } }
.p-badge { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.p-badge img { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--border); }
.p-badge strong { display: block; font-size: 17px; letter-spacing: -0.02em; }
.p-badge span { font-size: 14px; color: var(--muted-fg); font-weight: 600; }
.p-hero .lead { margin-top: 20px; }
.p-hero .facts { margin-top: 28px; }
.p-hero-art {
  position: relative; max-width: 460px; width: 100%; margin: 0 auto; aspect-ratio: 1 / 1;
  display: grid; place-items: center;
}
.p-hero-art::before {
  content: ""; position: absolute; inset: 4%;
  border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
}
.p-hero-art img { position: relative; width: 88%; }
.bubble {
  position: absolute; top: 6%; right: 2%;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 10px 16px; font-size: 15px; font-weight: 700; line-height: 1.45; text-align: center;
  box-shadow: var(--shadow-float);
}
@media (max-width: 479px) { .bubble { font-size: 14px; top: 0; right: 0; } }

/* 단계 */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step .n {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px;
  background: var(--pill-bg); color: var(--pill-fg); font-size: 15px; font-weight: 700; margin-bottom: 20px;
}
.step .eg {
  margin-top: 20px; padding: 16px; border-radius: var(--r-card-sm);
  background: var(--muted); font-size: 15px; color: var(--muted-fg); line-height: 1.5;
}
.step .eg b { color: var(--fg); }
.meter { height: 8px; border-radius: 999px; background: var(--border); margin-top: 12px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 57%; background: var(--gold); border-radius: inherit; }

.modes { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 768px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.mode h3 { display: flex; align-items: center; gap: 10px; }
.mode .demo {
  margin-top: 20px; border-radius: var(--r-card-sm); border: 1px solid var(--border);
  padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 15px; font-weight: 600; min-height: 72px;
}
.mode .demo .big { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.mode .demo small { display: block; color: var(--muted-fg); font-weight: 500; font-size: 13px; }
.toggle { width: 52px; height: 30px; border-radius: 999px; background: var(--pill-bg); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; right: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); }
.mini-btn {
  flex: 1; text-align: center; padding: 10px 12px; border-radius: 12px;
  background: var(--gold); color: var(--on-gold); box-shadow: 0 3px 0 var(--gold-lip); font-weight: 700; font-size: 14px;
}

/* 기능 */
.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature.wide { display: grid; gap: 24px; }
@media (min-width: 900px) {
  .feature.wide { grid-column: span 2; grid-template-columns: 1fr 1.25fr; align-items: center; }
}
.pots { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 16px; border-radius: 20px; background: var(--muted); }
.pots figure { margin: 0; flex: 1; text-align: center; }
.pots img { width: 100%; max-width: 170px; margin: 0 auto; }
.pots figcaption { font-size: 13px; font-weight: 700; color: var(--muted-fg); margin-top: 4px; }
.extras { margin-top: 16px; }
.extras ul { list-style: none; display: grid; gap: 12px; }
@media (min-width: 768px) { .extras ul { grid-template-columns: repeat(2, 1fr); gap: 12px 32px; } }
.extras li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted-fg); }
.extras li b { color: var(--fg); }
.extras li svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--gold-text); }

/* 스크린샷 줄 */
.strip-wrap { position: relative; }
.strip {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 24px; margin: 0;
  scroll-padding: 0 var(--gutter);
  list-style: none;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
@media (min-width: 1160px) {
  .strip { padding-left: calc((100vw - var(--maxw)) / 2); padding-right: calc((100vw - var(--maxw)) / 2); scroll-padding: 0 calc((100vw - var(--maxw)) / 2); }
}
.strip li { flex: none; scroll-snap-align: start; width: 220px; }
@media (min-width: 768px) { .strip li { width: 260px; } }
.strip img {
  width: 100%; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 20px; border: 1px solid var(--border); background: var(--muted);
}
.strip p { font-size: 14px; color: var(--muted-fg); margin-top: 12px; font-weight: 600; }
.strip-hint { font-size: 14px; color: var(--muted-fg); display: flex; align-items: center; gap: 6px; margin-top: 16px; }
.strip-hint svg { width: 16px; height: 16px; }

/* 개인정보 약속 */
.promise {
  border-radius: 28px; padding: 32px 24px;
  background: var(--surface); border: 1px solid var(--border);
}
@media (min-width: 768px) { .promise { padding: 56px; } }
.promise-grid { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 768px) { .promise-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.promise-grid h3 { font-size: 18px; margin-top: 4px; }
.promise-grid p { color: var(--muted-fg); margin-top: 8px; }
.promise .note {
  margin-top: 40px; padding: 20px; border-radius: var(--r-card-sm);
  border: 1px dashed var(--muted-fg-soft); color: var(--muted-fg); font-size: 15px;
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
}

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 760px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  transition: border-color 160ms var(--ease);
}
.faq details[open] { border-color: var(--muted-fg-soft); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 24px; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 700; font-size: 17px; letter-spacing: -0.02em; border-radius: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--muted-fg); transition: transform 200ms var(--ease); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .a { padding: 0 24px 24px; color: var(--muted-fg); }
.faq .a p + p, .faq .a p + ul, .faq .a ul + p { margin-top: 10px; }
.faq .a ul { padding-left: 20px; }
.faq .a a { color: var(--fg); font-weight: 700; text-underline-offset: 3px; }

/* 문서 링크 */
.doc-links { display: grid; gap: 12px; }
@media (min-width: 768px) { .doc-links { grid-template-columns: repeat(3, 1fr); } }
.doc-link {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 24px; min-height: 72px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; font-weight: 700; letter-spacing: -0.01em;
  transition: background-color 160ms var(--ease);
}
.doc-link:hover { background: var(--muted); }
.doc-link small { display: block; font-weight: 500; color: var(--muted-fg); font-size: 14px; margin-top: 2px; }
.doc-link svg { width: 20px; height: 20px; color: var(--muted-fg); flex: none; }
.tm { margin-top: 32px; font-size: 13px; color: var(--muted-fg); }

/* ---------- 문서(법률) 페이지 ---------- */
.doc { max-width: 720px; margin: 0 auto; padding: 40px 0 96px; }
@media (min-width: 768px) { .doc { padding: 72px 0 128px; } }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted-fg); margin-bottom: 20px; list-style: none; }
.crumbs a { text-decoration: none; font-weight: 600; display: inline-flex; min-height: 32px; align-items: center; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--muted-fg-soft); }
.doc h1 { font-size: clamp(30px, 6vw, 40px); letter-spacing: -0.03em; }
.doc .doc-meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.doc .intro { margin-top: 28px; font-size: 17px; color: var(--fg); }
.toc {
  margin: 32px 0 8px; padding: 20px 24px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border);
}
.toc h2 { font-size: 15px; margin: 0 0 8px; color: var(--muted-fg); }
.toc ol { list-style: none; display: grid; gap: 2px; }
@media (min-width: 640px) { .toc ol { grid-template-columns: repeat(2, 1fr); column-gap: 24px; } }
.toc a { display: inline-flex; min-height: 36px; align-items: center; text-decoration: none; font-weight: 600; font-size: 15px; }
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.prose h2 {
  font-size: 22px; margin: 56px 0 16px; padding-top: 8px; position: relative;
}
.prose h2 .anchor {
  margin-left: 8px; color: var(--muted-fg-soft); text-decoration: none; font-weight: 600;
  opacity: 0; transition: opacity 160ms var(--ease);
}
.prose h2:hover .anchor, .prose h2 .anchor:focus-visible { opacity: 1; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted-fg); }
.prose strong { font-weight: 700; }
.prose a { text-underline-offset: 3px; font-weight: 600; }
.table-wrap {
  margin: 20px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.prose th { background: var(--muted); font-weight: 700; font-size: 14px; color: var(--fg); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { font-weight: 600; color: var(--fg); }
.prose td { color: var(--muted-fg); }
.callout {
  margin: 20px 0; padding: 16px 20px; border-radius: 16px; background: var(--muted); color: var(--fg); font-size: 15px;
}
.doc-foot { margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.doc-foot a { font-weight: 600; color: var(--muted-fg); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.doc-foot a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 0 80px; }
.nf img { width: 220px; margin: 0 auto 24px; }
.nf .lead { margin: 16px auto 0; }
.nf .btns { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 639px) {
  .hero-art { aspect-ratio: 5 / 4; }
  .hero-art img { width: 62%; }
  .p-hero-art { max-width: 360px; aspect-ratio: auto; padding: 56px 0 8px; }
  .p-hero { padding-bottom: 40px; }
}

/* 목차는 .prose 안에 있으므로 본문 h2/ol 규칙을 되돌린다 */
.prose .toc h2 { font-size: 15px; margin: 0 0 8px; padding-top: 0; color: var(--muted-fg); }
.prose .toc ol { margin: 0; padding: 0; }
.prose .toc li { margin: 0; }

/* 좁은 화면에서 표는 줄마다 카드처럼 쌓는다 */
@media (max-width: 639px) {
  .table-wrap { overflow: visible; }
  .prose table { min-width: 0; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose table, .prose tbody, .prose tr, .prose td { display: block; width: 100%; }
  .prose tr { padding: 16px; border-bottom: 1px solid var(--border); }
  .prose tr:last-child { border-bottom: 0; }
  .prose td { padding: 0; border: 0; }
  .prose td + td { margin-top: 10px; }
  .prose td:first-child { font-size: 16px; }
  .prose td + td::before {
    content: attr(data-label); display: block; font-size: 13px; font-weight: 700; color: var(--fg); margin-bottom: 2px;
  }
}
