:root {
  --night-glass: rgba(10, 16, 32, 0.72);
  --gold: #f4cb6b;
  --gold-line: rgba(244, 203, 107, 0.42);
  --cream: #f7f3e8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #070b19;
  color: #f6f8fb;
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

button,
input,
select {
  font: inherit;
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  top: -90px;
  left: 12px;
  z-index: 120;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: #141a29;
  font-size: 12px;
  font-weight: 700;
}
.skip-link:focus {
  top: 48px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Full-bleed 3D WebGL Canvas (> 92% unobstructed screen!) */
.canvas-stage {
  position: fixed;
  inset: 0;
  z-index: 1;
}

#orchard-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
#orchard-canvas:active {
  cursor: grabbing;
}

.webgl-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(8, 13, 28, 0.8), rgba(14, 32, 22, 0.92)),
    url("/assets/orchard-concept.webp") center/cover;
}
.fallback-card {
  max-width: 440px;
  padding: 22px 24px;
  border-radius: 12px;
  background: rgba(12, 20, 36, 0.9);
  border: 1px solid var(--gold-line);
}
.fallback-card h2 {
  margin: 0 0 8px;
  font: 600 22px/1.25 "Playfair Display", Georgia, serif;
  color: var(--gold);
}
.fallback-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #d9e2ec;
}

/* ==========================================================================
   SMART WRAPPING TWO-CLUSTER TOP GLASS BAR (100% VISIBILITY, ZERO OVERLAP!)
   ========================================================================== */
.slim-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 6px 12px;
  height: auto;
  min-height: 42px;
  width: 100%;
  box-sizing: border-box;
  background: rgba(10, 16, 32, 0.8);
  border-bottom: 1px solid rgba(244, 203, 107, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.top-left-cluster {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
}

.top-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding-right: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--gold);
}
.top-brand img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.zone-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.zone-strip::-webkit-scrollbar {
  display: none;
}

.zone-nav-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.zone-nav-btn:hover {
  background: rgba(244, 203, 107, 0.18);
  border-color: var(--gold-line);
}
.zone-nav-btn[aria-current="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #121a29;
  font-weight: 700;
}

.top-right-tools {
  flex-shrink: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.atmo-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.atmo-btn {
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.atmo-btn[aria-pressed="true"] {
  background: var(--gold);
  color: #131b2b;
  font-weight: 700;
}
.atmo-btn[data-locked="true"]::after {
  content: " •";
}

@media (max-width: 1180px) {
  .lbl-wide {
    display: none;
  }
  .slim-top-bar {
    padding: 5px 8px;
    gap: 5px 8px;
  }
  .zone-strip {
    gap: 4px;
  }
  .zone-nav-btn {
    font-size: 11px;
    padding: 4px 7px;
  }
}

.slim-pill-btn {
  position: relative;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 203, 107, 0.42);
  background: rgba(244, 203, 107, 0.11);
  color: #f8dfa0;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.slim-pill-btn.icon-only-pill {
  padding: 0 8px;
}
.slim-pill-btn[aria-pressed="true"] {
  background: var(--gold);
  color: #121a29;
  font-weight: 700;
}
.basket-pill-btn.is-pulsing {
  animation: basketPop 0.48s ease;
}
@keyframes basketPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.14); background: rgba(74, 222, 128, 0.35); }
  100% { transform: scale(1); }
}

.inbox-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 2px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

/* ==========================================================================
   AUTO-FADING 4-SECOND INSTRUCTION HINT & TOAST (BỔ SUNG 1.2)
   ========================================================================== */
