/* ==========================================================================
   css/components/voice-channel.css
   Split from app.html (build 2026.10.08.9-beta), original lines 1002-1567.
   Rules are in their ORIGINAL order; load order is defined in index.html.
   ========================================================================== */
/* -- VOICE CHANNEL -- */
.voice-channel-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-void);
  overflow: hidden;
}
/* Wraps screens + tile strip */
.voice-main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; position: relative; }
/* -- STAGE channel presentation (distinct from normal voice) -- */
/* DM call: fills the whole conversation area by default (chat hidden). A chevron
   toggles the chat back in as a bottom split, like NONONONONO's DM call. */
/* A subtle tab on the RIGHT edge of the call area that brings the DM profile panel back
   (it's hidden during a call). Faint until hovered. The chevron flips when the panel is open. */
#dmCallFsBtn { position: absolute; top: 50%; right: 0; transform: translateY(-50%); z-index: 1001; width: 22px; height: 56px; padding: 0; border-radius: 8px 0 0 8px; background: rgba(0,0,0,.4); border: 1px solid var(--border-strong); border-right: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: .3; transition: opacity .15s, background .15s; }
#dmCallFsBtn:hover { opacity: 1; background: rgba(0,0,0,.75); }
#dmCallFsBtn svg { transition: transform .15s; }
body.dm-show-profile #dmCallFsBtn svg { transform: rotate(180deg); }
/* Call fills the top, chat + composer always show below it (NONONONONO-style DM call). */
.channel-area.in-dmcall #dmCallPanel { flex: 0 0 auto; height: 58%; max-height: 58%; border-bottom: 1px solid var(--border); display: block !important; overflow: hidden; min-height: 0; }
.channel-area.in-dmcall #messagesArea { display: block !important; }
.channel-area.in-dmcall > .message-area { display: flex !important; }
/* Profile panel: hidden during a DM call, brought back by the edge tab. */
body.dm-call-active .dm-profile-panel { display: none !important; }
body.dm-call-active.dm-show-profile .dm-profile-panel.visible { display: flex !important; }
/* Call + chat get the FULL width during a DM call: hide the right-hand members/profile rail
   so the composer reaches the window edge. */
