/* ==========================================================================
   world3d.css — HUD overlay styles for the Virtual Expo Three.js world
   --------------------------------------------------------------------------
   - Cinematic glassmorphism, premium feel (Apple keynote / Linear / Stripe)
   - Default theme: dark.  Light theme via [data-theme="light"]
   - Mobile-first, tested at 360px width
   - Z-index: canvas 1, top bar 10, minimap 11, panel 12, hint 13, toast 14,
     loading 99
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens (CSS custom properties)
   -------------------------------------------------------------------------- */
.vx-hud {
  /* Colors — dark (default) */
  --vx-bg-0:        #07090f;
  --vx-bg-1:        #0c111c;
  --vx-bg-2:        #131929;
  --vx-bg-3:        #1c2236;
  --vx-glass:       rgba(14, 18, 30, 0.55);
  --vx-glass-strong:rgba(10, 14, 24, 0.78);
  --vx-border:      rgba(255, 255, 255, 0.10);
  --vx-border-2:    rgba(255, 255, 255, 0.06);
  --vx-text:        #e7ebf6;
  --vx-text-soft:   #b6bdd1;
  --vx-text-mute:   #7d8499;
  --vx-accent:      #6a7dff;
  --vx-accent-2:    #9b6bff;
  --vx-accent-soft: rgba(106, 125, 255, 0.18);
  --vx-success:     #2bd587;
  --vx-error:       #ff5470;
  --vx-warn:        #ffb74d;
  --vx-shadow-1:    0 1px 0 rgba(255,255,255,0.06) inset, 0 8px 24px rgba(0,0,0,0.45);
  --vx-shadow-2:    0 1px 0 rgba(255,255,255,0.07) inset, 0 24px 60px rgba(0,0,0,0.55);

  /* Layout */
  --vx-radius-sm: 8px;
  --vx-radius:    14px;
  --vx-radius-lg: 22px;
  --vx-blur:      18px;
  --vx-pad:       14px;

  /* Typography */
  --vx-font: 'Inter', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont,
             'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  font-family: var(--vx-font);
  color: var(--vx-text);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Light theme overrides */
.vx-hud[data-theme="light"] {
  --vx-bg-0:        #f3f5fb;
  --vx-bg-1:        #ffffff;
  --vx-bg-2:        #f7f9ff;
  --vx-bg-3:        #eef2fb;
  --vx-glass:       rgba(255, 255, 255, 0.65);
  --vx-glass-strong:rgba(255, 255, 255, 0.92);
  --vx-border:      rgba(20, 30, 60, 0.10);
  --vx-border-2:    rgba(20, 30, 60, 0.06);
  --vx-text:        #142040;
  --vx-text-soft:   #3a4565;
  --vx-text-mute:   #7c849c;
  --vx-accent:      #4258ff;
  --vx-accent-2:    #8a4cff;
  --vx-accent-soft: rgba(66, 88, 255, 0.12);
  --vx-shadow-1:    0 1px 0 rgba(255,255,255,0.6) inset, 0 8px 24px rgba(40, 60, 120, 0.18);
  --vx-shadow-2:    0 1px 0 rgba(255,255,255,0.6) inset, 0 24px 60px rgba(40, 60, 120, 0.25);
}

.vx-hud * { box-sizing: border-box; }
.vx-hud button { font-family: inherit; font-size: inherit; color: inherit; }
.vx-hud kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--vx-text-soft);
  margin: 0 2px;
  line-height: 1;
}

/* All interactive children re-enable pointer events */
.vx-hud .vx-topbar,
.vx-hud .vx-minimap,
.vx-hud .vx-panel,
.vx-hud .vx-toast,
.vx-hud .vx-hint,
.vx-hud .vx-loading,
.vx-hud .vx-tod,
.vx-hud .vx-help-tooltip { pointer-events: auto; }

/* --------------------------------------------------------------------------
   1. Loading screen
   -------------------------------------------------------------------------- */
