/* =========================================================
   키오스크 동행 AI — 디자인 토큰 및 전역 스타일
   목표: 노인 사용성 (큰 터치 영역, 고대비, 명확한 시선 유도)
   ========================================================= */

:root {
  /* Colors */
  --bg:           #FAF7F0;
  --surface:      #FFFFFF;
  --surface-soft: #F4EFE4;
  --surface-warm: #FDF6E8;

  --primary:        #1F6B3F;
  --primary-dark:   #14532D;
  --primary-soft:   #E8F1E9;
  --primary-tint:   #D4E7D9;
  --on-primary:     #FFFFFF;

  --accent:      #C56A2F;   /* 따뜻한 오렌지 (액센트 최소 사용) */
  --accent-soft: #FDECD8;

  --warning:       #B45309;
  --warning-soft:  #FEF3C7;

  --danger:      #B91C1C;

  --text:         #1A1A1A;
  --text-muted:   #57534E;
  --text-soft:    #78716C;
  --border:       #E7E2D6;
  --border-soft:  #F0EBDD;

  /* Type */
  --font: "Pretendard", -apple-system, "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --fs-caption: 14px;
  --fs-body:    18px;
  --fs-body-lg: 20px;
  --fs-button:  22px;
  --fs-title:   26px;
  --fs-h1:      30px;
  --fs-hero:    36px;

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(20, 30, 20, 0.05), 0 2px 4px rgba(20,30,20,0.04);
  --shadow-md: 0 4px 10px rgba(20, 30, 20, 0.08), 0 2px 4px rgba(20,30,20,0.05);
  --shadow-lg: 0 10px 24px rgba(20, 30, 20, 0.12), 0 4px 8px rgba(20,30,20,0.06);

  /* Motion (최소) */
  --ease: cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* 고대비 모드 (사용자 토글) */
.hc {
  --bg:         #FFFFFF;
  --surface:    #FFFFFF;
  --surface-soft: #F3F3F3;
  --text:       #000000;
  --text-muted: #1A1A1A;
  --text-soft:  #333333;
  --border:     #000000;
  --primary:    #0B4A2A;
  --primary-dark: #063919;
  --primary-soft: #DDF0E1;
  --warning:    #7A3900;
  --warning-soft: #FFF0C8;
}

/* 글자 크기 스케일 (사용자 조절) */
.text-xl {
  --fs-body:    22px;
  --fs-body-lg: 24px;
  --fs-button:  26px;
  --fs-title:   30px;
  --fs-h1:      34px;
  --fs-hero:    40px;
}
.text-xxl {
  --fs-body:    26px;
  --fs-body-lg: 28px;
  --fs-button:  30px;
  --fs-title:   34px;
  --fs-h1:      38px;
  --fs-hero:    44px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  background: #E5E1D5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}
button:focus-visible {
  outline: 3px solid #2563EB;
  outline-offset: 3px;
}

/* =========================================================
   앱 스테이지 — Android 프레임을 뷰포트에 맞춰 스케일
   ========================================================= */
.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(ellipse at top, #EDE7D6, #D9D3C4);
}
.stage-inner {
  transform-origin: center center;
}

/* =========================================================
   앱 컨테이너 (Android 프레임 안의 콘텐츠)
   ========================================================= */
.app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}

/* =========================================================
   상단 헤더 (뒤로가기 · 제목 · 설정)
   ========================================================= */
.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  min-height: 50px;
  flex-shrink: 0;
}
.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--text);
  transition: background 120ms var(--ease);
}
.topbar-btn:active { background: var(--primary-soft); }
.topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  line-height: 1.15;
  word-break: keep-all;
  overflow-wrap: normal;
}
.topbar-mode {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0;
}

/* 스크롤 영역 */
.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.screen-pad {
  padding: var(--sp-5);
  padding-bottom: 120px; /* 도움바 공간 */
}

/* =========================================================
   하단 도움바 (되돌리기 · 다시 듣기 · 도움) — 항상 노출
   ========================================================= */
.helpbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border-top: 2px solid var(--border);
  padding: 5px 9px 8px;
  display: flex;
  gap: var(--sp-2);
  z-index: 30;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.06);
}
.helpbar-btn {
  flex: 1;
  min-height: 46px;
  border-radius: 12px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: transform 100ms var(--ease), background 120ms var(--ease);
}
.helpbar-btn:active {
  transform: scale(0.96);
  background: var(--primary-soft);
}
.helpbar-btn .ic { color: var(--primary); }
.helpbar-btn .text-ic {
  width: 24px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.helpbar-btn.disabled { opacity: 0.4; pointer-events: none; }
.helpbar-btn.undo { background: #FEF3C7; }
.helpbar-btn.undo .ic { color: var(--warning); }

/* =========================================================
   버튼 (SeniorButton)
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 68px;
  padding: 14px 24px;
  border-radius: var(--r-md);
  font-size: var(--fs-button);
  font-weight: 700;
  transition: transform 100ms var(--ease), box-shadow 120ms var(--ease);
  width: 100%;
  text-align: center;
  letter-spacing: -0.01em;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 4px 0 var(--primary-dark), var(--shadow-md);
}
.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--primary-dark), var(--shadow-sm);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--primary);
}
.btn-warn {
  background: var(--warning-soft);
  color: var(--warning);
  border: 2px solid var(--warning);
}
.btn.small {
  min-height: 52px;
  font-size: 18px;
  padding: 10px 18px;
}

/* =========================================================
   카드
   ========================================================= */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-5);
}

