* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  background-color: #0a0a0a;
  color: #ece6dc;
  font-family: 'Noto Serif KR', serif;
  word-break: keep-all;
  overflow-wrap: normal;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow: hidden;
  user-select: none;
}

input,
textarea {
  user-select: text;
  -webkit-user-select: text;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #0a0a0a;
}

.webgl-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: none;
}

.webgl-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 캐릭터 이름표 및 계단 나가기 배지 레이어 */
.labels-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.char-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(248, 244, 236, 0.93);
  color: #231f1c;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease;
}

.char-label.is-npc {
  background: rgba(28, 25, 22, 0.76);
  color: #d8cfc2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 400;
}

.me-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(36, 31, 28, 0.12);
  font-size: 12px;
}

/* 계단 위 플로팅 '🚪 나가기' 표시 버튼 */
.stair-exit-badge {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.88);
  border: 1px solid rgba(246, 206, 113, 0.55);
  color: #f6ce71;
  font-family: 'Noto Serif KR', serif;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease;
}

.stair-exit-badge:hover {
  background: rgba(246, 206, 113, 0.22);
}

/* [1] 로그인 화면 */
.entry-gate {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: #0a0a0a;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.entry-gate.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-inner {
  text-align: center;
  width: min(92vw, 390px);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gate-logo-wrap {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px;
  margin-bottom: 14px;
  background: #0a0a0a;
}

.gate-logo-wrap.is-loaded {
  display: inline-flex;
}

.gate-logo {
  height: 46px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
}

.gate-logo.is-raw,
.pill-logo.is-raw {
  filter: grayscale(1) contrast(2.4) invert(1) brightness(1.15);
  mix-blend-mode: screen;
}

.gate-brand-title {
  font-size: clamp(20px, 5.4vw, 25px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #f8f5ee;
  margin-bottom: 6px;
  white-space: nowrap;
}

.gate-brand-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(10.5px, 2.8vw, 12px);
  letter-spacing: 0.22em;
  color: #f6ce71;
  margin-bottom: 8px;
  white-space: nowrap;
}

.gate-tagline {
  font-size: clamp(12.5px, 3.5vw, 14.5px);
  color: #b8afa1;
  margin-bottom: 22px;
  white-space: nowrap;
}

.gate-setup-card {
  width: 100%;
  padding: 16px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.gate-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.gate-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: #cfc6b8;
  white-space: nowrap;
}

.text-mini-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dcd3c6;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: 'Noto Serif KR', serif;
  font-size: 10.5px;
  white-space: nowrap;
  cursor: pointer;
}

.gate-name-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0f0e0d;
  color: #f6efe2;
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  outline: none;
}

.gate-name-input:focus {
  border-color: rgba(246, 206, 113, 0.6);
}

.gate-picker-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.picker-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0f0e0d;
  color: #dcd3c6;
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(11.5px, 3.1vw, 13px);
  white-space: nowrap;
  cursor: pointer;
}

.picker-trigger-btn.is-chosen {
  border-color: rgba(246, 206, 113, 0.52);
  background: rgba(246, 206, 113, 0.12);
  color: #f6ce71;
  font-weight: 600;
}

.picker-trigger-btn span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-arrow {
  font-size: 11px;
  opacity: 0.7;
  flex-shrink: 0;
}

.gate-error-box {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.45);
  color: #fecaca;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
}

.gate-error-box.is-hidden {
  display: none;
}

