/* HT World — world.css
   OVERLAY UI STYLES ONLY. The world itself is rendered by three.js into #gl
   (WebGL) + #css3d (CSS3DRenderer video iframes); none of the 2D world/cursor/
   station styling from Cursor Carnival lives here. This file styles the DOM
   chrome that floats over the 3D canvas: HUD, action bar, chat, panels (wear /
   help / NPC dialog), gate overlay, toast, now-playing pill and minimap.
   Visual identity carried over: indigo night, warm gold + violet accents. */

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  margin: 0;
  /* clip in BOTH axes so no overlay/host can paint a right-edge band, but allow
     vertical scroll-free layout. overflow:clip can't be scrolled to reveal a
     band the way hidden's scroll origin can. */
  overflow: clip;
  background: #0b1026;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  overscroll-behavior: none;
  touch-action: none;
  /* iOS safe areas — the world fills the notch but UI insets respect it */
  -webkit-text-size-adjust: 100%;
}
/* the 3D world owns the pointer — normal cursor everywhere */
body { cursor: auto; }
button { font-family: inherit; cursor: pointer; }

/* ================= 3D RENDER STACK ================= */
/* CSS3D video layer behind, GL canvas on top (it raycasts ground + meshes and
   carries pointer events; the video planes hole-punch through it).

   RIGHT-EDGE BLACK BAND FIX (audit): the band came from the CSS3D / screens
   host being able to extend past the viewport (its child wraps are absolutely
   positioned at projected rects that can run off-screen, and an empty host with
   a default opaque background or sub-pixel rounding leaves a sliver). Defenses:
   (1) clip these hosts to the viewport so no child sliver shows past the right
       edge; (2) force transparent background — they must NEVER paint a fill;
   (3) the host carries no pointer events. The renderer-size half of the fix
   (use clientWidth, not innerWidth rounding) lives in main3d. */
#css3d, #screens2d {
  background: transparent !important;
  overflow: clip;
}
#css3d {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
}
#gl {
  position: fixed; inset: 0;
  z-index: 1;
  /* 100% of the fixed inset:0 box — avoids 100vw, which on some browsers is
     wider than the layout viewport (scrollbar/rounding) and would itself create
     a right-edge band. */
  width: 100%; height: 100%;
  display: block;
  pointer-events: auto;
  touch-action: none;
}

/* ================= LOADING SCREEN ================= */
#loadingScreen {
  position: fixed; inset: 0; z-index: 4000;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #1a1430 0%, #0a0814 70%, #070510 100%);
  color: #f3e7c8;
  transition: opacity 0.55s ease;
}
#loadingScreen.done { opacity: 0; pointer-events: none; }
#loadingScreen .loadInner { width: min(82vw, 360px); text-align: center; }
#loadingScreen .loadEmblem {
  font: 900 28px/1 "Trebuchet MS", system-ui, sans-serif; letter-spacing: 0.22em;
  color: #ffd98a; text-shadow: 0 0 24px rgba(255, 200, 110, 0.35); margin-bottom: 20px;
}
#loadingScreen .loadTrack {
  height: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 200, 110, 0.22);
}
#loadingScreen #loadBar {
  height: 100%; width: 8%; border-radius: 999px;
  background: linear-gradient(90deg, #caa14a, #ffd98a, #fff1c8);
  box-shadow: 0 0 12px rgba(255, 200, 110, 0.5);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#loadingScreen .loadLabel {
  margin-top: 14px; font: 600 12.5px/1 system-ui, sans-serif;
  letter-spacing: 0.14em; color: rgba(243, 231, 200, 0.72); text-transform: uppercase;
}

/* ================= HUD ================= */
#hud {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  /* include the notch / Dynamic-Island inset so the clock/crowd/LEAVE pills
     never sit under the status bar on phones (bottom/left/right insets are
     handled elsewhere; top was missing). */
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  z-index: 100;
  pointer-events: none;
}
#hudLeft, #hudRight { display: flex; gap: 9px; align-items: center; }
#hud a, #hud span {
  pointer-events: auto;
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(12, 9, 28, 0.78);
  border: 1px solid rgba(140, 100, 255, 0.35);
  color: #e6dcff;
  text-decoration: none;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}
#brand { color: #ffd98a !important; border-color: rgba(255, 200, 110, 0.45) !important; }
#exitLink:hover { border-color: #ffd98a; color: #ffd98a; }
/* crowd pill: gently dimmed + amber border while the socket is reconnecting */
#crowd.offline { color: rgba(230, 220, 255, 0.6); border-color: rgba(255, 170, 90, 0.4); }

/* now-playing pill (festival stage) */
#nowPlaying {
  position: fixed;
  /* pinned to the very BOTTOM edge so it never sits in front of the avatar (centre-screen) */
  left: 50%; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 99;
  max-width: min(82vw, 520px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(12, 9, 28, 0.82);
  border: 1px solid rgba(255, 200, 110, 0.45);
  color: #ffe2aa;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
#nowPlaying:empty { display: none; }

/* ================= FOOTBALL HUD ================= */
/* score pill — sits just above the now-playing pill, same visual language */
#fbScore {
  position: fixed;
  left: 50%; bottom: 112px; transform: translateX(-50%);
  z-index: 99;
  font-size: 13px; font-weight: 800; letter-spacing: 0.1em;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(12, 9, 28, 0.82);
  border: 1px solid rgba(158, 255, 210, 0.5);
  color: #d6ffe9;
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap;
}
/* thin power-kick charge meter — only visible while Space is held near the ball */
#fbCharge {
  position: fixed;
  left: 50%; bottom: 148px; transform: translateX(-50%);
  z-index: 99;
  width: 168px; height: 7px;
  border-radius: 999px;
  background: rgba(12, 9, 28, 0.7);
  border: 1px solid rgba(255, 200, 110, 0.4);
  overflow: hidden;
  pointer-events: none;
}
#fbCharge #fbChargeFill {
  display: block; height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #9effd2, #ffd98a, #ff8a5c);
  transition: width 0.06s linear;
}

/* ================= ACTION BAR ================= */
#bar {
  position: fixed;
  /* LEFT-side vertical dock (moved off the bottom so it never covers the stage).
     Compact: a short, vertically-centred rail that WRAPS into two columns
     (max-height forces the wrap). Keep max-height ≥ ceil(N/2) rows for the FULL
     icon set (incl. the dynamic 📞 call, 🖥 share + 👥 friends ≈ 15 icons), else
     the rail spills into a cramped THIRD column. */
  left: calc(12px + env(safe-area-inset-left, 0px)); top: 50%; bottom: auto;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 6px; flex-wrap: wrap;
  justify-content: center; align-content: center;
  max-height: 400px; max-width: none;
  padding: 7px;
  border-radius: 22px;
  background: rgba(12, 9, 28, 0.82);
  border: 1px solid rgba(140, 100, 255, 0.35);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.42);
  z-index: 100;
}
#bar button {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: rgba(140, 100, 255, 0.12);
  font-size: 17px;
  color: #fff;
  transition: transform 0.12s, border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  display: grid; place-items: center;
}
#bar button:hover { border-color: #ffd98a; background: rgba(255, 200, 110, 0.16); transform: translateY(-1px); }
#bar button:active { transform: translateY(0) scale(0.96); }
#bar button.on { border-color: #ffd98a; background: rgba(255, 200, 110, 0.16); color: #ffd98a; }

/* ---- DECLUTTER: PRIMARY rail + pure-CSS OVERFLOW sheet ----
   DESKTOP (default): the overflow wrapper is display:contents so its children
   rejoin #bar's column flex/wrap exactly as before — the dock is UNCHANGED — and
   the ⋯ "More" toggle/label are hidden. The mobile block (≤760px) flips this:
   #barMore collapses behind the ⋯ button. */
