/* =========================================================
   연세콕콕신경외과 — 메인 페이지
   색은 아래 토큰만 고치면 전체에 반영됩니다.
   ========================================================= */
:root {
  --pad: max(6.25vw, calc((100vw - 1680px) / 2));
  --hd-h: 76px;
  --r: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* 콕콕이의 파랑을 살린 네이비 · 스카이 */
  --bg: #f5f9fd;
  --bg-2: #e2edf8;
  --card: #ffffff;
  --ink: #12213a;
  --mute: #5d6c82;
  --line: #cddbea;
  --primary: #1c3f78;
  --primary-btn: #2a5aa8;
  --accent: #2f7de1;
  --accent-soft: #e0edfc;
  --on-primary: #ffffff;
  --on-primary-mute: rgba(255, 255, 255, .74);
  --dark: #10203a;
  --hero-glow: #dcebfa;
  --wm: rgba(28, 63, 120, .06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hd-h) + 12px); }
body {
  margin: 0;
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.flip { transform: scaleX(-1); }
.m { display: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; }
.skip:focus { top: 12px; }

.eyebrow { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--accent); }
h2 { font-size: clamp(26px, 2.6vw, 40px); font-weight: 700; line-height: 1.36; letter-spacing: -.03em; text-wrap: balance; }

