:root {
  --glass-dark: rgba(22, 14, 10, 0.78);
  --glass-panel: rgba(29, 18, 13, 0.88);
  --glass-border: rgba(245, 224, 195, 0.17);
  --cream: #fff7eb;
  --muted: #cab39b;
  --accent: #d9783e;
  --accent-bright: #ee964b;
  --gold: #f5c35c;
  --sage: #5ea376;
  --danger: #df5448;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: #140d0a;
  color: var(--cream);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
}

.mono { font-family: 'JetBrains Mono', monospace; }
.hidden { display: none !important; }

/* FULLSCREEN 3D CANVAS */
#viewport3d {
  position: fixed;
  inset: 0;
  z-index: 1;
  cursor: grab;
  touch-action: none;
}
#viewport3d:active { cursor: grabbing; }

/* 3D PROJECTED HEAD BUBBLES */
.head-bubbles-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}

.head-bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  background: rgba(255, 250, 242, 0.94);
  color: #291811;
  border: 2px solid #e4cfb4;
  border-radius: 13px;
  padding: 4px 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.head-bubble.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 120, 62, 0.35), 0 8px 20px rgba(0, 0, 0, 0.4);
}

.head-bubble-bar {
  width: 28px;
  height: 4px;
  border-radius: 99px;
  background: #e5d5c1;
  overflow: hidden;
}

