:root {
  --ink: #2b2b2b;
  --ink-soft: #5d5d5d;
  --line: #e4e1db;
  --bg: #ffffff;
  --bg-soft: #f6f4ef;
  --brand: #363636;
  --accent: #4f8a6b;
  --accent-soft: #e6f0ea;
  --radius: 14px;
  --max: 1120px;
  --header-h: 72px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ecebe7;
    --ink-soft: #b4b2ab;
    --line: #3a3a38;
    --bg: #1c1c1b;
    --bg-soft: #262625;
    --brand: #ecebe7;
    --accent: #7fc09c;
    --accent-soft: #263229;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; }
.logo img { height: 40px; width: auto; }
nav.main ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
nav.main li { position: relative; }
nav.main a {
  display: block; padding: 10px 16px; font-weight: 600; font-size: 0.97rem;
  color: var(--ink); border-radius: 999px;
}
nav.main a:hover { background: var(--bg-soft); }
nav.main a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
nav.main .sub {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 140px; padding: 8px; margin-top: 0;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  display: none;
}
nav.main li:hover .sub, nav.main li:focus-within .sub { display: block; }
nav.main .sub a { font-weight: 500; padding: 9px 14px; border-radius: 8px; white-space: nowrap; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; color: var(--ink); }
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; margin: 4px auto; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  border: 1.5px solid var(--brand); background: var(--brand); color: var(--bg);
  transition: transform .15s;
  cursor: pointer; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--brand); }

/* ---------- Home: hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero .kicker { color: var(--accent); font-weight: 700; margin: 0 0 18px; }
.hero h1 { margin: 0 0 22px; font-size: clamp(2.2rem, 5.4vw, 3.8rem); line-height: 1.22; letter-spacing: -0.035em; font-weight: 800; }
.hero p.lead { margin: 0 0 32px; color: var(--ink-soft); font-size: 1.1rem; }
.hero figure { margin: 0; }
.hero figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 28px; background: var(--bg-soft); }
.note { margin: 16px 0 0; color: var(--ink-soft); font-size: .95rem; }
.note::before { content: "✓ "; color: var(--accent); font-weight: 800; }

/* ---------- Home: intro ---------- */
.intro { background: var(--bg-soft); padding: clamp(56px, 8vw, 104px) 0; }
.intro .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.intro figure { margin: 0; }
.intro figure img { width: 100%; border-radius: 22px; background: var(--bg); }
.intro h2 { margin: 0 0 18px; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.intro p { margin: 0 0 18px; color: var(--ink-soft); }
.intro strong.big { display: block; color: var(--ink); font-size: 1.2rem; line-height: 1.6; margin: 24px 0; }
.assure { margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); font-weight: 700; }

/* ---------- Home: team preview ---------- */
.team { padding: clamp(56px, 8vw, 104px) 0; }
.team h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.35; letter-spacing: -0.03em; }
.team .eyebrow { color: var(--ink-soft); margin: 0 0 14px; font-weight: 600; }
.team-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 4vw, 56px); margin-top: 40px; align-items: start; }
.team-grid > img { width: 100%; border-radius: 22px; background: var(--bg-soft); }
.people { display: grid; gap: 16px; }
.person {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.person h3 { margin: 0; font-size: 1.25rem; letter-spacing: -0.02em; }
.person p { margin: 2px 0 0; color: var(--ink-soft); }
.small-btn {
  flex: none; padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 700; font-size: .92rem;
  border: 1.5px solid var(--brand); background: transparent; color: var(--brand); cursor: pointer;
}
.small-btn:hover { background: var(--brand); color: var(--bg); }
.more { margin-top: 28px; }

/* ---------- Home: leaders (센터장·부원장 카드: 사진 옆에 캡션) ---------- */
.leaders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
.leader { display: flex; align-items: center; gap: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); }
.leader .photo { flex: none; width: 168px; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--bg-soft); }
.leader .photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.leader .info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.leader h3 { margin: 0; font-size: 1.25rem; letter-spacing: -0.02em; }
.leader p { margin: 0; color: var(--ink-soft); }
.leader .small-btn { margin-top: 12px; }
@media (max-width: 860px) {
  .leaders { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .leader { gap: 14px; padding: 14px; }
  .leader .photo { width: 120px; }
}

/* ---------- Parents banner ---------- */
.parents { background: var(--brand); color: var(--bg); padding: clamp(48px, 7vw, 88px) 0; text-align: center; }
.parents h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.4; letter-spacing: -0.03em; }
.parents p { margin: 0 auto; max-width: 520px; opacity: .85; }

