/* 토큰: kayak.co.kr 실측(docs/research/kayak-benchmark.md) + 자체 포인트 컬러(에메랄드) */
:root {
  --brand: #0b9f6e;
  --brand-ink: #087a55;
  --brand-grad: linear-gradient(135deg, #14b47f 0%, #0b8f63 100%);
  --brand-soft: #e7f6f0;
  --ink: #192024;
  --ink-2: #363f45;
  --ink-3: #5a6872;
  --ink-4: #9ba8b0;
  --link: #007799;
  --bg: #fafbfc;
  --card: #fff;
  --surface: #f0f3f5;
  --line: #d9e2e8;
  --night: #4c4fd8;
  --sun: #d9480f;
  --open: #14884c;
  --closed: #8a96a0;
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 12px;
  --sh: 0 3px 6px rgba(25, 32, 36, 0.12), 0 -1px 4px rgba(25, 32, 36, 0.04);
  --sh-lg: 0 12px 30px rgba(25, 32, 36, 0.16), 0 4px 8px rgba(25, 32, 36, 0.06);
  --font: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
}
*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
small { font-size: 12px; color: var(--ink-3); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 헤더 */
.gh { position: sticky; top: 0; z-index: 10; background: #fff; border-bottom: 1px solid var(--line); }
.gh-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 28px; height: 28px; color: var(--brand); }
.gh-nav { display: flex; gap: 4px; }
.gh-nav a { color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: var(--r); }
.gh-nav a:hover, .gh-nav a[aria-current] { background: var(--surface); text-decoration: none; color: var(--ink); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 12px 0 0; margin: 0; font-size: 13px; color: var(--ink-3); }
.crumbs li + li::before { content: '›'; margin-right: 4px; color: var(--ink-4); }
.crumbs a { color: var(--ink-3); }

/* 히어로 */
.hero { background: radial-gradient(1200px 400px at 80% -10%, #d6f5e8 0%, transparent 60%), linear-gradient(180deg, #f2fbf7 0%, var(--bg) 100%); padding: 56px 0 40px; }
.hero h1 { font-size: 40px; max-width: 720px; }
.hero-sub { color: var(--ink-3); margin: 10px 0 0; }
.hero-list { padding: 20px 0 8px; }
.hero-list h1 { font-size: 30px; }

/* 검색 박스(kayak 검색바) */
.search { margin-top: 28px; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 16px; max-width: 880px; }
.seg { display: inline-flex; background: var(--surface); border-radius: var(--r); padding: 4px; margin-bottom: 12px; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 6px 18px; border-radius: 6px; font-weight: 600; font-size: 15px; color: var(--ink-3); cursor: pointer; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: var(--sh); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }
.search-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; }
.field { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); padding: 8px 12px; border: 2px solid transparent; }
.field:focus-within { border-color: var(--brand); background: #fff; }
.field span { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.field input, .field select { border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 2px 0; outline: none; width: 100%; }
.btn-search { border: 0; border-radius: var(--r); background: var(--brand-grad); color: #fff; font: 600 16px var(--font); padding: 0 28px; min-height: 52px; cursor: pointer; }
.btn-search:hover { filter: brightness(1.05); }

/* 빠른 조건·링크 그리드 */
.quick, .region-hub { padding: 28px 16px 0; }
.quick h2, .region-hub h2, .more h2 { margin: 24px 0 12px; font-size: 20px; }
.quick-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-grid a { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; color: var(--ink); height: 100%; }
.quick-grid a:hover { box-shadow: var(--sh); text-decoration: none; border-color: transparent; }
.quick-grid b { display: block; font-size: 16px; }
.quick-grid span { color: var(--ink-3); font-size: 13px; }
.link-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 16px; }
.link-grid li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #edf1f4; font-size: 14px; }
.link-grid span { color: var(--ink-4); font-size: 12px; flex: none; }
.link-grid.big li { font-size: 16px; padding: 10px 0; }
.link-grid[data-collapsed] { display: none; }

/* 요약·통계 */
.summary { padding-top: 8px; }
.summary > p { color: var(--ink-2); max-width: 820px; margin: 4px 0 16px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 0 0 8px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.stat dt { font-size: 12px; color: var(--ink-3); }
.stat dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.stat dd small { display: block; font-size: 12px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 결과 레이아웃(kayak: 좌측 필터 + 결과 카드) */
.results-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; margin-top: 20px; align-items: start; }
.filters { position: sticky; top: 76px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px; font-size: 14px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.filters legend { font-weight: 700; margin-bottom: 6px; }
.filters label { display: flex; gap: 8px; align-items: center; padding: 4px 0; cursor: pointer; }
.filters input { accent-color: var(--brand); width: 16px; height: 16px; }
.filters-note { color: var(--ink-4); font-size: 12px; margin: 0; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sort-note { color: var(--ink-3); font-size: 13px; margin: 0; }
.rc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rc { display: flex; gap: 16px; justify-content: space-between; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 16px; }
.rc[hidden] { display: none; }
.rc-main { min-width: 0; }
.rc-name { font-size: 18px; font-weight: 700; }
.rc-name a { color: var(--ink); }
.rc-type { color: var(--ink-3); font-size: 13px; margin: 2px 0 0; }
.rc-dept { font-size: 14px; color: var(--ink-2); margin: 6px 0 0; }
.rc-hours { font-size: 14px; margin: 6px 0 0; color: var(--ink-2); }
.rc-chips, .d-chips, .near-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.rc-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; justify-content: center; flex: none; width: 150px; }
.btn-cta, .btn-tel, .btn-ghost { display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r); font-weight: 600; font-size: 15px; min-height: 44px; padding: 0 16px; text-align: center; }
.btn-cta { background: var(--brand-grad); color: #fff; }
.btn-tel { border: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.btn-cta:hover, .btn-tel:hover, .btn-ghost:hover { text-decoration: none; filter: brightness(0.97); }
.chip { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface); color: var(--ink-2); }
.chip-night, .chip-latenight { background: #ecedff; color: var(--night); }
.chip-sun { background: #fff0e8; color: var(--sun); }
.chip-24h { background: #1f2a30; color: #fff; }
.chip-parking { background: #e8f2fb; color: #135d93; }
.chip-allyear { background: var(--brand-soft); color: var(--brand-ink); }
.open-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-right: 6px; }
.open-badge.is-open { background: #e3f4ea; color: var(--open); }
.open-badge.is-closed { background: var(--surface); color: var(--closed); }
.more-note { color: var(--ink-3); font-size: 14px; }

/* 표·FAQ·안내 */
.breakdown { margin-top: 32px; overflow-x: auto; }
.breakdown h2 { margin-bottom: 12px; }
table { border-collapse: collapse; width: 100%; background: #fff; border-radius: var(--r); overflow: hidden; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #edf1f4; }
thead th { background: var(--surface); font-size: 13px; color: var(--ink-3); font-weight: 600; }
.faq { margin-top: 32px; }
.faq h2 { margin-bottom: 8px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details div { color: var(--ink-2); margin-top: 6px; font-size: 15px; }
.notice p { background: #fff8e6; border: 1px solid #f3e1b0; color: #6b5414; border-radius: var(--r); padding: 12px 16px; font-size: 14px; margin: 24px 0 0; }
.more { margin-top: 32px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { font: 600 14px var(--font); border: 1px solid var(--line); background: #fff; color: var(--ink-2); padding: 8px 14px; border-radius: 99px; cursor: pointer; }
.tabs button[aria-selected='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }
.about-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.about-strip > div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.about-strip h2 { font-size: 18px; margin-bottom: 6px; }
.about-strip p { margin: 0; color: var(--ink-2); font-size: 15px; }
.prose { max-width: 760px; }
.prose h2 { margin: 28px 0 8px; font-size: 20px; }
.prose li { margin: 4px 0; }

/* 상세 */
.detail { padding-top: 16px; }
.d-head { background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh); padding: 24px; }
.d-kicker { color: var(--brand-ink); font-weight: 700; font-size: 14px; margin: 0 0 4px; }
.d-sum { color: var(--ink-2); margin: 8px 0 0; }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.d-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; min-width: 0; }
.d-card h2 { font-size: 18px; margin-bottom: 12px; }
.hours th { width: 72px; font-weight: 600; }
.hours td small { margin-left: 8px; }
.hours tr.is-today { background: var(--brand-soft); }
.hours tr.is-today th::after { content: ' 오늘'; color: var(--brand-ink); font-size: 11px; }
.fine { font-size: 12px; color: var(--ink-4); margin: 8px 0 0; }
.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 112px 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid #edf1f4; font-size: 15px; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; min-width: 0; }
.d-member, .d-near { margin-top: 28px; }
.d-member h2, .d-near h2 { font-size: 20px; margin-bottom: 12px; }
.pill-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-links a { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; font-size: 14px; color: var(--ink-2); }
.near-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.near-list[data-collapsed] { display: none; }
.near-list li { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; font-size: 14px; }
.near-list li a { font-weight: 700; display: block; color: var(--ink); }
.near-list li > span { color: var(--ink-3); font-size: 13px; }

/* 푸터 */
.gf { margin-top: 56px; background: #fff; border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 13px; color: var(--ink-3); }
.gf-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.gf-links h2 { font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.gf-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.gf-links a, .gf-meta a { color: var(--ink-3); }
.gf-meta p { margin: 4px 0; }

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .results-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .filters fieldset { margin: 0; display: flex; flex-wrap: wrap; gap: 0 12px; }
  .filters legend { width: 100%; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .d-grid, .about-strip { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  h1, .hero-list h1 { font-size: 24px; }
  .hero { padding: 32px 0 24px; }
  .hero h1 { font-size: 28px; }
  .search-row { grid-template-columns: 1fr; }
  .btn-search { min-height: 48px; }
  .rc { flex-direction: column; }
  .rc-side { width: auto; flex-direction: row; }
  .rc-side > * { flex: 1; }
  .gh-nav a { padding: 8px; font-size: 14px; }
  .gf-links { grid-template-columns: 1fr; }
  .d-head { padding: 18px; }
  .link-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.all-list { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
.all-list summary { font-weight: 600; cursor: pointer; }
.all-list table { margin-top: 8px; }
.btn-tel { white-space: nowrap; font-size: 13px; padding: 0 10px; }
.hours th { white-space: nowrap; width: 96px; }
.chip-er { background: #fdecec; color: #c92a2a; }
.chip-kidsnight { background: #fff4e0; color: #b35c00; }
.chip-specialty { background: #f1ecff; color: #5f3dc4; }
.chip-mri { background: #e9f1ff; color: #1c5bb8; }
.d-section { margin-top: 16px; }
.d-section ul.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.d-section ul.plain li { background: var(--surface); border-radius: 99px; padding: 4px 12px; font-size: 14px; }
.d-src { font-size: 12px; color: var(--ink-4); margin: 8px 0 0; }