#barMore { display: contents; }
.barMoreToggle { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
#barMoreBtn { display: none; }                  /* desktop: no ⋯ button */
/* the ⋯ is a <label>, not a #bar <button>, so style it to match the rail circles */
#barMoreBtn.barBtn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: rgba(140, 100, 255, 0.12);
  color: #fff;
  font-size: 17px; line-height: 1; font-weight: 800;
  cursor: pointer;
  place-items: center;
  transition: transform 0.12s, border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
#barMoreBtn.barBtn:hover { border-color: #ffd98a; background: rgba(255, 200, 110, 0.16); }
/* ⋯ goes gold + nudges up when the sheet is open, so the toggle state reads */
#barMoreToggle:checked ~ #barMoreBtn.barBtn { border-color: #ffd98a; background: rgba(255, 200, 110, 0.16); color: #ffd98a; }

/* ---- proximity voice mic ---- */
#micBtn .micGlyph { line-height: 1; }
#micBtn .liveDot {
  position: absolute; top: 6px; right: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #ff4d5e;
  border: 1.5px solid rgba(12, 9, 28, 0.9);
  opacity: 0; transform: scale(0.4);
  transition: opacity 0.16s, transform 0.16s;
  pointer-events: none;
}
/* mic enabled (permission granted, listening) — gold ring */
#micBtn.on {
  border-color: #ffd98a;
  background: rgba(255, 200, 110, 0.16);
  color: #ffd98a;
}
/* mic actively transmitting (you are speaking) — red live dot + halo */
#micBtn.live {
  border-color: #ff6b7a;
  background: rgba(255, 77, 94, 0.18);
  color: #ffd6db;
  box-shadow: 0 0 0 2px rgba(255, 77, 94, 0.28), 0 0 18px rgba(255, 77, 94, 0.4);
}
#micBtn.live .liveDot { opacity: 1; transform: scale(1); animation: liveBlink 1.1s ease-in-out infinite; }
@keyframes liveBlink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.55); }
  50%      { box-shadow: 0 0 0 5px rgba(255, 77, 94, 0); }
}
/* mic blocked / denied permission */
#micBtn.denied { opacity: 0.5; }

/* ---- Enter VR (immersive headset only) ----
   Hidden via the [hidden] attr until vr3d.js confirms an immersive-vr-capable
   device, so this never affects the 2D bar layout on phones/desktops. It is a
   labelled pill (not a 46px icon circle) to read as a distinct call-to-action;
   the override of width/border-radius is scoped to #vrBtn so the other #bar
   buttons keep their circular shape. */
#vrBtn {
  width: auto; height: 46px;
  padding: 0 16px 0 13px;
  gap: 7px;
  border-radius: 999px;
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 700; letter-spacing: 0.2px;
  color: #f3edff;
  border: 1px solid rgba(140, 100, 255, 0.55);
  background: linear-gradient(135deg, rgba(140, 100, 255, 0.32), rgba(90, 60, 200, 0.22));
  box-shadow: 0 0 0 1px rgba(140, 100, 255, 0.12) inset;
}
#vrBtn .vrGlyph { font-size: 18px; line-height: 1; }
#vrBtn .vrLabel { line-height: 1; white-space: nowrap; }
#vrBtn:hover {
  border-color: #b9a6ff;
  background: linear-gradient(135deg, rgba(160, 120, 255, 0.42), rgba(110, 80, 220, 0.3));
  color: #fff;
}
#vrBtn[hidden] { display: none; }
#vrBtn:disabled { opacity: 0.55; cursor: default; }

/* ================= CHAT INPUT ================= */
#chatForm {
  position: fixed;
  left: 50%; bottom: 74px; transform: translateX(-50%);
  z-index: 101;
  display: none;
  width: min(92vw, 420px);
}
#chatForm.open { display: block; }
#chatInput {
  width: 100%;
  padding: 13px 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 200, 110, 0.55);
  background: rgba(12, 9, 28, 0.92);
  color: #fff;
  font-size: 15px;
  outline: none;
}

/* ================= PANELS (wear / help / npc) ================= */
.panel {
  position: fixed;
  left: 50%; bottom: 80px; transform: translateX(-50%);
  width: min(94vw, 420px);
  max-height: 64vh;
  overflow-y: auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(14, 10, 32, 0.96);
  border: 1px solid rgba(140, 100, 255, 0.45);
  color: #e6dcff;
  z-index: 102;
  backdrop-filter: blur(10px);
}
.panel h3 { color: #ffd98a; font-size: 16px; letter-spacing: 0.08em; margin-bottom: 10px; }
.panel h4 {
  color: #cdb8ff; font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 8px;
}
.panel ul { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.5; }
.panel li strong { color: #ffd98a; }
.panelHint { font-size: 12px; color: rgba(230, 220, 255, 0.55); margin-top: 10px; }
#helpClose {
  margin-top: 14px;
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ffd98a, #e8a93d);
  color: #2a1c05; font-weight: 800; letter-spacing: 0.08em;
}

/* ---- wear / avatar customization ---- */
.wearSection { margin-bottom: 16px; }
.wearSection:last-of-type { margin-bottom: 0; }
/* body color swatch row (filled by avatar3d/main3d → #bodyRow) */
#bodyRow { display: flex; flex-wrap: wrap; gap: 9px; }
#bodyRow .swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(140, 100, 255, 0.4);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
#bodyRow .swatch:hover { transform: scale(1.08); }
#bodyRow .swatch.on {
  border-color: #ffd98a;
  box-shadow: 0 0 0 2px rgba(255, 200, 110, 0.35), 0 0 14px rgba(255, 200, 110, 0.45);
}
/* shirt flag/plain toggle */
#shirtToggle {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(140, 100, 255, 0.3);
  background: rgba(140, 100, 255, 0.1);
  color: #cdb8ff;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.04em;
  transition: all 0.15s;
}
#shirtToggle[aria-pressed='true'] {
  border-color: #ffd98a;
  background: rgba(255, 200, 110, 0.14);
  color: #ffd98a;
}
/* gear grid (filled by avatar3d/main3d → #wearGrid) */
#wearGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wearItem {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 1px solid rgba(140, 100, 255, 0.3);
  background: rgba(140, 100, 255, 0.08);
  font-size: 22px;
  color: #cdb8ff;
  cursor: pointer;
}
.wearItem small { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; }
.wearItem.on { border-color: #ffd98a; background: rgba(255, 200, 110, 0.14); color: #ffd98a; }
.wearItem.locked { opacity: 0.38; cursor: not-allowed; }

/* ---- NPC dialog (vendors + Guru robot chat) ---- */
#npcDialog {
  width: min(94vw, 440px);
  max-height: 70vh;
  display: flex; flex-direction: column;
  padding: 0;
  overflow: hidden;
}
#npcHeader {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(140, 100, 255, 0.3);
  background: rgba(20, 12, 40, 0.6);
}
#npcAvatar {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(140, 100, 255, 0.35), rgba(20, 12, 40, 0.9));
  border: 1px solid rgba(255, 200, 110, 0.4);
}
#npcName { flex: 1 1 auto; margin: 0; font-size: 15px; }
#npcClose {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(140, 100, 255, 0.35);
  background: rgba(140, 100, 255, 0.12);
  color: #cdb8ff;
  font-size: 14px; line-height: 1;
}
#npcClose:hover { border-color: #ffd98a; color: #ffd98a; }
#npcLog {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13.5px; line-height: 1.45;
  min-height: 90px;
}
#npcLog .msg {
  max-width: 86%;
  padding: 9px 13px;
  border-radius: 14px;
  word-break: break-word; white-space: pre-wrap;
  animation: bubbleIn 0.18s ease;
}
#npcLog .msg.bot {
  align-self: flex-start;
  background: rgba(140, 100, 255, 0.14);
  border: 1px solid rgba(140, 100, 255, 0.3);
  color: #e6dcff;
  border-bottom-left-radius: 3px;
}
#npcLog .msg.me {
  align-self: flex-end;
  background: rgba(255, 200, 110, 0.16);
  border: 1px solid rgba(255, 200, 110, 0.4);
  color: #ffe9c4;
  border-bottom-right-radius: 3px;
}
#npcLog .msg.typing { color: rgba(205, 184, 255, 0.65); font-style: italic; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; } }
#npcForm {
  flex: 0 0 auto;
  display: flex; gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(140, 100, 255, 0.3);
  background: rgba(20, 12, 40, 0.6);
}
/* vendor NPCs have no chat input — main3d hides the form for canned-line NPCs */
#npcForm.hidden { display: none; }
#npcInput {
  flex: 1 1 auto;
  padding: 11px 16px;
  border-radius: 999px;
  border: 2px solid rgba(255, 200, 110, 0.5);
  background: rgba(12, 9, 28, 0.92);
  color: #fff;
  font-size: 14px;
  outline: none;
}
#npcSend {
  flex: 0 0 auto;
  width: 44px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #ffd98a, #e8983d);
  color: #2a1c05;
  font-size: 16px; font-weight: 800;
}
#npcSend:hover { filter: brightness(1.08); }

