/* 원장 웹앱 — 폰 폭(390px) 우선, 다크/라이트 자동 */
:root {
  /* BE BORN 브랜드 1안 (2026-10-20): Cream #F7EEE3 · Beige #DEC0A4 · Burgundy #5E1C22 · Cocoa #2E1B18 */
  --cream: #F7EEE3; --beige: #DEC0A4; --burgundy: #5E1C22; --cocoa: #2E1B18;
  --bg: var(--cream); --card: #FFFCF8; --ink: var(--cocoa); --mute: #7A655C;
  --line: color-mix(in srgb, var(--beige) 62%, var(--card)); --soft: color-mix(in srgb, var(--beige) 24%, var(--cream));
  --cardline: color-mix(in srgb, var(--beige) 20%, transparent);
  --accent: var(--burgundy); --accent-ink: var(--cream); --brand: var(--burgundy);
  --tab-off: color-mix(in srgb, var(--cocoa) 55%, transparent);
  --ok: #4C7A48; --warn: #A8641C; --bad: #B8402F;
  --c-consult: #5E7493; --c-s1: #C39A77; --c-s2: #A97C5B; --c-s3: #8C5F44; --c-s4: #6B4232;
  --c-retouch: #4E8478; --c-revisit: #84688F;
  --st0: var(--cocoa); --st1: #C4466F; --st2: #4C7A48;   /* 시술자 테두리: 원장 · 지영 · (셋째) */
  --radius: 14px; --tabh: 62px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--cocoa); --card: #3A2521; --ink: var(--cream); --mute: #BCA697;
    --line: #56403A; --soft: #452E29; --cardline: color-mix(in srgb, var(--beige) 22%, transparent);
    --accent: var(--beige); --accent-ink: var(--cocoa); --brand: var(--cream);
    --tab-off: color-mix(in srgb, var(--cream) 55%, transparent);
    --ok: #8FC088; --warn: #E2AA5E; --bad: #EC8778;
    --c-consult: #7F96B8; --c-s1: #CFA982; --c-s2: #B88D68; --c-s3: #9C6F50; --c-s4: #7E553E;
    --c-retouch: #69A898; --c-revisit: #A58DB2;
    --st0: var(--cream); --st1: #F07FA5; --st2: #8FC088;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.5 -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  padding-bottom: calc(var(--tabh) + env(safe-area-inset-bottom) + 12px); -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 12px 16px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand .mark { display: block; height: 22px; width: auto; }
.wordmark { font-family: Georgia, "Times New Roman", "Apple SD Gothic Neo", serif; font-size: 18px; font-weight: 400;
  letter-spacing: .16em; line-height: 22px; color: var(--brand); white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top-meta { color: var(--mute); font-size: 13px; text-align: right; }
main { padding: 12px 16px; max-width: 760px; margin: 0 auto; }
h2 { font-size: 17px; margin: 18px 2px 8px; }
h3 { font-size: 15px; margin: 14px 0 6px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(6, 1fr);
  height: calc(var(--tabh) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line); }
.tabs button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px; font-size: 11px; color: var(--tab-off); cursor: pointer; }
.tabs button .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--accent); font-weight: 700; }
.tabs button.on::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 26px; height: 2px; margin-left: -13px;
  border-radius: 1px; background: var(--accent); }
.badge { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; font-weight: 700; text-align: center; }
.badge:empty { display: none; }

.card { background: var(--card); border: 1px solid var(--cardline); border-radius: var(--radius); padding: 12px; margin: 10px 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.mute { color: var(--mute); }
.small { font-size: 13px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line);
  font-size: 12px; white-space: nowrap; }
.chip.accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.chip.ok { color: var(--ok); } .chip.warn { color: var(--warn); } .chip.bad { color: var(--bad); }

.btn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 12px; min-height: 40px; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 9px 10px; min-height: 40px; }
textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
textarea.draft { background: var(--soft); min-height: 120px; }
label.f { display: block; font-size: 12px; color: var(--mute); margin: 8px 0 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 8px; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 7px 4px; min-height: 40px; font-size: 13px; }
.seg button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.chips button.on { background: var(--ink); color: var(--bg); border-color: transparent; }