.enter-btn {
  width: 100%;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(246, 206, 113, 0.52);
  background: rgba(246, 206, 113, 0.2);
  color: #f6ce71;
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(13px, 3.6vw, 14.5px);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

/* [공통 팝업 모달] 모자 · 계절 · 설정 · 이석확인 */
.select-modal {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.select-modal.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.select-dialog {
  width: min(92vw, 380px);
  padding: 18px 16px;
  border-radius: 22px;
  background: #151311;
  border: 1px solid rgba(246, 206, 113, 0.35);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.82);
}

.hood-grid,
.season-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.hat-option-btn,
.season-option-btn {
  padding: 11px 10px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  color: #e2dad0;
  font-family: 'Noto Serif KR', serif;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
}

.hat-option-btn.is-selected,
.season-option-btn.is-selected {
  background: rgba(246, 206, 113, 0.22);
  border-color: rgba(246, 206, 113, 0.62);
  color: #f6ce71;
  font-weight: 600;
}

.glasses-choice-box,
.wakelock-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  margin-bottom: 11px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.glasses-choice-label,
.wakelock-switch-label {
  font-size: 11.5px;
  color: #ded6c8;
  white-space: nowrap;
}

.glasses-choice-btns {
  display: inline-flex;
  gap: 5px;
  flex-shrink: 0;
}

.glasses-opt-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cfc6b8;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.glasses-opt-btn.is-selected {
  background: rgba(246, 206, 113, 0.22);
  border-color: rgba(246, 206, 113, 0.58);
  color: #f6ce71;
  font-weight: 600;
}

/* 설정 모달 리스트 */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-label {
  font-size: 12px;
  color: #e4ddd1;
  white-space: nowrap;
}

.settings-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(246, 206, 113, 0.4);
  background: rgba(246, 206, 113, 0.12);
  color: #f6ce71;
  font-family: 'Noto Serif KR', serif;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

/* 자리 이탈 확인 팝업 */
.confirm-dialog {
  text-align: center;
  max-width: 340px;
}

.confirm-title {
  font-size: 15.5px;
  font-weight: 600;
  color: #f6efe2;
  margin-bottom: 8px;
  white-space: nowrap;
}

.confirm-desc {
  font-size: 12px;
  line-height: 1.55;
  color: #b5aba0;
  margin-bottom: 16px;
}

.confirm-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.confirm-btn {
  padding: 11px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #ded6c8;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.confirm-btn.is-primary {
  background: rgba(246, 206, 113, 0.22);
  border-color: rgba(246, 206, 113, 0.58);
  color: #f6ce71;
}

.modal-apply-btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(246, 206, 113, 0.58);
  background: rgba(246, 206, 113, 0.22);
  color: #f6ce71;
  font-family: 'Noto Serif KR', serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

/* [4] 메인 플로팅 UI (상단 바 잘림 완전 해결) */
.lounge-ui {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  padding-left: 12px;
  padding-right: 12px;
  transition: opacity 0.5s ease;
}

.lounge-ui.is-locked {
  opacity: 0;
}

.top-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
}

.top-bar {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.top-right-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.top-right-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.room-pill,
.clock-pill,
.icon-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(16, 15, 14, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(10.5px, 2.8vw, 11.8px);
  color: #e6dfd3;
  white-space: nowrap;
}

.room-pill {
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-logo-box {
  display: none;
  width: 18px;
  height: 18px;
  background: transparent;
  flex-shrink: 0;
}

.pill-logo-box.is-loaded {
  display: inline-flex;
}

.pill-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.room-pill.is-clickable,
.icon-pill {
  cursor: pointer;
}

.icon-pill-sub {
  font-size: clamp(10px, 2.6vw, 11px);
  color: #e6dfd3;
  white-space: nowrap;
}

.brand-badge {
  font-weight: 600;
  color: #f6ce71;
}

.divider {
  color: rgba(255, 255, 255, 0.25);
}

.clock-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(10.5px, 2.8vw, 11.5px);
  color: #c7bdb0;
}

/* 상단 미니 타이머 배지 */
.live-timer-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100vw - 24px);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(25, 21, 17, 0.86);
  border: 1px solid rgba(246, 206, 113, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f6efe2;
  font-family: 'Noto Serif KR', serif;
  font-size: clamp(10.5px, 2.9vw, 12px);
  white-space: nowrap;
  cursor: pointer;
}

.live-timer-pill.is-hidden {
  display: none;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f6ce71;
  box-shadow: 0 0 8px rgba(246, 206, 113, 0.9);
  animation: pulseDot 2s ease-in-out infinite;
}

.live-dot.is-paused {
  background: #8c8275;
  box-shadow: none;
  animation: none;
}

