/* 온케어 병원 찾기 — 화면 시안(그린 톤: 병원찾기 · 사용자 화면 시안) 적용본
   토큰/컴포넌트는 시안 CSS 를 기준으로 하되, 다크 모드·접근성(44px 터치, 포커스 링)을 유지한다. */

:root {
  --bg: #f5f7f2;
  --surface: #ffffff;
  --surface-2: #eef3ec;
  --ink: #172b24;
  --muted: #52665e;
  --line: #dce5dd;
  --brand: #196a56;
  --brand-strong: #123e33;
  --on-brand: #ffffff;
  --brand-soft: #e6f1e9;
  --brand-soft-ink: #196a56;
  --brand-line: #b9d1c0;
  --focus: #327d68;
  --hero: #154137;
  --warm: #9f4a2a; --warm-soft: #fbece3;
  --mint-bg: #e4f0e8;  --mint-ink: #216750;
  --honey-bg: #f6ecdb; --honey-ink: #815a2e;
  --lake-bg: #e7edf8;  --lake-ink: #426087;
  --rose-bg: #f6e9e8;  --rose-ink: #8a5557;
  --shadow: 0 10px 28px rgba(20, 60, 50, .09);
  --radius: 19px;
  --pad: clamp(18px, 4.5vw, 38px);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --tap: 44px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1a16; --surface: #16231e; --surface-2: #1b2b25;
    --ink: #e6f1ea; --muted: #a8bdb4; --line: #2c3f37;
    --brand: #4fb597; --brand-strong: #7dd0b6; --on-brand: #06201a;
    --brand-soft: #1e3a31; --brand-soft-ink: #9be0c8; --brand-line: #3a5a4d; --focus: #9be0c8;
    --warm: #f0a47f; --warm-soft: #3b2a21;
    --mint-bg: #1e3a31;  --mint-ink: #9be0c8;
    --honey-bg: #3a3022; --honey-ink: #e5c28f;
    --lake-bg: #22304a;  --lake-ink: #a9c4ee;
    --rose-bg: #3d2a2b;  --rose-ink: #e6b2b4;
    --shadow: 0 10px 28px rgba(0, 0, 0, .45);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Pretendard, 'Malgun Gothic', 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.55; letter-spacing: -.01em; font-synthesis: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.ic.lg { width: 28px; height: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.stack { display: grid; gap: var(--sp-3); }

/* ---------- Shell: 상단(데스크톱) ---------- */
.app-shell { max-width: 1080px; margin: 0 auto; min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 10; height: 76px; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: var(--tap); font-size: 22px; font-weight: 700; letter-spacing: -.055em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.brand-mark .ic { width: 22px; height: 22px; }
.top-nav { display: flex; align-items: center; gap: clamp(17px, 3vw, 36px); white-space: nowrap; }
.top-nav a { min-height: var(--tap); display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; color: var(--muted); }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--brand); }
.top-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--brand); }
.top-actions { display: flex; align-items: center; gap: var(--sp-2); }
.saved-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 600; white-space: nowrap; }
.saved-link .ic { width: 18px; height: 18px; color: var(--brand); }
.saved-link:hover { border-color: var(--brand-line); }

.page { display: none; padding: 0 var(--pad) 72px; }
.page.active { display: block; animation: page-in .22s var(--ease); }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page h1:focus, .page h2:focus { outline: none; }

/* ---------- 제목줄 ---------- */
.eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--brand); }
.page-heading { display: flex; gap: var(--sp-3); align-items: center; min-height: 64px; margin: 0 0 var(--sp-3); }
.page-heading .eyebrow { display: none; }
.page-heading h1 { font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.05em; }
.page-heading p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.back-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--brand); display: grid; place-items: center; flex: none; }
.back-btn .ic { width: 21px; height: 21px; }
.back-btn:hover { border-color: var(--brand-line); }