.controls-hint {
  position: fixed;
  top: calc(var(--topbar-h, 48px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(9, 15, 30, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.9s ease;
}
.controls-hint.is-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
}

.ritual-toast {
  position: fixed;
  top: calc(var(--topbar-h, 48px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  max-width: min(92vw, 540px);
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(18, 32, 26, 0.94);
  border: 1px solid var(--gold);
  color: #fbe5ad;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

/* ==========================================================================
   CONTEXTUAL SINGLE-ROW BOTTOM BARS (SANCTUARY | 5 ORCHARDS | 16 BOOTHS)
   ========================================================================== */
.bottom-prompts {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 20px);
  z-index: 22;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.proximity-prompt {
  pointer-events: auto;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: rgba(11, 20, 34, 0.86);
  color: #fde6a9;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(6px);
}
.proximity-prompt:hover {
  background: var(--gold);
  color: #131b2b;
}

.sanctuary-rituals,
.context-action-bar {
  pointer-events: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 20px);
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 20, 32, 0.86);
  border: 1px solid rgba(244, 203, 107, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}
.sanctuary-rituals::-webkit-scrollbar,
.context-action-bar::-webkit-scrollbar {
  display: none;
}

.sanctuary-rituals button,
.context-action-bar button {
  flex-shrink: 0;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(244, 203, 107, 0.42);
  background: rgba(244, 203, 107, 0.14);
  color: #ffeab3;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.sanctuary-rituals button:hover,
.context-action-bar button:hover {
  background: var(--gold);
  color: #24100d;
}
.context-bar-tag {
  flex-shrink: 0;
  padding: 0 6px;
  color: #86efac;
  font-size: 11px;
  font-weight: 700;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.claim-highlight-btn {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #34d399 !important;
  color: #a7f3d0 !important;
}

/* ==========================================================================
   COMPACT RIGHT-EDGE GLASS DRAWERS (max-width: 320px, DEFAULT HIDDEN!)
   ========================================================================== */
.detail-drawer {
  position: fixed;
  top: calc(var(--topbar-h, 48px) + 8px);
  right: 10px;
  z-index: 29;
  width: min(320px, calc(100vw - 20px));
  max-width: 320px;
  max-height: calc(100dvh - var(--topbar-h, 48px) - 18px);
  overflow-y: auto;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(11, 19, 34, 0.9);
  border: 1px solid rgba(244, 203, 107, 0.45);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: slideInRight 0.2s ease-out;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.drawer-eyebrow {
  margin: 0 0 3px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  color: var(--gold);
}
.drawer-title {
  margin: 0;
  font: 600 18px/1.22 "Playfair Display", Georgia, serif;
  color: #fff;
}
.drawer-close {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.drawer-close:hover {
  background: var(--gold);
  color: #131b2b;
}

.drawer-badge {
  display: inline-block;
  margin: 8px 0 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(46, 125, 62, 0.35);
  border: 1px solid rgba(134, 224, 146, 0.45);
  color: #bbf7d0;
  font-size: 10.5px;
  font-weight: 700;
}

.specimen-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 8px;
}
#fruit-specimen-canvas {
  width: 96px;
  height: 84px;
  border-radius: 8px;
  background: radial-gradient(circle, rgba(244, 203, 107, 0.16), rgba(255, 255, 255, 0.02));
}
.drawer-qr {
  padding: 4px;
  border-radius: 6px;
  background: #fff;
  line-height: 0;
}
.drawer-qr svg {
  display: block;
  width: 64px;
  height: 64px;
}

.drawer-desc {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #dbe4ee;
}
.drawer-meta {
  margin: 0 0 11px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  line-height: 1.45;
  color: #cbd5e1;
}
.drawer-meta strong {
  color: var(--gold);
}
.drawer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 999px;
  background: var(--gold);
  color: #131b2b;
  font-size: 12px;
  font-weight: 700;
}

/* ==========================================================================
   80px TRANSLUCENT TOUCH JOYSTICK (HIDDEN ON DESKTOP `pointer: fine`!)
   ========================================================================== */
.touch-joystick {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(12, 22, 36, 0.38);
  border: 1px solid rgba(244, 203, 107, 0.38);
  display: grid;
  place-items: center;
  touch-action: none;
}
.touch-joystick-knob {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(244, 203, 107, 0.72);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

@media (pointer: fine) {
  .touch-joystick {
    display: none !important;
  }
}

/* ==========================================================================
   PRESERVED WISH MODAL DIALOG
   ========================================================================== */
.wish-dialog {
  width: min(520px, 94vw);
  max-height: 90dvh;
  padding: 0;
  border: 1px solid #cbb98d;
  border-radius: 14px;
  background: var(--cream);
  color: #1d3322;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.75);
}
.wish-dialog::backdrop {
  background: rgba(5, 10, 20, 0.76);
}
.wish-dialog-inner {
  padding: 20px 22px;
}
.wish-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.wish-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #7c5626;
}
.wish-dialog h2 {
  font: 600 25px/1.2 "Playfair Display", Georgia, serif;
  margin: 0;
}
.wish-dialog h2 em {
  color: #8c632f;
  font-weight: 500;
}
.close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #c6d0c0;
  background: #fff;
  color: #1d3322;
  font-size: 20px;
  cursor: pointer;
}
.wish-intro {
  margin: 10px 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: #465847;
}
.fruit-choice-group,
.blessing-choice-group {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}
.fruit-choice-group legend,
.blessing-choice-group legend {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #425643;
  margin-bottom: 7px;
}
.fruit-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fruit-choices label {
  cursor: pointer;
}
.fruit-choices input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fruit-choices span {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #b8c5b3;
  background: #fff;
  font-size: 12.5px;
  font-weight: 700;
  color: #29462e;
}
.fruit-choices input:checked + span {
  background: #7c1616;
  border-color: #7c1616;
  color: #fde6a8;
}
.blessing-options {
  display: grid;
  gap: 6px;
}
.blessing-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5c5;
  background: #fff;
  font-size: 13px;
  color: #223826;
  cursor: pointer;
}
.blessing-option:has(input:checked) {
  border-color: #8c2f25;
  background: #fdf4ee;
  font-weight: 600;
}
.wish-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.submit-wish-btn {
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #7c1616;
  color: #fde6a8;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.wish-feedback {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #235934;
}

/* ==========================================================================
   MULTIPLAYER LIVE COUNTER, SHARD POPOVER, 5s BUBBLES & MINI SOCIAL DOCK
   ========================================================================== */
.mp-online-btn {
  border-color: rgba(110, 231, 183, 0.48);
  background: rgba(16, 185, 129, 0.14);
  color: #d1fae5;
}
.mp-online-btn strong {
  color: #6ee7b7;
  font-variant-numeric: tabular-nums;
}

.mp-overlay-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}

.mp-peer-tag-wrap {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  will-change: transform, opacity;
}

.mp-peer-name {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.72);
  border: 1px solid rgba(244, 203, 107, 0.35);
  color: #f8fafc;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.mp-chat-bubble {
  max-width: 190px;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(255, 253, 245, 0.96);
  border: 1px solid var(--gold);
  color: #1a2433;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38);
  text-align: center;
}
.mp-chat-bubble.is-self,
.booth-greet-bubble {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform, opacity;
}
.booth-greet-bubble {
  background: rgba(254, 243, 199, 0.96);
  border: 1.5px solid #f59e0b;
  color: #451a03;
  max-width: 230px;
}

.mp-channel-popover {
  position: fixed;
  top: calc(var(--topbar-h, 48px) + 8px);
  right: 10px;
  z-index: 34;
  width: min(275px, calc(100vw - 20px));
  padding: 12px 13px;
  border-radius: 12px;
  background: rgba(11, 20, 34, 0.92);
  border: 1px solid var(--gold-line);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}
.mp-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.mp-pop-head strong {
  font-size: 12px;
  color: var(--gold);
}
.mp-pop-sub {
  margin: 0 0 8px;
  font-size: 11px;
  color: #cbd5e1;
}
.mp-room-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.mp-room-item {
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.mp-room-item[aria-current="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #131b2b;
  font-weight: 700;
}
.mp-sim-row {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.mp-sim-label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 5px;
}
.mp-sim-btns {
  display: flex;
  gap: 4px;
}
.mp-sim-btns button {
  flex: 1;
  height: 25px;
  border-radius: 6px;
  border: 1px solid rgba(244, 203, 107, 0.35);
  background: rgba(244, 203, 107, 0.1);
  color: #fde6a8;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.mp-sim-btns button:hover {
  background: var(--gold);
  color: #131b2b;
}

.social-mini-dock {
  position: fixed;
  bottom: 58px;
  right: 10px;
  z-index: 23;
  display: flex;
  align-items: center;
  gap: 5px;
}
.social-mini-dock button {
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(244, 203, 107, 0.42);
  background: rgba(10, 18, 32, 0.76);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.social-mini-dock button:hover {
  background: var(--gold);
  color: #131b2b;
}

.mp-chat-popover {
  position: fixed;
  bottom: 96px;
  right: 10px;
  z-index: 32;
  width: min(270px, calc(100vw - 24px));
  padding: 10px;
  border-radius: 12px;
  background: rgba(11, 20, 34, 0.92);
  border: 1px solid var(--gold-line);
  backdrop-filter: blur(10px);
}
.mp-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 7px;
}
.mp-quick-chips button {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 10.5px;
  cursor: pointer;
}
.mp-chat-form {
  display: flex;
  gap: 5px;
}
.mp-chat-form input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 11.5px;
}
.mp-chat-form button {
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #131b2b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}


/* ==========================================================================
   ORCHARD TASTING, BASKET ORDERING, REAL BOOTH OWNER & 1-1 LIVE CHAT STYLES
   ========================================================================== */
.drawer-badge.is-online {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  color: #86efac;
}

.tasting-specs-box {
  margin: 8px 0 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(244, 203, 107, 0.25);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  line-height: 1.4;
}
.tasting-specs-box .spec-item span {
  color: #cbd5e1;
}
.tasting-specs-box .spec-item strong {
  color: #fde68a;
}

.drawer-muted-note {
  margin: 6px 0 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #cbd5e1;
}

.picked-items-box {
  margin: 8px 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(244, 203, 107, 0.08);
  border: 1px dashed rgba(244, 203, 107, 0.36);
}
.picked-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 0;
  font-size: 11.5px;
  color: #fde68a;
  font-weight: 600;
}

.compact-drawer-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.field-lbl {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
}
.compact-drawer-form input,
.compact-drawer-form select {
  width: 100%;
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 12px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.price-highlight-line {
  margin: -2px 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: #4ade80;
}
.order-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.4);
  font-size: 12px;
}
.order-total-bar strong {
  font-size: 14px;
  color: #86efac;
}