.live-time {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 13px;
  color: #f6ce71;
}

.live-book {
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ded6c8;
}

.wakelock-mini {
  font-size: 12px;
  opacity: 0.3;
}

.wakelock-mini.is-on {
  opacity: 1;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.15); }
}

.toast-banner {
  max-width: calc(100vw - 24px);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(22, 19, 16, 0.88);
  border: 1px solid rgba(246, 206, 113, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f4ead8;
  font-size: clamp(10.2px, 2.9vw, 12px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 하단 영역 & 팝업 시트 공통 */
.bottom-area {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.popup-panel,
.reading-panel,
.mixer-panel {
  pointer-events: auto;
  width: 100%;
  max-width: 410px;
  max-height: 68dvh;
  overflow-y: auto;
  padding: 15px 16px;
  border-radius: 22px;
  background: rgba(20, 18, 16, 0.92);
  border: 1px solid rgba(246, 206, 113, 0.3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.72);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.popup-panel.is-hidden,
.reading-panel.is-hidden,
.mixer-panel.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;
  position: absolute;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
}

.panel-heading-group {
  min-width: 0;
  flex: 1;
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #f6efe2;
  white-space: nowrap;
}

.panel-sub,
.wakelock-badge,
.mixer-sub {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: #9e9486;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wakelock-badge.is-on {
  color: #f6ce71;
}

.panel-close-btn {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cfc6b8;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
}

.activity-seg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.activity-seg-row.is-hidden,
.piano-mode-notice.is-hidden {
  display: none;
}

.piano-mode-notice {
  padding: 8px 11px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(246, 206, 113, 0.1);
  border: 1px solid rgba(246, 206, 113, 0.35);
  color: #f6ce71;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-seg-btn {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  color: #cfc6b8;
  font-family: 'Noto Serif KR', serif;
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
}

.activity-seg-btn.is-selected {
  background: rgba(246, 206, 113, 0.2);
  border-color: rgba(246, 206, 113, 0.55);
  color: #f6ce71;
  font-weight: 600;
}

.timer-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.timer-readout-wrap {
  display: contents;
}

.timer-big-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(22px, 6vw, 27px);
  font-weight: 600;
  color: #f8f2e4;
  white-space: nowrap;
}

.timer-sub-status {
  flex: 1 0 100%;
  order: 3;
  font-size: 11px;
  line-height: 1.45;
  color: #a89e90;
  white-space: normal;
  overflow: visible;
}

.timer-ctrl-group {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.timer-ctrl-btn {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #dfd7c9;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.timer-ctrl-btn.is-primary {
  background: rgba(246, 206, 113, 0.2);
  border-color: rgba(246, 206, 113, 0.52);
  color: #f6ce71;
  font-weight: 600;
}

.mode-chip-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 12px;
}

.mode-chip-row::-webkit-scrollbar {
  display: none;
}

.mode-chip {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #cfc6b8;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.mode-chip.is-selected {
  background: rgba(246, 206, 113, 0.2);
  border-color: rgba(246, 206, 113, 0.52);
  color: #f6ce71;
  font-weight: 600;
}

.reading-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 12px;
}

.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
}

.field-box {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 10.5px;
  color: #aba193;
  white-space: nowrap;
}

.field-box input,
.field-box textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 11, 10, 0.65);
  color: #f4eee3;
  font-family: 'Noto Serif KR', serif;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  resize: none;
}

.finish-reading-btn {
  width: 100%;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(246, 206, 113, 0.52);
  background: rgba(246, 206, 113, 0.18);
  color: #f6ce71;
  font-family: 'Noto Serif KR', serif;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

/* 주문 패널 3종 카드 */
.order-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.order-card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.04);
  color: #e6dfd3;
  font-family: 'Noto Serif KR', serif;
  cursor: pointer;
}

.order-card-btn.is-disabled {
  opacity: 0.4;
}

.order-card-btn.is-selected {
  background: rgba(246, 206, 113, 0.2);
  border-color: rgba(246, 206, 113, 0.58);
  color: #f6ce71;
}