.vx-loading {
  position: absolute;
  inset: 0;
  z-index: 99;
  display: grid;
  place-items: center;
  transition: opacity .65s ease;
  opacity: 1;
  background: radial-gradient(ellipse at 50% 30%, rgba(106,125,255,0.18), transparent 60%),
              linear-gradient(180deg, var(--vx-bg-0) 0%, #04060c 100%);
  overflow: hidden;
}
.vx-loading[data-visible="false"] { display: none; }

.vx-loading__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 80%, rgba(155,107,255,0.18), transparent 50%),
    radial-gradient(circle at 20% 90%, rgba(43, 213, 135, 0.10), transparent 55%);
  filter: blur(40px);
  opacity: 0.9;
}
.vx-loading__inner {
  position: relative;
  width: min(420px, 90vw);
  text-align: center;
  padding: 32px;
}
.vx-loading__brand { margin-bottom: 36px; }
.vx-loading__mark {
  display: inline-flex; gap: 6px;
  margin-bottom: 18px;
}
.vx-loading__mark-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--vx-accent), var(--vx-accent-2));
  box-shadow: 0 0 22px rgba(106,125,255,0.55);
  animation: vx-bounce 1.4s ease-in-out infinite;
}
.vx-loading__mark-dot:nth-child(2) { animation-delay: 0.18s; }
.vx-loading__mark-dot:nth-child(3) { animation-delay: 0.36s; }

.vx-loading__title {
  margin: 0;
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #b8c1ff 60%, #d6c0ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.vx-loading__subtitle {
  margin: 8px 0 0; color: var(--vx-text-mute); font-size: 13px;
}
.vx-loading__progress {
  display: flex; align-items: center; gap: 14px;
  margin-top: 24px;
}
.vx-loading__bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--vx-border-2);
}
.vx-loading__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--vx-accent) 0%, var(--vx-accent-2) 100%);
  border-radius: inherit;
  transition: width .35s ease;
  box-shadow: 0 0 14px rgba(106,125,255,0.55);
}
.vx-loading__pct {
  font-variant-numeric: tabular-nums;
  font-size: 13px; color: var(--vx-text-soft); min-width: 42px; text-align: right;
}
.vx-loading__hint {
  margin-top: 18px;
  font-size: 12px;
  color: var(--vx-text-mute);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: vx-pulse 2.4s ease-in-out infinite;
}

@keyframes vx-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: .5; }
  40%           { transform: scale(1.0); opacity: 1; }
}
@keyframes vx-pulse {
  0%,100% { opacity: .55; }
  50%     { opacity: 1; }
}

/* --------------------------------------------------------------------------
   2. Top bar
   -------------------------------------------------------------------------- */
.vx-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 18px;
  background: var(--vx-glass);
  border-bottom: 1px solid var(--vx-border);
  color: var(--vx-text);
}
@supports (backdrop-filter: blur(10px)) {
  .vx-topbar { backdrop-filter: blur(var(--vx-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--vx-blur)) saturate(140%); }
}
.vx-topbar__left   { display: flex; align-items: center; }
.vx-topbar__center { display: flex; align-items: center; justify-content: center; min-width: 0; }
.vx-topbar__right  { display: flex; align-items: center; gap: 6px; justify-content: flex-end; position: relative; }

