/* 온기 — 디자인 토큰과 공통 부품 "따뜻한 진료실"
   차분한 숲빛 초록(신뢰) 1색 + 따뜻한 상아 바탕 + 테라코타는 강조 표시에만.
   어르신 기준: 기본 글자 18px(1rem), 누르는 곳 48px 이상, 대비 WCAG AA 이상, 움직임 줄이기 존중.
   크기는 rem 으로만 — "글자 크게"(html.font-lg)를 누르면 화면 전체가 함께 커진다.
   공유 파일: 담당은 고치지 말고 자기 CSS(public/assets/css/<담당>.css)에 접두어 클래스로 추가. 색·간격은 var(--토큰) 만. */
:root {
  --bg: #FBF7F1;
  --surface: #FFFFFF;
  --surface-2: #F3ECE2;
  --surface-3: #FDFAF6;
  --ink: #1E2B29;
  --ink-2: #364442;
  --ink-3: #525F5C;
  --line: #E6DDD0;
  --line-strong: #BFB2A0;
  --accent: #1E6A5B;
  --accent-hover: #16564A;
  --accent-soft: #E2F0EB;
  --accent-ink: #134A3F;
  --warm: #B4532A;
  --warm-soft: #FBEADF;
  --warm-ink: #8A3B1A;
  --night: #1B2826;

  --ok: #1E6A5B;      --ok-soft: #E2F0EB;
  --info: #24507A;    --info-soft: #E5EEF7;
  --warn: #7F4D00;    --warn-soft: #FBEFD6;
  --danger: #A8261D;  --danger-soft: #FBE4E1;
  --muted: #59625F;   --muted-soft: #EEEBE6;

  --font-body: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --fs-xs: .833rem;  /* 15px */
  --fs-sm: .889rem;  /* 16px */
  --fs-md: 1rem;     /* 18px */
  --fs-lg: 1.111rem; /* 20px */
  --fs-h4: 1.222rem; /* 22px */
  --fs-h3: 1.444rem; /* 26px */
  --fs-h2: 1.778rem; /* 32px */
  --fs-h1: 2.444rem; /* 44px */

  --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4rem;
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(30, 43, 41, .07);
  --shadow: 0 1px 2px rgba(30, 43, 41, .06), 0 12px 28px -14px rgba(30, 74, 63, .30);
  --shadow-lg: 0 2px 6px rgba(30, 43, 41, .08), 0 24px 48px -18px rgba(30, 74, 63, .38);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-short: 150ms; --t-mid: 260ms; --t-long: 560ms;

  --tap: 3rem;          /* 48px 이상 누르는 영역 */
  --wrap: 1180px;
  --gutter: 2.222rem;   /* 40px */
  --header-h: 4.444rem; /* 80px */
  --quickbar-h: 0px;
  --focus: 0 0 0 3px var(--surface), 0 0 0 6px var(--warm);
}
html { font-size: 18px; }
html.font-lg { font-size: 21px; }
html.is-console { font-size: 16px; }
html.is-console.font-lg { font-size: 18px; }
@media (max-width: 760px) {
  :root { --gutter: 1rem; --header-h: 4rem; --fs-h1: 1.889rem; --fs-h2: 1.556rem; --fs-h3: 1.333rem; }
  html.font-lg { font-size: 20px; }
}