.qr-inline-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
}
.qr-inline-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10.5px;
  color: #cbd5e1;
}
.qr-inline-caption strong {
  color: #fde68a;
  font-size: 11px;
}

.quick-contact-line {
  margin: 4px 0;
  font-size: 11.5px;
  color: #cbd5e1;
}
.quick-contact-line a {
  color: #fde047;
  font-weight: 700;
  text-decoration: underline;
}

.drawer-btn-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.gold-solid-btn {
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 0;
  background: var(--gold);
  color: #141c2c;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
.gold-solid-btn:hover {
  filter: brightness(1.07);
}
.gold-outline-btn {
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 203, 107, 0.52);
  background: rgba(244, 203, 107, 0.12);
  color: #fde68a;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.gold-outline-btn:hover {
  background: rgba(244, 203, 107, 0.25);
}
.full-w-btn {
  width: 100%;
  margin-top: 4px;
}
.mini-text-btn {
  background: none;
  border: 0;
  color: #94a3b8;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  padding: 2px 4px;
}
.form-status-msg {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: #fde68a;
}

.owner-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 8px 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}
.owner-tabs button {
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.owner-tabs button[aria-selected="true"] {
  background: var(--gold);
  color: #131b2b;
}

.inbox-sec-heading {
  margin: 10px 0 6px;
  font-size: 12px;
  color: #fde68a;
}
.inbox-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 185px;
  overflow-y: auto;
}
.inbox-card {
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11.5px;
}
.inbox-card-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #fde68a;
}
.inbox-card-sub {
  margin: 4px 0 6px;
  color: #cbd5e1;
  line-height: 1.35;
}
.inbox-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.mini-pill-link {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 600;
}
.confirm-order-btn {
  padding: 4px 9px;
  border-radius: 999px;
  border: 0;
  background: #10b981;
  color: #052e16;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.confirmed-tag {
  color: #4ade80;
  font-weight: 700;
  font-size: 11px;
}