.vx-brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: inherit;
  font-weight: 600; letter-spacing: -0.01em;
}
.vx-brand__mark {
  display: inline-flex; gap: 3px;
  padding: 4px 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(106,125,255,0.18), rgba(155,107,255,0.18));
  border: 1px solid var(--vx-border);
}
.vx-brand__mark i {
  width: 6px; height: 14px; border-radius: 2px; display: block;
  background: linear-gradient(180deg, var(--vx-accent), var(--vx-accent-2));
}
.vx-brand__mark i:nth-child(1) { height: 10px; align-self: end; }
.vx-brand__mark i:nth-child(2) { height: 16px; }
.vx-brand__mark i:nth-child(3) { height: 8px;  align-self: end; }
.vx-brand__text { font-size: 14px; }
.vx-brand__accent {
  background: linear-gradient(135deg, var(--vx-accent), var(--vx-accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Room name announcer */
.vx-room {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--vx-text-soft);
  max-width: 60vw;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.vx-room__icon { color: var(--vx-accent); width: 14px; height: 14px; display: inline-flex; }
.vx-room__icon svg { width: 14px; height: 14px; }
.vx-room__name { font-weight: 500; color: var(--vx-text); transition: opacity .25s; }
.vx-room__name.is-fade { animation: vx-roomfade .9s cubic-bezier(.2,.8,.2,1); }
@keyframes vx-roomfade {
  0%   { opacity: 0; transform: translateY(-6px); filter: blur(4px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Icon buttons */
.vx-iconbtn {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  width: 38px; height: 38px;
  padding: 0;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: 12px;
  color: var(--vx-text-soft);
  cursor: pointer;
  text-decoration: none;
  justify-content: center;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.vx-iconbtn:hover { color: var(--vx-text); border-color: var(--vx-accent-soft); transform: translateY(-1px); }
.vx-iconbtn:active { transform: translateY(0); }
.vx-iconbtn:focus-visible { outline: 2px solid var(--vx-accent); outline-offset: 2px; }
.vx-iconbtn svg { width: 18px; height: 18px; }
.vx-iconbtn--text { width: auto; padding: 0 12px; gap: 8px; }
.vx-iconbtn__label { font-size: 13px; }

/* theme toggle: show sun in dark, moon in light */
.vx-iconbtn[data-role="theme-toggle"] .vx-iconbtn__moon { display: none; }
.vx-hud[data-theme="light"] .vx-iconbtn[data-role="theme-toggle"] .vx-iconbtn__sun  { display: none; }
.vx-hud[data-theme="light"] .vx-iconbtn[data-role="theme-toggle"] .vx-iconbtn__moon { display: inline-flex; }

/* mode toggle: show third in third mode, eye in first */
.vx-iconbtn[data-role="mode-toggle"][data-mode="first"] .vx-iconbtn__third { display: none; }
.vx-iconbtn[data-role="mode-toggle"][data-mode="third"] .vx-iconbtn__first { display: none; }

/* Help tooltip */
.vx-help-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 4px;
  width: 240px;
  padding: 14px 16px;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow-2);
  font-size: 12px;
  color: var(--vx-text-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 12;
}
@supports (backdrop-filter: blur(10px)) {
  .vx-help-tooltip { backdrop-filter: blur(var(--vx-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--vx-blur)) saturate(140%); }
}
.vx-help-tooltip[data-open="true"] { opacity: 1; pointer-events: auto; transform: translateY(0); }
.vx-help-tooltip strong { color: var(--vx-text); display: block; margin-bottom: 8px; font-size: 13px; }
.vx-help-tooltip ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* TOD slider */
.vx-tod {
  position: absolute;
  top: 64px;
  right: 18px;
  width: 240px;
  padding: 12px 14px;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow-1);
  z-index: 11;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
}
@supports (backdrop-filter: blur(10px)) {
  .vx-tod { backdrop-filter: blur(var(--vx-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--vx-blur)) saturate(140%); }
}
.vx-tod[aria-hidden="false"] { opacity: 1; pointer-events: auto; transform: translateY(0); }
.vx-tod label { font-size: 12px; color: var(--vx-text-mute); text-transform: uppercase; letter-spacing: 0.06em; }
.vx-tod input[type="range"] {
  width: 100%; margin: 8px 0 6px;
  accent-color: var(--vx-accent);
}
.vx-tod__ticks {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--vx-text-mute);
}

/* --------------------------------------------------------------------------
   3. Mini-map
   -------------------------------------------------------------------------- */
.vx-minimap {
  position: absolute;
  top: 72px;
  right: 18px;
  width: 220px;
  z-index: 11;
  background: var(--vx-glass);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow-1);
  overflow: hidden;
  transition: transform .3s ease, opacity .3s ease;
}
@supports (backdrop-filter: blur(10px)) {
  .vx-minimap { backdrop-filter: blur(var(--vx-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--vx-blur)) saturate(140%); }
}
.vx-minimap[data-collapsed="true"] {
  transform: translateX(280px);
  opacity: 0;
  pointer-events: none;
}
.vx-minimap[data-collapsed="true"] ~ .vx-minimap__chip { display: inline-flex; }

.vx-minimap__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid var(--vx-border-2);
}
.vx-minimap__title {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--vx-text-mute);
}
.vx-minimap__toggle {
  width: 22px; height: 22px;
  background: transparent;
  border: 1px solid var(--vx-border);
  border-radius: 6px;
  color: var(--vx-text-soft);
  cursor: pointer;
  line-height: 0;
  font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.vx-minimap__toggle:hover { color: var(--vx-text); border-color: var(--vx-accent-soft); }

.vx-minimap__body { position: relative; padding: 8px; }
.vx-minimap__canvas {
  width: 100%; height: 140px;
  display: block;
  border-radius: 8px;
  cursor: crosshair;
  background: rgba(0,0,0,0.25);
}
.vx-minimap__tooltip {
  position: absolute;
  pointer-events: none;
  padding: 4px 8px;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--vx-text);
  white-space: nowrap;
  z-index: 2;
}
.vx-minimap__legend {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
  padding: 8px 2px 2px;
  font-size: 10px; color: var(--vx-text-mute);
}
.vx-minimap__legend span { display: inline-flex; align-items: center; gap: 5px; }
.vx-minimap__legend i {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.4);
}