/* ── 기본 ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: var(--fs-md); line-height: 1.65; color: var(--ink); background: var(--bg); min-height: 100vh; overflow-x: hidden; word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4 { line-height: 1.32; font-weight: 700; letter-spacing: -0.015em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 12px; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.strong { font-weight: 700; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-8 { margin-top: var(--sp-2); } .mt-16 { margin-top: var(--sp-4); } .mt-24 { margin-top: var(--sp-5); } .mt-32 { margin-top: var(--sp-6); } .mt-48 { margin-top: var(--sp-7); }
.mb-8 { margin-bottom: var(--sp-2); } .mb-16 { margin-bottom: var(--sp-4); } .mb-24 { margin-bottom: var(--sp-5); }
.row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.stack-16 { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-24 { display: flex; flex-direction: column; gap: var(--sp-5); }
.grow { flex: 1 1 auto; min-width: 0; }
.ic { width: 1.222rem; height: 1.222rem; flex: 0 0 auto; vertical-align: middle; }
.ic-sm { width: 1rem; height: 1rem; }
.ic-lg { width: 1.667rem; height: 1.667rem; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: calc(680px + var(--gutter) * 2); }
.wrap-mid { max-width: calc(900px + var(--gutter) * 2); }
.section { padding-top: var(--sp-7); padding-bottom: var(--sp-7); }
.section-sm { padding-top: var(--sp-5); padding-bottom: var(--sp-5); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-h3); }
.section-head p { color: var(--ink-3); margin-top: var(--sp-1); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--accent); }

/* ── 버튼 (누르는 곳 48px 이상) ─────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 0 1.333rem; border-radius: var(--r-sm); font-weight: 700; font-size: var(--fs-md); line-height: 1.2; border: 2px solid transparent; transition: background var(--t-short) var(--ease), color var(--t-short) var(--ease), border-color var(--t-short) var(--ease), transform var(--t-short) var(--ease); text-align: center; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink-2); background: var(--surface-3); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn-soft:hover { background: #D2E8E0; }
.btn-warm { background: var(--warm); color: #fff; }
.btn-warm:hover { background: var(--warm-ink); }
.btn-ghost { background: transparent; color: var(--ink-2); padding: 0 .75rem; }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #87201A; }
.btn-sm { min-height: 2.444rem; padding: 0 .889rem; font-size: var(--fs-sm); }
.btn-lg { min-height: 3.556rem; padding: 0 1.778rem; font-size: var(--fs-lg); border-radius: var(--r); }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn.is-disabled { background: var(--surface-2); color: var(--ink-3); border-color: transparent; cursor: not-allowed; }
.btn-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.btn-row.end { justify-content: flex-end; }
.center-row { justify-content: center; }
.link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--accent-hover); }
.icon-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-sm); color: var(--ink-2); position: relative; transition: background var(--t-short) var(--ease); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ── 카드·표면 ─────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-5); }
.card-lg { padding: var(--sp-6); border-radius: var(--r-lg); }
.card-flat { background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4); }
.card-link { display: block; transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease); }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h2, .card h3 { font-size: var(--fs-lg); }
.divider { height: 1px; background: var(--line); border: 0; margin: var(--sp-4) 0; }
.ico-box { display: inline-grid; place-items: center; width: 2.667rem; height: 2.667rem; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); flex: 0 0 auto; }
.ico-box.lg { width: 3.556rem; height: 3.556rem; border-radius: 18px; }
.ico-box.lg .ic { width: 1.667rem; height: 1.667rem; }
.ico-box.warm { background: var(--warm-soft); color: var(--warm-ink); }
.ico-box.muted { background: var(--surface-2); color: var(--ink-2); }
.ico-box.danger { background: var(--danger-soft); color: var(--danger); }

/* ── 배지 ───────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; min-height: 1.778rem; padding: 0 .611rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.badge .ic { width: .889rem; height: .889rem; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-muted { background: var(--muted-soft); color: var(--muted); }
.badge-done { background: var(--ink); color: #fff; }
.badge-warm { background: var(--warm-soft); color: var(--warm-ink); }
.chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 1rem; border-radius: var(--r-pill); border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-current="page"], .chip.is-on, .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── 폼 (라벨은 위에, 큰 입력칸) ─────── */
.form { display: flex; flex-direction: column; gap: var(--sp-5); }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field > label, .field .label, .field > legend { font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
.req { color: var(--danger); margin-left: 4px; font-weight: 700; }
.opt-tag { color: var(--ink-3); font-weight: 500; font-size: var(--fs-sm); margin-left: 4px; }
.hint { font-size: var(--fs-sm); color: var(--ink-3); }
.input, .select, .textarea { width: 100%; min-height: 3.333rem; padding: .667rem .889rem; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-size: var(--fs-md); transition: border-color var(--t-short) var(--ease), box-shadow var(--t-short) var(--ease); appearance: none; -webkit-appearance: none; }
.textarea { min-height: 7.5rem; resize: vertical; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: #7A817E; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); background: #FFFBFA; }
.input[readonly], .input:disabled { background: var(--surface-2); color: var(--ink-3); }
.select { padding-right: 2.667rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23364442' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .889rem center; cursor: pointer; }
.input-group { display: flex; gap: var(--sp-2); }
.input-group .input { flex: 1; min-width: 0; }
.field-err { display: flex; align-items: flex-start; gap: 6px; font-size: var(--fs-sm); color: var(--danger); font-weight: 600; }
.field-err .ic { width: 1.111rem; height: 1.111rem; margin-top: 2px; }
.err-list { margin-top: 6px; padding-left: 1.2em; list-style: disc; }
.err-list a { text-decoration: underline; }
.check, .radio { display: flex; align-items: flex-start; gap: .667rem; min-height: var(--tap); padding: .611rem 0; cursor: pointer; line-height: 1.5; }
.check input, .radio input { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 1.444rem; height: 1.444rem; margin-top: 1px; border: 2px solid var(--line-strong); background: var(--surface) center/70% no-repeat; cursor: pointer; }
.check input { border-radius: 6px; }
.radio input { border-radius: 50%; }
.check input:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.radio input:checked { border-color: var(--accent); box-shadow: inset 0 0 0 5px var(--accent); }
.check input:focus-visible, .radio input:focus-visible { box-shadow: var(--focus); }
.radio input:checked:focus-visible { box-shadow: inset 0 0 0 5px var(--accent), var(--focus); }
.check-all { border-bottom: 1px solid var(--line); margin-bottom: 4px; font-weight: 700; }
/* 큰 선택 카드(라디오·체크를 카드로) — 어르신이 누르기 쉬운 크기 */
.opt-list { display: grid; gap: var(--sp-2); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--sp-3); }
.opt { position: relative; display: flex; align-items: center; gap: var(--sp-3); min-height: 3.556rem; padding: .778rem 1rem; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color var(--t-short) var(--ease), background var(--t-short) var(--ease); }
.opt:hover { border-color: var(--line-strong); }
.opt input { appearance: none; -webkit-appearance: none; width: 1.333rem; height: 1.333rem; border: 2px solid var(--line-strong); border-radius: 50%; flex: 0 0 auto; background: var(--surface) center/70% no-repeat; }
.opt input[type="checkbox"] { border-radius: 6px; }
.opt input:checked { border-color: var(--accent); box-shadow: inset 0 0 0 5px var(--accent); }
.opt input[type="checkbox"]:checked { box-shadow: none; background-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.opt input:focus-visible { box-shadow: var(--focus); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt .opt-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.opt .opt-main b { font-weight: 700; }
.opt .opt-main small { color: var(--ink-3); font-size: var(--fs-sm); }
.opt.is-disabled { opacity: .6; cursor: not-allowed; }
.switch { display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; min-height: var(--tap); }
.switch input { appearance: none; -webkit-appearance: none; width: 3.111rem; height: 1.778rem; border-radius: var(--r-pill); background: var(--line-strong); position: relative; transition: background var(--t-short) var(--ease); cursor: pointer; flex: 0 0 auto; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(1.778rem - 6px); height: calc(1.778rem - 6px); border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--t-mid) var(--ease); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(1.333rem); }
.switch input:focus-visible { box-shadow: var(--focus); }

/* ── 탭·목록·표 ───────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 1rem; font-weight: 700; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.list > li, .list > a, .list > .li { display: flex; align-items: center; gap: var(--sp-3); padding: 1rem 1.111rem; border-bottom: 1px solid var(--line); min-height: 3.556rem; }
.list > :last-child { border-bottom: 0; }
.list > a:hover { background: var(--surface-3); }
.list .li-chev { margin-left: auto; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .667rem 1.333rem; }
.kv dt { color: var(--ink-3); }
.kv dd { font-weight: 600; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: .667rem; } }
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table { min-width: 640px; }
.table th, .table td { padding: .778rem .889rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--surface-3); color: var(--ink-2); font-weight: 700; white-space: nowrap; font-size: var(--fs-sm); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-3); }
.table td.num, .table th.num { text-align: right; }
.table a.row-link { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.table a.row-link:hover { color: var(--accent); }

/* ── 상태 화면 ─────────────────────── */
.empty { text-align: center; padding: var(--sp-7) var(--sp-5); border: 2px dashed var(--line-strong); border-radius: var(--r); background: var(--surface-3); }
.empty .ico-box { width: 3.556rem; height: 3.556rem; border-radius: 18px; margin: 0 auto var(--sp-3); }
.empty .ico-box .ic { width: 1.556rem; height: 1.556rem; }
.empty h3 { font-size: var(--fs-lg); }
.empty p { color: var(--ink-3); margin-top: 6px; }
.empty .btn-row { justify-content: center; margin-top: var(--sp-4); }
.todo-meta { font-size: var(--fs-sm); margin-top: var(--sp-2); }
.notice { display: flex; gap: var(--sp-3); align-items: flex-start; padding: 1rem 1.111rem; border-radius: var(--r-sm); background: var(--info-soft); color: #173A5A; line-height: 1.6; border: 1px solid rgba(36, 80, 122, .2); }
.notice > .ic { margin-top: 3px; }
.notice-ok { background: var(--ok-soft); color: var(--accent-ink); border-color: rgba(30, 106, 91, .22); }
.notice-warn { background: var(--warn-soft); color: #5A3700; border-color: rgba(127, 77, 0, .22); }
.notice-danger { background: var(--danger-soft); color: #7A1B14; border-color: rgba(168, 38, 29, .22); }
.notice-warm { background: var(--warm-soft); color: var(--warm-ink); border-color: rgba(180, 83, 42, .22); }
.notice strong { font-weight: 700; }
.status-hero { text-align: center; padding: var(--sp-6) var(--sp-4); }
.status-hero .ico-box { margin: 0 auto var(--sp-4); }
.status-hero h1 { font-size: var(--fs-h3); }
.status-hero p { color: var(--ink-3); margin-top: var(--sp-2); }
.status-hero .btn-row { margin-top: var(--sp-5); }
.err-code { font-size: 4rem; line-height: 1; font-weight: 800; color: var(--line-strong); letter-spacing: -0.04em; }

/* ── 토스트·모달 ───────────────────── */
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(24px + var(--quickbar-h)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(480px, calc(100% - 32px)); }
.toast { display: flex; align-items: center; gap: 10px; padding: .889rem 1rem; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); animation: toast-in var(--t-mid) var(--ease); }
.toast-err { background: #7A1B14; }
.toast span { flex: 1; }
.toast-x { color: rgba(255, 255, 255, .85); width: 2.444rem; height: 2.444rem; display: grid; place-items: center; border-radius: 8px; }
.toast-x:hover { background: rgba(255, 255, 255, .14); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
dialog.modal { margin: auto; border: 0; padding: 0; border-radius: var(--r-lg); width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(27, 40, 38, .5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: 1.111rem 1.111rem 0; }
.modal-head h2 { font-size: var(--fs-h4); }
.modal-body { padding: 1rem 1.111rem; overflow-y: auto; }
.modal-foot { display: flex; gap: var(--sp-2); padding: 0 1.111rem 1.111rem; }
.modal-foot .btn { flex: 1; }
.sheet-page { min-height: 60vh; display: grid; place-items: center; padding: var(--sp-6) 0; }
.sheet { width: min(560px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }

/* ── 이동 표시·페이지·단계 ─────────── */
.crumbs { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--ink-3); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { width: 1rem; height: 1rem; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: var(--sp-5); flex-wrap: wrap; }
.pager a, .pager span { min-width: var(--tap); height: var(--tap); display: grid; place-items: center; border-radius: 12px; font-weight: 700; color: var(--ink-2); }
.pager a:hover { background: var(--surface-2); }
.pager .is-cur { background: var(--accent); color: #fff; }
.pager .is-off { color: var(--line-strong); }
.page-head { padding: var(--sp-6) 0 var(--sp-4); }
.page-head-row { display: flex; align-items: end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-h2); }
.page-head p { color: var(--ink-3); margin-top: 6px; font-size: var(--fs-lg); }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 600; min-height: var(--tap); }
.back-link:hover { color: var(--ink); text-decoration: underline; }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: var(--sp-2) 0 var(--sp-5); }
.steps li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; }
.steps .dot { position: relative; z-index: 1; width: 2.333rem; height: 2.333rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); font-weight: 800; border: 3px solid var(--bg); }
.steps .dot .ic { width: 1.111rem; height: 1.111rem; }
.steps li::before { content: ""; position: absolute; top: 1.167rem; transform: translateY(-50%); left: calc(-50% + 1.2rem); right: calc(50% + 1.2rem); height: 3px; border-radius: 2px; background: var(--line); }
.steps li:first-child::before { display: none; }
.steps li.is-done .dot { background: var(--accent); color: #fff; }
.steps li.is-done::before, .steps li.is-now::before { background: var(--accent); }
.steps li.is-now .dot { background: var(--warm); color: #fff; box-shadow: 0 0 0 5px var(--warm-soft); }
.steps li.is-done, .steps li.is-now { color: var(--ink); font-weight: 700; }
@media (max-width: 520px) { .steps .lbl { font-size: var(--fs-xs); } }

/* ── 통계 카드 ─────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--sp-3); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.111rem; }
.stat .k { font-size: var(--fs-sm); color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat .v { font-size: 1.778rem; line-height: 1.2; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: var(--fs-md); font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.stat .d { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: var(--sp-2); }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* ════ 환자·보호자 화면 틀 ═══════════════ */
.topline { background: var(--night); color: #E7EFEC; font-size: var(--fs-sm); }
.topline .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 2.667rem; }
.topline-now { display: flex; align-items: center; gap: 8px; min-width: 0; }
.now-dot { width: 10px; height: 10px; border-radius: 50%; background: #9AA8A4; flex: 0 0 auto; }
.now-dot.is-open { background: #6FD3A8; }
.now-dot.is-lunch, .now-dot.is-before { background: #F2C66D; }
.topline-actions { display: flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; }
.topline-tel { display: inline-flex; align-items: center; gap: 6px; min-height: 2.444rem; padding: 0 8px; border-radius: 8px; color: #fff; }
.topline-tel:hover { background: rgba(255, 255, 255, .1); }
.font-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 2.444rem; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .35); color: #fff; font-weight: 600; }
.font-toggle:hover, .font-toggle[aria-pressed="true"] { background: rgba(255, 255, 255, .14); }
@media (max-width: 760px) { .hide-s { display: none; } .topline-tel span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251, 247, 241, .96); border-bottom: 1px solid var(--line); }
.site-header > .wrap { min-height: var(--header-h); display: flex; align-items: center; gap: var(--sp-4); }
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); flex: 0 0 auto; }
.logo-mark { flex: none; width: 2.444rem; height: 2.444rem; background: url(../img/logo-mark.svg) center / contain no-repeat; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 1.444rem; font-weight: 800; letter-spacing: -0.03em; }
.logo-text small { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; margin-top: 3px; }
.gnb { display: flex; gap: 2px; margin-left: var(--sp-4); }
.gnb a { min-height: var(--tap); display: inline-flex; align-items: center; padding: 0 .778rem; border-radius: var(--r-sm); font-weight: 600; color: var(--ink-2); }
.gnb a:hover { background: var(--surface-2); color: var(--ink); }
.gnb a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 700; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.menu-btn { display: none; }
@media (max-width: 1100px) { .gnb { display: none; } .menu-btn { display: inline-grid; } }
@media (max-width: 760px) { .header-actions .hide-m { display: none; } .logo-text b { font-size: 1.333rem; } }
.site-menu { border-top: 1px solid var(--line); background: var(--surface); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.site-menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); padding: var(--sp-5) 0 var(--sp-6); }
.site-menu-grid > div { display: flex; flex-direction: column; }
.site-menu-title { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-3); margin-bottom: 6px; }
.site-menu a { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 .5rem; border-radius: var(--r-sm); font-weight: 600; }
.site-menu a:hover { background: var(--surface-2); }
.site-menu a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
@media (max-width: 760px) { .site-menu-grid { grid-template-columns: 1fr; gap: var(--sp-4); } }
.main { min-height: 60vh; }
.site-footer { margin-top: var(--sp-8); padding: var(--sp-6) 0 var(--sp-7); border-top: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-sm); }
.site-footer .f-top { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: var(--sp-5); }
.site-footer .f-clinic { display: flex; flex-direction: column; gap: 6px; }
.site-footer .f-tel a { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-h4); font-weight: 800; color: var(--ink); min-height: var(--tap); }
.site-footer .f-title { font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.site-footer .f-links { display: flex; flex-direction: column; }
.site-footer .f-links a { min-height: 2.444rem; display: inline-flex; align-items: center; color: var(--ink-2); text-decoration: underline; text-decoration-color: transparent; }
.site-footer .f-links a:hover { color: var(--ink); text-decoration-color: currentColor; }
.site-footer .f-biz { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line-strong); line-height: 1.8; color: var(--ink-3); }
@media (max-width: 900px) { .site-footer .f-top { grid-template-columns: 1fr; } }
.hours-mini { display: flex; flex-direction: column; gap: 4px; }
.hours-mini > div { display: grid; grid-template-columns: 5rem 1fr; gap: 8px; }
.hours-mini dt { color: var(--ink-3); }
.hours-mini dd { font-weight: 600; }
.hours-mini dd small { display: block; font-weight: 500; color: var(--ink-3); font-size: var(--fs-xs); }
/* 모바일 하단 빠른 메뉴: 전화·예약·문진·내 정보 */
.quickbar { display: none; }
@media (max-width: 760px) {
  :root { --quickbar-h: 4.222rem; }
  body.has-quickbar { padding-bottom: calc(var(--quickbar-h) + env(safe-area-inset-bottom)); }
  .quickbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: calc(var(--quickbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -6px 18px -12px rgba(30, 43, 41, .35); }
  .quickbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-2); }
  .quickbar a .ic { width: 1.444rem; height: 1.444rem; }
  .quickbar a[aria-current="page"] { color: var(--accent); }
  .quickbar a:first-child { color: var(--warm-ink); }
}

/* ── 공통 화면 조각(여러 담당이 함께 쓰는 것) ─── */
.hours-table th, .hours-table td { text-align: center; }
.hours-table th:first-child, .hours-table td:first-child { text-align: left; }
.is-closed { color: var(--danger); font-weight: 700; }
.avatar { display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; font-size: var(--fs-h4); flex: 0 0 auto; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 6rem; height: 6rem; font-size: var(--fs-h2); }
.prose { line-height: 1.85; color: var(--ink-2); }
.prose h2 { font-size: var(--fs-h4); color: var(--ink); margin: var(--sp-6) 0 var(--sp-2); }
.prose h3 { font-size: var(--fs-lg); color: var(--ink); margin: var(--sp-5) 0 var(--sp-2); }
.prose p, .prose ul, .prose ol, .prose table { margin: var(--sp-2) 0; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose table { border: 1px solid var(--line); }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .667rem; text-align: left; }
.prose th { background: var(--surface-3); }
.callout-phone { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.callout-phone .grow p { color: var(--ink-3); font-size: var(--fs-sm); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: var(--sp-6); align-items: start; }
.two-col .aside { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } .two-col .aside { position: static; } }
/* 날짜·시간 고르기(예약·변경 화면 공용) */
.date-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.667rem, 1fr)); gap: var(--sp-2); }
.date-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 4.889rem; padding: var(--sp-2); border: 2px solid var(--line-strong); border-radius: 14px; background: var(--surface); text-align: center; line-height: 1.25; }
.date-btn b { font-size: var(--fs-lg); }
.date-btn small { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.date-btn:hover { border-color: var(--ink-2); }
.date-btn[aria-current="date"], .date-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.date-btn[aria-current="date"] small, .date-btn.is-on small { color: rgba(255, 255, 255, .9); }
.date-btn.is-off { background: var(--surface-2); border-color: transparent; color: var(--ink-3); cursor: not-allowed; }
.date-btn .dow-sat { color: var(--info); }
.date-btn.is-on .dow-sat { color: #fff; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.222rem, 1fr)); gap: var(--sp-2); }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.slot span { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 3.889rem; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-weight: 800; font-size: var(--fs-lg); line-height: 1.2; }
.slot span small { font-weight: 600; font-size: var(--fs-xs); color: var(--ink-3); }
.slot:hover span { border-color: var(--ink-2); }
.slot input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot input:checked + span small { color: rgba(255, 255, 255, .9); }
.slot input:focus-visible + span { box-shadow: var(--focus); }
.slot input:disabled + span { background: var(--surface-2); border-color: transparent; color: var(--ink-3); cursor: not-allowed; }
.slot input:disabled + span b { text-decoration: line-through; }
.slot input:disabled { cursor: not-allowed; }
.sticky-cta { position: sticky; bottom: calc(12px + var(--quickbar-h)); z-index: 20; margin-top: var(--sp-5); padding: var(--sp-3); background: rgba(255, 255, 255, .97); border: 1px solid var(--line-strong); border-radius: var(--r); box-shadow: var(--shadow); display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.sticky-cta .sum { font-weight: 700; }
.sticky-cta .btn { margin-left: auto; }
@media (max-width: 520px) { .sticky-cta .btn { width: 100%; margin-left: 0; } }

/* ── 움직임 — 움직임 줄이기 설정이면 끔 ─── */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(14px); animation: rise var(--t-long) var(--ease) forwards; }
  .rise.d1 { animation-delay: 80ms; } .rise.d2 { animation-delay: 160ms; } .rise.d3 { animation-delay: 240ms; }
  .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--t-long) var(--ease), transform var(--t-long) var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
@media print { .topline, .site-header, .site-footer, .quickbar, .toasts { display: none !important; } body { background: #fff; } }