/* ================= MINIMAP =================
   The canvas bitmap is a FIXED 232×130 (index.html) drawn by map3d.js'
   drawMinimap() at that intrinsic resolution. Its ON-SCREEN size is purely CSS
   here: desktop shows it ~232×130; the mobile block below shrinks it to a tidy
   compact square dial. Tapping the wrapper opens the big map (wired in main3d). */
#miniMap {
  position: fixed;
  right: 14px; bottom: 76px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(12, 9, 28, 0.85);
  border: 1px solid rgba(140, 100, 255, 0.4);
  z-index: 100;
}
#miniCanvas { display: block; border-radius: 7px; }

/* ================= GATE OVERLAY ================= */
#gateOverlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 5, 18, 0.78);
  backdrop-filter: blur(5px);
  z-index: 200;
  cursor: auto;
}
#gateCard {
  width: min(92vw, 460px);
  max-height: min(92vh, 760px);
  overflow-y: auto;
  padding: 38px 30px;
  text-align: center;
  border-radius: 26px;
  background: linear-gradient(180deg, #1d1438, #140e2a);
  border: 2px solid rgba(255, 200, 110, 0.4);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(122, 60, 255, 0.25);
  transition: width 0.3s ease;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 100, 255, 0.5) transparent;
}
#gateCard::-webkit-scrollbar { width: 8px; }
#gateCard::-webkit-scrollbar-thumb { background: rgba(140, 100, 255, 0.45); border-radius: 8px; }
/* avatar + customize steps want more room for the rail/grid */
body[data-onboarding="avatar"]    #gateCard { width: min(94vw, 560px); padding: 30px 26px; }
body[data-onboarding="customize"] #gateCard { width: min(95vw, 640px); padding: 30px 26px; }

/* ===== EA-style step machine: show exactly one .gateStep =====
   body[data-onboarding] selects the active step; if the attribute is missing
   (older main3d that only knows the hero gate) the hero step shows by default. */
.gateStep { animation: gateStepIn 0.32s cubic-bezier(0.2, 0.8, 0.25, 1) both; }
.gateStep[hidden] { display: none !important; }
@keyframes gateStepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
#gateArt {
  width: 148px; height: 148px;
  border-radius: 50%;
  object-fit: cover;
  transform: scale(1.0);
  margin: 0 auto 14px;
  display: block;
  box-shadow: 0 0 50px rgba(255, 200, 110, 0.45), 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 3px solid rgba(255, 200, 110, 0.55);
}
#gateWorld {
  font-family: Georgia, serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.42em; text-indent: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 217, 138, 0.82);
  margin: 2px 0 4px;
  text-shadow: 0 0 18px rgba(255, 200, 110, 0.4);
}
#gateTitle {
  font-family: Georgia, serif;
  font-size: 44px; letter-spacing: 0.06em;
  color: #ffd98a;
  text-shadow: 0 0 30px rgba(255, 200, 110, 0.5);
}
#gateSub { color: #cdb8ff; font-size: 14.5px; margin: 8px 0 22px; }
#gateEnter {
  padding: 15px 38px;
  font-size: 16px; font-weight: 800; letter-spacing: 0.1em;
  border: none; border-radius: 999px;
  background: linear-gradient(135deg, #ffd98a, #e8983d);
  color: #2a1c05;
  box-shadow: 0 8px 30px rgba(255, 180, 80, 0.35);
  cursor: pointer;
}
#gateEnter:hover { filter: brightness(1.08); }
#gateNote { margin-top: 14px; font-size: 12px; color: rgba(205, 184, 255, 0.65); min-height: 16px; }
#gateLinks { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
#gateLinks a {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(140, 100, 255, 0.45);
  color: #cdb8ff;
  text-decoration: none;
}
#gateLinks a:hover { border-color: #ffd98a; color: #ffd98a; }
/* on the avatar/customize steps the bottom links are quieter (nav has Back) */
body[data-onboarding="avatar"] #gateLinks,
body[data-onboarding="customize"] #gateLinks { margin-top: 12px; opacity: 0.62; }

/* ================= PAUSE MENU (clean centered modal) =================
   A true modal overlay distinct from the onboarding gate. Sits above every
   panel but below the toast, dims+blurs the world behind it, and freezes
   movement (main3d sets `paused`, isUiOpen() returns true). */