.booth-chat-log,
.mini-thread-log {
  margin: 8px 0;
  padding: 8px;
  border-radius: 10px;
  background: rgba(7, 12, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  max-height: 185px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mini-thread-log {
  max-height: 105px;
  margin: 5px 0;
}
.msg-row {
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.38;
}
.msg-row.is-owner {
  background: rgba(244, 203, 107, 0.16);
  color: #fef3c7;
  align-self: flex-start;
}
.msg-row.is-visitor {
  background: rgba(56, 189, 248, 0.18);
  color: #e0f2fe;
  align-self: flex-end;
}
.mini-reply-form {
  display: flex;
  gap: 4px;
}
.mini-reply-form input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 11px;
}
.mini-reply-form button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: #131b2b;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.booth-ask-chips {
  margin: 4px 0 6px;
}


/* ==========================================================================
   STAGE PICTURE-IN-PICTURE (300x172px), PA BANNER & LIVE-COMMERCE DRAWER
   ========================================================================== */
.live-stage-pill {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(220, 38, 38, 0.2);
  color: #fecaca;
}
.btc-link-pill {
  padding: 0 8px;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.55);
  color: #e2e8f0;
}

.festival-pa-banner {
  position: fixed;
  top: calc(var(--topbar-h, 48px) + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 36;
  max-width: min(94vw, 680px);
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.96), rgba(146, 64, 14, 0.96));
  border: 1.5px solid #fde047;
  color: #fef9c3;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  animation: paSlideDown 0.25s ease-out;
}
@keyframes paSlideDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.stage-pip-player {
  position: fixed;
  bottom: 96px;
  right: 12px;
  z-index: 27;
  width: 300px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(9, 14, 26, 0.94);
  border: 1px solid rgba(244, 203, 107, 0.55);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  transition: width 0.2s ease;
}
.stage-pip-player.is-expanded {
  width: min(440px, calc(100vw - 24px));
}
.stage-pip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  background: rgba(127, 29, 29, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.stage-pip-title {
  font-size: 10.5px;
  font-weight: 800;
  color: #fef08a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-pip-controls {
  display: inline-flex;
  gap: 3px;
  flex-shrink: 0;
}
.stage-pip-controls button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.stage-pip-controls button:hover {
  background: var(--gold);
  color: #131b2b;
}
.stage-pip-mount {
  width: 100%;
  height: 172px;
  background: #050812;
  position: relative;
}
.stage-pip-player.is-expanded .stage-pip-mount {
  height: 248px;
}
.pip-media-fill {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}
.stage-pip-min-pill {
  position: fixed;
  bottom: 96px;
  right: 12px;
  z-index: 27;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #f87171;
  background: rgba(127, 29, 29, 0.9);
  color: #fef2f2;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.live-action-btn {
  background: rgba(220, 38, 38, 0.28) !important;
  border-color: #f87171 !important;
  color: #fecaca !important;
}
.heart-vote-btn {
  background: rgba(244, 63, 94, 0.22) !important;
  border-color: #fb7185 !important;
  color: #ffe4e6 !important;
}

.live-commerce-drawer {
  width: min(330px, calc(100vw - 20px));
  max-width: 330px;
}
.live-sub-caption {
  margin: 4px 0 8px;
  font-size: 11.5px;
  color: #fde68a;
  font-weight: 600;
}
.booth-live-player-mount {
  position: relative;
  width: 100%;
  height: 176px;
  border-radius: 10px;
  overflow: hidden;
  background: #090d16;
  border: 1px solid rgba(248, 113, 113, 0.45);
}
.live-viewer-meta {
  margin: -2px 0 6px;
  font-size: 11px;
  color: #86efac;
  font-weight: 600;
}
.live-audio-pill {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(9, 14, 26, 0.82);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.heart-contest-cta {
  width: 100%;
  height: 34px;
  margin-top: 8px;
  border-radius: 999px;
  border: 1px solid #fb7185;
  background: linear-gradient(90deg, rgba(190, 18, 60, 0.85), rgba(225, 29, 72, 0.85));
  color: #fff1f2;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.heart-contest-cta:hover {
  filter: brightness(1.1);
}
.live-product-card {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.live-product-card div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.live-product-card strong {
  font-size: 11.5px;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-product-card span {
  font-size: 11.5px;
  font-weight: 700;
  color: #4ade80;
}
.compact-live-log {
  max-height: 115px;
}
.live-config-box {
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.live-toggle-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fecaca;
  cursor: pointer;
}
.live-toggle-row input {
  width: 16px !important;
  height: 16px !important;
}
.pending-approval-note {
  margin: 6px 0;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.5);
  color: #fde68a;
  font-size: 11px;
  font-weight: 600;
}

/* WebRTC Direct Phone Camera Studio inside Owner Drawer */
.owner-cam-launch-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.owner-webrtc-cta {
  width: 100%;
  height: 35px;
  border-radius: 999px;
  border: 1px solid #f87171;
  background: linear-gradient(90deg, #b91c1c, #dc2626);
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}
.owner-webrtc-cta:hover {
  filter: brightness(1.08);
}
.cam-env-warn {
  margin: 2px 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 11px;
  line-height: 1.38;
}
.owner-cam-studio {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.owner-cam-preview-wrap {
  position: relative;
  width: 100%;
  height: 146px;
  border-radius: 9px;
  overflow: hidden;
  background: #050812;
  border: 1px solid #f87171;
}
.owner-cam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.owner-cam-viewer-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(9, 14, 26, 0.82);
  border: 1px solid rgba(253, 224, 71, 0.45);
  color: #fef08a;
  font-size: 10.5px;
  font-weight: 700;
}
.owner-live-comment-overlay {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  max-height: 58px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  pointer-events: none;
}
.owner-live-comment-overlay div {
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(9, 14, 26, 0.78);
  color: #f8fafc;
  font-size: 10.5px;
  line-height: 1.25;
}
.owner-cam-toolbar {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.75fr;
  gap: 4px;
}
.owner-cam-toolbar button {
  height: 29px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.owner-cam-toolbar button:hover {
  background: rgba(244, 203, 107, 0.22);
  color: #fde68a;
}
.owner-cam-toolbar button.is-stop {
  border-color: rgba(248, 113, 113, 0.6);
  background: rgba(185, 28, 28, 0.42);
  color: #fecaca;
}

/* ==========================================================================
   5-STAMP PASSPORT DRAWER (max-width: 310px), QUAN HỌ CARD & FIREWORKS BANNER
   ========================================================================== */
.stamp-pill-btn {
  border-color: rgba(251, 191, 36, 0.52);
  background: rgba(180, 83, 9, 0.24);
  color: #fef08a;
}
.stamp-pill-btn.is-complete {
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.8), rgba(16, 185, 129, 0.72));
  border-color: #fde047;
  color: #fff;
}

.compact-310-drawer {
  width: min(310px, calc(100vw - 20px)) !important;
  max-width: 310px !important;
}

.fireworks-alert-banner {
  position: fixed;
  top: calc(var(--topbar-h, 52px) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 37;
  max-width: min(95vw, 720px);
  padding: 7px 12px 7px 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.96), rgba(185, 28, 28, 0.96));
  border: 1.5px solid #fde047;
  color: #fef9c3;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6);
  animation: paSlideDown 0.25s ease-out;
}
.fireworks-alert-banner[hidden] {
  display: none !important;
}
.fireworks-alert-banner button {
  flex-shrink: 0;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  border: 0;
  background: #fde047;
  color: #1e1b4b;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.stamp-action-btn {
  background: rgba(185, 28, 28, 0.3) !important;
  border-color: #fca5a5 !important;
  color: #fef2f2 !important;
}
.quanho-action-btn {
  background: rgba(126, 34, 206, 0.32) !important;
  border-color: #d8b4fe !important;
  color: #faf5ff !important;
}
.lantern-action-btn {
  background: rgba(219, 39, 119, 0.32) !important;
  border-color: #f9a8d4 !important;
  color: #fdf2f8 !important;
}

.stamp-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 10px 0;
}
.stamp-slot-item {
  position: relative;
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(255, 251, 235, 0.06);
  border: 1px dashed rgba(251, 191, 36, 0.36);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.stamp-slot-item:last-child:nth-child(odd) {
  grid-column: span 2;
}
.stamp-seal-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px dashed rgba(203, 213, 225, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #94a3b8;
}
.stamp-slot-item.is-stamped {
  background: rgba(185, 28, 28, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.58);
}
.stamp-slot-item.is-stamped .stamp-seal-circle {
  border: 2.5px double #ef4444;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.25), rgba(127, 29, 29, 0.42));
  color: #fecaca;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 8px rgba(239, 68, 68, 0.45);
}
.stamp-slot-item.just-chopped .stamp-seal-circle {
  animation: stampChopImpact 0.42s cubic-bezier(0.22, 1.35, 0.36, 1);
}
@keyframes stampChopImpact {
  0% { transform: scale(2.1) rotate(-22deg); opacity: 0.2; }
  70% { transform: scale(0.92) rotate(-6deg); opacity: 1; }
  100% { transform: scale(1) rotate(-8deg); opacity: 1; }
}
.stamp-chop-tag {
  font-size: 8.5px;
  font-weight: 900;
  color: #fca5a5;
  letter-spacing: 0.05em;
}
.stamp-slot-title {
  font-size: 11px;
  font-weight: 700;
  color: #fef3c7;
}
.stamp-goto-btn {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.stamp-voucher-card {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(155deg, rgba(6, 78, 59, 0.65), rgba(120, 53, 15, 0.65));
  border: 1.5px solid #fde047;
  text-align: center;
}
.ambassador-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #facc15;
  color: #1c1917;
  font-size: 10px;
  font-weight: 900;
}
.voucher-caption {
  margin: 6px 0 4px;
  font-size: 11px;
  color: #e2e8f0;
}
.voucher-code-box {
  margin: 4px 0 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(9, 14, 26, 0.85);
  border: 1px dashed #4ade80;
}
.voucher-code-box strong {
  font-family: monospace;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: #4ade80;
}
.voucher-applied-note {
  margin: 2px 0 4px;
  font-size: 11px;
  font-weight: 700;
  color: #4ade80;
}

.betel-gift-badge {
  margin: 6px 0 10px;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(21, 128, 61, 0.22);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #dcfce7;
  font-size: 11px;
  line-height: 1.38;
}
.quanho-song-title {
  margin: 4px 0 6px;
  font-size: 13px;
  color: #fde047;
}
.quanho-lyrics-box {
  margin: 0 0 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.26);
  border-left: 3px solid #f472b6;
  color: #fef3c7;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.52;
  white-space: pre-line;
}

.mp-ambassador-badge {
  position: absolute;
  left: 0;
  top: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(180, 83, 9, 0.92), rgba(153, 27, 27, 0.92));
  border: 1px solid #fde047;
  color: #fef9c3;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.confetti-burst-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  animation: confettiFly 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes confettiFly {
  0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.7) rotate(var(--rot)); opacity: 0; }
}

