/* ════════════════════════════════════════════════════════════════
   VIRTUAL ROOMS — live collaboration spaces (Zoom + Discord + Gather)
   Scoped to .vr-* ; built entirely on brand.css tokens so dark mode
   (html[data-theme="dark"]) is automatic. Loaded after study-groups.css.

   Browse grid of live room cards  →  enter a room into a conference
   "stage" (shared screen · participant tiles · call controls · side
   panel with people + chat). Per-user joins persist to bts_vr_joined.
   ════════════════════════════════════════════════════════════════ */

/* embedded inside the Campus Connect shell (cc-nav | [Virtual Rooms]) :
   spans the feed + right-rail columns. cc-feed / cc-side are x-show-hidden
   when this channel is active. */
.vr-embed { grid-column: 2 / 4; min-width: 0; }
.vr-embed .vr-main { min-width: 0; }
@media (max-width: 980px) { .vr-embed { grid-column: 1 / -1; } }

/* shared live pulse dot ----------------------------------------- */
.vr-pulse {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); box-shadow: 0 0 0 0 rgba(16, 185, 129, .55);
  animation: vrPulse 1.8s infinite; vertical-align: middle; margin-right: 5px;
}
@keyframes vrPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); }
  70%  { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ── TOOLBAR ─────────────────────────────────────────────────────── */
.vr-main { min-width: 0; }
.vr-toolbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.vr-tb-head h2 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 19px; color: var(--ink); }
.vr-tb-stats {
  display: flex; align-items: center; gap: 10px; margin-top: 4px;
  font-size: 12.5px; color: var(--mute); font-weight: 600;
}
.vr-tb-stats b { color: var(--ink-2); }
.vr-dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.vr-live-text b { color: var(--emerald-d); }

.vr-tb-actions { display: flex; align-items: center; gap: 10px; }
.vr-search {
  display: flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; height: 40px; min-width: 240px;
}
.vr-search:focus-within { border-color: var(--honey); }
.vr-search-ic { color: var(--mute); font-size: 16px; }
.vr-search input { border: none; outline: none; background: transparent; flex: 1; font-size: 13px; color: var(--ink); font-family: 'Inter', sans-serif; }
.vr-create {
  height: 40px; padding: 0 16px; border: none; border-radius: 11px; cursor: pointer;
  background: var(--honey); color: var(--on-accent); font-weight: 700; font-size: 13px;
  font-family: 'Inter', sans-serif; white-space: nowrap; transition: filter .15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.vr-create:hover { filter: brightness(1.05); }

/* ── join with a code (lobby) ──────────────────────────────────── */
.vr-joincode {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px;
  background: var(--surface); border: 1px dashed var(--ink-3); border-radius: 11px;
}
.vr-joincode:focus-within { border-style: solid; border-color: var(--honey); }
.vr-joincode-ic { color: var(--mute); font-size: 15px; }
.vr-joincode input {
  border: none; outline: none; background: transparent; width: 150px; font-size: 13px;
  color: var(--ink); font-family: 'JetBrains Mono', monospace; letter-spacing: .3px;
}
.vr-joincode input::placeholder { font-family: 'Inter', sans-serif; letter-spacing: 0; }
.vr-joincode-go {
  border: none; background: var(--ink); color: var(--surface); cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 12.5px; padding: 7px 13px; border-radius: 8px; transition: .15s;
}
.vr-joincode-go:hover { filter: brightness(1.1); }
.vr-joincode-go:disabled { background: var(--mist); color: var(--mute); cursor: not-allowed; }
.vr-joincode-demo {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--ink-3);
  background: var(--mist); color: var(--ink-2); cursor: pointer; white-space: nowrap;
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 11.5px;
  padding: 6px 9px; border-radius: 8px; transition: .15s;
}
.vr-joincode-demo:hover { border-color: var(--honey); color: var(--ink); background: var(--surface); }
.vr-joincode-demo .bi { font-size: 12px; color: var(--honey); }

