/* cocone booking 직원 화면 — 색·글자는 docs/design/booking-ui-rules.md v6 고정(바꾸려면 대표 승인). 파란색 없음 */
:root {
  --main: #3b2922;
  --sub: #6b4a3a;
  --bg: #f7f2eb;
  --sand: #e8d9c9;
  --card: #fffcf7;
  --warn: #9c4a2e;
  --warn-bg: #f5e1d6;
  --warn-bg2: #fbf1ea;
  --warn-line: #d8957a;
  --ok: #5e6b35;
  --ok-text: #4c5a27;
  --text: #2b1f1a;
  --text-sub: #6e5d52;
  --mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.brand { background: none; border: 0; padding: 4px 0; font-family: var(--mincho); font-size: 20px; color: var(--main); font-weight: 600; letter-spacing: .02em; }
.link { background: none; border: 0; color: var(--sub); font-size: 15px; padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }

main { max-width: 720px; margin: 0 auto; padding: 0 16px 120px; }
h1 { font-family: var(--mincho); color: var(--main); font-size: 24px; font-weight: 600; margin: 8px 0 16px; }
.note { font-size: 13px; color: var(--text-sub); margin: 6px 0; line-height: 1.5; }

/* 버튼 */
.btn-main { display: block; width: 100%; min-height: 60px; border: 0; border-radius: 14px; background: var(--main); color: #fff; font-size: 19px; font-weight: 700; letter-spacing: .04em; }
.btn-main:disabled { opacity: .45; cursor: default; }
.btn-sub { display: block; width: 100%; min-height: 52px; border: 1.5px solid var(--sub); border-radius: 14px; background: transparent; color: var(--sub); font-size: 17px; font-weight: 600; }
.btn-warn { display: block; width: 100%; min-height: 54px; border: 0; border-radius: 12px; background: var(--warn); color: #fff; font-size: 17px; font-weight: 700; }
.btn-warn:disabled { opacity: .45; }
.stack > * + * { margin-top: 12px; }

/* 홈 */
.home { display: flex; flex-direction: column; align-items: center; padding-top: 4vh; text-align: center; }
.alert { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--warn-bg2); border: 1px solid var(--warn-line); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; margin-bottom: 4vh; }
.alert button { background: none; border: 0; color: var(--warn); font-weight: 700; text-decoration: underline; }
.mic { width: min(62vw, 300px); aspect-ratio: 1; border-radius: 50%; border: 0; background: var(--main); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; box-shadow: 0 10px 30px rgba(59,41,34,.25); }
.mic svg { width: 34%; height: auto; }
.mic span { font-size: clamp(18px, 4.5vw, 24px); font-weight: 700; letter-spacing: .06em; }
.mic.on { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(59,41,34,.35); } 50% { box-shadow: 0 0 0 18px rgba(59,41,34,0); } }
.hint-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 22px 0 6px; max-width: 520px; }
.hint-tags span { background: var(--sand); color: var(--sub); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.home .link { margin-top: 18px; }

/* 말하기 */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1.5px solid var(--sub); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.seg button { border: 0; background: transparent; min-height: 46px; font-size: 16px; font-weight: 600; color: var(--sub); }
.seg button[aria-pressed="true"] { background: var(--sub); color: #fff; }
.listen { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 15px; margin: 4px 0 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--warn); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.transcript { width: 100%; min-height: 34vh; background: var(--card); border: 1.5px solid var(--sand); border-radius: 14px; padding: 14px; font-size: 18px; line-height: 1.7; resize: vertical; }
.transcript:focus { outline: 2px solid var(--sub); outline-offset: 1px; }
.interim { color: var(--text-sub); font-size: 16px; min-height: 1.6em; margin: 6px 2px; }

/* 내용 확인 */
.rows { background: var(--card); border: 1px solid var(--sand); border-radius: 14px; overflow: hidden; }
.row { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--sand); }
.row:first-child { border-top: 0; }
.row > label, .row > .lbl { font-size: 14px; color: var(--text-sub); font-weight: 600; }
.row.unsure { background: var(--warn-bg2); }
.row.unsure > label, .row.unsure > .lbl { color: var(--warn); }
.row.unsure > label::after, .row.unsure > .lbl::after { content: " 確認"; font-size: 12px; }
.row .val { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.row input, .row select { min-height: 44px; border: 1px solid transparent; border-bottom-color: var(--sand); background: transparent; border-radius: 8px; padding: 6px 8px; font-size: 17px; font-weight: 700; min-width: 0; width: 100%; }
.row input:focus, .row select:focus { border-color: var(--sub); background: #fff; outline: none; }
.row .half { flex: 1 1 8em; width: auto; }
.row .small { flex: 0 0 6.5em; width: 6.5em; }
.row .sub { font-size: 13px; color: var(--text-sub); width: 100%; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--sub); background: transparent; color: var(--sub); font-size: 22px; line-height: 1; }
.stepper output { min-width: 2.2em; text-align: center; font-size: 19px; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.chips button { border: 1px solid var(--warn-line); background: #fff; color: var(--warn); border-radius: 999px; padding: 6px 10px; font-size: 13px; }

.total { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--sand); margin-top: 14px; }
.total .sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 15px; color: var(--text-sub); }
.total .sum b { font-size: 22px; color: var(--text); }
.total .sum b.check { color: var(--warn); font-size: 18px; }
.err { color: var(--warn); font-size: 14px; font-weight: 600; margin: 0 0 8px; }

/* 결과·상태 */
.card { background: var(--card); border: 1px solid var(--sand); border-radius: 14px; padding: 16px; }
.card + .card { margin-top: 12px; }
.card .t { font-weight: 700; font-size: 17px; }
.card .m { font-size: 14px; color: var(--text-sub); margin-top: 4px; }
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.st.registering { color: var(--sub); }
.st.registered { color: var(--ok-text); }
.st.failed { color: var(--warn); }
.st.staff { color: var(--ok); }
.card.failed { background: var(--warn-bg2); border-color: var(--warn-line); }
.big-ok { font-family: var(--mincho); font-size: 26px; color: var(--main); margin: 10px 0 4px; }
.walkin-now { font-size: 15px; color: var(--text-sub); }

@media (min-width: 900px) {
  main { max-width: 1040px; }
  .confirm { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; align-items: start; }
  .confirm .src { position: sticky; top: 12px; }
  .row { grid-template-columns: 9em 1fr; }
}
@media (max-width: 899px) { .confirm .src { display: none; } }

/* 점포코드(처음 한 번) */
.enroll { max-width: 460px; margin: 0 auto; text-align: left; align-items: stretch; }
.field { display: block; }
.field > span { display: block; font-size: 14px; color: var(--text-sub); font-weight: 600; margin-bottom: 6px; }
.code-input { width: 100%; min-height: 56px; border: 1.5px solid var(--sand); border-radius: 12px; background: var(--card); padding: 10px 14px; font-size: 22px; font-weight: 700; letter-spacing: .12em; }
.code-input.small-input { font-size: 17px; letter-spacing: normal; font-weight: 500; min-height: 48px; }
.code-input:focus { outline: 2px solid var(--sub); outline-offset: 1px; }
/* 접수 직원 이름: 짧게 다시 말하기 */
.say { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; border: 1.5px solid var(--sub); background: transparent; color: var(--sub); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.say svg { width: 22px; height: 22px; }
.who { display: flex; align-items: center; gap: 8px; }
.who .lbl { font-size: 14px; color: var(--text-sub); font-weight: 600; flex: 0 0 auto; }
.who input { flex: 1; min-height: 44px; border: 1px solid var(--warn-line); border-radius: 8px; padding: 6px 8px; font-size: 17px; background: #fff; }
.ok-chip { border: 1px solid var(--warn-line); background: #fff; color: var(--warn); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; min-height: 36px; }
.err .link { margin-left: 6px; color: var(--warn); }
/* 5초 取り消し */
.hold-card { padding: 18px; }
.hold-row { display: grid; grid-template-columns: 5.5em 1fr; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--sand); }
.hold-row:first-child { border-top: 0; }
.hold-row .lbl { font-size: 14px; color: var(--text-sub); font-weight: 600; }
.hold-row b { font-size: 22px; color: var(--text); }
.hold-left { display: block; text-align: center; font-size: 18px; font-weight: 700; color: var(--main); }
.hold .btn-warn { min-height: 64px; font-size: 20px; }
