/* 기본 토큰·레이아웃·상단바. 화면별 스타일은 find.css(병원 찾기), pages.css(나머지 탭) */
:root {
  --bg: #f2f6f9; --surface: #ffffff; --surface-2: #e9f0f6; --fg: #13283b; --fg-2: #3a4e60; --muted: #66798a;
  --line: #dbe5ed; --line-2: #c8d6e2;
  --acc: #1b7fc4; --acc-2: #145f94; --acc-soft: #e2f1fb; --acc-fg: #ffffff; --ink: #10263a;
  --warn: #b45309; --warn-soft: #fff4e0; --danger: #c2410c; --danger-soft: #fdeee6;
  --info-soft: #eaf1fb; --info: #1d4ed8;
  --shadow: 0 1px 2px rgba(16, 38, 58, .05), 0 4px 16px rgba(16, 38, 58, .06);
  --shadow-lg: 0 10px 30px rgba(16, 38, 58, .12);
  --r: 16px; --r-sm: 10px; --topbar: 108px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b131b; --surface: #121c26; --surface-2: #182533; --fg: #e4edf5; --fg-2: #c0cfdc; --muted: #90a3b5;
    --line: #223242; --line-2: #2d4154;
    --acc: #6cc0f5; --acc-2: #9ad3f8; --acc-soft: #132b3d; --acc-fg: #06141f; --ink: #eaf4fb;
    --warn: #f0b35a; --warn-soft: #3a2d14; --danger: #f08a5d; --danger-soft: #3d2117;
    --info-soft: #18263d; --info: #8fb4f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --shadow-lg: 0 10px 30px rgba(0, 0, 0, .45);
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 12px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--font); letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--acc); text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 99; border-radius: 8px; }

/* 상단바 */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--acc); color: var(--acc-fg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 1.08rem; letter-spacing: -.02em; }
.brand-text small { font-size: .72rem; color: var(--muted); }
.top-caution { font-size: .82rem; font-weight: 600; color: var(--warn); background: var(--warn-soft); padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.tabs::-webkit-scrollbar { display: none; }
[role=tab] { flex: 0 0 auto; border: 0; background: none; padding: 10px 12px 12px; min-height: 44px; font-size: .93rem; font-weight: 500; color: var(--muted); border-bottom: 2.5px solid transparent; }
[role=tab]:hover { color: var(--fg); }
[role=tab][aria-selected=true] { color: var(--fg); font-weight: 700; border-color: var(--fg); }

.banner { background: var(--warn-soft); padding: 12px 14px; border-radius: var(--r-sm); margin: 12px 0; }
.banner.err { background: var(--danger-soft); }

.foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 calc(32px + env(safe-area-inset-bottom)); font-size: .85rem; color: var(--fg-2); }
.foot p { margin: 4px 0; }

/* 공통 조각 */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2); white-space: nowrap; }
.chip.ok { background: var(--acc-soft); color: var(--acc-2); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font-size: .88rem; font-weight: 600; text-decoration: none; }
.btn:hover { border-color: var(--fg-2); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--acc-fg); }
.btn.ghost { border-color: transparent; background: var(--surface-2); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