#pauseMenu {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(6, 4, 16, 0.62);
  backdrop-filter: blur(7px);
  z-index: 204;                /* above panels (≤103) + map, below toast (210) */
  cursor: auto;
  animation: pauseFade 0.2s ease both;
}
#pauseMenu[hidden] { display: none !important; }
@keyframes pauseFade { from { opacity: 0; } to { opacity: 1; } }
#pauseCard {
  width: min(92vw, 400px);
  max-height: 92vh; overflow-y: auto;
  padding: 30px 28px 24px;
  text-align: center;
  border-radius: 24px;
  background: linear-gradient(180deg, #1d1438, #130d28);
  border: 1.5px solid rgba(255, 200, 110, 0.4);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 60px rgba(122, 60, 255, 0.22);
  animation: pauseCardIn 0.26s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
@keyframes pauseCardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#pauseBrand {
  font-size: 11px; font-weight: 800; letter-spacing: 0.22em;
  color: #ffd98a; opacity: 0.85; margin-bottom: 8px;
}
#pauseTitle {
  font-family: Georgia, serif;
  font-size: 32px; letter-spacing: 0.04em;
  color: #ffd98a; text-shadow: 0 0 24px rgba(255, 200, 110, 0.42);
  margin-bottom: 6px;
}
#pauseSub { color: #cdb8ff; font-size: 13px; line-height: 1.5; margin: 0 0 20px; }
#pauseSub b { color: #ffd98a; }
.pauseActions { display: flex; flex-direction: column; gap: 10px; }
.pauseBtn {
  display: block; width: 100%;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(140, 100, 255, 0.4);
  background: rgba(140, 100, 255, 0.1);
  color: #e6dcff;
  font-size: 14.5px; font-weight: 800; letter-spacing: 0.04em;
  text-decoration: none; text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.12s;
}
.pauseBtn:hover { border-color: #ffd98a; color: #ffd98a; background: rgba(255, 200, 110, 0.12); transform: translateY(-1px); }
.pauseBtn:active { transform: translateY(0) scale(0.98); }
.pausePrimary {
  border: none;
  background: linear-gradient(135deg, #ffd98a, #e8983d);
  color: #2a1c05;
  box-shadow: 0 8px 26px rgba(255, 180, 80, 0.32);
}
.pausePrimary:hover { filter: brightness(1.08); color: #2a1c05; background: linear-gradient(135deg, #ffd98a, #e8983d); }
.pauseLeaveBtn { color: rgba(230, 220, 255, 0.7); border-color: rgba(140, 100, 255, 0.28); }
.pauseLeaveBtn:hover { border-color: rgba(255, 130, 110, 0.6); color: #ffb4a4; background: rgba(255, 90, 70, 0.1); }
.pauseHint { font-size: 11.5px; color: rgba(205, 184, 255, 0.55); margin-top: 16px; }

/* dim + slightly desaturate the live world while paused (the modal blurs it too,
   but this keeps the GL/CSS3D stack visibly "frozen" behind the card). */
body.paused-blur #gl,
body.paused-blur #css3d { filter: brightness(0.55) saturate(0.8); transition: filter 0.2s ease; }

/* ================= ONBOARDING — shared step chrome ================= */
.gateHead {
  font-family: Georgia, serif;
  font-size: 27px; letter-spacing: 0.03em;
  color: #ffd98a;
  text-shadow: 0 0 22px rgba(255, 200, 110, 0.4);
  margin-bottom: 4px;
}
.gateHeadSub { color: #cdb8ff; font-size: 13.5px; margin: 0 0 16px; line-height: 1.45; }
.gateMeta { margin-top: 14px; font-size: 12px; color: rgba(205, 184, 255, 0.6); line-height: 1.5; }
.gatePrimary {
  padding: 14px 32px;
  font-size: 15px; font-weight: 800; letter-spacing: 0.08em;
  border: none; border-radius: 999px;
  background: linear-gradient(135deg, #ffd98a, #e8983d);
  color: #2a1c05;
  box-shadow: 0 8px 26px rgba(255, 180, 80, 0.32);
  cursor: pointer;
  transition: filter 0.15s, transform 0.12s;
}
.gatePrimary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.gatePrimary:active { transform: translateY(0) scale(0.98); }
.gatePrimary[disabled] { opacity: 0.4; cursor: not-allowed; filter: none; transform: none; }
.gateBig { padding: 16px 44px; font-size: 16px; letter-spacing: 0.1em; }
.gateGhost {
  padding: 13px 24px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  border-radius: 999px;
  border: 1px solid rgba(140, 100, 255, 0.45);
  background: rgba(140, 100, 255, 0.08);
  color: #cdb8ff;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.gateGhost:hover { border-color: #ffd98a; color: #ffd98a; background: rgba(255, 200, 110, 0.1); }
.gateNav { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 20px; }
.gateNavStack { flex-direction: column; }
.gateNavStack .gatePrimary, .gateNavStack .gateGhost { width: 100%; }
.gateArtSm {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 10px; display: block;
  border: 2px solid rgba(255, 200, 110, 0.5);
  box-shadow: 0 0 30px rgba(255, 200, 110, 0.35);
}
.authNote { margin-top: 12px; font-size: 12px; color: rgba(160, 220, 170, 0.8); min-height: 0; }
.authNote:empty { display: none; }
.gateNote { margin-top: 12px; font-size: 12px; color: rgba(205, 184, 255, 0.65); min-height: 0; }
.gateNote:empty { margin-top: 0; }

/* ---- avatar live-preview stage ---- */
.avatarStage {
  position: relative;
  width: 100%;
  display: grid; place-items: center;
  margin: 0 auto 14px;
}
.avatarStage canvas {
  display: block;
  width: min(82vw, 320px); height: auto;
  max-height: 46vh;
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 50% 18%, rgba(140, 100, 255, 0.22), transparent 62%),
    linear-gradient(180deg, #160f30, #0d0922);
  border: 1px solid rgba(140, 100, 255, 0.32);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}
.avatarStageSm canvas { width: min(60vw, 220px); max-height: 38vh; border-radius: 16px; }
.previewGlow {
  position: absolute; inset: auto 0 8px 0; height: 26px; margin: 0 auto;
  width: 60%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 200, 110, 0.35), transparent 70%);
  filter: blur(4px); pointer-events: none;
}

/* ---- gender filter chips ---- */
.genderChips { display: flex; gap: 8px; justify-content: center; margin: 0 0 14px; flex-wrap: wrap; }
.genderChip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(140, 100, 255, 0.4);
  background: rgba(140, 100, 255, 0.08);
  color: #cdb8ff;
  font-size: 12px; font-weight: 800; letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.genderChip:hover { border-color: rgba(255, 200, 110, 0.6); color: #ffe9c4; }
.genderChip.is-on, .genderChip[aria-selected="true"] {
  border-color: #ffd98a; color: #2a1c05;
  background: linear-gradient(135deg, #ffd98a, #e8b85a);
}

/* ---- character card rail ---- */
.charRail {
  display: flex; gap: 10px;
  overflow-x: auto; overflow-y: hidden;
  padding: 6px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 100, 255, 0.5) transparent;
}
.charRail::-webkit-scrollbar { height: 6px; }
.charRail::-webkit-scrollbar-thumb { background: rgba(140, 100, 255, 0.4); border-radius: 6px; }
.charCard {
  position: relative;
  flex: 0 0 auto;
  width: 92px; min-height: 116px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 16px;
  border: 1.5px solid rgba(140, 100, 255, 0.3);
  background: rgba(140, 100, 255, 0.07);
  color: #cdb8ff;
  cursor: pointer;
  scroll-snap-align: center;
  transition: transform 0.14s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.charCard:hover { transform: translateY(-2px); border-color: rgba(255, 200, 110, 0.55); }
.charCard .charThumb {
  width: 60px; height: 60px; border-radius: 12px;
  object-fit: cover; display: block;
  background: radial-gradient(circle at 50% 35%, rgba(140, 100, 255, 0.3), rgba(13, 9, 34, 0.9));
  border: 1px solid rgba(140, 100, 255, 0.3);
  font-size: 30px; line-height: 60px; text-align: center;
}
.charCard .charName { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.charCard[hidden] { display: none !important; }
/* animated selection ring */
.charCard.is-selected {
  border-color: transparent;
  background: rgba(255, 200, 110, 0.12);
  color: #ffe9c4;
  box-shadow: 0 6px 22px rgba(255, 180, 80, 0.28);
}
.charCard.is-selected::after {
  content: '';
  position: absolute; inset: -2px;
  border-radius: 18px;
  padding: 2px;
  background: conic-gradient(from 0deg, #ffd98a, #b07bff, #ffd98a, #e8983d, #ffd98a);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ringSpin 4s linear infinite;
  pointer-events: none;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }
.charCard.is-selected .charName { color: #ffd98a; }

/* ---- customize step ---- */
.customizePanel { display: flex; gap: 18px; align-items: flex-start; text-align: left; }
.custCol { display: flex; flex-direction: column; gap: 14px; }
.custColPreview { flex: 0 0 auto; align-items: center; }
.custColControls { flex: 1 1 auto; min-width: 0; }
.custGroup { display: flex; flex-direction: column; gap: 8px; }
.custGroup h4 {
  color: #cdb8ff; font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; margin: 0;
}
.swatchRow { display: flex; flex-wrap: wrap; gap: 9px; }
.swatchRow .swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid rgba(140, 100, 255, 0.4);
  cursor: pointer; padding: 0;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.swatchRow .swatch:hover { transform: scale(1.08); }
.swatchRow .swatch.on, .swatchRow .swatch[aria-checked="true"] {
  border-color: #ffd98a;
  box-shadow: 0 0 0 2px rgba(255, 200, 110, 0.35), 0 0 14px rgba(255, 200, 110, 0.45);
}
.gearRail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gearRail .gearItem {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px;
  border-radius: 12px;
  border: 1px solid rgba(140, 100, 255, 0.3);
  background: rgba(140, 100, 255, 0.08);
  font-size: 20px; color: #cdb8ff; cursor: pointer;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
}
.gearRail .gearItem small { font-size: 9px; font-weight: 700; letter-spacing: 0.05em; }
.gearRail .gearItem:hover { border-color: rgba(255, 200, 110, 0.5); }
.gearRail .gearItem.on { border-color: #ffd98a; background: rgba(255, 200, 110, 0.14); color: #ffd98a; }

/* ---- returning-user continue card ---- */
.continueCard {
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  padding: 12px 14px; margin: 6px auto 4px;
  border-radius: 18px;
  border: 1px solid rgba(140, 100, 255, 0.35);
  background: rgba(140, 100, 255, 0.08);
  width: fit-content; max-width: 100%;
}
.continueCard canvas {
  flex: 0 0 auto;
  width: 96px; height: 120px; border-radius: 12px;
  background: linear-gradient(180deg, #160f30, #0d0922);
  border: 1px solid rgba(140, 100, 255, 0.3);
}
.continueMeta { display: flex; flex-direction: column; gap: 3px; }
.continueLabel { color: #ffd98a; font-size: 16px; font-weight: 800; letter-spacing: 0.03em; }
.continueHint { color: rgba(205, 184, 255, 0.7); font-size: 12px; }

/* ================= CONTROLS HINT (bottom-left, fades) ================= */
#controlsHint {
  position: fixed;
  left: calc(14px + env(safe-area-inset-left, 0px));
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  z-index: 99;
  display: flex; flex-wrap: wrap; gap: 6px; max-width: min(48vw, 340px);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}
#controlsHint.fade { opacity: 0; }
#controlsHint[hidden] { display: none; }
.ctlChip {
  font-size: 10.5px; letter-spacing: 0.04em;
  color: #cdb8ff;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 9, 28, 0.7);
  border: 1px solid rgba(140, 100, 255, 0.28);
  backdrop-filter: blur(5px);
  white-space: nowrap;
}
.ctlChip b { color: #ffd98a; font-weight: 800; }
/* Show keyboard chips on a fine pointer, touch/joystick chips on a coarse
   (touch) pointer — this is how phones learn the drag-left-to-move joystick. */
.ctlTouch { display: none; }
@media (pointer: coarse) {
  .ctlDesktop { display: none; }
  .ctlTouch { display: inline-block; }
}

/* ================= MOBILE JUMP BUTTON ================= */
#jumpBtn {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  z-index: 101;
  width: 72px; height: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 110, 0.45);
  background: rgba(20, 12, 40, 0.78);
  color: #ffd98a;
  font-size: 26px; line-height: 1;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s, background 0.15s;
}
#jumpBtn small { font-size: 9px; font-weight: 800; letter-spacing: 0.1em; }
#jumpBtn:active { transform: scale(0.92); background: rgba(255, 200, 110, 0.2); }
#jumpBtn[hidden] { display: none !important; }

/* ================= BIG MAP PANEL ================= */
.bigPanel {
  width: min(96vw, 760px) !important;
  max-width: 96vw;
  max-height: min(86vh, 720px);
  padding: 16px !important;
  left: 50%; top: 50%; bottom: auto;
  transform: translate(-50%, -50%) !important;
}
.bigMapHead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.bigMapHead h3 { margin: 0; }
.bigMapTools { display: flex; gap: 8px; align-items: center; }
#recenterBtn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(140, 100, 255, 0.45);
  background: rgba(140, 100, 255, 0.1);
  color: #cdb8ff;
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
#recenterBtn:hover { border-color: #ffd98a; color: #ffd98a; background: rgba(255, 200, 110, 0.12); }
#bigMapClose, #settingsClose {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(140, 100, 255, 0.35);
  background: rgba(140, 100, 255, 0.12);
  color: #cdb8ff;
  font-size: 14px; line-height: 1; cursor: pointer;
}
#bigMapClose:hover, #settingsClose:hover { border-color: #ffd98a; color: #ffd98a; }
#bigMapStage {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(140, 100, 255, 0.3);
  background: linear-gradient(180deg, #11193a, #0c1230);
  touch-action: none;   /* the map handles its own pan/zoom */
}
#bigMapCanvas {
  display: block;
  width: 100%; height: auto;
  cursor: grab;
}
#bigMapCanvas:active { cursor: grabbing; }

/* ================= SETTINGS PANEL ================= */
#settingsPanel { width: min(94vw, 420px); }
.setRow {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(140, 100, 255, 0.16);
}
.setRow:last-of-type { border-bottom: none; }
.setLabel { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.setName { color: #e6dcff; font-size: 14px; font-weight: 700; }
.setSub { color: rgba(205, 184, 255, 0.55); font-size: 11.5px; }
.setToggle {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(140, 100, 255, 0.4);
  background: rgba(140, 100, 255, 0.1);
  color: #cdb8ff;
  font-size: 13px; font-weight: 800; letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.setToggle:hover { border-color: rgba(255, 200, 110, 0.55); color: #ffe9c4; }
.setToggle[aria-pressed="true"] {
  border-color: #ffd98a;
  background: rgba(255, 200, 110, 0.16);
  color: #ffd98a;
}
/* quality toggle reads its current mode from data-quality for clarity */
#qualityToggle[data-quality="low"] { color: #cdb8ff; background: rgba(140, 100, 255, 0.1); border-color: rgba(140, 100, 255, 0.4); }

/* slider rows (camera sensitivity + field of view share the same look) */
.setSensRow { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
#sensRange, #fovRange {
  width: 132px; height: 4px;
  -webkit-appearance: none; appearance: none;
  border-radius: 999px;
  background: rgba(140, 100, 255, 0.3);
  outline: none; cursor: pointer;
}
#sensRange::-webkit-slider-thumb, #fovRange::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd98a, #e8a93d);
  border: none; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
#sensRange::-moz-range-thumb, #fovRange::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #ffd98a, #e8a93d);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.setSensVal { min-width: 42px; text-align: right; color: #ffd98a; font-size: 12.5px; font-weight: 800; }

/* stacked rows (tray sits under its label, full width) */
.setRowStack { flex-direction: column; align-items: stretch; gap: 10px; }
.setRowStack .setLabel { text-align: left; }

/* emote / dance tray */
.emoteTray { display: flex; flex-wrap: wrap; gap: 7px; }
.emoteTray .trayBtn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(140, 100, 255, 0.4);
  background: rgba(140, 100, 255, 0.12);
  font-size: 18px; color: #fff; cursor: pointer;
  display: grid; place-items: center;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.emoteTray .trayBtn:hover { border-color: #ffd98a; background: rgba(255, 200, 110, 0.16); transform: translateY(-1px); }
.emoteTray .trayBtn:active { transform: scale(0.94); }
.emoteTray .trayDance {
  border-color: rgba(255, 200, 110, 0.5);
  background: rgba(255, 200, 110, 0.14);
}

/* fast-travel tray */
.travelTray { display: flex; flex-wrap: wrap; gap: 7px; }
.travelBtn {
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid rgba(140, 100, 255, 0.4);
  background: rgba(140, 100, 255, 0.1);
  color: #cdb8ff; font-size: 12.5px; font-weight: 700; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.travelBtn:hover { border-color: #ffd98a; color: #ffe9c4; background: rgba(255, 200, 110, 0.14); }
.travelBtn:active { transform: scale(0.97); }

/* ================= PHOTO PANEL ================= */
#photoPanel { width: min(94vw, 420px); }
#photoPreview {
  margin: 8px 0 12px;
  display: grid; place-items: center;
}
#photoPreview img {
  max-width: 100%; max-height: 52vh;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}
.photoActions { display: flex; gap: 10px; justify-content: center; }
.photoActions .setToggle { min-width: 110px; }
.photoActions .photoPrimary {
  border-color: #ffd98a; background: rgba(255, 200, 110, 0.18); color: #ffe9c4;
}
.photoActions .photoPrimary:hover { background: rgba(255, 200, 110, 0.28); }

/* ================= TOAST ================= */
#toast {
  position: fixed;
  left: 50%; top: 64px; transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(12, 9, 28, 0.94);
  border: 1px solid rgba(255, 200, 110, 0.55);
  color: #ffd98a;
  font-size: 13px; font-weight: 700;
  z-index: 210;
  white-space: nowrap;
}

/* ================= UNIVERSAL INTERACT PROMPT =================
   Screen-space "Press E · Tap to <action>" card. Sits just above the action
   bar, pointer-clickable (mobile tap), but does NOT block movement. */
#interactPrompt {
  position: fixed;
  /* bottom edge, above the now-playing pill — never over the avatar (centre-screen) */
  left: 50%; bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 103;
  display: inline-flex; align-items: center; gap: 10px;
  max-width: min(90vw, 460px);
  padding: 10px 16px 10px 11px;
  border-radius: 999px;
  background: rgba(12, 9, 28, 0.92);
  border: 1px solid rgba(255, 200, 110, 0.55);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 200, 110, 0.14);
  color: #ffe9c4;
  font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
  animation: ipIn 0.18s ease;
}
#interactPrompt[hidden] { display: none !important; }
#interactPrompt:hover { border-color: #ffd98a; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 200, 110, 0.26); }
#interactPrompt:active { transform: translateX(-50%) scale(0.97); }
#interactPrompt .ipKey {
  flex: 0 0 auto;
  min-width: 26px; height: 26px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffd98a, #e8a93d);
  color: #2a1c05;
  font-size: 13px; font-weight: 900; letter-spacing: 0.04em;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}
#interactPrompt .ipLabel {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@keyframes ipIn { from { opacity: 0; transform: translateX(-50%) translateY(6px); } to { opacity: 1; transform: translateX(-50%); } }

/* EXIT-TOWER button — appears only while aboard the glass lift / on the observation deck. */
#exitTowerBtn {
  position: fixed;
  left: 50%; bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 106;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 120, 138, 0.7);
  background: rgba(28, 12, 20, 0.92);
  color: #ffd9de;
  font: 700 13px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 77, 94, 0.25);
}
#exitTowerBtn[hidden] { display: none !important; }
#exitTowerBtn:hover { border-color: #ff9aa8; background: rgba(40, 16, 26, 0.95); color: #fff; }
#exitTowerBtn:active { transform: translateX(-50%) scale(0.97); }

/* ============== RELEASE-BALLOON button =============
   Contextual pill shown only while holding a balloon (same DOM/visibility
   pattern as #exitTowerBtn). Sits a row above it so the two never overlap. */
#releaseBalloonBtn {
  position: fixed;
  left: 50%; bottom: calc(124px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 106;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 120, 180, 0.7);
  background: rgba(30, 12, 24, 0.92);
  color: #ffd6ea;
  font: 700 13px/1 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 45, 120, 0.25);
}
#releaseBalloonBtn[hidden] { display: none !important; }
#releaseBalloonBtn:hover { border-color: #ff9ac6; background: rgba(44, 16, 32, 0.95); color: #fff; }
#releaseBalloonBtn:active { transform: translateX(-50%) scale(0.97); }

/* ================= PER-SCREEN AUDIO BADGE =================
   Small pill under the now-playing line: "🔊 hearing the stage" /
   "🔇 stage muted". Informational + pointer-transparent — never blocks. */
#screenAudioBadge {
  position: fixed;
  left: 50%; bottom: 50px; transform: translateX(-50%);
  z-index: 99;
  max-width: min(86vw, 560px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(12, 9, 28, 0.78);
  border: 1px solid rgba(140, 100, 255, 0.35);
  color: #cdb8ff;
  backdrop-filter: blur(6px);
  pointer-events: none;
  transition: color 0.18s, border-color 0.18s;
}
#screenAudioBadge[hidden] { display: none !important; }
/* hearing → warm gold; muted → cool violet (default above) */
#screenAudioBadge.hearing { color: #ffe2aa; border-color: rgba(255, 200, 110, 0.45); }

/* ================= VOICE "CONNECTED WITH N" INDICATOR =================
   Fixed top-right under the crowd pill; pulses gently while linked.
   Informational only — does NOT enter isUiOpen(). */
#voiceLink {
  position: fixed;
  top: 56px; right: 16px;
  z-index: 100;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(20, 8, 12, 0.82);
  border: 1px solid rgba(255, 120, 138, 0.5);
  color: #ffd6db;
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.4);
  animation: voiceLinkPulse 1.8s ease-in-out infinite;
}
#voiceLink[hidden] { display: none !important; }
@keyframes voiceLinkPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(255, 77, 94, 0); }
}