/* The chip for re-expanding the map (mobile / collapsed) */
.vx-minimap__chip {
  position: absolute;
  top: 72px;
  right: 18px;
  width: 44px; height: 44px;
  padding: 0;
  display: none;
  align-items: center; justify-content: center;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: 50%;
  color: var(--vx-accent);
  cursor: pointer;
  box-shadow: var(--vx-shadow-1);
  z-index: 11;
}
.vx-minimap__chip svg { width: 18px; height: 18px; }
.vx-minimap[data-collapsed="true"] + .vx-toasts ~ .vx-minimap__chip,
.vx-minimap[data-collapsed="true"] ~ .vx-minimap__chip { display: inline-flex; }

/* --------------------------------------------------------------------------
   4. Stand info side panel
   -------------------------------------------------------------------------- */
.vx-panel {
  position: absolute;
  top: 70px;
  right: 18px;
  bottom: 18px;
  width: 380px;
  max-width: calc(100vw - 36px);
  z-index: 12;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-lg);
  box-shadow: var(--vx-shadow-2);
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateX(calc(100% + 40px));
  opacity: 0;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
  pointer-events: auto;
  outline: none;
}
@supports (backdrop-filter: blur(10px)) {
  .vx-panel { backdrop-filter: blur(calc(var(--vx-blur) * 1.4)) saturate(160%); -webkit-backdrop-filter: blur(calc(var(--vx-blur) * 1.4)) saturate(160%); }
}
.vx-panel[data-open="true"] {
  transform: translateX(0);
  opacity: 1;
}

.vx-panel__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  padding: 0;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  z-index: 4;
  display: inline-flex; align-items: center; justify-content: center;
}
.vx-panel__close:hover { background: rgba(0,0,0,0.6); }
.vx-panel__close svg { width: 16px; height: 16px; }

.vx-panel__header {
  position: relative;
  height: 140px;
  flex-shrink: 0;
}
.vx-panel__cover {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--vx-accent), var(--vx-accent-2));
}
.vx-panel__logo {
  position: absolute;
  bottom: -28px;
  left: 22px;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--vx-bg-2) center/cover no-repeat;
  border: 3px solid var(--vx-bg-1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 26px;
  color: var(--vx-text);
}
.vx-panel__logo.is-empty {
  background: linear-gradient(135deg, var(--vx-accent), var(--vx-accent-2));
}

.vx-panel__meta {
  padding: 36px 22px 12px;
  flex-shrink: 0;
}
.vx-panel__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--vx-text);
}
.vx-panel__chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 10px;
  align-items: center;
}
.vx-panel__tagline {
  margin: 0;
  font-size: 13px;
  color: var(--vx-text-soft);
}