.order-emoji {
  font-size: 22px;
  line-height: 1;
}

.order-name {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.order-state {
  font-size: 10px;
  color: #9e9486;
  white-space: nowrap;
}

.order-card-btn.is-selected .order-state {
  color: #f6ce71;
}

/* 사운드 슬라이더 */
.slider-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.slider-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.slider-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: #e4ddd1;
  white-space: nowrap;
}

.slider-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: #f6ce71;
}

.slider-item input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.slider-item input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f6ce71;
  border: 2px solid #241e18;
  cursor: pointer;
}

/* 모바일 하단 중앙 반투명 원형 조이스틱 */
.mobile-dpad {
  pointer-events: auto;
  display: none;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  touch-action: none;
}

@media (max-width: 860px), (pointer: coarse) {
  .mobile-dpad {
    display: inline-flex;
  }
}

.mobile-dpad.force-show {
  display: inline-flex !important;
}

.mobile-dpad.force-hide,
.mobile-dpad.sheet-covered {
  display: none !important;
}

.joystick-base {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  touch-action: none;
  cursor: grab;
}

.joystick-knob {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transform: translate(0px, 0px);
  transition: transform 0.12s ease-out;
}

.joystick-base.is-dragging .joystick-knob {
  transition: none;
  background: #ffffff;
}

.guide-hint {
  max-width: calc(100vw - 24px);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 13, 12, 0.6);
  font-size: clamp(9.8px, 2.7vw, 11.5px);
  color: #cbc1b3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 하단 6버튼 캡슐 독 */
.action-dock {
  pointer-events: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  width: min(100%, 430px);
  padding: 6px 7px;
  border-radius: 999px;
  background: rgba(24, 21, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.dock-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 3px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #e8e1d5;
  font-family: 'Noto Serif KR', serif;
  white-space: nowrap;
  cursor: pointer;
}

.dock-btn.is-active {
  background: rgba(246, 206, 113, 0.18);
  border-color: rgba(246, 206, 113, 0.48);
  color: #f6ce71;
}

.dock-icon {
  font-size: 14px;
  line-height: 1;
}

.dock-label {
  font-size: clamp(9.2px, 2.4vw, 10.8px);
  white-space: nowrap;
}

/* [5] 영수증 모달 */
.receipt-modal {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 14px;
  background: rgba(9, 8, 7, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.receipt-modal.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.receipt-dialog {
  width: min(94vw, 380px);
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.receipt-top-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.receipt-theme-switch {
  display: inline-flex;
  gap: 6px;
}

.receipt-theme-chip {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #d6cdc0;
  font-family: 'Noto Serif KR', serif;
  font-size: 11px;
  white-space: nowrap;
  cursor: pointer;
}

.receipt-theme-chip.is-selected {
  background: rgba(246, 206, 113, 0.2);
  border-color: rgba(246, 206, 113, 0.55);
  color: #f6ce71;
  font-weight: 600;
}

.receipt-paper-stage {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.receipt-paper-stage.is-printing .receipt-preview-img {
  animation: printSlideDown 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.receipt-preview-img {
  max-width: 100%;
  max-height: 62dvh;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
  user-select: auto;
  -webkit-user-select: auto;
  -webkit-touch-callout: default;
}

@keyframes printSlideDown {
  0% { opacity: 0; transform: translateY(-28px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.receipt-save-tip {
  font-size: 10.5px;
  color: #b7ad9f;
  white-space: nowrap;
}

.receipt-save-tip strong {
  color: #f6ce71;
}

.receipt-btn-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 8px;
}

.receipt-btn {
  padding: 12px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #efe8dc;
  font-family: 'Noto Serif KR', serif;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.receipt-btn.is-primary {
  background: rgba(246, 206, 113, 0.22);
  border-color: rgba(246, 206, 113, 0.58);
  color: #f6ce71;
}

.receipt-text-link {
  background: none;
  border: none;
  color: #968c7e;
  font-family: 'Noto Serif KR', serif;
  font-size: 11.5px;
  padding: 4px 10px;
  cursor: pointer;
  text-decoration: underline;
}