/* ================= VOICE CONSENT PROMPT (talk request) =================
   "NAME wants to talk · Accept / Decline". Sits above the action bar; the
   buttons are real clicks but the card never enters isUiOpen(). */
#talkPrompt {
  position: fixed;
  /* sits just ABOVE the now-playing pill at the bottom edge — never over the avatar.
     Smaller than before but high-contrast (strong border + shadow below) so it stays clear. */
  left: 50%; bottom: calc(42px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 205;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  max-width: min(90vw, 440px);
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(14, 10, 32, 0.96);
  border: 1px solid rgba(255, 120, 138, 0.55);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 77, 94, 0.22);
  color: #fff0f1;
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em;
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
  animation: ipIn 0.18s ease;
}
#talkPrompt[hidden] { display: none !important; }
#talkPrompt #talkPromptGlyph { font-size: 17px; line-height: 1; }
#talkPrompt .talkText { flex: 1 1 auto; min-width: 120px; }
#talkPrompt .talkBtns { display: inline-flex; gap: 8px; flex: 0 0 auto; }
.talkBtn {
  pointer-events: auto;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, filter 0.12s, background 0.12s, border-color 0.12s;
}
.talkBtn:active { transform: scale(0.96); }
.talkAccept {
  background: linear-gradient(135deg, #8fe39a, #34c759);
  color: #07260f;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
}
.talkAccept:hover { filter: brightness(1.06); }
.talkDecline {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  color: #f0e6ea;
}
.talkDecline:hover { border-color: rgba(255, 120, 138, 0.6); background: rgba(255, 77, 94, 0.12); }

/* ---- NPC dialog action button (vendors: give / open / link / chat) ---- */
.npcActions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.npcAction {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 110, 0.55);
  background: linear-gradient(135deg, #ffd98a, #e8a93d);
  color: #2a1c05;
  font-size: 13.5px; font-weight: 800; letter-spacing: 0.03em;
  cursor: pointer;
  transition: filter 0.15s, transform 0.12s;
}
.npcAction:hover { filter: brightness(1.06); }
.npcAction:active { transform: scale(0.97); }

/* ================= MOBILE ================= */
@media (max-width: 760px) {
  /* Tighten the top HUD so LEAVE · brand · clock · crowd all fit a phone width
     (the crowd pill also switches to a compact "👥 N" form in JS). */
  #hud { padding: calc(10px + env(safe-area-inset-top, 0px)) 11px 10px; }
  #hudLeft, #hudRight { gap: 5px; }
  /* Action rail → RIGHT edge on phones. The LEFT half of the screen is the
     movement joystick zone (drag to walk), so the buttons must not sit on top
     of it; on the right they're in thumb reach and only share space with the
     less-critical orbit/look zone. Anchored a little above centre so the 2-col
     wrap clears the bottom-right jump button + mini-map. */
  /* THUMB-FIRST RAIL: on phones #bar shows only the ~5 PRIMARY circular buttons
     (💬 · ❤️ · 🎙 · 🗺 · ⋯) as a single tidy column anchored mid-right — clearly
     ABOVE the bottom-right jump/kick cluster and CLEAR of the left-side movement
     joystick zone. The secondary actions live in #barMore behind the ⋯ toggle. */
  #bar {
    left: auto;
    right: calc(10px + env(safe-area-inset-right, 0px));
    top: auto;
    bottom: calc(200px + env(safe-area-inset-bottom, 0px));   /* sits above the jump (top ~192) + kick cluster */
    transform: none;
    flex-wrap: nowrap;                 /* one clean column, no 2-col wrap on mobile */
    max-height: none;
  }
  #bar { gap: 7px; padding: 7px; }
  /* ≥44px tap targets (Apple HIG) for every rail control on mobile */
  #bar button { width: 44px; height: 44px; font-size: 18px; }
  #barMoreBtn.barBtn { display: grid; width: 44px; height: 44px; font-size: 22px; }
  /* 🖥 SCREEN-SHARE is a desktop / Meeting-Hall feature — you share a screen onto
     the hall wall while seated at a meeting, never as a phone thumb action. main3d
     ALWAYS injects #shareBtn as a direct #bar child beside 🎙 (it can't be hidden
     from JS here — it's keystone, and SCREEN_SHARE_OPEN_TO_ALL=true keeps it
     un-dimmed, so an aria-disabled selector wouldn't catch it). Hiding it on mobile
     keeps the PRIMARY thumb rail at ≤6 controls (💬 · ❤️ · 📞 · 🎙 · 🗺 · ⋯). Meeting
     screen-share stays fully available on desktop, where the dock is unchanged. */
  #bar #shareBtn { display: none !important; }

  /* OVERFLOW SHEET: hidden by default; the ⋯ checkbox reveals it as a tidy
     grouped cluster that grows upward from the ⋯, never exceeding ~60vh.
     #barMore is display:contents on desktop, so re-establish it as a real flex
     container here (column of circular buttons) for the collapsed/expanded UI. */
  /* The sheet floats just ABOVE the primary rail and grows UPWARD. A 2-WIDE grid
     (not a single column) is REQUIRED: the rail is bottom-anchored high enough to
     clear the jump button, so a 9-button single column would overrun the top of
     the viewport (and worse once main3d injects 📞/🖥 into the primary rail). A
     2-col grid keeps it ~5 rows / ~60vh — fully on-screen. */
  #barMore {
    display: none;
    /* VIEWPORT-anchored (fixed), NOT relative to #bar — so it can never overrun
       the top of the screen when main3d injects 📞/🖥 and the primary rail grows
       taller (that would push a rail-relative sheet off-screen). Pinned just LEFT
       of the primary rail (so the two never overlap), sharing the rail's bottom
       so it clears the jump/kick cluster; grows up; max-height + scroll cap it. */
    position: fixed;
    right: calc(72px + env(safe-area-inset-right, 0px));   /* clear of the ~58px rail */
    bottom: calc(200px + env(safe-area-inset-bottom, 0px));
    grid-template-columns: repeat(2, 44px);
    justify-content: center;
    gap: 7px;
    padding: 8px;
    max-height: min(60vh, calc(100dvh - 240px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    border-radius: 22px;
    background: rgba(12, 9, 28, 0.92);
    border: 1px solid rgba(140, 100, 255, 0.35);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.46);
    transform: translateY(8px) scale(0.96);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
  }
  #barMoreToggle:checked ~ #barMore {
    display: grid;
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  /* the VR pill spans both columns when present so its label isn't squashed */
  #barMore #vrBtn { grid-column: 1 / -1; justify-self: center; }
  /* keep the VR pill labelled even on narrow screens (only ever shown on an
     immersive-vr-capable device; the icon-circle width rule above must not
     squash it). */
  #vrBtn { width: auto; height: 44px; padding: 0 13px 0 11px; font-size: 13px; }
  #hud a, #hud span { font-size: 9.5px; padding: 7px 10px; }
  #nowPlaying { max-width: 60vw; bottom: 74px; }

  /* BOTTOM-RIGHT ACTION CLUSTER (mobile): the football KICK button (injected by
     football3d.js with inline right:20px;bottom:24px, 92×92 → its top edge is at
     ~116px) and #jumpBtn must stack vertically with a clear gap and never
     overlap each other or the left-side joystick. Lift #jumpBtn so its 72px body
     sits ABOVE the KICK button with a ≥12px gap (116 + 12 = 128px), and slim it
     to 64px so the cluster stays compact in the right thumb zone. */
  #jumpBtn {
    width: 64px; height: 64px;
    font-size: 23px;
    right: calc(20px + env(safe-area-inset-right, 0px));
    bottom: calc(128px + env(safe-area-inset-bottom, 0px));
  }
  #gateTitle { font-size: 34px; }
  .gateHead { font-size: 23px; }
  /* ---- TINY corner minimap (the user ask: "small and tiny and openable") ----
     The bitmap stays 232×130 (index.html) and map3d still draws the full dial;
     here we shrink the DISPLAY to a compact ~84px SQUARE and crop the canvas'
     horizontal dead-bands so it reads as a tidy dial, not a wide disc. The dial
     is centred in the bitmap (cx=w/2, r=65 → the visible content is the central
     130×130 region), so we scale that 130-tall region to fill the 84px box and
     pull the over-wide canvas left to re-centre it. Downscaling the high-res
     bitmap super-samples it → crisper than the desktop 1:1 size. The whole
     wrapper is the tap-to-open target (≥44px), moved to the TOP-LEFT under the
     HUD so it never collides with the right-side #bar, the bottom-right jump
     button, the bottom now-playing pill, or the top-right call/voice pills. */
  #miniMap {
    right: auto; bottom: auto;
    left: calc(10px + env(safe-area-inset-left, 0px));
    top: calc(52px + env(safe-area-inset-top, 0px));
    padding: 4px;
    border-radius: 14px;
    width: 84px; height: 84px;
    box-sizing: border-box;
    overflow: hidden;          /* crop the canvas' horizontal dead-bands */
    display: grid; place-items: center;
  }
  #miniCanvas {
    /* 130-tall dial region → 76px (84 box − 2×4 pad); scale ≈ 0.585;
       232 wide × 0.585 ≈ 136px; the grid centring keeps the dial centred so the
       wide side-bands fall outside the clipped box. */
    width: 136px; height: 76px;
    border-radius: 0;
  }
  /* lift the interact prompt clear of the now-playing pill on phones */
  #interactPrompt { bottom: calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 13px; padding: 9px 14px 9px 10px; }
  /* ---- bottom-centre pill LADDER (2026-06-18): on phones several centred pills
     piled onto the same ~40–74px row — the chat input landed exactly on the
     now-playing pill, and the screen-audio badge + talk-request overlapped the
     interact prompt. Give each its own tier (~48px apart; pills are ~30–48px
     tall) so none collide even when they co-occur near the stage screen / in a
     call / with chat open. Ladder (bottom px, all + safe-area-inset-bottom):
       40 #interactPrompt · 74 #nowPlaying · 124 #chatForm ·
       172 #screenAudioBadge · 216 #talkPrompt · 264 #controlsHint */
  #chatForm         { bottom: calc(124px + env(safe-area-inset-bottom, 0px)); }
  #screenAudioBadge { bottom: calc(172px + env(safe-area-inset-bottom, 0px)); }
  #talkPrompt       { bottom: calc(216px + env(safe-area-inset-bottom, 0px)); }
  #controlsHint { max-width: 64vw; bottom: calc(264px + env(safe-area-inset-bottom, 0px)); }
  /* stack the customize columns on phones */
  .customizePanel { flex-direction: column; align-items: stretch; }
  .custColPreview { align-self: center; }
  .gearRail { grid-template-columns: repeat(5, 1fr); }
  .bigPanel { width: 96vw !important; padding: 12px !important; }

  /* ---- top-right pill stack: the JS-built #callWidget sits at top:58 right:14
     (≈48px tall → bottom ≈106), and #voiceLink (this file) defaults to top:56
     right:16 → they overlap when both show. Drop #voiceLink clearly BELOW the
     call widget on phones so both read. */
  #voiceLink { top: calc(112px + env(safe-area-inset-top, 0px)); right: 12px; }

  /* ---- panels: never exceed the phone screen; always scroll if tall; keep the
     bottom clear of the home-bar / safe-area inset. (.panel already has a
     max-height + overflow; here we tighten for small screens and add the
     safe-area bottom gap so the last row + close button stay reachable.) The
     simple scrolling panels get container overflow; #npcDialog is a flex column
     with its OWN inner scroller (#npcLog) so we ONLY cap its height + bottom and
     keep its overflow:hidden (overriding it would double-scroll / break layout). */
  .panel, #settingsPanel, #photoPanel {
    width: min(94vw, 420px);
    max-height: min(78vh, calc(100dvh - 96px));
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  #npcDialog {
    max-height: min(72vh, calc(100dvh - 96px));
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  /* ---- larger, comfortable tap targets in the settings + emote/travel trays
     (≥40px) and bump the small range thumbs so they're draggable by thumb. */
  .setToggle { min-height: 42px; }
  .emoteTray .trayBtn { width: 44px; height: 44px; }
  .travelBtn { padding: 10px 15px; }
  #sensRange, #fovRange { height: 6px; }
  #sensRange::-webkit-slider-thumb, #fovRange::-webkit-slider-thumb { width: 22px; height: 22px; }
  #sensRange::-moz-range-thumb, #fovRange::-moz-range-thumb { width: 22px; height: 22px; }
}
/* very short / landscape phones: shrink the avatar stage so the rail stays visible */
@media (max-height: 560px) {
  .avatarStage canvas { max-height: 38vh; }
  #gateArt { width: 96px; height: 96px; }
  #gateTitle { font-size: 30px; }
}