/* ── filter chips ────────────────────────────────────────────────── */
.vr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.vr-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: var(--body);
  font-family: 'Inter', sans-serif; transition: .15s;
}
.vr-chip:hover { border-color: var(--honey); color: var(--ink); }
.vr-chip.active { background: var(--honey-glow); border-color: var(--honey); color: var(--honey-d); }
.vr-chip-g { font-size: 13px; }
.vr-chip-n {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
  background: var(--mist); color: var(--mute); padding: 1px 6px; border-radius: 999px;
}
.vr-chip.active .vr-chip-n { background: var(--honey); color: var(--on-accent); }

/* ── ROOM CARDS ──────────────────────────────────────────────────── */
.vr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }

.vr-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column; transition: .16s;
}
.vr-card:hover { border-color: #CBD5E1; transform: translateY(-2px); box-shadow: 0 10px 26px -16px rgba(15, 23, 42, .35); }

.vr-card-cover { position: relative; height: 86px; padding: 12px 14px; display: flex; align-items: flex-start; justify-content: space-between; }
.vr-card-glyph {
  width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(2px);
}
.vr-card-cat {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  font-weight: 700; color: #fff; background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .35); padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(2px);
}
.vr-card-live {
  position: absolute; bottom: 10px; left: 14px; display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .28);
  padding: 3px 9px; border-radius: 999px;
}
.vr-card-live .vr-pulse { background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); animation: vrPulseW 1.8s infinite; }
@keyframes vrPulseW {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
  70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.vr-card-dur {
  position: absolute; bottom: 10px; right: 14px; display: inline-flex; align-items: center; gap: 5px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .28); padding: 3px 9px; border-radius: 999px;
}

.vr-card-body { padding: 13px 16px 16px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.vr-card-body h3 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 15.5px; color: var(--ink); line-height: 1.25; }
.vr-card-host { display: flex; align-items: center; gap: 8px; }
.vr-card-host i { font-style: normal; font-size: 11.5px; color: var(--mute); }
.vr-card-host b { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }

/* capability pills (screen / voice / code) */
.vr-caps { display: flex; flex-wrap: wrap; gap: 6px; }
.vr-cap {
  display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600;
  color: var(--body); background: var(--mist); border-radius: 7px; padding: 4px 8px;
  font-family: 'Inter', sans-serif;
}
.vr-cap i { font-size: 12px; color: var(--ink-3); }

/* participants : avatar stack + count */
.vr-card-people { display: flex; align-items: center; gap: 10px; }
.vr-stack { display: flex; }
.vr-stack .vr-ava { margin-left: -9px; border: 2px solid var(--card); }
.vr-stack .vr-ava:first-child { margin-left: 0; }
.vr-stack-more {
  margin-left: -9px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--card);
  background: var(--mist); color: var(--ink-2); font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 1;
}
.vr-people-meta { font-size: 11.5px; color: var(--mute); line-height: 1.3; }
.vr-people-meta b { color: var(--ink); font-weight: 700; }

/* avatar (image with initials fallback behind) */
.vr-ava {
  position: relative; width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  overflow: visible; display: inline-block;
}
.vr-ava.sm { width: 26px; height: 26px; }
.vr-ava .vr-ava-fb {
  position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 10px; color: var(--on-accent);
  background: linear-gradient(135deg, var(--plum), var(--teal));
}
.vr-ava img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; z-index: 1; }

.vr-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.vr-cap-meter { font-size: 11.5px; color: var(--body); display: inline-flex; align-items: center; gap: 5px; }
.vr-cap-meter b { color: var(--ink); font-weight: 700; }
.vr-join {
  border: 1px solid var(--honey); background: var(--honey); color: var(--on-accent); cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 12.5px; padding: 9px 18px; border-radius: 10px;
  transition: .15s; display: inline-flex; align-items: center; gap: 6px;
}
.vr-join:hover { filter: brightness(1.05); }
.vr-join.full { background: var(--mist); border-color: var(--line); color: var(--mute); cursor: not-allowed; }