/* ==========================================================================
   ZERO-COST B2B TRADE, MULTILINGUAL WEB SPEECH GUIDE, 360° PANO & TRACEABILITY
   ========================================================================== */
.b2b-pill-btn {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(14, 116, 144, 0.25);
  color: #bae6fd;
}
.guide-pill-btn {
  border-color: rgba(192, 132, 252, 0.5);
  background: rgba(107, 33, 168, 0.26);
  color: #f3e8ff;
}
.checkin-pill-btn {
  border-color: rgba(52, 211, 153, 0.48);
  background: rgba(6, 95, 70, 0.28);
  color: #d1fae5;
}
.pano-action-btn {
  background: rgba(2, 132, 199, 0.3) !important;
  border-color: #38bdf8 !important;
  color: #e0f2fe !important;
}
.trace-action-btn {
  background: rgba(5, 150, 105, 0.3) !important;
  border-color: #34d399 !important;
  color: #d1fae5 !important;
}

.owner-tabs.is-3col {
  grid-template-columns: repeat(3, 1fr);
}
.sub-sec-title {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: #fde68a;
}

.pano-exit-bar {
  position: fixed;
  top: calc(var(--topbar-h, 52px) + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 42;
  max-width: min(94vw, 680px);
  padding: 7px 12px 7px 16px;
  border-radius: 999px;
  background: rgba(9, 14, 26, 0.92);
  border: 1.5px solid #38bdf8;
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.58);
}
.pano-exit-bar[hidden] {
  display: none !important;
}
.pano-exit-bar button {
  flex-shrink: 0;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0;
  background: #facc15;
  color: #111827;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}

.guide-subtitle-bar {
  position: fixed;
  bottom: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 32;
  max-width: min(92vw, 640px);
  padding: 7px 12px 7px 14px;
  border-radius: 12px;
  background: rgba(9, 14, 26, 0.88);
  border: 1px solid rgba(192, 132, 252, 0.55);
  color: #f8fafc;
  font-size: 11.5px;
  line-height: 1.42;
  white-space: pre-line;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
}
.guide-subtitle-bar[hidden] {
  display: none !important;
}
.guide-subtitle-bar button {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 0;
  background: rgba(239, 68, 68, 0.35);
  color: #fecaca;
  cursor: pointer;
}

.b2b-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 8px;
}
.b2b-filter-chip {
  height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}
