/* smart-health.kr 전용 디자인 (11-05) — '단계별로 따져 보기'. 글을 원리 → 비교 → 고르기 → 미리 확인 순서로 나누고,
   단계 색은 옅은 초록 → 짙은 초록(순서가 곧 색). 그림은 진료과와 무관한 모양(층·흐름·저울·갈림길·체크리스트·달력). */
:root {
  --paper: #FFFFFF;
  --mist: #F1F6F3;
  --ink: #11302A;
  --ink-2: #45584F;
  --ink-3: #66776F;
  --line: #DCE6E1;
  --g1: #9FD3BE;
  --g2: #5FB596;
  --g3: #2C8B6B;
  --g4: #165C47;
  --link: #1E6B53;
  --display: 'Wanted Sans Variable', 'Wanted Sans', 'Pretendard Variable', Pretendard, system-ui, sans-serif;
  --body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --wrap: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.7; word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; font-weight: 700; letter-spacing: -0.025em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--g3); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 광고 표시 — 모든 페이지 맨 위 (지우지 말 것) */
.ad-band { background: var(--ink); color: #EDF3F0; font-size: 13px; line-height: 1.55; padding: 9px 20px; text-align: center; }

/* 헤더 */
.top { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 40px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; white-space: nowrap; }
.mark { display: inline-flex; align-items: center; gap: 3px; }
.mark i { display: block; width: 8px; height: 8px; border-radius: 50%; }
.mark i:nth-child(1) { background: var(--g1); } .mark i:nth-child(2) { background: var(--g2); }
.mark i:nth-child(3) { background: var(--g3); } .mark i:nth-child(4) { background: var(--g4); }
.nav { display: flex; gap: 26px; margin-left: auto; font-family: var(--display); font-weight: 600; font-size: 15.5px; color: var(--ink-2); overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; padding: 21px 0; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 2px; background: var(--c); transform: scaleX(0); transition: transform .2s ease; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.top .about { font-size: 14px; color: var(--ink-2); white-space: nowrap; }

/* 단계 점·시술 이름·날짜 */
.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.meta .tag { font-size: 12.5px; color: var(--ink-2); padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; }
.date { font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* 그림 */
.art { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px; background: #EAF4EF; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art.v1 img { transform: scaleX(-1); }
.art.v2 img { transform: scale(1.35); transform-origin: 30% 70%; }
.art.v3 img { transform: scaleX(-1) scale(1.35); transform-origin: 60% 30%; }

/* 첫 화면 */
.hero { padding: 64px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(42px, 5.2vw, 70px); line-height: 1.1; letter-spacing: -0.04em; }
.hero .lede { margin-top: 20px; font-size: 19px; color: var(--ink-2); }
.hero .tally { margin-top: 28px; font-size: 14.5px; color: var(--ink-3); }
.hero .tally a { margin-left: 4px; color: var(--link); font-weight: 600; border-bottom: 1px solid currentColor; }
.lead .meta { margin-top: 20px; }
.lead h3 { margin-top: 10px; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.3; }
.lead p.ex { margin-top: 10px; font-size: 16px; color: var(--ink-2); max-width: 38em; }
.lead .date { display: block; margin-top: 10px; }
.lead a:hover h3, .card a:hover h3, .steps li li a:hover, .archive li a:hover .t { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* 단계별로 따져 보기 — 첫 화면 판 */
.board { padding: 80px 0 88px; background: var(--mist); }
.board-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; }
.board-head h2 { font-size: clamp(30px, 3vw, 40px); line-height: 1.2; }
.board-head p { font-size: 16px; color: var(--ink-2); }
.steps { position: relative; list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: none; }
.steps::before { content: ""; position: absolute; left: 20px; right: 20px; top: 19px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--g1), var(--g4)); }
.step { position: relative; display: flex; flex-direction: column; }
.node { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #FFFFFF; font-family: var(--display); font-weight: 700; font-size: 17px; box-shadow: 0 0 0 5px var(--mist); }
.step:nth-child(1) .node, .step:nth-child(2) .node { color: var(--ink); }
.step-art { display: block; margin-top: 22px; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 12px; background: #FFFFFF; }
.step-art img { width: 100%; height: 100%; object-fit: cover; }
.step h3 { margin-top: 18px; font-size: 23px; }
.step h3 a:hover { color: var(--link); }
.step .desc { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.step ul { list-style: none; margin: 16px 0 0; padding: 0; flex: 1; }
.step ul li a { display: block; padding: 10px 0; border-top: 1px solid #D3E0D9; font-size: 15px; line-height: 1.5; font-weight: 500; }
.step .all { margin-top: 12px; font-size: 14.5px; font-weight: 600; color: var(--link); }
.step .all:hover { text-decoration: underline; }

/* 최근 글·카드 */
.recent { padding: 80px 0 40px; }
.recent h2, .topics h2, .archive h2, .related h2 { font-size: 28px; }
.cards { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.card .meta { margin-top: 16px; }
.card h3 { margin-top: 8px; font-size: 19px; line-height: 1.38; }
.card p.ex { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .date { display: block; margin-top: 8px; }

/* 시술별로 보기 */
.topics { padding: 56px 0 24px; }
.topics .tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.topics .tags a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--mist); font-weight: 600; font-size: 15px; }
.topics .tags a span { font-weight: 500; font-size: 13px; color: var(--ink-3); }
.topics .tags a:hover { background: var(--g1); }

/* 전체 글 */
.archive { padding: 56px 0 88px; }
.archive ul { list-style: none; margin: 20px 0 0; padding: 0; columns: 2; column-gap: 48px; border-top: 2px solid var(--ink); }
.archive li { break-inside: avoid; }
.archive li a { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 14px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); }
.archive li .t { font-weight: 500; font-size: 15.5px; }
.archive li .chip { grid-column: 2; font-size: 12.5px; font-weight: 500; }

/* 단계·태그·목록 페이지 */
.sec-hero { padding: 52px 0 48px; background: var(--mist); }
.sec-hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.crumb { font-size: 13.5px; color: var(--ink-3); }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.crumb span[aria-hidden] { margin: 0 9px; color: #A9B8B1; }
.sec-hero h1 { margin-top: 14px; font-size: clamp(36px, 4.2vw, 56px); line-height: 1.12; letter-spacing: -0.04em; }
.sec-hero .sub { margin-top: 14px; font-size: 17.5px; color: var(--ink-2); max-width: 32em; }
.sec-hero .count { margin-top: 10px; font-size: 14.5px; color: var(--ink-3); }
.mini-path { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mini-path a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #FFFFFF; font-family: var(--display); font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.mini-path .dot { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: #FFFFFF; font-size: 13px; }
.mini-path li:nth-child(1) .dot, .mini-path li:nth-child(2) .dot { color: var(--ink); }
.mini-path [aria-current] a { background: var(--ink); color: #FFFFFF; }
.grid-list { padding: 48px 0 88px; }
.grid-list .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0; }
.pager { margin-top: 48px; display: flex; justify-content: center; gap: 8px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.pager [aria-current] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

/* 글 페이지 */
.post-head { padding: 40px 0 8px; }
.post-head .wrap { max-width: 1120px; }
.step-chip { margin-top: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 10px; border-radius: 999px; background: var(--mist); font-family: var(--display); font-weight: 600; font-size: 14px; }
.step-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.post-head h1 { margin-top: 14px; max-width: 22em; font-size: clamp(28px, 3.3vw, 42px); line-height: 1.3; letter-spacing: -0.035em; }
.post-meta { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-3); }
.post-layout { max-width: 1120px; margin: 0 auto; padding: 24px 28px 80px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.rail { position: sticky; top: 90px; display: grid; gap: 28px; }
.rail h2 { font-size: 15px; color: var(--ink); padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.rail ul { list-style: none; margin: 0; padding: 0; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; }
.toc li a { display: block; padding: 6px 0 6px 14px; border-left: 3px solid var(--line); font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.toc li a:hover, .toc li a.on { border-left-color: var(--c, var(--g3)); color: var(--ink); }
.next-step { padding: 18px 18px 16px; background: var(--mist); border-radius: 12px; border-top: 5px solid var(--c); }
.next-step h2 { border-bottom-color: #C7D8CF; }
.next-step li a { display: block; padding: 9px 0; border-bottom: 1px solid #D3E0D9; font-size: 14.5px; line-height: 1.45; font-weight: 500; }
.next-step li a:hover, .rail .more li a:hover { color: var(--link); }
.next-step .all { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--link); }
.rail .more li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }

.post-body { font-size: 17.5px; line-height: 1.85; color: #213B34; max-width: 40em; }
.post-body > * + * { margin-top: 1.15em; }
.post-body > aside.site-disclosure { margin: 0 0 1.6em !important; }
.post-body > aside.site-disclosure + p, .post-body > p:first-child { font-size: 19px; line-height: 1.75; color: var(--ink); }
.post-body h1, .post-body h2 { margin-top: 2.2em; font-size: 26px; line-height: 1.38; scroll-margin-top: 90px; }
.post-body h2::before, .post-body h1::before { content: ""; display: block; width: 30px; height: 6px; margin-bottom: 14px; border-radius: 3px; background: var(--c, var(--g3)); }
.post-body h3 { margin-top: 1.9em; font-size: 20px; line-height: 1.45; }
.post-body h2 + *, .post-body h3 + * { margin-top: .7em; }
.post-body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(30,107,83,.35); }
.post-body strong { font-weight: 700; color: var(--ink); }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body ul { list-style: disc; } .post-body ol { list-style: decimal; }
.post-body li + li { margin-top: .45em; }
.post-body li::marker { color: var(--g3); }
.post-body figure { margin: 2em 0; }
.post-body figure img, .post-body > img, .post-body p img { width: 100%; border-radius: 12px; }
/* 로고 — 흰 글씨 로고와 검은 글씨 로고가 둘 다 보이게 중간 회색 바탕 (어두운 바탕이면 검은 로고가 사라진다) */
.post-body img[alt*="로고"], .post-body img[alt*="logo" i] { width: auto; max-width: min(100%, 320px); padding: 20px 28px; background: #7A8A84; }
.post-body figcaption { margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.post-body blockquote { margin: 1.6em 0; padding: .4em 0 .4em 1.2em; border-left: 4px solid var(--c, var(--g3)); color: var(--ink-2); }
.post-body .overflow-x-auto { overflow-x: auto; margin: 1.8em 0; border: 1px solid var(--line); border-radius: 10px; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.post-body th, .post-body td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 5.5em; }
.post-body thead th { background: var(--mist); font-family: var(--display); font-weight: 700; white-space: nowrap; }
.post-body tbody tr:last-child td { border-bottom: 0; }
.post-body details { border-top: 1px solid var(--line); padding: 12px 0; }
.post-body summary { cursor: pointer; font-weight: 700; }
.post-body p[class*="border-t"], .post-body .disclaimer { margin-top: 2.4em; padding-top: 1em; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--ink-3); }
.post-body small { font-size: 13.5px; color: var(--ink-3); }

.post-foot { margin-top: 48px; max-width: 40em; }
.post-foot .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.post-foot .tags a { font-size: 13.5px; padding: 5px 12px; border-radius: 999px; background: var(--mist); color: var(--ink-2); }
.post-foot .tags a:hover { background: var(--g1); color: var(--ink); }
.pn { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.pn a { display: block; }
.pn small { display: block; font-size: 13px; color: var(--ink-3); }
.pn span { display: block; margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.4; }
.pn a:hover span { color: var(--link); }
.pn .next { text-align: right; }
.sources { margin-top: 40px; max-width: 40em; padding: 20px 22px; background: var(--mist); border-radius: 10px; font-size: 14px; }
.sources h2 { font-size: 15px; }
.sources ol { margin: 10px 0 0; padding-left: 1.2em; }
.related { padding: 64px 0 88px; background: var(--mist); }
.related .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* 푸터 */
.foot { background: var(--mist); border-top: 1px solid var(--line); padding: 52px 0 36px; font-size: 14.5px; color: var(--ink-2); }
.foot .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr); gap: 40px; }
.foot .brand { color: var(--ink); }
.foot .about-site { margin-top: 12px; max-width: 28em; }
.foot h2 { font-size: 14px; color: var(--ink); margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: 3px 0; }
.foot li .n { color: var(--ink-3); margin-left: 2px; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot .tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.foot .disclosure { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.foot .copy { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }

@media (max-width: 1040px) {
  .hero .wrap, .sec-hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .steps::before { display: none; }
  .cards, .grid-list .cards, .related .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .rail { position: static; }
  .rail .toc { display: none; }
  .foot .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 20px; }
  .top .wrap { flex-wrap: wrap; height: auto; gap: 0; padding-top: 12px; }
  .brand { font-size: 18px; }
  .langs { margin-left: auto; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 22px; font-size: 15px; }
  .nav a { padding: 12px 0 13px; }
  .hero { padding: 40px 0 48px; }
  .hero .lede { font-size: 17px; }
  .board { padding: 56px 0 64px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .cards, .grid-list .cards, .related .cards { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .archive ul { columns: 1; }
  .post-layout { padding: 16px 20px 56px; }
  .post-body { font-size: 16.5px; }
  .post-body > aside.site-disclosure + p, .post-body > p:first-child { font-size: 17.5px; }
  .post-body h1, .post-body h2 { font-size: 22px; }
  .foot .cols { grid-template-columns: minmax(0, 1fr); }
  .pn { grid-template-columns: minmax(0, 1fr); }
  .pn .next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 11-05 다국어 — 언어 고르기(머리말 오른쪽, 펼치는 목록) */
.langs { position: relative; margin-left: 10px; font-size: 14px; }
.langs summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { border-color: var(--g3); color: var(--ink); }
.langs ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 140px; margin: 0; padding: 6px; list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(17, 48, 42, .14); }
.langs a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--ink); }
.langs a:hover { background: var(--mist); }
.langs a[aria-current] { font-weight: 700; color: var(--link); }
/* 일본어·중국어: keep-all 은 한자·가나 사이 줄바꿈을 막는다 → 보통 줄바꿈 + 그 언어 글꼴 */
:lang(ja), :lang(zh) { word-break: normal; line-break: strict; }
html:lang(ja) { --display: 'Noto Sans JP', 'Wanted Sans Variable', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif; --body: 'Noto Sans JP', 'Pretendard Variable', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif; }
html:lang(zh) { --display: 'Noto Sans SC', 'Wanted Sans Variable', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; --body: 'Noto Sans SC', 'Pretendard Variable', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif; }

/* 11-05 일본어 — 낱말(구) 단위로 줄바꿈 (지원 브라우저만, 나머지는 보통 줄바꿈) */
:lang(ja) { word-break: auto-phrase; }

/* 11-05 여러 병원 공용 — 병원이 둘 이상일 때 목록 카드마다 '광고 · 병원 이름' (글 첫머리 광고 표시와 같은 호박색) */
.mag-ad{display:block;width:fit-content;margin:.3rem 0 .2rem;padding:1px 7px;border:1px solid #e7c873;border-radius:3px;background:#fffbeb;color:#78350f;font-size:.75rem;font-weight:600;line-height:1.5;letter-spacing:0}