/* ---------- 버튼 ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.pill-line { border: 1px solid var(--line); background: transparent; }
.pill-line:hover { border-color: var(--ink); }
.pill-solid { background: var(--ink); color: #fff; }
.pill-solid:hover, .pill-fill:hover { background: var(--accent); }
.pill-fill { background: var(--primary); color: var(--on-primary); height: 50px; padding: 0 26px; }
.pill-ghost { border: 1px solid var(--line); height: 50px; padding: 0 24px; }
.pill-ghost:disabled { opacity: .35; cursor: default; }
.pill-kakao { background: #fee500; color: #191919; }
.pill-naver { background: #03c75a; color: #fff; }
.pill-dark { background: var(--ink); color: #fff; }
.pill .ic { width: 18px; height: 18px; }
.pill .ic:not(.st) { stroke: none; }
.pill .arr { width: 14px; height: 14px; }
.rbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); transition: background .2s, color .2s, border-color .2s; }
.rbtn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-line { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 22px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: 15px; font-weight: 600; transition: border-color .2s; }
.btn-line:hover { border-color: var(--ink); }
.btn-line .arr { width: 14px; height: 14px; }
.mini-naver { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #03c75a; color: #fff; }
.mini-naver svg { width: 13px; height: 13px; stroke: none; }

/* ---------- 헤더 ---------- */
.hd { position: sticky; top: 0; z-index: 40; height: var(--hd-h); display: flex; align-items: center; gap: 24px; padding: 0 var(--pad); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.hd.is-stuck, .hd.is-open { border-bottom-color: var(--line); }
.hd-logo { display: flex; align-items: baseline; gap: 6px; flex: none; font-size: 21px; line-height: 44px; letter-spacing: -.02em; }
.hd-logo b { font-weight: 700; }
.hd-mark { align-self: center; width: 38px; height: 38px; margin-right: 3px; object-fit: contain; flex: none; }
.hd-logo span { font-weight: 500; }
.hd-nav { display: flex; gap: 2px; margin: 0 auto; white-space: nowrap; }
.hd-nav > * { padding: 0 13px; font-size: 16px; font-weight: 600; line-height: 44px; border-radius: 999px; transition: background .2s, color .2s; }
.hd-nav > *:hover, .hd-nav > [aria-expanded="true"] { background: var(--bg-2); }
.hd-act { display: flex; gap: 8px; flex: none; }
.hd-menu { display: none; position: relative; width: 44px; height: 44px; margin: 0 -10px 0 auto; }
.hd-menu span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 1px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.hd-menu span:nth-child(1) { top: 17px; }
.hd-menu span:nth-child(2) { top: 25px; }
.hd-menu[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hd-menu[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

.mega { position: absolute; left: 0; right: 0; top: 100%; padding: 28px var(--pad) 36px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -28px rgba(0, 0, 0, .25); }
.mega[hidden] { display: none; }
.mega, .drawer { opacity: 0; transform: translateY(-10px); transition: opacity .26s ease, transform .3s var(--ease); }
.mega.is-open, .drawer.is-open { opacity: 1; transform: none; }
.mega-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; max-width: 1180px; margin: 0 auto; }
.mega-col { padding: 14px 14px 16px; border-radius: 16px; transition: background .2s; }
.mega-col.is-on { background: var(--bg-2); }
.mega-col h3 { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.mega-col li > * { display: block; width: 100%; padding: 6px 0; text-align: left; font-size: 15px; font-weight: 500; color: var(--ink); }
.mega-col li > *:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 모바일 메뉴 ---------- */
.drawer { position: fixed; inset: var(--hd-h) 0 0; z-index: 39; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
.drawer[hidden] { display: none; }
.drawer-in { padding: 8px var(--pad) calc(32px + env(safe-area-inset-bottom)); }
.drawer details { border-bottom: 1px solid var(--line); }
.drawer summary { display: flex; align-items: center; justify-content: space-between; min-height: 60px; font-size: 19px; font-weight: 700; letter-spacing: -.02em; list-style: none; cursor: pointer; }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.drawer details.is-open summary svg { transform: rotate(180deg); }
.drawer details ul { overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 0 0 14px; }
.drawer details li > * { display: block; width: 100%; min-height: 44px; padding: 10px 0; text-align: left; font-size: 16px; color: var(--mute); }
.drawer-link { display: flex; align-items: center; min-height: 60px; border-bottom: 1px solid var(--line); font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.drawer-act { display: grid; gap: 10px; margin-top: 24px; }
.drawer-act .pill { height: 52px; font-size: 16px; }

/* ---------- 1. 히어로: 어떤 증상으로 오셨나요? ---------- */
.hero { position: relative; padding: clamp(20px, 3vw, 44px) var(--pad) clamp(56px, 6vw, 96px); background: radial-gradient(60% 55% at 50% 38%, var(--hero-glow), transparent 70%), var(--bg); overflow: hidden; }
.hero-stage { display: grid; align-items: center; gap: clamp(12px, 2.5vw, 48px); max-width: 1320px; margin: 0 auto; }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center;
  --cap-gap: 14px; --cap-size: clamp(15px, 1.2vw, 18px); --mascot-gap: clamp(8px, 1.6vw, 24px);
  /* 콕콕이가 뛰어올라 머리의 침이 제목 아래에 닿는 거리 */
  --needle-travel: calc(var(--mascot-gap) + var(--cap-gap) + 1.6 * var(--cap-size) - 3px); }
.hero-title { position: relative; }
.hero h1 { margin-top: 12px; font-size: clamp(34px, 4.4vw, 64px); font-weight: 700; line-height: 1.2; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { margin-top: var(--cap-gap); font-size: var(--cap-size); color: var(--mute); }

.mascot { position: relative; display: block; width: clamp(150px, 17vw, 250px); margin-top: var(--mascot-gap); border-radius: 30px; }
.mascot img { width: 100%; filter: drop-shadow(0 22px 22px rgba(40, 30, 20, .16)); transition: transform .5s var(--ease); }
.mascot:hover img { transform: translateY(-6px) rotate(-2deg); }
.mascot.is-pop img { animation: pop .6s var(--ease); }
.mascot-bubble { position: absolute; left: 72%; top: 14%; z-index: 1; padding: 8px 14px; border-radius: 999px 999px 999px 4px; background: var(--primary); color: var(--on-primary); font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .35); }
@keyframes pop { 0% { transform: scale(1); } 30% { transform: scale(.92) translateY(6px); } 60% { transform: scale(1.06) translateY(-12px); } 100% { transform: scale(1); } }

/* 인체도 (상체 | 문구 | 하체) */
.anat { position: relative; margin: 0; }
.anat > img { width: 100%; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.hotspots { position: absolute; inset: 0; }
.hero-stage { grid-template-columns: minmax(0, 1.12fr) minmax(300px, 1fr) minmax(0, .76fr); }
.anat-upper { grid-column: 1; grid-row: 1; justify-self: end; width: min(100%, 440px); }
.hero-copy { grid-column: 2; grid-row: 1; }
.anat-lower { grid-column: 3; grid-row: 1; justify-self: start; width: min(100%, 300px); }

/* ---------- 첫 화면 인트로: 콕콕이 점프 → 제목 → 인체도가 좌우로 열림 ---------- */
.hero { --needle-contact: 660ms; --anatomy-start: calc(var(--needle-contact) + 420ms); }
.mascot img { transform-origin: 50% 100%; animation: kokkok-jump 1200ms; }
.hero h1 { animation: title-spread 420ms cubic-bezier(.21, .74, .31, 1) var(--needle-contact) backwards; }
.hero .eyebrow, .hero-sub { animation: caption-appear 240ms ease-out calc(var(--needle-contact) + 260ms) backwards; }
.mascot-bubble { animation: caption-appear 260ms ease-out 1300ms backwards; }
.needle-impact { position: absolute; z-index: 2; left: 50%; top: calc(100% + 3px); width: 1px; height: 1px; pointer-events: none; }
.needle-impact::before, .needle-impact::after { content: ""; position: absolute; left: 0; top: 0; border-radius: 50%; opacity: 0; transform: translate(-50%, -50%); }
.needle-impact::before { width: 24px; height: 24px; background: radial-gradient(circle, #fff 7%, #65bff6 21%, #92d9ff79 48%, transparent 70%); animation: needle-spark 300ms ease-out var(--needle-contact) both; }
.needle-impact::after { width: clamp(108px, 12vw, 176px); height: clamp(108px, 12vw, 176px); border: 1px solid #8ac7eb; box-shadow: 0 0 19px #79bfe944, inset 0 0 22px #b3e0f64a; animation: needle-ripple 580ms cubic-bezier(.18, .76, .27, 1) var(--needle-contact) both; }
.anat-upper { --intro-offset: clamp(24px, 5vw, 82px); --intro-delay: var(--anatomy-start); --intro-crop: inset(0 0 0 24%); --intro-origin: 100% 52%; }
.anat-lower { --intro-offset: clamp(-82px, -5vw, -24px); --intro-delay: calc(var(--anatomy-start) + 50ms); --intro-crop: inset(0 24% 0 0); --intro-origin: 0 52%; }
.anat > img { transform-origin: var(--intro-origin); animation: anatomy-open 670ms cubic-bezier(.16, 1, .3, 1) var(--intro-delay) backwards; }
.hotspots { animation: hotspot-entrance 220ms ease-out calc(var(--intro-delay) + 335ms) backwards; }
@keyframes kokkok-jump {
  0%, 14% { transform: none; animation-timing-function: ease-in; }
  28% { transform: translateY(3px) scale(1.035, .94); animation-timing-function: cubic-bezier(.19, .66, .29, 1); }
  55% { transform: translateY(calc(-1 * var(--needle-travel))); animation-timing-function: cubic-bezier(.52, .03, .85, .53); }
  78% { transform: none; animation-timing-function: ease-out; }
  84% { transform: scale(1.018, .98); animation-timing-function: ease-out; }
  100% { transform: none; }
}
@keyframes title-spread { 0% { opacity: 0; clip-path: circle(0 at 50% 100%); } 24% { opacity: 1; } 100% { opacity: 1; clip-path: circle(110% at 50% 100%); } }
@keyframes caption-appear { from { opacity: 0; transform: translateY(4px); } }
@keyframes needle-spark { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.28); } 21% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.65); } }
@keyframes needle-ripple { 0% { opacity: .85; transform: translate(-50%, -50%) scale(.055); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.32); } }
@keyframes anatomy-open { from { opacity: 0; transform: translateX(var(--intro-offset)) scale(.94); clip-path: var(--intro-crop); } to { opacity: 1; transform: none; clip-path: inset(0); } }
@keyframes hotspot-entrance { 0% { opacity: 0; visibility: hidden; } 1% { opacity: .2; visibility: visible; } 100% { opacity: 1; visibility: visible; } }

/* 핫스팟 */
.hotspot { position: absolute; left: var(--x); top: var(--y); width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; }
.hotspot-dot { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 17px; font-weight: 500; line-height: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); transition: transform .25s var(--ease), background .2s; }
.hotspot-dot::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent); opacity: 0; animation: ping 2.6s var(--ease) infinite; animation-delay: var(--d, 0s); }
@keyframes ping { 0% { transform: scale(.8); opacity: .7; } 70%, 100% { transform: scale(2); opacity: 0; } }
.hotspot-label { position: absolute; left: calc(50% + 20px); top: 50%; transform: translateY(-50%); padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .3); transition: background .2s, color .2s, border-color .2s; }
.hotspot.flip .hotspot-label { left: auto; right: calc(50% + 20px); }
.hotspot:hover .hotspot-dot, .hotspot:focus-visible .hotspot-dot { transform: scale(1.18); background: var(--ink); }
.hotspot:hover .hotspot-label, .hotspot:focus-visible .hotspot-label { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 2. 상담·예약 ---------- */
.contact { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); align-items: center; gap: clamp(24px, 4vw, 64px); padding: clamp(40px, 4.5vw, 64px) var(--pad); background: var(--primary); color: var(--on-primary); }
.contact h2 { font-size: clamp(24px, 2.2vw, 32px); }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cta { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px 20px; border-radius: var(--r); background: var(--card); color: var(--ink); text-align: left; transition: transform .25s var(--ease), box-shadow .25s; }
.cta:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .5); }
.cta-logo { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; }
.cta-logo svg { width: 24px; height: 24px; }
.cta-logo svg:not(.st) { stroke: none; }
.cta-kakao { background: #fee500; color: #191919; }
.cta-naver { background: #03c75a; color: #fff; }
.cta-naver svg { width: 18px; height: 18px; }
.cta-phone { background: var(--accent); color: #fff; }
.cta-txt { flex: 1; min-width: 0; }
.cta-txt b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.cta-txt small { display: block; font-size: 13px; color: var(--mute); }
.cta .arr { color: var(--mute); transition: transform .25s var(--ease); }
.cta:hover .arr { transform: translateX(4px); color: var(--ink); }

/* ---------- 3. 병원 둘러보기 ---------- */
.fac { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.5fr); align-items: end; gap: clamp(24px, 4vw, 72px); padding: clamp(72px, 9vw, 150px) var(--pad); background: var(--card); }
.pager { display: flex; align-items: center; gap: 10px; margin-top: clamp(28px, 4vw, 64px); }
.pager[hidden] { display: none; }
.pager-n { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pager-bar { position: relative; width: 64px; height: 1px; margin-right: 10px; background: var(--line); }
.pager-bar i { position: absolute; left: 0; top: -.5px; height: 2px; width: 25%; background: var(--ink); transition: width .5s var(--ease); }
.fac-view { position: relative; border-radius: var(--r); overflow: hidden; background: var(--bg-2); aspect-ratio: 3 / 2; }
.fac-track img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity .9s var(--ease), transform 5s linear; }
.fac-track img.is-on { opacity: 1; transform: scale(1); }
.fac-view::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(to top, rgba(8, 18, 36, .42), transparent); pointer-events: none; }
.fac-cap { position: absolute; left: clamp(20px, 2.4vw, 32px); right: clamp(20px, 2.4vw, 32px); bottom: clamp(16px, 2vw, 26px); z-index: 1; color: #fff; font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; letter-spacing: -.02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 2px 14px rgba(0, 0, 0, .55); }

/* ---------- 4. 의료진 ---------- */
.doc { position: relative; padding: clamp(72px, 9vw, 150px) var(--pad); background: var(--bg); overflow: hidden; }
.doc-wm { position: absolute; left: 0; right: 0; top: clamp(24px, 4vw, 60px); font-size: clamp(64px, 11vw, 190px); font-weight: 700; line-height: 1; letter-spacing: -.04em; white-space: nowrap; text-align: center; color: var(--wm); pointer-events: none; user-select: none; }
.doc-head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.doc-head .pager { margin-top: 0; }
.doc-view { position: relative; margin-top: clamp(32px, 4vw, 64px); }
.doc-card { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(24px, 4.5vw, 80px); align-items: start; }
.doc-card.is-enter { animation: fade .6s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } }
.doc-photo { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r); background: var(--bg-2); overflow: hidden; }
.doc-photo img { position: absolute; left: 50%; bottom: 0; height: 96%; width: auto; max-width: none; transform: translateX(-50%); }
.doc-photo.is-cover img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transform: none; }
.doc-tag { position: absolute; left: 16px; top: 16px; padding: 5px 12px; border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 600; color: var(--accent); }
.doc-quote { font-family: "Noto Serif KR", serif; font-weight: 500; font-size: clamp(22px, 2.3vw, 34px); line-height: 1.5; letter-spacing: -.03em; white-space: pre-line; }
.doc-name { display: flex; align-items: baseline; gap: 10px; margin-top: clamp(20px, 2.4vw, 34px); padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.doc-name b { font-size: clamp(26px, 2.4vw, 34px); font-weight: 700; letter-spacing: -.03em; }
.doc-name span { font-size: 16px; font-weight: 600; }
.doc-name i { margin-left: auto; font-style: normal; font-size: 14px; color: var(--mute); }
.doc-msg { margin-top: 20px; display: grid; gap: 10px; font-size: 16px; color: var(--mute); max-width: 60ch; }
.doc-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; margin-top: 28px; }
.doc-lists h3 { margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--accent); }
.doc-lists li { position: relative; padding: 3px 0 3px 12px; font-size: 15px; }
.doc-lists li::before { content: ""; position: absolute; left: 0; top: 13px; width: 3px; height: 3px; border-radius: 50%; background: var(--mute); }

