/* 온담 내과 (가상의 동네 의원) — 모모듀 샘플 사이트
   흰 바탕 + 차분한 청록, 정보가 먼저 보이는 반듯한 구성 */
:root {
  --white: #FFFFFF;
  --bg: #F5F8FA;
  --teal: #0E7C86;
  --teal-deep: #0A5960;
  --teal-tint: #E6F3F4;
  --navy: #1B2B3A;
  --muted: #5C6B78;
  --line: #E1E8ED;
  --warn: #C2410C;
  --font: 'Pretendard', 'Malgun Gothic', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--white); color: var(--navy); font-family: var(--font); font-size: 16.5px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-weight: 800; letter-spacing: -0.025em; line-height: 1.3; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 18px; }

.sample-bar { background: var(--navy); color: #DCE6EE; font-size: 14px; }
.sample-bar .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; padding-top: 7px; padding-bottom: 7px; text-align: center; }
.sample-bar a { color: #7FD6DC; font-weight: 700; text-decoration: none; white-space: nowrap; }

/* 오늘 진료 상태 */
.today { background: var(--teal-tint); font-size: 15px; }
.today .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 8px; padding-bottom: 8px; }
.today__state { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.today__state i { width: 9px; height: 9px; border-radius: 50%; background: #9AA6B0; }
.today.is-open .today__state i { background: #16A34A; box-shadow: 0 0 0 4px rgba(22,163,74,.18); }
.today__more { color: var(--muted); }

/* 머리 */
.top { position: sticky; top: 0; z-index: 30; background: var(--white); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding-top: 12px; padding-bottom: 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--teal); position: relative; }
.logo__mark::before, .logo__mark::after { content: ""; position: absolute; background: var(--white); border-radius: 2px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.logo__mark::before { width: 16px; height: 5px; }
.logo__mark::after { width: 5px; height: 16px; }
.logo b { font-size: 20px; font-weight: 800; }
.logo small { display: block; font-size: 12px; color: var(--muted); line-height: 1; }
.gnb { order: 3; width: 100%; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.gnb a { text-decoration: none; padding: 8px 10px; font-size: 15.5px; font-weight: 600; color: var(--muted); white-space: nowrap; border-radius: 8px; }
.gnb a:hover, .gnb a[aria-current="page"] { color: var(--teal-deep); background: var(--teal-tint); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: 10px; background: var(--teal); color: var(--white); font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; }
.btn:hover { background: var(--teal-deep); }
.btn--line { background: var(--white); color: var(--teal-deep); box-shadow: inset 0 0 0 1.5px var(--teal); }
.btn--line:hover { background: var(--teal-tint); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 15px; }

/* 첫 화면 */
.hero { background: var(--bg); padding: 32px 0 40px; }
.hero .wrap { display: grid; gap: 24px; }
.hero h1 { font-size: 32px; }
.hero h1 span { color: var(--teal); }
.hero__text { color: var(--muted); margin-top: 10px; font-size: 17.5px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.tile { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--teal); transform: translateY(-2px); }
.tile b { font-size: 17px; }
.tile span { font-size: 14px; color: var(--muted); line-height: 1.5; }
.tile--main { background: var(--teal); border-color: var(--teal); color: var(--white); }
.tile--main span { color: #CFEDEF; }
.tile__ico { width: 30px; height: 30px; border-radius: 8px; background: var(--teal-tint); margin-bottom: 6px; position: relative; }
.tile--main .tile__ico { background: rgba(255,255,255,.18); }
.hero__photo { border-radius: 18px; overflow: hidden; position: relative; }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 70% center; }
.hero__photo figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.95); border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 600; }

/* 섹션 */
.sec { padding: 56px 0; border-top: 1px solid var(--line); }
.sec--bg { background: var(--bg); }
.sec__head { margin-bottom: 22px; }
.sec__head h2 { font-size: 26px; }
.sec__head p { color: var(--muted); margin-top: 4px; }

/* 진료 시간 */
.hours { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 16px; }
.hours th, .hours td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.hours th { width: 30%; font-weight: 600; color: var(--muted); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours tr.is-today { background: var(--teal-tint); }
.hours tr.is-today th { color: var(--teal-deep); }
.hours tr.is-today th::after { content: "오늘"; margin-left: 6px; font-size: 12px; background: var(--teal); color: var(--white); border-radius: 6px; padding: 1px 6px; vertical-align: 2px; }
.hours .off { color: var(--warn); font-weight: 600; }
.notes { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.notes li::before { content: "·"; margin-right: 6px; color: var(--teal); font-weight: 800; }
.two { display: grid; gap: 28px; }

/* 공지 */
.board { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.board li { border-bottom: 1px solid var(--line); }
.board a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 14px 4px; text-decoration: none; }
.board a:hover b { color: var(--teal-deep); text-decoration: underline; }
.board em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--teal-deep); background: var(--teal-tint); border-radius: 6px; padding: 2px 8px; }
.board em.hot { color: var(--warn); background: #FFEDE5; }
.board b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board time { color: var(--muted); font-size: 14px; }

/* 진료 과목 */
.subjects { display: grid; gap: 8px; }
.subject { background: var(--white); border: 1px solid var(--line); border-radius: 14px; }
.subject summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 700; font-size: 17px; }
.subject summary::-webkit-details-marker { display: none; }
.subject summary small { font-weight: 400; color: var(--muted); font-size: 14.5px; margin-left: auto; text-align: right; }
.subject summary::after { content: "+"; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--teal-tint); color: var(--teal-deep); display: flex; align-items: center; justify-content: center; }
.subject[open] summary::after { content: "−"; }
.subject[open] { border-color: var(--teal); }
.subject div { padding: 0 18px 18px; color: var(--muted); font-size: 15.5px; }
.subject ul { margin: 8px 0 0; padding-left: 18px; }

/* 의료진 */
.doctor { display: grid; gap: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.doctor img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 78% 20%; }
.doctor__body { padding: 0 20px 22px; }
.doctor h3 { font-size: 22px; font-weight: 800; }
.doctor h3 small { font-size: 15px; font-weight: 600; color: var(--teal); margin-left: 6px; }
.doctor dl { margin: 14px 0 0; display: grid; grid-template-columns: 64px 1fr; gap: 6px 12px; font-size: 15px; }
.doctor dt { color: var(--muted); }
.doctor dd { margin: 0; }

/* 건강검진 */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); padding: 10px 14px; border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--teal-deep); border-bottom-color: var(--teal); }
.panel[hidden] { display: none; }
.price { width: 100%; border-collapse: collapse; font-size: 15.5px; background: var(--white); }
.price th, .price td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.price thead th { background: var(--bg); color: var(--muted); font-weight: 600; font-size: 14px; }
.price td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.legal { margin-top: 14px; font-size: 13.5px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 12px 14px; }

