/* MyBiz Waiting V1 — Customer Theme System (서룡 시그니처 레드 기본)
 * 1 default  Seoryong (#D32F2F)
 * scarlet / orange / navy / black 선택 유지
 */

/* ── 1. 서룡 시그니처 레드 (Default) ─────────────────────────── */
body.theme-customer,
body.theme-customer.theme-default,
body.theme-customer.brand-seoryong.theme-default,
body.theme-customer[data-theme='seoryong'] {
  --theme-primary: #d32f2f;
  --theme-color: #d32f2f;
  --theme-hover: #e53935;
  --theme-active: #b71c1c;
  --theme-accent: #d32f2f;
  --mb-primary: #d32f2f;
  --mb-danger: #d32f2f;
  --mb-text-main: #3e3a39;
  --mb-bg-main: #f2f2f7;
  --mb-card-bg: #ffffff;
  --mb-primary-hover: #e53935;
  --mb-primary-soft: rgba(211, 47, 47, 0.18);
  --primary-color: #d32f2f;
  --banner-bg: var(--mb-card-bg);
  --banner-text: var(--mb-text-main);
  --bg-main: var(--mb-bg-main);
  --panel: var(--mb-card-bg);
  --panel-elevated: var(--mb-card-bg);
  --border: rgba(62, 58, 57, 0.08);
  --primary: var(--theme-primary);
  --primary-hover: var(--theme-hover);
  --special-border: var(--theme-accent);
  --text: var(--mb-text-main);
  --text-muted: #8a8580;
  --danger: var(--mb-danger);
  --ok: #34c759;
  --shadow: 0 2px 12px rgba(62, 58, 57, 0.06);
  --radius-card: 18px;
  --modal-bg: #ffffff;
  --key-bg: #ffffff;
  --key-text: #3e3a39;
  --overlay: rgba(62, 58, 57, 0.4);
  --party-bg: #ffffff;
  --party-hover-bg: var(--mb-primary);
  --party-active: var(--mb-primary);
}

body.theme-customer[data-theme='scarlet'] {
  --theme-primary: #dc2626;
  --theme-color: #dc2626;
  --theme-hover: #ef4444;
  --theme-active: #b91c1c;
  --theme-accent: #dc2626;
  --mb-primary: #dc2626;
  --mb-danger: #dc2626;
  --mb-primary-hover: #ef4444;
  --mb-primary-soft: rgba(220, 38, 38, 0.18);
  --primary-color: #dc2626;
  --primary: #dc2626;
  --primary-hover: #ef4444;
}

/* ── 2. Warm Orange ───────────────────────────────────────────── */
body.theme-customer[data-theme='orange'],
body.theme-customer[data-theme='warm'] {
  --theme-primary: #ea580c;
  --theme-color: #ea580c;
  --theme-hover: #f97316;
  --theme-active: #c2410c;
  --theme-accent: #ea580c;
  --mb-primary: #ea580c;
  --mb-primary-hover: #f97316;
  --mb-primary-soft: rgba(234, 88, 12, 0.18);
  --banner-bg: #ffffff;
  --banner-text: #1d1d1f;
  --bg-main: #f2f2f7;
  --panel: #ffffff;
  --panel-elevated: #ffffff;
  --border: rgba(0, 0, 0, 0.05);
  --primary: var(--theme-primary);
  --primary-hover: var(--theme-hover);
  --special-border: var(--theme-accent);
  --text: #1d1d1f;
  --text-muted: #86868b;
  --danger: #e53935;
  --ok: #34c759;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius-card: 18px;
  --modal-bg: #ffffff;
  --key-bg: #ffffff;
  --key-text: #1d1d1f;
  --overlay: rgba(0, 0, 0, 0.4);
  --party-bg: #ffffff;
  --party-hover-bg: var(--mb-primary);
  --party-active: var(--mb-primary);
}

/* ── 3. Deep Navy ─────────────────────────────────────────────── */
body.theme-customer[data-theme='navy'],
body.theme-customer[data-theme='cool'] {
  --theme-primary: #1e40af;
  --theme-color: #1e40af;
  --theme-hover: #2563eb;
  --theme-active: #1e3a8a;
  --theme-accent: #1e40af;
  --mb-primary: #1e40af;
  --mb-primary-hover: #2563eb;
  --mb-primary-soft: rgba(30, 64, 175, 0.18);
  --banner-bg: #ffffff;
  --banner-text: #1d1d1f;
  --bg-main: #f2f2f7;
  --panel: #ffffff;
  --panel-elevated: #ffffff;
  --border: rgba(0, 0, 0, 0.05);
  --primary: var(--theme-primary);
  --primary-hover: var(--theme-hover);
  --special-border: var(--theme-accent);
  --text: #1d1d1f;
  --text-muted: #86868b;
  --danger: #e53935;
  --ok: #34c759;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius-card: 18px;
  --modal-bg: #ffffff;
  --key-bg: #ffffff;
  --key-text: #1d1d1f;
  --overlay: rgba(0, 0, 0, 0.4);
  --party-bg: #ffffff;
  --party-hover-bg: var(--mb-primary);
  --party-active: var(--mb-primary);
}

