/* ==========================================================================
   레알피부전문동물병원 — style.css (v2)
   라이트: 배경 화이트 / 포인트 레드 / 포인트 위 글자 화이트 / 기본 글자 그레이
   다크  : 배경 진한 회색 / 포인트 레드 / 포인트 위 글자 화이트 / 기본 글자 화이트
   폰트  : Pretendard (고딕), 명조 계열 사용 안 함
   ========================================================================== */

:root {
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;

  /* LIGHT */
  --bg: #FFFFFF;
  --bg-alt: #F4F5F6;
  --surface: #FFFFFF;
  --ink: #2B2F34;          /* 제목 (진한 그레이) */
  --text: #5B6168;         /* 기본 글자 (그레이) */
  --muted: #6B7178;
  --line: #E1E3E6;
  --accent: #D7142A;       /* 포인트 레드 */
  --accent-ink: #FFFFFF;   /* 포인트 위 글자 */
  --accent-text: #C8102A;  /* 흰 배경 위 레드 글자 */
  --accent-soft: #FDECEE;
  --hdr-bg: rgba(255, 255, 255, .94);
  --shadow: 0 14px 34px -22px rgba(30, 34, 40, .35);
  --ico-bg: #2B2F34;
  --sns-bg: #2B2F34;

  --r: 8px;
  --r-l: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --hdr-h: 66px;
  --gut: clamp(18px, 4.5vw, 40px);
}

[data-theme="dark"] {
  --bg: #1E2023;
  --bg-alt: #26292D;
  --surface: #2C3035;
  --ink: #FFFFFF;
  --text: #FFFFFF;
  --muted: #D3D6DB;
  --line: #3C4147;
  --accent: #E0212F;
  --accent-ink: #FFFFFF;
  --accent-text: #FF646E;
  --accent-soft: rgba(224, 33, 47, .16);
  --hdr-bg: rgba(30, 32, 35, .94);
  --shadow: 0 14px 34px -22px rgba(0, 0, 0, .8);
  --ico-bg: #3A3E44;
  --sns-bg: #3A3E44;
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr-h) + 10px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.75; color: var(--text); background: var(--bg); word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; transition: background-color .4s var(--ease), color .4s var(--ease); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 6px; font-weight: 700; transition: top .2s; }
.skip:focus { top: 12px; }
.container { width: min(1200px, 100% - var(--gut) * 2); margin-inline: auto; }
.about, .spec, .doc, .loc, .cards, .vids-sub, .prices, .points { grid-template-columns: minmax(0, 1fr); }