/* ---- LANDSCAPE PHONE rail fix (≤760w AND ≤560h) ----
   In portrait the right rail is a single tall column anchored bottom:200. On a
   short landscape phone (e.g. 740×360) that column (6 × ~51px ≈ 306px) overruns
   the viewport TOP — only the bottom 2–3 icons stay on-screen. Here we lay the
   PRIMARY rail out as a compact 2-COLUMN grid (≈3 rows ≈ 160px) so it fits the
   short height, re-centre it vertically, and cap it with scroll as a safety net.
   The ⋯ overflow sheet + the jump/kick cluster are re-anchored to the short
   height too. Scoped to phones (≤760w) so a SHORT DESKTOP window (e.g. 1440×520,
   which would also match a bare max-height query) is never touched — desktop dock
   stays exactly as designed. */
@media (max-width: 760px) and (max-height: 560px) {
  #bar {
    bottom: auto; top: 50%;
    transform: translateY(-50%);
    flex-direction: row;            /* row + wrap = a tidy 2-col grid */
    flex-wrap: wrap;
    max-width: 102px;               /* 2 × 44 + gap + padding → forces 2 columns */
    max-height: min(86vh, calc(100dvh - 16px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    justify-content: center; align-content: center;
  }
  /* overflow sheet: pin it to the LEFT of the rail at vertical centre so it can't
     run off the short viewport, and cap its height to the available space. */
  #barMore {
    top: 50%; bottom: auto;
    right: calc(122px + env(safe-area-inset-right, 0px));   /* clear the ~102px-wide 2-col rail */
    transform: translateY(-50%) translateX(8px) scale(0.96);
    transform-origin: center right;
    max-height: min(88vh, calc(100dvh - 16px));
  }
  #barMoreToggle:checked ~ #barMore {
    transform: translateY(-50%) translateX(0) scale(1);
  }
  /* jump/kick cluster: the KICK button (football3d) is fixed at bottom:24; lift
     #jumpBtn so it still clears KICK's ~116px top with a ≥12px gap on the short
     height, and slim it so the cluster stays compact. */
  #jumpBtn { width: 58px; height: 58px; font-size: 21px; bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
}

