/* ═══════════════════════════════════════════════════════════
 * app.css — 우리의원 모바일 앱
 *
 * 구조
 *   .shell   데스크톱 바탕 (모바일에서는 안 보임)
 *   .app     앱 화면 (max-width 430px, 항상 가운데 정렬)
 *     .appbar  상단바 (고정)
 *     .page    스크롤 영역
 *     .tabbar  하단 탭 (고정)
 *
 * 데스크톱에서도 모바일과 똑같이 보이도록 .app 내부에서만 스크롤합니다.
 * ═══════════════════════════════════════════════════════════ */

/* ── 리셋 ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  background: var(--g150);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;

  /* 한글은 어절 단위로 끊어야 읽기 좋다.
     이게 없으면 "다음 진료는 내일 09:00 부터 / 예요." 처럼 어색하게 잘린다. */
  word-break: keep-all;
  overflow-wrap: anywhere;   /* 단, 긴 URL·번호는 강제로 줄바꿈 */
}

/* 숫자 정렬 */
.tabular { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════
 * 앱 셸
 * ═══════════════════════════════════════════════════════════ */

.shell {
  display: flex;
  justify-content: center;
  min-height: 100vh;    /* dvh 미지원 WebView 폴백 */
  min-height: 100dvh;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--app-w);
  height: 100vh;        /* dvh 미지원 WebView 폴백 — 고정 높이라야 탭바가 안 밀린다 */
  height: 100dvh;
  background: var(--bg-canvas);
  overflow: hidden;
}

/* 데스크톱: 기기처럼 가운데 띄우기 */
@media (min-width: 520px) {
  body {
    background:
      radial-gradient(1200px 600px at 50% -10%, #eef3f8 0%, #e5e8eb 60%, #dfe3e8 100%);
  }
  .shell { padding: 28px 0; align-items: flex-start; }
  .app {
    height: min(880px, calc(100dvh - 56px));
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(25, 31, 40, .18), 0 0 0 1px rgba(25, 31, 40, .06);
  }
}

/* ── 상단바 ───────────────────────────────────────────────── */
.appbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  height: calc(var(--appbar-h) + var(--sa-top));
  padding: var(--sa-top) 8px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line-blue-strong);
}
.appbar--canvas { background: var(--bg-canvas); border-bottom-color: var(--line-blue-strong); }

.appbar__btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-10);
  color: var(--fg);
  transition: background var(--t-fast);
}
.appbar__btn:active { background: var(--bg-brand-weak); }

.appbar__title {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
  padding: 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appbar__title--center { text-align: center; }

.appbar__brand { display: flex; align-items: center; padding-left: 10px; flex: 1; min-width: 0; }
.appbar__logo  { width: auto; height: 40px; }   /* 원본 226×80 비율 유지 */

.appbar__dot {
  position: absolute;
  top: 7px; right: 7px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: var(--r-full);
  background: var(--danger);
  color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px;
  text-align: center;
}
.appbar__btn { position: relative; }

/* ── 스크롤 영역 ──────────────────────────────────────────── */
.page {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-bottom: 24px;
}
.page--white { background: var(--bg); }

/* 화면 전환 시 살짝 떠오르며 나타난다 — 전환이 뚝 끊기지 않게 */
.page > * { animation: pageIn 240ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .page > * { animation: none; }
}

/* ── 하단 탭 ──────────────────────────────────────────────── */
.tabbar {
  flex: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--sa-bottom));
  padding-bottom: var(--sa-bottom);
  background: var(--bg);
  border-top: 1px solid var(--line-blue-strong);
}
/* 평평한 5등분 탭 — 튀어나온 버튼 없이 색과 굵기로만 현재 위치를 알린다 */
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--g400);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -.2px;
  transition: color var(--t-fast);
}
.tab__ico {
  display: grid; place-items: center;
  width: 34px; height: 26px;
  border-radius: var(--r-8);
  transition: background var(--t-base), transform var(--t-fast);
}
.tab:active .tab__ico { transform: scale(.9); }

.tab.is-on { color: var(--fg-brand); font-weight: 700; }
.tab.is-on .tab__ico { background: var(--bg-brand-weak); }
.tab.is-on .ico { stroke-width: 2.1; }

/* ── 가운데 접수 버튼 ────────────────────────────────────────
 * 이 앱에서 가장 많이 누르는 버튼이라 탭바 위로 띄워 크게 둔다.
 * ---------------------------------------------------------- */
.tab--key { color: var(--fg-brand); font-weight: 700; }
.tab--key .tab__ico {
  width: 54px; height: 54px;
  margin-top: -24px;
  border-radius: var(--r-full);
  background: var(--brand-500);
  color: #fff;
  border: 4px solid var(--bg);          /* 탭바와 자연스럽게 이어지도록 */
  box-shadow: 0 6px 16px rgba(13, 111, 184, .30);
}
.tab--key .tab__label { margin-top: -3px; }
.tab--key:active .tab__ico { transform: scale(.93); }
/* 접수 탭이 켜졌을 때 — 흰 아이콘이 잘 보이도록 진한 브랜드 블루로 채운다
 * (투명으로 두면 흰 탭바 위에서 흰 아이콘이 사라져 보인다) */
.tab--key.is-on .tab__ico {
  background-color: var(--brand-700);
  box-shadow: 0 6px 16px rgba(9, 74, 125, .34);
}

/* ═══════════════════════════════════════════════════════════
 * 레이아웃 유틸
 * ═══════════════════════════════════════════════════════════ */
.wrap  { padding: 0 var(--gutter); }
.stack > * + * { margin-top: 12px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.center { text-align: center; }

.sec { margin-top: 28px; }
.sec__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter) 12px;
}
.sec__title { font-size: 16px; font-weight: 700; letter-spacing: -.3px; color: var(--fg); }
.sec__more { font-size: 13px; font-weight: 600; color: var(--fg-3); display: flex; align-items: center; gap: 2px; }

/* ── 타이포 ───────────────────────────────────────────────── */
.t-display { font-size: 24px; font-weight: 800; line-height: 1.35; letter-spacing: -.6px; }
.t-h1      { font-size: 20px; font-weight: 700; line-height: 1.4;  letter-spacing: -.4px; }
.t-h2      { font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: -.3px; }
.t-body    { font-size: 15px; line-height: 1.5; }
.t-sub     { font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.t-cap     { font-size: 13px; line-height: 1.45; color: var(--fg-3); }
.t-mute    { color: var(--fg-3); }
.t-brand   { color: var(--fg-brand); }
.t-danger  { color: var(--danger); }
.t-bold    { font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
 * 카드
 * ═══════════════════════════════════════════════════════════ */
.card {
  background: var(--bg);
  border-radius: var(--r-20);
  padding: 18px;
  margin-inline: var(--gutter);
  border: 1px solid var(--line-blue);
  box-shadow: var(--sh-card);
}
.card--flat  { box-shadow: none; }
.card--line  { border: 1px solid var(--line); box-shadow: none; }
.card--pad0  { padding: 0; overflow: hidden; }
.card + .card { margin-top: 12px; }

.card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px;
}
.card__title { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }

/* 핵심 현황 카드 (홈 상단) — <a> 로도 쓰므로 block 필수 */
.hero {
  position: relative;
  display: block;
  margin-inline: var(--gutter);
  padding: 22px;
  border-radius: var(--r-24);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(43, 162, 255, .55) 0%, rgba(43, 162, 255, 0) 55%),
    linear-gradient(145deg, var(--brand-500) 0%, var(--brand-700) 100%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--sh-brand);
  isolation: isolate;
}
/* 오른쪽 위 은은한 빛 — 평면 그라디언트만 있으면 밋밋하다 */
.hero::after {
  content: '';
  position: absolute;
  right: -40px; top: -60px;
  width: 180px; height: 180px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .10);
  z-index: -1;
}
.hero__top { display: flex; align-items: center; justify-content: space-between; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 10px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .18);
  font-size: 12px; font-weight: 700;
}
.hero__num { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; }
.hero__num small { font-size: 18px; font-weight: 700; margin-left: 2px; }
.hero__desc { font-size: 14px; opacity: .88; margin-top: 6px; }
.hero__foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .22);
  font-size: 13px;
}
.hero__link { display: flex; align-items: center; gap: 2px; font-weight: 700; }

/* 인사말 — 카드 위 바탕에 얹는다 */
.greet { padding: 4px var(--gutter) 14px; }
.greet__t { font-size: 22px; font-weight: 800; letter-spacing: -.7px; line-height: 1.3; }
.greet__d { font-size: 13.5px; color: var(--fg-3); margin-top: 5px; }

