/* ============================================================
   세라젬 웰라운지 셀프 문진 — 태블릿(1280x800 가로) 프로토타입
   원칙: 글자 크게 · 버튼 크게 · 한 화면에 할 일 하나
   흐름: 1 시작 → 2 부위 선택 → 3 체험존 추천(다중) → 4 매니저 전달 확인
         → 5 리모컨 안내 → 6 결과 리포트(간단 + 자세히)
   ============================================================ */
:root {
  --bg: #f7f3ec;          /* 베이지 베이스 */
  --bg-card: #ffffff;
  --bg-soft: #efe8dc;
  --blue: #2f6db5;        /* 딥블루 포인트 */
  --blue-dark: #235391;
  --blue-light: #e4eef9;
  --text: #22303f;
  --text-sub: #5b6875;
  --line: #d9d0c2;
  --green: #3aa76d;
  --green-bg: #e3f4ea;
  --yellow: #d9a520;
  --yellow-bg: #fbf1d4;
  --red: #d64545;
  --red-bg: #fbe3e3;
  --radius: 24px;
  --shadow: 0 6px 24px rgba(40, 50, 70, 0.08);
  --ease: 0.55s cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }   /* display:flex/grid 요소도 hidden 속성이 확실히 먹도록 */
html, body { height: 100%; margin: 0; }
body {
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 22px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  user-select: none;
}

/* ---------- 앱 프레임 ---------- */
#app {
  width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  max-width: 1280px; margin: 0 auto;
}