.head-bubble-fill {
  height: 100%;
  background: var(--sage);
}
.head-bubble-fill.warn { background: #e29d38; }
.head-bubble-fill.danger { background: var(--danger); }

.head-reaction {
  position: absolute;
  transform: translate(-50%, -100%);
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  animation: reactPop 1.8s ease-out forwards;
}
.head-reaction.perfect { background: #fff4cf; color: #9c590c; border: 2px solid #f5c35c; }
.head-reaction.good { background: #e8f8ee; color: #266b41; border: 2px solid #6bc48c; }
.head-reaction.bad { background: #ffecea; color: #b5342a; border: 2px solid #df5448; }

@keyframes reactPop {
  0% { opacity: 0; transform: translate(-50%, -70%) scale(0.8); }
  15% { opacity: 1; transform: translate(-50%, -115%) scale(1.06); }
  78% { opacity: 1; transform: translate(-50%, -175%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -215%) scale(0.95); }
}

/* HOVER TOOLTIP (DESKTOP) */
.hover-tooltip {
  position: fixed;
  z-index: 25;
  pointer-events: none;
  background: rgba(22, 13, 9, 0.92);
  border: 1px solid rgba(245, 195, 92, 0.45);
  border-radius: 10px;
  padding: 6px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform: translate(16px, -50%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.hover-title { font-size: 0.78rem; font-weight: 800; color: var(--gold); }
.hover-hint { font-size: 0.68rem; color: var(--cream); }

/* TOAST STACK */
.toast-stack {
  position: fixed;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  width: min(92vw, 460px);
}

.toast-msg {
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(24, 15, 11, 0.92);
  border: 1.5px solid rgba(255, 240, 220, 0.25);
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  animation: toastIn 2.3s ease forwards;
}
.toast-msg.good { border-color: #6bc48c; color: #c7f7d8; }
.toast-msg.perfect { border-color: #f5c35c; color: #ffe59e; background: rgba(48, 30, 12, 0.95); }
.toast-msg.bad { border-color: #ef675b; color: #ffd0cc; background: rgba(54, 17, 15, 0.94); }

@keyframes toastIn {
  0% { opacity: 0; transform: translateY(8px) scale(0.95); }
  12% { opacity: 1; transform: translateY(0) scale(1); }
  82% { opacity: 1; transform: translateY(-2px); }
  100% { opacity: 0; transform: translateY(-12px); }
}

/* ULTRA-CLEAN SINGLE-ROW TOP HUD */
.hud-top {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: auto;
}

.brand-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--glass-panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 5px 10px;
}

.brand-dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: grid;
  place-items: center;
  font-size: 13px;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.05;
}

.brand-lvl { font-size: 0.62rem; color: var(--muted); }

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--glass-dark);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.hud-pill--gold strong { color: var(--gold); }

.rush-badge {
  background: linear-gradient(135deg, #e85d26, #f5b63b);
  color: #1f0e06;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 5px 9px;
  border-radius: 99px;
  letter-spacing: 0.3px;
  animation: rushPulse 1.1s ease-in-out infinite alternate;
  white-space: nowrap;
}

.viral-badge {
  background: linear-gradient(135deg, #d9468f, #f59e0b);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 5px 9px;
  border-radius: 99px;
  animation: rushPulse 1s ease-in-out infinite alternate;
  white-space: nowrap;
}

.combo-badge {
  background: linear-gradient(135deg, #5c846b, #8ee0a7);
  color: #102417;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 9px;
  border-radius: 99px;
  white-space: nowrap;
}

@keyframes rushPulse {
  from { transform: scale(1); box-shadow: 0 0 8px rgba(245, 182, 59, 0.5); }
  to { transform: scale(1.05); box-shadow: 0 0 18px rgba(232, 93, 38, 0.85); }
}

.hud-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-dark);
  backdrop-filter: blur(10px);
  color: var(--cream);
  font-size: 0.88rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.14s ease;
}

.hud-icon-btn:hover { background: rgba(58, 37, 26, 0.92); border-color: rgba(245, 224, 195, 0.35); }
.hud-icon-btn.active { background: var(--gold); color: #1e120c; border-color: var(--gold); }

.hud-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-dark);
  backdrop-filter: blur(10px);
  color: var(--cream);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.hud-btn--accent {
  background: linear-gradient(135deg, #c85c34, #df8535);
  border-color: transparent;
  color: #fff;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4757;
  border: 1.5px solid #fff;
  position: absolute;
  top: -2px;
  right: -2px;
}

/* MINIMALIST FOCUS ORDER CARD (TOP-LEFT) */
.order-focus {
  position: fixed;
  top: calc(max(8px, env(safe-area-inset-top)) + 44px);
  left: 10px;
  z-index: 18;
  width: 248px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.queue-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.queue-empty-pill {
  background: var(--glass-dark);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 99px;
  backdrop-filter: blur(8px);
}

.q-chip {
  background: var(--glass-dark);
  backdrop-filter: blur(8px);
  border: 1.5px solid var(--glass-border);
  color: var(--cream);
  border-radius: 99px;
  padding: 4px 9px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.q-chip.active {
  background: #fff7eb;
  color: #291811;
  border-color: var(--accent);
}

.active-order-card {
  background: rgba(255, 249, 239, 0.94);
  color: #2a1912;
  border: 2px solid var(--accent);
  border-radius: 13px;
  padding: 8px 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.aoc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #6d4f40;
}

.aoc-price { color: #2f7249; }

.aoc-drink {
  font-size: 0.86rem;
  font-weight: 800;
  margin-top: 2px;
}

.aoc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.aoc-chip {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  background: #f0e1cd;
  color: #462c1f;
}

.aoc-chip--extra {
  background: #ffe1b5;
  color: #8f3d0e;
  border: 1px solid #e69d45;
}

.aoc-riddle {
  margin-top: 5px;
  font-size: 0.72rem;
  line-height: 1.38;
  color: #4a2335;
  background: #fcebf3;
  border: 1px dashed #d95d94;
  border-radius: 8px;
  padding: 5px 7px;
  font-style: italic;
}

.active-order-card.vlogger {
  border-color: #d9468f;
  background: rgba(255, 246, 251, 0.96);
}

.aoc-bar {
  width: 100%;
  height: 5px;
  background: #e4d3be;
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}

.aoc-bar-fill {
  height: 100%;
  background: var(--sage);
  transition: width 0.25s linear;
}
.aoc-bar-fill.warn { background: #e29d38; }
.aoc-bar-fill.danger { background: var(--danger); }

/* BOTTOM THUMB-FIRST BARISTA DOCK */
.bottom-dock {
  position: fixed;
  bottom: max(8px, env(safe-area-inset-bottom));
  left: 10px;
  right: 10px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

/* SMART NEXT-STEP GUIDE */
.smart-guide {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(36, 22, 12, 0.92);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(245, 195, 92, 0.55);
  border-radius: 99px;
  padding: 5px 13px 5px 7px;
  font-size: 0.76rem;
  color: #fff6e6;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  max-width: min(96vw, 760px);
}

.guide-badge {
  background: linear-gradient(135deg, var(--gold), var(--accent-bright));
  color: #1f120b;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 99px;
  flex-shrink: 0;
}

.guide-text {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SLIM INTEGRATED CUP TELEMETRY STRIP */
.cup-strip {
  width: 100%;
  max-width: 980px;
  background: var(--glass-dark);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 6px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: auto;
}

.cup-strip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cup-strip-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.mini-tele {
  font-size: 0.69rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 248, 238, 0.1);
  color: var(--cream);
}

.mini-tele--cup {
  background: rgba(245, 195, 92, 0.16);
  color: #ffe3a3;
}

.mini-tele--raka {
  background: rgba(94, 163, 118, 0.24);
  color: #a9f0c2;
  border: 1px solid rgba(94, 163, 118, 0.45);
}

.cup-strip-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.cup-ml-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold);
}

.wipe-inline-btn {
  background: #df5448;
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 3px 10px;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  animation: rushPulse 0.9s infinite alternate;
}

.volume-bar-track {
  position: relative;
  width: 100%;
  height: 9px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}

.volume-bar-layers {
  display: flex;
  height: 100%;
  width: 100%;
}

.vol-seg { height: 100%; transition: width 0.08s linear; }

.volume-overflow-mark {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 3px;
  background: #ff5252;
}

/* STATION TABS */
.station-nav {
  display: flex;
  gap: 5px;
  background: var(--glass-panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 4px;
  pointer-events: auto;
}

.station-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 9px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.station-tab kbd {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
}

.station-tab.active {
  background: linear-gradient(135deg, var(--accent), #b85229);
  color: #fff;
  box-shadow: 0 4px 12px rgba(217, 120, 62, 0.35);
}

/* PULSING GUIDE HIGHLIGHT ON NEXT STEP BUTTON / TAB */
.guide-pulse {
  border-color: #ffe08a !important;
  box-shadow: 0 0 0 3px rgba(245, 195, 92, 0.45), 0 0 18px rgba(245, 195, 92, 0.55) !important;
  animation: guideGlow 1.1s ease-in-out infinite alternate;
}

@keyframes guideGlow {
  from { transform: translateY(0); }
  to { transform: translateY(-2px); }
}

/* TACTILE THUMB PANEL */
.tactile-panel {
  width: 100%;
  max-width: 980px;
  background: var(--glass-panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 9px 12px;
  pointer-events: auto;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.station-controls { display: flex; flex-direction: column; gap: 7px; }
.ctrl-hint { font-size: 0.76rem; color: var(--muted); text-align: center; }
.ctrl-hint code { background: rgba(255,255,255,0.12); padding: 1px 5px; border-radius: 4px; color: var(--gold); }

.live-meter-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.live-meter-row--2 {
  grid-template-columns: repeat(2, 1fr);
}

.live-meter {
  background: rgba(255, 248, 238, 0.06);
  border: 1px solid rgba(255, 248, 238, 0.1);
  border-radius: 9px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 700;
  gap: 4px;
}
.meter-head small { color: var(--muted); font-weight: 500; }

.meter-track {
  position: relative;
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 99px;
  overflow: hidden;
}
.meter-sweet {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(94, 163, 118, 0.48);
  border-left: 1.5px solid #7fe0a0;
  border-right: 1.5px solid #7fe0a0;
}
.meter-danger { position: absolute; top: 0; bottom: 0; background: rgba(223, 84, 72, 0.42); }
.meter-fill { position: relative; z-index: 2; height: 100%; background: linear-gradient(90deg, #b87c4b, #f5c35c); transition: width 0.05s linear; }
.meter-fill--amber { background: linear-gradient(90deg, #d9783e, #f7d06b); }
.meter-fill--dark { background: linear-gradient(90deg, #6e371f, #d99345); }
.meter-fill--steam { background: linear-gradient(90deg, #74b9e6, #f5c35c, #ef5c4c); }
.meter-fill--pour { background: linear-gradient(90deg, #f2dec0, #e6b267); }

.ctrl-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1.5px solid rgba(245, 224, 195, 0.22);
  background: rgba(255, 248, 238, 0.1);
  color: var(--cream);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  flex-shrink: 0;
}

.act-btn:hover:not(:disabled) { background: rgba(255, 248, 238, 0.2); border-color: var(--gold); }
.act-btn:active:not(:disabled),
.act-btn.holding {
  transform: scale(0.95);
  background: linear-gradient(135deg, #d9783e, #e8a445);
  border-color: #ffe29e;
  color: #1f110a;
  box-shadow: 0 0 18px rgba(245, 195, 92, 0.5);
}
.act-btn:disabled { opacity: 0.38; cursor: not-allowed; }
.act-btn--hold { border-style: dashed; border-color: rgba(245, 195, 92, 0.55); }
.act-btn--espresso { background: linear-gradient(135deg, #592e1b, #3a1d11); border-color: #d99438; }
.act-btn--steam { background: rgba(116, 185, 230, 0.18); border-color: rgba(145, 208, 247, 0.5); }
.act-btn--latte { background: linear-gradient(135deg, #c27b38, #e6ad55); color: #1f1108; border-color: #ffe39c; }
.act-btn--challenge {
  background: linear-gradient(135deg, #c85c34, #f0a83a);
  border-color: #ffe39c;
  color: #1f1008;
  padding: 10px 16px;
}
.act-btn--challenge:hover { background: linear-gradient(135deg, #db683e, #fab74b); }
.act-btn--serve {
  background: linear-gradient(135deg, #4b8f65, #36734e);
  border-color: transparent;
  color: #fff;
  padding: 8px 16px;
}
.act-btn--danger { background: rgba(223, 84, 72, 0.18); border-color: rgba(223, 84, 72, 0.45); color: #ffcac4; }
.act-btn--ghost { background: transparent; color: var(--muted); }

.stock-mini {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.66rem;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--gold);
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 7, 5, 0.74);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 14px;
}

.modal-card {
  width: 100%;
  max-width: 700px;
  max-height: 88vh;
  background: #241610;
  color: var(--cream);
  border: 1px solid rgba(245, 224, 195, 0.2);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.modal-card--wide { max-width: 840px; }
.modal-card--latte { max-width: 390px; }
.latte-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.latte-cup-ring {
  width: 256px;
  height: 256px;
  border-radius: 50%;
  background: radial-gradient(circle, #f7eee0 60%, #d4c0a5 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 2px 6px rgba(255, 255, 255, 0.65);
}
#latteCanvas {
  border-radius: 50%;
  cursor: crosshair;
  touch-action: none;
}
.latte-actions { display: flex; gap: 10px; width: 100%; justify-content: center; }
.modal-card--welcome { max-width: 500px; padding: 24px 22px; text-align: center; gap: 13px; }

.welcome-badge {
  align-self: center;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #1f120b;
  background: linear-gradient(135deg, var(--gold), var(--accent-bright));
  padding: 4px 11px;
  border-radius: 99px;
}
.welcome-title { font-family: 'Fraunces', serif; font-size: 2rem; }
.welcome-desc { font-size: 0.86rem; color: var(--muted); line-height: 1.5; }
.welcome-tips {
  text-align: left;
  background: rgba(255, 248, 238, 0.06);
  border: 1px solid rgba(255, 248, 238, 0.12);
  border-radius: 13px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.78rem;
  line-height: 1.45;
}
.welcome-tips code { background: rgba(245, 195, 92, 0.18); color: var(--gold); padding: 1px 5px; border-radius: 4px; }
.welcome-actions { display: flex; flex-direction: column; gap: 8px; }
.welcome-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.text-input {
  width: 100%;
  background: rgba(255, 248, 238, 0.09);
  border: 1px solid rgba(245, 224, 195, 0.28);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
}
.text-input:focus { border-color: var(--gold); background: rgba(255, 248, 238, 0.14); }
.custom-name-box { display: flex; flex-direction: column; gap: 6px; }
.custom-name-row { display: flex; gap: 8px; }

.welcome-lb {
  text-align: left;
  background: rgba(245, 195, 92, 0.08);
  border: 1px solid rgba(245, 195, 92, 0.25);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 0.75rem;
}

.rank-badge-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f5c35c, #d9783e);
  color: #1f1108;
  padding: 5px 12px;
  border-radius: 12px;
  font-weight: 900;
}
.rank-letter { font-family: 'Fraunces', serif; font-size: 1.5rem; line-height: 1; }
.rank-title { font-size: 0.72rem; line-height: 1.15; }

.leaderboard-box {
  background: rgba(255, 248, 238, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.lb-head { font-size: 0.78rem; font-weight: 800; color: var(--gold); margin-bottom: 7px; }
.lb-list { display: flex; flex-direction: column; gap: 5px; }
.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}
.lb-row.me { background: rgba(245, 195, 92, 0.18); border: 1px solid rgba(245, 195, 92, 0.45); }

/* GOOGLE MAPS REVIEWS */
.reviews-box {
  background: rgba(255, 248, 238, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.reviews-list { display: flex; flex-direction: column; gap: 7px; }
.review-card {
  background: rgba(255, 250, 242, 0.94);
  color: #291811;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 800;
}
.review-stars { color: #e2961b; letter-spacing: 1px; }
.review-body { font-size: 0.74rem; color: #4d3528; line-height: 1.38; }

/* ACHIEVEMENTS GRID */
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}
.ach-card {
  background: rgba(255, 248, 238, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 11px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0.55;
}
.ach-card.unlocked {
  opacity: 1;
  border-color: rgba(245, 195, 92, 0.55);
  background: rgba(245, 195, 92, 0.12);
}
.ach-icon { font-size: 1.3rem; }
.ach-name { font-size: 0.76rem; font-weight: 800; color: var(--cream); }
.ach-desc { font-size: 0.67rem; color: var(--muted); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255, 248, 238, 0.05);
  border-bottom: 1px solid var(--glass-border);
}
.modal-header h2 { font-family: 'Fraunces', serif; font-size: 1.15rem; }
.modal-sub { font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
.modal-money {
  margin-left: auto;
  background: rgba(245, 195, 92, 0.16);
  color: var(--gold);
  padding: 5px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
}
.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  cursor: pointer;
}
.modal-tabs { display: flex; gap: 6px; padding: 9px 18px; border-bottom: 1px solid var(--glass-border); }
.tab-btn { padding: 7px 12px; border-radius: 9px; border: none; background: transparent; color: var(--muted); font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.tab-btn.active { background: var(--accent); color: #fff; }
.modal-body { padding: 14px 18px 18px; overflow-y: auto; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.panel-note { font-size: 0.76rem; color: var(--muted); }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 9px; }
.shop-item { background: rgba(255, 248, 238, 0.06); border: 1px solid var(--glass-border); border-radius: 13px; padding: 11px; display: flex; flex-direction: column; justify-content: space-between; gap: 9px; }
.shop-item.owned { border-color: rgba(94, 163, 118, 0.55); background: rgba(94, 163, 118, 0.12); }
.shop-item-top { display: flex; gap: 9px; }
.shop-item-icon { font-size: 1.4rem; width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 248, 238, 0.08); display: grid; place-items: center; flex-shrink: 0; }
.shop-item-title { font-size: 0.84rem; font-weight: 800; }
.shop-item-desc { font-size: 0.72rem; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.shop-item-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.buy-btn { padding: 7px 11px; border-radius: 9px; border: none; background: var(--accent); color: #fff; font-family: inherit; font-size: 0.74rem; font-weight: 700; cursor: pointer; }
.buy-btn:disabled { opacity: 0.42; cursor: not-allowed; }
.buy-btn--owned { background: var(--sage); }
.menu-manage-list { display: flex; flex-direction: column; gap: 8px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(255, 248, 238, 0.06); border: 1px solid var(--glass-border); border-radius: 12px; padding: 10px 12px; flex-wrap: wrap; }
.menu-row-left { display: flex; align-items: center; gap: 9px; }
.price-adjuster { display: flex; align-items: center; gap: 5px; }
.price-step-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 800; cursor: pointer; }
.price-val { min-width: 82px; text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--gold); }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 9px; }
.recipe-card { background: rgba(255, 248, 238, 0.06); border: 1px solid var(--glass-border); border-radius: 13px; padding: 11px; display: flex; flex-direction: column; gap: 6px; }
.recipe-card.locked { opacity: 0.55; border-style: dashed; }
.recipe-card-head { display: flex; justify-content: space-between; align-items: center; }
.recipe-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.recipe-step-pill { font-size: 0.68rem; font-weight: 600; background: rgba(245, 224, 195, 0.14); padding: 3px 7px; border-radius: 99px; }
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 12px; }
.summary-box { background: rgba(255, 248, 238, 0.06); border: 1px solid var(--glass-border); border-radius: 12px; padding: 11px; display: flex; flex-direction: column; gap: 3px; }
.summary-box-label { font-size: 0.72rem; color: var(--muted); }
.summary-box-val { font-size: 1.05rem; font-weight: 800; }
.summary-box-val.positive { color: #7ae0a1; }
.summary-box-val.negative { color: #ff8e85; }
.summary-highlight { background: rgba(245, 195, 92, 0.12); border: 1px solid rgba(245, 195, 92, 0.25); border-radius: 11px; padding: 10px 12px; font-size: 0.8rem; margin-bottom: 14px; line-height: 1.45; }
.day-end-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ================= MOBILE-FIRST RESPONSIVE POLISH ================= */
@media (max-width: 900px) {
  .hide-md { display: none !important; }
  .brand-meta { display: none; }
  .brand-chip { padding: 4px; }
  .station-tab kbd { display: none; }
}

@media (max-width: 640px) {
  .hide-sm { display: none !important; }
  .hide-xs { display: none !important; }
  .brand-chip { display: none !important; }
  #btnPause { display: none !important; }

  .hud-top { left: 6px; right: 6px; gap: 4px; }
  .hud-left, .hud-right { gap: 4px; }
  .hud-pill { padding: 5px 7px; font-size: 0.7rem; gap: 4px; }
  .hud-icon-btn { width: 29px; height: 29px; font-size: 0.78rem; border-radius: 8px; }
  .hud-btn { height: 29px; padding: 0 8px; font-size: 0.72rem; border-radius: 8px; }

  .order-focus {
    width: calc(100vw - 12px);
    left: 6px;
    top: calc(max(8px, env(safe-area-inset-top)) + 38px);
  }

  .active-order-card {
    padding: 6px 9px;
  }
  .aoc-drink { font-size: 0.8rem; }

  .bottom-dock { left: 6px; right: 6px; gap: 5px; }
  .smart-guide { font-size: 0.69rem; padding: 4px 10px 4px 6px; border-radius: 12px; }
  .guide-text { white-space: normal; line-height: 1.25; }
  .cup-strip { padding: 5px 9px; }
  .mini-tele { font-size: 0.64rem; padding: 2px 6px; }

  .station-nav { width: 100%; justify-content: space-between; }
  .station-tab { flex: 1; justify-content: center; padding: 7px 6px; font-size: 0.74rem; }

  .tactile-panel { padding: 8px; border-radius: 13px; }

  .live-meter-row { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .live-meter-row--2 { grid-template-columns: repeat(2, 1fr); }
  .meter-head { font-size: 0.6rem; flex-direction: column; gap: 1px; }
  .meter-head small { display: none; }

  /* No-swipe 3x2 thumb grid for Kasir & Espresso so buttons never accidentally trigger on swipe! */
  .ctrl-grid-mobile {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .ctrl-grid-mobile .act-btn {
    width: 100%;
    padding: 8px 4px;
    font-size: 0.72rem;
    min-height: 42px;
  }

  /* Smooth horizontal scroll for Pour Station with native pan-x + 140ms swipe-guard */
  .ctrl-scroll {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    padding-bottom: 3px;
    scrollbar-width: none;
  }
  .ctrl-scroll::-webkit-scrollbar { display: none; }
  .ctrl-scroll .act-btn {
    touch-action: pan-x;
  }

  .act-btn {
    min-height: 44px;
    padding: 9px 13px;
    font-size: 0.78rem;
  }

  .hover-tooltip { display: none !important; }
  .summary-grid { grid-template-columns: 1fr; }
}