/* ── 4. Minimal Black ─────────────────────────────────────────── */
body.theme-customer[data-theme='black'],
body.theme-customer[data-theme='purple'] {
  --theme-primary: #52525b;
  --theme-color: #52525b;
  --theme-hover: #71717a;
  --theme-active: #3f3f46;
  --theme-accent: #52525b;
  --mb-primary: #52525b;
  --mb-primary-hover: #71717a;
  --mb-primary-soft: rgba(82, 82, 91, 0.18);
  --banner-bg: #ffffff;
  --banner-text: #1d1d1f;
  --bg-main: #f2f2f7;
  --panel: #ffffff;
  --panel-elevated: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --primary: var(--theme-primary);
  --primary-hover: var(--theme-hover);
  --special-border: var(--theme-accent);
  --text: #1d1d1f;
  --text-muted: #86868b;
  --danger: #e53935;
  --ok: #34c759;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius-card: 18px;
  --modal-bg: #ffffff;
  --key-bg: #ffffff;
  --key-text: #1d1d1f;
  --overlay: rgba(0, 0, 0, 0.45);
  --party-bg: #ffffff;
  --party-hover-bg: var(--mb-primary);
  --party-active: var(--mb-primary);
}

/* ── 5. option4 / 테마 클래스 슬롯 (JS inline 변수 실패 시 폴백) ─ */
body.theme-customer[data-theme='black'] {
  --mb-primary-soft: rgba(82, 82, 91, 0.18);
}

/* 서룡 5슬롯: class 만으로도 --theme-* 가 항상 존재 */
body.theme-customer.theme-option1 {
  --theme-primary: #dc2626;
  --theme-color: #dc2626;
  --theme-hover: #ef4444;
  --theme-active: #b91c1c;
  --theme-accent: #dc2626;
  --mb-primary: #dc2626;
  --mb-primary-hover: #ef4444;
  --mb-primary-soft: rgba(220, 38, 38, 0.18);
  --primary: #dc2626;
  --primary-hover: #ef4444;
  --primary-color: #dc2626;
}

body.theme-customer.theme-option2 {
  --theme-primary: #ea580c;
  --theme-color: #ea580c;
  --theme-hover: #f97316;
  --theme-active: #c2410c;
  --theme-accent: #ea580c;
  --mb-primary: #ea580c;
  --mb-primary-hover: #f97316;
  --mb-primary-soft: rgba(234, 88, 12, 0.18);
  --primary: #ea580c;
  --primary-hover: #f97316;
  --primary-color: #ea580c;
}

body.theme-customer.theme-option3 {
  --theme-primary: #1e40af;
  --theme-color: #1e40af;
  --theme-hover: #2563eb;
  --theme-active: #1e3a8a;
  --theme-accent: #1e40af;
  --mb-primary: #1e40af;
  --mb-primary-hover: #2563eb;
  --mb-primary-soft: rgba(30, 64, 175, 0.18);
  --primary: #1e40af;
  --primary-hover: #2563eb;
  --primary-color: #1e40af;
}

body.theme-customer.theme-option4 {
  --theme-primary: #52525b;
  --theme-color: #52525b;
  --theme-hover: #71717a;
  --theme-active: #3f3f46;
  --theme-accent: #52525b;
  --mb-primary: #52525b;
  --mb-primary-hover: #71717a;
  --mb-primary-soft: rgba(82, 82, 91, 0.18);
  --primary: #52525b;
  --primary-hover: #71717a;
  --primary-color: #52525b;
}

/* ── Base surface ─────────────────────────────────────────────── */
body.theme-customer {
  color: var(--text);
  background-color: #f2f2f7 !important;
  min-height: 100%;
}

body.theme-customer .brand-strip {
  background: var(--banner-bg);
  color: var(--banner-text);
  text-align: center;
  padding: 14px 18px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

/* Warm / Cool white: 상단 화이트 카드 배너 (보라 띠 제거) */
body.theme-customer.theme-default .brand-strip,
body.theme-customer.theme-option1 .brand-strip,
body.theme-customer.theme-option2 .brand-strip,
body.theme-customer[data-theme='seoryong'] .brand-strip,
body.theme-customer[data-theme='warm'] .brand-strip,
body.theme-customer[data-theme='cool'] .brand-strip {
  margin: 12px 16px 0;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-family: var(--font-display, 'Outfit', 'IBM Plex Sans KR', sans-serif);
  font-size: clamp(1.02rem, 2.8vw, 1.2rem);
  font-weight: 800;
  color: #1d1d1f;
  background: #ffffff;
}

body.theme-customer .mybiz-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}

body.theme-customer.theme-default .mybiz-header,
body.theme-customer.theme-option1 .mybiz-header,
body.theme-customer.theme-option2 .mybiz-header {
  background: transparent;
  border-bottom-color: transparent;
}

body.theme-customer .brand-name,
body.theme-customer .hero-title,
body.theme-customer .modal-title,
body.theme-customer .keypad-display,
body.theme-customer .party-btn,
body.theme-customer .separate-check,
body.theme-customer .modal-alert-msg {
  color: var(--text);
}

body.theme-customer .brand-sub,
body.theme-customer .hero-copy,
body.theme-customer .modal-sub,
body.theme-customer .separate-selected,
body.theme-customer .party-btn small,
body.theme-customer .keypad-display.is-empty::before {
  color: var(--text-muted);
}