.picker { position: relative; }
.picker .results { position: absolute; z-index: 4; left: 0; right: 0; top: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; margin-top: 4px; max-height: 220px; overflow: auto; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.picker .results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.picked { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px dashed var(--accent); border-radius: 10px; }

.inq header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inq .orig { margin: 6px 0; padding: 8px 10px; background: var(--bg); border-radius: 10px; font-size: 14px; white-space: pre-wrap;
  max-height: 4.5em; overflow: hidden; cursor: pointer; }
.inq .orig.open { max-height: none; }
.sum { margin: 8px 0; font-weight: 600; }
.warnbox { margin: 6px 0; padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); font-size: 13px; }
.proposal { margin-top: 10px; padding: 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c-consult) 50%, var(--line));
  background: color-mix(in srgb, var(--c-consult) 8%, var(--card)); }
.pending { display: flex; align-items: center; gap: 8px; padding: 12px 4px; color: var(--mute); }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: sp 0.8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.thumb { position: relative; }
.thumb span { position: absolute; left: 3px; bottom: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; padding: 0 4px; border-radius: 4px; }

/* 캘린더 */
.calbar { display: flex; align-items: center; gap: 6px; }
.calbar .seg { flex: none; }
.calbar .seg button { min-width: 44px; }
.calbar .range { flex: 1; text-align: center; font-weight: 700; font-size: 14px; }
.today { border-left: 4px solid var(--accent); }
.today li { margin: 2px 0; }
.today ul { margin: 4px 0 0; padding-left: 18px; }
.week { position: relative; display: grid; grid-template-columns: 34px repeat(6, 1fr); border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); overflow: hidden; }
.week .dh { position: sticky; top: 0; text-align: center; font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--card); }
.week .dh.now { color: var(--accent); font-weight: 800; }
.week .gut { font-size: 10px; color: var(--mute); text-align: right; padding-right: 3px; }
.col { position: relative; border-left: 1px solid var(--line); }
.slot { height: 26px; border-top: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); }
.slot.hour { border-top: 1px solid var(--line); }
.slot.closed { background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 4px, transparent 4px, transparent 8px); }
.ev { position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 2px 4px; font-size: 10.5px; line-height: 1.25;
  color: #fff; overflow: hidden; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.ev b { display: block; font-size: 11px; }
.ev.done { opacity: .55; } .ev.noshow { opacity: .45; text-decoration: line-through; }
.ev .free { display: block; margin-top: 1px; font-size: 9.5px; background: rgba(255,255,255,.25); border-radius: 4px; padding: 0 3px; }
.k-consult { background: var(--c-consult); } .k-s1 { background: var(--c-s1); } .k-s2 { background: var(--c-s2); }
.k-s3 { background: var(--c-s3); } .k-s4 { background: var(--c-s4); } .k-retouch { background: var(--c-retouch); } .k-revisit { background: var(--c-revisit); }
.legend { display: flex; gap: 8px; flex-wrap: wrap; font-size: 11px; color: var(--mute); margin: 8px 2px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 3px; vertical-align: -1px; }
.day { display: grid; grid-template-columns: 44px 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.day .ev { font-size: 13px; padding: 4px 8px; left: 4px; right: 4px; }
.day .ev b { font-size: 13px; }
.day .ev .free { font-size: 12px; display: inline-block; margin-top: 2px; }

/* 손님 */
.clist .c { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.clist .c:last-child { border-bottom: 0; }
.clist { padding: 0; overflow: hidden; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--accent); } .dots i.r { border-radius: 2px; } .dots i.r.on { background: var(--c-retouch); }
.prog { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0; }
.prog div { text-align: center; padding: 8px 0; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: 12px; }
.prog div.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.prog div.r.on { background: var(--c-retouch); color: #fff; }
.prog div.off { opacity: .35; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--mute); } .kv dd { margin: 0; text-align: right; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.tl time { display: block; font-size: 11px; color: var(--mute); }
.draftbox { margin: 8px 0; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }

/* 알림 */
.al .t { font-weight: 700; font-size: 14px; }
.al.upcoming { border-style: dashed; }
.sec-h { display: flex; align-items: center; justify-content: space-between; }

/* 시트·토스트 */
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.sheet-body { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; background: var(--bg);
  border-radius: 18px 18px 0 0; padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); max-width: 760px; margin: 0 auto; }
.sheet-body.full { top: 0; max-height: none; border-radius: 0; }
.sheet-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sheet-h h2 { margin: 0; flex: 1; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabh) + 18px); z-index: 30; background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: 12px; font-size: 14px; text-align: center; white-space: pre-line; }
.login { max-width: 320px; margin: 40px auto; text-align: center; }
.pin { font-size: 28px; letter-spacing: .5em; text-align: center; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.keys button { min-height: 56px; font-size: 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.empty { text-align: center; color: var(--mute); padding: 24px 8px; }
@media (min-width: 700px) { .week .ev { font-size: 12px; } }
/* 메타 채널 [보내기] 상태 (2026-10-15) */
.sendst { font-size: 12px; margin-top: 6px; padding: 5px 9px; border-radius: 8px; background: var(--soft); color: var(--ok); }
.sendst.human_agent { color: var(--warn); }
.sendst.copy { color: var(--mute); }
.chlist div { padding: 3px 0; }
input[readonly] { background: var(--soft); color: var(--mute); }
/* 시술자 2명 (2026-10-15) — 주간: 색 테두리 + 머리글자, 겹치는 시간만 반반 / 일간: 시술자별 열 */
.ev.st0 { border-left: 4px solid var(--st0); } .ev.st1 { border-left: 4px solid var(--st1); } .ev.st2 { border-left: 4px solid var(--st2); }
.ev.stx { border-left: 4px dashed var(--mute); }
.ev.half-l { right: 50%; } .ev.half-r { left: 50%; }
.ev .who { float: right; margin: 0 0 0 2px; }
.who { display: inline-block; font-style: normal; font-size: 10px; font-weight: 700; line-height: 1.5; padding: 0 4px; border-radius: 4px;
  background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.who.st0 { background: var(--st0); color: var(--bg); border-color: transparent; }
.who.st1 { background: var(--st1); color: #fff; border-color: transparent; }
.who.st2 { background: var(--st2); color: #fff; border-color: transparent; }
.day .ev .who { font-size: 11px; }
.ev .free.alt { background: rgba(255,255,255,.4); }
.chip.alt { color: var(--st1); border-color: color-mix(in srgb, var(--st1) 40%, var(--line)); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.dot.st0 { background: var(--st0); } .dot.st1 { background: var(--st1); } .dot.st2 { background: var(--st2); }
.legend .bar { width: 4px; height: 11px; border-radius: 1px; margin: 0 2px 0 4px; }
.legend .bar.st0 { background: var(--st0); } .legend .bar.st1 { background: var(--st1); } .legend .bar.st2 { background: var(--st2); }
.staffseg { margin: 10px 0 6px; }
.staffseg button { min-height: 36px; }
.day.lanes .dh { text-align: center; font-size: 13px; font-weight: 700; padding: 5px 0; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.day.lanes .ev { left: 3px; right: 3px; font-size: 12px; padding: 3px 6px; }
.day.lanes .ev b { font-size: 12px; }
.day.lanes .ev .free { font-size: 11px; }
.pinmsg { margin: 10px 0 0; font-size: 14px; color: var(--warn); }
.pinmsg.locked { color: var(--bad); font-weight: 700; }
.ev .nm { display: block; }
.ev .badges { display: block; }
.day.lanes .ev .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day.lanes .ev .badges { display: flex; gap: 3px; flex-wrap: nowrap; overflow: hidden; }
.day.lanes .ev .badges .free { display: inline-block; margin-top: 1px; white-space: nowrap; }
.week .ev .who { position: absolute; top: 1px; right: 1px; float: none; margin: 0; font-size: 9px; line-height: 1.3; padding: 0 2px; border-radius: 3px; }
.week .ev.half-l, .week .ev.half-r { padding: 2px 2px; }
.week .ev.half-l .who, .week .ev.half-r .who { position: static; display: block; width: fit-content; margin-bottom: 1px; }

/* ---- 상담 녹음 · 시술 차팅 (2026-10-21) ---- */
:root { --assume-bg: #FFF4C7; --assume-line: #E6C65C; --assume-ink: #5B4500; --rec: #B8402F; }
@media (prefers-color-scheme: dark) { :root { --assume-bg: #4A3C14; --assume-line: #8C7430; --assume-ink: #F6E3A2; --rec: #EC8778; } }
.rc-notice p { margin: 8px 0; font-size: 14px; line-height: 1.5; }
.rc-notice p .small { font-size: 11px; }
.rc-notice.done p, .rc-notice.done > b { display: none; }
.rc-notice.done { padding: 4px 12px; } .rc-notice.done .chk { padding: 6px 2px; font-size: 14px; }
.chk { display: flex; gap: 10px; align-items: center; font-weight: 700; padding: 10px 2px; cursor: pointer; }
.chk input { width: 22px; height: 22px; min-height: 0; margin: 0; flex: none; accent-color: var(--accent); }
.chk.big { font-size: 16px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.rc-clock { font-size: 60px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 2px; margin: 10px 0 0; line-height: 1.1; }
.rc-state { text-align: center; color: var(--mute); font-size: 14px; margin-bottom: 10px; }
.rc-state.live { color: var(--rec); font-weight: 700; animation: rcblink 1.4s ease-in-out infinite; }
@keyframes rcblink { 50% { opacity: .45; } }
.rc-who { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.rc-who[hidden] { display: none; }
.rc-who button { min-height: 92px; font-size: 24px; font-weight: 700; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; }
.rc-who button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.rc-who p { grid-column: 1 / -1; margin: 0; text-align: center; }
.rc-btns { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.rc-btns .btn { min-height: 56px; font-size: 15px; }
.draft-note { margin: 8px 0; padding: 5px 10px; border-radius: 8px; background: var(--soft); color: var(--mute); font-size: 12px; }
.rv-sum textarea { min-height: 64px; }
.assume { margin: 10px 0; padding: 10px 12px; border-radius: var(--radius); background: var(--assume-bg); border: 1px solid var(--assume-line); color: var(--assume-ink); }
.assume ul { margin: 6px 0 4px; padding-left: 18px; } .assume li { margin: 3px 0; font-size: 14px; }
.assume p { margin: 6px 0 0; } .assume p.small { opacity: .8; }
.tr summary { cursor: pointer; font-weight: 600; }
.tr ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 360px; overflow: auto; }
.tr li { display: grid; grid-template-columns: 40px 52px 1fr; gap: 6px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.tr time { color: var(--mute); font-variant-numeric: tabular-nums; }
.tr .sp { font-size: 12px; } .tr .sp.owner { color: var(--accent); } .tr .sp.customer { color: var(--c-consult); }
textarea.instr { min-height: 150px; font-size: 13px; }

/* ---- 그림 동의서 (2026-10-21) ---- */
.cd-steps { display: flex; gap: 4px; list-style: none; padding: 0; margin: 4px 0 8px; font-size: 12px; }
.cd-steps li { flex: 1; text-align: center; padding: 6px 2px; border-radius: 8px; background: var(--soft); color: var(--mute); white-space: nowrap; }
.cd-steps li.on { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.cd-steps li.done { color: var(--ok); }
.cd-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 2px; }
.cd-langs .btn { min-height: 58px; font-size: 16px; }
.cd-areas { flex-wrap: wrap; margin-top: 8px; }
.cd-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.cd-tools .btn { min-height: 36px; padding: 5px 10px; font-size: 13px; }
.cd-tools .btn.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.cd-sep { width: 1px; height: 24px; background: var(--line); margin: 0 2px; }
.cd-col { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--card); background: var(--c); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.cd-col.on { box-shadow: 0 0 0 3px var(--ink); }
.cd-draw { position: relative; width: 100%; max-width: 640px; margin: 0 auto; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.cd-draw svg, .cd-draw canvas, .cd-draw img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.cd-draw canvas { touch-action: none; cursor: crosshair; }
.cd-doc { font-size: 14px; line-height: 1.6; }
.cd-doc h2 { font-size: 15px; margin: 14px 0 4px; color: var(--accent); }
.cd-doc section:first-child h2 { margin-top: 4px; }
.cd-doc .note { color: var(--mute); font-size: 12px; }
.cd-doc ul { padding-left: 18px; }
.cd-sig { position: relative; }
.cd-sig canvas { display: block; width: 100%; height: 170px; border: 1.5px dashed var(--beige); border-radius: 10px; background: #fff; touch-action: none; }
.cd-sig.big canvas { height: 230px; }
.cd-sig .cd-sigclear { position: absolute; right: 6px; top: 6px; min-height: 32px; background: #fff; color: #2E1B18; }
.cd-cust { font-size: 18px; line-height: 1.6; }
.cd-cust h1 { font-size: 25px; margin: 10px 0 4px; }
.cd-cust h3 { margin: 0 0 6px; font-size: 19px; }
.cd-cust .cd-lead { margin: 0 0 6px; }
.cd-cust .cd-doc { font-size: 17px; }
.cd-cust .cd-doc h2 { font-size: 18px; }
.cd-cust .small { font-size: 15px; }
.cd-chk { font-weight: 500; align-items: flex-start; padding: 11px 2px; border-bottom: 1px dashed var(--line); }
.cd-chk input { width: 26px; height: 26px; margin-top: 2px; }
.cd-lockbar { position: sticky; top: -14px; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin: -14px -16px 0; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.cd-go { min-height: 62px; font-size: 20px; margin: 12px 0 30px; }
.cd-err { color: var(--bad); font-weight: 700; }
.cd-thanks { text-align: center; padding: 70px 10px; font-size: 22px; }
.cd-thanks .big { font-size: 70px; color: var(--ok); line-height: 1; }
.cd-pin { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cd-pin .card { width: 100%; max-width: 320px; }
.cd-pdf iframe { display: block; width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
body.cd-locked .top, body.cd-locked .tabs { display: none; }

/* ---- 오늘 = 원장 아침 화면 (2026-10-21) — 치과 레퍼런스 3편/37 틀, 색만 비본(크림·버건디 / 다크 코코아) ---- */
:root { --info: #3F6A9A; }
@media (prefers-color-scheme: dark) { :root { --info: #8FB3E0; } }
main.wide { max-width: 1180px; }
.mo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin: 4px 0 12px; }
.mo-hl { min-width: 0; flex: 1 1 300px; }
.mo-date { font-size: 13px; font-weight: 700; color: var(--mute); }
.mo-head h1 { font-size: 22px; line-height: 1.3; margin: 2px 0 4px; letter-spacing: -.01em; }
.mo-sub { margin: 0; font-size: 13px; color: var(--mute); }
.mo-pill { flex: none; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--card));
  color: var(--accent); border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mo-pill.need { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.mo-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.mo-kpis .mo-kpi:last-child { grid-column: 1 / -1; }
.mo-kpi { text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 0; background: var(--card); color: var(--ink);
  border: 1px solid var(--cardline); border-radius: var(--radius); padding: 10px 12px 11px; cursor: pointer; }
.mo-kpi .t { font-size: 12px; color: var(--mute); font-weight: 600; }
.mo-kpi .n { font-size: 28px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mo-kpi .n small { font-size: 14px; font-weight: 600; margin-left: 3px; color: var(--mute); }
.mo-kpi .s { font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; }
.s.ok { color: var(--ok); } .s.warn { color: var(--warn); } .s.bad { color: var(--bad); } .s.mute { color: var(--mute); font-weight: 500; }
.mo-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.mo-box { background: var(--card); border: 1px solid var(--cardline); border-radius: var(--radius); padding: 14px 14px 10px; min-width: 0; }
.mo-box h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.mo-cnt { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: color-mix(in srgb, var(--bad) 16%, var(--card));
  color: var(--bad); font-size: 13px; line-height: 22px; text-align: center; }
.mo-cnt.zero { background: var(--soft); color: var(--mute); }
.mo-leg { margin: 4px 0 6px; font-size: 12px; color: var(--mute); }
.mo-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 3px 0 7px; }
.mo-leg i:first-child { margin-left: 0; }
.mo-leg i.ok { background: var(--ok); } .mo-leg i.handoff, .mo-leg i.yellow { background: var(--warn); }
.mo-leg i.fail, .mo-leg i.red { background: var(--bad); } .mo-leg i.blue { background: var(--info); }
.mo-log { list-style: none; margin: 0; padding: 0; }
.mo-log li { display: grid; grid-template-columns: 38px 76px minmax(0, 1fr); gap: 8px; align-items: start; padding: 8px 0;
  border-bottom: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; }
.mo-log li.go { cursor: pointer; }
.mo-log time { color: var(--mute); font-variant-numeric: tabular-nums; padding-top: 2px; font-size: 12.5px; }
.mo-log .job { display: block; text-align: center; padding: 2px 4px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--ok) 14%, var(--card)); color: var(--ok); }
.mo-log .job.handoff { background: color-mix(in srgb, var(--warn) 17%, var(--card)); color: var(--warn); }
.mo-log .job.fail { background: color-mix(in srgb, var(--bad) 15%, var(--card)); color: var(--bad); }
.mo-log .res { overflow-wrap: anywhere; }
.mo-log .st { font-style: normal; font-size: 12px; font-weight: 700; margin-left: 2px; white-space: nowrap; color: var(--ok); }
.mo-log .st.handoff { color: var(--warn); } .mo-log .st.fail { color: var(--bad); }
.mo-more { display: block; margin: 8px auto 2px; border: 0; background: none; color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; font-size: 13.5px; cursor: pointer; padding: 6px; }
.mo-todo { list-style: none; margin: 0; padding: 0; }
.mo-todo li { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.mo-todo li:last-child { border-bottom: 0; }
.mo-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag.red { background: color-mix(in srgb, var(--bad) 16%, var(--card)); color: var(--bad); }
.tag.yellow { background: color-mix(in srgb, var(--warn) 18%, var(--card)); color: var(--warn); }
.tag.blue { background: color-mix(in srgb, var(--info) 16%, var(--card)); color: var(--info); }
.mo-todo .cat { font-size: 11.5px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--mute); }
.mo-todo b { font-size: 14.5px; overflow-wrap: anywhere; }
.mo-todo .d { font-size: 12.5px; color: var(--mute); overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .mo-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mo-kpis .mo-kpi:last-child { grid-column: auto; }
  .mo-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
}
/* 예약 확인 회신 · 대기자 */
.inq.folded { padding: 8px 12px; opacity: .8; }
.inq.folded .small { margin-top: 3px; }
.warnbox.bad { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); }
.warnbox .btn { margin-left: 4px; }
.ev .cf { font-weight: 700; }
.chip.cfy { color: var(--ok); } .chip.cfw { color: var(--warn); }
.wl-days button { min-width: 0; padding: 6px 0; }
.wl-row { padding: 4px 0; border-bottom: 1px dashed var(--line); }
.card.wl { padding: 10px 12px; }

/* ---- 후속 관리 · 기한 관리 · AI 답 채점 · AI 표시 (2026-10-21) ---- */
.ailbl { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600;
  line-height: 17px; color: var(--mute); background: color-mix(in srgb, var(--mute) 13%, transparent); vertical-align: 1px; }
.seg.cmode button { min-height: 36px; }
.fu-sub { margin: -2px 2px 6px; }
.card.fu { padding: 10px 12px; }
.fu-top { display: flex; gap: 10px; align-items: flex-start; }
.fu-sc { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 17px;
  background: var(--soft); color: var(--mute); border: 1px solid var(--line); }
.fu-sc.r1 { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.fu-sc.r2 { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.fu-name { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.fu-name a { color: inherit; }
.fu-why { margin-top: 2px; }
.fu-rules { padding: 8px 12px; }
.fu-rules summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.fu-rules table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12.5px; }
.fu-rules th { text-align: left; font-weight: 600; padding: 5px 8px 5px 0; vertical-align: top; width: 38%; }
.fu-rules td { padding: 5px 0; color: var(--mute); }
.fu-rules tr + tr th, .fu-rules tr + tr td { border-top: 1px solid var(--line); }
.tgl { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.tgl input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.aiprev { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.aiprev .bubble { margin-top: 4px; padding: 7px 9px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.dl-cnt { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 8px; }
.dl-cnt div { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; }
.dl-cnt span { font-size: 11px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-cnt b { font-size: 20px; line-height: 1.2; }
.dl-cnt .red b { color: var(--bad); } .dl-cnt .yellow b { color: var(--warn); } .dl-cnt .ok b { color: var(--ok); }
.dl { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; padding: 8px 4px 8px 10px; border-left: 3px solid var(--ok); }
.dl + .dl { border-top: 1px solid var(--line); }
.dl.red { border-left-color: var(--bad); } .dl.yellow, .dl.unknown { border-left-color: var(--warn); }
.dl .grow { flex: 1; min-width: 0; }
.dl-left { font-size: 13px; font-weight: 700; white-space: nowrap; }
.dl-left.red { color: var(--bad); } .dl-left.yellow { color: var(--warn); } .dl-left.unknown { color: var(--mute); font-weight: 600; }
.dl-btns { display: flex; gap: 6px; width: 100%; justify-content: flex-end; }
.gr-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px; }
.gr-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gr-txt { white-space: pre-wrap; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; }
.gr-txt.ans { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.gr-score { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gr-score button { min-height: 56px; font-size: 22px; font-weight: 800; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.gr-score button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.gr-legend { display: flex; justify-content: space-between; margin-top: 3px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips button.on { font-weight: 700; }
kbd { font: 11px/1 ui-monospace, monospace; padding: 2px 4px; border: 1px solid currentColor; border-radius: 4px; opacity: .6; margin-left: 4px; }
@media (max-width: 420px) { .gr-cmp, .aiprev { grid-template-columns: 1fr; } }