/* 오시는 길 */
.cmap { position: relative; min-height: 260px; border-radius: 16px; background: #EAF1F4; overflow: hidden; }
.cmap::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, transparent 44%, #fff 44%, #fff 52%, transparent 52%), linear-gradient(90deg, transparent 62%, #fff 62%, #fff 68%, transparent 68%), repeating-linear-gradient(90deg, transparent 0 70px, rgba(14,124,134,.06) 70px 72px); }
.cmap__st { position: absolute; left: 14%; top: 36%; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 4px 9px; }
.cmap__pin { position: absolute; left: 65%; top: 30%; transform: translateX(-50%); background: var(--teal); color: #fff; font-size: 14px; font-weight: 700; border-radius: 10px; padding: 6px 12px; white-space: nowrap; box-shadow: 0 8px 20px rgba(14,124,134,.3); }
.cmap__pin::after { content: ""; position: absolute; left: 50%; bottom: -7px; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--teal); border-bottom: 0; }
.visit img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; }
.visit dl { margin: 0; display: grid; grid-template-columns: 76px 1fr; gap: 10px 14px; }
.visit dt { font-weight: 700; color: var(--teal-deep); }
.visit dd { margin: 0; }
.visit__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* 예약 페이지 */
.page-head { background: var(--bg); padding: 32px 0 28px; }
.page-head h1 { font-size: 30px; }
.page-head p { color: var(--muted); margin-top: 6px; }
.rv { display: grid; gap: 22px; padding: 32px 0 64px; }
.box { border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 0; min-width: 0; }
.box legend { font-size: 18px; font-weight: 800; padding: 0 6px; margin-left: -6px; }
.box legend span { color: var(--teal); margin-right: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg label, .kind { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; text-align: center; font-weight: 600; }
.seg input, .kind input, .tslot input { position: absolute; opacity: 0; }
.seg label:has(input:checked), .kind:has(input:checked) { border-color: var(--teal); background: var(--teal-tint); color: var(--teal-deep); }
.seg small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kind { text-align: left; }
.kind small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; }
.lbl { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-weight: 600; font-size: 15px; }
.lbl input, .lbl textarea, .lbl select { font: inherit; font-weight: 400; font-size: 16.5px; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; min-height: 48px; color: var(--navy); background: var(--white); }
.lbl input:focus, .lbl textarea:focus, .lbl select:focus, .tslot:has(input:focus-visible), .kind:has(input:focus-visible), .seg label:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 1px; }
.lbl small { font-weight: 400; color: var(--muted); font-size: 13.5px; }
.tslots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.tslot { border: 1.5px solid var(--line); border-radius: 8px; text-align: center; padding: 9px 0; cursor: pointer; font-size: 15px; font-weight: 600; }
.tslot:has(input:checked) { background: var(--teal); border-color: var(--teal); color: var(--white); }
.tslot:has(input:disabled) { background: var(--bg); color: #A9B4BD; cursor: not-allowed; }
.tnote { font-size: 14px; color: var(--muted); margin-top: 8px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-top: 4px; cursor: pointer; }
.agree input { width: 20px; height: 20px; accent-color: var(--teal); margin-top: 2px; flex-shrink: 0; }
.side { border-radius: 16px; background: var(--navy); color: #DCE6EE; padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.side h2 { color: var(--white); font-size: 19px; }
.side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 15px; }
.side dt { color: #93A4B4; }
.side dd { margin: 0; text-align: right; }
.side .btn { width: 100%; margin-top: 6px; background: #2BB3BD; color: var(--navy); }
.side small { color: #93A4B4; font-size: 13.5px; }
.err { color: #FCA5A5; font-weight: 700; font-size: 15px; }

/* 알림 · 꼬리 */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); background: var(--navy); color: var(--white); border-radius: 10px; padding: 12px 18px; font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.modal { border: 0; border-radius: 18px; padding: 26px 22px; max-width: 420px; width: calc(100% - 32px); color: var(--navy); }
.modal::backdrop { background: rgba(27,43,58,.55); }
.modal h2 { font-size: 22px; }
.modal p { color: var(--muted); margin: 8px 0; }
.modal ul { padding-left: 18px; margin: 12px 0 18px; }
.modal .btn { width: 100%; margin-top: 8px; }
.foot { background: var(--navy); color: #A7B6C4; padding: 34px 0 42px; font-size: 14.5px; }
.foot b { color: var(--white); font-size: 17px; display: block; margin-bottom: 6px; }
.foot a { color: #7FD6DC; }

@media (min-width: 820px) {
  .gnb { order: 0; width: auto; }
  .hero { padding: 48px 0 56px; }
  .hero .wrap { grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
  .hero h1 { font-size: 44px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .hero__photo img { aspect-ratio: 4 / 5; }
  .sec { padding: 72px 0; }
  .sec__head h2 { font-size: 32px; }
  .two { grid-template-columns: 1fr 1fr; gap: 48px; }
  .doctor { grid-template-columns: .9fr 1.1fr; align-items: center; }
  .doctor img { height: 100%; aspect-ratio: auto; min-height: 320px; }
  .doctor__body { padding: 28px 28px 28px 0; }
  .visit { align-items: center; }
  .rv { grid-template-columns: 1fr 340px; align-items: start; gap: 22px 32px; }
  .rv__main { display: grid; gap: 22px; }
  .rv__side { position: sticky; top: 90px; }
  .kinds { grid-template-columns: repeat(3, 1fr); }
  .tslots { grid-template-columns: repeat(6, 1fr); }
  .page-head h1 { font-size: 38px; }
}

/* 숨긴 선택 버튼이 화면 밖으로 밀려 나가지 않게 */
.seg label, .kind, .tslot { position: relative; }