body.dm-call-active #trayArea { display: none !important; }
/* Expand the call to fill the whole conversation area (chat + composer hidden). */
.channel-area.in-dmcall.dmcall-full #dmCallPanel { height: 100% !important; max-height: 100% !important; border-bottom: none !important; }
.channel-area.in-dmcall.dmcall-full #messagesArea,
.channel-area.in-dmcall.dmcall-full #typingIndicator,
.channel-area.in-dmcall.dmcall-full > .message-area { display: none !important; }
#dmCallExpandBtn { position: absolute; left: 50%; transform: translateX(-50%); top: calc(58% - 13px); z-index: 1002; width: 44px; height: 24px; padding: 0; border-radius: 8px; background: rgba(0,0,0,.5); border: 1px solid var(--border-strong); color: #fff; cursor: pointer; display: none; align-items: center; justify-content: center; opacity: .55; transition: opacity .15s, background .15s; }
.channel-area.in-dmcall #dmCallExpandBtn { display: flex; }
#dmCallExpandBtn:hover { opacity: 1; background: rgba(0,0,0,.8); }
.channel-area.dmcall-full #dmCallExpandBtn { top: auto; bottom: 12px; }
.channel-area.dmcall-full #dmCallExpandBtn svg { transform: rotate(180deg); }
.voice-channel-view.is-stage { background: radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 14%, var(--bg-void)) 0%, var(--bg-void) 60%); }
.stage-header { flex-shrink: 0; text-align: center; padding: 18px 16px 6px; }
.stage-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; color: #fff; background: var(--accent); padding: 3px 10px; border-radius: 20px; margin-bottom: 8px; }
.stage-title { font-size: 22px; font-weight: 800; color: var(--text-primary); font-family: var(--font-display, 'Space Grotesk', sans-serif); }
.stage-meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.stage-audience { flex-shrink: 0; border-top: 1px solid var(--border); padding: 12px 16px 14px; max-height: 30%; overflow-y: auto; }
.stage-audience-label { font-size: 10px; font-weight: 700; letter-spacing: .8px; color: var(--text-muted); margin-bottom: 10px; }
.stage-audience-grid { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.stage-aud-member { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 64px; cursor: default; }
.stage-aud-member[onclick] { cursor: pointer; }
.stage-aud-member[onclick]:hover .stage-aud-avatar { box-shadow: 0 0 0 2px var(--accent); }
.stage-aud-avatar { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; }
.stage-aud-name { font-size: 11px; color: var(--text-secondary); max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; display: inline-flex; align-items: center; gap: 3px; justify-content: center; }
.stage-aud-name .voice-tile-muted { width: 12px; height: 12px; }
.voice-share-eye { display: inline-flex; align-items: center; color: var(--accent); flex-shrink: 0; }
.stage-listening-pill { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 20px; padding: 8px 16px; margin-right: auto; }
/* Screen share tiles -merged into the user tile grid */
.voice-screen-tile { border: 2px solid color-mix(in srgb, var(--accent) 50%, transparent) !important; background: #000 !important; }
.voice-screen-tile video { width:100%;height:100%;object-fit:contain;display:block;border-radius:6px;background:#000 }
.voice-screen-tile .voice-tile-avatar { display:none !important }
.voice-screen-tile:hover .voice-tile-watch-btn { opacity:1 !important; }
/* A live screen tile's own chrome - the name plate, the viewer count and the
   "Pause preview" pill - sits ON TOP of the thing you're trying to read. Fade it out
   while the tile is actually decoding video and bring it back on hover. A tile that
   ISN'T decoding keeps its label: there's nothing underneath it to cover. */
.voice-screen-tile[data-watching="1"] .voice-tile-name,
.voice-screen-tile[data-watching="1"] .voice-screen-watchers,
.voice-screen-tile[data-watching="1"] .self-pause-preview {
  opacity: 0; transition: opacity .18s ease;
}
.voice-screen-tile[data-watching="1"]:hover .voice-tile-name,
.voice-screen-tile[data-watching="1"]:hover .voice-screen-watchers,
.voice-screen-tile[data-watching="1"]:hover .self-pause-preview { opacity: 1; }
.voice-screen-tile-label { position:absolute;bottom:6px;left:6px;font-size:11px;font-weight:600;color:#fff;background:rgba(0,0,0,.65);padding:2px 7px;border-radius:4px;display:flex;align-items:center;gap:4px;pointer-events:none }
/* Focus overlay when a screen tile is clicked */
.screen-focus-overlay { position:absolute;inset:0;z-index:200;background:#000;border-radius:8px;display:flex;flex-direction:column;overflow:hidden }
.screen-focus-overlay video { flex:1;width:100%;object-fit:contain }
.screen-focus-overlay-label { padding:8px 12px;font-size:12px;color:rgba(255,255,255,.7);display:flex;align-items:center;gap:6px;background:rgba(0,0,0,.4);flex-shrink:0 }
.voice-screens-area { display:none }
/* modern-style auto-fit grid - tile size is maximized by JS (layoutVoiceTiles).
   Screen shares are normal opt-in tiles (Watch Stream). Watching one moves it
   into the spotlight; participants stay visible as a strip along the bottom. */
/* NO background here. Giving the stage its own rung (tried --bg-void) painted a band:
   the stage is shorter than .channel-area, so the strip it does not cover showed the darker
   rung underneath as a hard horizontal line above the call controls. The reference app's
   voice page (.page__5e434) carries no background for the same reason - it inherits. */
.voice-stage { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.voice-spotlight { display: none; }
.voice-stage.watching .voice-spotlight,
.voice-stage.activity-on .voice-spotlight {
  display: flex; flex: 1; min-height: 0; position: relative;
  align-items: center; justify-content: center; background: #000; padding: 8px 8px 0;
}
/* Activity (Watch Together) reserves the spotlight region; the persistent
   player overlay is positioned to fill #voiceSpotlight by WatchParty. */
.voice-stage.activity-on .voice-spotlight { padding: 8px; background: #0c0c0f; }
/* A GAME activity sits on the app surface, not a hard black slab - otherwise the board
   floats on black in light mode. Watch Together keeps the black letterbox (it's video). */
.voice-stage.activity-on .voice-spotlight:has(.vg-panel.in-stage) { background: var(--bg-deep); }
.voice-spotlight video { width: 100%; height: 100%; object-fit: contain; }
/* The spotlight clips its zoomed/panned video, and the video itself never animates its
   transform (that would lag a scroll-zoom by a frame). */
.voice-stage.watching .voice-spotlight { overflow: hidden; }
/* ONE tag for the spotlight AND the grid tile. These were two rules that had drifted apart;
   the look now lives in one place and only the position differs, because a tile is smaller
   than the stage. The reference agrees on the shape: its .overlayTitle__2f4f7 is a padded
   rounded tag on the tile's own corner radius, not a capsule. */
.voice-spotlight .spotlight-label,
.voice-tile-name {
  position: absolute; padding: 5px 11px; font-size: 12px; font-weight: 600;
  color: #fff; background: rgba(0,0,0,.6); border-radius: 6px;
  display: flex; align-items: center; gap: 6px;
  transition: opacity .2s ease;
}
.voice-spotlight .spotlight-label { bottom: 12px; left: 14px; pointer-events: none; }
.voice-spotlight .spotlight-close {
  position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border-radius: 7px;
  background: rgba(0,0,0,.6); color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2; transition: background .15s, opacity .2s ease;
}
.voice-spotlight .spotlight-close:hover { background: rgba(237,66,69,.9); }
/* Video-player behaviour: the chrome hides itself once the pointer goes still over the
   stream, so it isn't parked on top of the content while you read. Any movement (or a
   zoom) brings it straight back. */
.voice-spotlight.chrome-idle .spotlight-label,
.voice-spotlight.chrome-idle .spotlight-close,
.voice-spotlight.chrome-idle .spotlight-zoom { opacity: 0; pointer-events: none; }
/* Zoom readout - only present while zoomed in. */
.voice-spotlight .spotlight-zoom {
  position: absolute; top: 12px; left: 14px; z-index: 3;
  display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px;
  background: rgba(0,0,0,.6); border-radius: 7px; color: #fff;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: opacity .2s ease;
}
.voice-spotlight .spotlight-zoom button {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: #fff; border-radius: 5px; padding: 2px 8px; font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.voice-spotlight .spotlight-zoom button:hover { background: rgba(255,255,255,.22); }
.voice-tile-area {
  flex: 1;
  display: grid;
  gap: 8px;
  padding: 12px;
  align-content: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}
/* When watching a stream or an activity, the tile grid collapses to a strip */
.voice-stage.watching .voice-tile-area,
.voice-stage.activity-on .voice-tile-area {
  flex: none; display: flex; flex-direction: row; gap: 8px;
  height: 116px; padding: 6px 10px 10px;
  overflow-x: auto; overflow-y: hidden; justify-content: center; align-content: initial;
}
.voice-stage.watching .voice-tile-area .voice-tile,
.voice-stage.activity-on .voice-tile-area .voice-tile {
  flex: 0 0 auto; height: 100%; width: auto; aspect-ratio: 16/9;
}
.voice-stage.watching .voice-tile-area .voice-tile-avatar,
.voice-stage.activity-on .voice-tile-area .voice-tile-avatar { width: 44px; height: 44px; font-size: 15px; }

/* Big calls stay on the same 16:9 grid - tiles just get smaller. Once they would go
   below a readable minimum the grid stops shrinking and scrolls vertically instead,
   so nobody ever turns into a bare circle. */
.voice-tile-area.scrolling {
  align-content: start;
  overflow-y: auto; overflow-x: hidden;
}
.voice-tile-area.scrolling::-webkit-scrollbar { width: 8px; }
.voice-tile-area.scrolling::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.voice-tile-area.scrolling::-webkit-scrollbar-track { background: transparent; }
/* Chrome the tile down with it so a small tile isn't all name plate and ring. */
.voice-tile.tile-sm .voice-tile-name { font-size: 11px; padding: 2px 8px; bottom: 6px; left: 6px; max-width: calc(100% - 12px); }
.voice-tile.tile-sm .voice-tile-menu { transform: scale(.85); transform-origin: top right; }
.voice-tile.tile-xs .voice-tile-name { font-size: 10px; padding: 1px 6px; bottom: 4px; left: 4px; max-width: calc(100% - 8px); }
.voice-tile.tile-xs .voice-tile-menu { display: none; }
.voice-tile.tile-xs .voice-tile-name .voice-tile-status svg { width: 11px; height: 11px; }

.voice-tile {
  /* border-box so the 2px border is counted INSIDE the aspect-ratio box -
     otherwise each tile is ~4px taller than the grid math expects and the
     overflow gets clipped at the bottom (camera looks "cut off"). */
  box-sizing: border-box;
  border-radius: 12px;
  /* NO border. The ring overlay is inset:0, which resolves against the PADDING box - so a
     transparent 2px border here pushed the green ring 2px inside the tile's visible edge. The
     reference's .tile__2f4f7 has no border either; its .border__2f4f7 sits right on the edge.
     Nothing has coloured this border since the ring overlay took the job. */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  min-height: 0;
  /* A theme token, not a fixed grey. This was `#1e1f22`, so under a custom theme every empty
     tile was a flat neutral slab in the middle of a tinted app (and a near-black hole in light
     mode). The reference does the same thing with a token of its own:
     `.tile__90dc5 { background-color: var(--primary-700) }`. */
  background: var(--bg-surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.voice-tile:hover .voice-tile-menu { opacity: 1; }
/* Speaking indicator: a clean solid green border (modern-style). No box-shadow
   animation - animating box-shadow forces a full repaint every frame, which pegged
   the GPU whenever anyone was talking. Border-color transitions are GPU-cheap. */
/* Speaking indicator: ONE green border. It lives on the ring overlay below, which sits
   ABOVE the camera/screen <video>. The tile's OWN border would be a SECOND green line, so
   it stays transparent when speaking and only the ring turns green. */
/* No border. An inset box-shadow paints inside the border box, so a 2px transparent border
   pushed the green ring 2px further in than the reference's, which sits on the tile edge
   (its .border__2f4f7 carries no border). Nothing colours this border any more. */
.voice-tile-ring { position: absolute; inset: 0; border-radius: 12px; pointer-events: none; z-index: 6; }
/* The reference's speaking ring is TWO stacked inset shadows, not one border:
     .border__2f4f7.voiceChannelEffect__2f4f7 {
       box-shadow: inset 0 0 0 2px var(--brand-500), inset 0 0 0 3px var(--black); }
   The 1px dark line just inside the coloured ring is what keeps it readable over a bright
   camera or screen share - a lone green border bleeds into pale content and disappears.
   Deliberately NOT transitioned: voice activity toggles several times a second and an earlier
   build pegged the GPU animating a box-shadow. This only ever repaints the 2px ring. */
.voice-tile.speaking .voice-tile-ring {
  box-shadow: inset 0 0 0 2px var(--status-speaking), inset 0 0 0 3px #000;
}
.voice-tile-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Show the WHOLE camera frame - cropping cut off people's faces/overlays.
     Letterboxing is the lesser evil. */
  object-fit: contain;
  border-radius: 10px;
  display: none;
  background: #000;
}
.voice-tile-video.active { display: block; }
/* Mirror YOUR OWN camera in your self-view (like a mirror / phone selfie), the way
   NONONONONO & Zoom do. Display-only: the track sent to everyone else is unflipped, so
   they still see you correctly. Never mirror a screen share (only the camera tile). */
.voice-tile:not(.voice-tile-screen) .voice-tile-video.self-cam { transform: scaleX(-1); }
/* Screen shares must NOT be cropped - show the whole screen even if that means
   letterboxing, since cropping would hide part of what's being shared. */
.voice-screen-tile .voice-tile-video,
.voice-tile.voice-tile-screen .voice-tile-video { object-fit: contain; background: #000; }
/* Capture masking: blur the real messages so nothing leaks past the overlay. */
.messages-area.capture-masked > *:not(#captureMaskOverlay) { filter: blur(20px) brightness(.5) !important; pointer-events: none !important; user-select: none !important; }
/* Camera/screen warming up - show a spinner over the avatar until the first
   frame arrives instead of a black box. */
@keyframes rift-spin { to { transform: rotate(360deg); } }
.voice-tile.cam-loading::after {
  content: ''; position: absolute; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.18); border-top-color: #fff;
  animation: rift-spin .8s linear infinite; z-index: 3; pointer-events: none;
}
.voice-tile-avatar {
  /* --vt-av is set by layoutVoiceTiles from the measured tile height, so the pfp
     shrinks with the tile in a full call instead of overflowing it. */
  width: var(--vt-av, 96px);
  height: var(--vt-av, 96px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: calc(var(--vt-av, 96px) * 0.34);
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  /* NO shadow. The call surfaces carry none - the matching lift added here to pair with the
     spotlight avatar went the wrong way; the spotlight's was removed instead. */
}
.voice-tile.has-video .voice-tile-avatar { display: none; }
/* Tile-specific only - everything else comes from the shared rule above. */
.voice-tile-name {
  bottom: 10px;
  left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 20px);
  z-index: 2;
}
/* The mute/deafen status span is always in the DOM (so it can update live), but when
   you're not muted/deafened it's EMPTY - hide it so it doesn't eat a flex gap before
   the name/badge (that was the mystery space before the OWNER badge). */
.voice-tile-name .voice-tile-status:empty { display: none; }
.voice-tile-muted {
  width: 14px; height: 14px;
  background: #ed4245;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.voice-tile-menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.15s;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  letter-spacing: 1px;
}
.voice-tile-menu:hover { background: rgba(255,255,255,0.15); }
/* Screen share picker modal */
.sp-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 9999; display: flex; align-items: center; justify-content: center; animation: overlay-in 0.15s ease; }
.sp-box { background: #1e1f2e; border-radius: 12px; width: 760px; max-width: 96vw; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; animation: modal-pop 0.22s var(--ease-out, ease); }
.sp-header { display: flex; align-items: stretch; background: #16171f; flex-shrink: 0; border-bottom: 1px solid #2a2b3a; }
.sp-tab { padding: 14px 20px; font-size: 13px; font-weight: 600; color: #8e9297; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; transition: color .15s; display: flex; align-items: center; gap: 7px; }
.sp-tab.active { color: #fff; border-bottom-color: var(--accent); }
.sp-tab:hover:not(.active) { color: #dcddde; }
.sp-close { margin-left: auto; background: none; border: none; color: #8e9297; font-size: 22px; cursor: pointer; padding: 0 18px; line-height: 1; }
.sp-close:hover { color: #fff; }
.sp-grid { flex: 1; overflow-y: auto; padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; min-height: 220px; }
.sp-card { background: #2b2d3e; border-radius: 6px; cursor: pointer; overflow: hidden; border: 2px solid transparent; transition: border-color .15s; }
.sp-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.sp-card.selected { border-color: var(--accent); }
.sp-thumb { width: 100%; aspect-ratio: 16/10; background: #0d0e14; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-thumb-icon { font-size: 34px; opacity: .45; }
.sp-card-name { padding: 7px 10px; font-size: 12px; color: #dcddde; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.sp-card-name svg { flex-shrink: 0; opacity: .6; }
.sp-footer { background: #16171f; padding: 12px 16px 14px; flex-shrink: 0; border-top: 1px solid #2a2b3a; }
.sp-footer-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sp-pill-label { font-size: 11px; color: #8e9297; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.sp-pills { display: flex; gap: 4px; }
.sp-pill { padding: 4px 11px; border-radius: 20px; border: 1.5px solid #3a3d4e; background: none; color: #8e9297; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
.sp-pill.active { border-color: var(--accent); color: #fff; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sp-pill:hover:not(.active) { border-color: #5c6070; color: #dcddde; }
.sp-mute-btn { display: flex; align-items: center; gap: 6px; background: none; border: 1.5px solid #3a3d4e; border-radius: 20px; padding: 4px 12px; color: #8e9297; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; margin-left: auto; }
.sp-mute-btn.muted { border-color: var(--accent); color: #fff; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sp-mute-btn:hover { border-color: #5c6070; color: #dcddde; }
.sp-footer-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sp-btn-cancel { background: none; border: none; color: #8e9297; font-size: 14px; font-weight: 600; cursor: pointer; padding: 8px 16px; border-radius: 4px; }
.sp-btn-cancel:hover { color: #fff; }
.sp-btn-go { background: var(--accent); color: #fff; border: none; border-radius: 4px; padding: 8px 24px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; display: flex; align-items: center; gap: 6px; }
.sp-btn-go:hover:not(:disabled) { background: var(--accent-bright); }
.sp-btn-go:disabled { background: #3a3d4e; color: #555; cursor: not-allowed; }
.sp-empty { color: #8e9297; font-size: 13px; text-align: center; padding: 40px 20px; grid-column: 1/-1; }
.vctrl.active-cam { color: #23a559; }
.vctrl.active-screen { color: var(--accent-bright, #5865f2); }
/* Camera button group (button + chevron) */
.vctrl-group { display: flex; align-items: center; position: relative; }
.vctrl-chevron {
  width: 16px; height: 44px; background: transparent; border: none;
  color: #6d6f78; cursor: pointer; display: flex; align-items: center;
  justify-content: center; padding: 0; border-radius: 4px;
  transition: color .15s, background .15s;
}
.vctrl-chevron:hover { color: #dbdee1; background: #35373c; }
/* Camera picker popup */
.cam-picker {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #1e1f22; border: 1px solid #3a3b3e; border-radius: 8px;
  padding: 6px; min-width: 200px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  z-index: 300; display: none; flex-direction: column; gap: 2px;
}
.cam-picker.open { display: flex; }
.cam-picker-label {
  font-size: 11px; font-weight: 700; color: #6d6f78;
  text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px 6px;
}
.cam-picker-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border-radius: 4px; cursor: pointer; font-size: 13px; color: #dbdee1;
  background: transparent; border: none; width: 100%; text-align: left;
  transition: background .1s;
}
.cam-picker-item:hover { background: #35373c; }
.cam-picker-item.selected { color: #fff; }
.cam-picker-item.active { color: #23a559; }
.cam-picker-item .cam-check {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid #6d6f78;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.cam-picker-item.active .cam-check {
  border-color: #23a559; background: #23a559;
}
/* Stream options menu */
.stm-menu { position: fixed; z-index: 9995; background: #111216; border-radius: 6px; padding: 6px; min-width: 188px; box-shadow: 0 8px 28px rgba(0,0,0,.65); animation: menu-in 0.22s var(--ease-out, ease); }
.stm-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; font-size: 14px; cursor: pointer; color: #dcddde; user-select: none; }
.stm-item:hover { background: var(--accent); color: #fff; }
.stm-item.danger { color: #ed4245; }
.stm-item.danger:hover { background: #ed4245; color: #fff; }
.stm-item-right { margin-left: auto; display: flex; align-items: center; }
.stm-sub { position: fixed; z-index: 9996; background: #111216; border-radius: 6px; padding: 6px; min-width: 176px; box-shadow: 0 8px 28px rgba(0,0,0,.65); animation: menu-in 0.22s var(--ease-out, ease); }
.stm-sub-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #6d6f78; padding: 6px 10px 4px; }
.stm-radio { display: flex; align-items: center; padding: 8px 10px; border-radius: 4px; font-size: 14px; cursor: pointer; color: #dcddde; user-select: none; }
.stm-radio:hover { background: var(--accent); color: #fff; }
.stm-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #4e5058; margin-left: auto; flex-shrink: 0; transition: all .12s; }
.stm-radio.active .stm-dot { border-color: var(--accent); background: var(--accent); }
.stm-radio:hover .stm-dot { border-color: #fff; }
.stm-radio.active:hover .stm-dot { border-color: #fff; background: #fff; }
.stm-radio.stm-locked { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
/* Empty state (no participants yet) */
.voice-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #4e5058;
}
.voice-empty svg { opacity: 0.35; }
.voice-empty h3 { margin: 0; font-size: 20px; font-weight: 700; color: #dbdee1; }
.voice-empty p  { margin: 0; font-size: 14px; }
/* Bottom controls bar */
.voice-bottom-bar {
  height: 72px;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 8px;
}
.voice-bottom-info {
  flex: 1;
  min-width: 0;
}
.voice-bottom-conn {
  font-size: 12px;
  font-weight: 600;
  color: #23a559;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}
.voice-bottom-channel {
  font-size: 11px;
  color: #949ba4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.voice-bottom-mode {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  letter-spacing: .4px;
  transition: opacity .15s;
}
.voice-bottom-mode:hover { opacity: .8; }
.voice-bottom-mode.p2p { background: #3ba55d22; color: #3ba55d; border: 1px solid #3ba55d44; }
.voice-bottom-mode.rift { background: var(--accent-dim); color: var(--accent-bright); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.voice-bottom-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.vctrl {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #b5bac1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  position: relative;
}
.vctrl:hover { background: #35373c; color: #dbdee1; }
.vctrl.active { color: #fff; background: #ed4245; }
.vctrl.active:hover { background: #c03537; }
.vctrl.leave {
  background: #ed4245;
  color: #fff;
  border-radius: 10px;
  width: auto;
  padding: 0 14px;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-left: 4px;
}
.vctrl.leave:hover { background: #c03537; }
/* Voice participants in sidebar */
.voice-sidebar-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 2px 28px;
  height: 28px;
  border-radius: 4px;
  cursor: default;
}
.voice-sidebar-member:hover { background-color: var(--bg-hover); }
/* Tree connector lines: a vertical trunk down the channel's members with a
   small branch to each avatar (modern-style). Last member rounds off. */
.voice-sidebar-member { position: relative; }
.voice-sidebar-member::before {
  content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 2px;
  background: var(--border-strong, #3a3d4d);
}
.voice-sidebar-member::after {
  content: ''; position: absolute; left: 16px; top: 13px; width: 9px; height: 2px;
  background: var(--border-strong, #3a3d4d);
}
/* Last member: the trunk stops at its branch and curves into it (rounded └),
   instead of running straight past the last person. */
.voice-sidebar-member.vc-tree-last::before {
  bottom: auto; height: 14px; width: 11px; background: none;
  border-left: 2px solid var(--border-strong, #3a3d4d);
  border-bottom: 2px solid var(--border-strong, #3a3d4d);
  border-bottom-left-radius: 8px;
}
.voice-sidebar-member.vc-tree-last::after { display: none; }
/* Compact stacked-avatar strip shown when a voice channel has many people */
.voice-sidebar-stack { display: flex; align-items: center; padding: 4px 8px 4px 28px; cursor: pointer; border-radius: 4px; }
.voice-sidebar-stack:hover { background: var(--bg-hover); }
.vc-stack-av { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; border: 2px solid var(--bg-deep, #1a1c22); }
.vc-stack-av img { width: 100%; height: 100%; object-fit: cover; }
.vc-stack-more { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.voice-sidebar-avatar {
  width: 20px; height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: #fff;
}
.voice-sidebar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.voice-sidebar-name {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.voice-sidebar-game { font-size: 10.5px; color: var(--accent, var(--text-secondary)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.vg-ico { width: 13px; height: 13px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }
.rg-playnow { color: var(--accent, var(--text-secondary)); font-weight: 600; }
.voice-sidebar-icons { display: flex; gap: 3px; flex-shrink: 0; }
/* Pre-join screen */
.voice-prejoin {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.voice-join-btn {
  background: #23a559;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 36px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.voice-join-btn:hover { background: #1a8f4a; transform: translateY(-1px); }

/* User panel - floating rounded card pinned over the server rail + sidebar
   (modern-style). Fixed so it escapes the sidebar; the rail and channel
   list get bottom padding so their content scrolls clear of it. */