/* ---------- progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); background: var(--accent); }

/* ---------- header ---------- */
.hdr { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--hdr-h); color: #fff; transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s; }
.hdr.is-top { background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); }
.hdr:not(.is-top) { background: var(--hdr-bg); color: var(--ink); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.hdr-in { height: 100%; width: min(1320px, 100% - var(--gut) * 2); margin-inline: auto; display: flex; align-items: center; gap: 18px; }
.logo { flex: none; display: block; }
.logo img { height: 36px; width: auto; }
.logo-on-light { display: none; }
.hdr:not(.is-top) .logo-on-dark { display: none; }
.hdr:not(.is-top) .logo-on-light { display: block; }
[data-theme="dark"] .hdr:not(.is-top) .logo-on-dark { display: block; }
[data-theme="dark"] .hdr:not(.is-top) .logo-on-light { display: none; }

.nav ul { display: flex; gap: 2px; }
.nav li a { display: block; padding: 8px 10px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; position: relative; opacity: .9; transition: opacity .2s; }
.nav li a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease); }
.hdr.is-top .nav li a::after { background: #fff; }
.nav li a:hover, .nav li a.is-current { opacity: 1; }
.nav li a:hover::after, .nav li a.is-current::after { transform: scaleX(1); }
.nav-foot { display: none; }
.hdr-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.theme, .burger { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; transition: background-color .2s; }
.theme:hover, .burger:hover { background: rgba(127, 127, 127, .2); }
.theme svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme .moon { display: none; }
[data-theme="dark"] .theme .sun { display: none; }
[data-theme="dark"] .theme .moon { display: block; fill: currentColor; stroke: none; }
.burger { align-content: center; gap: 5px; display: none; }
.burger i { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1439px) {
  .burger { display: grid; }
  .nav { position: fixed; inset: 0; z-index: -1; padding: calc(var(--hdr-h) + 12px) var(--gut) 28px; background: var(--bg); color: var(--ink); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .3s, transform .4s var(--ease), visibility 0s .4s; }
  .nav.open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .4s var(--ease), visibility 0s; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav li a { padding: 15px 2px; font-size: 19px; font-weight: 700; opacity: 1; }
  .nav li a::after { display: none; }
  .nav-foot { display: block; margin-top: 24px; }
  body.menu-open { overflow: hidden; }
  body.menu-open .hdr { color: var(--ink); background: var(--bg); }
  body.menu-open .hdr .logo-on-dark { display: none; }
  body.menu-open .hdr .logo-on-light { display: block; }
  [data-theme="dark"] body.menu-open .hdr .logo-on-dark { display: block; }
  [data-theme="dark"] body.menu-open .hdr .logo-on-light { display: none; }
}

/* ---------- buttons ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 20px; border-radius: var(--r); font-weight: 700; font-size: 16px; letter-spacing: -.01em; transition: background-color .2s, border-color .2s, transform .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn .ico { width: 28px; height: 28px; border-radius: 50%; background: var(--ico-bg); display: grid; place-items: center; flex: none; }
.btn .ico img { width: 17px; height: 17px; object-fit: contain; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #B90F23; }
.btn--ghost { border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); }
.cta--stack { flex-direction: column; }
.cta--stack .btn { justify-content: flex-start; }
.cta--row { margin-top: 26px; }

/* ---------- hero : 풀 슬라이드 ---------- */
.hero { position: relative; background: #111; }
.hero-visual { position: relative; height: 100vh; height: 100svh; min-height: 460px; max-height: 1100px; overflow: hidden; }
.slides { display: grid; height: 100%; }
.slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s 1s; overflow: hidden; }
.slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; transform: scale(1.07); transition: transform 7.5s linear; }
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease; z-index: 1; }
.slide.is-active img { transform: scale(1); }
.hero-visual::after { content: ""; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(transparent, rgba(0, 0, 0, .5)); z-index: 2; pointer-events: none; }
.slider-ui { position: absolute; inset: auto 0 0 0; z-index: 3; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
.slider-ui-in { display: flex; align-items: center; gap: 14px; }
.ticks { flex: 1; display: flex; gap: 8px; max-width: 520px; }
.tick { flex: 1; height: 24px; display: grid; align-items: center; }
.tick i { display: block; height: 3px; background: rgba(255, 255, 255, .35); position: relative; overflow: hidden; }
.tick i::after { content: ""; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }
.tick.is-done i::after { transform: scaleX(1); }
.tick.is-active i::after { animation: fill 6000ms linear forwards; }
.is-paused .tick.is-active i::after { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
.arrows { margin-left: auto; display: flex; gap: 8px; }
.arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .6); display: grid; place-items: center; color: #fff; background: rgba(0, 0, 0, .25); transition: background-color .2s; }
.arrows button:hover { background: var(--accent); border-color: var(--accent); }
.arrows svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.arrows .i-play { display: none; fill: currentColor; stroke: none; }
#pause[aria-pressed="true"] .i-play { display: block; }
#pause[aria-pressed="true"] .i-pause { display: none; }

/* ---------- facts ---------- */
.facts { background: var(--accent); color: var(--accent-ink); }
.facts-in { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: clamp(18px, 3.2vw, 34px) 4px; display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; border-right: 1px solid rgba(255, 255, 255, .28); }
.fact:last-child { border-right: 0; }
.fact b { font-size: clamp(26px, 5vw, 46px); line-height: 1.15; font-weight: 800; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.fact span { font-size: clamp(12px, 2.4vw, 15px); font-weight: 600; color: #fff; line-height: 1.4; word-break: keep-all; }

/* ---------- sections ---------- */
.sec { padding: clamp(56px, 9vw, 120px) 0; position: relative; background: var(--bg); }
.sec--alt { background: var(--bg-alt); }
.sec-head { max-width: 46rem; margin-bottom: clamp(24px, 5vw, 52px); }
.sec-title { font-size: clamp(28px, 5vw, 46px); line-height: 1.25; letter-spacing: -.035em; font-weight: 800; padding-top: 18px; position: relative; text-wrap: balance; }
.sec-title::before { content: ""; position: absolute; left: 0; top: 0; width: 40px; height: 4px; background: var(--accent); }
.lede { margin-top: 14px; font-size: clamp(16.5px, 2.3vw, 19px); line-height: 1.8; color: var(--text); text-wrap: pretty; }
.sub-title { font-size: clamp(21px, 3.4vw, 28px); font-weight: 800; letter-spacing: -.03em; margin: clamp(40px, 6vw, 68px) 0 18px; display: flex; align-items: center; gap: 14px; }
.sub-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-head + .sub-title { margin-top: 0; }

.js [data-reveal] { opacity: 0; transition: opacity .8s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.js [data-reveal="up"] { transform: translateY(36px); }
.js [data-reveal="left"] { transform: translateX(-44px); }
.js [data-reveal="right"] { transform: translateX(44px); }
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- 가로 슬라이드 공통 ---------- */
.hs-on { display: flex !important; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; padding-bottom: 2px; }
.hs-on::-webkit-scrollbar { display: none; }
.hs-on > * { scroll-snap-align: start; flex: 0 0 var(--hs-w, 84%); min-width: 0; }
.hs-ctrl { display: none; align-items: center; gap: 14px; margin-top: 14px; }
.hs-ctrl.show { display: flex; }
.hs-bar { flex: 1; height: 3px; background: var(--line); position: relative; }
.hs-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 30%; background: var(--accent); transition: left .15s linear, width .15s linear; }
.hs-btns { display: flex; gap: 8px; }
.hs-btns button { width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--ink); transition: background-color .2s, border-color .2s, color .2s; }
.hs-btns button:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.hs-btns button:disabled { opacity: .35; cursor: default; }
.hs-btns svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- about ---------- */
.about { display: grid; gap: clamp(30px, 6vw, 72px); align-items: center; }
@media (min-width: 960px) { .about { grid-template-columns: 1fr 1fr; } }
.about-head { margin-top: 8px; font-size: clamp(19px, 2.9vw, 25px); line-height: 1.55; font-weight: 700; letter-spacing: -.025em; color: var(--ink); text-wrap: balance; }
.points { margin-top: 24px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.points li { padding: 16px 0 16px 20px; border-bottom: 1px solid var(--line); position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: 24px; width: 8px; height: 8px; background: var(--accent); }
.points h3 { font-size: 18px; letter-spacing: -.02em; }
.points p { margin-top: 2px; font-size: 16px; line-height: 1.7; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about-photos figure { overflow: hidden; background: var(--bg-alt); border-radius: var(--r); }
.about-photos img { width: 100%; transition: transform .8s var(--ease); }
.about-photos figure:hover img { transform: scale(1.05); }

/* ---------- specialty ---------- */
.spec { display: grid; gap: 22px; padding: clamp(28px, 5vw, 52px) 0; border-top: 1px solid var(--line); min-width: 0; }
.spec:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 960px) { .spec { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 52px; align-items: start; } .spec-text { position: sticky; top: calc(var(--hdr-h) + 24px); } }
.spec h3 { font-size: clamp(23px, 3.8vw, 32px); line-height: 1.3; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
.spec-tag { margin-top: 10px; font-size: clamp(16.5px, 2.3vw, 18.5px); font-weight: 600; color: var(--accent-text); line-height: 1.6; }
.spec-intro { margin-top: 10px; }
.spec-target { margin-top: 18px; padding: 14px 16px; background: var(--bg-alt); border-left: 4px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; }
.spec-target dt { font-weight: 800; font-size: 14px; color: var(--accent-text); }
.spec-target dd { font-size: 16px; line-height: 1.65; color: var(--ink); }
.spec-sol-title { margin-top: 22px; font-weight: 800; font-size: 17px; color: var(--ink); }
.spec-sol { margin-top: 6px; }
.spec-sol li { padding: 12px 0 12px 18px; border-bottom: 1px solid var(--line); position: relative; }
.spec-sol li::before { content: ""; position: absolute; left: 0; top: 21px; width: 7px; height: 7px; background: var(--accent); }
.spec-sol h4 { font-size: 16.5px; font-weight: 700; }
.spec-sol p { margin-top: 1px; font-size: 15.5px; line-height: 1.65; }
.spec-cases { min-width: 0; }
.case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 959px) { .case-grid { --hs-w: 64%; } }
@media (max-width: 599px) { .case-grid { --hs-w: 78%; } }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.zoom { display: block; width: 100%; cursor: zoom-in; overflow: hidden; background: var(--bg-alt); position: relative; }
.zoom img { width: 100%; transition: transform .7s var(--ease); }
.zoom:hover img { transform: scale(1.05); }
.case figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: 12.5px; font-weight: 800; }
.chip--before { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--line); }
.chip--after { background: var(--accent); color: var(--accent-ink); }
.case--after { border-color: var(--accent); }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
@media (max-width: 1099px) { .steps { --hs-w: 44%; } }
@media (max-width: 759px) { .steps { --hs-w: 80%; } }
.step { display: flex; flex-direction: column; gap: 12px; padding: 20px 18px 22px; background: var(--bg-alt); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); }
.step-no { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.step-label { display: none; }
.step h3 { font-size: 19px; letter-spacing: -.03em; font-weight: 800; line-height: 1.35; }
.step-quote { font-weight: 600; color: var(--accent-text); font-size: 15.5px; margin-top: -6px; }
.step ul { display: grid; gap: 6px; }
.step li { padding-left: 14px; position: relative; font-size: 15.5px; line-height: 1.65; }
.step li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; background: var(--accent); }