body.theme-customer .tool-btn,
body.theme-customer .tool-toggle {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: var(--chip-pad-y, 4px) var(--chip-pad-x, 8px);
  font-size: var(--chip-fs, 0.7rem);
  font-weight: 600;
  min-height: var(--chip-h, 30px);
  height: var(--chip-h, 30px);
  box-sizing: border-box;
}

body.theme-customer .status-badge {
  min-height: var(--chip-h, 30px);
  height: var(--chip-h, 30px);
  padding: var(--chip-pad-y, 4px) var(--chip-pad-x, 8px);
  font-size: var(--chip-fs, 0.7rem);
}

@media (max-width: 600px) {
  body.theme-customer .mybiz-header {
    padding: 4px 8px;
    gap: 4px;
  }
  body.theme-customer .brand-strip {
    margin: 6px 8px 0;
    padding: 8px 10px;
    font-size: 0.85rem;
  }
  body.theme-customer .tool-btn,
  body.theme-customer .tool-toggle,
  body.theme-customer .status-badge {
    --chip-h: 28px;
    --chip-pad-y: 4px;
    --chip-pad-x: 6px;
    --chip-fs: 0.66rem;
    padding: var(--chip-pad-y) var(--chip-pad-x);
    min-height: var(--chip-h);
    height: var(--chip-h);
    font-size: var(--chip-fs);
  }
}

body.theme-customer .tool-btn:hover,
body.theme-customer .tool-toggle:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

body.theme-customer .tool-toggle[aria-pressed='true'] {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

body.theme-customer .printer-bar .btn-link {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
}

body.theme-customer .printer-bar .btn-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

body.theme-customer .printer-bar .warn,
body.theme-customer #printerStatus.warn {
  color: var(--danger);
  font-weight: 800;
}

body.theme-customer .printer-bar .ok,
body.theme-customer #printerStatus.ok {
  color: var(--ok);
  font-weight: 700;
}

/* 4x4 party grid — 1~12 + 13명 이상(1칸) */
body.theme-customer .party-grid,
body.theme-customer .party-grid-4x4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

