/* 동두천시치매안심센터 — 공통 스타일 (모바일 우선) */
:root {
  --green: #246B45;
  --green-2: #2F8456;
  --green-dark: #1A5234;
  --sage: #DDECDD;
  --sage-2: #EEF6EE;
  --blue: #E7F2FC;
  --blue-ink: #1F5F99;
  --orange: #F28A2E;
  --orange-ink: #B35A0C;
  --orange-soft: #FEEBD9;
  --cream: #FFF9F1;
  --ink: #17233B;
  --ink-2: #3D4A63;
  --muted: #5B6578;
  --line: #E4E0D8;
  --white: #FFFFFF;
  --red: #C0392B;
  --red-soft: #FDECEA;
  --violet: #EDE7FB;
  --violet-ink: #5B3FA8;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 10px rgba(23, 35, 59, .07);
  --focus: 0 0 0 3px #fff, 0 0 0 6px #1F5F99;
  --tap: 52px;
  --fs: 18px;
  font-size: var(--fs);
}
html.text-large { --fs: 21px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  word-break: keep-all;
  overflow-wrap: anywhere;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; }
.skip-link:focus { top: 8px; }
.ico { width: 1.4em; height: 1.4em; flex: none; }

/* ---------- 레이아웃 ---------- */
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 249, 241, .96);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 8px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-height: 48px; flex: 1; min-width: 0; }
.logo-mark { width: 38px; height: 30px; flex: none; }
.brand-name { font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 48px; min-height: 48px; padding: 0 10px;
  border: 1.5px solid var(--line); background: #fff; border-radius: 12px; cursor: pointer;
  font-size: .82rem; font-weight: 700; color: var(--ink);
}
.icon-btn[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.icon-btn .ico { width: 1.35em; height: 1.35em; }
main { padding-bottom: 120px; min-height: 60vh; }

/* 메뉴 서랍 */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(23, 35, 59, .45); z-index: 60; display: none; }
.drawer-backdrop.open { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); z-index: 61;
  background: var(--cream); padding: 16px; overflow-y: auto;
  transform: translateX(105%); transition: transform .22s ease;
  box-shadow: -6px 0 24px rgba(0, 0, 0, .15);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.drawer-head h2 { margin: 0; font-size: 1.1rem; }
.drawer nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 56px; padding: 0 12px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 700;
}
.drawer nav a[aria-current="page"] { color: var(--green); background: var(--sage-2); border-radius: 10px; }

