/* 색·글꼴은 tools_mockup, solution/web 기준을 따라요. */
:root {
  --bg: #ffffff; --soft: #f9fafb; --sunk: #f2f4f6; --ink: #191f28; --ink-2: #4e5968; --muted: #6b7684; --faint: #b0b8c1; --line: #e5e8eb; --toast: #333d4b; --bad-strong: #f04452;
  --heading: #191f28; --blue: #3182f6; --blue-ink: #1b64da; --blue-soft: #e8f3ff; --blue-line: #c9e2ff; --on-blue: #ffffff;
  --ok: #029359; --ok-soft: #f0faf6; --warn: #ad500b; --warn-soft: #fbefe3; --warn-line: #ecc9a6;
  --bad: #d22030; --bad-soft: #ffeeee;
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111722; --soft: #1a2230; --sunk: #232d3d; --ink: #e8edf5; --ink-2: #c3ccd9; --muted: #a0abbb; --faint: #6b7684; --line: #2c3849; --toast: #4e5968; --bad-strong: #e42939;
    --heading: #f1f5fb; --blue: #4f86ec; --blue-ink: #9dbdf7; --blue-soft: #1c2b47; --blue-line: #2f4874; --on-blue: #0b1526;
    --ok: #58c48c; --ok-soft: #173126; --warn: #eba869; --warn-soft: #36261a; --warn-line: #5a3f27;
    --bad: #f08a80; --bad-soft: #3a201e;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--soft); color: var(--ink); font: 16px/1.6 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
h1, h2, h3, h4 { color: var(--heading); margin: 0; line-height: 1.35; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.wrap { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); display: grid; gap: 14px; }
.wrap-wide { max-width: 1120px; margin: 0 auto; padding: 24px 20px 60px; display: grid; gap: 18px; }
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-weight: 600; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--sunk); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.pri { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.btn.pri:hover { filter: brightness(.95); }
.btn.bad { color: var(--bad); }
.btn.sm { min-height: 36px; padding: 4px 10px; font-size: 14px; }
.btn.full { width: 100%; }
.btn.big { min-height: 56px; font-size: 18px; }
.link.center { justify-self: center; color: var(--muted); min-height: 44px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--blue-ink); text-decoration: underline; min-height: 44px; }
.link.bad { color: var(--bad); }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.blue { background: var(--blue-soft); color: var(--blue-ink); }
.warnbox { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.errbox { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.bar { height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--blue); }
textarea, .inp, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
textarea { min-height: 120px; resize: vertical; }
label { font-weight: 600; font-size: 14px; }
.toast { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); background: var(--heading); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100vw - 32px); z-index: 10; }