/* ---------- info cards ---------- */
.cards { display: grid; gap: 12px; }
@media (min-width: 900px) { .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 760px) { .cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 899px) { .cards--3 { --hs-w: 52%; } }
@media (max-width: 759px) { .cards--3, .cards--2 { --hs-w: 84%; } }
.card { padding: 22px 20px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); }
.card-title { font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.35; }
.card-intro { margin-top: 8px; font-size: 15.5px; line-height: 1.7; }
.card-list { margin-top: 14px; display: grid; gap: 12px; }
.card-list li { padding-top: 12px; border-top: 1px solid var(--line); }
.card-list h4 { font-size: 16px; font-weight: 700; color: var(--accent-text); }
.card-list p { margin-top: 2px; font-size: 15.5px; line-height: 1.7; }

.prices { display: grid; gap: 12px; }
@media (min-width: 960px) { .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (max-width: 959px) { .prices { --hs-w: 58%; } }
@media (max-width: 639px) { .prices { --hs-w: 88%; } }
.price { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; font-size: 15.5px; }
.price caption { text-align: left; caption-side: top; padding: 12px 16px; font-weight: 800; font-size: 17px; background: var(--accent); color: var(--accent-ink); }
.price thead th { padding: 8px 16px; text-align: left; font-size: 13.5px; font-weight: 700; color: var(--muted); background: var(--bg-alt); }
.price thead th:last-child, .price td { text-align: right; }
.price tbody th { text-align: left; font-weight: 500; padding: 12px 16px; border-top: 1px solid var(--line); line-height: 1.5; color: var(--text); }
.price td { padding: 12px 16px; border-top: 1px solid var(--line); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.price tbody tr:hover { background: var(--accent-soft); }

/* ---------- 의료진 : 고정 박스 구조 ---------- */
.doc { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--surface); grid-template-columns: minmax(0, 38%) minmax(0, 1fr); grid-template-areas: "photo id" "cv cv"; }
.doc-photo { grid-area: photo; background: var(--bg-alt); align-self: stretch; }
.doc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.doc-id { grid-area: id; padding: clamp(14px, 3.4vw, 36px); display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.doc-name { font-size: clamp(26px, 6vw, 52px); line-height: 1.15; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.doc-name small { display: block; margin-top: 4px; font-size: clamp(14px, 2.6vw, 20px); font-weight: 700; color: var(--accent-text); letter-spacing: -.01em; }
.doc-en { font-size: clamp(13px, 2.4vw, 17px); line-height: 1.5; color: var(--ink); font-weight: 600; margin-top: 6px; }
.doc-role { font-size: clamp(12px, 2.2vw, 15px); line-height: 1.5; color: var(--muted); }
.doc-badges { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.doc-badges li { padding: 4px 10px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-text); font-size: clamp(12px, 2.2vw, 14px); font-weight: 700; line-height: 1.4; }
.cv { grid-area: cv; border-top: 1px solid var(--line); min-width: 0; }
.cv-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.cv-tab { padding: 14px 4px; font-size: clamp(13.5px, 2.5vw, 16px); font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; text-align: center; line-height: 1.3; transition: color .2s, background-color .2s, border-color .2s; }
.cv-tab:hover { color: var(--ink); }
.cv-tab.is-on { color: var(--accent-ink); background: var(--accent); border-bottom-color: var(--accent); }
.cv-panels { display: grid; }
.cv-panel { grid-area: 1 / 1; padding: clamp(18px, 3.4vw, 32px); min-width: 0; }
.js .cv-panel { visibility: hidden; opacity: 0; transition: opacity .35s; }
.js .cv-panel.is-on { visibility: visible; opacity: 1; }
.cv-panel h3 { font-size: 17px; margin-bottom: 8px; color: var(--accent-text); }
.cv-panel ul { display: grid; gap: 0; }
.cv-panel li { padding: 8px 0 8px 16px; position: relative; font-size: 16px; line-height: 1.6; border-bottom: 1px solid var(--line); }
.cv-panel li:last-child { border-bottom: 0; }
.cv-panel li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 6px; height: 6px; background: var(--accent); }
.papers span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (min-width: 960px) {
  .doc { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "photo id" "photo cv"; }
  .doc-photo { height: 100%; }
  .doc-id { padding: 40px 44px 28px; justify-content: flex-end; }
  .cv { border-top: 1px solid var(--line); border-left: 0; }
}
@media (min-width: 600px) and (max-width: 959px) { .doc { grid-template-columns: minmax(0, 36%) minmax(0, 1fr); } }
@media (max-width: 380px) { .cv-tab { font-size: 12.5px; } }

/* ---------- 시설 안내 : 동일 규격 슬라이더 (카드 아님) ---------- */
.fac-track { display: flex; gap: 10px; }
.fac-track > * { flex: 0 0 var(--hs-w, calc((100% - 20px) / 3)); }
@media (max-width: 959px) { .fac-track { --hs-w: 60%; } }
@media (max-width: 599px) { .fac-track { --hs-w: 88%; } }
.fac { margin: 0; }
.fac .zoom { aspect-ratio: 4 / 3; background: var(--bg-alt); }
.fac .zoom img { width: 100%; height: 100%; object-fit: cover; }
.fac-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 12px; text-align: left; color: #fff; font-weight: 700; font-size: 15.5px; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); }
.fac-cap::before { content: ""; display: inline-block; width: 18px; height: 3px; background: var(--accent); vertical-align: middle; margin-right: 8px; }

/* ---------- 미디어 ---------- */
.sec--media { padding-bottom: 0; }
.vid-hero { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 92vh; max-height: 92svh; min-height: 220px; overflow: hidden; background: #111; }
.vid-hero img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.vid-hero:hover img { transform: scale(1.04); }
.vid-shade { position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, .1), rgba(0, 0, 0, .55)); }
.play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(215, 20, 42, .6); animation: pulse 2.4s infinite; }
.play::after { content: ""; position: absolute; left: 25px; top: 19px; border: 13px solid transparent; border-left: 20px solid #fff; }
.play--lg { width: clamp(64px, 11vw, 112px); height: clamp(64px, 11vw, 112px); margin: calc(clamp(64px, 11vw, 112px) / -2) 0 0 calc(clamp(64px, 11vw, 112px) / -2); }
.play--lg::after { left: 38%; top: 28%; border-width: clamp(13px, 2.4vw, 24px); border-left-width: clamp(20px, 3.8vw, 38px); }
@keyframes pulse { 70% { box-shadow: 0 0 0 24px rgba(215, 20, 42, 0); } 100% { box-shadow: 0 0 0 0 rgba(215, 20, 42, 0); } }
.vid-meta { position: absolute; left: var(--gut); bottom: clamp(14px, 3vw, 32px); display: flex; align-items: center; gap: 12px; color: #fff; }
.vid-meta time { font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; opacity: .9; }
.vid-meta b { padding: 8px 14px; background: var(--accent); color: var(--accent-ink); border-radius: 4px; font-size: 14.5px; }
.vids-sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 0 clamp(56px, 9vw, 120px); }
.vids-sub { width: 100%; margin-inline: 0; padding-inline: 10px; }
.vid { display: block; }
.vid-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.vid:hover .vid-thumb img { transform: scale(1.06); }
.vid .play { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.vid .play::after { left: 19px; top: 14px; border-width: 10px; border-left-width: 15px; }
.vid time { display: block; margin-top: 8px; font-weight: 700; color: var(--muted); font-size: 14.5px; font-variant-numeric: tabular-nums; }

/* ---------- location ---------- */
.loc { display: grid; gap: 12px; }
@media (min-width: 900px) { .loc { grid-template-columns: 1fr 1fr; } }
.loc-card { padding: clamp(22px, 4vw, 40px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.loc-card h3 { margin: 22px 0 10px; font-size: 20px; font-weight: 800; }
.loc-card--addr h3 { margin-top: 0; }
.hours div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.hours dt { font-weight: 700; }
.hours dd { text-align: right; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--ink); }
.hours small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
.closed { margin-top: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: 16px; }
.addr { font-size: clamp(19px, 3vw, 23px); font-weight: 800; letter-spacing: -.02em; line-height: 1.45; color: var(--ink); }
.subway { margin-top: 8px; font-size: 16px; }
.tel-label { margin-top: 22px; font-weight: 700; font-size: 15px; }
.tel { display: inline-block; font-size: clamp(30px, 6vw, 42px); font-weight: 800; letter-spacing: -.02em; color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* ---------- faq ---------- */
.qas { display: grid; gap: 8px; }
.qa { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .25s; }
.qa[open] { border-color: var(--accent); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 18px; font-weight: 700; font-size: clamp(16px, 2.2vw, 17.5px); line-height: 1.5; letter-spacing: -.015em; color: var(--ink); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary i { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); position: relative; transition: background-color .25s; }
.qa summary i::before, .qa summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--accent-text); transition: transform .35s var(--ease), background-color .25s; }
.qa summary i::after { transform: rotate(90deg); }
.qa[open] summary i { background: var(--accent); }
.qa[open] summary i::before, .qa[open] summary i::after { background: var(--accent-ink); }
.qa[open] summary i::after { transform: rotate(0); }
.qa-a { padding: 0 18px 18px; font-size: 16px; line-height: 1.8; }
.qa[open] .qa-a { animation: qa .4s var(--ease); }
@keyframes qa { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.ftr { background: #17181B; color: #D7DADF; padding: clamp(44px, 7vw, 72px) 0 calc(clamp(40px, 6vw, 56px) + 70px); }
.ftr-in { display: grid; gap: 20px; justify-items: start; }
.ftr img[alt="레알피부전문동물병원"] { height: 42px; width: auto; }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; transition: background-color .2s; }
.social a:hover { background: var(--accent); }
.social img { width: 23px; height: 23px; object-fit: contain; }
.biz { display: grid; gap: 4px; font-size: 15px; line-height: 1.7; }
.biz div { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.biz dt { color: #9A9FA7; min-width: 5.5em; }
.legal { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.legal button, .legal a { padding: 6px 0; color: #D7DADF; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, .3); }
.copy { font-size: 13px; color: #8A8F97; }

/* ---------- dock / top ---------- */
.dock { display: none; }
@media (max-width: 899px) {
  .dock { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: #17181B; border-top: 3px solid var(--accent); transform: translateY(110%); transition: transform .5s var(--ease); }
  .dock.show { transform: none; }
  .dock a { display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; color: #fff; font-size: 12.5px; font-weight: 700; }
  .dock a:active { background: rgba(255, 255, 255, .12); }
  .dock img { width: 24px; height: 24px; object-fit: contain; }
}
.totop { position: fixed; z-index: 95; right: 14px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .35s var(--ease); }
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.totop svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 899px) { .totop { bottom: calc(82px + env(safe-area-inset-bottom)); } }

/* ---------- dialog / lightbox ---------- */
dialog { color: var(--text); }
.dlg { width: min(620px, calc(100% - 28px)); max-height: 80vh; padding: 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.dlg::backdrop, .lb::backdrop { background: rgba(10, 11, 13, .78); }
.dlg[open], .lb[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.dlg form { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg h2 { font-size: 19px; }
.dlg-body { padding: 20px; line-height: 1.8; }
.x { width: 40px; height: 40px; border-radius: 50%; font-size: 28px; line-height: 1; display: grid; place-items: center; }
.x:hover { background: var(--accent-soft); }
.lb { width: min(1100px, 100%); max-width: 100%; max-height: 100vh; margin: auto; padding: 12px; border: 0; background: transparent; color: #fff; overflow: visible; }
.lb form { position: absolute; right: 16px; top: 16px; z-index: 2; }
.lb .x { background: rgba(0, 0, 0, .6); color: #fff; }
.lb img { max-height: 82vh; width: auto; max-width: 100%; margin: 0 auto; border-radius: var(--r); }
.lb p { margin-top: 10px; text-align: center; font-weight: 700; }

/* ---------- small screens ---------- */
@media (max-width: 599px) {
  body { font-size: 16.5px; line-height: 1.75; }
  .btn { width: 100%; }
  .hero-visual { height: 78vh; height: 78svh; min-height: 420px; }
  .about-photos { gap: 8px; }
  .step { padding: 18px 16px 20px; }
  .price { font-size: 15px; }
  .price caption, .price thead th, .price tbody th, .price td { padding-inline: 14px; }
  .hours dd { font-size: 17px; }
  .vids-sub { padding-inline: 8px; gap: 8px; }
  .vid-meta b { padding: 6px 10px; font-size: 13px; }
}

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

/* ---------- 모바일·태블릿 길이 축소 보강 ---------- */
@media (max-width: 959px) {
  .spec-sol { --hs-w: 78%; }
  .spec-sol.hs-on li { padding: 14px 16px; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--r); background: var(--surface); }
  .spec-sol.hs-on li::before { display: none; }
  .cv-panels { height: 330px; }
  .cv-panel { overflow-y: auto; -webkit-overflow-scrolling: touch; }
}
@media (min-width: 600px) and (max-width: 959px) { .spec-sol { --hs-w: 46%; } .cv-panels { height: 300px; } }

/* =====================================================================
   v3 — 히어로 코딩 텍스트 / 특화 진료 탭 / 검사·치료 박스 / 의료진 여백 / FAQ 3열
   ===================================================================== */

/* ----- 히어로: 이미지는 배경, 텍스트는 코딩 ----- */
.slides { grid-template-rows: 100%; }
.slide { position: relative; }
.slide-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: #14161A; transform: scale(1.07); transition: transform 7.5s linear; }
.slide.is-active .slide-bg { transform: scale(1); }
.slide-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 12, 15, .82) 0%, rgba(10, 12, 15, .55) 55%, rgba(10, 12, 15, .3) 100%), linear-gradient(rgba(0, 0, 0, .4), transparent 28%); }
.slide-in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding-top: var(--hdr-h); padding-bottom: 96px; color: #fff; }
.hero-title { font-size: clamp(32px, 6.4vw, 68px); line-height: 1.22; letter-spacing: -.035em; font-weight: 800; color: #fff; text-wrap: balance; }
.hero-title .line { display: block; }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.hero-title .w > span { display: inline-block; transform: translateY(115%); }
.slide.is-active .hero-title .w > span { transform: none; transition: transform .9s var(--ease) calc(.25s + var(--i) * .08s); }
.hero-sub { margin-top: 20px; max-width: 34em; font-size: clamp(16px, 2.3vw, 20px); line-height: 1.75; color: rgba(255, 255, 255, .9); }
.cta--hero { margin-top: 28px; }
.btn--light { border: 1.5px solid rgba(255, 255, 255, .75); color: #fff; background: transparent; }
.btn--light:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.cta--hero .btn { width: auto; min-height: 52px; padding-inline: 26px; }
@media (max-width: 599px) {
  .slide-in { padding-bottom: 86px; }
  .slide-shade { background: linear-gradient(rgba(10, 12, 15, .62), rgba(10, 12, 15, .72)); }
  .cta--hero { width: 100%; }
  .cta--hero .btn { flex: 1 1 140px; padding-inline: 14px; }
}

/* ----- 핵심 특화 진료: 탭 통합 ----- */
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: clamp(20px, 4vw, 34px); }
.tab { min-height: 58px; padding: 12px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font-weight: 700; font-size: clamp(14.5px, 1.7vw, 17px); line-height: 1.35; text-align: center; transition: background-color .2s, border-color .2s, color .2s; text-wrap: balance; }
.tab:hover { border-color: var(--accent); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 759px) { .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tabpanels { min-width: 0; }
.spec { border-top: 0; padding: 0; }
.spec:first-of-type { padding-top: 0; }
.spec-text { position: static; }
.js .spec:not(.is-on) { display: none; }
.spec.is-on { animation: qa .45s var(--ease); }
@media (min-width: 960px) { .spec-text { position: static; } }

/* ----- 검사·치료 항목: 박스 + 팝업 ----- */
.boxes { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .boxes--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .boxes--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ibox { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 20px 20px 18px; min-height: 168px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); transition: border-color .2s, box-shadow .25s, transform .25s var(--ease); }
.ibox:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.ibox-tag { padding: 2px 9px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-text); font-size: 12.5px; font-weight: 800; }
.ibox h3 { font-size: 20px; line-height: 1.35; letter-spacing: -.03em; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 3px 10px; border-radius: 4px; background: var(--bg-alt); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; color: var(--text); }
.ibox-more { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--accent-text); }
.ibox-more i, .fbox i { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); position: relative; flex: none; }
.ibox-more i::before, .ibox-more i::after, .fbox i::before, .fbox i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 2px; margin: -1px 0 0 -5px; background: var(--accent-ink); }
.ibox-more i::after, .fbox i::after { transform: rotate(90deg); }
@media (max-width: 699px) { .ibox { min-height: 0; } }

/* 팝업 공통 보강 */
.dlg[open] { display: flex; flex-direction: column; }
.dlg form { flex: none; gap: 12px; }
.dlg-body { overflow-y: auto; }
.dlg h2 { font-size: 19px; line-height: 1.45; letter-spacing: -.02em; }
.dlg-lead { color: var(--ink); font-weight: 600; margin-bottom: 8px; }
.dlg-list li { padding: 14px 0; border-top: 1px solid var(--line); }
.dlg-list h3 { font-size: 17px; color: var(--accent-text); margin-bottom: 2px; }
.dlg-list p { font-size: 16px; line-height: 1.75; }
.dlg-answer { font-size: 17px; line-height: 1.85; color: var(--text); }
.dlg-cta { margin-top: 22px; }
.dlg-cta .btn { width: auto; flex: 1 1 140px; }

/* ----- 의료진: 탭 박스가 사진에 붙지 않도록 여백 ----- */
.cv { margin: clamp(14px, 3vw, 24px) clamp(14px, 3vw, 44px) clamp(14px, 3vw, 40px); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
@media (min-width: 960px) { .cv { margin-top: 8px; margin-left: 44px; margin-right: 44px; margin-bottom: 40px; } }

/* ----- FAQ: 3열 박스 + 팝업 ----- */
.fgrid { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .fgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fbox { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 18px 16px; min-height: 96px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); font-weight: 700; font-size: 16px; line-height: 1.5; letter-spacing: -.015em; color: var(--ink); transition: border-color .2s, box-shadow .25s, transform .25s var(--ease); }
.fbox:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }
.fq { flex: none; width: 26px; height: 26px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.ft { flex: 1; min-width: 0; text-wrap: balance; }
.fbox i { align-self: center; }
@media (max-width: 767px) { .fbox { min-height: 0; padding: 15px 14px; } }

/* =====================================================================
   v4 — 이미지 내용 기반 히어로 / 정보 탭 / SNS 버튼 / 블로그 / 버튼 정렬
   ===================================================================== */

/* ----- 히어로: 슬라이드별 코딩 텍스트 ----- */
.slide-shade { background: linear-gradient(90deg, rgba(10, 12, 15, .93) 0%, rgba(10, 12, 15, .88) 56%, rgba(10, 12, 15, .5) 100%), linear-gradient(rgba(0, 0, 0, .35), transparent 28%); }
.slide-in { align-items: flex-start; }
.slide-in > * { opacity: 0; transform: translateY(24px); }
.slide-in > :nth-child(1) { --k: 0; } .slide-in > :nth-child(2) { --k: 1; } .slide-in > :nth-child(3) { --k: 2; } .slide-in > :nth-child(4) { --k: 3; }
.slide-in > :nth-child(5) { --k: 4; } .slide-in > :nth-child(6) { --k: 5; } .slide-in > :nth-child(7) { --k: 6; }
.slide.is-active .slide-in > * { opacity: 1; transform: none; transition: opacity .8s var(--ease) calc(.2s + var(--k) * .12s), transform .9s var(--ease) calc(.2s + var(--k) * .12s); }
.hero-visual { min-height: 600px; }
.hero-title { font-size: clamp(28px, 4.6vw, 56px); line-height: 1.25; letter-spacing: -.035em; }
.tl { display: block; }
.tl--b { font-weight: 800; }
.tl--l { font-weight: 300; }
.hero-logo { width: auto; height: 46px; margin-bottom: 14px; }
.hero-sub { margin-top: 14px; max-width: 36em; font-size: clamp(15px, 1.7vw, 19px); line-height: 1.7; }
.hbadge { display: inline-block; padding: 6px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: clamp(13.5px, 1.4vw, 16px); margin-bottom: 16px; }
.cta--hero { margin-top: 22px; }
.pills { margin-top: 22px; display: grid; gap: 10px; width: min(100%, 600px); }
.pill { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 24px; border-radius: 999px; background: var(--accent); color: #fff; font-size: clamp(14px, 1.5vw, 17px); line-height: 1.4; }
.pill b { font-weight: 800; }
.pill span { font-size: .92em; }
.pill--dark { background: #33363B; }
.trio { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: min(100%, 640px); }
.trio li { padding: 14px 12px; border-radius: 14px; text-align: center; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .32); }
.trio b { display: block; font-size: clamp(14px, 1.5vw, 17px); font-weight: 800; }
.trio span { display: block; margin-top: 4px; font-size: clamp(12.5px, 1.2vw, 14px); line-height: 1.5; opacity: .92; }
.ops { margin-top: 20px; display: grid; gap: 16px; max-width: 580px; }
.oplab { display: inline-block; padding: 6px 20px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; font-size: clamp(14px, 1.5vw, 17px); }
.oplab--dark { background: #33363B; }
.ops p { margin-top: 8px; font-size: clamp(14px, 1.4vw, 16.5px); line-height: 1.7; color: rgba(255, 255, 255, .92); }
.checks { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 36px; max-width: 840px; }
.checks li { position: relative; padding-left: 30px; font-size: clamp(14.5px, 1.5vw, 18px); line-height: 1.5; color: #fff; }
.checks li::before { content: ""; position: absolute; left: 0; top: .12em; width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .85); border-radius: 4px; }
.ask-row { margin-top: 22px; display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.ask { font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; color: #fff; }
.ask-row .cta--hero { margin-top: 0; }
@media (max-width: 760px) {
  .checks { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pill { flex-direction: column; align-items: flex-start; gap: 2px; border-radius: 18px; padding: 11px 18px; }
  .trio { gap: 6px; }
  .trio li { padding: 10px 6px; border-radius: 10px; }
}
@media (max-width: 599px) {
  .hero-visual { height: 100vh; height: 100svh; min-height: 640px; }
  .slide-shade { background: linear-gradient(rgba(10, 12, 15, .9), rgba(10, 12, 15, .86)); }
  .slide-in { padding-bottom: 84px; }
  .hero-title { font-size: 28px; }
  .ask-row .cta--hero { width: 100%; }
  .hero-logo { height: 38px; }
}

/* ----- 헤더 / 메뉴 SNS : 푸터와 동일한 흰색 아이콘 버튼 ----- */
.hdr-in { width: min(1560px, 100% - var(--gut) * 2); gap: 14px; }
.nav li a { padding: 8px 8px; font-size: 14.5px; }
.social a { background: var(--sns-bg); }
.ftr .social a { background: rgba(255, 255, 255, .12); }
.social a:hover, .ftr .social a:hover { background: var(--accent); }
.social--hdr { display: none; gap: 6px; margin-right: 8px; }
@media (min-width: 1440px) { .social--hdr { display: flex; } }
.social--hdr a { width: 36px; height: 36px; }
.social--hdr img { width: 19px; height: 19px; }
.hdr.is-top .social--hdr a { background: rgba(255, 255, 255, .18); }
.hdr.is-top .social--hdr a:hover { background: var(--accent); }
.social--menu { margin-bottom: 16px; }

/* ----- 정보 탭 (원본: 주요 피부 검사 항목 / 진찰 치료 비용) ----- */
.tabs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.js .tp:not(.is-on) { display: none; }
.tp.is-on { animation: qa .45s var(--ease); }
.boxes { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; }
.ibox { min-height: 190px; }
@media (min-width: 560px) and (max-width: 899px) { .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .boxes .ibox:last-child { grid-column: 1 / -1; } }
@media (min-width: 900px) { .boxes { grid-template-columns: repeat(6, minmax(0, 1fr)); } .boxes .ibox { grid-column: span 2; } .boxes .ibox:nth-child(n+4) { grid-column: span 3; } }
@media (max-width: 559px) { .ibox { min-height: 0; } }
.price--one { max-width: 880px; }
.price--one .grp th { background: var(--accent); color: var(--accent-ink); text-align: left; padding: 11px 16px; font-size: 16px; font-weight: 800; border-top: 0; }
.price--one thead th { border-bottom: 1px solid var(--line); }

/* ----- 병원소개 버튼: 동일 너비·높이 ----- */
.cta--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
.cta--grid .btn { width: 100%; height: 56px; min-height: 56px; padding: 0 10px; gap: 8px; white-space: nowrap; }
@media (max-width: 599px) { .cta--grid .btn { font-size: 15px; } .cta--grid .btn .ico { width: 24px; height: 24px; } .cta--grid .btn .ico img { width: 15px; height: 15px; } }

/* ----- 블로그 최신글 3×2 카드 ----- */
.sec-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.blog-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.post { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .2s, box-shadow .25s, transform .25s var(--ease); }
.post:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-4px); }
.post-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post:hover .post-thumb img { transform: scale(1.06); }
.post-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 18px; flex: 1; }
.post time { font-size: 13.5px; font-weight: 700; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.post h3 { font-size: clamp(15.5px, 1.8vw, 18px); line-height: 1.45; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-tags { margin-top: auto; padding-top: 4px; font-size: 13px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 599px) { .post-tags { display: none; } .post-body { padding: 11px 12px 14px; } .sec-head--row .btn { width: 100%; } }

/* 헤더 한 줄 고정 */
.logo img { height: 34px; }
.nav li a { padding: 8px 7px; font-size: 14px; }
.social--hdr { flex-wrap: nowrap; flex: none; gap: 5px; margin-right: 6px; }
.social--hdr a { width: 32px; height: 32px; }
.social--hdr img { width: 17px; height: 17px; }
.theme { width: 40px; height: 40px; }
.hdr-tools { flex: none; }

/* ---------- v5 ---------- */
/* 2번 슬라이드 로고: 원본처럼 심볼(빨간 타원)만 노출 */
.hero-logo { height: 50px; width: calc(50px * 98 / 51); object-fit: cover; object-position: 0 50%; }
@media (max-width: 599px) { .hero-logo { height: 40px; width: calc(40px * 98 / 51); } }
/* 병원소개 버튼: 아이콘·글자 시작 위치 4개 동일 (좌 정렬) */
.cta--grid .btn { justify-content: flex-start; padding: 0 0 0 16px; gap: 10px; }
.cta--grid .btn .ico { flex: none; }
@media (max-width: 599px) { .cta--grid .btn { padding-left: 12px; gap: 8px; } }
/* 모바일 메뉴 스크롤: backdrop-filter가 fixed 메뉴의 기준 영역을 헤더로 가두는 문제 해결 */
body.menu-open { overflow: hidden; }
body.menu-open .hdr { backdrop-filter: none; -webkit-backdrop-filter: none; }
@media (max-width: 1439px) {
  .nav { height: 100vh; height: 100dvh; width: 100%; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .nav-foot { padding-bottom: 24px; }
}
.loc > *, .loc-card { min-width: 0; max-width: 100%; }
.loc-card .tel { font-size: clamp(26px, 8vw, 38px); white-space: nowrap; }
html, body { overflow-x: clip; }
/* v5.1 슬라이드 공통 img 규칙(.slide img)이 로고를 확대하던 문제 수정 */
.slide img.hero-logo { height: 50px; width: calc(50px * 98 / 51); max-width: none; object-fit: cover; object-position: 0 50%; transform: none; transition: none; }
@media (max-width: 599px) { .slide img.hero-logo { height: 40px; width: calc(40px * 98 / 51); } }

/* ---------- v6 블로그 목록 페이지 ---------- */
.page-blog main { padding-top: var(--hdr-h); }
.b-hero { padding: clamp(40px, 8vw, 88px) 0 clamp(28px, 5vw, 48px); text-align: center; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.b-title { font-size: clamp(26px, 5vw, 40px); font-weight: 800; letter-spacing: -.035em; line-height: 1.3; color: var(--ink); }
.b-sub { margin-top: 10px; color: var(--muted); font-size: clamp(15px, 2.4vw, 17px); }
.b-search { position: relative; display: flex; align-items: center; gap: 8px; width: min(640px, 100%); margin: 26px auto 0; padding: 6px 6px 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-s, 0 2px 10px rgba(0,0,0,.05)); }
.b-search:focus-within { border-color: var(--accent); }
.b-search svg { flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.b-search input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; outline: none; }
.b-search .btn { min-height: 46px; padding: 0 22px; width: auto; }
.btn--dark { background: var(--sns-bg); color: #fff; border: 1px solid transparent; }
.btn--dark:hover { background: var(--accent); }
.b-pop { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 10px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.b-pop > span { font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; transition: background-color .2s, color .2s, border-color .2s; }
.chip:hover { border-color: var(--accent); color: var(--accent-text); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.b-list { padding-top: clamp(28px, 5vw, 48px); }
.b-count { margin-bottom: 16px; font-size: 14.5px; font-weight: 700; color: var(--muted); }
.blog-grid--page { gap: 14px; }
@media (min-width: 900px) { .blog-grid--page { gap: 24px; } }
.bpost[hidden] { display: none; }
.bpost .post-body { gap: 10px; padding: 16px 16px 18px; }
.bpost h2 { font-size: clamp(15.5px, 1.9vw, 18px); line-height: 1.45; letter-spacing: -.02em; font-weight: 800; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 4.35em; }
.btags { display: flex; flex-wrap: wrap; gap: 5px; max-height: 3.3em; overflow: hidden; }
.btags span { padding: 3px 8px; border-radius: 6px; background: var(--bg-alt); color: var(--accent-text); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.bmeta { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 599px) { .bpost .post-body { padding: 12px 12px 14px; } .btags { max-height: 2.2em; } .btags span { font-size: 12px; } .bpost h2 { min-height: 0; } }
.b-empty { padding: 60px 0; text-align: center; color: var(--muted); font-size: 16px; }
.b-pager { display: flex; justify-content: center; gap: 8px; margin-top: 34px; }
.b-pager button { width: 42px; height: 42px; border-radius: 12px; font-weight: 800; color: var(--text); border: 1px solid var(--line); background: var(--surface); transition: background-color .2s, color .2s; }
.b-pager button:hover { border-color: var(--accent); }
.b-pager button.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.b-note { margin-top: 30px; text-align: center; }
.b-note .btn { width: auto; }

/* ---------- v7 호환성 (사파리·인앱 브라우저) ---------- */
body { overflow-x: hidden; }
html, body { overflow-x: clip; }
.b-search input { -webkit-appearance: none; appearance: none; border-radius: 0; }
.b-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.btn, .tab, .cv-tab, .chip, .ibox, .zoom { -webkit-tap-highlight-color: transparent; }
dialog:not([open]) { display: none; }
dialog.fb-open { position: fixed; inset: 0; z-index: 300; margin: auto; display: block; }
dialog.fb-open::after { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(0, 0, 0, .6); }

/* ---------- v8 히어로 어두운 막 완화 ---------- */
.slide-shade { background: linear-gradient(90deg, rgba(10, 12, 15, .6) 0%, rgba(10, 12, 15, .4) 50%, rgba(10, 12, 15, .08) 100%), linear-gradient(rgba(0, 0, 0, .28), transparent 26%); }
.hero-visual::after { background: linear-gradient(transparent, rgba(0, 0, 0, .3)); }
@media (max-width: 899px) { .slide-shade { background: linear-gradient(rgba(10, 12, 15, .3), rgba(10, 12, 15, .3) 30%, rgba(10, 12, 15, .58) 100%); } }
@media (max-width: 599px) { .slide-shade { background: linear-gradient(rgba(10, 12, 15, .3), rgba(10, 12, 15, .32) 30%, rgba(10, 12, 15, .6) 100%); } }
.hero-title, .hero-sub, .hbadge { text-shadow: 0 1px 14px rgba(0, 0, 0, .35); }

/* ---------- v9 버튼 아이콘: 흰색 선 아이콘, 원 안에 꽉 차게 ---------- */
.btn .ico { width: 30px; height: 30px; background: var(--ico-bg); color: #fff; }
.btn--primary .ico { background: rgba(255, 255, 255, .22); }
.btn .ico svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 599px) { .cta--grid .btn .ico { width: 26px; height: 26px; } .cta--grid .btn .ico svg { width: 15px; height: 15px; } }

/* ---------- v10 가로 슬라이드 상단 잘림 방지 ---------- */
.hs-on { overflow-y: hidden; overscroll-behavior-y: auto; }
.js .hs-on > [data-reveal], .js .hs-on > [data-reveal="up"], .js .hs-on > [data-reveal="zoom"] { transform: none; }
.js .hs-on > [data-reveal].in { transform: none; }

/* ---------- v11 라이트 모드: 섹션별 미색 배정 (A·B 교차) ---------- */
:root, [data-theme="light"] { --cream-a: #FBF8F0; --cream-b: #F3ECDC; --cream-line: #E6DCC4; --bg-alt: #F3ECDC; }
[data-theme="dark"] { --cream-a: #1E2023; --cream-b: #26292D; --cream-line: #33373C; --bg-alt: #26292D; }
#about, #process, #team, #media-gallery, #location { background: var(--cream-a); }
#specialty, #info, #facility, #blog, #faq { background: var(--cream-b); }
.sec { border-top: 1px solid var(--cream-line); }
.facts + .sec { border-top: 0; }
.b-hero { background: var(--cream-b); border-bottom-color: var(--cream-line); }
.page-blog .b-list { background: var(--cream-a); }

/* ---------- v12 섹션 배경: 밝은 회색(라이트) / 짙은 회색(다크) ---------- */
:root, [data-theme="light"] { --cream-a: #F7F8F9; --cream-b: #ECEEF1; --cream-line: #DCDFE3; --bg-alt: #ECEEF1; }
[data-theme="dark"] { --cream-a: #1C1E21; --cream-b: #2B2F34; --cream-line: #3A3F45; --bg-alt: #2B2F34; }

/* ---------- v13 라이트 대비 강화 / 다크는 원래 값 유지 ---------- */
:root, [data-theme="light"] { --cream-a: #F1F3F5; --cream-b: #E1E5E9; --cream-line: #CBD1D7; --bg-alt: #E1E5E9; }
[data-theme="dark"] { --cream-a: #1E2023; --cream-b: #26292D; --cream-line: #33373C; --bg-alt: #26292D; }

/* ---------- v14 다국어 · 국기 언어 선택 ---------- */
.lang { position: relative; flex: none; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 999px; color: inherit; transition: background-color .2s; }
.lang-btn:hover { background: rgba(127, 127, 127, .16); }
.lang .flag { display: block; width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .22); }
.lang .caret { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .75; transition: transform .2s; }
.lang.is-open .caret { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 400; min-width: 168px; margin: 0; padding: 6px; list-style: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .35); }
.lang-menu[hidden] { display: none; }
.lang-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: 15px; font-weight: 600; text-align: left; }
.lang-menu button:hover { background: var(--bg-alt); }
.lang-menu button[aria-checked="true"] { background: var(--accent-soft); color: var(--accent-text); }
[data-theme="dark"] .lang-menu button[aria-checked="true"] { background: rgba(255, 100, 110, .14); }
@media (max-width: 1439px) { .lang-btn { height: 40px; padding: 0 8px; } }
@media (max-width: 380px) { .lang-btn { padding: 0 6px; gap: 4px; } .lang .flag { width: 22px; height: 15px; } }

/* 언어별 글꼴 대체 (고딕 계열만) 및 줄바꿈 */
html[lang="zh-CN"] { --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif; }
html[lang="ja"] { --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif; }
html[lang="vi"] { --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, system-ui, sans-serif; }
html[lang="zh-CN"] body, html[lang="ja"] body, html[lang="en"] body, html[lang="vi"] body { word-break: normal; overflow-wrap: anywhere; }
html[lang="zh-CN"] .hero-title, html[lang="ja"] .hero-title, html[lang="zh-CN"] .sec-title, html[lang="ja"] .sec-title { text-wrap: wrap; }
html:not([lang="ko"]) .btn { white-space: normal; text-align: left; line-height: 1.3; }
html:not([lang="ko"]) .cta--grid .btn { white-space: normal; }

/* 1440~1599px: 헤더 한 줄 유지 (SNS·언어·메뉴 간격 축소) */
@media (min-width: 1440px) and (max-width: 1599px) {
  .hdr-in { gap: 10px; }
  .nav li a { padding: 8px 5px; font-size: 14px; }
  .social--hdr { gap: 4px; }
  .social--hdr a { width: 28px; height: 28px; }
  .social--hdr img { width: 16px; height: 16px; }
  .lang-btn { padding: 0 6px; gap: 4px; }
  .hdr-tools { gap: 6px; }
}