/* 하단 고정 메뉴 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(23, 35, 59, .06);
}
.bottom-nav ul { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; display: grid; grid-template-columns: repeat(5, 1fr); }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; text-decoration: none; color: var(--muted); font-size: .78rem; font-weight: 700; line-height: 1.2;
  text-align: center; padding: 4px 2px;
}
.bottom-nav a .ico { width: 1.65rem; height: 1.65rem; }
.bottom-nav a[aria-current="page"] { color: var(--green); }
.bottom-nav a[aria-current="page"] .ico { stroke-width: 2.3; }
html.text-large .bottom-nav a { font-size: .7rem; }

/* ---------- 공통 요소 ---------- */
h1, h2, h3 { line-height: 1.3; letter-spacing: -.02em; }
.page-title { font-size: 1.6rem; margin: 24px 0 8px; font-weight: 800; }
.page-lead { color: var(--ink-2); margin: 0 0 16px; }
.card {
  background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, .03); margin: 0 0 14px;
}
.card h2, .card h3 { margin: 0 0 8px; }
.card.sage { background: var(--sage-2); }
.card.blue { background: var(--blue); }
.card.orange { background: #FFF1E4; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 800; margin: 24px 0 12px; }
.section-title .ico { color: var(--orange); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 10px 20px; border-radius: 14px;
  border: 2px solid transparent; font-weight: 800; font-size: 1.02rem; cursor: pointer;
  text-decoration: none; text-align: center; line-height: 1.3;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: #DE7718; }
.btn-line { background: #fff; color: var(--green); border-color: var(--green); }
.btn-danger { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-block { width: 100%; }
.btn-lg { min-height: 64px; font-size: 1.18rem; border-radius: 18px; }
.btn[disabled], .btn[aria-disabled="true"] { background: #E6E6E6; color: #6B6B6B; border-color: #E6E6E6; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.badge-green { background: var(--sage); color: var(--green-dark); }
.badge-blue { background: var(--blue); color: var(--blue-ink); }
.badge-violet { background: var(--violet); color: var(--violet-ink); }
.badge-orange { background: var(--orange-soft); color: var(--orange-ink); }
.badge-gray { background: #EEE; color: #555; }
.badge-red { background: var(--red-soft); color: var(--red); }
.needs-setting { display: inline-block; color: var(--orange-ink); background: var(--orange-soft); border-radius: 8px; padding: 0 8px; font-weight: 700; font-size: .92em; }
.sample-tag { display: inline-block; background: #FFE08A; color: #6A4A00; font-weight: 800; font-size: .75rem; padding: 1px 8px; border-radius: 6px; vertical-align: middle; }
.notice-box { display: flex; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--blue); color: var(--ink); margin: 0 0 14px; }
.notice-box.warn { background: #FFF1E4; }
.notice-box.error { background: var(--red-soft); color: #7A1E14; }
.notice-box.ok { background: var(--sage-2); }
.notice-box .ico { margin-top: 2px; }
.muted { color: var(--muted); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; }
.dl dt { color: var(--muted); font-weight: 700; }
.dl dd { margin: 0; font-weight: 600; }
.loading { display: flex; align-items: center; gap: 12px; padding: 24px 8px; color: var(--ink-2); font-weight: 700; }
.spinner { width: 28px; height: 28px; border: 4px solid var(--sage); border-top-color: var(--green); border-radius: 50%; animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .drawer { transition: none; } }

/* 설정 전 / 샘플 배너 */
.top-banner { background: #FFE08A; color: #4A3500; font-weight: 700; padding: 10px 16px; text-align: center; font-size: .9rem; }
.top-banner.error { background: var(--red-soft); color: #7A1E14; }

/* ---------- 메인: HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #E9F4FB 0%, #EAF4E6 100%);
  min-height: 330px;
}
.hero-photo {
  position: absolute; right: 0; top: 0; bottom: 0; width: 62%;
  background-size: cover; background-position: center top;
}
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #EAF3F3 0%, rgba(234, 243, 243, .7) 22%, rgba(234, 243, 243, 0) 55%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 26px; padding-bottom: 72px; }
.hero-kicker { font-size: .95rem; color: var(--ink-2); margin: 0 0 6px; max-width: 13em; }
.hero h1 { font-size: 2.05rem; line-height: 1.22; font-weight: 900; margin: 0 0 10px; color: #12301F; max-width: 7.4em; letter-spacing: -.04em; }
.hero p.hero-sub { margin: 0 0 18px; font-weight: 600; max-width: 13.5em; color: var(--ink); text-shadow: 0 0 8px rgba(255,255,255,.9); }
.hero .btn { box-shadow: 0 4px 14px rgba(36, 107, 69, .3); }

/* 바로가기 2×3 */
.quick { position: relative; z-index: 2; margin-top: -52px; }
.quick-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border-radius: 22px; box-shadow: 0 4px 18px rgba(23, 35, 59, .09); overflow: hidden;
}
.quick-grid a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 118px; padding: 14px 4px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: .92rem; text-align: center; line-height: 1.25;
  border-right: 1px solid #EFEBE4; border-bottom: 1px solid #EFEBE4;
}
.quick-grid a:nth-child(3n) { border-right: 0; }
.quick-grid a:nth-child(n+4) { border-bottom: 0; }
.quick-grid .q-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; }
.quick-grid .q-ico .ico { width: 32px; height: 32px; }
.q-green { background: var(--sage); color: var(--green); }
.q-pink { background: #FBE1DD; color: #C2453A; }
.q-blue { background: #DCEBFB; color: #2463A6; }
.q-violet { background: var(--violet); color: var(--violet-ink); }
.q-yellow { background: #FDF0CF; color: #A86A00; }
.q-mint { background: #D6EFE0; color: #1F6B40; }
html.text-large .quick-grid a { font-size: .82rem; }

/* 검사 안내 카드 (메인) */
.exam-two { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .exam-two { grid-template-columns: 1fr 1fr; } }
.link-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-height: 64px; }
.link-card .grow { flex: 1; min-width: 0; }
.step-link {
  display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 10px 12px; min-height: 52px;
  text-decoration: none; color: var(--ink); font-weight: 700; margin-top: 8px; border: 1px solid #DCE8F4;
}
.step-link .grow { flex: 1; }

/* 상담전화 */
.call-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.call-card .call-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.call-card .call-ico .ico { width: 30px; height: 30px; }
.call-card .grow { flex: 1 1 160px; min-width: 0; }
.call-number { font-size: 1.7rem; font-weight: 900; color: var(--green); letter-spacing: -.01em; text-decoration: none; display: inline-block; min-height: 48px; line-height: 48px; }
.site-footer { padding: 18px 0 8px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); margin-top: 18px; }
.site-footer .brand-name { font-size: .95rem; }

/* ---------- 예약 단계 ---------- */
.stepper { margin: 16px 0 14px; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); }
.stepper-now { font-size: 1.25rem; font-weight: 900; color: var(--green); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stepper-now small { font-size: .9rem; color: var(--muted); font-weight: 700; }
.stepper ol { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 10px 0 0; padding: 0; }
.stepper li { height: 8px; border-radius: 99px; background: #E8E4DC; }
.stepper li.done { background: var(--green-2); }
.stepper li.now { background: var(--orange); }

.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 16px; margin: 0 0 12px;
  cursor: pointer; min-height: 88px; box-shadow: var(--shadow);
}
.choice:hover { border-color: var(--green-2); }
.choice .c-ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.choice .c-ico .ico { width: 30px; height: 30px; }
.choice .grow { flex: 1; min-width: 0; }
.choice .c-title { font-weight: 900; font-size: 1.15rem; display: block; }
.choice .c-desc { color: var(--ink-2); font-size: .92rem; display: block; }

/* 달력 */
.cal { background: #fff; border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cal-head h3 { margin: 0; font-size: 1.25rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-weight: 800; font-size: .85rem; color: var(--muted); padding: 4px 0; }
.cal-wd.sun { color: var(--red); }
.cal-wd.sat { color: var(--blue-ink); }
.cal-day {
  min-height: 56px; border-radius: 12px; border: 2px solid transparent; background: #F4F2EE; color: #9A9A9A;
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; font-weight: 800; font-size: 1rem; line-height: 1.1;
}
.cal-day .tag { font-size: .62rem; font-weight: 700; margin-top: 3px; white-space: nowrap; overflow: hidden; max-width: 100%; text-overflow: ellipsis; }
html.text-large .cal-day .tag { font-size: .55rem; }
.cal-day.empty { background: transparent; }
button.cal-day { cursor: pointer; }
.cal-day.open { background: var(--sage); color: var(--green-dark); border-color: #B9D8BF; }
.cal-day.open:hover { border-color: var(--green); }
.cal-day.full { background: #FCE9E6; color: #A1453A; }
.cal-day.holiday { background: #FFF0E3; color: #B2590B; }
.cal-day.selected { background: var(--green); color: #fff; border-color: var(--green-dark); }
.cal-day.today { box-shadow: inset 0 0 0 2px var(--orange); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: .85rem; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }

/* 시간 버튼 */
.time-group h3 { font-size: 1.1rem; margin: 18px 0 8px; }
.time-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.time-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 68px;
  border-radius: 14px; border: 2px solid #B9D8BF; background: #fff; cursor: pointer; padding: 6px;
}
.time-btn .t { font-size: 1.3rem; font-weight: 900; color: var(--ink); }
.time-btn .s { font-size: .85rem; font-weight: 800; color: var(--green); }
.time-btn:hover { border-color: var(--green); background: var(--sage-2); }
.time-btn[disabled] { background: #F2F0EC; border-color: #E6E2DA; cursor: not-allowed; }
.time-btn[disabled] .t { color: #9C9C9C; text-decoration: line-through; }
.time-btn[disabled] .s { color: #A1453A; }
.time-btn.selected { background: var(--green); border-color: var(--green-dark); }
.time-btn.selected .t, .time-btn.selected .s { color: #fff; }

/* 폼 */
.field { margin: 0 0 16px; }
.field > label, .field > .label { display: block; font-weight: 800; margin-bottom: 6px; }
.field .req { color: var(--red); margin-left: 4px; font-size: .85em; }
.field .hint { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.field .err { font-size: .92rem; color: var(--red); margin-top: 4px; font-weight: 700; }
.input, select.input, textarea.input {
  width: 100%; min-width: 0; min-height: var(--tap); padding: 10px 14px; border: 2px solid #CFCAC0; border-radius: 12px; background: #fff; font-size: 1.05rem;
}
textarea.input { min-height: 100px; resize: vertical; }
.input:focus { border-color: var(--blue-ink); box-shadow: 0 0 0 3px rgba(31, 95, 153, .2); outline: none; }
.input[aria-invalid="true"] { border-color: var(--red); }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 14px; background: var(--sage-2); cursor: pointer; min-height: var(--tap); }
.check input { width: 28px; height: 28px; margin: 0; flex: none; accent-color: var(--green); }
.check span { font-weight: 800; }
.link-btn { background: none; border: 0; color: var(--blue-ink); text-decoration: underline; font-weight: 700; cursor: pointer; padding: 10px 4px; min-height: 44px; }
details.more { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 0 14px; margin: 0 0 16px; }
details.more summary { cursor: pointer; font-weight: 800; min-height: var(--tap); display: flex; align-items: center; }
details.more[open] summary { margin-bottom: 8px; }

/* 확인 / 완료 */
.summary { background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.summary .row:last-child { border-bottom: 0; }
.summary .k { color: var(--muted); font-weight: 700; flex: none; }
.summary .v { font-weight: 800; text-align: right; }
.done-head { text-align: center; padding: 18px 0 6px; }
.done-head .big-check { width: 76px; height: 76px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 10px; }
.done-head .big-check .ico { width: 44px; height: 44px; stroke-width: 2.6; }
.done-head h1 { margin: 0; font-size: 1.55rem; }
.code-box { text-align: center; background: var(--blue); border-radius: 16px; padding: 14px; margin: 14px 0; }
.code-box .code { font-size: 1.45rem; font-weight: 900; letter-spacing: .02em; color: var(--blue-ink); word-break: break-all; }

/* FAQ */
.faq details { background: #fff; border-radius: 14px; margin: 0 0 10px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; padding: 14px 16px; min-height: 56px; display: flex; align-items: center; gap: 10px; font-weight: 800; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; color: var(--orange); font-weight: 900; font-size: 1.15rem; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .a { padding: 12px 16px 16px; color: var(--ink-2); }

/* 일정표 */
.sched-dates { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.sched-dates li { background: var(--violet); color: var(--violet-ink); border-radius: 10px; padding: 6px 10px; font-weight: 800; font-size: .92rem; }
.sched-dates li.off { background: #EEE; color: #777; text-decoration: line-through; }
.times-inline { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }
.times-inline li { background: var(--sage-2); border-radius: 8px; padding: 2px 8px; font-weight: 700; font-size: .9rem; }

/* 모달 */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(23, 35, 59, .5); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.modal { background: #fff; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .modal-backdrop { align-items: center; padding: 20px; } .modal { border-radius: 22px; } }
.modal-title { margin: 0 0 12px; font-size: 1.25rem; }
.modal-body { margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 120px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); z-index: 90; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: all .2s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--red); }

/* ===================== 관리자 ===================== */
body.admin { background: #F6F4EF; }
body.admin main { padding-bottom: 40px; }
.admin .wrap { max-width: 1180px; }
.admin-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; margin: 12px 0 16px; }
.admin-tabs button {
  min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; font-size: .86rem; cursor: pointer; padding: 6px 8px; line-height: 1.25;
}
.admin-tabs button[aria-selected="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.stat .n { font-size: 2rem; font-weight: 900; color: var(--green); line-height: 1.1; }
.stat .l { color: var(--muted); font-weight: 700; font-size: .9rem; }
.stat.big .n { font-size: 2.6rem; }
.today-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 12px; }
.toolbar .field { margin: 0; flex: 1 1 150px; min-width: 0; }
.toolbar .btn { flex: 0 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 760px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 800; }
.chip input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; }
.range-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto; gap: 8px; align-items: end; margin-bottom: 8px; }
.range-row .field { margin: 0; }
@media (max-width: 480px) { .range-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); } }

/* 반응형 표: 좁은 화면은 카드 */
.rtable { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); font-size: .9rem; }
.rtable th, .rtable td { padding: 10px; border-bottom: 1px solid #EFEBE4; text-align: left; vertical-align: middle; }
.rtable th { background: #F1EEE7; font-weight: 800; white-space: nowrap; }
.rtable select.input { min-height: 44px; padding: 4px 8px; font-size: .9rem; }
@media (max-width: 900px) {
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable thead { display: none; }
  .rtable tr { border-bottom: 8px solid #F6F4EF; padding: 6px 4px; }
  .rtable td { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; border: 0; padding: 6px 10px; }
  .rtable td::before { content: attr(data-label); color: var(--muted); font-weight: 700; }
}
.slot-list .slot { display: grid; grid-template-columns: 1fr; gap: 8px; background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); }
.slot-list .slot.off { background: #F3F1EC; }
.slot-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.slot-head .t { font-weight: 900; font-size: 1.1rem; }
.slot-ctrl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 8px; align-items: end; }
.slot-ctrl .field { margin: 0; }
.slot-ctrl .btn { min-height: 48px; padding: 6px 10px; font-size: .9rem; }
.mini-cal .cal-day { min-height: 54px; font-size: .9rem; }
.mini-cal .cal-day .tag { font-size: .62rem; }
.login-box { max-width: 420px; margin: 40px auto; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.preview-switch { position: sticky; top: 0; z-index: 70; display: flex; gap: 6px; padding: 8px; background: #2B2B2B; justify-content: center; flex-wrap: wrap; }
.preview-switch button { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 0; font-weight: 800; cursor: pointer; background: #555; color: #fff; }
.preview-switch button[aria-pressed="true"] { background: #FFE08A; color: #3A2A00; }
.preview-switch .note { color: #FFE08A; font-size: .8rem; font-weight: 700; align-self: center; }
body[data-page="preview"] .site-header { top: 60px; }
.icon-btn[data-textsize] { flex-direction: column; gap: 0; font-size: .66rem; line-height: 1.1; padding: 3px 6px; min-width: 54px; }
.icon-btn[data-textsize] .ico { width: 1.25rem; height: 1.25rem; }
.brand-name { font-size: clamp(.98rem, 4.7vw, 1.15rem); }
html.text-large .brand-name { font-size: clamp(.9rem, 4.4vw, 1.05rem); }
.site-header .brand-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; letter-spacing: -.035em; word-break: keep-all; }
.site-header .logo-mark { width: 32px; height: 26px; }
.site-header .wrap { gap: 6px; }