/* ---------- Home: branches ---------- */
.branches { padding: clamp(56px, 8vw, 104px) 0; }
.branches .tag { color: var(--accent); font-weight: 700; margin: 0 0 10px; }
.branches h2 { margin: 0 0 16px; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.35; letter-spacing: -0.03em; }
.branches p.sub { color: var(--ink-soft); margin: 0 0 32px; }
.branches .hint { margin-top: 28px; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Subpage common ---------- */
.page-hero { background: var(--bg-soft); padding: clamp(48px, 7vw, 88px) 0; }
.page-hero.with-img .wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.page-hero h1 { margin: 0 0 16px; font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.25; letter-spacing: -0.035em; }
.page-hero p { margin: 0 0 24px; color: var(--ink-soft); font-size: 1.08rem; }
.page-hero .kicker { color: var(--accent); font-weight: 700; margin-bottom: 10px; }
.page-hero img { width: 100%; border-radius: 24px; background: var(--bg); }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section h2 { margin: 0 0 12px; font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.35; letter-spacing: -0.03em; }
.section .sub { margin: 0 0 36px; color: var(--ink-soft); }
.section.soft { background: var(--bg-soft); }

/* ---------- Treatment programs ---------- */
.program-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.program { padding: 30px 30px 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.program .no { color: var(--accent); font-weight: 800; font-size: .95rem; }
.program h3 { margin: 4px 0 10px; font-size: 1.35rem; letter-spacing: -0.02em; }
.program p { margin: 0; color: var(--ink-soft); }
.program-foot { margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); font-weight: 700; }

/* ---------- Tests ---------- */
.test-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.test { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; display: flex; flex-direction: column; }
.test img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--bg-soft); }
.test .body { padding: 24px 24px 28px; }
.test .cat { color: var(--accent); font-weight: 700; font-size: .9rem; margin: 0; }
.test h3 { margin: 4px 0 8px; font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1.4; }
.test .desc { margin: 0 0 18px; color: var(--ink-soft); font-size: .95rem; }
.test .count { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-weight: 700; font-size: .92rem; }
.test ul { margin: 14px 0 0; padding-left: 1.1em; color: var(--ink-soft); font-size: .93rem; }
.test li { margin-bottom: 5px; }
.test li small { display: block; color: var(--ink-soft); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.steps li::before { content: "STEP " counter(s, decimal-leading-zero); display: block; color: var(--accent); font-weight: 800; font-size: .85rem; margin-bottom: 8px; }
.steps h3 { margin: 0 0 8px; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.fine { margin-top: 20px; color: var(--ink-soft); font-size: .92rem; }

/* ---------- Branch pages ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; }
.facts > div { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.facts dt { font-weight: 800; margin-bottom: 8px; }
.facts dd { margin: 0; color: var(--ink-soft); }
.facts dd a { color: var(--accent); font-weight: 700; }
.branch-switch { margin-top: 24px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img, .gallery .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); background: var(--bg-soft); }
.gallery .ph { display: grid; place-items: center; color: var(--ink-soft); font-size: .9rem; border: 1px dashed var(--line); }
.gallery figcaption { margin-top: 8px; font-weight: 600; font-size: .95rem; }

/* ---------- Therapists ---------- */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px; }
.t-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.t-card .photo { aspect-ratio: 3/4; background: var(--bg-soft); }
.t-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.t-card .info { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.t-card h3 { margin: 0; font-size: 1.1rem; letter-spacing: -0.02em; }
.t-card p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.t-card .small-btn { margin-top: auto; align-self: flex-start; margin-top: 12px; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.staff { display: flex; gap: 16px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.staff .photo { width: 84px; height: 84px; border-radius: 50%; background: var(--bg-soft); overflow: hidden; flex: none; }
.staff .photo img { width: 100%; height: 100%; object-fit: cover; }
.staff h3 { margin: 0; font-size: 1.1rem; }
.staff p { margin: 2px 0 0; color: var(--ink-soft); font-size: .92rem; }

dialog.profile {
  width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  border: 0; border-radius: 22px; padding: 0; background: var(--bg); color: var(--ink);
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
dialog.profile::backdrop { background: rgba(0,0,0,.5); }
dialog.profile .inner { padding: 32px 32px 36px; overflow: auto; max-height: calc(100dvh - 48px); }
dialog.profile .label { color: var(--accent); font-weight: 700; font-size: .9rem; margin: 0 0 6px; }
dialog.profile h2 { margin: 0; font-size: 1.7rem; letter-spacing: -0.03em; }
dialog.profile .field { margin: 4px 0 0; color: var(--ink-soft); }
dialog.profile h4 { margin: 28px 0 10px; font-size: 1rem; }
dialog.profile ul { margin: 0; padding-left: 1.15em; color: var(--ink-soft); font-size: .95rem; }
dialog.profile li { margin-bottom: 6px; }
dialog.profile blockquote { margin: 28px 0 0; padding: 18px 20px; background: var(--accent-soft); border-radius: var(--radius); font-weight: 600; }
dialog.profile .close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--bg-soft); color: var(--ink); font-size: 1.3rem; cursor: pointer;
}

/* ---------- Footer ---------- */
footer.site { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: .9rem; color: var(--ink-soft); }
footer.site .links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 20px; font-weight: 600; color: var(--ink); }
footer.site address { font-style: normal; display: grid; gap: 2px; }
footer.site .copy { margin-top: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .test-grid, .facts { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  nav.main {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 24px 24px; display: none;
  }
  nav.main.open { display: block; }
  nav.main ul { flex-direction: column; gap: 0; }
  nav.main a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  nav.main .sub { position: static; display: block; transform: none; border: 0; box-shadow: none; padding: 0 0 0 14px; background: transparent; }
  .hero .wrap, .intro .wrap, .team-grid, .page-hero.with-img .wrap, .program-grid { grid-template-columns: 1fr; }
  .hero figure { order: -1; }
  .person { padding: 20px; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .t-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .menu-toggle span { transition: none; }
}