/* 직원 화면. 색과 글자 크기는 토스 TDS 공개 문서(Colors, Typography)를 따라요. */
body.staff { font-size: 17px; line-height: 1.5; background: var(--bg); }
.staff .wrap { max-width: 480px; gap: 16px; padding: 12px 20px 150px; }
.staff h1 { font-size: 22px; font-weight: 700; line-height: 1.4; }
.staff .btn { min-height: 56px; border-radius: 14px; border: 0; background: var(--sunk); color: var(--ink-2); font-size: 17px; font-weight: 600; transition: transform .1s, filter .1s; }
.staff .btn:active, .chip:active, .list-row:active { transform: scale(.98); filter: brightness(.96); }
.staff .btn:hover { background: var(--sunk); }
.staff .btn.pri { background: var(--blue); color: var(--on-blue); }
.staff .btn.pri:hover { background: var(--blue); filter: brightness(.97); }
.staff .btn.weak { background: var(--blue-soft); color: var(--blue-ink); }
.staff .btn.rec { width: 100%; min-height: 60px; font-size: 18px; background: var(--blue); color: var(--on-blue); }
.staff .btn.rec.on { background: var(--bad-strong); color: #fff; }
.caption { font-size: 15px; color: var(--muted); }
.caption.strong { font-weight: 600; color: var(--ink-2); }
.center { text-align: center; justify-self: center; }
.top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; margin: -12px -20px 0; padding: 0 20px; background: var(--bg); }
.top b { font-size: 17px; color: var(--heading); }
.back, .text-btn { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--muted); font-size: 15px; font-weight: 500; }
.back { color: var(--ink-2); font-size: 16px; }
.qtext { font-size: 22px; font-weight: 700; color: var(--heading); line-height: 1.41; margin: -8px 0 4px; }
.staff .bar { height: 4px; border-radius: 2px; margin-top: -8px; }
.chips { display: flex; gap: 6px; }
.chip { flex: 1 1 auto; min-height: 44px; padding: 0 8px; border: 0; border-radius: 12px; background: var(--sunk); color: var(--ink-2); font-size: 14px; font-weight: 500; white-space: nowrap; transition: transform .1s; }
.chip.blue { background: var(--blue-soft); color: var(--blue-ink); font-weight: 600; }
.dock { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 3; width: 100%; max-width: 480px; display: grid; gap: 8px; padding: 24px 20px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 78%, transparent); }
.dock.in-flow { position: static; transform: none; padding: 0; background: none; max-width: none; }
.dock-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dock-row .btn { white-space: nowrap; padding: 8px 6px; gap: 4px; }
.dock-row.tri { grid-template-columns: 1fr 1fr 1.3fr; }
.dock-row.tri .btn { font-size: 15px; padding: 8px 4px; }
.hint { margin: 0; text-align: center; font-size: 14px; color: var(--muted); }
.hint.big { font-size: 16px; color: var(--ink-2); padding: 12px 0; }
.timer { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; color: var(--heading); }
.staff textarea { min-height: 140px; border: 0; border-radius: 14px; background: var(--sunk); padding: 14px 16px; font-size: 17px; }
.staff textarea:focus, .staff .inp:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: var(--bg); }
.staff .inp { min-height: 56px; border: 0; border-radius: 14px; background: var(--sunk); padding: 0 16px; font-size: 17px; }
.staff label { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.item { background: var(--soft); border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; }
.item audio { width: 100%; height: 40px; }
.item img, .paper-img { width: 100%; border-radius: 10px; }
.item .row { color: var(--muted); }
.reply { background: var(--blue-soft); color: var(--blue-ink); border-radius: 12px; padding: 10px 12px; font-size: 15px; }
.pre { white-space: pre-wrap; }
.thick { height: 8px; margin: 8px -20px 0; background: var(--sunk); }
.menu { display: grid; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; font-size: 17px; font-weight: 500; transition: transform .1s; }
.list-row:last-child { border-bottom: 0; }
.list-row.q { align-items: flex-start; font-weight: 400; }
.list-row .num { flex: none; min-width: 22px; font-weight: 600; color: var(--muted); }
.list-row .grow { flex: 1; }
.row-end { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.row-end i { font-style: normal; font-size: 22px; color: var(--faint); line-height: 1; }
.tag { flex: none; font-size: 14px; font-weight: 600; color: var(--muted); }
.tag.ok { color: var(--ok); }
.check { display: flex; gap: 12px; align-items: center; min-height: 56px; font-weight: 400; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check input { width: 24px; height: 24px; margin: 0; flex: none; accent-color: var(--blue); }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.qlist { margin: 0; padding: 0 0 0 28px; display: grid; gap: 14px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.staff .toast { top: auto; bottom: calc(160px + env(safe-area-inset-bottom)); background: var(--toast); border-radius: 14px; }
.staff .errbox, .staff .warnbox { border: 0; border-radius: 14px; font-size: 15px; }

/* 관리 화면 */
.tablewrap { overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: var(--soft); }
tr:last-child td { border-bottom: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.field { display: grid; gap: 4px; }
.addrow { display: grid; grid-template-columns: 1fr 180px auto; gap: 8px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; font-weight: 600; color: var(--muted); }
.tabs button.on { color: var(--blue-ink); border-color: var(--blue); }
.transcript { background: var(--soft); border-radius: 8px; padding: 8px 10px; font-size: 14px; white-space: pre-wrap; }
@media (max-width: 640px) { .addrow { grid-template-columns: 1fr; } }

/* 인쇄 양식 */
.print { background: #fff; color: #000; padding: 20px; font-size: 14px; }
.print h1 { font-size: 18px; color: #000; margin-bottom: 6px; }
.print h3 { color: #000; font-size: 14px; }
.p-q { margin-top: 16px; break-inside: avoid; }
.p-lines i { display: block; height: 32px; border-bottom: 1px solid #999; }
.p-check { list-style: none; padding: 0; margin: 6px 0 0; line-height: 1.9; }
@media print { .noprint { display: none; } .print { padding: 0; } }