/* ---------- 상단 바 ---------- */
header {
  height: 96px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; font-size: 24px; color: var(--blue-dark); letter-spacing: -0.5px;
}
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px; background: var(--blue);
  display: grid; place-items: center; color: #fff; font-size: 20px;
}
.steps { display: flex; align-items: center; gap: 8px; }
.step-dot {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-soft); color: var(--text-sub);
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
  transition: all var(--ease);
}
.step-dot.active { background: var(--blue); color: #fff; transform: scale(1.12); }
.step-dot.done { background: var(--blue-light); color: var(--blue); }
.step-line { width: 20px; height: 4px; border-radius: 2px; background: var(--line); }
.header-right { display: flex; gap: 12px; }

/* ---------- 버튼 공통 ---------- */
.btn {
  min-height: 72px; padding: 0 36px;
  border: none; border-radius: 20px;
  font: inherit; font-size: 26px; font-weight: 800;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  transition: transform 0.15s ease, background 0.2s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(47,109,181,0.28); }
.btn-primary:disabled { background: #b8c4d3; box-shadow: none; cursor: default; }
.btn-secondary { background: #fff; color: var(--blue-dark); border: 3px solid var(--blue); }
.btn-ghost { background: var(--bg-soft); color: var(--text); }
.btn-back {
  background: #fff; color: var(--text); border: 3px solid var(--line);
  min-height: 64px; font-size: 22px; padding: 0 24px;
}
.btn-back:disabled { opacity: 0.35; cursor: default; }
.btn-icon {
  width: 64px; min-height: 64px; padding: 0; border-radius: 50%;
  background: #fff; border: 3px solid var(--line); color: var(--text); font-size: 26px;
}
.btn-xl { min-height: 96px; font-size: 32px; padding: 0 60px; border-radius: 28px; }

/* ---------- 화면 컨테이너 ---------- */
main { flex: 1; position: relative; overflow: hidden; }
.screen {
  position: absolute; inset: 0;
  padding: 28px 40px 32px;
  display: flex; flex-direction: column;
  opacity: 0; transform: translateX(40px);
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease);
}
.screen.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.screen.leaving { opacity: 0; transform: translateX(-40px); }

h1 { font-size: 44px; font-weight: 800; margin: 0 0 10px; letter-spacing: -1px; line-height: 1.25; }
h2 { font-size: 32px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.5px; }
.sub { font-size: 24px; color: var(--text-sub); margin: 0; }
.center { text-align: center; }
.scroll-area { flex: 1; min-height: 0; overflow-y: auto; padding-right: 6px; }

.screen-footer {
  flex: none; display: flex; justify-content: space-between; align-items: center;
  padding-top: 20px; gap: 16px;
}

.card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 28px;
}
.chip { padding: 6px 14px; border-radius: 999px; font-size: 19px; font-weight: 800; white-space: nowrap; }
.chip.lv1, .chip.ok { background: var(--green-bg); color: #237a4a; }
.chip.lv2, .chip.warn { background: var(--yellow-bg); color: #8a6200; }
.chip.lv3, .chip.danger { background: var(--red-bg); color: #a32b2b; }
.chip.blue { background: var(--blue-light); color: var(--blue-dark); }

/* ============ 1단계 시작 ============ */
#s1 { align-items: center; justify-content: center; text-align: center; }
.mic-wave {
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--blue-light); color: var(--blue);
  display: grid; place-items: center; font-size: 62px; margin-bottom: 30px;
  position: relative;
}
.mic-wave::before, .mic-wave::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--blue); opacity: 0;
  animation: ripple 2.8s ease-out infinite;
}
.mic-wave::after { animation-delay: 1.4s; }
@keyframes ripple {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
#s1 h1 { font-size: 54px; }
.auto-hint { margin-top: 30px; font-size: 20px; color: var(--text-sub); min-height: 28px; }

/* ============ 2단계 방문 유형 (예약 / 일반) ============ */
.visit-layout { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; padding: 10px 60px 20px; min-height: 0; }
.visit-card {
  background: var(--bg-card); border-radius: 32px; box-shadow: var(--shadow);
  border: 5px solid var(--line); cursor: pointer; padding: 36px 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px;
  position: relative; transition: border-color 0.25s ease, transform 0.15s ease;
}
.visit-card:active { transform: scale(0.98); }
.visit-card.chosen { border-color: var(--blue); background: #f4f8fd; }
.visit-icon { width: 140px; height: 140px; border-radius: 40px; background: var(--blue-light); display: grid; place-items: center; font-size: 76px; margin-bottom: 8px; }
.visit-card h2 { font-size: 40px; margin: 0; }
.visit-card p { margin: 0; font-size: 22px; color: var(--text-sub); line-height: 1.5; }
.visit-card .zone-check { position: absolute; top: 22px; right: 22px; }
.visit-card.chosen .zone-check { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ============ 3-1단계 방문 목적 (일반 방문) ============ */
.purpose-layout { flex: 1; display: flex; flex-direction: column; gap: 18px; justify-content: center; padding: 0 80px 16px; min-height: 0; }
.purpose-card {
  background: var(--bg-card); border-radius: 26px; box-shadow: var(--shadow);
  border: 5px solid var(--line); cursor: pointer; padding: 22px 30px;
  display: flex; align-items: center; gap: 26px; min-height: 130px;
  transition: border-color 0.25s ease, transform 0.15s ease;
}
.purpose-card:active { transform: scale(0.985); }
.purpose-card.chosen { border-color: var(--blue); background: #f4f8fd; }
.purpose-icon { width: 90px; height: 90px; border-radius: 26px; flex: none; display: grid; place-items: center; font-size: 42px; overflow: hidden; }
/* 이모지 2개짜리 아이콘: 작게 줄여 칸 안에 나란히 */
.purpose-icon.two { display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 28px; line-height: 1; }
.purpose-card h2 { flex: 1; margin: 0; font-size: 32px; line-height: 1.3; }
.purpose-card.chosen .zone-check { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ============ 6-1 · 6-2단계 상담 대기 / 배정 완료 ============ */
.final-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.final-wrap h1 { font-size: 48px; }
.final-wrap .sub { font-size: 26px; line-height: 1.5; }
.final-icon { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; font-size: 74px; margin-bottom: 14px; }
.final-icon.waiting { background: var(--yellow-bg); animation: pulse 2.2s ease-in-out infinite; }
.final-icon.done { background: var(--blue); color: #fff; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.wait-no.big { margin: 30px auto 0; padding: 18px 48px; }

/* 5단계 추천 근거 (예약 시 체크한 부위 / 선택한 부위) */
.zone-basis { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; min-height: 44px; }
.basis-label { font-size: 20px; font-weight: 800; color: var(--text-sub); margin-right: 4px; }
.zone-basis .chip { font-size: 19px; padding: 8px 14px; }
.basis-edit { min-height: 44px; font-size: 19px; padding: 0 18px; border-radius: 12px; margin-left: 6px; }

/* ============ 3단계 전화번호 입력 ============ */
.phone-layout { flex: 1; display: grid; grid-template-columns: 1fr 460px; gap: 32px; min-height: 0; align-items: stretch; }
.phone-left { display: flex; flex-direction: column; gap: 22px; justify-content: center; }
.phone-display {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 4px solid var(--blue); padding: 28px 32px;
  font-size: 64px; font-weight: 800; letter-spacing: 4px; text-align: center;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.phone-display.placeholder { color: #c4bcb0; border-color: var(--line); }
.agree-box {
  display: flex; align-items: center; gap: 18px; cursor: pointer;
  background: var(--bg-card); border-radius: 20px; box-shadow: var(--shadow); padding: 20px 24px;
}
.agree-box input { position: absolute; opacity: 0; width: 0; height: 0; }
.agree-check {
  width: 56px; height: 56px; border-radius: 14px; border: 4px solid var(--line); background: #fff; flex: none;
  display: grid; place-items: center; font-size: 34px; color: transparent; transition: all 0.2s ease;
}
.agree-check::after { content: "✓"; }
.agree-box input:checked + .agree-check { background: var(--blue); border-color: var(--blue); color: #fff; }
.agree-text { font-size: 20px; line-height: 1.5; color: var(--text-sub); }
.agree-text b { font-size: 24px; color: var(--text); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 12px; min-height: 0; }
.key {
  border: none; border-radius: 20px; background: var(--bg-card); box-shadow: var(--shadow);
  font: inherit; font-size: 40px; font-weight: 800; color: var(--text); cursor: pointer; min-height: 88px;
  transition: transform 0.1s ease, background 0.15s ease;
}
.key:active { transform: scale(0.95); background: var(--blue-light); }
.key-fn { font-size: 22px; color: var(--text-sub); background: var(--bg-soft); }

/* ============ 3단계 인체모형 ============ */
.body-layout { flex: 1; display: grid; grid-template-columns: 1fr 460px; gap: 32px; min-height: 0; }
.body-stage {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; padding: 12px;
  min-height: 0;
}
.body-stage svg { height: 100%; max-height: 560px; width: auto; }
.part { cursor: pointer; }
.part .shape {
  fill: #f2ebe0; stroke: #c9bda9; stroke-width: 3;
  transition: fill 0.25s ease, stroke 0.25s ease;
}
.part text {
  font-family: inherit; font-size: 19px; font-weight: 800; fill: var(--text);
  text-anchor: middle; dominant-baseline: central; pointer-events: none;
}
.part:hover .shape { fill: #e8dfcf; }
.part.pending .shape { fill: var(--blue-light); stroke: var(--blue); stroke-width: 5; }
.part.selected .shape { fill: var(--blue); stroke: var(--blue-dark); }
.part.selected text { fill: #fff; }
.part.selected.lv1 .shape { fill: #6f9ed6; }
.part.selected.lv2 .shape { fill: var(--blue); }
.part.selected.lv3 .shape { fill: #1d4a86; }

.side-panel { display: flex; flex-direction: column; gap: 20px; min-height: 0; }
.intensity-card { border: 3px solid var(--blue); }
.intensity-card h2 { color: var(--blue-dark); }
.intensity-card h2 span { color: var(--text); }
.lv-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.lv-btn {
  min-height: 110px; border-radius: 20px; border: 3px solid var(--line); background: #fff;
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  transition: transform 0.15s ease;
}
.lv-btn:active { transform: scale(0.96); }
.lv-btn .lv-num { font-size: 22px; font-weight: 800; color: var(--text-sub); }
.lv-btn .lv-name { font-size: 28px; font-weight: 800; }
.lv-btn .lv-bar { display: flex; gap: 4px; margin-top: 4px; }
.lv-btn .lv-bar i { width: 18px; height: 10px; border-radius: 3px; background: var(--line); }
.lv-btn[data-lv="1"] .lv-bar i:nth-child(-n+1) { background: var(--green); }
.lv-btn[data-lv="2"] .lv-bar i:nth-child(-n+2) { background: var(--yellow); }
.lv-btn[data-lv="3"] .lv-bar i:nth-child(-n+3) { background: var(--red); }
.lv-btn[data-lv="1"] { border-color: var(--green); }
.lv-btn[data-lv="2"] { border-color: var(--yellow); }
.lv-btn[data-lv="3"] { border-color: var(--red); }

.hint-card { background: var(--blue-light); color: var(--blue-dark); font-weight: 700; font-size: 24px; text-align: center; padding: 30px; }

.selected-card { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.selected-card h2 { display: flex; justify-content: space-between; align-items: center; }
.count-badge { font-size: 20px; color: var(--text-sub); font-weight: 700; }
.selected-list { list-style: none; margin: 12px 0 0; padding: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.selected-list li {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border-radius: 16px; padding: 12px 14px 12px 18px;
}
.selected-list .p-name { font-size: 24px; font-weight: 800; flex: 1; }
.remove-btn {
  width: 52px; height: 52px; border-radius: 50%; border: none; background: #fff;
  font-size: 24px; color: var(--text-sub); cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.empty-msg { color: var(--text-sub); font-size: 21px; text-align: center; padding: 30px 0; }

/* ============ 4단계 체험존 추천 (다중 선택) ============
   위: 가장 추천 1개(전체 폭) / 아래: 나머지 존 2열                */
.zone-top { margin-top: 4px; }
.zone-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 16px; }
.zone-card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 4px solid var(--line); padding: 20px 24px; cursor: pointer;
  display: flex; gap: 18px; align-items: center; min-height: 140px;
  transition: border-color 0.25s ease, transform 0.15s ease;
}
.zone-card.big { padding: 26px 32px; min-height: 170px; gap: 24px; border-color: var(--blue-light); }
.zone-card.big .zone-icon { width: 110px; height: 110px; font-size: 56px; }
.zone-card.big .zone-text h2 { font-size: 36px; }
.zone-card:not(.big) .zone-icon { width: 80px; height: 80px; font-size: 40px; border-radius: 20px; }
.zone-card:not(.big) .zone-text h2 { font-size: 28px; margin-bottom: 4px; }
.zone-card:not(.big) .zone-text p { font-size: 19px; }
.zone-card:not(.big) .zone-reason { font-size: 17px; }
.rec-badge.sub { background: var(--blue-light); color: var(--blue-dark); }
.zone-card:active { transform: scale(0.98); }
.zone-card.chosen { border-color: var(--blue); background: #f4f8fd; }
.zone-icon {
  width: 100px; height: 100px; border-radius: 26px; flex: none;
  display: grid; place-items: center; font-size: 50px;
}
.zone-text { flex: 1; min-width: 0; }
.zone-text h2 { font-size: 32px; margin-bottom: 6px; }
.zone-text p { margin: 0; font-size: 21px; color: var(--text-sub); line-height: 1.45; }
.zone-reason { margin-top: 8px; font-size: 19px; color: var(--blue-dark); font-weight: 700; }
/* 체크박스 형태 */
.zone-check {
  width: 58px; height: 58px; border-radius: 16px; flex: none;
  border: 4px solid var(--line); background: #fff;
  display: grid; place-items: center; font-size: 32px; color: transparent;
  transition: all 0.2s ease;
}
.zone-card.chosen .zone-check { background: var(--blue); border-color: var(--blue); color: #fff; }
.rec-badge {
  display: inline-block; background: var(--blue); color: #fff; font-size: 18px; font-weight: 800;
  padding: 4px 14px; border-radius: 999px; margin-bottom: 8px;
}
/* 선택된 존 목록 (하단 고정) */
.chosen-strip { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; }
.chosen-strip .label { font-size: 22px; font-weight: 700; color: var(--text-sub); }
.chosen-strip .chip { font-size: 21px; padding: 10px 18px; }

/* ============ 4단계 매니저 전달 확인 ============ */
.sent-banner {
  display: flex; align-items: center; gap: 22px;
  background: var(--blue-light); border-radius: var(--radius); padding: 24px 30px; margin-bottom: 20px;
}
.sent-banner .check {
  width: 76px; height: 76px; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-size: 40px; flex: none;
}
.sent-banner h1 { font-size: 36px; margin: 0 0 4px; color: var(--blue-dark); }
.sent-banner p { margin: 0; font-size: 22px; color: var(--text-sub); }
.wait-no {
  margin-left: auto; flex: none;
  background: #fff; border: 4px solid var(--blue); border-radius: 22px;
  padding: 14px 32px; display: flex; flex-direction: column; align-items: center; line-height: 1.1;
}
.wait-no-label { font-size: 20px; font-weight: 800; color: var(--text-sub); }
.wait-no-num { font-size: 28px; font-weight: 800; color: var(--blue-dark); }
.wait-no-num b { font-size: 60px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.info-grid.single { grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; }
.info-card { display: flex; flex-direction: column; gap: 14px; }
.info-head { display: flex; align-items: center; gap: 18px; }
.info-head h2 { margin: 0; font-size: 32px; }
.info-head .zone-icon { width: 76px; height: 76px; font-size: 40px; border-radius: 20px; }
.info-card p { margin: 0; font-size: 21px; line-height: 1.5; color: var(--text); }
.product-title { font-size: 19px; font-weight: 800; color: var(--text-sub); margin-top: 4px; }
.product-list { display: flex; flex-wrap: wrap; gap: 10px; }
.product-list span {
  background: var(--bg); border: 2px solid var(--line); border-radius: 14px;
  padding: 10px 16px; font-size: 21px; font-weight: 700;
}

/* ============ 5단계 리모컨 안내 ============ */
.help-banner {
  width: 100%; background: var(--blue); color: #fff; border: none; border-radius: 20px;
  font: inherit; font-size: 26px; font-weight: 800; min-height: 78px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  box-shadow: 0 8px 20px rgba(47,109,181,0.28); margin-bottom: 20px;
}
.help-banner:active { transform: scale(0.99); }
.remote-layout { flex: 1; display: grid; grid-template-columns: 380px 1fr; gap: 28px; min-height: 0; }
.remote-stage { display: flex; align-items: center; justify-content: center; padding: 16px; }
.remote-stage svg { height: 100%; max-height: 520px; }
.rbtn { transition: filter 0.3s ease; }
.rbtn.glow { filter: drop-shadow(0 0 14px rgba(47,109,181,0.9)); }
.remote-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-content: start; overflow-y: auto; min-height: 0; }
.legend-item {
  background: var(--bg-card); border-radius: 20px; box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; align-items: center; gap: 16px;
  border: 3px solid transparent; transition: border-color 0.3s ease;
}
.legend-item.glow { border-color: var(--blue); }
.legend-num {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 22px;
}
.legend-icon { font-size: 34px; flex: none; }
.legend-text b { display: block; font-size: 25px; }
.legend-text span { font-size: 20px; color: var(--text-sub); }

/* ============ 6단계 결과 리포트 ============ */
.measure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.measure-card { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px; }
.measure-head { display: flex; align-items: center; gap: 12px; }
.measure-head .m-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--bg-soft); display: grid; place-items: center; font-size: 26px; }
.measure-head h2 { font-size: 24px; margin: 0; flex: 1; }
.measure-value { font-size: 32px; font-weight: 800; }
.measure-value small { font-size: 18px; color: var(--text-sub); font-weight: 700; margin-left: 6px; }
.gauge { position: relative; height: 16px; border-radius: 8px; overflow: visible; display: flex; }
.gauge i { flex: 1; }
.gauge i:first-child { border-radius: 8px 0 0 8px; }
.gauge i:last-child { border-radius: 0 8px 8px 0; }
.gauge i.g { background: #9fd8b8; }
.gauge i.y { background: #f3dc8d; }
.gauge i.r { background: #f0a3a3; }
.gauge-marker {
  position: absolute; top: -7px; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 5px solid var(--text); transform: translateX(-50%);
  transition: left 1.2s cubic-bezier(.22,.61,.36,1);
}
.gauge-marker.ok { border-color: var(--green); }
.gauge-marker.warn { border-color: var(--yellow); }
.gauge-marker.danger { border-color: var(--red); }
.measure-desc { font-size: 20px; font-weight: 700; line-height: 1.4; }
.measure-desc.ok { color: #237a4a; }
.measure-desc.warn { color: #8a6200; }
.measure-desc.danger { color: #a32b2b; }
.loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.spinner { width: 80px; height: 80px; border-radius: 50%; border: 8px solid var(--bg-soft); border-top-color: var(--blue); animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 자세히 보기 (보고서) */
.detail-toggle { display: flex; justify-content: center; margin: 22px 0 8px; }
.report { display: none; flex-direction: column; gap: 14px; padding-bottom: 12px; }
.report.open { display: flex; }
.report-title { font-size: 26px; font-weight: 800; color: var(--blue-dark); padding: 6px 4px 0; display: flex; align-items: center; gap: 10px; }
details.report-item { background: var(--bg-card); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
details.report-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 20px 24px; min-height: 76px; font-size: 25px; font-weight: 800;
}
details.report-item summary::-webkit-details-marker { display: none; }
details.report-item summary .m-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--bg-soft); display: grid; place-items: center; font-size: 24px; }
details.report-item summary .sum-val { margin-left: auto; font-size: 24px; color: var(--text-sub); font-weight: 700; }
details.report-item summary .arrow { font-size: 22px; color: var(--text-sub); transition: transform 0.3s ease; }
details.report-item[open] summary .arrow { transform: rotate(180deg); }
details.report-item[open] summary { border-bottom: 1px solid var(--line); }
.report-body { padding: 20px 24px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.report-row { display: flex; flex-direction: column; gap: 6px; }
.report-row .k { font-size: 18px; font-weight: 800; color: var(--text-sub); }
.report-row .v { font-size: 22px; font-weight: 700; line-height: 1.45; }
.report-row.full { grid-column: 1 / -1; }
.range-bar { position: relative; margin: 14px 0 6px; }
.range-bar .gauge { height: 20px; }
.range-bar .gauge-marker { top: -5px; }
.range-labels { display: flex; justify-content: space-between; font-size: 17px; color: var(--text-sub); font-weight: 700; margin-top: 12px; }
.range-zones { display: flex; font-size: 17px; font-weight: 800; margin-top: 4px; }
.range-zones span { flex: 1; text-align: center; }
.range-zones .zg { color: #237a4a; } .range-zones .zy { color: #8a6200; } .range-zones .zr { color: #a32b2b; }
.tip-box { background: var(--blue-light); border-radius: 14px; padding: 14px 18px; color: var(--blue-dark); font-size: 21px; font-weight: 700; line-height: 1.45; }

/* ---------- 매니저 호출 안내창 (4단계, 테이블오더 방식) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(34, 48, 63, 0.55);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 760px; max-width: 92vw;
  background: var(--bg-card); border-radius: 32px; padding: 40px 44px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  text-align: center;
  animation: popIn 0.55s cubic-bezier(.22,.61,.36,1);
}
@keyframes popIn { from { transform: translateY(30px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h1 { font-size: 38px; margin: 0 0 8px; color: var(--blue-dark); }
.modal-bell {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 20px;
  background: var(--blue-light); display: grid; place-items: center; font-size: 56px;
  animation: ring 2.4s ease-in-out infinite;
}
@keyframes ring {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(-14deg); } 20% { transform: rotate(12deg); }
  30% { transform: rotate(-8deg); }  40% { transform: rotate(6deg); }
}
.order-ticket {
  margin: 26px auto 0; background: var(--bg); border-radius: 20px; padding: 18px 26px;
  text-align: left; display: flex; flex-direction: column; gap: 10px;
}
.ticket-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 22px; }
.ticket-row span { color: var(--text-sub); font-weight: 700; }
.ticket-row b { font-size: 24px; text-align: right; }
.ticket-status { color: var(--blue-dark); }
.modal-actions { display: flex; justify-content: center; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- 결과표 가져가기 QR 창 (6단계) ---------- */
.footer-left { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.qr-modal { width: 640px; }
.qr-modal h1 { font-size: 36px; }
.qr-box {
  width: 300px; height: 300px; margin: 24px auto 0;
  background: #fff; border: 4px solid var(--line); border-radius: 20px; padding: 18px;
}
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-box rect { fill: var(--text); }
.qr-meta {
  display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; font-size: 22px;
}
.qr-meta span { color: var(--text-sub); font-weight: 700; }
.qr-meta b { font-size: 26px; letter-spacing: 2px; color: var(--blue-dark); }

/* ---------- 토스트 ---------- */
#toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 30px);
  background: var(--text); color: #fff; padding: 18px 32px; border-radius: 18px;
  font-size: 22px; font-weight: 700; opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease; z-index: 50;
  display: flex; align-items: center; gap: 12px;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