/* ---------- 5. 내원 안내 ---------- */
.visit { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); background: var(--card); }
.visit-info { padding: clamp(56px, 7vw, 110px) clamp(24px, 4vw, 72px) clamp(56px, 7vw, 110px) var(--pad); }
.visit-info h2 { margin-top: 12px; }
.map { position: relative; margin-top: 28px; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--bg-2); }
.map-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--mute); font-size: 14px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; background-position: center; }
.map-ph svg { width: 40px; height: 40px; color: var(--accent); stroke-width: 1.4; }
.map-ph b { margin-top: 6px; font-size: 18px; color: var(--ink); }
.visit-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; margin: 28px 0; }
.visit-dl dt { margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--accent); }
.visit-dl dd { font-size: 15px; color: var(--mute); }
.visit-hours { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(56px, 7vw, 110px) var(--pad) clamp(56px, 7vw, 110px) clamp(24px, 4vw, 64px); background: var(--primary); color: var(--on-primary); overflow: hidden; }
.visit-hours .eyebrow { color: var(--on-primary-mute); }
.hours-mascot { position: absolute; right: clamp(8px, 3vw, 48px); top: clamp(24px, 5vw, 72px); width: clamp(110px, 12vw, 170px); filter: drop-shadow(0 16px 18px rgba(0, 0, 0, .25)); }
.hours-big { margin-top: 12px; font-size: clamp(34px, 3.6vw, 54px); font-weight: 700; line-height: 1.15; letter-spacing: -.04em; }
.hours-big b { font-size: 1.7em; font-weight: 800; color: #ffd772; }
.hours { margin-top: clamp(24px, 3vw, 40px); border-top: 1px solid rgba(255, 255, 255, .28); }
.hours > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.hours dt { font-size: 15px; font-weight: 600; }
.hours dt small { display: block; font-size: 12px; font-weight: 400; color: var(--on-primary-mute); }
.hours dd { font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours-note { margin-top: 14px; font-size: 13px; color: var(--on-primary-mute); }

/* ---------- 6. 비급여 · 푸터 ---------- */
.fees { padding: clamp(40px, 5vw, 72px) var(--pad); background: var(--bg-2); }
.fees-in { display: flex; align-items: center; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; }
.fees h2 { margin-top: 6px; font-size: clamp(22px, 2vw, 28px); }
.fees-in > p { padding: 16px 24px; border-radius: 14px; background: var(--card); font-size: 15px; color: var(--mute); }
.ft { padding: 44px var(--pad) 56px; background: var(--card); border-top: 1px solid var(--line); }
.ft-top { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.ft-links { display: flex; gap: 4px 22px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.ft-links a:hover { color: var(--accent); }
.ft-about { margin-top: 22px; max-width: 64ch; font-size: 14px; color: var(--mute); }
.ft-guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 24px; margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.ft-guide h2 { margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0; }
.ft-guide li a { display: inline-block; padding: 3px 0; font-size: 14px; color: var(--mute); }
.ft-guide li a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ft-info { margin-top: 26px; font-size: 14px; color: var(--mute); }
.ft-copy { margin-top: 4px; font-size: 13px; color: var(--mute); }

/* ---------- 퀵 메뉴 ---------- */
.quick { position: fixed; right: 0; top: 50%; z-index: 30; display: flex; flex-direction: column; transform: translateY(-50%); border-radius: 14px 0 0 14px; overflow: hidden; background: var(--accent); color: #fff; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .45); }
.quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 64px; padding: 14px 4px; font-size: 12px; font-weight: 600; line-height: 1.3; text-align: center; transition: background .2s; }
.quick button + button { border-top: 1px solid rgba(255, 255, 255, .22); }
.quick button:hover { background: rgba(0, 0, 0, .16); }
.quick svg { width: 20px; height: 20px; }
.quick svg:not(.st) { stroke: none; }

/* ---------- 다이얼로그 ---------- */
.dlg { width: min(760px, calc(100vw - 32px)); max-height: min(88dvh, 880px); padding: 0; border: 0; border-radius: 24px; background: var(--card); color: var(--ink); overflow: auto; overscroll-behavior: contain; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5); }
.dlg::backdrop { background: color-mix(in srgb, var(--dark) 55%, transparent); backdrop-filter: blur(3px); }
.dlg[open] { animation: dlg-in .35s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(18px); } }
/* 닫힐 때 */
.dlg.is-closing[open], .pop.is-closing[open] { animation: dlg-out .23s ease-in forwards; }
@keyframes dlg-out { to { opacity: 0; transform: translateY(14px); } }
dialog[open]::backdrop { animation: backdrop-in .3s ease-out; }
dialog.is-closing[open]::backdrop { animation: backdrop-out .23s ease-in forwards; }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes backdrop-out { to { opacity: 0; } }
.dlg-body { position: relative; padding: clamp(24px, 4vw, 44px); }
/* 닫기 버튼: 내용을 내려도 오른쪽 위에 계속 보이게 고정 */
.dlg-body > form:first-child { position: sticky; top: 14px; z-index: 5; display: flex; justify-content: flex-end; height: 0; }
.dlg-x { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -8px 0 0; flex: none; border-radius: 50%; background: var(--bg-2); box-shadow: 0 0 0 4px var(--card); transition: background .2s, color .2s; }
.guide-head, .story-head { padding-right: 48px; }
.dlg-x:hover { background: var(--ink); color: #fff; }
.dlg h2 { font-size: clamp(26px, 3vw, 36px); outline: none; }
.dlg h3 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.dlg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px 16px; flex-wrap: wrap; margin-top: 28px; }
.src { margin-right: auto; font-size: 13px; color: var(--mute); text-decoration: underline; text-underline-offset: 3px; }
.alert { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 18px 14px 12px; border-radius: 16px; background: #fbeae0; color: #7a2e12; font-size: 15px; font-weight: 500; line-height: 1.55; }
.alert[hidden] { display: none; }
.alert img { width: 60px; flex: none; }

.guide-head { display: flex; align-items: center; gap: 16px; }
.guide-mascot { width: clamp(76px, 12vw, 104px); flex: none; }
.guide-lead { margin-top: 20px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.7; }
.guide-exam { margin-top: 20px; padding: 20px 22px; border-radius: 16px; background: var(--bg); }
.guide-exam p { margin-top: 6px; font-size: 15px; color: var(--mute); }
.guide-treat { margin-top: 32px; }
.guide-treat-sub { margin-top: 4px; font-size: 14px; color: var(--mute); }
.treat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.treat { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); }
.treat h4 { margin: 0; display: flex; gap: 10px; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.treat h4 i { font-style: normal; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.treat p { margin-top: 6px; font-size: 14px; color: var(--mute); line-height: 1.6; }

.dlg-story { max-height: min(94dvh, 880px); }
.dlg-story .dlg-body { padding: clamp(22px, 3vw, 36px); }
.story-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 18px; }
.story-steps button { position: relative; padding: 12px 4px 0; border-top: 2px solid var(--line); font-size: 14px; font-weight: 600; color: var(--mute); text-align: left; transition: color .2s, border-color .2s; }
.story-steps button[aria-current] { border-top-color: var(--accent); color: var(--ink); }
.story-stage { display: grid; grid-template-columns: clamp(100px, 20%, 150px) minmax(0, 1fr); align-items: center; gap: clamp(14px, 3vw, 28px); margin-top: 18px; min-height: 200px; }
.story-speech { position: relative; padding: 20px 24px; border-radius: 22px 22px 22px 6px; background: var(--bg); }
.story-speech.is-enter { animation: fade .45s var(--ease); }
.story-who { font-size: 13px; font-weight: 600; color: var(--accent); }
.story-speech h3 { margin-top: 4px; font-size: clamp(18px, 2vw, 22px); }
.story-speech h3 + p { margin-top: 8px; font-size: 15.5px; color: var(--mute); line-height: 1.7; }
.dlg-story .alert { margin-top: 12px; padding: 10px 16px 10px 10px; font-size: 14.5px; }
.dlg-story .alert img { width: 48px; }
.dlg-story .dlg-foot { margin-top: 20px; }
.story-refs { position: relative; margin-right: auto; font-size: 13px; color: var(--mute); }
.story-refs summary { cursor: pointer; padding: 6px 0; }
.story-refs ul { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 4; width: max-content; max-width: min(420px, 78vw); padding: 10px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .4); }
.story-refs li a { display: inline-block; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.dlg-story .dlg-foot [hidden] { display: none; }

.dlg-mini { width: min(400px, calc(100vw - 32px)); text-align: center; }
.dlg-mini img { width: 120px; margin: 0 auto 8px; clear: both; }
.dlg-mini h2 { font-size: 24px; }
.dlg-mini p { margin: 10px 0 24px; font-size: 15px; color: var(--mute); }
.dlg-mini .pill { width: 100%; }

/* ---------- 첫 방문 안내 팝업 ---------- */
.pop { width: min(545px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; background: transparent; color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
.pop::backdrop { background: color-mix(in srgb, var(--dark) 55%, transparent); backdrop-filter: blur(3px); }
.pop[open] { animation: dlg-in .35s var(--ease); }
.pop-card { overflow: hidden; border-radius: 22px; }
.pop-content, .pop-foot { background: #fff; }
.pop-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 270px; padding: 27px 38% 25px 28px; background: radial-gradient(ellipse at 75% 73%, #1e6ba3, #123f69 55%, #102e50); color: #fff; }
.pop-hero::before { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; left: -80px; top: 0; border-radius: 50%; background: radial-gradient(circle, #38bfff38, #1e94d512 48%, transparent 70%); pointer-events: none; }
.pop-hero::after { content: ""; position: absolute; z-index: -1; right: -7%; top: -135%; width: clamp(240px, 57%, 380px); aspect-ratio: 1; border-radius: 50%; border: 1px solid #b5e3ff75; box-shadow: 0 0 0 25px #9fd6ff20, 0 0 0 49px #9fd6ff16; }
.pop-clinic { position: relative; z-index: 1; margin-bottom: 14px; color: #d0eaff; font-size: 15px; font-weight: 650; letter-spacing: -.02em; }
.pop h2 { font-size: inherit; line-height: 1.14; letter-spacing: -.055em; outline: none; text-wrap: initial; }
.pop-num { display: flex; align-items: baseline; gap: .035em; font-size: clamp(66px, 15vw, 91px); font-weight: 800; line-height: 1; letter-spacing: 0; }
.pop-digits { display: inline-block; flex: none; padding-right: .075em; margin-right: -.035em; letter-spacing: -.035em; color: #ffe392; background: linear-gradient(110deg, #ffc958 0%, #ffe6a3 30%, #fff9de 43%, #ffc958 57%, #ffde89 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 3px 14px #ffcc5635); }
.pop[open] .pop-digits { animation: everyday-shine 5.5s ease-in-out infinite; }
@keyframes everyday-shine { 0%, 18% { background-position: 100% 50%; } 65%, 100% { background-position: 0% 50%; } }
.pop-unit { flex: none; color: #fff4d9; font-size: .69em; letter-spacing: -.04em; }
.pop-big { display: block; margin-top: 8px; font-size: clamp(32px, 7.4vw, 46px); font-weight: 800; line-height: 1.15; letter-spacing: -.055em; }
.pop-mascot { position: absolute; z-index: -1; right: 4%; bottom: 10px; width: 40%; max-width: 213px; filter: drop-shadow(0 7px 10px #112d4b55); }
.pop-x { position: absolute; z-index: 2; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #ffffffed; color: #123f69; transition: background .2s; }
.pop-x:hover { background: #dceefa; }
.pop-content { padding: 18px 24px 14px; }
.pop-content h3 { margin-bottom: 4px; color: #224c6c; font-size: 16px; font-weight: 750; letter-spacing: -.03em; }
.pop-hours > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 61px; padding: 10px 3px; border-bottom: 1px solid #e4eef6; }
.pop-hours > div:last-child { border-bottom: 0; }
.pop-hours dt { color: #244b6b; font-size: 15px; font-weight: 750; }
.pop-hours dt small { display: block; color: #53718a; font-size: 11px; font-weight: 600; }
.pop-hours dd { flex: none; color: #143f64; font-size: clamp(17px, 4.2vw, 24px); font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.pop-hours dd span { color: #6c93b2; font-weight: 500; }
.pop-foot { padding: 11px 24px 15px; border-top: 1px solid #e9f0f5; }
.pop-foot p { color: #4a6276; font-size: 12px; }
.pop-foot:has(p:empty) { display: none; }
@media (max-width: 440px) {
  .pop-hero { min-height: 236px; padding: 24px 38% 22px 20px; }
  .pop-clinic { font-size: 13px; }
  .pop-content { padding: 12px 14px 9px; }
  .pop-foot { padding: 9px 14px 11px; }
}

/* ---------- 스크롤 등장 ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .rv.is-in { opacity: 1; transform: none; }

/* =========================================================
   반응형
   ========================================================= */
@media (max-width: 1180px) {
  .hd-nav, .hd-act, .mega { display: none !important; }
  .hd-menu { display: block; }
  .quick br.d { display: none; }
}
@media (min-width: 1181px) { .drawer { display: none !important; } }

@media (max-width: 1024px) {
  :root { --pad: 28px; }
  .contact { grid-template-columns: 1fr; }
  .fac { grid-template-columns: 1fr; align-items: start; }
  .fac-head { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; align-items: end; }
  .fac-head > :not(.pager) { grid-column: 1; }
  .fac-head .pager { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; }
  .doc-card { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
  .visit { grid-template-columns: 1fr; }
  .visit-info { padding-right: var(--pad); }
  .visit-hours { padding-left: var(--pad); }

  /* 퀵 메뉴 → 하단 바 */
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .quick { left: 0; right: 0; top: auto; bottom: 0; flex-direction: row; transform: none; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); background: var(--card); color: var(--ink); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -18px rgba(0, 0, 0, .35); }
  .quick button { flex: 1; flex-direction: row; justify-content: center; gap: 8px; width: auto; height: 60px; padding: 0 6px; font-size: 14px; }
  .quick button + button { border-top: 0; border-left: 1px solid var(--line); }
  .quick button:hover { background: var(--bg-2); }
  .quick button:nth-child(1) svg { color: #191919; background: #fee500; border-radius: 6px; padding: 3px; width: 24px; height: 24px; }
  .quick button:nth-child(2) svg { color: var(--accent); }
  .quick button:nth-child(3) svg { color: #03c75a; }
}

@media (max-width: 760px) {
  :root { --pad: 20px; --hd-h: 60px; --r: 16px; }
  .m { display: inline; }
  .hd-logo { font-size: 19px; }
  .hd-mark { width: 32px; height: 32px; }
  .eyebrow { font-size: 14px; }

  /* 히어로: 문구 → 인체도 → 사진 카드 */
  .hero { padding-top: 20px; }
  .hero-copy { position: relative; align-items: flex-start; text-align: left; padding-right: 118px; min-height: 150px; }
  .hero h1 { margin-top: 8px; font-size: clamp(30px, 9vw, 38px); }
  .hero-sub { margin-top: 8px; font-size: 14.5px; }
  .hero-copy { --needle-travel: 14px; }
  .needle-impact { display: none; }
  .mascot { position: absolute; right: -6px; top: 0; width: 116px; margin: 0; }
  .mascot-bubble { left: auto; right: 60%; top: 76%; font-size: 12px; padding: 6px 11px; border-radius: 999px 999px 4px 999px; }
  .hotspot-label { padding: 4px 9px; font-size: 12.5px; }
  .hotspot-dot { width: 22px; height: 22px; font-size: 15px; }
  .hotspot-label { left: calc(50% + 16px); }
  .hotspot.flip .hotspot-label { right: calc(50% + 16px); }

  .hero-stage { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px 6px; align-items: start; }
  .hero-copy { grid-column: 1 / -1; grid-row: 1; }
  .anat-upper { grid-column: 1; grid-row: 2; width: 100%; }
  .anat-lower { grid-column: 2; grid-row: 2; width: 100%; }

  .contact-grid { grid-template-columns: 1fr; gap: 10px; }
  .cta { min-height: 72px; }
  .fac-head { display: block; }
  .fac-head .pager { margin-top: 24px; }
  .fac-view { aspect-ratio: 4 / 3.4; }

  .doc-wm { font-size: 72px; top: 20px; }
  .doc-card { grid-template-columns: 1fr; }
  .doc-photo { aspect-ratio: 1 / 1; }
  .doc-lists { grid-template-columns: 1fr; gap: 22px; }
  .doc-name i { display: none; }

  .map { aspect-ratio: 4 / 3; }
  .visit-dl { grid-template-columns: 1fr; }
  .btn-line { width: 100%; }
  .btn-line .arr { margin-left: auto; }
  .hours-mascot { width: 104px; top: 40px; right: 12px; }
  .fees-in > p { width: 100%; }
  .ft { padding-bottom: 40px; }
  .ft-guide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }

  /* 다이얼로그 → 바텀 시트 */
  .dlg:not(.dlg-mini) { width: 100vw; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .dlg:not(.dlg-mini)[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
  .dlg:not(.dlg-mini).is-closing[open] { animation-name: sheet-out; }
  @keyframes sheet-out { to { transform: translateY(60px); opacity: 0; } }
  .dlg-body { padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); }
  .treat-grid { grid-template-columns: 1fr; }
  .story-stage { grid-template-columns: 1fr; gap: 4px; min-height: 0; margin-top: 14px; }
  .story-stage img { width: 84px; }
  .story-refs { flex-basis: 100%; }
  .story-steps button { font-size: 12.5px; }
  .dlg-foot .pill { flex: 1; }
  .src { flex-basis: 100%; }
}

/* 화면이 낮은 휴대폰: 설명 팝업이 스크롤 없이 들어가도록 더 줄임 */
@media (max-width: 760px) and (max-height: 720px) {
  .dlg-story .dlg-body { padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); }
  .dlg-story h2 { font-size: 23px; }
  .dlg-story .dlg-x { width: 40px; height: 40px; }
  .story-steps { margin-top: 12px; }
  .story-stage { margin-top: 10px; }
  .story-stage > img { display: none; }
  .story-speech { padding: 14px 16px; }
  .story-speech h3 + p { font-size: 14.5px; line-height: 1.6; }
  .dlg-story .alert { margin-top: 8px; padding: 8px 12px 8px 8px; font-size: 13.5px; line-height: 1.45; }
  .dlg-story .alert img { width: 38px; }
  .dlg-story .dlg-foot { margin-top: 12px; gap: 6px 10px; }
  .dlg-story .dlg-foot .pill { height: 46px; }
  .story-refs summary { padding: 2px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .rv { opacity: 1; transform: none; }
}

/* 지도 (네이버 지도 키가 없을 때 오픈스트리트맵) */
.map.is-live { z-index: 0; }
.map .leaflet-container, .map.leaflet-container { font: inherit; background: var(--bg-2); }
.map .leaflet-control-attribution { font-size: 10.5px; }
.map-pin { position: relative; }
.map-pin svg { position: absolute; left: -19px; top: -40px; width: 38px; height: 40px; color: var(--accent); fill: #fff; stroke: currentColor; stroke-width: 2; filter: drop-shadow(0 4px 6px rgba(20, 60, 120, .35)); }
.map-pin b { position: absolute; left: 0; top: -70px; transform: translateX(-50%); padding: 5px 11px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 14px -6px rgba(20, 60, 120, .5); }
