/* 담연한의원 — P9 고정 정보 패널 · 갈색·베이지, 명조 */
:root {
  --bg: #f5f0e7;
  --paper: #ece3d4;
  --ink: #2b2119;
  --sub: #6b5b4c;
  --brown: #5a3d28;
  --rust: #9a5634;
  --line: #d9ccb8;
  --panel: #3b2a1e;
  --panel-t: #efe5d5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.75 'Pretendard Variable', Pretendard, -apple-system, 'Malgun Gothic', sans-serif; word-break: keep-all; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { margin: 0; font-family: 'Nanum Myeongjo', serif; font-weight: 800; letter-spacing: -0.02em; }

.layout { display: grid; grid-template-columns: 320px 1fr; align-items: start; }

/* 패널 */
.panel { position: sticky; top: 0; height: 100vh; min-height: 560px; background: var(--panel); color: var(--panel-t); display: flex; flex-direction: column; padding: 40px 36px 28px; }
.panel__top { display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.logo__seal { width: 38px; height: 38px; display: grid; place-items: center; border: 1.5px solid #c98a5f; color: #e3a77d; font-size: 20px; line-height: 1; border-radius: 3px; }
.panel__tel-s, .panel__menu { display: none; }
.panel__nav { display: flex; flex-direction: column; margin: 44px 0 0; }
.panel__nav a { text-decoration: none; padding: 9px 0; font-size: 16px; color: #d7c8b2; border-bottom: 1px solid rgba(239,229,213,.12); }
.panel__nav a:hover { color: #fff; padding-left: 4px; transition: padding .15s; }
.panel__info { margin-top: auto; }
.panel__today { margin: 0 0 6px; font-size: 14px; color: #cdbca4; }
.panel__today span { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 3px; background: rgba(239,229,213,.12); font-size: 12px; font-weight: 600; }
.panel__today span.on { background: #c98a5f; color: var(--panel); }
.panel__tel { display: block; text-decoration: none; font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 32px; letter-spacing: -0.01em; color: #fff; }
.panel__addr { margin: 10px 0 18px; font-size: 14px; line-height: 1.6; color: #cdbca4; }
.panel__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.panel__btns a { text-align: center; text-decoration: none; padding: 11px 0; font-size: 14px; font-weight: 600; border: 1px solid rgba(239,229,213,.35); border-radius: 3px; }
.panel__btns a:last-child { background: var(--panel-t); color: var(--panel); border-color: var(--panel-t); }
.panel__foot { margin: 18px 0 0; font-size: 12px; color: #a8957c; }

/* 본문 */
.main { min-width: 0; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 620px; border-bottom: 1px solid var(--line); }
.hero__text { padding: 88px 56px 56px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero__kicker { margin: 0 0 20px; font-size: 14px; color: var(--rust); font-weight: 600; letter-spacing: .02em; }
.hero h1 { font-size: 44px; line-height: 1.38; }
.hero__text > p:last-child { margin: 26px 0 0; color: var(--sub); font-size: 17px; max-width: 26em; }
.hero__img { margin: 0; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }

.notice { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 22px 56px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: 15px; }
.notice p { margin: 0; }
.notice b { margin-right: 8px; color: var(--brown); }
.notice__date { color: var(--sub); font-size: 13px; padding-top: 2px; }

.sec { padding: 80px 56px; border-bottom: 1px solid var(--line); }
.sec--paper { background: #efe7da; }
.sec__t { display: flex; align-items: baseline; gap: 16px; font-size: 30px; margin-bottom: 40px; }
.sec__t span { font-family: 'Pretendard Variable', sans-serif; font-weight: 500; font-size: 14px; color: var(--rust); letter-spacing: .05em; }

/* 진료 과목 */
.care { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.care div { padding: 22px 0; border-top: 1px solid var(--line); }
.care dt { font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 20px; }
.care dd { margin: 6px 0 0; color: var(--sub); font-size: 15px; }

/* 치료 방법 */
.method { display: grid; grid-template-columns: 1fr 1.35fr; gap: 40px; align-items: start; }
.method img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.mtbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.mtbl th, .mtbl td { text-align: left; padding: 15px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mtbl thead th { font-size: 12px; color: var(--sub); font-weight: 500; border-bottom: 1px solid var(--brown); padding-top: 0; }
.mtbl tbody th { font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 17px; white-space: nowrap; width: 22%; }
.mtbl td { color: var(--sub); }
.mtbl td:last-child { color: var(--brown); font-weight: 600; white-space: nowrap; width: 20%; }
.mtbl td.no { color: var(--rust); }
.mtbl small { display: block; font-weight: 400; font-size: 12px; color: var(--sub); }
.note { margin: 28px 0 0; font-size: 14px; color: var(--sub); }

/* 진료시간 */
.hours { display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: start; }
.htbl { width: 100%; border-collapse: collapse; font-size: 17px; font-variant-numeric: tabular-nums; }
.htbl th, .htbl td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.htbl th { font-family: 'Nanum Myeongjo', serif; font-weight: 800; width: 56px; }
.htbl .off td, .htbl .off th { color: var(--rust); }
.htbl tr.today { background: var(--paper); }
.htbl tr.today td::after { content: '오늘'; margin-left: 10px; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: var(--brown); color: #fff; vertical-align: 2px; }
.hours__notes { list-style: none; margin: 0; padding: 0; }
.hours__notes li { padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 15px; color: var(--sub); }
.hours__notes li:first-child { padding-top: 6px; }
.hours__notes b { display: inline-block; min-width: 76px; color: var(--ink); }

/* 원장 */
.doctor { display: grid; grid-template-columns: 260px 1fr; gap: 48px; align-items: start; }
.doctor__role { margin: 0; font-size: 13px; color: var(--rust); font-weight: 600; }
.doctor__name { margin: 2px 0 14px; font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 30px; }
.doctor ul { margin: 0; padding: 0; list-style: none; font-size: 15px; color: var(--sub); }
.doctor li { padding: 2px 0; }
.doctor blockquote { margin: 0; padding: 4px 0 0 28px; border-left: 2px solid var(--rust); font-family: 'Nanum Myeongjo', serif; font-size: 20px; line-height: 1.8; color: var(--brown); }
.doctor__img { margin-top: 44px; width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 2px; }

/* 오시는 길 */
.visit__addr { margin: 0 0 18px; font-family: 'Nanum Myeongjo', serif; font-weight: 800; font-size: 22px; }
.visit__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--brown); border-radius: 3px; background: transparent; color: var(--brown); font-family: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn--dark { background: var(--brown); color: #fff; }
.visit__dl { margin: 32px 0 0; max-width: 640px; }
.visit__dl div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.visit__dl dt { font-weight: 700; color: var(--brown); }
.visit__dl dd { margin: 0; color: var(--sub); }
.visit__dl a { color: var(--ink); font-weight: 600; }

.ft { padding: 36px 56px 48px; font-size: 13px; color: var(--sub); }
.ft p { margin: 3px 0; }
.mbar { display: none; }

/* 좁은 PC */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 280px 1fr; }
  .panel { padding: 32px 26px 24px; }
  .hero { grid-template-columns: 1fr; }
  .hero__img { order: -1; }
  .hero__img img { aspect-ratio: 16 / 9; height: auto; }
  .hero__text { padding: 48px 40px; }
  .sec, .notice, .ft { padding-inline: 40px; }
  .method, .hours, .doctor { grid-template-columns: 1fr; gap: 28px; }
  .method img { aspect-ratio: 16 / 9; }
}

/* 모바일: 패널은 상단 한 줄로 */
@media (max-width: 760px) {
  .layout { display: block; }
  .panel { position: sticky; top: 0; z-index: 40; height: auto; min-height: 0; padding: 0 16px; }
  .panel__top { height: 58px; gap: 8px; }
  .logo { font-size: 20px; gap: 10px; margin-right: auto; }
  .logo__seal { width: 32px; height: 32px; font-size: 17px; }
  .panel__tel-s, .panel__menu { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 600; border-radius: 3px; text-decoration: none; cursor: pointer; }
  .panel__tel-s { background: var(--panel-t); color: var(--panel); }
  .panel__menu { background: transparent; color: var(--panel-t); border: 1px solid rgba(239,229,213,.35); }
  .panel__nav { display: none; margin: 0 -16px; padding: 4px 16px 12px; border-top: 1px solid rgba(239,229,213,.12); }
  .panel__nav.open { display: flex; }
  .panel__nav a { padding: 12px 0; }
  .panel__info, .panel__foot { display: none; }
  .hero__text { padding: 32px 20px 40px; }
  .hero h1 { font-size: 30px; }
  .hero__text > p:last-child { font-size: 16px; margin-top: 18px; }
  .hero__img img { aspect-ratio: 4 / 3.4; }
  .notice { grid-template-columns: 1fr; gap: 4px; padding: 18px 20px; font-size: 14px; }
  .notice b { display: block; }
  .sec { padding: 56px 20px; }
  .sec__t { font-size: 25px; margin-bottom: 26px; }
  .care { grid-template-columns: 1fr; }
  .care dt { font-size: 18px; }
  .mtbl thead { display: none; }
  .mtbl tr { display: grid; grid-template-columns: 1fr auto; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .mtbl th, .mtbl td { border: 0; padding: 0; width: auto !important; }
  .mtbl td:nth-of-type(1) { grid-column: 1 / -1; grid-row: 2; margin-top: 4px; font-size: 14px; }
  .mtbl td:last-child { text-align: right; font-size: 14px; }
  .htbl { font-size: 16px; }
  .hours__notes b { display: block; }
  .doctor blockquote { font-size: 17px; padding-left: 18px; }
  .doctor__img { aspect-ratio: 4 / 3; margin-top: 32px; }
  .visit__addr { font-size: 19px; }
  .visit__dl div { grid-template-columns: 72px 1fr; }
  .ft { padding: 28px 20px 96px; }
  .mbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--panel); padding-bottom: env(safe-area-inset-bottom); }
  .mbar a { display: grid; place-items: center; height: 56px; text-decoration: none; color: var(--panel-t); font-weight: 600; font-size: 15px; }
  .mbar a + a { border-left: 1px solid rgba(239,229,213,.15); }
  .mbar a:first-child { background: #c98a5f; color: var(--panel); }
}
