/* 마법의손의원 — 모바일 공통 스타일 v2
   따뜻한 아이보리 바탕 + 로즈우드 포인트 (청담 MANUS의 골드와 구분) */
:root {
  --white: #fbf8f3;
  --ivory: #f3ece2;
  --sand: #e9dfd2;
  --stone: #ddd2c4;
  --muted: #8a7f74;
  --body: #5f5750;
  --ink: #2e2925;
  --accent: #946d5f;     /* rosewood — 선·작은 표시에만 */
  --accent-l: #d4b5a7;
  --en: "Cormorant Garamond", serif;
  --serif: "Noto Serif KR", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--white); color: var(--ink); font-family: var(--sans); font-synthesis: none;
       line-height: 1.75; letter-spacing: -0.02em; word-break: keep-all; padding-bottom: 64px; }
.wrap { max-width: 480px; margin: 0 auto; overflow-x: hidden; background: var(--white); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; }

/* 사진 자리 (임시 사진 위에 실제 촬영본으로 교체 예정) */
.ph { position: relative; overflow: hidden; background: var(--sand); }
.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.review .ph.tmp::before { content: "임시 사진"; position: absolute; z-index: 3; right: 8px; top: 8px; font-size: 10px; padding: 1px 6px;
                  background: rgba(46,41,37,.5); color: #fff; }
.draft { display: none; }
.review .draft { display: inline-block; font-size: 9px; letter-spacing: .1em; font-weight: 500;
                 color: var(--accent); border: 1px solid var(--accent); padding: 0 5px; vertical-align: middle; margin-left: 6px; }

/* ===== 헤더 ===== */
header { position: sticky; top: 0; z-index: 50; height: 58px; padding: 0 20px; display: flex; align-items: center;
         justify-content: space-between; background: rgba(251,248,243,.95); backdrop-filter: blur(8px);
         border-bottom: 1px solid transparent; transition: border-color .3s; }
header.scrolled { border-color: var(--stone); }
.logo { display: block; line-height: 1; }
.logo .word { font-family: var(--serif); font-weight: 400; font-size: 19px; letter-spacing: .02em; }
.logo small { display: block; font-family: var(--en); font-size: 10.5px; letter-spacing: .28em; color: var(--muted); margin-top: 5px; }
.head-r { display: flex; align-items: center; gap: 18px; }
.head-tel { font-size: 12px; color: var(--muted); }
.gnb, .head-kakao { display: none; }   /* PC 전용 — mh-desktop.css 에서 켬 */
.burger { width: 24px; height: 14px; position: relative; }
.burger i { position: absolute; left: 0; right: 0; height: 1px; background: var(--ink); }
.burger i:first-child { top: 0; } .burger i:last-child { bottom: 0; left: 8px; }

/* ===== 전체 메뉴 ===== */
.menu { position: fixed; inset: 0; z-index: 100; background: var(--ivory); padding: 0 24px 40px;
        transform: translateY(-100%); transition: transform .45s cubic-bezier(.6,0,.2,1); overflow-y: auto; }
.menu.open { transform: none; }
.menu-top { height: 58px; display: flex; align-items: center; justify-content: space-between; }
.x { font-size: 30px; font-weight: 200; line-height: 1; }
.menu h5 { font-size: 12px; font-weight: 500; color: var(--accent); margin: 30px 0 4px; }
.menu ol { list-style: none; }
.menu li { border-bottom: 1px solid var(--stone); }
.menu li a { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 0; font-size: 17px; font-weight: 500; }
.menu li a::after { content: "›"; color: var(--muted); font-weight: 300; }

/* ===== 공통 ===== */
section { padding: 72px 24px; }
.h2 { font-weight: 600; font-size: 23px; line-height: 1.5; letter-spacing: -0.035em; margin: 0 0 14px; text-wrap: balance; }
.lead { font-size: 15px; color: var(--body); }
.more-link { display: inline-block; margin-top: 22px; font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.side-note { font-size: 11.5px; color: var(--muted); margin-top: 22px; line-height: 1.7; }

footer { background: var(--ink); color: #9a9087; font-size: 11px; line-height: 1.9; padding: 48px 24px 40px; }
footer .logo { color: var(--ivory); margin-bottom: 24px; }
footer .logo small { color: #9a9087; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 16px; color: #d2c8bd; }

/* ===================================================
   상세 페이지 공통 (pigment.html …)
   =================================================== */
.crumb { padding: 14px 24px 0; font-size: 12px; color: var(--muted); }
.crumb a { color: var(--ink); }
.sub-hero { padding: 28px 24px 0; }
.sub-hero h1 { font-weight: 600; font-size: 28px; line-height: 1.4; letter-spacing: -0.04em; text-wrap: balance; }
.sub-hero .copy { font-family: var(--serif); font-weight: 300; font-size: 18px; line-height: 1.75; margin-top: 18px; color: var(--ink); }
.sub-hero .ph { aspect-ratio: 4 / 3; margin: 30px -24px 0; }
.sub-sec { padding: 56px 24px; }
.sub-sec.tint { background: var(--ivory); }
.sub-sec .h3 { font-weight: 600; font-size: 20px; line-height: 1.5; letter-spacing: -0.03em; margin-bottom: 10px; }

/* 이런 분께 */
.check { list-style: none; margin-top: 20px; }
.check li { display: grid; grid-template-columns: 22px 1fr; padding: 12px 0; border-bottom: 1px solid var(--stone); font-size: 14.5px; }
.check li::before { content: ""; width: 10px; height: 1px; background: var(--accent); margin-top: 13px; }

/* 고민별 치료 (표) */
.match { margin-top: 22px; border-top: 1px solid var(--ink); }
.match > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--stone); }
.match dt b { display: block; font-size: 15px; font-weight: 600; }
.match dt small { font-size: 11.5px; color: var(--muted); }
.match dd { font-size: 14px; color: var(--body); }
.match dd em { font-style: normal; color: var(--ink); font-weight: 500; }

/* 사용 장비 */
.devices { display: grid; gap: 10px; margin-top: 22px; }
.device { padding: 18px; background: var(--white); border: 1px solid var(--stone); }
.device-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.device b { font-size: 16px; font-weight: 600; }
.device .for { font-size: 12px; color: var(--accent); white-space: nowrap; }
.device p { font-size: 13.5px; color: var(--body); margin-top: 6px; }

/* 치료 과정 */
.process { list-style: none; margin-top: 22px; counter-reset: p; }
.process li { position: relative; padding: 0 0 22px 36px; font-size: 14px; color: var(--body); counter-increment: p; }
.process li::before { content: counter(p); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
                      border: 1px solid var(--accent); color: var(--accent); font-size: 12px; text-align: center; line-height: 21px; }
.process li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 27px; bottom: 4px; width: 1px; background: var(--stone); }
.process b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; }