/* ---------- 버튼 ---------- */
.primary-btn, .outline-btn { min-height: var(--tap); padding: 0 var(--sp-4); border-radius: 11px; font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; transition: background .16s var(--ease), border-color .16s var(--ease), opacity .16s; }
.primary-btn { background: var(--brand); color: var(--on-brand); }
.primary-btn:hover { background: var(--brand-strong); color: var(--on-brand); }
.outline-btn { color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line); }
.outline-btn:hover { border-color: var(--brand); }
.outline-btn[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.primary-btn:active, .outline-btn:active, .quick-card:active, .chip:active { opacity: .85; }
.primary-btn[disabled], .outline-btn[disabled] { opacity: .55; cursor: not-allowed; }
.text-link { min-height: 40px; padding: 0 4px; color: var(--brand); font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }

/* ---------- 홈: 히어로 ---------- */
.search-hero { position: relative; isolation: isolate; overflow: hidden; border-radius: 30px; background: var(--hero); color: #fff; min-height: 315px; display: grid; align-items: center; padding: 38px clamp(24px, 5vw, 56px); }
.hero-inner { position: relative; z-index: 2; width: min(100%, 510px); }
.search-hero h1 { font-size: clamp(36px, 5.8vw, 65px); letter-spacing: -.075em; line-height: 1.07; font-weight: 700; }
.search-hero p { color: #d3e7d9; font-size: 17px; margin-top: 13px; line-height: 1.4; }
.search-hero .search-box { margin-top: 24px; width: min(100%, 470px); border-color: transparent; box-shadow: 0 6px 20px rgba(11, 41, 43, .22); background: #fff; color: #172b24; }
.search-hero .search-box .ic { color: #196a56; }
.search-hero .search-box input { color: #172b24; }
.search-hero .search-box input::placeholder { color: #52665e; }
.hero-art { position: absolute; inset: -75px -46px -60px auto; width: 62%; background: linear-gradient(115deg, #154137 7%, #205c4d 65%, #287060 100%); overflow: hidden; z-index: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
.hero-art i { position: absolute; display: block; border: 1px solid rgba(183, 221, 194, .33); border-radius: 32px; width: 76%; height: 32%; transform: rotate(-23deg); }
.hero-art i:nth-child(1) { top: 8%; left: 20%; width: 88%; height: 30%; }
.hero-art i:nth-child(2) { top: 28%; left: 21%; width: 88%; height: 34%; }
.hero-art i:nth-child(3) { top: 50%; left: 13%; width: 90%; height: 36%; }
.hero-art i:nth-child(4) { top: 13%; left: 54%; width: 19%; height: 79%; }
.hero-art i:nth-child(5) { top: 0; left: 38%; width: 21%; height: 93%; }
.art-pin { position: absolute; top: 32%; left: 55%; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 34px; background: #d6e9b9; color: #195443; transform: rotate(-10deg); box-shadow: 10px 18px 0 rgba(13, 70, 61, .56), 0 0 0 14px rgba(214, 233, 185, .15); }
.art-pin .ic { width: 63px; height: 63px; stroke-width: 1.45; }
.art-dot { position: absolute; width: 13px; height: 13px; border: 2px solid #154137; border-radius: 50%; background: #dcaa72; box-shadow: 0 0 0 7px rgba(235, 190, 142, .13); }
.art-dot-first { top: 60%; left: 36%; } .art-dot-second { top: 53%; left: 84%; background: #c3dfb0; }

/* 검색창 (홈 히어로·검색 화면 공용) */
.search-box { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 5px 6px 5px 13px; color: var(--brand); }
.search-box .ic { width: 20px; height: 20px; }
.search-box input { min-width: 0; width: 100%; border: 0; background: transparent; height: 44px; color: var(--ink); outline: 0; font-size: 16px; }
.search-box input::placeholder { color: var(--muted); }
.search-box:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.search-box .primary-btn { height: 42px; min-width: 61px; padding: 0 14px; border-radius: 9px; flex: none; }
.search-box.large { margin-bottom: var(--sp-3); }

/* 바로가기 4색 카드 */
.quick-menu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 15px 0 31px; }
.quick-card { display: grid; align-content: start; justify-items: start; gap: 7px; min-height: 122px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); padding: 14px 16px; text-align: left; transition: transform .16s, border-color .16s; }
.quick-card:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.quick-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; }
.quick-icon .ic { width: 21px; height: 21px; }
.quick-card strong { font-weight: 700; font-size: 17px; letter-spacing: -.03em; }
.quick-description { font-size: 14px; color: var(--muted); line-height: 1.35; word-break: keep-all; }
.tone-mint { background: var(--mint-bg); color: var(--mint-ink); }
.tone-honey { background: var(--honey-bg); color: var(--honey-ink); }
.tone-lake { background: var(--lake-bg); color: var(--lake-ink); }
.tone-rose { background: var(--rose-bg); color: var(--rose-ink); }

/* 섹션 머리 */
.content-section + .content-section { margin-top: 32px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 13px; }
.section-heading h2 { font-size: 29px; letter-spacing: -.058em; line-height: 1.1; }
.section-heading p { font-size: 14px; margin-top: 5px; color: var(--muted); }

/* ---------- 병원 목록 ---------- */
.hospital-list { display: grid; gap: 11px; }
.list-card { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 14px; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px; overflow: hidden; transition: border-color .16s; }
.list-card:hover { border-color: var(--brand-line); }
.hospital-visual { min-width: 0; min-height: 90px; height: 100%; border-radius: 12px; display: grid; place-items: center; background: var(--mint-bg); color: var(--mint-ink); }
.hospital-visual .ic { width: 36px; height: 36px; stroke-width: 1.5; }
.hospital-info { display: flex; flex-direction: column; min-width: 0; padding: 3px 0; }
.kind-badge { align-self: flex-start; margin-bottom: 5px; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
.hospital-info h3 { font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -.045em; word-break: keep-all; overflow-wrap: anywhere; }
.hospital-info p { font-size: 14px; line-height: 1.35; color: var(--muted); margin-top: 5px; word-break: keep-all; overflow-wrap: anywhere; }
.meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 13px; }
.meta-row span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.meta-row .ic { width: 14px; height: 14px; color: var(--brand); }
.list-card > .ic { align-self: center; color: var(--muted); width: 18px; height: 18px; }

/* ---------- 지역 ---------- */
.region-list, .sgg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.region-btn { min-height: 58px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; font-size: 17px; font-weight: 600; transition: border-color .16s; }
.region-btn:hover { border-color: var(--brand-line); }
.region-btn .ic { width: 17px; height: 17px; color: var(--brand); }
.region-btn small { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 6px; }

/* ---------- 필터·툴바 ---------- */
.toolbar-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; justify-content: space-between; margin-bottom: 4px; }
.filter-chips { display: flex; align-items: center; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 3px 0 13px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; white-space: nowrap; flex: none; }
.chip:hover { border-color: var(--brand-line); }
.chip[aria-pressed="true"] { background: var(--brand-soft); color: var(--brand); font-weight: 700; border-color: var(--brand-line); }
.result-count { font-size: 15px; color: var(--muted); padding: 0 2px 10px; }
.select { min-height: var(--tap); padding: 0 var(--sp-3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 14px; }
.more-btn { display: flex; margin: var(--sp-5) auto 0; }

/* ---------- 빈 화면·오류·로딩 ---------- */
.empty-state, .error-box { text-align: center; margin: 12px 0; padding: 36px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; color: var(--muted); line-height: 1.5; }
.empty-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto var(--sp-3); }
.empty-state h2, .error-box h2 { font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.empty-state .primary-btn, .error-box .outline-btn { margin-top: var(--sp-4); }
.skeleton { height: 112px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.locate-card { display: flex; gap: var(--sp-4); align-items: center; padding: var(--sp-5); background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 18px; margin: 12px 0; }
.locate-card p { color: var(--muted); font-size: 15px; }
.locate-card .btns { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
#seo-fallback { padding: var(--sp-5) var(--pad); max-width: 720px; margin: 0 auto; }
.js #seo-fallback { display: none; }

/* ---------- 상세 ---------- */
.detail-top { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 10px; align-items: center; min-height: 64px; margin-bottom: 10px; }
.detail-top .title { text-align: center; font-size: 20px; font-weight: 700; letter-spacing: -.05em; }
.detail-top .back-btn { grid-area: 1 / 1; }
.detail-top .title { grid-area: 1 / 2; }
.detail-top .fav-btn { grid-area: 1 / 3; }
.fav-btn { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--brand); display: grid; place-items: center; }
.fav-btn[aria-pressed="true"] { color: #b4476a; }
.detail-overview { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: grid; grid-template-columns: 38% minmax(0, 1fr); align-items: stretch; }
.detail-overview .hospital-visual { aspect-ratio: auto; min-height: 170px; border-radius: 0; }
.detail-overview .hospital-visual .ic { width: 64px; height: 64px; stroke-width: 1.3; }
.detail-head { padding: 22px; }
.detail-head h1 { font-size: clamp(26px, 5vw, 34px); letter-spacing: -.055em; line-height: 1.2; margin: 4px 0 6px; word-break: keep-all; }
.detail-head .addr { color: var(--muted); font-size: 16px; }
.detail-head .meta-row { margin-top: 12px; padding-top: 0; }
.detail-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 4px; margin: 15px 0 12px; }
.detail-tabs button { min-height: 42px; white-space: nowrap; font-size: 14px; color: var(--muted); border-radius: 8px; }
.detail-tabs button[aria-pressed="true"] { color: var(--brand); font-weight: 700; background: var(--surface); }
.detail-section { padding: 18px; margin-bottom: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.detail-section h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.035em; }
.detail-section h3 .count { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 6px; }
.detail-section p { font-size: 15px; line-height: 1.55; color: var(--muted); }
.review-empty { display: flex; gap: var(--sp-4); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.detail-foot { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-foot > :only-child { grid-column: 1 / -1; }
.detail-foot .primary-btn, .detail-foot .outline-btn { min-height: 46px; }
.info-grid { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px var(--sp-4); font-size: 14px; margin: 0; }
.info-grid dt { color: var(--muted); } .info-grid dd { margin: 0; word-break: keep-all; overflow-wrap: anywhere; }
.info-grid a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { padding: 4px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13px; }
.hours-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours-table th { text-align: left; font-weight: 500; color: var(--muted); width: 72px; padding: 4px 0; }
.hours-table td { padding: 4px 0; }
.hours-table tr.closed td { color: var(--muted); }

/* ---------- 로그인·폼 ---------- */
.login-card { max-width: 440px; margin: var(--sp-6) auto; padding: var(--sp-6); border: 1px solid var(--line); border-radius: 22px; background: var(--surface); text-align: center; }
.login-card h2 { font-size: 24px; letter-spacing: -.05em; margin: var(--sp-3) 0 6px; }
.login-card p { color: var(--muted); font-size: 14px; margin-bottom: var(--sp-5); }
.login-card .stack > button, .login-card .stack > a { width: 100%; }
.field { text-align: left; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field .select { width: 100%; }
.field-error, .form-error { color: var(--warm); font-size: 13px; margin: 4px 0 0; text-align: left; }
.form-error { padding: var(--sp-2) var(--sp-3); border-radius: 10px; background: var(--warm-soft); }

/* ---------- 푸터·토스트·하단 탭 ---------- */
.site-footer { padding: var(--sp-5) var(--pad) var(--sp-6); color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); line-height: 1.7; }
.toast { position: fixed; left: 50%; bottom: 100px; z-index: 30; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 14px; background: #123e33; color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.bottom-nav { display: none; }

/* ---------- 넓은 화면 ---------- */
@media (min-width: 651px) {
  .home-list .hospital-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .home-list .list-card { grid-template-columns: 1fr; gap: 10px; padding: 9px; }
  .home-list .hospital-visual { aspect-ratio: 2.4; height: auto; }
  .home-list .hospital-info { padding: 2px 5px 6px; }
  .home-list .list-card > .ic { display: none; }
  .home-list .locate-card { grid-column: 1 / -1; }
  .page > .hospital-list, #lbox .hospital-list { max-width: 800px; }
}

/* ---------- 모바일 ---------- */
@media (max-width: 650px) {
  .top-nav { display: none; }
  .topbar { height: 63px; }
  .brand { font-size: 21px; }
  .saved-link { padding: 0; width: 42px; }
  .saved-link span { display: none; }
  .page { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .search-hero { min-height: 245px; border-radius: 23px; padding: 22px 19px; }
  .search-hero h1 { font-size: clamp(30px, 8.5vw, 44px); }
  .search-hero p { font-size: 15px; margin-top: 8px; }
  .search-hero .search-box { margin-top: 17px; }
  .hero-art { width: 74%; right: -36px; }
  .art-pin { width: 62px; height: 62px; top: 30%; left: 64%; border-radius: 18px; }
  .art-pin .ic { width: 37px; height: 37px; }
  .quick-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 23px; }
  .quick-card { min-height: 95px; padding: 11px 10px; gap: 3px; grid-template-columns: 36px minmax(0, 1fr); align-content: center; align-items: center; column-gap: 8px; border-radius: 15px; }
  .quick-card strong { font-size: 15px; }
  .quick-description { grid-column: 2; font-size: 13px; }
  .quick-icon { grid-row: span 2; width: 36px; height: 36px; }
  .section-heading h2 { font-size: 24px; }
  .page-heading { min-height: 63px; }
  .page-heading h1 { font-size: 21px; }
  .region-list, .sgg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .region-btn { font-size: 16px; }
  .detail-overview { grid-template-columns: 1fr; }
  .detail-overview .hospital-visual { min-height: 120px; }
  .detail-head { padding: 18px; }
  .info-grid { grid-template-columns: 96px minmax(0, 1fr); }
  .locate-card { flex-direction: column; align-items: flex-start; }
  .detail-page { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .detail-foot { position: fixed; z-index: 14; bottom: calc(64px + env(safe-area-inset-bottom)); left: 0; right: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 8px var(--pad); margin: 0; }
  .bottom-nav { position: fixed; z-index: 15; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; background: var(--surface); border-top: 1px solid var(--line); padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); box-shadow: 0 -3px 12px rgba(12, 68, 42, .05); }
  .nav-item { min-height: 52px; display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; border-radius: 10px; }
  .nav-item .ic { width: 20px; height: 20px; }
  .nav-item[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .hero-inner { width: 100%; }
}
@media (max-width: 345px) {
  .quick-card { grid-template-columns: 1fr; }
  .quick-icon, .quick-description { grid-column: auto; grid-row: auto; }
  .list-card { grid-template-columns: 73px minmax(0, 1fr) auto; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 후기 · 병원소식 ---------- */
.chip { display: inline-flex; align-items: center; }
.stars { color: #e0a526; letter-spacing: 1px; font-size: 15px; white-space: nowrap; }
.stars .off { color: var(--line); }
.feed-list { display: grid; gap: 11px; }
.feed-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; min-width: 0; }
.feed-hospital { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.04em; margin-bottom: 6px; color: var(--brand); }
.feed-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 8px; }
.feed-title { font-size: 18px; letter-spacing: -.04em; line-height: 1.3; }
.feed-date { font-size: 13px; margin: 2px 0 8px; }
.feed-body { font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; word-break: keep-all; }
.feed-body.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.text-btn { min-height: 36px; padding: 0 2px; font-size: 14px; font-weight: 700; color: var(--brand); }
.text-btn.danger { color: var(--warm); }
.feed-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.photos { display: grid; gap: 6px; margin-bottom: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photos.n1 { grid-template-columns: 1fr; }
.photos a { display: block; border-radius: 12px; overflow: hidden; background: var(--brand-soft); aspect-ratio: 4 / 3; }
.photos.n1 a { aspect-ratio: 16 / 10; }
.photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rv-summary { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin: 4px 0 16px; padding: 14px; background: var(--surface-2); border-radius: 14px; }
.rv-summary .avg { display: grid; justify-items: center; gap: 2px; }
.rv-summary .avg b { font-size: 34px; line-height: 1; letter-spacing: -.05em; }
.rv-summary .dist { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.rv-summary .dist > div { display: grid; grid-template-columns: 26px 1fr 22px; gap: 8px; align-items: center; }
.rv-summary .dist i { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rv-summary .dist u { display: block; height: 100%; background: #e0a526; }
.review-form { margin-top: 12px; }
.review-form textarea, #reportDlg textarea { width: 100%; resize: vertical; padding: 10px 12px; min-height: 110px; line-height: 1.5; }
.rate-pick { display: flex; gap: 2px; }
.rate-pick button { width: 44px; height: 44px; font-size: 30px; line-height: 1; color: var(--line); border-radius: 10px; }
.rate-pick button.on { color: #e0a526; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
#reportDlg { border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--surface); color: var(--ink); width: min(420px, calc(100% - 32px)); box-shadow: 0 16px 60px rgba(20, 37, 45, .35); }
#reportDlg::backdrop { background: rgba(13, 40, 35, .45); }
#reportDlg h2 { font-size: 22px; letter-spacing: -.04em; }
#reportDlg .select { width: 100%; }
.detail-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 650px) { .detail-tabs button { font-size: 13px; } .rv-summary { gap: 14px; } }
@media (min-width: 651px) {
  .photos { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 560px; }
  .photos a, .photos.n1 a { aspect-ratio: 1; }
  .photos.n1 { grid-template-columns: minmax(0, 260px); }
  .photos.n2 { grid-template-columns: repeat(2, minmax(0, 200px)); }
  .photos.n3 { grid-template-columns: repeat(3, minmax(0, 180px)); }
}

/* 로그인 칩 */
.login-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 14px; font-weight: 700; white-space: nowrap; max-width: 190px; }
.login-chip:hover { background: var(--brand-strong); }
.login-chip.on { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--brand-line); }
.login-chip .nick { overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.login-chip em { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--brand); color: var(--on-brand); }
.nav-item span { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 650px) { .login-chip { padding: 0 11px; max-width: 150px; } .login-chip .nick { max-width: 64px; } }
.fav-btn[aria-pressed="true"] .ic { fill: currentColor; }