/* Tier badges */
.vx-tier {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1a1a1a;
  position: relative;
  overflow: hidden;
}
.vx-tier[data-tier="bronze"]   { background: linear-gradient(135deg, #cd7f32, #8b5a1f); color: #fff; }
.vx-tier[data-tier="silver"]   { background: linear-gradient(135deg, #d8d8d8, #9ea0a4); color: #1a1a1a; }
.vx-tier[data-tier="gold"]     { background: linear-gradient(135deg, #ffd84d, #b88500); color: #1a1a1a; }
.vx-tier[data-tier="platinum"] {
  background: linear-gradient(135deg, #e5e4ff, #b6c1ff 60%, #f0f4ff);
  color: #221c46;
}
.vx-tier[data-tier="platinum"]::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg,
    transparent 30%, rgba(255,255,255,0.6) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: vx-shimmer 2.6s ease-in-out infinite;
}
@keyframes vx-shimmer {
  0%, 60% { transform: translateX(-100%); }
  100%    { transform: translateX(100%); }
}

.vx-chip {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  background: var(--vx-accent-soft);
  color: var(--vx-accent);
  border: 1px solid var(--vx-accent-soft);
}
.vx-views {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px;
  color: var(--vx-text-mute);
  margin-left: auto;
}
.vx-views svg { width: 13px; height: 13px; }

/* Tabs */
.vx-tabs {
  display: flex;
  padding: 0 12px;
  gap: 2px;
  border-bottom: 1px solid var(--vx-border-2);
  flex-shrink: 0;
}
.vx-tab {
  flex: 1;
  padding: 10px 4px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--vx-text-mute);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: color .2s, border-color .2s;
}
.vx-tab:hover { color: var(--vx-text-soft); }
.vx-tab.is-active { color: var(--vx-text); border-bottom-color: var(--vx-accent); }
.vx-tab:focus-visible { outline: 2px solid var(--vx-accent); outline-offset: -2px; border-radius: 4px; }

.vx-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 22px 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--vx-border) transparent;
}
.vx-panel__body::-webkit-scrollbar { width: 6px; }
.vx-panel__body::-webkit-scrollbar-thumb { background: var(--vx-border); border-radius: 999px; }
.vx-panel__body::-webkit-scrollbar-track { background: transparent; }

.vx-pane { display: none; }
.vx-pane.is-active { display: block; animation: vx-fadein .3s ease; }
@keyframes vx-fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.vx-panel__desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--vx-text-soft);
  line-height: 1.55;
  white-space: pre-wrap;
}
.vx-panel__row {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--vx-text-mute);
  margin-bottom: 12px;
}
.vx-panel__row svg { width: 13px; height: 13px; color: var(--vx-accent); }
.vx-panel__row:empty { display: none; }

