/* 한의원 홈페이지 1차본 — 공통 스타일
   색: 청자빛 흰색 / 먹색 / 청자 / 솔잎 / 낙관 붉은색(도장 한 곳만) */
:root {
  --paper: #F2F5F3;
  --paper-2: #E6ECE8;
  --ink: #1E2724;
  --ink-soft: #46524E;
  --celadon: #5B8A7C;
  --pine: #244239;
  --seal: #9E2F2A;
  --line: #C9D5CF;
  --wood: #6B4A2F;
  --wood-light: #8A6543;
  --serif: "Gowun Batang", "Nanum Myeongjo", "Batang", serif;
  --sans: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.75;
  word-break: keep-all;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--pine); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--seal);
  outline-offset: 3px;
}
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--pine); color: #fff; padding: 8px 16px; z-index: 10; }
.skip:focus { left: 16px; }

/* 자리표시: 아직 정보가 없는 곳 — 눈에 띄게 */
.ph {
  background: #FFF3C4;
  color: #5A4300;
  border: 1px dashed #B58900;
  border-radius: 3px;
  padding: 0 .3em;
  font-style: normal;
}
.draft-bar {
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 6px 16px;
}

/* 머리 */
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 700; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink); padding: 8px 14px; border-radius: 4px; font-size: 17px;
}
.nav a:hover { background: var(--paper-2); }
.nav a[aria-current="page"] { background: var(--pine); color: #fff; }
.head-call { font-weight: 700; color: var(--pine); text-decoration: none; white-space: nowrap; }

/* 첫 화면 */
.hero { padding: 64px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.hero h1 {
  font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 5vw, 54px);
  line-height: 1.3; margin: 0 0 20px; letter-spacing: -0.01em;
}
.hero p.lead { font-size: 20px; color: var(--ink-soft); margin: 0 0 28px; max-width: 30em; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; text-decoration: none; padding: 14px 24px; border-radius: 6px;
  font-weight: 700; font-size: 18px; border: 2px solid var(--pine);
}
.btn-main { background: var(--pine); color: #fff; }
.btn-main:hover { background: #1A332C; }
.btn-sub { background: transparent; color: var(--pine); }
.btn-sub:hover { background: var(--paper-2); }

/* 약장(한약 서랍장) — 이 사이트의 상징 */
.yakjang {
  background: var(--wood);
  padding: 14px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--wood-light);
}
.yakjang-top { color: #F4E9D8; font-family: var(--serif); text-align: center; font-size: 15px; margin: 0 0 10px; letter-spacing: .2em; }
.drawers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; }
.drawer {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  aspect-ratio: 4 / 3; background: #EFE3CF; border-radius: 3px; text-decoration: none; color: var(--ink);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.12);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
  position: relative;
}
.drawer::after { /* 손잡이 */
  content: ""; width: 26px; height: 8px; border-radius: 0 0 14px 14px; background: #7A5A36; position: absolute; bottom: 14%;
}
.drawer .name { font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.2; margin-top: -18px; }
.drawer .hanja { font-size: 14px; color: var(--ink-soft); line-height: 1.2; margin-top: -2px; }
.drawer:hover, .drawer:focus-visible { transform: translateY(4px); box-shadow: inset 0 -1px 0 rgba(0,0,0,.12); }

/* 섹션 */
section.block { padding: 64px 0; }
section.block.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 12px; line-height: 1.4; }
h3 { font-family: var(--serif); font-size: 23px; margin: 0 0 8px; }
.sub { color: var(--ink-soft); margin: 0 0 32px; max-width: 40em; }

/* 진료 시간 */
.hours { width: 100%; max-width: 560px; border-collapse: collapse; font-size: 20px; }
.hours th, .hours td { text-align: left; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.hours th { font-weight: 500; width: 40%; }
.hours td { font-weight: 700; }
.hours tr.off td { color: var(--seal); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }

/* 짧은 안내 줄 */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.quick a { padding: 24px 20px 24px 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.quick a + a { padding-left: 20px; border-left: 1px solid var(--line); }
.quick strong { display: block; font-family: var(--serif); font-size: 22px; margin-bottom: 4px; }
.quick span { color: var(--ink-soft); font-size: 16px; }
.quick a:hover strong { color: var(--pine); text-decoration: underline; }

/* 진료 안내 */
.treat { display: grid; grid-template-columns: 180px 1fr; gap: 32px; padding: 36px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.treat:first-of-type { border-top: 2px solid var(--ink); }
.treat .label { font-family: var(--serif); }
.treat .label b { display: block; font-size: 30px; }
.treat .label small { color: var(--ink-soft); font-size: 15px; }
.treat p { margin: 0 0 10px; max-width: 42em; }
.treat ul { margin: 0; padding-left: 1.2em; color: var(--ink-soft); }
.note-box { background: #fff; border-left: 4px solid var(--celadon); padding: 18px 22px; margin: 28px 0; max-width: 46em; }
.fees { width: 100%; border-collapse: collapse; background: #fff; }
.fees th, .fees td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.fees thead th { background: var(--paper-2); }

/* 오시는 길 */
.map { border: 1px solid var(--line); background: #fff; }
.info-list { margin: 0; }
.info-list div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-list dt { color: var(--ink-soft); }
.info-list dd { margin: 0; font-weight: 500; }

/* 예약 순서 (실제 차례가 있는 내용이라 번호를 씀) */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(s); width: 44px; height: 44px; border-radius: 50%; background: var(--pine); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 20px;
}
.steps h3 { margin-top: 6px; }
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.way { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--pine); padding: 28px; }
.way.place { border-top-color: var(--celadon); }
.way .big { font-family: var(--serif); font-size: 30px; font-weight: 700; margin: 8px 0 16px; }

details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 19px; }
details p { margin: 10px 0 0; color: var(--ink-soft); }

/* 꼬리 */
.site-foot { background: var(--pine); color: #DDE7E2; padding: 40px 0 32px; font-size: 15px; margin-top: 0; }
.site-foot a { color: #fff; }
.site-foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; }
.site-foot .fname { font-family: var(--serif); color: #fff; font-size: 20px; margin: 0 0 8px; }
.site-foot .ph { font-size: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: flex-end; align-content: start; }
.foot-links a.privacy { font-weight: 700; }
.foot-note { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.2); padding-top: 16px; color: #B7C8C0; font-size: 14px; }

.page-head { padding-top: 48px; padding-bottom: 8px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(32px, 4.4vw, 46px); margin: 0 0 8px; }
.page-head p { color: var(--ink-soft); margin: 0; max-width: 40em; }
.seal {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--seal);
  color: var(--seal); font-family: var(--serif); font-weight: 700; font-size: 14px; line-height: 1.1;
  border-radius: 4px; transform: rotate(-4deg); text-align: center; margin-left: 10px; vertical-align: middle;
}

/* 첫 화면 한 번만 나타나는 움직임: 서랍이 차례로 닫힘 */
@media (prefers-reduced-motion: no-preference) {
  .drawer { animation: shut .6s cubic-bezier(.2,.7,.3,1) both; }
  .drawers li:nth-child(2) .drawer { animation-delay: .06s; }
  .drawers li:nth-child(3) .drawer { animation-delay: .12s; }
  .drawers li:nth-child(4) .drawer { animation-delay: .18s; }
  .drawers li:nth-child(5) .drawer { animation-delay: .24s; }
  .drawers li:nth-child(6) .drawer { animation-delay: .30s; }
  @keyframes shut { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drawer { transition: none; }
}

/* 휴대폰 */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .hero { padding: 36px 0 40px; }
  .hero .wrap, .two, .ways, .site-foot .wrap { grid-template-columns: 1fr; gap: 32px; }
  .quick { grid-template-columns: 1fr; }
  .quick a, .quick a + a { padding: 18px 0; border-left: 0; }
  .treat { grid-template-columns: 1fr; gap: 8px; }
  .foot-links { justify-content: flex-start; }
  .site-head { position: static; }
  .site-head .wrap { padding-top: 10px; padding-bottom: 10px; }
  .nav { width: 100%; }
  .nav a { padding: 8px 10px; font-size: 16px; }
  .drawer .name { font-size: 19px; }
  .info-list div { grid-template-columns: 90px 1fr; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) {
  .hours { font-size: 17px; }
  .hours th { width: 34%; }
  .hours td { white-space: nowrap; }
}