/* 접수 유도 카드 (진행 중 접수가 없을 때) */
.cta {
  margin-inline: var(--gutter);
  padding: 20px;
  border-radius: var(--r-24);
  background: var(--bg);
  border: 1px solid var(--line-blue);
  box-shadow: var(--sh-card);
}
.cta__row { display: flex; align-items: center; gap: 13px; }
.cta__ico {
  flex: none;
  width: 46px; height: 46px;
  border-radius: var(--r-14);
  background: var(--bg-brand-weak);
  color: var(--fg-brand);
  display: grid; place-items: center;
}
.cta__t { font-size: 17px; font-weight: 700; letter-spacing: -.4px; }
.cta__d { font-size: 13.5px; color: var(--fg-3); margin-top: 3px; line-height: 1.5; }
.cta__d .hl { color: var(--fg-brand); font-weight: 700; }

/* 카드 안 보조 링크 2개 */
.cta__sub {
  display: flex; align-items: center;
  margin: 14px -20px -6px;
  padding-top: 14px;
  border-top: 1px solid var(--line-subtle);
}
.cta__sub a {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 28px;
  font-size: 13.5px; font-weight: 600; color: var(--fg-2);
}
.cta__sub a:active { color: var(--fg-brand); }
.cta__sub span { width: 1px; height: 14px; background: var(--line); }

/* 카드 안 구분선 */
.card__div { height: 1px; background: var(--line-subtle); margin: 16px -18px; }

/* 오늘 진료 상태 한 줄 */
.today { display: flex; align-items: center; gap: 12px; }
.today__dot {
  flex: none; width: 8px; height: 8px; border-radius: var(--r-full);
  background: var(--g300);
}
.today__dot.is-on {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(0, 168, 98, .16);
}
.today__t { font-size: 16px; font-weight: 700; letter-spacing: -.3px; }
.today__d { font-size: 13.5px; color: var(--fg-3); margin-top: 2px; }

/* 접기 (진료시간 전체) */
.fold { margin-top: 14px; }
.fold__btn {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  height: 38px;
  border-radius: var(--r-10);
  background: var(--bg-brand-weak);
  font-size: 13px; font-weight: 700; color: var(--brand-600);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.fold__btn::-webkit-details-marker { display: none; }
.fold__btn .ico { transition: transform var(--t-base); }
.fold[open] .fold__btn .ico { transform: rotate(90deg); }
.fold__body { padding: 12px 2px 2px; }

/* 정보 행 (주소·전화) */
.info {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px;
  margin: 0 -6px;
  padding: 8px 6px;
  border-radius: var(--r-10);
  transition: background var(--t-fast);
}
.info:active { background: var(--bg-brand-weak); }
.info__ico  { flex: none; color: var(--brand-400); }
.info__txt  { flex: 1; font-size: 14.5px; color: var(--fg-2); line-height: 1.45; }
.info__chev { flex: none; color: var(--g300); }

/* ═══════════════════════════════════════════════════════════
 * 버튼
 * ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 52px; padding: 0 20px;
  border-radius: var(--r-14);
  background: var(--g100);
  color: var(--fg);
  font-size: 16px; font-weight: 700; letter-spacing: -.3px;
  transition: background var(--t-fast), opacity var(--t-fast), transform var(--t-fast);
  user-select: none;
}
.btn:active { transform: scale(.985); }
.btn--block { display: flex; width: 100%; }

.btn--primary {
  background: var(--bg-brand);
  color: var(--fg-on);
  box-shadow: 0 4px 12px rgba(13, 111, 184, .20);
}
.btn--primary:active { background: var(--brand-600); box-shadow: none; }

/* 보조 버튼도 브랜드색을 입힌다 — 회색 테두리는 눌러도 되는지 알기 어렵다 */
.btn--line {
  background: var(--bg);
  border: 1.5px solid var(--brand-200);
  color: var(--brand-600);
}
.btn--line:active { background: var(--brand-50); border-color: var(--brand-300); }

/* 중립이 꼭 필요한 곳 (취소 등) */
.btn--gray {
  background: var(--bg);
  border: 1.5px solid var(--g200);
  color: var(--fg-2);
}
.btn--gray:active { background: var(--g50); }

.btn--soft { background: var(--bg-brand-weak); color: var(--fg-brand); }
.btn--danger { background: var(--danger-bg); color: var(--danger); }
.btn--ghost { background: transparent; color: var(--fg-3); }

.btn--l { height: 48px; border-radius: var(--r-12); font-size: 15px; }
.btn--m { height: 42px; border-radius: var(--r-12); font-size: 14px; padding: 0 16px; }
.btn--s { height: 36px; border-radius: var(--r-10); font-size: 13px; padding: 0 14px; }

.btn[disabled], .btn.is-off { opacity: .4; pointer-events: none; }

.btn-row { display: flex; gap: 8px; }
.btn-row > .btn { flex: 1; }

/* 하단 고정 액션 바 */
.actionbar {
  position: sticky; bottom: 0;
  padding: 12px var(--gutter) calc(12px + var(--sa-bottom));
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--bg) 22%);
}
.page--white .actionbar { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--bg) 22%); }

/* ═══════════════════════════════════════════════════════════
 * 폼
 * ═══════════════════════════════════════════════════════════ */
.field { margin-top: 18px; }
.field__label {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--fg-2);
  margin-bottom: 7px;
}
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__help { font-size: 12.5px; color: var(--fg-3); margin-top: 6px; }
.field__err  { font-size: 12.5px; color: var(--danger); margin-top: 6px; }

/* 입력칸 — 회색으로 꽉 채우면 답답하다. 흰 바탕 + 또렷한 테두리가 깔끔하다 */
.input, .textarea, .select {
  display: block; width: 100%;
  height: 52px; padding: 0 16px;
  background: var(--bg);
  border: 1.5px solid var(--line-blue-strong);
  border-radius: var(--r-12);
  font-size: 16px;              /* 16px 미만이면 iOS 에서 확대됨 */
  color: var(--fg);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--g400); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3.5px rgba(13, 111, 184, .13);
}
.input:read-only:not(:focus) { background: var(--bg-canvas); border-color: var(--line-blue); }
.input.is-err { border-color: var(--danger); box-shadow: 0 0 0 3.5px rgba(240, 68, 82, .10); }

.textarea { height: auto; min-height: 108px; padding: 14px 16px; line-height: 1.55; resize: none; }

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b95a1' stroke-width='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 14px center;
  padding-right: 42px;
}

.input-group { display: flex; gap: 8px; }
/* 생년월일 년·월·일 — 년이 조금 넓게 */
.input-group.birth .select { flex: 1; min-width: 0; padding-left: 12px; padding-right: 28px; }
.input-group.birth .select:first-child { flex: 1.4; }
.input-group .input { flex: 1; }
.input-group .btn  { flex: none; height: 52px; }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 6px; top: 6px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--fg-4);
  border-radius: var(--r-10);
}
/* 아이콘 2개(보임/숨김)를 넣어두고 JS 가 번갈아 표시한다. 처음엔 '보기'만. */
.pw-toggle svg { grid-area: 1 / 1; }
.pw-toggle svg + svg { display: none; }

/* 라디오 / 체크 — 칩 형태 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 18px;
  border-radius: var(--r-14);
  background: var(--bg);
  color: var(--fg-2);
  box-shadow: inset 0 0 0 1.5px var(--line-blue-strong);
  font-size: 14.5px; font-weight: 600;
  transition: all var(--t-fast);
}
.chip input:checked + span {
  background: var(--bg-brand-weak);
  color: var(--brand-600);
  font-weight: 700;
  box-shadow: inset 0 0 0 1.8px var(--brand-500);
}
.chips--col { flex-direction: column; }
.chips--col .chip span { width: 100%; justify-content: flex-start; }

/* 체크박스 (약관) */
.check { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  flex: none;
  width: 22px; height: 22px;
  border-radius: var(--r-6);
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  color: transparent;
  transition: all var(--t-fast);
}
.check input:checked + .check__box {
  background: var(--bg-brand); border-color: var(--bg-brand); color: #fff;
}
.check__label { font-size: 14.5px; color: var(--fg-2); flex: 1; }
.check--all .check__label { font-size: 15.5px; font-weight: 700; color: var(--fg); }

