/* 소리결이비인후과 — N2 주간 시간표 그리드 히어로. 종이색 바탕 + 먹색 괘선 + 진료 중 초록 / 휴진 주홍 */
:root {
  --paper: #f5f3ee;
  --card: #fffdf9;
  --ink: #17212b;
  --ink-2: #4a5560;
  --line: #d4d6d3;
  --line-strong: #17212b;
  --green: #1d6a50;
  --green-soft: #e3efe8;
  --red: #b4462b;
  --red-soft: #f6e5df;
  --mono: 'Nanum Gothic Coding', ui-monospace, monospace;
  --sans: 'Nanum Gothic', -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --w: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.7 var(--sans); word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2 { margin: 0; font-weight: 800; letter-spacing: -0.02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 헤더 */
.top { position: sticky; top: 0; z-index: 50; background: rgba(245, 243, 238, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top__in { max-width: var(--w); margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 15px; font-weight: 700; }
.brand__name { font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.top__tel { font-family: var(--mono); font-weight: 700; font-size: 16px; text-decoration: none; padding: 7px 14px; border: 1.5px solid var(--ink); border-radius: 4px; white-space: nowrap; }
.top__tel span { font-family: var(--sans); font-size: 13px; margin-right: 4px; color: var(--ink-2); }
.top__tel:hover { background: var(--ink); color: var(--paper); }
.top__tel:hover span { color: inherit; }

/* 히어로 = 주간 시간표 */
.board { max-width: var(--w); margin: 0 auto; padding: 44px 24px 56px; }
.board__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.board__kicker { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); letter-spacing: .02em; }
.board h1 { font-size: 22px; line-height: 1.3; }
.board h1 span { display: block; margin-top: 4px; font-size: 44px; line-height: 1.15; }

.now { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; min-width: 260px; }
.now strong { display: block; font-size: 17px; }
.now small { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.now__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ink-2); }
.now[data-state="on"] .now__dot { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.now[data-state="on"] strong { color: var(--green); }
.now[data-state="soon"] .now__dot { background: #c98a1a; box-shadow: 0 0 0 4px #f5ead3; }
.now[data-state="off"] .now__dot { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.now[data-state="off"] strong { color: var(--red); }

.grid-wrap { background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 6px; padding: 6px 6px 18px; }
.week { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; }
.week caption { caption-side: top; text-align: left; padding: 12px 14px 10px; font-size: 13.5px; color: var(--ink-2); }
.week th, .week td { border-bottom: 1px solid var(--line); padding: 0; }
.week thead th { padding: 12px 4px; font-size: 18px; font-weight: 800; border-bottom: 2px solid var(--ink); }
.week thead th.week__corner, .week tbody th { width: 76px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.week thead th[data-d="0"] { color: var(--red); font-size: 15px; }
.week td { height: 92px; font-family: var(--mono); font-size: 15px; color: var(--ink-2); position: relative; vertical-align: middle; }
.week td b { display: block; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.week td b::after { content: ''; display: block; width: 14px; height: 1px; margin: 5px auto 4px; background: currentColor; opacity: .5; }
.week td em { display: block; margin-top: 6px; font: normal 700 12.5px/1.35 var(--sans); color: var(--green); }
.week td + td, .week th + td, .week thead th + th { border-left: 1px solid var(--line); }
.week__lunch th, .week__lunch td { height: 40px; font-size: 13.5px; background: repeating-linear-gradient(-45deg, transparent 0 6px, rgba(23, 33, 43, .045) 6px 12px); }
.week__lunch td { font-family: var(--sans); color: var(--ink-2); }
.week__none { color: var(--line) !important; font-size: 20px !important; }
.week__off span { display: inline-block; padding: 6px 14px; border: 1.5px solid var(--red); border-radius: 99px; color: var(--red); font: 800 16px/1 var(--sans); }
.week__off { background: var(--red-soft); }
.week__night b { color: var(--ink); }
.mark { position: absolute; top: 8px; right: 10px; font-style: normal; font-family: var(--sans); font-size: 14px; color: var(--red); font-weight: 700; }
.foot-notes .mark { position: static; margin-right: 2px; }

/* 오늘 열 강조 */
.week thead th.is-today { background: var(--ink); color: var(--paper); border-radius: 4px 4px 0 0; position: relative; }
.week thead th.is-today::after { content: '오늘'; display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: #b7d9c9; margin-top: 2px; }
.week td.is-today { background: var(--green-soft); box-shadow: inset 2px 0 0 var(--ink), inset -2px 0 0 var(--ink); }
.week td.is-today b { color: var(--green); }
.week td.week__off.is-today { background: var(--red-soft); }
.week__lunch td.is-today-row { background-color: transparent; }

.foot-notes { list-style: none; margin: 14px 14px 0; padding: 14px 0 0; border-top: 1px dashed var(--line); font-size: 14.5px; color: var(--ink-2); display: grid; gap: 4px; }
.foot-notes strong { color: var(--ink); }

.board__act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.board__addr { flex-basis: 100%; margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card); font-weight: 700; font-size: 15.5px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--main { background: var(--ink); color: var(--paper); font-family: var(--sans); }
.btn--main:hover { background: var(--green); border-color: var(--green); }

/* 모바일 전용 블록 — PC에선 숨김 */
.duo, .rows { display: none; }

/* 공통 섹션 머리 */
section:not(.board) { max-width: var(--w); margin: 0 auto; padding: 56px 24px; border-top: 1.5px solid var(--ink); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.sec-head h2 { font-size: 28px; }
.sec-head p { margin: 0; font-size: 15px; color: var(--ink-2); max-width: 520px; }

/* 진료 과목 — 괘선 목록 2단 */
.care__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin: 0; }
.care__list > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.care__list dt { font-weight: 800; font-size: 19px; }
.care__list dt span { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); font-weight: 400; }
.care__list dd { margin: 0; font-size: 15.5px; color: var(--ink-2); }

/* 공지 */
.stamp { font-family: var(--mono); font-size: 13.5px !important; }
.notice__list { list-style: none; margin: 0; padding: 0; }
.notice__list li { display: grid; grid-template-columns: 110px 96px 1fr; gap: 16px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.notice__list time { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.notice__list p { margin: 0; font-size: 15.5px; }
.pill { justify-self: start; padding: 2px 10px; border: 1px solid var(--ink-2); border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.pill--off { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* 사진 */
.inside { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: end; }
.inside figure { margin: 0; }
.inside img { width: 100%; border-radius: 4px; object-fit: cover; }
.inside__a img { aspect-ratio: 4 / 3; }
.inside__b img { aspect-ratio: 1 / 1; }
.inside figcaption { margin-top: 10px; font-size: 14px; color: var(--ink-2); }

/* 오시는 길 */
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.visit h2 { font-size: 28px; margin-bottom: 16px; }
.visit__addr { margin: 0 0 12px; font-size: 19px; font-weight: 700; line-height: 1.55; }
.copy { min-height: 36px; padding: 0 14px; border: 1px solid var(--ink-2); border-radius: 4px; background: transparent; font: 700 13.5px var(--sans); color: var(--ink); cursor: pointer; }
.copy:hover { background: var(--ink); color: var(--paper); }
.visit__info { margin: 22px 0; }
.visit__info > div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.visit__info dt { font-weight: 700; }
.visit__info dd { margin: 0; color: var(--ink-2); }
.visit__act { display: flex; flex-wrap: wrap; gap: 10px; }
.visit__img { margin: 0; }
.visit__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }

/* 푸터 */
.foot { background: var(--ink); color: #c9cfd4; }
.foot__in { max-width: var(--w); margin: 0 auto; padding: 40px 24px 48px; font-size: 14px; }
.foot__in p { margin: 0 0 10px; }
.foot__name { color: var(--paper); font-weight: 800; font-size: 16px; }
.foot a { color: var(--paper); }
.foot__small { color: #8d97a0; font-size: 13px; }

/* 퀵메뉴 — PC 오른쪽 세로 */
.quick { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 60; display: flex; flex-direction: column; width: 82px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px; overflow: hidden; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 11px 4px; text-decoration: none; border-bottom: 1px solid var(--line); text-align: center; }
.quick a:last-child { border-bottom: 0; }
.quick b { font-size: 13.5px; }
.quick span { font-size: 11px; color: var(--ink-2); line-height: 1.3; }
.quick__tel { background: var(--ink); color: var(--paper); }
.quick__tel span { color: #b7d9c9; font-family: var(--mono); font-size: 10px; letter-spacing: -0.03em; }
.quick a:not(.quick__tel):hover { background: var(--green-soft); }
.quick__top b { font-family: var(--mono); font-size: 12px; }
@media (max-width: 1260px) and (min-width: 721px) { .quick { right: 8px; width: 74px; } }
@media (max-width: 1240px) and (min-width: 721px) { .board, section:not(.board), .top__in, .foot__in { padding-right: 104px; } }

/* 태블릿 */
@media (max-width: 960px) {
  .nav { display: none; }
  .care__list { grid-template-columns: 1fr; }
  .board h1 span { font-size: 36px; }
}

/* 모바일 */
@media (max-width: 720px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); font-size: 15.5px; }
  .top__in { padding: 10px 16px; gap: 12px; }
  .brand__name { font-size: 16px; }
  .brand__mark { width: 28px; height: 28px; font-size: 13px; }
  .top__tel { margin-left: auto; font-size: 14px; padding: 6px 10px; }
  .top__tel span { display: none; }

  .board { padding: 26px 16px 36px; }
  .board__head { flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 16px; }
  .board h1 { font-size: 18px; }
  .board h1 span { font-size: 30px; }
  .now { min-width: 0; }

  .duo:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
  .duo__card { padding: 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 6px; }
  .duo__card--today { border-color: var(--ink); background: var(--green-soft); }
  .duo__card p { margin: 0; }
  .duo__tag { font-size: 13px; font-weight: 800; }
  .duo__tag span { font-weight: 400; color: var(--ink-2); }
  .duo__time { margin: 6px 0 4px !important; font: 700 19px/1.25 var(--mono); letter-spacing: -0.04em; }
  .duo__note { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }

  .grid-wrap { padding: 4px 14px 16px; }
  .week { display: none; }
  .rows { display: block; list-style: none; margin: 0; padding: 0; }
  .rows li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
  .rows li > span:first-child { font-weight: 800; }
  .rows li > span:last-child { font-family: var(--mono); letter-spacing: -0.03em; }
  .rows small { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--green); font-weight: 700; letter-spacing: 0; }
  .rows li.is-off > span:last-child { color: var(--red); font-family: var(--sans); font-weight: 700; }
  .rows li.is-today { background: var(--ink); color: var(--paper); margin: 0 -14px; padding: 12px 16px; border-bottom-color: var(--ink); }
  .rows li.is-today small { color: #b7d9c9; }
  .rows small.is-warn { color: var(--red); }
  .rows li.is-today small.is-warn { color: #f0b3a2; }
  .rows li.is-today.is-off > span:last-child { color: #f0b3a2; }
  .foot-notes { margin: 12px 0 0; font-size: 13.5px; }

  .board__act { display: grid; grid-template-columns: 1fr 1fr; }
  .board__act .btn--main { grid-column: 1 / -1; }
  .btn { padding: 0 12px; font-size: 15px; }

  section:not(.board) { padding: 40px 16px; }
  .sec-head { flex-direction: column; gap: 6px; margin-bottom: 18px; }
  .sec-head h2, .visit h2 { font-size: 23px; }
  .sec-head p { font-size: 14.5px; }
  .care__list > div { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
  .care__list dt span { display: inline; margin-right: 8px; }
  .care__list dd { font-size: 14.5px; }
  .notice__list li { grid-template-columns: auto 1fr; gap: 6px 10px; }
  .notice__list p { grid-column: 1 / -1; font-size: 14.5px; }
  .inside { grid-template-columns: 1fr; gap: 24px; }
  .inside__b img { aspect-ratio: 4 / 3; }
  .visit { grid-template-columns: 1fr; gap: 24px; }
  .visit__addr { font-size: 17px; }
  .visit__info > div { grid-template-columns: 76px 1fr; font-size: 14.5px; }
  .visit__img img { aspect-ratio: 4 / 3; }
  .foot__in { padding: 32px 16px 28px; font-size: 13.5px; }

  /* 퀵메뉴 → 하단 고정 바 */
  .quick { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: auto; flex-direction: row; border: 0; border-top: 1.5px solid var(--ink); border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
  .quick a { flex: 1; min-height: 56px; justify-content: center; border-bottom: 0; border-right: 1px solid var(--line); padding: 8px 2px; }
  .quick a:last-child { border-right: 0; }
  .quick__top { display: none !important; }
  .quick b { font-size: 14px; }
  .quick span { font-size: 10.5px; }
  .quick__tel span { font-size: 10px; }
}
@media (max-width: 720px) { .quick .quick__hours { border-right: 0; } }