.vr-empty {
  grid-column: 1 / -1; text-align: center; padding: 50px 20px; color: var(--mute);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.vr-empty-ic { font-size: 34px; opacity: .6; }
.vr-empty b { color: var(--ink-2); font-size: 15px; }
.vr-empty span { font-size: 12.5px; }

/* ════════════════════════════════════════════════════════════════
   ROOM "STAGE" — conference workspace (video tiles · controls · panel)
   The stage uses a fixed deep-slate canvas in both themes — exactly how
   real video apps render the call surface regardless of UI theme.
   ════════════════════════════════════════════════════════════════ */
.vr-room {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
}
.vr-room-top {
  display: flex; align-items: center; gap: 14px; padding: 13px 18px;
  border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap;
}
.vr-back {
  border: 1px solid var(--line); background: var(--card); color: var(--body); cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 12.5px; padding: 8px 13px; border-radius: 10px; transition: .15s;
}
.vr-back:hover { border-color: var(--ink-3); color: var(--ink); }
.vr-room-id { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.vr-room-glyph {
  width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; flex: 0 0 auto; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .3);
}
.vr-room-id h2 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 16.5px; color: var(--ink); line-height: 1.2; }
.vr-room-sub { font-size: 12px; color: var(--mute); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.vr-room-sub b { color: var(--ink-2); }
.vr-room-timer {
  font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 600; color: var(--emerald-d);
  display: inline-flex; align-items: center; gap: 6px; background: var(--emerald-glow);
  padding: 6px 11px; border-radius: 9px;
}

/* ── in-room invite (shareable code popover) ───────────────────── */
.vr-invite-wrap { position: relative; flex: 0 0 auto; }
.vr-invite-btn {
  border: 1px solid var(--honey); background: var(--honey); color: var(--on-accent); cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 12.5px; padding: 8px 14px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 7px; transition: filter .15s;
}
.vr-invite-btn:hover { filter: brightness(1.05); }
.vr-invite-btn.open { filter: brightness(.95); }
.vr-invite-pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; width: 288px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .35); padding: 16px;
}
.vr-invite-head b { display: block; font-family: 'Inter', sans-serif; font-weight: 800; font-size: 14px; color: var(--ink); }
.vr-invite-head small { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; }
.vr-invite-code {
  display: flex; align-items: center; gap: 8px; margin: 13px 0 10px;
  background: var(--fog); border: 1px solid var(--line); border-radius: 10px; padding: 4px 4px 4px 14px;
}
.vr-invite-code-val {
  flex: 1; font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 16px;
  letter-spacing: 1px; color: var(--ink);
}
.vr-invite-copy {
  border: none; background: var(--card); color: var(--body); cursor: pointer; width: 34px; height: 34px;
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; transition: .15s;
}
.vr-invite-copy:hover { background: var(--mist); color: var(--ink); }
.vr-invite-link {
  width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 13px; padding: 10px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .15s;
}
.vr-invite-link:hover { border-color: var(--honey); color: var(--honey-d, var(--ink)); }
.vr-invite-hint { font-size: 11.5px; color: var(--mute); line-height: 1.5; margin-top: 11px; display: flex; gap: 6px; }
.vr-invite-hint i { margin-top: 1px; }
.vr-invite-hint b { color: var(--ink-2); font-weight: 700; }

/* layout : stage (canvas + controls) | side panel */
.vr-room-body { display: grid; grid-template-columns: 1fr 296px; min-height: 560px; }