.b2b-filter-chip.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111827;
}
.b2b-offers-scroll {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 185px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.b2b-offer-card {
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(14, 116, 144, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.34);
  font-size: 11px;
  line-height: 1.38;
}
.b2b-offer-card.is-picked {
  border-color: #fde047;
  background: rgba(250, 204, 21, 0.14);
}
.b2b-offer-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: #fde68a;
  font-weight: 800;
}
.b2b-offer-meta {
  margin: 3px 0 5px;
  color: #cbd5e1;
}
.b2b-rfq-box {
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.guide-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 8px 0;
}
.guide-lang-btn {
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.guide-lang-btn.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #111827;
}
.guide-qa-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.guide-qa-list button {
  text-align: left;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(192, 132, 252, 0.34);
  background: rgba(88, 28, 135, 0.22);
  color: #f3e8ff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.guide-qa-list button:hover {
  background: rgba(126, 34, 206, 0.42);
}

.trace-spec-card {
  padding: 8px 9px;
  border-radius: 10px;
  background: rgba(6, 78, 59, 0.24);
  border: 1px solid rgba(52, 211, 153, 0.38);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  margin-bottom: 8px;
}
.trace-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.trace-puc-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #10b981;
  color: #052e16;
  font-family: monospace;
  font-size: 11.5px;
  font-weight: 900;
}
.trace-phc-sub {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: #cbd5e1;
}
.trace-map-canvas {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(250, 204, 21, 0.42);
  display: block;
  margin-bottom: 6px;
}
.nav-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.trace-photos-section {
  margin-top: 8px;
}
.trace-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 4px;
}
.trace-photos-grid img {
  width: 100%;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MOBILE & TOUCH-FIRST ZERO-OVERLAP HUD LAYOUT (320px – 768px + LANDSCAPE)
   ========================================================================== */
.touch-joystick {
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.touch-joystick.is-active {
  background: rgba(15, 28, 46, 0.56);
  border-color: rgba(244, 203, 107, 0.85);
  box-shadow: 0 0 18px rgba(244, 203, 107, 0.28);
}
.touch-joystick.is-active .touch-joystick-knob {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(244, 203, 107, 0.65);
}

/* On any touch screen (even wide tablets), keep Touch Joystick & Social Dock cleanly ABOVE bottom action bars! */
@media (pointer: coarse) {
  .touch-joystick {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    width: 88px;
    height: 88px;
    z-index: 23;
  }
  .touch-joystick-knob {
    width: 34px;
    height: 34px;
  }
  .social-mini-dock {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 23;
  }
  .mp-chat-popover {
    bottom: calc(122px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 768px) {
  /* 1. Top bar: strictly 2 slim non-wrapping horizontal swipe strips — NEVER stacks into 4 tall rows! */
  .slim-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    padding: max(5px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) 5px max(8px, env(safe-area-inset-left, 0px));
  }
  .top-left-cluster {
    width: 100%;
    flex: none;
  }
  .top-brand {
    padding-right: 5px;
  }
  .top-brand img {
    width: 22px;
    height: 22px;
  }
  .zone-strip {
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
  }
  .zone-nav-btn {
    padding: 5px 9px;
    font-size: 11.5px;
  }

  .top-right-tools {
    width: 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 5px;
    padding-bottom: 1px;
  }
  .top-right-tools::-webkit-scrollbar {
    display: none;
  }
  .top-right-tools > * {
    flex-shrink: 0;
  }
  .slim-pill-btn {
    height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }
  .atmo-btn {
    height: 24px;
    padding: 0 7px;
    font-size: 11px;
  }

  /* 2. Bottom contextual action bar anchored cleanly to bottom edge with safe-area padding */
  .bottom-prompts {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: 8px;
    right: 8px;
    transform: none;
    width: auto;
    max-width: none;
    z-index: 24;
  }
  .sanctuary-rituals,
  .context-action-bar {
    max-width: 100%;
    width: auto;
    gap: 6px;
    padding: 5px 10px;
    -webkit-overflow-scrolling: touch;
  }
  .sanctuary-rituals button,
  .context-action-bar button {
    height: 32px;
    padding: 0 10px;
    font-size: 11.5px;
  }
  .context-bar-tag {
    max-width: 110px;
    font-size: 10.5px;
  }

  /* 3. Bottom-Left Joystick & Bottom-Right Compact Social Dock cleanly separated above bottom action bar! */
  .touch-joystick {
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    width: 86px;
    height: 86px;
    z-index: 23;
  }
  .social-mini-dock {
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    gap: 6px;
    z-index: 23;
  }
  .social-mini-dock button {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
  }
  .mp-chat-popover {
    bottom: calc(120px + env(safe-area-inset-bottom, 0px));
    right: 10px;
    z-index: 35;
  }

  /* 4. Hints, Subtitles, Banners & PiP Player never collide with bottom thumb zone! */
  .controls-hint {
    max-width: calc(100vw - 20px);
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    font-size: 10px;
    padding: 5px 11px;
  }
  .guide-subtitle-bar {
    top: calc(var(--topbar-h, 76px) + 6px);
    bottom: auto;
    max-width: calc(100vw - 18px);
    font-size: 11px;
    padding: 6px 10px;
    z-index: 31;
  }
  .pano-exit-bar {
    top: calc(var(--topbar-h, 76px) + 6px);
    max-width: calc(100vw - 16px);
    padding: 6px 10px;
    gap: 8px;
    font-size: 11px;
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 14px;
  }
  .stage-pip-player {
    bottom: calc(122px + env(safe-area-inset-bottom, 0px));
    right: 10px;
    width: min(256px, calc(100vw - 20px));
    z-index: 28;
  }
  .stage-pip-mount {
    height: 144px;
  }
  .stage-pip-min-pill {
    bottom: calc(122px + env(safe-area-inset-bottom, 0px));
    right: 10px;
  }

  /* 5. Right-Edge Drawers expand cleanly on phones above joystick/bars + 16px inputs prevent iOS zoom! */
  .detail-drawer,
  .compact-310-drawer,
  .live-commerce-drawer {
    top: calc(var(--topbar-h, 76px) + 6px);
    left: 8px;
    right: 8px;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - var(--topbar-h, 76px) - 16px - env(safe-area-inset-bottom, 0px));
    padding: 12px 13px calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 38;
  }
  .compact-drawer-form input,
  .compact-drawer-form select,
  .mp-chat-form input,
  .mini-reply-form input {
    font-size: 16px;
    height: 38px;
  }
  .drawer-close {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
}

/* Mobile Landscape Compact Adjustments (e.g., iPhone/Android rotated horizontally <= 500px tall) */
@media (max-height: 500px) and (pointer: coarse) {
  .touch-joystick {
    width: 72px;
    height: 72px;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    left: max(10px, env(safe-area-inset-left, 0px));
  }
  .touch-joystick-knob {
    width: 28px;
    height: 28px;
  }
  .social-mini-dock {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
  .stage-pip-player {
    width: 210px;
    bottom: calc(106px + env(safe-area-inset-bottom, 0px));
  }
  .stage-pip-mount {
    height: 112px;
  }
}
