/* 치과(가상) 견본 — 화면 스타일
   규격: 정렬도구 tokens.vars.css·tokens.base.css(간격 4·8·12·16·24·32·48·64·96·128, 글자 14·18·20·24·34·40만 사용)
   원칙: 왼쪽 정렬 편집형 · 얇은 선으로 나눔 · 카드 그림자·알약 버튼·그라데이션·숫자 통계 칸·별점 없음
   색: 바탕 #fbfaf7 · 먹 #1f2a33(바탕 대비 약 14:1) · 보조 #4a5560(약 7.4:1) · 강조 #1f5c73(흰 글자 대비 약 7.3:1) · 선 #d9d3c7 */

@font-face {
  font-family: "Pretendard Fallback";
  src: local("Malgun Gothic"), local("맑은 고딕"), local("Apple SD Gothic Neo"), local("Noto Sans KR");
  size-adjust: 97%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%;
}

:root {
  --bg: #fbfaf7;
  --soft: #f1eee7;
  --ink: #1f2a33;
  --muted: #4a5560;
  --accent: #1f5c73;
  --accent-ink: #164556;
  --line: #d9d3c7;
  --line-strong: #9aa3a8;
  --note-bg: #fff6d6;
  --note-ink: #4a3b00;
  --red: #a2312a;
  --sans: "Pretendard Variable", "Pretendard", "Pretendard Fallback", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --gutter: var(--gutter-mobile);
  --section: var(--section-mobile);
}
@media (min-width: 768px) { :root { --gutter: var(--gutter-desktop); --section: var(--section-desktop); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--sp-96); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: var(--fs-18); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); font-weight: 700; }
ul, ol { margin: 0 0 var(--para-gap); padding-left: var(--sp-24); }
li { line-height: var(--lh-listitem); margin-bottom: var(--sp-8); }
.skip { position: absolute; left: -9999px; }
.skip { min-height: var(--touch-min); display: inline-flex; align-items: center; }
.skip:focus { left: var(--sp-16); top: var(--sp-16); background: #fff; padding: 0 var(--sp-16); z-index: 30; }

.shell { max-width: var(--container-shell); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--container-prose); }

/* 견본 고지 띠 — 모든 페이지 맨 위 */
.demo-bar { background: var(--note-bg); color: var(--note-ink); font-size: var(--fs-14); line-height: var(--lh-caption); border-bottom: 1px solid #e8d78f; }
.demo-bar .shell { padding-top: var(--sp-8); padding-bottom: var(--sp-8); }

/* 머리 */
.site-head { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.site-head .shell { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-16); min-height: 64px; }
.brand { display: flex; align-items: center; gap: var(--sp-8); text-decoration: none; color: var(--ink); font-weight: 700; font-size: var(--fs-20); min-height: var(--touch-min); white-space: nowrap; }
.brand svg { width: 32px; height: 32px; }
.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-4); }
.nav li { margin: 0; }
.nav a { display: inline-flex; align-items: center; min-height: var(--touch-min); padding: 0 var(--sp-12); text-decoration: none; color: var(--ink); font-size: var(--fs-18); }
.nav a[aria-current="page"] { color: var(--accent-ink); box-shadow: inset 0 -2px 0 var(--accent); }
.site-head .head-call { display: none; }
.menu-btn { min-height: var(--touch-min); min-width: var(--touch-min); border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: inherit; font-size: var(--fs-18); padding: 0 var(--sp-12); border-radius: 4px; cursor: pointer; white-space: nowrap; }
.menu-panel { border-top: 1px solid var(--line); background: var(--bg); }
.menu-panel[hidden] { display: none; }
.menu-panel ul { list-style: none; margin: 0; padding: var(--sp-8) var(--gutter) var(--sp-16); }
.menu-panel li { margin: 0; border-bottom: 1px solid var(--line); }
.menu-panel a { display: flex; align-items: center; min-height: var(--btn-height); text-decoration: none; color: var(--ink); }
@media (min-width: 1024px) {
  .nav { display: block; }
  .menu-btn, .menu-panel { display: none !important; }
  .site-head .head-call { display: inline-flex; }
}

/* 버튼 — 직사각형, 모서리 4px */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-8); min-height: var(--btn-height); padding: 0 var(--sp-24); border-radius: 4px; font-size: var(--fs-18); font-weight: 700; line-height: var(--lh-button); letter-spacing: var(--ls-button); text-decoration: none; border: 1px solid var(--accent); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-line { background: transparent; color: var(--accent-ink); }
.btn-line:hover { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-12); }