/* Socials */
.vx-socials { display: flex; gap: 8px; }
.vx-social {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--vx-bg-3);
  color: var(--vx-text-soft);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--vx-border);
  transition: transform .15s, color .2s;
}
.vx-social:hover { transform: translateY(-2px); color: var(--vx-text); }
.vx-social--facebook  { background: linear-gradient(135deg, #1877f2, #0c5fcf); color: #fff; border-color: transparent; }
.vx-social--instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); color: #fff; border-color: transparent; }
.vx-social--x         { background: #000; color: #fff; border-color: transparent; }
.vx-social--linkedin  { background: #0a66c2; color: #fff; border-color: transparent; }
.vx-social--youtube   { background: #ff0000; color: #fff; border-color: transparent; }

/* Products */
.vx-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.vx-prod {
  background: var(--vx-bg-2);
  border: 1px solid var(--vx-border-2);
  border-radius: var(--vx-radius);
  overflow: hidden;
  transition: transform .15s, border-color .2s;
}
.vx-prod:hover { transform: translateY(-2px); border-color: var(--vx-accent-soft); }
.vx-prod__img {
  aspect-ratio: 1 / 1;
  background: var(--vx-bg-3) center/cover no-repeat;
}
.vx-prod__info { padding: 10px 12px; }
.vx-prod__name {
  margin: 0 0 4px;
  font-size: 13px; font-weight: 500;
  color: var(--vx-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vx-prod__price {
  font-size: 13px; font-weight: 700;
  color: var(--vx-accent);
}

/* Gallery */
.vx-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.vx-thumb {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--vx-bg-3);
  border: 1px solid var(--vx-border-2);
  transition: transform .15s;
}
.vx-thumb:hover { transform: scale(1.03); }
.vx-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Empty state */
.vx-empty {
  text-align: center;
  padding: 24px 12px;
  color: var(--vx-text-mute);
  font-size: 13px;
  border: 1px dashed var(--vx-border);
  border-radius: var(--vx-radius);
}

/* Contact buttons */
.vx-contact {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.vx-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--vx-bg-2);
  border: 1px solid var(--vx-border);
  border-radius: 10px;
  color: var(--vx-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s;
  justify-content: center;
}
.vx-btn:hover { background: var(--vx-bg-3); border-color: var(--vx-accent-soft); transform: translateY(-1px); }
.vx-btn:active { transform: translateY(0); }
.vx-btn:focus-visible { outline: 2px solid var(--vx-accent); outline-offset: 2px; }
.vx-btn svg { width: 16px; height: 16px; }
.vx-btn--primary {
  background: linear-gradient(135deg, var(--vx-accent), var(--vx-accent-2));
  border-color: transparent;
  color: #fff;
}
.vx-btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.vx-btn--whats { background: linear-gradient(135deg, #25d366, #128c7e); border-color: transparent; color: #fff; }
.vx-btn--whats:hover { filter: brightness(1.05); }

/* Chat form */
.vx-chat {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px;
  background: var(--vx-bg-2);
  border: 1px solid var(--vx-border-2);
  border-radius: var(--vx-radius);
}
.vx-chat__label {
  font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--vx-text-mute);
}
.vx-chat textarea {
  width: 100%;
  resize: vertical;
  min-height: 70px;
  padding: 10px 12px;
  background: var(--vx-bg-1);
  border: 1px solid var(--vx-border);
  border-radius: 10px;
  color: var(--vx-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.vx-chat textarea:focus {
  border-color: var(--vx-accent);
  box-shadow: 0 0 0 3px var(--vx-accent-soft);
}
.vx-chat__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.vx-chat__hint { font-size: 11px; color: var(--vx-text-mute); }
.vx-chat__status {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
}
.vx-chat__status.is-pending { background: var(--vx-accent-soft); color: var(--vx-accent); }
.vx-chat__status.is-success { background: rgba(43,213,135,0.12); color: var(--vx-success); }
.vx-chat__status.is-error   { background: rgba(255,84,112,0.12); color: var(--vx-error); }

/* --------------------------------------------------------------------------
   5. Bottom-left controls hint
   -------------------------------------------------------------------------- */
.vx-hint {
  position: absolute;
  left: 18px; bottom: 18px;
  z-index: 13;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--vx-text-soft);
  box-shadow: var(--vx-shadow-1);
  transition: opacity .35s ease, transform .35s ease;
  max-width: calc(100vw - 36px);
}
@supports (backdrop-filter: blur(10px)) {
  .vx-hint { backdrop-filter: blur(var(--vx-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--vx-blur)) saturate(140%); }
}
.vx-hint[data-visible="false"] {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}
.vx-hint__keys { display: inline-flex; gap: 2px; flex-shrink: 0; }
.vx-hint__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vx-hint__close {
  width: 22px; height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--vx-border);
  border-radius: 50%;
  color: var(--vx-text-mute);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.vx-hint__close svg { width: 12px; height: 12px; }
.vx-hint__close:hover { color: var(--vx-text); }

/* --------------------------------------------------------------------------
   6. Bottom-center joystick area
   -------------------------------------------------------------------------- */
.vx-joystick-area {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 0;
  z-index: 8;
  pointer-events: none;
}
@media (hover: none) and (pointer: coarse) {
  .vx-joystick-area {
    height: 180px;
    pointer-events: auto;
  }
}

/* --------------------------------------------------------------------------
   7. Notification toast
   -------------------------------------------------------------------------- */
.vx-toasts {
  position: absolute;
  top: 70px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  z-index: 14;
  pointer-events: none;
  width: max-content; max-width: 90%;
}
.vx-toast {
  pointer-events: auto;
  padding: 10px 18px;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: 999px;
  box-shadow: var(--vx-shadow-1);
  font-size: 13px;
  color: var(--vx-text);
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  transition: opacity .25s ease, transform .25s cubic-bezier(.2,.8,.2,1);
}
@supports (backdrop-filter: blur(10px)) {
  .vx-toast { backdrop-filter: blur(var(--vx-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--vx-blur)) saturate(140%); }
}
.vx-toast.is-in { opacity: 1; transform: translateY(0) scale(1); }
.vx-toast.is-out { opacity: 0; transform: translateY(-6px) scale(0.98); }
.vx-toast--success { border-color: rgba(43,213,135,0.35); box-shadow: 0 0 0 1px rgba(43,213,135,0.18) inset, var(--vx-shadow-1); }
.vx-toast--success::before { content: '✓'; color: var(--vx-success); margin-right: 8px; font-weight: 700; }
.vx-toast--error   { border-color: rgba(255,84,112,0.35); }
.vx-toast--error::before { content: '✕'; color: var(--vx-error); margin-right: 8px; font-weight: 700; }
.vx-toast--info::before { content: 'ℹ'; color: var(--vx-accent); margin-right: 8px; font-weight: 700; }

/* --------------------------------------------------------------------------
   Responsive — Tablet
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .vx-iconbtn--text .vx-iconbtn__label { display: none; }
  .vx-iconbtn--text { width: 38px; padding: 0; }
  .vx-panel { width: 360px; }
  .vx-minimap { width: 200px; }
}

/* --------------------------------------------------------------------------
   Responsive — Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .vx-hud { font-size: 13px; }

  .vx-topbar {
    height: 52px;
    padding: 0 10px;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }
  .vx-brand__text { display: none; }
  .vx-room { padding: 5px 10px; font-size: 12px; max-width: 50vw; }

  .vx-minimap {
    width: 140px;
    top: 60px; right: 10px;
  }
  .vx-minimap__canvas { height: 88px; }
  .vx-minimap__legend { display: none; }
  .vx-minimap__chip { top: 60px; right: 10px; }

  /* Panel becomes a bottom-sheet */
  .vx-panel {
    top: auto;
    left: 0; right: 0; bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 60%;
    border-radius: var(--vx-radius-lg) var(--vx-radius-lg) 0 0;
    transform: translateY(calc(100% + 30px));
  }
  .vx-panel[data-open="true"] { transform: translateY(0); }
  .vx-panel__header { height: 110px; }
  .vx-panel__logo { width: 56px; height: 56px; bottom: -22px; left: 18px; }
  .vx-panel__meta { padding: 30px 18px 10px; }
  .vx-panel__title { font-size: 18px; }
  .vx-panel__body { padding: 12px 18px 18px; }

  .vx-hint {
    left: 10px; bottom: 10px;
    padding: 6px 10px;
    font-size: 11px;
  }
  .vx-hint__keys { display: none; }

  .vx-toasts { top: 60px; }

  .vx-tod { right: 10px; width: calc(100vw - 20px); max-width: 280px; }
  .vx-help-tooltip { right: 10px; width: 220px; }
}

/* --------------------------------------------------------------------------
   Responsive — Small (360px)
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .vx-iconbtn { width: 34px; height: 34px; border-radius: 10px; }
  .vx-iconbtn svg { width: 16px; height: 16px; }
  .vx-minimap { width: 120px; }
  .vx-minimap__canvas { height: 76px; }
}

/* --------------------------------------------------------------------------
   Reduce motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .vx-loading__mark-dot,
  .vx-loading__hint,
  .vx-tier[data-tier="platinum"]::after,
  .vx-room__name.is-fade { animation: none !important; }
  .vx-panel, .vx-hint, .vx-minimap, .vx-help-tooltip, .vx-tod { transition: none !important; }
}

/* --------------------------------------------------------------------------
   8. Minimap — fullscreen overlay
   -------------------------------------------------------------------------- */
.vx-minimap__head { position: relative; gap: 6px; }
.vx-minimap__full {
  width: 26px; height: 26px;
  background: transparent;
  border: 1px solid var(--vx-border);
  border-radius: 6px;
  color: var(--vx-text-soft);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 4px;
}
.vx-minimap__full:hover { color: var(--vx-text); border-color: var(--vx-accent-soft); }

.vx-mapfull {
  position: absolute; inset: 0;
  z-index: 30;
  background: rgba(4, 6, 12, 0.78);
  display: none;
  align-items: center; justify-content: center;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.vx-mapfull[data-open="true"] { display: flex; }
.vx-mapfull__inner {
  width: min(95vw, 1100px);
  height: 80vh;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-lg);
  box-shadow: var(--vx-shadow-2);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.vx-mapfull__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--vx-border-2);
}
.vx-mapfull__head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.vx-mapfull__hint   { font-size: 12px; color: var(--vx-text-mute); flex: 1; }
.vx-mapfull__close {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--vx-border);
  border-radius: 10px;
  color: var(--vx-text-soft);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.vx-mapfull__close:hover { color: var(--vx-text); border-color: var(--vx-accent-soft); }
.vx-mapfull__close svg { width: 16px; height: 16px; }
.vx-mapfull__body { flex: 1; padding: 14px; min-height: 0; }
.vx-mapfull__canvas {
  width: 100%; height: 100%;
  display: block;
  border-radius: 12px;
  cursor: crosshair;
  background: #0f172a;
}

/* --------------------------------------------------------------------------
   9. Mobile touch action buttons (jump / sprint / emote)
   -------------------------------------------------------------------------- */
.vx-touchbtns {
  position: absolute;
  right: 18px;
  bottom: 24px;
  z-index: 12;
  display: none;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.vx-touchbtns[aria-hidden="false"] { display: flex; }
.vx-tbtn {
  pointer-events: auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #e7ebf6;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.vx-tbtn:active, .vx-tbtn.is-active {
  transform: scale(0.93);
  background: rgba(106, 125, 255, 0.62);
  border-color: rgba(255,255,255,0.55);
}
.vx-tbtn--jump   { width: 60px; height: 60px; }
.vx-tbtn--sprint { width: 48px; height: 48px; }
.vx-tbtn--emote  { width: 48px; height: 48px; }
.vx-tbtn--sprint.is-active {
  background: #fbbf24;
  border-color: #fde68a;
  color: #1a1306;
}

/* --------------------------------------------------------------------------
   10. Mobile drawer (hamburger menu)
   -------------------------------------------------------------------------- */
.vx-burger {
  display: none;
  width: 44px; height: 44px;
  margin-left: 8px;
  background: var(--vx-glass-strong);
  border: 1px solid var(--vx-border);
  border-radius: 12px;
  color: var(--vx-text-soft);
  cursor: pointer;
  align-items: center; justify-content: center;
  pointer-events: auto;
}
.vx-burger:hover { color: var(--vx-text); border-color: var(--vx-accent-soft); }

.vx-drawer {
  position: absolute;
  top: 0; right: 0;
  width: 280px; max-width: 92vw;
  height: 100%;
  z-index: 25;
  background: var(--vx-glass-strong);
  border-left: 1px solid var(--vx-border);
  box-shadow: var(--vx-shadow-2);
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
  pointer-events: auto;
}
@supports (backdrop-filter: blur(10px)) {
  .vx-drawer { backdrop-filter: blur(var(--vx-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--vx-blur)) saturate(140%); }
}
.vx-drawer[data-open="true"] { transform: translateX(0); }
.vx-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--vx-border-2);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--vx-text-soft);
}
.vx-drawer__close {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--vx-border);
  border-radius: 10px;
  color: var(--vx-text-soft);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.vx-drawer__close svg { width: 14px; height: 14px; }
.vx-drawer__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}
.vx-drawer__body .vx-topbar__right {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.vx-drawer__body .vx-iconbtn,
.vx-drawer__body .vx-iconbtn--text {
  width: 100% !important;
  height: 48px !important;
  justify-content: flex-start;
  padding: 0 14px !important;
  border-radius: 12px !important;
}
.vx-drawer__body .vx-iconbtn__label { display: inline !important; margin-left: 10px; }
.vx-drawer__body .vx-help-tooltip { display: none !important; }

/* --------------------------------------------------------------------------
   11. Mobile tweaks (touch targets, drawer breakpoint, joystick room)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Hide topbar right side, show hamburger instead. */
  .vx-burger { display: inline-flex; }
  .vx-topbar__right { display: none; }
  /* Keep minimap visible but smaller; drop the chip overlay. */
  .vx-minimap { width: 150px; top: 56px; right: 8px; }
  .vx-minimap__canvas { height: 110px; }
  .vx-minimap__legend { display: none; }
  .vx-minimap__full   { width: 30px; height: 30px; }
  .vx-minimap__toggle { width: 30px; height: 30px; }
  /* Touch buttons: stack above joystick area on the right. */
  .vx-touchbtns { right: 14px; bottom: 26px; }
}

/* All interactive HUD targets must hit 44px minimum on mobile per a11y. */
@media (hover: none) and (pointer: coarse) {
  .vx-iconbtn, .vx-iconbtn--text { min-width: 44px; min-height: 44px; }
  .vx-minimap__toggle, .vx-minimap__full { min-width: 30px; min-height: 30px; }
  .vx-burger { min-width: 44px; min-height: 44px; }
}

/* --------------------------------------------------------------------------
   Print: hide HUD entirely
   -------------------------------------------------------------------------- */
@media print {
  .vx-hud { display: none !important; }
}
