/* 잇담 시연판 — 원래 앱(app.css) 모양을 그대로 쓰고, 시연에만 필요한 것만 더한다 */
:root { --demo: 44px; }

/* 맨 위 시연 막대: 앱 밖의 것, 어느 폰 화면인지 고른다 */
.demobar { position: fixed; inset: 0 0 auto; z-index: 40; height: calc(var(--demo) + var(--top)); padding: var(--top) var(--gutter) 0; display: flex; align-items: center; gap: 6px; background: var(--ink); color: #fff; font-size: 14px; }
.demobar span { font-weight: 700; margin-right: auto; opacity: .7; }
.demobar button { border: 0; background: none; color: #fff; font: inherit; font-weight: 600; min-height: 32px; padding: 0 12px; border-radius: 999px; opacity: .65; }
.demobar button[aria-pressed="true"] { background: #fff; color: var(--ink); opacity: 1; }
.appbar { top: var(--demo); padding-top: var(--top); }
main { padding-top: calc(var(--bar) + var(--demo) + var(--top) + 8px); }
body.no-tabs .tabbar { display: none; }
body.no-tabs main { padding-bottom: calc(var(--bottom) + 32px); }
body.no-tabs.has-action main { padding-bottom: calc(var(--tap) + 32px + var(--bottom) + 24px); }

/* 작은 표시: 미정 · 초안 · 새로 · 가안 */
.tag { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 999px; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line); vertical-align: 2px; margin-left: 6px; white-space: nowrap; }
.tag.on { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent-soft); }
.tag.warn { color: var(--warn); box-shadow: inset 0 0 0 1.5px var(--warn-line); }

/* 입력 칸 (가입·지난 기록) */
.field { display: grid; gap: 8px; margin-top: 20px; }
.field > .label { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.field input[type=text], .field input[type=tel], .field select { font: inherit; color: var(--ink); width: 100%; min-height: 52px; padding: 10px 14px; border-radius: var(--r-inner); border: 1.5px solid var(--line); background: var(--ground); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field .hint { font-size: 14px; color: var(--ink-2); }
.field.bad input { border-color: var(--warn-line); }
.field.bad .hint { color: var(--warn); }

/* 카테고리마다 있음·없음·건너뜀 */
.cats { list-style: none; margin: 12px 0 0; padding: 0; }
.cats > li { border-bottom: 1px solid var(--line); padding: 12px 0; }
.cats .q { display: flex; align-items: center; gap: 12px; }
.cats .q b { flex: 1; min-width: 0; font-size: 18px; }
.cats .seg { flex: none; width: 210px; }
.cats .seg span { min-height: 40px; font-size: 15px; }
.subs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 16px; font-weight: 600; color: var(--ink-2); }
.chip input:checked + span { background: var(--accent); color: #fff; box-shadow: none; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 동의 화면 */
.consent { list-style: none; margin: 20px 0 0; padding: 0; counter-reset: c; }
.consent > li { counter-increment: c; display: grid; grid-template-columns: 28px 1fr; gap: 4px 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.consent > li::before { content: counter(c); font-weight: 700; color: var(--accent); }
.consent b { display: block; }
.consent p { color: var(--ink-2); font-size: 16px; grid-column: 2; }
.agree { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.agree input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.agree small { display: block; color: var(--ink-2); font-size: 14px; }

/* 처방 변경 질문 */
.change { padding: 16px 0; border-bottom: 1px solid var(--line); }
.change .nm { font-weight: 700; }
.change .meta { color: var(--ink-2); font-size: 16px; }
.choices { display: grid; gap: 8px; margin-top: 12px; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choices span { display: flex; align-items: center; min-height: 52px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 600; }
.choices input:checked + span { background: var(--accent); color: #fff; box-shadow: none; }
.choices input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 검수: 흐리게 읽힌 칸 */
.kvs b.blur, .ing b.blur { color: var(--warn); }
.kvs b.blur::after { content: " 흐림"; font-size: 13px; font-weight: 700; }
.drugs-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 28px; }
.drugcard { padding-top: 16px; }
.drugcard > .nm { font-size: 19px; font-weight: 700; line-height: 1.35; }
.drugcard > .ing { color: var(--ink-2); font-size: 15px; }
.drugcard .kvs { margin: 4px 0 0; }
.drugcard .kvs li { min-height: 44px; }
.judge { text-align: center; color: var(--ink-2); font-size: 14px; margin: 0 0 8px; }

/* 복약표 */
.slotrow { padding: 16px 0; border-bottom: 1px solid var(--line); }
.slotrow .top { display: flex; align-items: baseline; gap: 10px; }
.slotrow .top b { font-size: 20px; }
.slotrow .top .num { color: var(--accent); font-weight: 700; }
.slotrow .top .cnt { margin-left: auto; font-weight: 700; }
.slotrow ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.slotrow li { color: var(--ink-2); font-size: 16px; }
.slotrow li s { color: var(--control); }
.slotrow.empty { opacity: .45; }
.meals { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* 부모님 폰: 큰 글씨 */
.parent { text-align: center; padding-top: 24px; font-size: 22px; }
.parent .date { font-size: 20px; }
.parent .headline { font-size: 30px; margin-top: 12px; }
.parent .big { font-size: 26px; font-weight: 700; margin-top: 28px; }
.parent .btn { min-height: 64px; font-size: 22px; width: 100%; }
.parent .btn-primary { margin-top: 32px; }
.parent .fine { font-size: 18px; }
.parent .changed { margin-top: 24px; font-size: 20px; color: var(--ink); }

/* 보호자 홈 */
.alert { padding: 18px 0; border-bottom: 1px solid var(--line); }
.alert .t { font-weight: 700; color: var(--warn); }
.alert .row2 { display: flex; gap: 8px; margin-top: 8px; }
.alert .row2 .btn { flex: 1; min-height: 48px; font-size: 17px; }
.quiet { padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--accent); font-weight: 700; }
.bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* 진료용 요약: 칸마다 이름표 한 줄 + 내용, 줄로만 나눔 */
.report .who { color: var(--ink-2); font-size: 16px; margin-top: 4px; }
.sum { padding: 18px 0; border-bottom: 1px solid var(--line); }
.sum .lab { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.sum .lab .num { color: var(--accent); margin-left: 4px; }
.sum .val { font-size: 18px; font-weight: 600; line-height: 1.5; }
.sum .when { font-weight: 400; color: var(--ink-2); font-size: 15px; margin-left: 4px; }
.sum .hosp { font-size: 14px; color: var(--ink-2); margin-top: 12px; }
.sum .lab + .hosp { margin-top: 0; }
.sum .small { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.sum.react .val { color: var(--warn); }
.report .sum:first-of-type { margin-top: 16px; border-top: 1px solid var(--line); }
.ans-no, .ans-skip { color: var(--ink-2); }
.ans-none { color: var(--control); }
.official { margin-top: 20px; color: var(--ink-2); font-size: 14px; }

.closed { border-bottom: 1px solid var(--line); }
.closed summary { min-height: 56px; display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; list-style: none; }
.closed summary::-webkit-details-marker { display: none; }
.closed[open] summary .chev { transform: rotate(90deg); }
.qr { display: block; width: 200px; height: 200px; margin: 24px auto 8px; }
.center { text-align: center; }
@media (max-width: 380px) { .cats .seg { width: 180px; } .cats .seg span { font-size: 14px; } }

/* 지난 기록: 한 화면에 질문 하나 */
.wizard { padding-top: 8px; }
.wizard .step { color: var(--accent); font-weight: 700; font-size: 15px; }
.wizard .bar { margin: 8px 0 24px; height: 6px; }
.wizard .headline { font-size: 26px; }
.wizard .choices span { min-height: 60px; font-size: 19px; }
.list.todo { margin-top: 8px; }
.list.todo > li { border-top: 1px solid var(--line); }
.list.todo .nm { color: var(--accent); }
.qr { cursor: pointer; }