/* 섹션 */
.section { padding: var(--section) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-soft { background: var(--soft); }
.kicker { font-size: var(--fs-14); line-height: var(--lh-caption); letter-spacing: var(--ls-caption); color: var(--muted); margin-bottom: var(--sp-12); }
.lead { font-size: var(--fs-20); line-height: var(--lh-body); color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-14); line-height: var(--lh-caption); }

/* 홈 첫 화면 */
.hero { padding: var(--sp-48) 0 var(--sp-64); }
.hero-grid { display: grid; gap: var(--sp-32); align-items: center; }
.hero h1 { font-size: var(--fs-34); line-height: var(--lh-display); margin: 0 0 var(--sp-24); }
.hero .lead { margin-bottom: var(--sp-32); }
.hero-art { border-bottom: 1px solid var(--line); }
@media (min-width: 1024px) {
  .hero { padding: var(--sp-96) 0; }
  .hero-grid { grid-template-columns: 7fr 5fr; gap: var(--sp-64); }
  .hero h1 { font-size: var(--fs-40); }
}

/* 진료 시간 표(홈·오시는 길) */
.hours { width: 100%; border-collapse: collapse; font-size: var(--fs-18); }
.hours th, .hours td { text-align: left; padding: var(--sp-12) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours th { font-weight: 700; width: 40%; padding-right: var(--sp-16); }
.split { display: grid; gap: var(--sp-48); }
@media (min-width: 1024px) { .split { grid-template-columns: 5fr 7fr; gap: var(--sp-96); } }

/* 진료 목록 — 카드 격자가 아니라 선으로 나눈 목록 */
.care-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.care-list li { margin: 0; border-bottom: 1px solid var(--line); }
.care-list a { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-4) var(--sp-16); padding: var(--sp-16) 0; text-decoration: none; color: var(--ink); min-height: var(--btn-height); }
.care-list .name { font-size: var(--fs-20); font-weight: 700; line-height: var(--lh-subhead); }
.care-list .desc { grid-column: 1 / 2; color: var(--muted); font-size: var(--fs-18); line-height: var(--lh-body); }
.care-list .go { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--accent); font-size: var(--fs-20); }
.care-list a:hover .name { color: var(--accent-ink); text-decoration: underline; }
@media (min-width: 1024px) {
  .care-list { columns: 2; column-gap: var(--sp-64); border-top: 0; }
  .care-list li { break-inside: avoid; }
  .care-list li:first-child, .care-list li:nth-child(6) { border-top: 1px solid var(--ink); }
}

/* 안쪽 페이지 머리 */
.page-head { padding: var(--sp-32) 0 var(--sp-48); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--fs-34); line-height: var(--lh-display); margin: 0 0 var(--sp-16); }
@media (min-width: 1024px) { .page-head { padding: var(--sp-48) 0 var(--sp-64); } .page-head h1 { font-size: var(--fs-40); } }
.crumbs { font-size: var(--fs-14); line-height: var(--lh-caption); color: var(--muted); margin-bottom: var(--sp-24); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-8); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: var(--sp-8); }
.crumbs a { color: var(--muted); display: inline-flex; min-height: var(--touch-min); align-items: center; }

/* 본문 */
.article-grid { display: grid; gap: var(--sp-48); padding-top: var(--sp-48); padding-bottom: var(--sp-96); }
@media (min-width: 1024px) { .article-grid { grid-template-columns: minmax(0, 680px) 1fr; gap: var(--sp-96); } }
.answer { border-left: 4px solid var(--accent); padding: var(--sp-4) 0 var(--sp-4) var(--sp-24); margin: 0 0 var(--sp-48); }
.answer p:last-child { margin-bottom: 0; }
.answer .label { font-size: var(--fs-14); line-height: var(--lh-caption); color: var(--muted); margin-bottom: var(--sp-8); font-weight: 700; }
.article h2 { margin-top: var(--sp-64); }
.article > h2:first-of-type { margin-top: 0; }
.steps { list-style: none; padding: 0; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; grid-template-columns: var(--sp-48) 1fr; gap: var(--sp-16); padding: var(--sp-16) 0; border-bottom: 1px solid var(--line); margin: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); font-weight: 700; color: var(--accent); font-size: var(--fs-18); }
.steps strong { display: block; }
.fact-table { width: 100%; border-collapse: collapse; margin: 0 0 var(--para-gap); font-size: var(--fs-18); }
.fact-table caption { text-align: left; font-size: var(--fs-14); line-height: var(--lh-caption); color: var(--muted); padding-bottom: var(--sp-8); }
.fact-table th, .fact-table td { text-align: left; vertical-align: top; padding: var(--sp-12) var(--sp-12) var(--sp-12) 0; border-bottom: 1px solid var(--line); }
.fact-table thead th { border-bottom: 1px solid var(--ink); font-size: var(--fs-14); line-height: var(--lh-caption); color: var(--muted); }
.table-wrap { overflow-x: auto; }
.caution { background: var(--soft); padding: var(--sp-24); margin: 0 0 var(--para-gap); }
.caution h3 { margin-top: 0; }
.caution ul { margin-bottom: 0; }
.source { font-size: var(--fs-14); line-height: var(--lh-caption); color: var(--muted); }
.figure { margin: 0 0 var(--sp-48); }
.figure figcaption { font-size: var(--fs-14); line-height: var(--lh-caption); color: var(--muted); padding-top: var(--sp-8); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--sp-16); align-items: center; min-height: var(--btn-height); padding: var(--sp-16) 0; font-weight: 700; font-size: var(--fs-18); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: var(--fs-24); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 0 var(--sp-16); }