/* 시술 정보 */
.facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: 22px; border-top: 1px solid var(--ink); }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--stone); }
.facts div:nth-child(odd) { padding-right: 12px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { font-size: 14px; margin-top: 2px; }

/* 주의사항 */
.notice { margin-top: 22px; padding: 18px 20px; background: var(--ivory); font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.notice b { display: block; color: var(--ink); font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.notice ul { padding-left: 16px; }

/* FAQ */
.faq { margin-top: 22px; border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--stone); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; position: relative; font-size: 14.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 20px; font-weight: 200; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; font-size: 13.5px; color: var(--body); }

/* 다른 진료 */
.related { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 22px; }
.related a { padding: 16px; border: 1px solid var(--stone); font-size: 14px; font-weight: 500; }
.related a span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

/* ===== 안내 문서 페이지 (비급여 · 개인정보 · 환자 권리) ===== */
.doc-head { padding: 28px 24px 0; }
.doc-head h1 { font-weight: 600; font-size: 26px; letter-spacing: -0.04em; }
.doc-head p { font-size: 14px; color: var(--body); margin-top: 10px; }
.doc-body { padding: 8px 24px 72px; }
.doc-body h2 { font-size: 17px; font-weight: 600; margin: 36px 0 10px; padding-top: 16px; border-top: 1px solid var(--ink); }
.doc-body p, .doc-body li { font-size: 14px; color: var(--body); }
.doc-body ul { padding-left: 18px; margin-top: 8px; }
.doc-body li { margin-top: 4px; }
.doc-body .tbl { overflow-x: auto; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.doc-body th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 8px 8px 0; border-bottom: 1px solid var(--stone); white-space: nowrap; }
.doc-body td { padding: 11px 8px 11px 0; border-bottom: 1px solid var(--stone); vertical-align: top; }
.doc-body td:nth-child(2) { white-space: nowrap; color: var(--ink); font-weight: 500; text-align: right; padding-right: 0; }
.doc-body th:nth-child(2) { text-align: right; padding-right: 0; }
.doc-body td:nth-child(3) { white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.law dt { font-size: 15px; font-weight: 600; margin-top: 18px; }
.law dd { font-size: 14px; color: var(--body); margin-top: 4px; }

/* ===== 공지 팝업 (설정은 assets/mh.js 맨 위 POPUP) ===== */
.pop-bg { position: fixed; inset: 0; z-index: 200; background: rgba(46,41,37,.5); display: flex; align-items: center; justify-content: center; padding: 24px; }
.pop { width: 100%; max-width: 340px; max-height: 86vh; overflow-y: auto; background: var(--white); }
.pop img { display: block; width: 100%; }
.pop-body { padding: 24px 22px 20px; }
.pop-body small { font-size: 12px; color: var(--accent); }
.pop-body h4 { font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.5; letter-spacing: -0.03em; margin-top: 4px; }
.pop-body p { font-size: 14px; color: var(--body); margin-top: 10px; white-space: pre-line; }
.pop-body a { display: inline-block; margin-top: 16px; font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.pop-foot { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--stone); }
.pop-foot button { padding: 14px 0; font-size: 13px; color: var(--muted); }
.pop-foot button + button { border-left: 1px solid var(--stone); color: var(--ink); font-weight: 500; }

/* ===== 하단 고정 상담 ===== */
.cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1.6fr;
       height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--white); border-top: 1px solid var(--stone); }
.cta a { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; }
.cta svg { width: 18px; height: 18px; }
.cta .kakao { background: var(--ink); color: var(--ivory); }