/* stage canvas */
.vr-stage { display: flex; flex-direction: column; background: #0B1220; min-width: 0; }
.vr-canvas { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }

/* shared-screen spotlight */
.vr-share {
  position: relative; border-radius: 14px; overflow: hidden; flex: 1; min-height: 240px;
  background: #0F172A; border: 1px solid rgba(255, 255, 255, .07);
  display: flex; flex-direction: column;
}
.vr-share-bar {
  display: flex; align-items: center; gap: 9px; padding: 9px 13px;
  background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.vr-share-dots { display: flex; gap: 6px; }
.vr-share-dots i { width: 11px; height: 11px; border-radius: 50%; }
.vr-share-dots i:nth-child(1) { background: #FF5F57; }
.vr-share-dots i:nth-child(2) { background: #FEBC2E; }
.vr-share-dots i:nth-child(3) { background: #28C840; }
.vr-share-title {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #94A3B8; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vr-share-by { font-size: 11px; color: #64748B; display: inline-flex; align-items: center; gap: 6px; }
.vr-share-by b { color: #CBD5E1; }
.vr-share-canvas { flex: 1; overflow: auto; padding: 16px 18px; min-height: 0; }

/* mock : code editor */
.vr-code { font-family: 'JetBrains Mono', monospace; font-size: 12px; line-height: 1.7; }
.vr-code-row { display: flex; gap: 14px; white-space: pre; }
.vr-code-ln { color: #475569; user-select: none; min-width: 18px; text-align: right; }
.vr-code .k { color: #C792EA; } .vr-code .f { color: #82AAFF; } .vr-code .s { color: #C3E88D; }
.vr-code .c { color: #546E7A; font-style: italic; } .vr-code .n { color: #F78C6C; } .vr-code .t { color: #E2E8F0; }
.vr-code-cursor { background: #82AAFF; color: #0F172A; animation: vrBlink 1.1s steps(1) infinite; }
@keyframes vrBlink { 50% { opacity: 0; } }

/* mock : slide / whiteboard */
.vr-slide { color: #E2E8F0; display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin: 0 auto; padding-top: 8px; }
.vr-slide-kicker { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--honey); }
.vr-slide h4 { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 22px; color: #F8FAFC; line-height: 1.2; }
.vr-slide ul { display: flex; flex-direction: column; gap: 9px; }
.vr-slide li { display: flex; gap: 10px; font-size: 13.5px; color: #CBD5E1; line-height: 1.5; }
.vr-slide li i { color: var(--emerald); margin-top: 2px; }
.vr-slide-note { margin-top: 4px; font-size: 12px; color: #64748B; border-left: 2px solid rgba(255,255,255,.12); padding-left: 12px; }

/* participant tile strip */
.vr-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px; overflow-x: auto; padding-bottom: 2px; }
.vr-tiles.solo { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-columns: auto; }
.vr-tile {
  position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: #1E293B; border: 2px solid transparent; display: flex; align-items: center; justify-content: center;
  transition: border-color .2s;
}
.vr-tile.speaking { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(16, 185, 129, .25); }
.vr-tile.me { background: #172033; }
.vr-tile-ava {
  width: 56px; height: 56px; border-radius: 50%; position: relative; overflow: visible;
}
.vr-tile-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; position: relative; z-index: 1; }
.vr-tile-ava-fb {
  position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 17px; color: #fff;
  background: linear-gradient(135deg, var(--plum), var(--teal));
}
.vr-tile.speaking .vr-tile-ava::after {
  content: ''; position: absolute; inset: -7px; border-radius: 50%;
  border: 2px solid var(--emerald); animation: vrRing 1.5s ease-out infinite;
}
@keyframes vrRing { 0% { transform: scale(.9); opacity: .8; } 100% { transform: scale(1.25); opacity: 0; } }
.vr-tile-cam { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.vr-tile-name {
  position: absolute; left: 8px; bottom: 7px; font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(0, 0, 0, .45); padding: 2px 8px; border-radius: 7px; max-width: calc(100% - 46px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vr-tile-mic {
  position: absolute; right: 7px; bottom: 7px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff;
  background: rgba(0, 0, 0, .45);
}
.vr-tile-mic.off { background: var(--rose); }
.vr-tile-host {
  position: absolute; left: 7px; top: 7px; font-family: 'JetBrains Mono', monospace; font-size: 8.5px;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #fff;
  background: rgba(245, 158, 11, .9); padding: 2px 7px; border-radius: 6px;
}

/* call controls */
.vr-controls {
  display: flex; align-items: flex-start; justify-content: center; gap: 12px;
  padding: 14px 13px 16px; background: rgba(0, 0, 0, .25); border-top: 1px solid rgba(255, 255, 255, .06);
}
/* each control = circular button stacked over its label (label in flow, never clipped) */
.vr-ctrl-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px; width: 66px;
}
.vr-ctrl {
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: rgba(255, 255, 255, .12); color: #E2E8F0; transition: .15s;
}
.vr-ctrl:hover { background: rgba(255, 255, 255, .2); }
.vr-ctrl.off { background: var(--rose); color: #fff; }
.vr-ctrl.on { background: var(--honey); color: var(--on-accent); }
.vr-ctrl.leave {
  background: var(--rose); color: #fff; width: auto; height: 46px; border-radius: 24px;
  padding: 0 20px; font-size: 13px; font-weight: 700; gap: 7px; font-family: 'Inter', sans-serif;
}
.vr-ctrl.leave:hover { filter: brightness(1.08); }
.vr-ctrl-lbl {
  font-size: 10px; line-height: 1.2; text-align: center; color: #94A3B8;
  font-family: 'Inter', sans-serif; font-weight: 600;
}

/* ── SIDE PANEL : tabs (people / chat) ───────────────────────────── */
.vr-panel { border-left: 1px solid var(--line); background: var(--fog); display: flex; flex-direction: column; min-width: 0; }
.vr-tabs { display: flex; padding: 10px 12px 0; gap: 4px; border-bottom: 1px solid var(--line); background: var(--surface); }
.vr-tab {
  flex: 1; border: none; background: transparent; cursor: pointer; padding: 10px 8px 11px;
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 700; color: var(--mute);
  border-bottom: 2px solid transparent; transition: .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.vr-tab:hover { color: var(--ink-2); }
.vr-tab.active { color: var(--honey-d); border-bottom-color: var(--honey); }
.vr-tab-n { font-family: 'JetBrains Mono', monospace; font-size: 10px; background: var(--mist); color: var(--mute); padding: 1px 6px; border-radius: 999px; }
.vr-tab.active .vr-tab-n { background: var(--honey); color: var(--on-accent); }

/* people list */
.vr-people { flex: 1; overflow-y: auto; padding: 12px 12px; display: flex; flex-direction: column; gap: 3px; max-height: 560px; }
.vr-people-head {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: var(--mute); padding: 6px 8px 4px;
}
.vr-person { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; transition: .12s; }
.vr-person:hover { background: var(--mist); }
.vr-person-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.vr-person-txt b { font-size: 12.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-person-txt i { font-style: normal; font-size: 10px; color: var(--mute); }
.vr-person-ic { font-size: 13px; color: var(--mute); display: inline-flex; gap: 7px; }
.vr-person-ic .on { color: var(--emerald-d); }
.vr-person-ic .muted { color: var(--rose); }
.vr-person-ic .hand { color: var(--honey-d); }

/* chat */
.vr-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.vr-chat-scroll { flex: 1; overflow-y: auto; padding: 14px 14px; display: flex; flex-direction: column; gap: 13px; max-height: 510px; }
.vr-cmsg { display: flex; gap: 9px; }
.vr-cmsg-body { min-width: 0; flex: 1; }
.vr-cmsg-meta { display: flex; align-items: baseline; gap: 7px; margin-bottom: 2px; }
.vr-cmsg-meta b { font-size: 12px; font-weight: 700; color: var(--ink); }
.vr-cmsg-meta span { font-size: 9.5px; color: var(--mute); font-family: 'JetBrains Mono', monospace; }
.vr-cmsg-text { font-size: 12.5px; color: var(--body); line-height: 1.5; }
.vr-cmsg.sys { justify-content: center; }
.vr-cmsg.sys .vr-cmsg-text { font-size: 11px; color: var(--mute); background: var(--mist); padding: 4px 11px; border-radius: 999px; }
.vr-composer { border-top: 1px solid var(--line); padding: 11px 12px; background: var(--surface); display: flex; gap: 8px; }
.vr-composer input {
  flex: 1; border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 0 13px; height: 40px;
  font-size: 13px; color: var(--ink); font-family: 'Inter', sans-serif; outline: none;
}
.vr-composer input:focus { border-color: var(--honey); }
.vr-csend { border: none; cursor: pointer; background: var(--honey); color: var(--on-accent); font-weight: 700; padding: 0 15px; border-radius: 10px; font-size: 14px; }
.vr-csend:hover { filter: brightness(1.05); }

/* ════════════════════════════════════════════════════════════════
   CREATE ROOM modal
   ════════════════════════════════════════════════════════════════ */
.vr-modal-wrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.vr-modal-back { position: absolute; inset: 0; background: rgba(11, 18, 32, .55); backdrop-filter: blur(3px); }
.vr-modal {
  position: relative; width: 100%; max-width: 480px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .5); z-index: 1;
  max-height: 90vh; display: flex; flex-direction: column;
}
.vr-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.vr-modal-head b { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 16px; color: var(--ink); }
.vr-modal-head small { display: block; font-size: 11.5px; color: var(--mute); font-weight: 500; margin-top: 1px; }
.vr-modal-x { border: none; background: var(--mist); width: 32px; height: 32px; border-radius: 9px; cursor: pointer; color: var(--body); font-size: 14px; display: flex; align-items: center; justify-content: center; }
.vr-modal-x:hover { background: var(--line); color: var(--ink); }
.vr-modal-body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.vr-field label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; font-family: 'Inter', sans-serif; }
.vr-field input[type=text], .vr-field input[type=number] {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 11px; padding: 0 13px; height: 44px;
  font-size: 13.5px; color: var(--ink); font-family: 'Inter', sans-serif; outline: none;
}
.vr-field input:focus { border-color: var(--honey); }
.vr-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vr-cat-opt {
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px; transition: .15s; text-align: center;
}
.vr-cat-opt:hover { border-color: var(--honey); }
.vr-cat-opt.active { border-color: var(--honey); background: var(--honey-glow); }
.vr-cat-opt .g { font-size: 22px; }
.vr-cat-opt span { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.vr-cap-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.vr-cap-opt {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 10px; padding: 9px 13px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--body);
  font-family: 'Inter', sans-serif; transition: .15s;
}
.vr-cap-opt i { font-size: 14px; }
.vr-cap-opt.active { border-color: var(--emerald); background: var(--emerald-glow); color: var(--emerald-d); }
.vr-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vr-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vr-toggle .lbl b { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.vr-toggle .lbl small { font-size: 11px; color: var(--mute); }
.vr-switch { width: 42px; height: 24px; border-radius: 999px; background: var(--line); border: none; cursor: pointer; position: relative; transition: .18s; flex: 0 0 auto; }
.vr-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .18s; }
.vr-switch.on { background: var(--emerald); }
.vr-switch.on::after { left: 21px; }
.vr-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--fog); }
.vr-btn-ghost { border: 1px solid var(--line); background: var(--card); color: var(--body); cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 13px; padding: 10px 16px; border-radius: 11px; }
.vr-btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.vr-btn-go { border: none; background: var(--honey); color: var(--on-accent); cursor: pointer; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 13px; padding: 10px 18px; border-radius: 11px; display: inline-flex; align-items: center; gap: 7px; }
.vr-btn-go:hover { filter: brightness(1.05); }
.vr-btn-go:disabled { background: var(--mist); color: var(--mute); cursor: not-allowed; }

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .vr-room-body { grid-template-columns: 1fr; }
  .vr-panel { border-left: none; border-top: 1px solid var(--line); }
  .vr-people, .vr-chat-scroll { max-height: 340px; }
}
@media (max-width: 560px) {
  .vr-grid { grid-template-columns: 1fr; }
  .vr-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