/* =========================================================
   홈 화면
   ========================================================= */
.home-hero {
  padding: var(--sp-6) var(--sp-5) var(--sp-4);
  background: linear-gradient(180deg, #F4EFE4 0%, var(--bg) 100%);
}
.home-greeting {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.home-title {
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-3);
  color: var(--text);
}
.home-title .accent { color: var(--primary); }
.home-sub {
  font-size: var(--fs-body-lg);
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.home-reassure {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-5) var(--sp-5) 0;
  padding: var(--sp-4);
  background: var(--surface-warm);
  border-radius: var(--r-md);
  border: 1px solid #F0E4C8;
}
.home-reassure .badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #FBE7B8;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.home-reassure p {
  margin: 0;
  font-size: 15px;
  color: #7A5A1E;
  font-weight: 500;
  line-height: 1.45;
}
.home-reassure strong { color: #5C4200; font-weight: 700; }

.home-actions {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.home-big-card {
  position: relative;
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  text-align: left;
  min-height: 132px;
  transition: transform 120ms var(--ease);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-big-card:active { transform: scale(0.98); }
.home-big-card .label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}
.home-big-card .headline {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.home-big-card .desc {
  font-size: 16px;
  line-height: 1.4;
  opacity: 0.88;
  margin-top: 4px;
}
.home-big-card .arrow {
  position: absolute;
  right: 20px; bottom: 20px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: grid; place-items: center;
}
.home-big-card.primary {
  background: linear-gradient(135deg, #1F6B3F 0%, #14532D 100%);
  color: white;
  box-shadow: 0 6px 0 #0A3A1E, 0 8px 20px rgba(20, 80, 40, 0.25);
}
.home-big-card.primary:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #0A3A1E, 0 4px 10px rgba(20, 80, 40, 0.2);
}
.home-big-card.secondary {
  background: white;
  color: var(--text);
  border: 2px solid var(--border);
}
.home-big-card.secondary .label { color: var(--accent); }
.home-big-card.secondary .desc { padding-right: 64px; }
.home-big-card.secondary .arrow { background: var(--surface-soft); color: var(--primary); }

.home-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  padding: 0 var(--sp-5) var(--sp-5);
}
.home-mini-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 84px;
  transition: background 120ms;
}
.home-mini-btn:active { background: var(--surface-soft); }
.home-mini-btn .ic { color: var(--primary); }
.home-mini-btn span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* =========================================================
   시나리오 선택
   ========================================================= */
.scenarios-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.scenario-category {
  margin-top: 22px;
}
.source-note {
  background: var(--surface-warm);
  border: 1px solid #EAD9B4;
  border-radius: var(--r-md);
  color: #6B4A12;
  font-size: 14px;
  line-height: 1.45;
  padding: 12px 14px;
  margin: 0 0 4px;
}
.scenario-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 2px solid var(--border-soft);
  padding: var(--sp-4);
  display: flex;
  gap: var(--sp-4);
  align-items: center;
  transition: transform 120ms var(--ease), border-color 120ms;
  text-align: left;
  width: 100%;
}
.scenario-card:active { transform: scale(0.98); border-color: var(--primary); }
.scenario-card.disabled { opacity: 0.55; pointer-events: none; }
.scenario-icon {
  width: 64px; height: 64px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 32px;
}
.scenario-icon.cafe { background: #F4E5D0; color: #8B5A2B; }
.scenario-icon.fastfood { background: #FDE7CB; color: #B04B12; }
.scenario-icon.hospital { background: #DEE9F5; color: #1F4E82; }
.scenario-icon.parking { background: #E4DFF0; color: #4B3E85; }
.scenario-icon.convenience { background: #E3EFD9; color: #3D6B22; }
.scenario-icon.bank { background: #E5EFFA; color: #174A7C; }
.scenario-icon.public { background: #F1E6D8; color: #7A4A18; }
.scenario-icon.transport { background: #DFECF1; color: #15566B; }
.scenario-icon.coming { background: #F0EBDD; color: #A8A196; }
.scenario-body { flex: 1; min-width: 0; }
.scenario-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 4px;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.scenario-ref {
  margin: 4px 0 8px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: normal;
}
.scenario-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}
.scenario-meta .chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 12px;
}
.scenario-meta .chip.warn { background: var(--warning-soft); color: var(--warning); }
.scenario-meta .chip.gray { background: #EDEAE0; color: var(--text-muted); }
.scenario-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.scenario-card.disabled .scenario-arrow {
  background: #EDEAE0;
  color: var(--text-soft);
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: var(--sp-5) 0 var(--sp-3);
}
.section-label:first-child { margin-top: 0; }

.brand-grid {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: 16px;
}
.brand-card {
  background: var(--surface);
  border: 2px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
}
.brand-card:active { transform: scale(0.98); border-color: var(--primary); }
.brand-mark {
  width: 58px; height: 58px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 26px;
  font-weight: 900;
  flex-shrink: 0;
}
.brand-mark.mega { background: #FFD900; color: #171717; }
.brand-mark.cafe-basic { background: #e8f5e9; color: #14532d; }
.brand-mark.fastfood { background: #FDE7CB; color: #B04B12; }
.brand-mark.hospital { background: #e6f1ff; color: #174a7c; }
.brand-mark.shinhan-atm, .brand-mark.kb-atm { background: #E5EFFA; color: #174A7C; }
.brand-mark.public { background: #F1E6D8; color: #7A4A18; }
.brand-mark.parking { background: #e8f0ff; color: #1d4ed8; }
.brand-mark.transport { background: #e3f4ed; color: #166534; }
.brand-mark.self-checkout, .brand-mark.emart-checkout { background: #fff1c2; color: #6b4a00; }
.brand-mark.parking, .brand-mark.transport { background: #DFECF1; color: #15566B; }
.brand-mark.self-checkout { background: #E3EFD9; color: #3D6B22; }
.brand-body { flex: 1; min-width: 0; }
.brand-body h3 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.brand-body p { margin: 0 0 8px; color: var(--text-muted); font-size: 14px; line-height: 1.35; }
.brand-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--text-muted); font-size: 12px; }
.brand-meta span:first-child { border-radius: 999px; padding: 3px 8px; font-weight: 800; }
.brand-meta .clean { background: var(--primary-soft); color: var(--primary-dark); }
.brand-meta .raw { background: var(--warning-soft); color: var(--warning); }

/* =========================================================
   미션 시작 화면
   ========================================================= */
.mission-hero {
  padding: var(--sp-6) var(--sp-5);
  background: linear-gradient(180deg, var(--primary-soft) 0%, var(--bg) 100%);
  text-align: center;
}
.mission-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface);
  border-radius: 999px;
  border: 1.5px solid var(--primary-tint);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: var(--sp-4);
}
.mission-title {
  font-size: clamp(21px, 5.4vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 var(--sp-3);
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.mission-desc {
  font-size: clamp(16px, 4.2vw, 18px);
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.mission-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  padding: var(--sp-5);
}
.mission-fact {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  text-align: center;
}
.mission-fact .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.mission-fact .lab {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}
.mission-checklist {
  padding: 0 var(--sp-5) var(--sp-5);
}
.mission-checklist h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 var(--sp-3);
  color: var(--text);
}
.mission-checklist ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.mission-checklist li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px 14px;
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  font-size: 16px;
  color: var(--text);
}
.mission-checklist .num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
  display: grid; place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* =========================================================
   진행 스텝퍼 (상단)
   ========================================================= */
.stepper {
  padding: 5px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
}
.stepper-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
}
.stepper-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.stepper-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.stepper-count b { font-size: 16px; }
.stepper-dots {
  display: flex;
  gap: 4px;
}
.stepper-dot {
  flex: 1;
  height: 5px;
  border-radius: 4px;
  background: #E8E2D4;
  transition: background 300ms var(--ease);
}
.stepper-dot.done { background: var(--primary); }
.stepper-dot.current {
  background: var(--primary);
  animation: dotPulse 1.8s var(--ease) infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* =========================================================
   연습 화면 — 키오스크 시뮬 + 코치 패널
   ========================================================= */
.practice-body {
  flex: 1;
  overflow-y: auto;
  padding: 7px 12px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* 코치 패널 */
.coach {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 2px solid var(--primary-tint);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.coach-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8F1E9, #C9E0CE);
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
}
.coach-avatar.speaking::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: ping 1.2s var(--ease) infinite;
}
@keyframes ping {
  0%   { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 0; }
}
.coach-body { flex: 1; min-width: 0; }
.coach-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.coach-message {
  font-size: 15px;
  line-height: 1.28;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.coach-reason {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* TTS 재생중 이퀄라이저 */
.eq {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 14px;
}
.eq span {
  width: 3px;
  background: var(--primary);
  border-radius: 2px;
  animation: eq 0.9s var(--ease) infinite;
}
.eq span:nth-child(1) { height: 60%; animation-delay: 0s; }
.eq span:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.eq span:nth-child(3) { height: 45%; animation-delay: 0.3s; }
.eq span:nth-child(4) { height: 80%; animation-delay: 0.45s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}

/* 키오스크 프레임 (연습 화면 내) */
.kiosk {
  background: #2A2A2A;
  border-radius: var(--r-lg);
  padding: 8px;
  box-shadow: var(--shadow-md);
}
.kiosk-screen {
  background: white;
  border-radius: 14px;
  padding: var(--sp-4);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.kiosk-header {
  font-size: 18px;
  font-weight: 700;
  color: #1A1A1A;
  text-align: center;
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid #EEE;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.kiosk-targets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  flex: 1;
}
.kiosk-targets.single { grid-template-columns: 1fr; }
.kiosk-target {
  position: relative;
  min-height: 88px;
  border-radius: var(--r-md);
  border: 2px solid #DDD5C4;
  background: white;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  word-break: keep-all;
  overflow-wrap: normal;
  transition: transform 100ms var(--ease), border-color 120ms, background 150ms;
}
.kiosk-target:active { transform: scale(0.96); }
.kiosk-target .sub {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.kiosk-target .price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}
.kiosk-target.primary-hint {
  background: var(--surface);
  border-color: var(--primary-tint);
}
/* 정답 유도 halo */
.kiosk-target.hint-glow {
  animation: hintGlow 1.8s var(--ease) infinite;
  border-color: var(--primary);
}
@keyframes hintGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 107, 63, 0.5); }
  50%      { box-shadow: 0 0 0 10px rgba(31, 107, 63, 0); }
}
.kiosk-target.correct-flash {
  animation: correctFlash 0.6s var(--ease);
  border-color: var(--primary);
  background: var(--primary-soft);
}
@keyframes correctFlash {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.05); background: var(--primary-tint); }
  100% { transform: scale(1); }
}
.kiosk-target.wrong-shake { animation: shake 0.4s var(--ease); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* 정답 위치 안내 배지 */
.finger-hint {
  position: absolute;
  right: -7px;
  bottom: -7px;
  min-width: 48px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #166534;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.92);
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0;
  pointer-events: none;
  animation: fingerTap 1.45s var(--ease) infinite;
  z-index: 5;
}
@keyframes fingerTap {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  40%      { transform: translate(-6px, -8px) rotate(-14deg); }
  55%      { transform: translate(0, 0) rotate(-8deg); }
}

/* 키오스크 내 요약 목록 (주문 확인) */
.kiosk-summary {
  background: var(--surface-warm);
  border: 1px solid #EAD9B4;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kiosk-summary li {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  padding: 4px 0;
  list-style: none;
}

.clone-kiosk {
  background: #111;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.mega-clone {
  background: #f6f6f6;
  border: 7px solid #111;
  color: #111;
  width: 100%;
  aspect-ratio: 402 / 720;
  min-height: 604px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
}
.mega-top {
  height: 34px;
  background: #ffd900;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 14px;
  font-weight: 900;
}
.mega-top button {
  position: absolute;
  right: 8px;
  top: 7px;
  background: #4b1608;
  color: white;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 10px;
}
.mega-tabs {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #ffd900;
  border-bottom: 2px solid #d8b900;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.mega-tabs span { padding: 5px 1px; }
.mega-tabs .active { text-decoration: underline; }
.mega-tab-button {
  position: relative;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #111;
  padding: 5px 1px;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.mega-tab-button:disabled {
  opacity: 1;
}
.mega-tab-button.active {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.mega-season { text-align: center; padding: 6px 0; font-size: 11px; font-weight: 700; background: white; }
.mega-stage {
  min-height: 250px;
  background: #f7f7f7;
  padding: 14px 12px 12px;
  text-align: center;
}
.mega-stage h3 {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 900;
  word-break: keep-all;
}
.mega-stage p {
  margin: 0 0 12px;
  color: #5c554d;
  font-size: 13px;
  line-height: 1.4;
  word-break: keep-all;
}
.mega-two-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
.mega-action {
  position: relative;
  min-height: 118px;
  border-radius: 10px;
  border: 2px solid #ddd2bd;
  background: white;
  color: #171717;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  word-break: keep-all;
}
.mega-action small {
  display: block;
  margin-top: 6px;
  color: #63594d;
  font-size: 11px;
  font-weight: 700;
}
.mega-action em {
  display: block;
  color: #ff6b1a;
  font-style: normal;
  font-size: 13px;
}
.mega-action.primary,
.mega-action.start,
.mega-action.pay {
  border-color: #177541;
  background: #177541;
  color: white;
}
.mega-action.primary small,
.mega-action.start small,
.mega-action.pay small {
  color: rgba(255,255,255,.82);
}
.mega-action.start {
  min-height: 128px;
  font-size: 24px;
}
.mega-action.eat {
  min-height: 132px;
  font-size: 24px;
}
.mega-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.mega-category-grid .mega-action {
  min-height: 94px;
  font-size: 22px;
}
.mega-live-menu {
  min-height: 260px;
  background: #f7f7f7;
}
.mega-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
}
.preview-card {
  min-height: 92px;
  background: white;
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8px 4px;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
  color: #222;
}
.preview-card .cup {
  font-size: 25px;
  line-height: 1;
}
.preview-card strong {
  font-size: 14px;
  font-weight: 900;
}
.preview-card span {
  color: #6b6258;
  font-size: 10px;
  font-weight: 700;
}
.mega-guide-line {
  margin: 0 12px;
  padding: 10px;
  border-radius: 8px;
  background: #fff8d7;
  color: #5d4d00;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  word-break: keep-all;
}
.mega-confirm {
  min-height: 268px;
}
.mega-receipt {
  background: white;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  text-align: left;
}
.mega-receipt div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}
.mega-receipt div:last-child { border-bottom: 0; }
.mega-receipt strong { font-weight: 900; }
.mega-receipt .total strong { color: #ff6b1a; }
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  flex: 1 0 auto;
}
.mega-menu-item {
  position: relative;
  min-height: 78px;
  border-radius: 8px;
  background: white;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 3px;
  text-align: center;
}
.mega-menu-item .cup { font-size: 25px; line-height: 1; }
.mega-menu-item span { font-size: 8.5px; line-height: 1.18; font-weight: 700; word-break: keep-all; }
.mega-menu-item em { font-size: 11px; color: #ff6b1a; font-style: normal; font-weight: 800; }
.mega-cart {
  display: grid;
  grid-template-columns: 1fr 120px;
  min-height: 132px;
  background: white;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
}
.mega-cart > div { padding: 12px; font-size: 13px; }
.mega-cart > div span { float: right; color: #ff6b1a; font-weight: 900; }
.mega-cart button { background: #4b1608; color: #fff51a; font-size: 16px; font-weight: 900; }

.mega-modal-screen {
  min-height: 286px;
  background: #f7f7f7;
  position: relative;
  padding-bottom: 10px;
}
.mega-modal-title {
  min-height: 26px;
  background: #ffd200;
  color: #111;
  display: flex;
  align-items: center;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}
.mega-option-head,
.order-line,
.approve-row,
.pay-total {
  display: grid;
  grid-template-columns: 32px 1fr 42px 62px;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 6px 10px;
  font-size: 12px;
}
.mega-option-head small {
  display: block;
  color: #777;
  font-size: 9px;
  line-height: 1.2;
  margin-top: 2px;
}
.mega-option-body {
  padding: 6px 10px 0;
  display: grid;
  gap: 4px;
}
.option-section > span {
  display: block;
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 4px;
}
.option-row,
.pay-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.option-row button,
.pay-grid button,
.option-chip {
  min-height: 34px;
  border: 1px solid #efe6cf;
  background: #fff9e7;
  border-radius: 4px;
  font-size: 10px;
  color: #ff6b1a;
  font-weight: 800;
}
.option .option-section:nth-child(n+2) {
  display: none;
}
.mega-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 10px;
}
.mega-modal-actions.three {
  grid-template-columns: .7fr 1fr 1fr;
}
.mega-action.dark,
.mega-action.orange,
.mega-action.yellow {
  min-height: 50px;
  border-radius: 4px;
  font-size: 13px;
}
.mega-action.dark { background: #4b1608; color: white; border-color: #4b1608; }
.mega-action.orange { background: #ff9800; color: white; border-color: #ff9800; }
.mega-action.yellow { background: #ffd200; color: #111; border-color: #ffd200; }
.order-blank {
  height: 134px;
  background: white;
}
.order-warning {
  color: #ff3232;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}
.order-total {
  margin: 0 10px;
  background: white;
  border: 1px solid #eee;
  display: grid;
  grid-template-columns: 1fr 40px 1fr 70px;
  gap: 4px;
  padding: 9px;
  font-size: 11px;
}
.dimmed::before {
  content: "";
  position: absolute;
  inset: 26px 0 0;
  background: rgba(0,0,0,.56);
  z-index: 1;
}
.disposable-popup,
.receipt-popup {
  position: absolute;
  left: 42px;
  right: 42px;
  top: 94px;
  z-index: 2;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.disposable-popup h4 {
  margin: 0 0 8px;
  background: #ffd200;
  padding: 9px;
  font-size: 13px;
}
.disposable-popup label {
  display: block;
  padding: 6px 14px;
  font-size: 12px;
}
.popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}
.popup-actions button:disabled {
  border: 0;
  background: #d9d9d9;
  color: white;
  border-radius: 4px;
  font-weight: 900;
}
.pay-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 800;
}
.pay-step b {
  background: #ff9800;
  color: white;
  border-radius: 3px;
  padding: 3px 5px;
}
.pay-grid {
  padding: 4px 10px 6px;
}
.pay-grid.small button {
  min-height: 34px;
}
.pay-method {
  min-height: 48px;
  background: white;
  color: #111;
  border-color: #eee;
  font-size: 11px;
}
.pay-total {
  margin: 6px 10px 0;
  grid-template-columns: 1fr 60px 1.4fr;
  border: 1px solid #eee;
}
.pay-total strong {
  color: #ff2d2d;
}
.stamp .phone-display {
  background: white;
  text-align: center;
  font-size: 28px;
  padding: 10px;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.keypad button,
.mega-action.key {
  min-height: 43px;
  border: 1px solid #eee;
  background: white;
  font-size: 20px;
  border-radius: 0;
  box-shadow: none;
}
.stamp-save {
  margin: 10px;
  width: calc(100% - 20px);
}
.stamp p,
.card-approve p {
  margin: 8px 14px;
  color: #999;
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
}
.approve-row {
  grid-template-columns: 1fr 1fr;
}
.approve-actions {
  display: grid;
  grid-template-columns: .8fr 2fr;
  gap: 8px;
  padding: 14px 16px;
}
.receipt-popup {
  top: 206px;
  text-align: center;
}
.receipt-popup p {
  margin: 16px 8px 2px;
  color: #777;
  font-size: 13px;
}
.atm-clone {
  background: linear-gradient(160deg, #1c4b8e, #0f6fb8 60%, #0c3c71);
  padding: 14px;
  color: white;
}
.atm-title {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  border: 2px solid rgba(255,255,255,0.65);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 14px;
}
.atm-title button {
  background: linear-gradient(#f29b69, #c54828);
  color: white;
  font-size: 22px;
  font-weight: 900;
  border-radius: 8px;
  min-height: 58px;
}
.atm-title strong { text-align: center; font-size: 27px; letter-spacing: 0.08em; }
.atm-panel {
  margin: 0 auto 14px;
  width: 64%;
  min-height: 145px;
  background: rgba(255,255,255,0.9);
  color: #222;
  border-radius: 6px;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.55;
}
.atm-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.atm-option {
  min-height: 88px;
  background: linear-gradient(#f8f8f8, #cfcfcf);
  border: 2px solid #f5f5f5;
  box-shadow: 0 4px 0 rgba(0,0,0,0.4);
  color: #333;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
}

.emart-clone {
  background: #f4f0e7;
  border: 7px solid #202020;
  color: #171717;
  padding: 9px;
}
.emart-head {
  height: 50px;
  background: #f7c400;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 14px;
  border-bottom: 4px solid #222;
}
.emart-head strong {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.emart-head span {
  margin-top: 2px;
  color: #4d4217;
  font-size: 11px;
  font-weight: 800;
}
.emart-guide {
  height: 38px;
  background: white;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  border-bottom: 1px solid #ded8c9;
}
.emart-layout {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 12px;
  padding-top: 10px;
}
.emart-left {
  min-height: 228px;
  display: grid;
  align-content: start;
  gap: 12px;
}
.emart-scanbox {
  height: 122px;
  background: white;
  border: 3px dashed #b7c5b4;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  color: #202020;
}
.emart-scanbox.active {
  border-color: #14804b;
  background: #fbfffc;
}
.emart-scanbox strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
}
.emart-scanbox span {
  display: block;
  margin-top: 6px;
  color: #60685f;
  font-size: 11px;
  font-weight: 800;
}
.barcode-lines {
  width: 72px;
  height: 30px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
  margin-bottom: 10px;
}
.barcode-lines i {
  width: 6px;
  background: #111;
  display: block;
}
.barcode-lines i:nth-child(2) { width: 3px; }
.barcode-lines i:nth-child(3) { width: 10px; }
.barcode-lines i:nth-child(4) { width: 4px; }
.emart-area {
  position: relative;
  border: 0;
  border-radius: 8px;
  min-height: 58px;
  background: white;
  color: #171717;
  box-shadow: 0 4px 0 rgba(52,45,30,.18);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  font: inherit;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
  white-space: pre-line;
}
.emart-area small {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: #6d6456;
}
.emart-area em {
  display: block;
  color: #e35b1d;
  font-style: normal;
  font-size: 14px;
}
.emart-area.start {
  min-height: 170px;
  background: #14804b;
  color: white;
  font-size: 25px;
}
.emart-area.scan-done {
  background: #14804b;
  color: white;
}
.emart-bag-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.emart-area.bag-yes {
  background: #14804b;
  color: white;
}
.emart-area.pay-main {
  min-height: 92px;
  background: #4b1608;
  color: #fff51a;
  font-size: 20px;
}
.emart-area.staff {
  min-height: 52px;
  background: #f7f1e5;
  color: #704214;
  font-size: 14px;
  box-shadow: none;
  border: 1px solid #dfd2bd;
}
.emart-receipt {
  background: white;
  border-left: 1px solid #ded8c9;
  min-height: 228px;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 6px;
}
.receipt-title {
  font-size: 15px;
  font-weight: 900;
  padding-bottom: 6px;
  border-bottom: 2px solid #222;
}
.receipt-line,
.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 1.25;
}
.receipt-line strong { font-size: 12px; }
.receipt-line.muted { color: #7a756b; }
.receipt-total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid #ddd;
  font-size: 14px;
  font-weight: 900;
}
.receipt-total strong {
  color: #e35b1d;
  font-size: 15px;
}

.flow-clone {
  background: #f5f7f8;
  border: 7px solid #202020;
  color: #171717;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}
.flow-head {
  min-height: 52px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  color: white;
}
.flow-head strong {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.1;
}
.flow-head span {
  font-size: 11px;
  font-weight: 800;
  opacity: .9;
}
.flow-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 34px;
  background: #fff;
  border-bottom: 2px solid rgba(0,0,0,.18);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}
.flow-tabs span {
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(0,0,0,.12);
}
.flow-tabs .active { color: white; }
.flow-guide {
  min-height: 40px;
  display: grid;
  place-items: center;
  padding: 6px 10px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,.12);
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
  word-break: keep-all;
  overflow-wrap: normal;
  text-wrap: balance;
}
.flow-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
}
.flow-body.few { grid-template-columns: 1fr; }
.flow-main {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}
.flow-target-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.flow-target-grid.count-1 { grid-template-columns: 1fr; }
.flow-target-grid.count-3 { grid-template-columns: 1fr; }
.flow-target-grid.count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flow-target {
  position: relative;
  min-height: 76px;
  border: 2px solid rgba(0,0,0,.14);
  border-radius: 6px;
  background: white;
  color: #171717;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px 8px;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.18;
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
  word-break: keep-all;
  overflow-wrap: normal;
}
.flow-target span {
  max-width: 100%;
  text-wrap: balance;
}
.flow-target small,
.flow-target em {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.flow-target em { color: #e85d1a; }
.flow-target.primary {
  color: white;
  border-color: transparent;
}
.flow-inset {
  min-height: 86px;
  background: white;
  border: 2px solid rgba(0,0,0,.1);
  border-radius: 6px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  align-items: center;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px;
  text-align: center;
}
.flow-inset strong {
  font-size: 15px;
  font-weight: 900;
  grid-column: 1 / -1;
}
.flow-inset span {
  color: #666;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}
.notice-inset div,
.order-inset div {
  font-size: 16px;
  font-weight: 900;
}
.flow-summary {
  background: white;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 6px;
  overflow: hidden;
}
.flow-summary div {
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}
.flow-summary div:last-child { border-bottom: 0; }
.flow-bottom {
  min-height: 48px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #222;
  color: white;
}
.flow-bottom span {
  font-size: 11px;
  color: rgba(255,255,255,.72);
  font-weight: 800;
}
.flow-bottom strong {
  font-size: 14px;
  font-weight: 900;
}
.cafe-basic .flow-head,
.cafe-basic .flow-target.primary,
.cafe-basic .flow-tabs .active { background: #166534; }
.fastfood .flow-head,
.fastfood .flow-target.primary,
.fastfood .flow-tabs .active { background: #c62828; }
.fastfood .flow-tabs { background: #ffd23f; }
.hospital .flow-head,
.hospital .flow-target.primary { background: #1f5f9e; }
.hospital .flow-inset { background: #eef6ff; }
.public .flow-head,
.public .flow-target.primary { background: #7a4a18; }
.public .flow-inset { background: #fff8ec; }
.parking .flow-head,
.parking .flow-target.primary { background: #1d4ed8; }
.parking-inset .plate {
  width: 100%;
  border: 2px solid #1d4ed8;
  border-radius: 4px;
  padding: 8px 4px;
  font-size: 18px;
  font-weight: 900;
  background: #eef4ff;
}
.mini-keypad {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.mini-keypad span {
  min-height: 22px;
  display: grid;
  place-items: center;
  background: #f2f2f2;
  border: 1px solid #ddd;
  color: #222;
  font-size: 10px;
}
.transport .flow-head,
.transport .flow-target.primary { background: #087443; }
.transport-inset .card-pad {
  width: 88px;
  height: 58px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffde59, #0f8f5a);
  color: white;
  font-weight: 900;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.45);
}
.self-checkout .flow-head,
.self-checkout .flow-target.primary { background: #0f7a42; }
.checkout-inset .barcode-lines { margin: 6px 0; }

/* 요금 안내 */
.hint-toast {
  position: absolute;
  left: 12px; right: 12px;
  bottom: 110px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: #FEF3C7;
  border: 2px solid #F59E0B;
  color: #7A4A00;
  font-size: 16px;
  font-weight: 600;
  z-index: 25;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s var(--ease);
  display: flex;
  align-items: center;
  gap: 10px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   성공 축하 오버레이
   ========================================================= */
.celebrate {
  position: absolute;
  inset: 0;
  background: rgba(20, 83, 45, 0.92);
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  z-index: 100;
  animation: fadeIn 0.3s var(--ease);
  padding: var(--sp-5);
  text-align: center;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.celebrate-check {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: white;
  display: grid; place-items: center;
  animation: bump 0.6s var(--ease);
  box-shadow: 0 0 0 20px rgba(255,255,255,0.15), 0 0 0 40px rgba(255,255,255,0.08);
}
@keyframes bump {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.celebrate-check svg { animation: drawCheck 0.5s 0.2s var(--ease) both; }
@keyframes drawCheck {
  from { stroke-dashoffset: 60; }
  to   { stroke-dashoffset: 0; }
}
.celebrate h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}
.celebrate p {
  font-size: 18px;
  opacity: 0.9;
  margin: 0;
}

/* =========================================================
   결과 화면
   ========================================================= */
.result-hero {
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  text-align: center;
}
.result-medal {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  display: grid; place-items: center;
  margin: 0 auto var(--sp-4);
  border: 3px solid rgba(255,255,255,0.4);
}
.result-hero h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.result-hero p {
  font-size: 17px;
  opacity: 0.92;
  margin: 0;
  line-height: 1.5;
}

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-3);
  padding: var(--sp-5);
  background: var(--bg);
}
.result-stat {
  background: white;
  border-radius: var(--r-md);
  padding: var(--sp-3);
  text-align: center;
  border: 1px solid var(--border-soft);
}
.result-stat .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}
.result-stat .lab {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.result-timeline {
  padding: 0 var(--sp-5) var(--sp-5);
}
.result-timeline h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 var(--sp-3);
}
.timeline-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px 14px;
  background: white;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  margin-bottom: 8px;
}
.timeline-check {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.timeline-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.timeline-attempts {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.result-actions {
  padding: 0 var(--sp-5) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.result-share {
  margin: 0 var(--sp-5) var(--sp-5);
  padding: var(--sp-4);
  background: var(--surface-warm);
  border-radius: var(--r-md);
  border: 1px dashed #E1CD9A;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.result-share .qr {
  width: 60px; height: 60px;
  background: white;
  border-radius: 8px;
  padding: 6px;
  flex-shrink: 0;
  border: 1px solid #E1CD9A;
}
.result-share p {
  margin: 0;
  font-size: 14px;
  color: #7A5A1E;
  line-height: 1.45;
  font-weight: 500;
}
.result-share p strong { color: #5C4200; }

/* =========================================================
   안전 안내 화면
   ========================================================= */
.safety-hero {
  padding: var(--sp-6) var(--sp-5);
  background: linear-gradient(180deg, #FEF3C7 0%, var(--bg) 100%);
  text-align: center;
}
.safety-icon {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: white;
  border: 3px solid #F59E0B;
  display: grid; place-items: center;
  margin: 0 auto var(--sp-4);
}
.safety-hero h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #7A4A00;
}
.safety-hero p {
  font-size: 17px;
  color: #8A5C1F;
  margin: 0;
  line-height: 1.5;
}
.safety-list {
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.safety-item {
  background: white;
  border: 1.5px solid #F0E4C8;
  border-radius: var(--r-md);
  padding: var(--sp-4);
  display: flex;
  gap: var(--sp-3);
}
.safety-item .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: #FEF3C7;
  color: #7A4A00;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.safety-item h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
}
.safety-item p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* =========================================================
   접근성 시트 (설정)
   ========================================================= */
.sheet-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s var(--ease);
}
.sheet {
  width: 100%;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: var(--sp-5) var(--sp-5) var(--sp-6);
  max-height: 80%;
  overflow-y: auto;
  animation: sheetUp 0.3s var(--ease);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.sheet-handle {
  width: 40px; height: 4px;
  background: #D6CFBE;
  border-radius: 2px;
  margin: -8px auto var(--sp-4);
}
.sheet h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 var(--sp-4);
}
.sheet-row {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-soft);
}
.sheet-row:last-child { border-bottom: none; }
.sheet-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.sheet-row-title {
  font-size: 17px;
  font-weight: 700;
}
.sheet-row-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.size-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.size-opt {
  padding: 14px;
  border-radius: var(--r-md);
  border: 2px solid var(--border);
  background: white;
  font-weight: 700;
  text-align: center;
  transition: all 120ms;
}
.size-opt.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.size-opt.s { font-size: 14px; }
.size-opt.m { font-size: 18px; }
.size-opt.l { font-size: 22px; }

.toggle {
  position: relative;
  width: 56px; height: 32px;
  background: #D6CFBE;
  border-radius: 999px;
  transition: background 200ms;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 26px; height: 26px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: transform 200ms var(--ease);
}
.toggle.on { background: var(--primary); }
.toggle.on::after { transform: translateX(24px); }

/* 천천히 모드 배지 */
.slow-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  z-index: 40;
}

/* =========================================================
   Tweaks Panel (개발자 도구)
   ========================================================= */
.tweaks-hint {
  position: fixed;
  bottom: 16px;
  left: 16px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.7);
  color: white;
  border-radius: 8px;
  font-size: 12px;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
}

/* =========================================================
   현장 도움 카메라
   ========================================================= */
.camera-page {
  padding: 18px;
  padding-bottom: 28px;
}
.camera-title {
  margin: 0 0 8px;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0;
  word-break: keep-all;
}
.camera-title span { color: var(--primary); }
.camera-desc {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.45;
  word-break: keep-all;
}
.camera-goal {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}
.camera-goal span {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}
.camera-goal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 8px;
  align-items: stretch;
}
.camera-goal input {
  width: 100%;
  min-height: 46px;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0 12px;
  background: white;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
}
.mic-btn {
  min-height: 46px;
  border: 2px solid #cfe0d4;
  border-radius: 12px;
  background: #f4fbf8;
  color: var(--primary-dark);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 5px;
  padding: 0 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  word-break: keep-all;
}
.mic-btn.listening {
  background: #166534;
  color: white;
  border-color: #166534;
}
.mic-dot {
  width: 13px;
  height: 18px;
  border-radius: 8px 8px 10px 10px;
  border: 2px solid currentColor;
  position: relative;
  display: inline-block;
}
.mic-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 12px;
  height: 7px;
  transform: translateX(-50%);
  border-bottom: 2px solid currentColor;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
}
.camera-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #141414;
  border: 2px solid rgba(255,255,255,.2);
  box-shadow: var(--shadow-md);
}
.camera-frame video,
.camera-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.camera-empty {
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: white;
  text-align: center;
}
.camera-empty-icon {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.14);
}
.camera-empty p {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}
.scan-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #4ade80;
  z-index: 2;
}
.scan-corner.tl { top: 14px; left: 14px; border-top: 3px solid; border-left: 3px solid; border-radius: 8px 0 0 0; }
.scan-corner.tr { top: 14px; right: 14px; border-top: 3px solid; border-right: 3px solid; border-radius: 0 8px 0 0; }
.scan-corner.bl { bottom: 14px; left: 14px; border-bottom: 3px solid; border-left: 3px solid; border-radius: 0 0 0 8px; }
.scan-corner.br { bottom: 14px; right: 14px; border-bottom: 3px solid; border-right: 3px solid; border-radius: 0 0 8px 0; }
.analysis-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background: rgba(0,0,0,.62);
  color: white;
  text-align: center;
  z-index: 5;
}
.analysis-layer strong {
  font-size: 19px;
  font-weight: 900;
}
.analysis-layer span {
  font-size: 13px;
  font-weight: 700;
  opacity: .9;
}
.analysis-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.28);
  border-top-color: #4ade80;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analysis-result {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.target-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 74px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #166534;
  color: white;
  border: 3px solid white;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  text-align: center;
  font-size: 13px;
  line-height: 1.08;
  font-weight: 900;
  animation: fingerTap 1.45s var(--ease) infinite;
}
.result-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  color: var(--text);
  box-shadow: var(--shadow-md);
}
.result-panel strong {
  font-size: 15px;
  font-weight: 900;
}
.result-panel span {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 900;
}
.result-panel small {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 700;
}
.camera-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff2d8;
  color: #7a4a00;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  word-break: keep-all;
}
.camera-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.camera-note {
  margin: 12px 4px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  word-break: keep-all;
}