body.theme-customer .party-btn-custom {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 112px;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

body.theme-customer .party-btn-custom .party-custom-main {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: inherit;
}

body.theme-customer .party-btn-custom small,
body.theme-customer .party-btn-custom .party-custom-sub {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #86868b;
  opacity: 1;
}

@media (max-width: 720px) {
  body.theme-customer .party-grid,
  body.theme-customer .party-grid-4x4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  body.theme-customer .party-btn {
    min-height: 96px;
  }

  body.theme-customer .party-btn .party-num {
    font-size: clamp(2.2rem, 9vw, 2.85rem);
  }

  body.theme-customer .party-btn-custom {
    grid-column: span 2;
    min-height: 96px;
    font-size: 1.5rem;
  }

  body.theme-customer .party-btn-custom .party-custom-main {
    font-size: 1.5rem;
  }

  body.theme-customer .party-btn-custom small,
  body.theme-customer .party-btn-custom .party-custom-sub {
    font-size: 0.85rem;
    font-weight: 600;
  }
}

/* Party buttons — 순백 알약 + 초대형 숫자 + 코랄 터치 피드백 */
body.theme-customer .party-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 112px;
  padding: 12px 8px 14px;
  background: var(--party-bg, #ffffff);
  border: none;
  color: var(--text);
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: background 0.12s ease, color 0.12s ease, transform 0.1s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body.theme-customer.theme-default .party-btn,
body.theme-customer.theme-option1 .party-btn,
body.theme-customer.theme-option2 .party-btn,
body.theme-customer[data-theme='seoryong'] .party-btn,
body.theme-customer[data-theme='warm'] .party-btn,
body.theme-customer[data-theme='cool'] .party-btn {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.theme-customer .party-btn .party-num {
  display: block;
  font-family: var(--font-display, 'Outfit', 'IBM Plex Sans KR', sans-serif);
  font-size: clamp(2.75rem, 6.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: inherit;
}

body.theme-customer .party-btn .party-unit,
body.theme-customer .party-btn small.party-unit {
  display: block;
  margin: 0;
  font-family: var(--font-body, 'IBM Plex Sans KR', sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #86868b;
  opacity: 1;
}

/* 1~12 · 13+ 공통: hover / active / selected → 테마 --mb-primary */
body.theme-customer .party-btn:hover,
body.theme-customer .party-btn:active,
body.theme-customer .party-btn.is-selected,
body.theme-customer .party-btn.selected {
  background: var(--mb-primary, var(--theme-primary));
  border-color: var(--mb-primary, var(--theme-primary));
  color: #ffffff;
  box-shadow: 0 4px 16px var(--mb-primary-soft, rgba(255, 59, 48, 0.28));
  transform: translateY(-1px);
}

body.theme-customer .party-btn:active {
  transform: scale(0.97);
  background: var(--mb-primary, var(--theme-primary));
}

body.theme-customer .party-btn:hover .party-num,
body.theme-customer .party-btn:active .party-num,
body.theme-customer .party-btn.is-selected .party-num,
body.theme-customer .party-btn.selected .party-num,
body.theme-customer .party-btn:hover .party-unit,
body.theme-customer .party-btn:active .party-unit,
body.theme-customer .party-btn.is-selected .party-unit,
body.theme-customer .party-btn.selected .party-unit,
body.theme-customer .party-btn:hover small,
body.theme-customer .party-btn:active small,
body.theme-customer .party-btn.is-selected small,
body.theme-customer .party-btn.selected small,
body.theme-customer .party-btn:hover .party-custom-main,
body.theme-customer .party-btn:active .party-custom-main,
body.theme-customer .party-btn.is-selected .party-custom-main,
body.theme-customer .party-btn.selected .party-custom-main,
body.theme-customer .party-btn:hover .party-custom-sub,
body.theme-customer .party-btn:active .party-custom-sub,
body.theme-customer .party-btn.is-selected .party-custom-sub,
body.theme-customer .party-btn.selected .party-custom-sub {
  color: #ffffff;
}

/* 13명 이상 — 1~12와 동일 순백 알약 (외곽 테두리 제거) */
body.theme-customer .party-btn.party-btn-custom,
body.theme-customer[data-theme='seoryong'] .party-btn-custom,
body.theme-customer[data-theme='warm'] .party-btn-custom,
body.theme-customer[data-theme='cool'] .party-btn-custom,
body.theme-customer[data-theme='purple'] .party-btn-custom,
body.theme-customer[data-theme='orange'] .party-btn-custom {
  grid-column: span 2;
  border: none !important;
  outline: none;
  background: var(--party-bg, #ffffff);
  font-size: 1.8rem;
  font-weight: 800;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  color: var(--text);
}

body.theme-customer .party-btn.party-btn-custom:hover,
body.theme-customer .party-btn.party-btn-custom:active,
body.theme-customer .party-btn.party-btn-custom.is-selected,
body.theme-customer .party-btn.party-btn-custom.selected {
  background: var(--mb-primary, var(--theme-primary)) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px var(--mb-primary-soft, rgba(255, 59, 48, 0.28));
}

body.theme-customer .party-btn.party-btn-custom:hover .party-custom-main,
body.theme-customer .party-btn.party-btn-custom:active .party-custom-main,
body.theme-customer .party-btn.party-btn-custom.is-selected .party-custom-main,
body.theme-customer .party-btn.party-btn-custom.selected .party-custom-main,
body.theme-customer .party-btn.party-btn-custom:hover .party-custom-sub,
body.theme-customer .party-btn.party-btn-custom:active .party-custom-sub,
body.theme-customer .party-btn.party-btn-custom.is-selected .party-custom-sub,
body.theme-customer .party-btn.party-btn-custom.selected .party-custom-sub,
body.theme-customer .party-btn.party-btn-custom:hover small,
body.theme-customer .party-btn.party-btn-custom:active small,
body.theme-customer .party-btn.party-btn-custom.is-selected small,
body.theme-customer .party-btn.party-btn-custom.selected small {
  color: #ffffff !important;
  opacity: 1;
}

body.theme-customer.theme-option3 .party-btn,
body.theme-customer.theme-option4 .party-btn,
body.theme-customer[data-theme='purple'] .party-btn,
body.theme-customer[data-theme='orange'] .party-btn {
  background: var(--party-bg, var(--panel));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

body.theme-customer.theme-option3 .party-btn.party-btn-custom,
body.theme-customer.theme-option4 .party-btn.party-btn-custom,
body.theme-customer[data-theme='purple'] .party-btn-custom,
body.theme-customer[data-theme='orange'] .party-btn-custom {
  background: var(--party-bg, var(--panel));
  border: none !important;
}

body.theme-customer.theme-option3 .party-btn.party-btn-custom:hover,
body.theme-customer.theme-option3 .party-btn.party-btn-custom:active,
body.theme-customer.theme-option3 .party-btn.party-btn-custom.is-selected,
body.theme-customer.theme-option4 .party-btn.party-btn-custom:hover,
body.theme-customer.theme-option4 .party-btn.party-btn-custom:active,
body.theme-customer.theme-option4 .party-btn.party-btn-custom.is-selected {
  background: var(--mb-primary, var(--theme-primary)) !important;
  border-color: var(--mb-primary, var(--theme-primary)) !important;
  color: #ffffff !important;
}

/* 5테마 공통: 이후 등장하는 테마별 흰 배경 규칙이 hover를 덮지 못하게 고정 */
body.theme-customer .party-btn:hover,
body.theme-customer .party-btn:active,
body.theme-customer .party-btn.is-selected,
body.theme-customer .party-btn.selected,
body.theme-customer.theme-default .party-btn:hover,
body.theme-customer.theme-option1 .party-btn:hover,
body.theme-customer.theme-option2 .party-btn:hover,
body.theme-customer.theme-option3 .party-btn:hover,
body.theme-customer.theme-option4 .party-btn:hover,
body.theme-customer.theme-default .party-btn:active,
body.theme-customer.theme-option1 .party-btn:active,
body.theme-customer.theme-option2 .party-btn:active,
body.theme-customer.theme-option3 .party-btn:active,
body.theme-customer.theme-option4 .party-btn:active,
body.theme-customer.theme-default .party-btn.is-selected,
body.theme-customer.theme-option1 .party-btn.is-selected,
body.theme-customer.theme-option2 .party-btn.is-selected,
body.theme-customer.theme-option3 .party-btn.is-selected,
body.theme-customer.theme-option4 .party-btn.is-selected,
body.theme-customer[data-theme='seoryong'] .party-btn:hover,
body.theme-customer[data-theme='scarlet'] .party-btn:hover,
body.theme-customer[data-theme='orange'] .party-btn:hover,
body.theme-customer[data-theme='navy'] .party-btn:hover,
body.theme-customer[data-theme='black'] .party-btn:hover,
body.theme-customer[data-theme='seoryong'] .party-btn:active,
body.theme-customer[data-theme='scarlet'] .party-btn:active,
body.theme-customer[data-theme='orange'] .party-btn:active,
body.theme-customer[data-theme='navy'] .party-btn:active,
body.theme-customer[data-theme='black'] .party-btn:active,
body.theme-customer[data-theme='seoryong'] .party-btn.is-selected,
body.theme-customer[data-theme='scarlet'] .party-btn.is-selected,
body.theme-customer[data-theme='orange'] .party-btn.is-selected,
body.theme-customer[data-theme='navy'] .party-btn.is-selected,
body.theme-customer[data-theme='black'] .party-btn.is-selected {
  background: var(--mb-primary, var(--theme-color, var(--primary))) !important;
  border-color: var(--mb-primary, var(--theme-color, var(--primary))) !important;
  color: #ffffff !important;
}

/* 연결 뱃지 — status-conn.css 공용 칩 규격 사용 (중복 오버라이드 최소화) */
body.theme-customer .status-badge {
  color: #86868b;
  background: #ffffff;
  border-color: var(--border);
  text-shadow: none;
  box-shadow: none;
}

/*
 * [보류] 분리착석 패널 스타일 — HTML/JS 주석 처리 중.
 * 재사용 시 아래 display:none !important 한 줄만 제거하고 나머지 규칙 유지.
 */
body.theme-customer .separate-panel {
  display: none !important;
  margin-top: 14px;
  padding: 16px;
  border-radius: var(--radius-card, 20px);
  background: var(--panel);
  border: 1px solid var(--border);
}

body.theme-customer .separate-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.98rem;
  line-height: 1.45;
  cursor: pointer;
  color: var(--text);
}

body.theme-customer .separate-check input {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

body.theme-customer .customer-name-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

body.theme-customer .customer-name-field.is-hidden,
body.theme-customer .customer-name-field[hidden] {
  display: none !important;
}

body.theme-customer .customer-name-label {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

body.theme-customer .customer-name-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

body.theme-customer .customer-name-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

body.theme-customer .customer-name-input:disabled {
  opacity: 0.5;
}

/* 대형 CTA — 선택 테마 --mb-primary 100% 연동 */
body.theme-customer .cta-submit {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  min-height: 76px;
  padding: 20px 22px;
  border: none;
  border-radius: 24px;
  background: var(--mb-primary, var(--primary));
  color: #ffffff;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: clamp(1.2rem, 3.8vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--mb-primary, var(--primary)) 28%, transparent);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease, opacity 0.15s ease;
}

body.theme-customer .cta-submit:hover:not(:disabled) {
  background: var(--mb-primary-hover, var(--primary-hover));
  transform: translateY(-1px);
}

body.theme-customer .cta-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--panel-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: none;
}

body.theme-customer .last-ticket-line {
  margin-top: 22px;
}

/* 대형 접수 완료 오버레이 */
body.theme-customer .done-modal[hidden] {
  display: none !important;
}

body.theme-customer .done-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--overlay);
  cursor: pointer;
  animation: done-fade 0.2s ease both;
}

@keyframes done-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body.theme-customer .done-modal-panel {
  width: min(560px, 100%);
  padding: clamp(28px, 6vw, 48px) clamp(20px, 5vw, 36px);
  border-radius: 28px;
  text-align: center;
  background: var(--panel);
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
  color: var(--text);
  pointer-events: none;
}

body.theme-customer .done-eyebrow {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

body.theme-customer .done-title {
  margin: 0 0 14px;
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: clamp(2rem, 7vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

body.theme-customer .done-sub {
  margin: 0 0 18px;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 700;
  color: var(--text);
}

body.theme-customer .done-hint {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

body.theme-customer .top-notice {
  display: none !important;
}

body.theme-customer .btn-call,
body.theme-customer .btn-enter {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
  transition: background 0.15s ease;
}

body.theme-customer .btn-call:hover,
body.theme-customer .btn-enter:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

body.theme-customer .btn-cancel {
  color: var(--text);
  border: 1px solid var(--border);
  background: transparent;
}

body.theme-customer .btn-cancel:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

body.theme-customer .status-toast {
  min-width: 240px;
  max-width: 90%;
  padding: 12px 20px;
  border: none;
  border-radius: 12px !important;
  background-color: rgba(30, 30, 32, 0.88) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

body.theme-customer .modal-backdrop {
  background: var(--overlay);
}

body.theme-customer .modal-sheet {
  background: var(--modal-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  color: var(--text);
  border-radius: 24px;
}

body.theme-customer .keypad-display {
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.06);
  border-radius: 18px;
}

body.theme-customer .keypad-key {
  background: var(--key-bg);
  border: 1px solid transparent;
  color: var(--key-text);
  border-radius: 999px;
  box-shadow: none;
}

body.theme-customer .keypad-key:hover,
body.theme-customer .keypad-key:active,
body.theme-customer.theme-default .keypad-key:hover,
body.theme-customer.theme-option1 .keypad-key:hover,
body.theme-customer.theme-option2 .keypad-key:hover,
body.theme-customer.theme-option3 .keypad-key:hover,
body.theme-customer.theme-option4 .keypad-key:hover,
body.theme-customer.theme-default .keypad-key:active,
body.theme-customer.theme-option1 .keypad-key:active,
body.theme-customer.theme-option2 .keypad-key:active,
body.theme-customer.theme-option3 .keypad-key:active,
body.theme-customer.theme-option4 .keypad-key:active {
  background: color-mix(
    in srgb,
    var(--theme-color, var(--theme-hover, var(--primary))) 18%,
    var(--key-bg, #ffffff)
  ) !important;
  border-color: var(--theme-color, var(--primary)) !important;
  color: var(--theme-color, var(--theme-active, var(--primary))) !important;
}

body.theme-customer .keypad-key:hover {
  transform: translateY(-1px);
}

body.theme-customer .keypad-key:active {
  transform: scale(0.97);
  background: color-mix(
    in srgb,
    var(--theme-active, var(--theme-color, var(--primary))) 24%,
    var(--key-bg, #ffffff)
  ) !important;
}

body.theme-customer #keypadConfirmBtn.btn-enter,
body.theme-customer .modal-actions .btn-enter {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
}

body.theme-customer #keypadConfirmBtn.btn-enter:hover,
body.theme-customer .modal-actions .btn-enter:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

body.theme-customer .modal-actions .btn-cancel {
  background: var(--panel-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

body.theme-customer .modal-sheet-alert .btn-call:hover {
  background: var(--special-border);
}

/*
 * ════════════════════════════════════════════════════════════════
 * THEME INTERACTION LOCK — 5테마 전수
 * 브라우저 기본 파랑(#007bff) / 강제 흰색(#fff) 이 hover·active·focus 에서
 * 절대 이기지 않도록 최하단 + 높은 특이도 + !important 로 고정.
 * ════════════════════════════════════════════════════════════════
 */
body.theme-customer button,
body.theme-customer .keypad-key,
body.theme-customer .party-btn,
body.theme-customer .cta-submit,
body.theme-customer .btn-primary,
body.theme-customer .btn-enter,
body.theme-customer .btn-call {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

body.theme-customer button::-moz-focus-inner {
  border: 0;
}

/* ── 키패드: 흰 배경 유지 + 테마색 글자/테두리 (흰 글자 금지) ── */
body.theme-customer .keypad-key:hover,
body.theme-customer .keypad-key:focus,
body.theme-customer .keypad-key:focus-visible,
body.theme-customer .keypad-key:active,
body.theme-customer.theme-default .keypad-key:hover,
body.theme-customer.theme-default .keypad-key:focus,
body.theme-customer.theme-default .keypad-key:active,
body.theme-customer.theme-option1 .keypad-key:hover,
body.theme-customer.theme-option1 .keypad-key:focus,
body.theme-customer.theme-option1 .keypad-key:active,
body.theme-customer.theme-option2 .keypad-key:hover,
body.theme-customer.theme-option2 .keypad-key:focus,
body.theme-customer.theme-option2 .keypad-key:active,
body.theme-customer.theme-option3 .keypad-key:hover,
body.theme-customer.theme-option3 .keypad-key:focus,
body.theme-customer.theme-option3 .keypad-key:active,
body.theme-customer.theme-option4 .keypad-key:hover,
body.theme-customer.theme-option4 .keypad-key:focus,
body.theme-customer.theme-option4 .keypad-key:active,
body.theme-customer[data-theme='seoryong'] .keypad-key:hover,
body.theme-customer[data-theme='seoryong'] .keypad-key:focus,
body.theme-customer[data-theme='seoryong'] .keypad-key:active,
body.theme-customer[data-theme='scarlet'] .keypad-key:hover,
body.theme-customer[data-theme='scarlet'] .keypad-key:focus,
body.theme-customer[data-theme='scarlet'] .keypad-key:active,
body.theme-customer[data-theme='orange'] .keypad-key:hover,
body.theme-customer[data-theme='orange'] .keypad-key:focus,
body.theme-customer[data-theme='orange'] .keypad-key:active,
body.theme-customer[data-theme='navy'] .keypad-key:hover,
body.theme-customer[data-theme='navy'] .keypad-key:focus,
body.theme-customer[data-theme='navy'] .keypad-key:active,
body.theme-customer[data-theme='black'] .keypad-key:hover,
body.theme-customer[data-theme='black'] .keypad-key:focus,
body.theme-customer[data-theme='black'] .keypad-key:active {
  background-color: var(--key-bg, #ffffff) !important;
  background-image: none !important;
  border-color: var(--theme-color, var(--theme-hover, var(--primary))) !important;
  color: var(--theme-color, var(--theme-active, var(--primary))) !important;
  outline: none !important;
  box-shadow: inset 0 0 0 2px var(--theme-color, var(--primary)) !important;
  -webkit-tap-highlight-color: transparent;
}

body.theme-customer .keypad-key:hover,
body.theme-customer.theme-default .keypad-key:hover,
body.theme-customer.theme-option1 .keypad-key:hover,
body.theme-customer.theme-option2 .keypad-key:hover,
body.theme-customer.theme-option3 .keypad-key:hover,
body.theme-customer.theme-option4 .keypad-key:hover {
  transform: translateY(-1px);
}

body.theme-customer .keypad-key:active,
body.theme-customer.theme-default .keypad-key:active,
body.theme-customer.theme-option1 .keypad-key:active,
body.theme-customer.theme-option2 .keypad-key:active,
body.theme-customer.theme-option3 .keypad-key:active,
body.theme-customer.theme-option4 .keypad-key:active {
  transform: scale(0.97);
  background-color: var(--key-bg, #ffffff) !important;
  color: var(--theme-active, var(--theme-color, var(--primary))) !important;
  box-shadow: inset 0 0 0 2px var(--theme-active, var(--theme-color)) !important;
}

/* ── 인원 버튼: 테마색 채움 + 흰 글자 (배경이 테마색이어야 가독) ── */
body.theme-customer .party-btn:hover,
body.theme-customer .party-btn:focus,
body.theme-customer .party-btn:focus-visible,
body.theme-customer .party-btn:active,
body.theme-customer .party-btn.is-selected,
body.theme-customer .party-btn.selected,
body.theme-customer.theme-default .party-btn:hover,
body.theme-customer.theme-default .party-btn:focus,
body.theme-customer.theme-default .party-btn:active,
body.theme-customer.theme-option1 .party-btn:hover,
body.theme-customer.theme-option1 .party-btn:focus,
body.theme-customer.theme-option1 .party-btn:active,
body.theme-customer.theme-option2 .party-btn:hover,
body.theme-customer.theme-option2 .party-btn:focus,
body.theme-customer.theme-option2 .party-btn:active,
body.theme-customer.theme-option3 .party-btn:hover,
body.theme-customer.theme-option3 .party-btn:focus,
body.theme-customer.theme-option3 .party-btn:active,
body.theme-customer.theme-option4 .party-btn:hover,
body.theme-customer.theme-option4 .party-btn:focus,
body.theme-customer.theme-option4 .party-btn:active,
body.theme-customer[data-theme='seoryong'] .party-btn:hover,
body.theme-customer[data-theme='seoryong'] .party-btn:focus,
body.theme-customer[data-theme='seoryong'] .party-btn:active,
body.theme-customer[data-theme='scarlet'] .party-btn:hover,
body.theme-customer[data-theme='scarlet'] .party-btn:focus,
body.theme-customer[data-theme='scarlet'] .party-btn:active,
body.theme-customer[data-theme='orange'] .party-btn:hover,
body.theme-customer[data-theme='orange'] .party-btn:focus,
body.theme-customer[data-theme='orange'] .party-btn:active,
body.theme-customer[data-theme='navy'] .party-btn:hover,
body.theme-customer[data-theme='navy'] .party-btn:focus,
body.theme-customer[data-theme='navy'] .party-btn:active,
body.theme-customer[data-theme='black'] .party-btn:hover,
body.theme-customer[data-theme='black'] .party-btn:focus,
body.theme-customer[data-theme='black'] .party-btn:active {
  background: var(--theme-color, var(--mb-primary, var(--primary))) !important;
  background-color: var(--theme-color, var(--mb-primary, var(--primary))) !important;
  background-image: none !important;
  border-color: var(--theme-color, var(--mb-primary, var(--primary))) !important;
  color: #ffffff !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

body.theme-customer .party-btn:hover .party-num,
body.theme-customer .party-btn:focus .party-num,
body.theme-customer .party-btn:active .party-num,
body.theme-customer .party-btn.is-selected .party-num,
body.theme-customer .party-btn:hover .party-unit,
body.theme-customer .party-btn:focus .party-unit,
body.theme-customer .party-btn:active .party-unit,
body.theme-customer .party-btn.is-selected .party-unit,
body.theme-customer .party-btn:hover small,
body.theme-customer .party-btn:focus small,
body.theme-customer .party-btn:active small,
body.theme-customer .party-btn.is-selected small,
body.theme-customer .party-btn:hover .party-custom-main,
body.theme-customer .party-btn:focus .party-custom-main,
body.theme-customer .party-btn:active .party-custom-main,
body.theme-customer .party-btn:hover .party-custom-sub,
body.theme-customer .party-btn:focus .party-custom-sub,
body.theme-customer .party-btn:active .party-custom-sub {
  color: #ffffff !important;
}

/* ── CTA / btn-primary: hover=theme-hover, active/focus=theme-active (파랑 금지) ── */
body.theme-customer .cta-submit:not(:disabled),
body.theme-customer .btn-primary:not(:disabled),
body.theme-customer #confirmWaitingBtn:not(:disabled) {
  background: var(--theme-color, var(--mb-primary, var(--primary))) !important;
  background-color: var(--theme-color, var(--mb-primary, var(--primary))) !important;
  background-image: none !important;
  color: #ffffff !important;
  border: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

body.theme-customer .cta-submit:hover:not(:disabled),
body.theme-customer .btn-primary:hover:not(:disabled),
body.theme-customer #confirmWaitingBtn:hover:not(:disabled),
body.theme-customer.theme-default .cta-submit:hover:not(:disabled),
body.theme-customer.theme-option1 .cta-submit:hover:not(:disabled),
body.theme-customer.theme-option2 .cta-submit:hover:not(:disabled),
body.theme-customer.theme-option3 .cta-submit:hover:not(:disabled),
body.theme-customer.theme-option4 .cta-submit:hover:not(:disabled),
body.theme-customer[data-theme='orange'] .cta-submit:hover:not(:disabled),
body.theme-customer[data-theme='orange'] .btn-primary:hover:not(:disabled) {
  background: var(--theme-hover, var(--theme-color, var(--primary))) !important;
  background-color: var(--theme-hover, var(--theme-color, var(--primary))) !important;
  background-image: none !important;
  color: #ffffff !important;
  outline: none !important;
}

body.theme-customer .cta-submit:focus:not(:disabled),
body.theme-customer .cta-submit:focus-visible:not(:disabled),
body.theme-customer .cta-submit:active:not(:disabled),
body.theme-customer .btn-primary:focus:not(:disabled),
body.theme-customer .btn-primary:focus-visible:not(:disabled),
body.theme-customer .btn-primary:active:not(:disabled),
body.theme-customer #confirmWaitingBtn:focus:not(:disabled),
body.theme-customer #confirmWaitingBtn:active:not(:disabled),
body.theme-customer.theme-default .cta-submit:active:not(:disabled),
body.theme-customer.theme-option1 .cta-submit:active:not(:disabled),
body.theme-customer.theme-option2 .cta-submit:active:not(:disabled),
body.theme-customer.theme-option3 .cta-submit:active:not(:disabled),
body.theme-customer.theme-option4 .cta-submit:active:not(:disabled),
body.theme-customer[data-theme='orange'] .cta-submit:active:not(:disabled),
body.theme-customer[data-theme='orange'] .cta-submit:focus:not(:disabled),
body.theme-customer[data-theme='orange'] .btn-primary:active:not(:disabled),
body.theme-customer[data-theme='orange'] .btn-primary:focus:not(:disabled) {
  background: var(--theme-active, var(--theme-color, var(--primary))) !important;
  background-color: var(--theme-active, var(--theme-color, var(--primary))) !important;
  background-image: none !important;
  color: #ffffff !important;
  outline: none !important;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--theme-active, var(--theme-color)) 32%, transparent) !important;
}

body.theme-customer .cta-submit:disabled,
body.theme-customer .btn-primary:disabled,
body.theme-customer #confirmWaitingBtn:disabled {
  background: var(--panel-elevated, #f2f2f7) !important;
  background-color: var(--panel-elevated, #f2f2f7) !important;
  color: var(--text-muted, #86868b) !important;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.08)) !important;
  box-shadow: none !important;
}

/* 키패드 확인(입력하기) — 테마 CTA 와 동일 */
body.theme-customer #keypadConfirmBtn.btn-enter,
body.theme-customer #keypadConfirmBtn.btn-primary,
body.theme-customer .modal-actions .btn-enter,
body.theme-customer .modal-actions .btn-primary {
  background: var(--theme-color, var(--primary)) !important;
  color: #ffffff !important;
  outline: none !important;
}

body.theme-customer #keypadConfirmBtn.btn-enter:hover,
body.theme-customer #keypadConfirmBtn.btn-primary:hover,
body.theme-customer .modal-actions .btn-enter:hover,
body.theme-customer .modal-actions .btn-primary:hover {
  background: var(--theme-hover, var(--theme-color)) !important;
  color: #ffffff !important;
}

body.theme-customer #keypadConfirmBtn.btn-enter:focus,
body.theme-customer #keypadConfirmBtn.btn-enter:active,
body.theme-customer #keypadConfirmBtn.btn-primary:focus,
body.theme-customer #keypadConfirmBtn.btn-primary:active,
body.theme-customer .modal-actions .btn-enter:focus,
body.theme-customer .modal-actions .btn-enter:active,
body.theme-customer .modal-actions .btn-primary:focus,
body.theme-customer .modal-actions .btn-primary:active {
  background: var(--theme-active, var(--theme-color)) !important;
  color: #ffffff !important;
  outline: none !important;
}

/* 3번 오렌지 — 등록 CTA 클릭 시 브라우저 기본 파랑(#007bff) 완전 차단 */
body.theme-customer.theme-option2 .cta-submit,
body.theme-customer.theme-option2 .btn-primary,
body.theme-customer[data-theme='orange'] .cta-submit,
body.theme-customer[data-theme='orange'] .btn-primary,
body.theme-customer[data-theme='orange'] #confirmWaitingBtn {
  -webkit-tap-highlight-color: transparent !important;
}

body.theme-customer.theme-option2 .cta-submit:focus:not(:disabled),
body.theme-customer.theme-option2 .cta-submit:focus-visible:not(:disabled),
body.theme-customer.theme-option2 .cta-submit:active:not(:disabled),
body.theme-customer.theme-option2 .btn-primary:focus:not(:disabled),
body.theme-customer.theme-option2 .btn-primary:active:not(:disabled),
body.theme-customer[data-theme='orange'] .cta-submit:focus:not(:disabled),
body.theme-customer[data-theme='orange'] .cta-submit:active:not(:disabled),
body.theme-customer[data-theme='orange'] .btn-primary:focus:not(:disabled),
body.theme-customer[data-theme='orange'] .btn-primary:active:not(:disabled),
body.theme-customer[data-theme='orange'] #confirmWaitingBtn:focus:not(:disabled),
body.theme-customer[data-theme='orange'] #confirmWaitingBtn:active:not(:disabled) {
  background: var(--theme-active, #ff6b00) !important;
  background-color: var(--theme-active, #ff6b00) !important;
  background-image: none !important;
  color: #ffffff !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