/* ================= ACCESSIBILITY ================= */
/* keyboard focus ring — visible only for keyboard users, gold to match theme */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.charCard:focus-visible,
.genderChip:focus-visible,
.swatchRow .swatch:focus-visible,
.gearRail .gearItem:focus-visible,
.emoteBtn:focus-visible {
  outline: 2px solid #ffd98a;
  outline-offset: 2px;
  border-radius: 8px;
}
#bigMapCanvas:focus-visible, #avatarPreview:focus-visible { outline: 2px solid #ffd98a; outline-offset: -2px; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .charCard.is-selected::after { animation: none; }
  #micBtn.live .liveDot { animation: none; }
  #controlsHint { transition: opacity 0.001ms !important; }
}

/* hidden attr must always win over .panel display (covers new V2 panels too) */
.panel[hidden],
#miniMap[hidden],
#npcDialog[hidden],
#bigMap[hidden],
#settingsPanel[hidden],
#pauseMenu[hidden],
#jumpBtn[hidden] { display: none !important; }

/* ================= AUDIO MIXER (settings panel) ================= */
.mixRows { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.mixRow { display: flex; align-items: center; gap: 10px; }
.mixRow .mixName { flex: 0 0 120px; font-size: 12.5px; color: #cdb8ff; font-weight: 700; }
.mixRow input[type="range"], .mixPeer input[type="range"] {
  flex: 1; height: 4px; -webkit-appearance: none; appearance: none;
  border-radius: 999px; background: rgba(140, 100, 255, 0.3); outline: none; cursor: pointer;
}
.mixRow input[type="range"]::-webkit-slider-thumb,
.mixPeer input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #ffd98a; box-shadow: 0 0 0 3px rgba(255, 200, 110, 0.25); cursor: pointer;
}
.mixRow input[type="range"]::-moz-range-thumb,
.mixPeer input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border: none; border-radius: 50%; background: #ffd98a; cursor: pointer;
}
.mixPeers { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.mixPeer { display: flex; align-items: center; gap: 9px; }
.mixPeer .pName { flex: 1; min-width: 0; font-size: 12.5px; color: #eee6ff; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mixPeer .pName .pSpk { color: #2fae8a; }
.mixPeer .pMute {
  flex: 0 0 auto; width: 36px; height: 30px; border-radius: 8px;
  border: 1px solid rgba(140, 100, 255, 0.4); background: rgba(140, 100, 255, 0.12);
  color: #fff; font-size: 14px; cursor: pointer; display: grid; place-items: center;
}
.mixPeer .pMute[aria-pressed="true"] { border-color: #e0584f; background: rgba(224, 88, 79, 0.18); }
.mixPeer input[type="range"] { flex: 0 0 92px; }
.mixEmpty { font-size: 12px; color: #9a8fc0; }

/* a flex .setRow's display:flex overrides the [hidden] attribute — restore hide */
.setRow[hidden] { display: none !important; }