/* 옆 칸 */
.aside-box { border-top: 1px solid var(--ink); padding-top: var(--sp-16); margin-bottom: var(--sp-48); }
.aside-box h2 { font-size: var(--fs-20); margin: 0 0 var(--sp-12); }
.aside-box ul { list-style: none; padding: 0; }
.aside-box li { margin: 0; border-bottom: 1px solid var(--line); }
.aside-box li a { display: flex; align-items: center; min-height: var(--touch-min); text-decoration: none; }
@media (min-width: 1024px) { .aside-sticky { position: sticky; top: var(--sp-96); } }

/* 문의 띠 */
.cta { background: var(--accent); color: #fff; padding: var(--sp-48) 0; }
.cta h2 { color: #fff; margin: 0 0 var(--sp-12); }
.cta p { color: #fff; }
.cta .btn-primary { background: #fff; color: var(--accent-ink); border-color: #fff; }
.cta .btn-line { color: #fff; border-color: #fff; }
.cta .btn-line:hover { background: var(--accent-ink); color: #fff; }
.cta-grid { display: grid; gap: var(--sp-24); align-items: end; }
@media (min-width: 1024px) { .cta-grid { grid-template-columns: 1fr auto; } }

/* 발 */
.site-foot { background: var(--ink); color: #e6e9eb; padding: var(--sp-48) 0 var(--sp-64); font-size: var(--fs-14); line-height: var(--lh-caption); }
.site-foot a { color: #fff; }
.site-foot h2 { color: #fff; font-size: var(--fs-18); margin: 0 0 var(--sp-12); }
.foot-grid { display: grid; gap: var(--sp-32); }
@media (min-width: 1024px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-64); } }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 0; }
.site-foot li a { display: inline-flex; align-items: center; min-height: var(--touch-min); }
.foot-legal { border-top: 1px solid #4a5560; margin-top: var(--sp-32); padding-top: var(--sp-16); color: #c9cfd3; }
.foot-legal p { margin-bottom: var(--sp-8); }

/* 휴대폰 아래 고정 전화 */
.mobile-call { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); }
.mobile-call a { display: flex; align-items: center; justify-content: center; min-height: var(--btn-height); background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--fs-18); }
.mobile-call a.call { background: var(--accent); color: #fff; }
body { padding-bottom: var(--btn-height); }
@media (min-width: 1024px) { .mobile-call { display: none; } body { padding-bottom: 0; } }

.placeholder { background: var(--note-bg); color: var(--note-ink); padding: 0 var(--sp-4); }

/* 본문 도식 그림의 강조색을 시안 주조색에 맞춘다(그림 속 고정색 #1f5c73 덮어쓰기) */
.figure svg [fill="#1f5c73"] { fill: var(--accent); }
.figure svg [stroke="#1f5c73"] { stroke: var(--accent); }

/* 휴대폰·태블릿 본문 위 접이식 차례(1024px 이상은 옆 칸 차례를 쓰므로 숨김) */
.toc-mobile { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin: 0 0 var(--sp-32); }
.toc-mobile summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: var(--btn-height); font-weight: 700; font-size: var(--fs-18); }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; color: var(--accent); font-size: var(--fs-24); line-height: 1; }
.toc-mobile[open] summary::after { content: "−"; }
.toc-mobile ul { list-style: none; padding: 0 0 var(--sp-12); margin: 0; }
.toc-mobile li { margin: 0; border-top: 1px solid var(--line); }
.toc-mobile a { display: flex; align-items: center; min-height: var(--touch-min); text-decoration: none; }
@media (min-width: 1024px) { .toc-mobile { display: none; } }