/* 스위치 */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
  flex: none;
  width: 50px; height: 30px;
  border-radius: var(--r-full);
  background: var(--g300);
  position: relative;
  transition: background var(--t-base);
}
.switch__track::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: var(--r-full);
  background: #fff;
  box-shadow: var(--sh-2);
  transition: transform var(--t-base);
}
.switch input:checked + .switch__track { background: var(--bg-brand); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }

/* ═══════════════════════════════════════════════════════════
 * 목록 / 행
 * ═══════════════════════════════════════════════════════════ */
.row {
  display: flex; align-items: center; gap: 13px;
  min-height: 60px; padding: 13px 18px;
  transition: background var(--t-fast);
}
.row:active { background: var(--bg-brand-weak); }
.row + .row { box-shadow: inset 0 1px 0 var(--line-subtle); }
.row__ico {
  flex: none; display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: var(--r-10);
  background: var(--bg-brand-weak);
  color: var(--fg-brand);
}
.row__label { flex: 1; font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.row__right { font-size: 14px; color: var(--fg-3); }
.row__chev  { flex: none; color: var(--fg-4); }

/* 접수/문진표 목록 아이템 */
.item {
  display: block;
  background: var(--bg);
  border-radius: var(--r-20);
  padding: 17px 18px;
  margin-inline: var(--gutter);
  border: 1px solid var(--line-blue);
  box-shadow: var(--sh-card);
  transition: background var(--t-fast), transform var(--t-fast);
}
.item + .item { margin-top: 10px; }
.item:active { background: var(--bg-brand-weak); transform: scale(.99); }
.item__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item__date { font-size: 13px; color: var(--fg-3); }
.item__body { margin-top: 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.item__text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.5; }
.item__text--mute { color: var(--fg-3); }
.item__seq {
  flex: none;
  min-width: 56px; height: 54px;
  padding: 0 8px;
  border-radius: var(--r-14);
  background: var(--bg-brand-weak);
  color: var(--brand-600);
  display: grid; place-items: center; align-content: center;
  font-size: 19px; font-weight: 800; letter-spacing: -.5px;
}
.item__seq small { font-size: 10px; font-weight: 700; display: block; opacity: .75; margin-bottom: 1px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 정의 목록 (상세 화면) */
.dl { }
.dl__i { display: flex; gap: 12px; padding: 11px 0; }
.dl__i + .dl__i { box-shadow: inset 0 1px 0 var(--line-subtle); }
.dl__t { flex: none; width: 92px; font-size: 14px; color: var(--fg-3); }
.dl__d { flex: 1; font-size: 14.5px; word-break: break-all; }
/* 상세 화면에서 굵게 쓴 값은 눈으로 찾는 정보다 — 색까지 준다 */
.dl__d b { color: var(--brand-600); }

/* 타임라인 (상태 이력) */
.tl { padding-left: 4px; }
.tl__i { position: relative; padding: 0 0 20px 24px; }
.tl__i::before {
  content: ''; position: absolute; left: 4px; top: 5px;
  width: 9px; height: 9px; border-radius: var(--r-full);
  background: var(--line-strong);
}
.tl__i:last-child { padding-bottom: 0; }
.tl__i:not(:last-child)::after {
  content: ''; position: absolute; left: 8px; top: 16px; bottom: 0;
  width: 1px; background: var(--line);
}
.tl__i.is-on::before { background: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.tl__t { font-size: 14.5px; font-weight: 600; }
.tl__d { font-size: 12.5px; color: var(--fg-3); margin-top: 2px; }

/* ── 뱃지 ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  height: 23px; padding: 0 9px;
  border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 700; letter-spacing: -.2px;
  background: var(--g100); color: var(--fg-2);
}
.badge--brand  { background: var(--brand-50);  color: var(--brand-600); }
.badge--ok     { background: var(--ok-bg);     color: var(--ok); }
.badge--warn   { background: var(--warn-bg);   color: #b45309; }
.badge--danger { background: var(--danger-bg); color: var(--danger); }

/* ── 알림 박스 ──────────────────────────────────────────────
 * 왼쪽 색 막대로 성격을 먼저 알리고, 본문은 왼쪽 정렬로 짧게 끊는다.
 * ---------------------------------------------------------- */
.note {
  display: flex; gap: 10px;
  padding: 13px 15px;
  border-radius: var(--r-10);
  border-left: 3px solid var(--brand-300);
  background: var(--g50);
  box-shadow: inset 0 0 0 1px var(--line-subtle);
  font-size: 13.5px; line-height: 1.55; color: var(--fg-2);
  text-align: left;
}
.note--brand, .note--warn, .note--danger { box-shadow: none; }
.note__ico { flex: none; color: var(--brand-400); margin-top: 1px; }
/* 강조는 색까지 준다 — 굵기만으로는 잘 안 보인다 */
.note b { font-weight: 700; color: var(--fg); }

.note--brand  { background: var(--bg-brand-weak); border-left-color: var(--brand-500); color: var(--brand-700); }
.note--brand .note__ico { color: var(--brand-500); }
.note--brand b { color: var(--brand-700); }

.note--warn   { background: var(--warn-bg); border-left-color: var(--warn); color: #92400e; }
.note--warn .note__ico { color: var(--warn); }
.note--warn b { color: #92400e; }

.note--danger { background: var(--danger-bg); border-left-color: var(--danger); color: #9f1239; }
.note--danger .note__ico { color: var(--danger); }
.note--danger b { color: var(--danger); }

/* 안내문 안에서 시각·거리·번호처럼 눈으로 찾는 값 */
.hl { color: var(--fg-brand); font-weight: 700; }
.note--warn   .hl { color: #b45309; }
.note--danger .hl { color: var(--danger); }

/* ── 배너 ─────────────────────────────────────────────────── */
.banners {
  display: flex; gap: 10px;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.banners::-webkit-scrollbar { display: none; }
/* ── 광고 배너 ──────────────────────────────────────────────
 * 이미지가 없어도 실제 광고처럼 보이도록 테마색 + 워터마크 도형으로 구성.
 * 테마는 .banner--t1 ~ t5 를 돌려 쓴다.
 * ---------------------------------------------------------- */
.banner {
  position: relative;
  flex: 0 0 calc(100% - 26px);
  scroll-snap-align: center;
  min-height: 130px;
  border-radius: var(--r-20);
  padding: 20px 22px;
  color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--sh-2);
  transition: transform var(--t-fast);
}
.banner:active { transform: scale(.985); }

/* 워터마크 도형 — 오른쪽에 크게 깔아 광고 느낌을 낸다 */
.banner__art {
  position: absolute;
  right: -16px; bottom: -28px;
  width: 132px; height: 132px;
  color: rgba(255, 255, 255, .17);
  z-index: -1;
  pointer-events: none;
}
.banner::before {                       /* 오른쪽 위 빛 */
  content: '';
  position: absolute;
  right: -34px; top: -54px;
  width: 152px; height: 152px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .12);
  z-index: -1;
}

.banner__tag {
  display: inline-flex; align-items: center;
  align-self: flex-start;
  height: 22px; padding: 0 9px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .22);
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
  margin-bottom: 9px;
}
.banner__t {
  font-size: 18px; font-weight: 800; letter-spacing: -.5px; line-height: 1.32;
  max-width: 15em;
}
.banner__d {
  font-size: 12.5px; line-height: 1.45; margin-top: 5px;
  color: rgba(255, 255, 255, .82);
  max-width: 16em;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.banner__go {
  display: inline-flex; align-items: center; gap: 3px;
  align-self: flex-start;
  margin-top: 11px;
  height: 26px; padding: 0 9px 0 12px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, .95);
  font-size: 11.5px; font-weight: 700; letter-spacing: -.2px;
}

/* 테마 팔레트 */
.banner--t1 { background: linear-gradient(135deg, #2196F3 0%, #0d6fb8 55%, #0a4f85 100%); }
.banner--t2 { background: linear-gradient(135deg, #14B8A6 0%, #0D9488 55%, #0F5F5A 100%); }
.banner--t3 { background: linear-gradient(135deg, #FB7A5F 0%, #EF4E5E 55%, #C93465 100%); }
.banner--t4 { background: linear-gradient(135deg, #55648F 0%, #333F5C 55%, #1F2739 100%); }
.banner--t5 { background: linear-gradient(135deg, #9B6BFF 0%, #6D3FE0 55%, #4A26AC 100%); }
.banner--t1 .banner__go { color: #0d6fb8; }
.banner--t2 .banner__go { color: #0D9488; }
.banner--t3 .banner__go { color: #C93465; }
.banner--t4 .banner__go { color: #333F5C; }
.banner--t5 .banner__go { color: #6D3FE0; }

/* 실제 이미지가 올라온 배너 */
.banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  z-index: -2;
}
.banner--img::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10, 16, 24, .80) 0%, rgba(10, 16, 24, .44) 58%, rgba(10, 16, 24, .16) 100%);
  z-index: -1;
}
.banner--img::before,
.banner--img .banner__art { display: none; }

/* 인디케이터 — 현재 배너는 길쭉하게 */
.bdots {
  display: flex; justify-content: center; align-items: center; gap: 5px;
  margin-top: 10px;
}
.bdots i {
  width: 5px; height: 5px;
  border-radius: var(--r-full);
  background: var(--g300);
  transition: width var(--t-base), background var(--t-base);
  cursor: pointer;
}
.bdots i.is-on { width: 16px; background: var(--brand-500); }

/* 공지 본문 첨부 이미지 */
.notice-img {
  width: 100%;
  height: auto;                 /* 원본 비율 유지 — 세로로 긴 포스터도 다 보인다 */
  border-radius: var(--r-16);
  background: var(--g100);      /* 로딩 중 빈 칸 */
  display: block;
}

/* ── 바로가기 3분할 ───────────────────────────────────────── */
.quick {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-inline: var(--gutter);
}
.quick__i {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px;
  background: var(--bg);
  border-radius: var(--r-16);
  transition: background var(--t-fast);
}
.quick__i:active { background: var(--bg-brand-weak); }
.quick__ico {
  width: 42px; height: 42px;
  border-radius: var(--r-12);
  background: var(--bg-brand-weak);
  color: var(--fg-brand);
  display: grid; place-items: center;
}
.quick__t { font-size: 13px; font-weight: 600; color: var(--fg-2); }

/* ── 비어있음 ─────────────────────────────────────────────── */
.empty { padding: 56px 24px; text-align: center; }
.empty__ico {
  display: grid; place-items: center;
  width: 66px; height: 66px; margin: 0 auto 14px;
  border-radius: var(--r-full);
  background: var(--bg-brand-weak);
  color: var(--brand-300);
}
.empty__t { font-size: 15.5px; font-weight: 600; color: var(--fg-2); }
.empty__d { font-size: 13.5px; color: var(--fg-3); margin-top: 5px; }
.empty .btn { margin-top: 16px; }

/* ── 로더 (3-dot) ─────────────────────────────────────────── */
.loader { display: inline-flex; gap: 4px; align-items: center; }
.loader i {
  width: 6px; height: 6px; border-radius: var(--r-full);
  background: currentColor; opacity: .35;
  animation: dot 1s infinite ease-in-out;
}
.loader i:nth-child(2) { animation-delay: .15s; }
.loader i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* ── 토스트 ───────────────────────────────────────────────── */
.toast {
  position: absolute;
  left: 50%; bottom: calc(var(--tabbar-h) + var(--sa-bottom) + 16px);
  transform: translate(-50%, 8px);
  width: max-content; max-width: calc(100% - 40px);   /* 왼쪽이 50% 라 폭이 반으로 잘리지 않게 — 긴 문구는 줄바꿈 */
  word-break: keep-all; line-height: 1.45;
  padding: 13px 18px;
  border-radius: var(--r-12);
  background: rgba(25, 31, 40, .92);
  color: #fff;
  font-size: 14px; font-weight: 500;
  box-shadow: var(--sh-3);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
  z-index: 60;
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast--err { background: rgba(240, 68, 82, .95); }

/* ── 시트 (모달) ──────────────────────────────────────────── */
.scrim {
  position: absolute; inset: 0;
  background: rgba(25, 31, 40, .45);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base);
  z-index: 50;
}
.scrim.is-on { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  transform: translateY(100%);
  background: var(--bg);
  border-radius: var(--r-24) var(--r-24) 0 0;
  padding: 22px var(--gutter) calc(20px + var(--sa-bottom));
  transition: transform var(--t-base);
  z-index: 51;
}
.sheet.is-on { transform: translateY(0); }
.sheet__t { font-size: 18px; font-weight: 700; letter-spacing: -.4px; }
.sheet__d { font-size: 14.5px; color: var(--fg-2); margin-top: 8px; line-height: 1.55; }
.sheet .btn-row { margin-top: 22px; }

/* ── 탭(세그먼트) ─────────────────────────────────────────── */
.seg {
  display: flex; gap: 6px;
  padding: 0 var(--gutter);
}
.seg__i {
  height: 35px; padding: 0 15px;
  display: inline-flex; align-items: center;
  border-radius: var(--r-full);
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--line-blue-strong);
  color: var(--fg-2);
  font-size: 13.5px; font-weight: 600;
  transition: all var(--t-fast);
}
.seg__i.is-on {
  background: var(--bg-brand);
  box-shadow: none;
  color: #fff;
  font-weight: 700;
}

/* ── GPS 상태 카드 ────────────────────────────────────────── */
.gps {
  margin-inline: var(--gutter);
  padding: 22px 18px;
  border-radius: var(--r-16);
  background: var(--bg);
  text-align: center;
}
.gps__ring {
  width: 78px; height: 78px; margin: 0 auto 14px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  background: var(--bg-brand-weak);
  color: var(--brand-400);
  transition: all var(--t-base);
}
.gps.is-ok   .gps__ring { background: var(--ok-bg);     color: var(--ok); }
.gps.is-fail .gps__ring { background: var(--danger-bg); color: var(--danger); }
.gps.is-load .gps__ring { background: var(--bg-brand-weak); color: var(--brand-500); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.gps__t { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
/* 두 줄을 넘기지 않도록 폭을 잡아둔다. 중앙정렬 긴 문장은 읽기 나쁘다. */
.gps__d {
  font-size: 13.5px; color: var(--fg-3); margin-top: 7px; line-height: 1.55;
  max-width: 20em; margin-inline: auto;
}
.gps__d .hl { color: var(--fg-2); font-weight: 700; }
.gps.is-ok   .gps__t { color: var(--ok); }
.gps.is-fail .gps__t { color: var(--danger); }
.gps__dist {
  display: inline-flex; align-items: baseline; gap: 3px;
  margin-top: 12px;
  font-size: 28px; font-weight: 800; letter-spacing: -1px;
}
.gps__dist small { font-size: 14px; font-weight: 700; }

/* 위치 권한 켜는 법 — 거부 시 단계 안내 (gps__d 안, 번호 매김) */
.gps__d:has(.geo-guide) { max-width: 320px; }
.geo-guide { display: block; text-align: left; margin-top: 6px; }
.geo-guide__t { display: block; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--fg-2); margin-bottom: 10px; }
.geo-guide__ol { display: flex; flex-direction: column; gap: 8px; counter-reset: geo; }
.geo-guide__li { position: relative; display: block; padding: 1px 0 1px 28px; font-size: 13px; line-height: 1.5; color: var(--fg-2); }
.geo-guide__li::before {
  counter-increment: geo; content: counter(geo);
  position: absolute; left: 0; top: 1px;
  width: 19px; height: 19px;
  border-radius: var(--r-full);
  background: var(--bg-brand-weak); color: var(--fg-brand);
  font-size: 11px; font-weight: 800; text-align: center; line-height: 19px;
}
.geo-guide__li b { color: var(--fg); font-weight: 700; }

/* ── 진료시간 표 ──────────────────────────────────────────── */
.hours__r { display: flex; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.hours__d { flex: none; width: 20px; color: var(--fg-3); font-weight: 600; }
.hours__v { flex: 1; color: var(--fg-2); }
.hours__r.is-today .hours__d,
.hours__r.is-today .hours__v { color: var(--fg-brand); font-weight: 700; }
.hours__r.is-off .hours__v { color: var(--fg-4); }

/* ── 마이페이지 통계 ──────────────────────────────────────── */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.stat {
  position: relative;
  padding: 16px;
  border-radius: var(--r-16);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-blue);
  transition: transform var(--t-fast);
}
.stat:active { transform: scale(.98); }
.stat__ico {
  position: absolute; right: 13px; top: 13px;
  color: var(--brand-300);
}
.stat__t { display: block; font-size: 12.5px; font-weight: 600; color: var(--fg-3); }
.stat__v {
  display: block; margin-top: 5px;
  font-size: 25px; font-weight: 800; letter-spacing: -.7px;
  color: var(--fg);
}
.stat__v small { font-size: 12.5px; font-weight: 700; margin-left: 2px; color: var(--fg-3); }

/* ── 문진표 ───────────────────────────────────────────────── */
/* 주관식 답변 — 회색 상자 대신 브랜드 틴트 */
.ans {
  font-size: 15px; line-height: 1.55;
  white-space: pre-wrap;
  padding: 13px 15px;
  border-radius: var(--r-12);
  background: var(--bg-brand-weak);
  color: var(--brand-700);
  border-left: 3px solid var(--brand-300);
}

.q { padding: 20px 18px; background: var(--bg); border-radius: var(--r-20); margin-inline: var(--gutter); border: 1px solid var(--line-blue); box-shadow: var(--sh-card); }
.q + .q { margin-top: 12px; }
.q__no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: var(--r-6);
  background: var(--bg-brand-weak); color: var(--fg-brand);
  font-size: 12px; font-weight: 800;
  margin-right: 7px;
}
.q__t { font-size: 15.5px; font-weight: 600; line-height: 1.45; margin-bottom: 14px; }
.q__t .req { color: var(--danger); }

/* ── 진행 표시 ────────────────────────────────────────────── */
.prog { height: 3px; background: var(--g150); overflow: hidden; }
.prog__b { height: 100%; background: var(--brand-500); transition: width var(--t-base); }

/* ── 스크롤바 (데스크톱) ──────────────────────────────────── */
@media (min-width: 520px) {
  .page::-webkit-scrollbar { width: 6px; }
  .page::-webkit-scrollbar-thumb { background: var(--g300); border-radius: 3px; }
  .page::-webkit-scrollbar-track { background: transparent; }
}

/* ═══════════════════════════════════════════════════════════
 * 오른쪽 플로팅 퀵메뉴 (홈페이지 quick 배너 이식)
 *
 * .app 안에 absolute 로 두어 데스크톱에서도 기기 프레임을 벗어나지 않는다.
 * 탭바 위에 떠 있고, 열면 위쪽으로 펼쳐진다.
 * ═══════════════════════════════════════════════════════════ */
.qm {
  position: absolute;
  right: 14px;
  bottom: calc(var(--tabbar-h) + var(--sa-bottom) + 14px);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;              /* 빈 영역은 아래 화면을 그대로 쓸 수 있게 */
}
.qm > * { pointer-events: auto; }

/* 펼쳐지는 목록 */
.qm__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 2px;
}
.qm__panel[hidden] { display: none; }

/* 이름표를 아이콘 아래쪽에 맞춘다 — 가운데보다 시선이 정돈된다 */
.qm__i {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  opacity: 0;
  transform: translateY(8px) scale(.94);
}
/* 열릴 때 아래에서부터 차례로 (전체 320ms 이내) */
.qm.is-open .qm__i {
  animation: qmIn 200ms cubic-bezier(.2, .8, .2, 1) var(--d, 0ms) both;
}
@keyframes qmIn {
  from { opacity: 0; transform: translateY(8px) scale(.94); }
  to   { opacity: 1; transform: none; }
}

/* 이름표 — 글자 수와 상관없이 폭·높이를 고정해 세로로 반듯하게 선다 */
.qm__t {
  position: relative;
  width: 76px;
  height: 28px;
  margin-bottom: 1px;              /* 아이콘 하단선에 맞춤 */
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-8);
  background: rgba(25, 31, 40, .86);
  color: #fff;
  font-size: 11.5px; font-weight: 600; letter-spacing: -.3px;
  white-space: nowrap;
}
/* 아이콘을 가리키는 꼬리 화살표
 * 이름표와 같은 색이면 묻히므로 해당 아이콘의 대표색(--arw)을 쓴다.
 * 이름표 자체는 고정하고 화살표만 움직인다 — 이름표를 흔들면 세로 정렬이 어긋나 보인다. */
.qm__t::after {
  content: '';
  position: absolute;
  right: -7px; top: 50%;
  transform: translate(0, -50%);
  border: 5px solid transparent;
  border-left-color: var(--arw, var(--brand-400));
  filter: drop-shadow(0 1px 2px rgba(25, 31, 40, .25));
}
/* 아이콘 쪽으로 톡톡 가리키는 신호 */
.qm.is-open .qm__t::after {
  animation: qmPoint 1.8s ease-in-out infinite;
  animation-delay: calc(var(--d, 0ms) + 260ms);
}
@keyframes qmPoint {
  0%, 100% { transform: translate(0, -50%);   opacity: .85; }
  50%      { transform: translate(4px, -50%); opacity: 1; }
}
.qm__b {
  flex: none;
  width: 42px; height: 42px;
  border-radius: var(--r-full);
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(25, 31, 40, .18);
  transition: transform var(--t-fast);
}
.qm__i:active .qm__b { transform: scale(.92); }

/* 여는 버튼
 * 가운데 접수 버튼이 이 화면의 주인공이므로, 퀵메뉴는 중립색으로 한 단계 낮춘다.
 * 파란 동그라미가 두 개면 어느 쪽을 눌러야 할지 헷갈린다. */
.qm__fab {
  width: 44px; height: 44px;
  border-radius: var(--r-full);
  background: var(--g800);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(25, 31, 40, .28);
  transition: transform var(--t-base), background var(--t-fast);
}
.qm__fab:active { transform: scale(.94); }
.qm.is-open .qm__fab { background: var(--g900); transform: rotate(135deg); }
.qm.is-open .qm__fab:active { transform: rotate(135deg) scale(.94); }

.qm__fab-ico { grid-area: 1 / 1; display: grid; }
.qm__fab-ico--close { display: none; }

/* 닫혀 있을 때 살짝 숨 쉬는 느낌 — 있는 줄 모르고 지나치지 않게 */
.qm:not(.is-open) .qm__fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-full);
  box-shadow: 0 0 0 0 rgba(13, 111, 184, .38);
  animation: qmPulse 2.6s ease-out infinite;
}
.qm__fab { position: relative; }
@keyframes qmPulse {
  0%       { box-shadow: 0 0 0 0 rgba(51, 61, 75, .34); }
  60%, 100%{ box-shadow: 0 0 0 11px rgba(51, 61, 75, 0); }
}

/* 열렸을 때 뒤를 살짝 덮어 목록에 집중시킨다 */
.qm-scrim {
  position: absolute; inset: 0;
  background: rgba(25, 31, 40, .28);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-base);
  z-index: 39;
}
.qm-scrim.is-on { opacity: 1; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .qm.is-open .qm__i { animation-duration: 1ms; }
  .qm.is-open .qm__t::after { animation: none; }
  .qm:not(.is-open) .qm__fab::after { animation: none; }
}

/* ── 데스크톱 안내 (앱 밖에서 볼 때) ──────────────────────── */
.deskhint {
  display: none;
  position: fixed; left: 24px; bottom: 24px;
  max-width: 220px;
  padding: 14px 16px;
  border-radius: var(--r-12);
  background: rgba(25, 31, 40, .82);
  color: #fff;
  font-size: 12.5px; line-height: 1.5;
}
@media (min-width: 1100px) { .deskhint { display: block; } }

/* ═══════════════════════════════════════════════════════════
 * 인바디 결과 (ib01)
 * ═══════════════════════════════════════════════════════════ */
/* 홈 인바디 진입 포인트 카드 */
.ib-entry {
  position: relative; display: flex; align-items: center; gap: 14px;
  margin-inline: var(--gutter); padding: 16px 18px;
  border-radius: var(--r-20); isolation: isolate; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-500) 45%, var(--brand-600) 100%);
  color: #fff; box-shadow: var(--sh-brand);
  transition: transform var(--t-fast);
}
.ib-entry::after {
  content: ''; position: absolute; right: -28px; top: -42px;
  width: 128px; height: 128px; border-radius: var(--r-full);
  background: rgba(255, 255, 255, .13); z-index: -1;
}
.ib-entry:active { transform: scale(.99); }
.ib-entry__ico {
  flex: none; width: 46px; height: 46px; border-radius: var(--r-14);
  background: rgba(255, 255, 255, .20); display: grid; place-items: center;
}
.ib-entry__tx { flex: 1; min-width: 0; }
.ib-entry__tx b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.ib-entry__tx i { font-style: normal; font-size: 12.5px; opacity: .86; }
.ib-entry__go { flex: none; opacity: .9; }

.ib-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ib-head__nm { font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.ib-head__nm .t-cap { font-weight: 500; margin-left: 4px; }
.ib-pastbtn {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px;
  border-radius: var(--r-full); background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--line-blue-strong);
  font-size: 12.5px; font-weight: 700; color: var(--brand-600); white-space: nowrap;
}
.ib-pastbtn:active { background: var(--bg-brand-weak); }

/* 사람 선택(본인/가족) 칩 */
.ib-persons { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 12px var(--gutter) 0; }
.ib-persons::-webkit-scrollbar { display: none; }
.ib-person {
  flex: none; height: 34px; padding: 0 15px; display: inline-flex; align-items: center; gap: 4px;
  border-radius: var(--r-full); background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-blue-strong);
  font-size: 13.5px; font-weight: 700; color: var(--fg-2); white-space: nowrap;
}
.ib-person i { font-style: normal; font-size: 10px; font-weight: 700; color: var(--fg-4); }
.ib-person.is-on { background: var(--bg-brand); box-shadow: none; color: #fff; }
.ib-person.is-on i { color: rgba(255,255,255,.8); }

/* ① 점수 */
.ib-score { display: flex; align-items: center; gap: 16px; }
.ib-score__gauge { flex: none; }
.ib-gauge__n { fill: var(--fg); font-weight: 800; font-size: 30px; font-family: var(--font); }
.ib-gauge__u { fill: var(--fg-3); font-size: 11px; font-weight: 700; font-family: var(--font); }
.ib-score__side { flex: 1; min-width: 0; }
.ib-score__t { font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.ib-score__d { font-size: 12.5px; color: var(--fg-3); margin-top: 4px; line-height: 1.5; }
.ib-score__mini { display: flex; gap: 10px; margin-top: 12px; }
.ib-score__mini span { flex: 1; background: var(--brand-50); border-radius: var(--r-12); padding: 9px 10px; }
.ib-score__mini i { display: block; font-size: 11.5px; color: var(--fg-3); font-style: normal; }
.ib-score__mini b { font-size: 17px; font-weight: 800; letter-spacing: -.4px; color: var(--brand-700); }
.ib-score__mini small { font-size: 11px; font-weight: 700; margin-left: 1px; opacity: .8; }

/* 막대 행 (골격근·지방 / 비만 / 부위별) */
.ib-rows { display: flex; flex-direction: column; gap: 13px; }
.ib-row { display: flex; align-items: center; gap: 10px; }
.ib-row__lb { flex: none; width: 58px; font-size: 13.5px; font-weight: 600; color: var(--fg-2); }
.ib-row__v  { flex: none; min-width: 58px; text-align: right; font-size: 14.5px; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.ib-row__v small { font-size: 11px; font-weight: 700; color: var(--fg-3); margin-left: 1px; }

.ib-bar { position: relative; flex: 1; height: 9px; border-radius: var(--r-full); background: var(--g150); overflow: hidden; }
.ib-bar--na { background: transparent; color: var(--fg-4); font-size: 12px; overflow: visible; height: auto; }
.ib-bar__std { position: absolute; top: 0; bottom: 0; background: rgba(0,168,98,.22); }
.ib-bar__base { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 2px; background: var(--line-strong); border-radius: 1px; z-index: 2; }
.ib-bar__fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: var(--r-full); z-index: 1; }
.ib-bar__fill--lo  { background: var(--warn); }
.ib-bar__fill--mid { background: var(--ok); }
.ib-bar__fill--hi  { background: var(--brand-500); }
.ib-bar__dot { position: absolute; top: 50%; width: 11px; height: 11px; margin-left: -6px; transform: translateY(-50%);
               border-radius: var(--r-full); background: #fff; box-shadow: 0 0 0 2px var(--fg-2); z-index: 3; }
.ib-bar--seg { overflow: visible; }

.ib-legend { display: flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 11.5px; color: var(--fg-3); }
.ib-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.ib-legend i:first-child { margin-left: 0; }
.ib-legend .lo { background: var(--warn); } .ib-legend .mid { background: var(--ok); } .ib-legend .hi { background: var(--brand-500); }

/* ⑤ 신체 변화 — 탭 + 큰 그래프 */
.ib-tabs { display: flex; gap: 6px; margin: 2px 0 14px; overflow-x: auto; scrollbar-width: none; }
.ib-tabs::-webkit-scrollbar { display: none; }
.ib-tab {
  flex: none; height: 32px; padding: 0 14px; border-radius: var(--r-full);
  background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line-blue-strong);
  font-size: 13px; font-weight: 600; color: var(--fg-2);
}
.ib-tab.is-on { background: var(--bg-brand); box-shadow: none; color: #fff; font-weight: 700; }
.ib-chart__now { display: flex; align-items: baseline; gap: 4px; margin-bottom: 2px; }
.ib-chart__now b { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.ib-chart__u { font-size: 13px; font-weight: 700; color: var(--fg-3); }
.ib-chart__diff { font-size: 12.5px; font-weight: 700; margin-left: 8px; }
.ib-chart__diff i { font-weight: 500; color: var(--fg-4); font-style: normal; font-size: 11px; }
.ib-chart__diff--up { color: var(--brand-600); } .ib-chart__diff--dn { color: var(--ok); } .ib-chart__diff--z { color: var(--fg-4); }
.ib-chart__svg { width: 100%; height: 150px; margin-top: 4px; display: block; }
.ib-chart__grid { stroke: var(--line-subtle); stroke-width: 1; }
.ib-chart__yl { fill: var(--fg-4); font-size: 9px; font-family: var(--font); }
.ib-chart__xl { fill: var(--fg-3); font-size: 10px; font-family: var(--font); }

/* 체성분 상세 표 */
.ib-dl { display: flex; flex-direction: column; }
.ib-dl__i { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; }
.ib-dl__i + .ib-dl__i { border-top: 1px solid var(--line-subtle); }
.ib-dl__t { flex: none; width: 68px; font-size: 13.5px; color: var(--fg-2); font-weight: 600; }
.ib-dl__v { flex: 1; font-size: 15px; font-weight: 800; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.ib-dl__v small { font-size: 11px; font-weight: 700; color: var(--fg-3); }
.ib-dl__s { flex: none; font-size: 11.5px; color: var(--fg-4); }

/* 지난 측정 팝업 (오버레이 하단 시트 — 모든 WebView 호환) */
.ib-modal { position: absolute; inset: 0; z-index: 60; display: flex; align-items: flex-end; }
.ib-modal[hidden] { display: none; }
.ib-modal__scrim { position: absolute; inset: 0; background: rgba(15, 18, 25, .5); }
.ib-modal__panel {
  position: relative; z-index: 1; width: 100%; max-height: 82vh;
  display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  border-radius: var(--r-24) var(--r-24) 0 0; box-shadow: var(--sh-3);
  padding-bottom: var(--sa-bottom);
  animation: ibSheet .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes ibSheet { from { transform: translateY(100%); } to { transform: none; } }
.ib-modal__bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; font-size: 16px; }
.ib-modal__x { color: var(--fg-3); display: grid; place-items: center; }
.ib-modal__list { flex: 1; overflow-y: auto; padding: 0 12px 14px; }
.ib-past__i { display: flex; align-items: center; gap: 10px; padding: 12px 8px; border-radius: var(--r-12); }
.ib-past__i + .ib-past__i { border-top: 1px solid var(--line-subtle); }
.ib-past__i.is-on { background: var(--bg-brand-weak); }
.ib-past__i:active { background: var(--g50); }
.ib-past__dt { flex: none; width: 76px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ib-past__dt small { display: block; font-size: 11px; font-weight: 500; color: var(--fg-4); }
.ib-past__col { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.ib-past__col i { font-size: 10.5px; color: var(--fg-4); font-style: normal; }
.ib-past__col b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.ib-past__col b small { font-size: 10px; font-weight: 700; color: var(--fg-3); }
.ib-past__d { font-size: 11px; font-weight: 700; margin-top: 2px; }
.ib-past__d--up { color: var(--brand-600); } .ib-past__d--dn { color: var(--ok); } .ib-past__d--z { color: var(--fg-4); font-weight: 500; }
.ib-past__chev { flex: none; color: var(--fg-4); }

/* 체성분 요약 그리드 */
.ib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.ib-cell { background: var(--g50); border: 1px solid var(--line-blue); border-radius: var(--r-12); padding: 11px 12px; }
.ib-cell i { display: block; font-size: 11.5px; color: var(--fg-3); font-style: normal; }
.ib-cell b { font-size: 16px; font-weight: 800; letter-spacing: -.4px; margin-top: 2px; display: block; }
.ib-cell small { font-size: 10.5px; font-weight: 700; color: var(--fg-3); margin-left: 1px; }
.ib-goal { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-subtle); }
.ib-goal span { flex: 1; text-align: center; }
.ib-goal i { display: block; font-size: 11.5px; color: var(--fg-3); font-style: normal; }
.ib-goal b { font-size: 15px; font-weight: 800; letter-spacing: -.3px; }

/* ═══════════════════════════════════════════════════════════
 * 진료 예약 (rv01 예약하기 · rv02 내 예약 · 홈 진입 카드)
 * ═══════════════════════════════════════════════════════════ */

/* 홈 진입 카드 — 인바디 카드와 같은 모양, 색만 밝게 */
.rv-entry {
  position: relative; display: flex; align-items: center; gap: 14px;
  margin-inline: var(--gutter); padding: 16px 18px;
  border-radius: var(--r-20); isolation: isolate; overflow: hidden;
  background: var(--bg); color: var(--fg);
  border: 2px solid #2BB5A3;                         /* 실제 테두리 — 장식 원이 테두리를 덮지 않게 */
  box-shadow: 0 8px 22px rgba(18, 165, 148, .16);
  transition: transform var(--t-fast);
}
.rv-entry::after {
  content: ''; position: absolute; right: -34px; top: -56px;
  width: 116px; height: 116px; border-radius: var(--r-full);
  background: #E3F6F3; z-index: -1;
}
.rv-entry:active { transform: scale(.99); }
.rv-entry__ico {
  flex: none; width: 46px; height: 46px; border-radius: var(--r-14);
  background: #E3F6F3; color: #0E8577; display: grid; place-items: center;
}
.rv-entry__tx { flex: 1; min-width: 0; }
.rv-entry__tx b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.rv-entry__tx i { display: block; font-style: normal; font-size: 12.5px; color: var(--fg-3); }
.rv-entry--has .rv-entry__tx b { color: #0E8577; margin: 1px 0; }
.rv-entry__go { flex: none; color: var(--fg-3); }

/* 단계 */
.rv-step { margin-top: 26px; }
.rv-step__t { display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-size: 15px; font-weight: 700; color: var(--fg); }
.rv-step__n { width: 22px; height: 22px; border-radius: var(--r-full); display: grid; place-items: center;
  background: var(--brand-500); color: #fff; font-size: 12px; font-weight: 800; }
/* 진료 구분 · 진료항목 — 아이콘이 있는 선택 카드 */
.rv-pick { display: grid; gap: 10px; }
.rv-pick--2 { grid-template-columns: 1fr 1fr; }
.rv-opt { position: relative; display: block; }
.rv-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.rv-opt__box {
  position: relative; display: flex; align-items: center; gap: 10px; height: 100%;
  min-height: 64px; padding: 12px 34px 12px 12px;
  border-radius: 16px; background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--line-blue), 0 1px 3px rgba(15, 40, 80, .04);
  transition: box-shadow var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.rv-opt:active .rv-opt__box { transform: scale(.985); }
.rv-opt__ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
}
.rv-c1 { background: #E8F1FD; color: #2F6FD6; }
.rv-c2 { background: #E3F6F3; color: #0E8577; }
.rv-c3 { background: #F0EBFD; color: #6B4FD8; }
.rv-c4 { background: #FDECF1; color: #D2456F; }
.rv-c5 { background: #FFF3E3; color: #C9741A; }
.rv-opt__tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rv-opt__tx b { font-size: 14.5px; font-weight: 700; color: var(--fg); letter-spacing: -.2px; line-height: 1.3; word-break: keep-all; }
.rv-opt__tx small { font-size: 11.5px; color: var(--fg-3); line-height: 1.35; }
.rv-opt__chk {
  position: absolute; top: 9px; right: 9px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; color: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line-blue-strong); transition: all var(--t-fast);
}
.rv-opt input:checked + .rv-opt__box {
  background: linear-gradient(180deg, #F5F9FF 0%, var(--bg-brand-weak) 100%);
  box-shadow: inset 0 0 0 2px var(--brand-500), 0 6px 16px rgba(32, 110, 210, .14);
}
.rv-opt input:checked + .rv-opt__box .rv-opt__tx b { color: var(--brand-600); }
.rv-opt input:checked + .rv-opt__box .rv-opt__chk { background: var(--brand-500); color: #fff; box-shadow: none; }
.rv-opt input:focus-visible + .rv-opt__box { box-shadow: inset 0 0 0 2px var(--brand-500), 0 0 0 3px var(--bg-brand-weak); }
.rv-opt input:disabled + .rv-opt__box { opacity: .6; }
.rv-opt input:disabled:checked + .rv-opt__box { opacity: 1; }

/* 달력 */
.rv-cal { border-radius: var(--r-20); padding: 14px 12px 12px; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-blue); }
.rv-cal__head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.rv-cal__head b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.rv-cal__nav { width: 34px; height: 34px; border-radius: var(--r-full); display: grid; place-items: center;
  background: var(--bg-brand-weak); color: var(--brand-600); border: 0; }
.rv-cal__nav:disabled { opacity: .3; }
.rv-cal__dow, .rv-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.rv-cal__dow span { font-size: 12px; font-weight: 600; color: var(--fg-3); padding-bottom: 6px; }
.rv-cal__dow .is-sun, .rv-day.is-sun { color: #E15B5B; }
.rv-cal__dow .is-sat, .rv-day.is-sat { color: #3D7BE0; }
.rv-day {
  position: relative; aspect-ratio: 1 / 1; max-height: 46px; width: 100%;
  border: 0; border-radius: var(--r-12, 12px); background: transparent;
  font-size: 15px; font-weight: 600; color: var(--fg);
}
.rv-day.is-off { color: var(--fg-3); opacity: .38; }
.rv-day.is-on { background: var(--bg-brand-weak); }
.rv-day.is-on i { position: absolute; left: 50%; bottom: 5px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--brand-500); }
.rv-day.is-today::before { content: '오늘'; position: absolute; top: 2px; left: 0; right: 0;
  font-size: 9px; font-weight: 700; color: var(--brand-500); }
.rv-day.is-sel { background: var(--brand-500); color: #fff; }
.rv-day.is-sel i { background: #fff; }
.rv-day.is-sel::before { color: #fff; }
.rv-cal__hint { margin: 10px 0 2px; text-align: center; font-size: 13px; color: var(--fg-3); }
/* 휴진일 — 눌러서 이유를 볼 수 있게 흐리게 하지 않고 빨간 글씨로 */
.rv-day.is-closed { background: #FFF3F3; color: #E15B5B; }
.rv-day.is-closed em { position: absolute; left: 0; right: 0; bottom: 3px; font-style: normal;
  font-size: 9.5px; font-weight: 800; letter-spacing: -.3px; color: #E15B5B; }
.rv-cal__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin: 10px 0 0;
  font-size: 12px; color: var(--fg-2); }
.rv-cal__legend span { display: inline-flex; align-items: center; gap: 5px; }
.rv-cal__legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--g100, #F2F4F6); }
.rv-cal__legend i.is-on { background: var(--bg-brand-weak); box-shadow: inset 0 0 0 1px var(--brand-200, #B8D4F5); }
.rv-cal__legend i.is-closed { background: #FFE3E3; }

/* 예약 완료 화면 */
.rvc { padding-top: 12px; }
.rvc__hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 8px 22px; }
.rvc__ok { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: var(--brand-500); box-shadow: 0 10px 24px rgba(49, 130, 246, .28); animation: rvcPop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes rvcPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.rvc__hero h1 { margin: 16px 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.rvc__hero p { margin: 0; font-size: 14.5px; color: var(--fg-2); line-height: 1.55; }
.rvc__card { border-radius: var(--r-20); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-blue), 0 4px 14px rgba(0, 40, 100, .05);
  overflow: hidden; animation: rvUp .5s .1s cubic-bezier(.2, .8, .2, 1) both; }
.rvc__when { padding: 18px 18px 16px; background: var(--bg-brand-weak); text-align: center; }
.rvc__when small { display: block; font-size: 13px; font-weight: 700; color: var(--brand-600); }
.rvc__when b { display: block; margin-top: 4px; font-size: 24px; font-weight: 800; letter-spacing: -.6px; color: var(--fg); }
.rvc__when b span { color: var(--brand-600); margin-left: 6px; }
.rvc__row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line, #EEF1F4); }
.rvc__row img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--bg-brand-weak); flex: none; }
.rvc__row dt { flex: none; width: 64px; font-size: 13.5px; color: var(--fg-3); }
.rvc__row dd { margin: 0; font-size: 15px; font-weight: 700; color: var(--fg); }
.rvc__row .rvc__doc b { display: block; font-size: 16px; font-weight: 800; }
.rvc__row .rvc__doc span { font-size: 13px; color: var(--fg-3); }
.rvc__sym { font-weight: 500 !important; color: var(--fg-2) !important; white-space: pre-line; }
.rvc__info { margin-top: 14px; padding: 14px 16px; border-radius: var(--r-16, 16px); background: var(--g50, #F9FAFB);
  font-size: 13.5px; color: var(--fg-2); line-height: 1.6; }
.rvc__info p { margin: 0; display: flex; gap: 8px; }
.rvc__info p + p { margin-top: 6px; }
.rvc__info svg { flex: none; margin-top: 2px; color: var(--brand-500); }

/* 원장님 · 시간 */
.rv-doc { padding: 14px; margin-bottom: 10px; border-radius: var(--r-20); background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-blue); }
.rv-doc__top { display: flex; align-items: center; gap: 12px; }
.rv-doc__ph { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover;
  background: var(--bg-brand-weak); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--brand-100, #DCEAFB); }
.rv-doc__nm { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.rv-doc__nm small { font-size: 12.5px; font-weight: 600; color: var(--fg-3); margin-left: 2px; }
.rv-doc__in { margin: 2px 0 0; font-size: 12.5px; color: var(--fg-3); line-height: 1.45; }
.rv-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.rv-slot { height: 40px; border: 0; border-radius: var(--r-12, 12px); background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--line-blue-strong);
  font-size: 14px; font-weight: 700; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.rv-slot.is-sel { background: var(--brand-500); color: #fff; box-shadow: none; }

/* 하단 확인 줄 — 화면에 고정하면 달력 아랫줄을 가려서 맨 아래에 그냥 둔다 */
.rv-bar { margin-top: 20px; }
.rv-bar__sum { margin: 0 0 8px; font-size: 13.5px; color: var(--fg-2); text-align: center; line-height: 1.45; }
.rv-bar__sum b { color: var(--brand-600); }

/* 내 예약 */
.rv-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  padding: 22px 16px; border-radius: var(--r-20); background: var(--bg-brand-weak); }
.rv-done__ico { color: var(--brand-500); margin-bottom: 4px; }
.rv-done b { font-size: 17px; font-weight: 800; color: var(--brand-600); }
.rv-done span { font-size: 13px; color: var(--fg-2); }
.rv-card { margin-top: 12px; padding: 16px; border-radius: var(--r-20); background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line-blue); }
.rv-card.is-focus { box-shadow: inset 0 0 0 1.8px var(--brand-500); }
.rv-card__when { display: flex; align-items: center; gap: 8px; }
.rv-card__when b { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.rv-card__tm { font-size: 20px; font-weight: 800; color: var(--brand-600); font-variant-numeric: tabular-nums; }
.rv-card__when .badge { margin-left: auto; }
.rv-card__who { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.rv-card__who img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--bg-brand-weak); }
.rv-card__who b { display: block; font-size: 14.5px; }
.rv-card__who span { font-size: 12.5px; color: var(--fg-3); }
.rv-card__sym { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-12, 12px);
  background: var(--bg-canvas); font-size: 13px; color: var(--fg-2); }
.rv-card__rule { display: flex; align-items: center; gap: 5px; margin: 12px 0 0; font-size: 12.5px; color: var(--brand-600); }
.rv-card__rule.is-off { color: var(--fg-3); align-items: flex-start; }
.rv-card__rule svg { flex: none; }
.btn-row > form { flex: 1; display: flex; }
.rv-past { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 2px; border-bottom: 1px solid var(--line-subtle); }
.rv-past b { display: block; font-size: 14px; }
.rv-past span { font-size: 12.5px; color: var(--fg-3); }

/* ── 접수·예약 고르는 화면 (rc00) ── */
.rc0-state { margin: 14px 0 0; font-size: 13px; color: var(--brand-600); font-weight: 600; }
.rc0-state.is-off { color: var(--fg-3); font-weight: 500; }
.rc0-next { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px;
  border-radius: var(--r-14); background: var(--bg-brand-weak); color: var(--fg); }
.rc0-next span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rc0-next small { font-size: 11.5px; color: var(--fg-3); }
.rc0-next b { font-size: 15px; font-weight: 800; color: var(--brand-600); }
.rc0-next i { font-style: normal; font-size: 12.5px; color: var(--fg-2); }
.rc0-next svg { flex: none; color: var(--fg-3); }

/* ── 내역 탭 위 접수 / 예약 전환 ── */
.hx-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px;
  border-radius: var(--r-14); background: var(--bg-brand-weak); }
.hx-tab { display: grid; place-items: center; height: 42px; border-radius: 11px;
  font-size: 15px; font-weight: 700; color: var(--fg-3); }
.hx-tab.is-on { background: var(--bg); color: var(--brand-600); box-shadow: 0 1px 4px rgba(15, 40, 80, .10); }

/* 하단 탭 이름이 길어도(접수·예약) 한 줄로 */
.tab__label { white-space: nowrap; }

/* 접수·예약 화면의 진료 예약 카드 — 방문 접수(파랑)와 구분되는 청록 테두리 */
.cta--rv { border: 2px solid #2BB5A3; box-shadow: 0 8px 22px rgba(18, 165, 148, .14); }
.cta--rv .cta__ico { background: #E3F6F3; color: #0E8577; }
/* ═══ 알림함 (ms01) ═══════════════════════════════════════════
 * 새 알림은 왼쪽 색 띠 + 연한 바탕 + NEW. 종류별 색:
 * 취소·예약제한 빨강 / 변경 초록 / 미리알림 주황 / 확정·접수 파랑 / 병원 알림 보라 */
.nt-count { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px;
  background: #E5484D; color: #fff; font-size: 12px; font-weight: 800; }
.nt {
  --c: var(--brand-500); --c-weak: var(--bg-brand-weak);
  position: relative; display: flex; gap: 12px; padding: 14px 14px 14px 16px; margin-bottom: 8px;
  border-radius: 16px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-blue);
  overflow: hidden;
}
.nt--red    { --c: #E5484D; --c-weak: #FDECEC; }
.nt--green  { --c: #18A058; --c-weak: #E6F6EC; }
.nt--amber  { --c: #D9821E; --c-weak: #FFF3E3; }
.nt--violet { --c: #6B4FD8; --c-weak: #F0EBFD; }
.nt__ico { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--c-weak); color: var(--c); }
.nt__body { flex: 1; min-width: 0; }
.nt__top { display: flex; align-items: center; gap: 6px; }
.nt__t { font-size: 14.5px; font-weight: 700; color: var(--c); letter-spacing: -.2px; }
.nt__new { height: 18px; padding: 0 6px; border-radius: 999px; background: #E5484D; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 18px; letter-spacing: .3px; }
.nt__ago { margin-left: auto; font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.nt__msg { margin: 4px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--fg-2); white-space: pre-line; word-break: keep-all; }

/* 새 알림 */
.nt.is-new { background: linear-gradient(90deg, var(--c-weak) 0%, var(--bg) 70%);
  box-shadow: inset 0 0 0 1.5px var(--c); }
.nt.is-new::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.nt.is-new .nt__msg { color: var(--fg); }

/* 지난 알림 — 차분하게 */
.nt:not(.is-new) { opacity: .82; }
.nt:not(.is-new) .nt__t { font-weight: 600; }

.nt-div { display: flex; align-items: center; gap: 10px; margin: 18px 2px 10px; font-size: 12px; font-weight: 700; color: var(--fg-3); }
.nt-div::before, .nt-div::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.nt.is-new .nt__ico { background: #fff; box-shadow: 0 1px 3px rgba(15, 40, 80, .08); }


/* 내역(전체) — 접수 / 예약 구분 표시 */
.hx-sec { margin: 22px 0 10px; }
.hx-kind { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-right: 4px; border-radius: 6px;
  font-size: 11px; font-weight: 800; vertical-align: 1px; }
.hx-kind--rc { background: var(--bg-brand-weak); color: var(--brand-600); }
.hx-kind--rv { background: #E3F6F3; color: #0E8577; }
.item.hx-rv { border-color: #BFE6E0; }   /* 예약은 청록 테두리로 접수와 구분 (원래 그림자는 그대로) */
/* 진료 예약 — 단계가 아래에서 스르륵 올라온다 */
@keyframes rvUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.rv-in { animation: rvUp .48s cubic-bezier(.2, .8, .2, 1) both; }
#stepTail.rv-in { animation-duration: .55s; }
@media (prefers-reduced-motion: reduce) { .rv-in { animation: none; } }
