:root {
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
  --voice-bg: #060814;
  --voice-bg-soft: #0b1220;
  --voice-surface: rgba(12, 18, 34, 0.8);
  --voice-surface-strong: rgba(15, 23, 42, 0.94);
  --voice-card: rgba(19, 30, 54, 0.82);
  --voice-card-hover: rgba(28, 42, 74, 0.92);
  --voice-border: rgba(148, 163, 184, 0.12);
  --voice-border-strong: rgba(129, 140, 248, 0.25);
  --voice-text: #e5eefc;
  --voice-text-muted: #93a4c4;
  --voice-text-soft: #7082a6;
  --voice-success: #22c55e;
  --voice-danger: #ef4444;
  --voice-accent: #7c3aed;
  --voice-accent-soft: #60a5fa;
  --voice-shadow: 0 26px 70px rgba(3, 7, 18, 0.52);
  --voice-mobile-floating-space: calc(118px + var(--safe-area-bottom));
}

[hidden] {
  display: none !important;
}

/* ─── SPA shell: voice lives inside .main-content ─── */
.main-content.voice-layout {
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--voice-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.voice-page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100%;
}

.voice-page-shell::before,
.voice-page-shell::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.voice-page-shell::before {
  width: 300px;
  height: 300px;
  top: -80px;
  left: -60px;
  background: rgba(124, 58, 237, 0.16);
}

.voice-page-shell::after {
  width: 280px;
  height: 280px;
  bottom: -100px;
  right: -60px;
  background: rgba(14, 165, 233, 0.12);
}

.voice-app-container {
  position: relative;
  min-height: 100%;
  overflow: clip;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(12, 18, 36, 0.96) 0%, rgba(10, 17, 31, 0.96) 100%);
  border-radius: 16px;
}

.voice-app-container::before,
.voice-app-container::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.voice-app-container::before {
  width: 420px;
  height: 420px;
  top: -140px;
  right: -140px;
  background: rgba(124, 58, 237, 0.2);
}

.voice-app-container::after {
  width: 360px;
  height: 360px;
  bottom: -180px;
  left: -120px;
  background: rgba(14, 165, 233, 0.16);
}

.app-content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: clamp(18px, 4vw, 30px);
  padding:
    16px
    16px
    calc(var(--voice-mobile-floating-space) + 16px)
    16px;
}

.app-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 16px;
}

.header-back,
.active-room-back {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--voice-text-muted);
  text-decoration: none;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
}

.header-back:hover,
.active-room-back:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(129, 140, 248, 0.28);
  color: var(--voice-text);
}

.header-title {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--voice-text-soft);
}

.header-spacer {
  width: 44px;
  height: 44px;
}

.title-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.84), rgba(11, 17, 32, 0.72));
  border: 1px solid rgba(129, 140, 248, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.title-avatar {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(124, 58, 237, 0.26), rgba(6, 182, 212, 0.18));
  border: 1px solid rgba(129, 140, 248, 0.18);
  box-shadow: 0 14px 30px rgba(14, 165, 233, 0.12);
}

.title-avatar i {
  font-size: 1.5rem;
  color: #9bdcff;
}

.title-copy,
.title-heading,
.title-text {
  display: grid;
  gap: 10px;
}

.title-kicker,
.lobby-kicker,
.active-room-kicker,
.voice-grid-kicker,
.join-cta-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--voice-text-soft);
}

.title-text h1 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: clamp(2rem, 6vw, 3.15rem);
  line-height: 0.96;
  font-weight: 800;
  color: #f7f7ff;
  text-wrap: balance;
}

.title-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--voice-text-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.title-status-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--voice-success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.status-indicator.connected {
  background: var(--voice-success);
}

.status-indicator.connecting {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.status-indicator.error {
  background: var(--voice-danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.status-indicator.disconnected {
  background: #64748b;
  box-shadow: none;
}

.status-sep {
  width: 1px;
  height: 15px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
}

.title-blurb {
  margin: 0;
  max-width: 42rem;
  color: var(--voice-text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.voice-error-banner {
  position: fixed;
  top: calc(var(--safe-area-top) + 16px);
  left: 50%;
  transform: translate(-50%, -18px);
  width: min(calc(100vw - 32px), 540px);
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(127, 29, 29, 0.82);
  border: 1px solid rgba(252, 165, 165, 0.2);
  color: #fee2e2;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26);
  opacity: 0;
  pointer-events: none;
  z-index: 120;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.voice-error-banner.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.voice-stage {
  min-height: 0;
}

.voice-stage-panel {
  position: relative;
  padding: clamp(18px, 4vw, 28px);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(13, 20, 38, 0.84), rgba(10, 18, 32, 0.92));
  border: 1px solid var(--voice-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    var(--voice-shadow);
}

.voice-stage-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(124, 58, 237, 0.08), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.voice-stage-panel > * {
  position: relative;
  z-index: 1;
}

.lobby-view {
  display: grid;
  gap: 18px;
}

.lobby-intro {
  display: grid;
  gap: 8px;
  max-width: 52rem;
}

.lobby-intro h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lobby-intro p {
  margin: 0;
  color: var(--voice-text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.lobby-room-grid {
  display: grid;
  gap: 16px;
}

.room-card {
  appearance: none;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(18, 28, 51, 0.88), rgba(15, 24, 44, 0.78));
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
}

.room-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(24, 37, 65, 0.94), rgba(18, 30, 55, 0.84));
  border-color: rgba(129, 140, 248, 0.22);
  box-shadow: 0 18px 36px rgba(4, 10, 24, 0.32);
}

.room-card.selected {
  border-color: rgba(129, 140, 248, 0.4);
  background:
    linear-gradient(180deg, rgba(43, 24, 80, 0.74), rgba(21, 34, 62, 0.94));
  box-shadow:
    0 22px 44px rgba(4, 10, 24, 0.38),
    0 0 0 1px rgba(96, 165, 250, 0.14) inset;
}

.room-card-top,
.room-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.room-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background:
    linear-gradient(145deg, rgba(124, 58, 237, 0.18), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(129, 140, 248, 0.16);
  color: #c4b5fd;
  font-size: 1.1rem;
}

.room-card.selected .room-card-icon {
  color: #ffffff;
  border-color: rgba(129, 140, 248, 0.26);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.2);
}

.room-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.room-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.room-badge-status {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--voice-text-muted);
}

.room-badge-status.inactive {
  color: #73809b;
}

.room-badge-status.active {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.18);
}

.room-badge-extra {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.16);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #64748b;
}

.room-badge-status.active .badge-dot {
  background: var(--voice-success);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.room-card-info {
  display: grid;
  gap: 8px;
}

.room-card-name {
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.1;
}

.room-card-description {
  margin: 0;
  color: var(--voice-text-muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.room-card-footer {
  align-items: center;
  flex-wrap: wrap;
}

.room-card-participants {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--voice-text-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.room-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--voice-text);
  font-size: 0.82rem;
  font-weight: 700;
}

.room-card.selected .room-card-cta {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.34), rgba(59, 130, 246, 0.28));
  color: #ffffff;
}

.join-cta-wrapper {
  position: fixed;
  left: calc(16px + var(--safe-area-left));
  right: calc(16px + var(--safe-area-right));
  bottom: calc(16px + var(--safe-area-bottom));
  pointer-events: auto;
  z-index: 70;
}

.join-cta-panel {
  display: grid;
  gap: 16px;
  padding: 14px;
  border-radius: 28px;
  background: rgba(10, 17, 33, 0.9);
  border: 1px solid rgba(129, 140, 248, 0.16);
  box-shadow:
    0 24px 48px rgba(2, 6, 20, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(20px);
}

.join-cta-copy {
  display: grid;
  gap: 6px;
}

.join-cta-copy strong {
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.1;
}

.join-cta-copy p {
  margin: 0;
  color: var(--voice-text-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.join-cta {
  width: 100%;
  min-height: 56px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 16px 34px rgba(109, 40, 217, 0.34);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.join-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 20px 40px rgba(109, 40, 217, 0.42);
}

.join-cta:active,
.action-btn:active {
  transform: translateY(0) scale(0.98);
}

.active-room-view {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-height: min(76vh, 980px);
}

.active-room-main,
.voice-grid-section,
.active-room-title {
  display: grid;
  gap: 16px;
}

.active-room-main {
  min-height: 0;
}

.active-room-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.active-room-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.active-room-heading strong {
  font-size: clamp(1.28rem, 2.6vw, 1.7rem);
  font-weight: 800;
}

.active-room-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--voice-text-muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.voice-screen-share {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(5, 8, 20, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.screen-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.screen-share-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--voice-text-muted);
  font-weight: 700;
  font-size: 0.92rem;
}

.screen-share-title i {
  color: #c4b5fd;
}

.screen-share-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  cursor: pointer;
}

.screen-share-stage {
  aspect-ratio: 16 / 9;
  min-height: 180px;
  background:
    linear-gradient(180deg, rgba(2, 6, 20, 0.9), rgba(1, 4, 12, 1));
}

#screen-share-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #01040c;
}

.voice-grid-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.voice-grid-helper {
  color: var(--voice-text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.voice-grid {
  display: grid;
  gap: 14px;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.voice-slot {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 208px;
  padding: 14px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(20, 31, 56, 0.88), rgba(15, 24, 45, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.voice-slot.occupied:hover {
  transform: translateY(-2px);
  border-color: rgba(129, 140, 248, 0.16);
}

.voice-slot.is-speaking {
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 0 0 1px rgba(34, 197, 94, 0.06),
    0 18px 28px rgba(15, 23, 42, 0.22);
  background:
    linear-gradient(180deg, rgba(17, 35, 47, 0.96), rgba(15, 29, 42, 0.96));
}

.voice-slot.empty {
  border-style: dashed;
  opacity: 0.74;
}

.voice-slot-media {
  position: relative;
  min-height: 132px;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top, rgba(124, 58, 237, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(19, 31, 58, 0.92), rgba(13, 20, 36, 0.98));
}

.voice-slot.has-video .voice-slot-media {
  background: #05070f;
}

.voice-slot-video-shell {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.voice-slot.has-video .voice-slot-video-shell {
  opacity: 1;
}

.voice-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.voice-avatar-stack {
  position: relative;
  width: clamp(72px, 24vw, 96px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.voice-slot.has-video .voice-avatar-stack {
  opacity: 0;
  transform: scale(0.94);
}

.voice-avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.voice-slot.is-speaking .voice-avatar-ring {
  border-color: rgba(34, 197, 94, 0.9);
  box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.12);
}

.voice-avatar {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
  object-fit: cover;
  background: #1e293b;
}

.voice-slot-overlay {
  position: absolute;
  inset: 10px 10px auto 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
}

.voice-slot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(7, 11, 22, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dbe7ff;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.voice-slot-chip.is-local {
  color: #ffffff;
  background: rgba(124, 58, 237, 0.42);
  border-color: rgba(196, 181, 253, 0.34);
}

.voice-slot-chip.is-muted {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.5);
  border-color: rgba(248, 113, 113, 0.18);
}

.voice-slot-chip.is-video {
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.32);
  border-color: rgba(96, 165, 250, 0.24);
}

.voice-slot-meta {
  display: grid;
  gap: 6px;
}

.voice-slot-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.voice-username {
  display: block;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-slot-presence,
.voice-empty-label {
  color: var(--voice-text-muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.voice-empty-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  color: rgba(191, 219, 254, 0.44);
  font-size: 1.2rem;
}

.room-action-dock {
  position: fixed;
  left: calc(16px + var(--safe-area-left));
  right: calc(16px + var(--safe-area-right));
  bottom: calc(16px + var(--safe-area-bottom));
  pointer-events: auto;
  z-index: 80;
}

.room-action-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 28px;
  background: rgba(7, 12, 24, 0.88);
  border: 1px solid rgba(129, 140, 248, 0.14);
  backdrop-filter: blur(18px);
  box-shadow:
    0 26px 48px rgba(2, 6, 20, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.action-btn {
  min-width: 0;
  min-height: 68px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--voice-text);
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.action-btn i {
  font-size: 1.08rem;
}

.action-btn-label {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(129, 140, 248, 0.2);
}

.action-btn-mute.is-muted {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.48);
  border-color: rgba(248, 113, 113, 0.18);
}

.action-btn-camera.is-active {
  color: #bfdbfe;
  background: rgba(30, 64, 175, 0.44);
  border-color: rgba(96, 165, 250, 0.22);
}

.action-btn-screen.is-sharing {
  color: #bbf7d0;
  background: rgba(21, 128, 61, 0.38);
  border-color: rgba(74, 222, 128, 0.2);
}

.action-btn-leave {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.42);
  border-color: rgba(248, 113, 113, 0.14);
}

.action-btn-leave:hover {
  background: rgba(153, 27, 27, 0.55);
}

.action-btn-minimize {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(96, 165, 250, 0.12);
}
.action-btn-minimize:hover {
  background: rgba(59, 130, 246, 0.25);
}

.voice-app-container.is-in-room .title-section {
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(11, 17, 32, 0.66));
}

.voice-app-container.has-screen-share .voice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .voice-app-container {
    min-height: calc(100vh - 120px);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    box-shadow:
      0 34px 90px rgba(2, 6, 20, 0.48),
      0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  }

  .app-content {
    min-height: calc(100vh - 120px);
    padding:
      clamp(22px, 3vw, 34px)
      clamp(22px, 3vw, 34px)
      clamp(24px, 4vw, 40px)
      clamp(22px, 3vw, 34px);
  }

  .title-section {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 22px 24px;
  }

  .title-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
  }

  .title-blurb {
    max-width: 26rem;
    text-align: right;
  }

  .lobby-room-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .join-cta-wrapper {
    position: static;
    inset: auto;
  }

  .join-cta-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 20px 22px;
  }

  .join-cta {
    width: auto;
    min-width: 280px;
  }

  .voice-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .voice-grid[data-count="1"] {
    grid-template-columns: minmax(280px, 380px);
    max-width: 380px;
    margin-inline: auto;
  }

  .voice-grid[data-count="2"] {
    grid-template-columns: repeat(2, minmax(220px, 320px));
    max-width: 700px;
    margin-inline: auto;
  }

  .voice-grid[data-count="3"] {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .voice-slot {
    min-height: 238px;
    padding: 16px;
  }

  .voice-slot-media {
    min-height: 150px;
  }

  .room-action-dock {
    position: sticky;
    left: auto;
    right: auto;
    bottom: 24px;
    align-self: center;
    width: auto;
  }

  .room-action-bar {
    grid-template-columns: repeat(5, minmax(72px, 88px));
    padding: 14px;
    gap: 12px;
  }

  .action-btn {
    min-height: 78px;
    padding: 12px 10px;
  }
}

@media (min-width: 1200px) {
  .voice-page-shell {
    width: min(100%, 1660px);
  }

  .app-content {
    gap: 32px;
  }

  .title-section {
    padding: 26px 28px;
  }

  .voice-stage-panel {
    padding: 28px;
  }

  .lobby-view {
    gap: 24px;
  }

  .active-room-view {
    min-height: min(74vh, 960px);
  }

  .voice-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .voice-grid[data-count="1"] {
    max-width: 420px;
    grid-template-columns: minmax(320px, 420px);
  }

  .voice-grid[data-count="2"] {
    max-width: 760px;
    grid-template-columns: repeat(2, minmax(260px, 360px));
  }

  .voice-grid[data-count="3"] {
    max-width: 1020px;
    margin-inline: auto;
  }

  .voice-slot {
    min-height: 260px;
  }

  .voice-slot-media {
    min-height: 166px;
  }
}

@media (max-width: 767px) {
  body.mobile-view-content .main-content.voice-layout {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
    background: var(--voice-bg) !important;
    z-index: 9500 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    will-change: auto !important;
    transform: none !important;
    touch-action: pan-y;
  }

  body.mobile-view-content .main-content.voice-layout .voice-page-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  body.mobile-view-content .main-content.voice-layout .voice-app-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  body.mobile-view-content .main-content.voice-layout .app-content {
    flex: 1 0 auto;
    min-height: 100%;
  }

  body.mobile-voice-view #mobile-bottom-nav,
  body.mobile-voice-view .mobile-bottom-nav {
    display: none !important;
  }

  .lobby-room-grid {
    grid-template-columns: 1fr;
  }

  .room-card {
    min-height: 0;
  }

  .room-card-top,
  .room-card-footer {
    align-items: center;
  }

  .room-card-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 479px) {
  .app-content {
    gap: 16px;
  }

  .title-section,
  .voice-stage-panel {
    padding-inline: 16px;
  }

  .title-text h1 {
    font-size: 1.78rem;
  }

  .voice-grid {
    gap: 12px;
  }

  .voice-slot {
    min-height: 188px;
    padding: 12px;
  }

  .voice-slot-media {
    min-height: 118px;
  }

  .room-action-bar {
    gap: 8px;
    padding: 10px;
  }

  .action-btn {
    min-height: 64px;
    border-radius: 20px;
  }

  .action-btn-label {
    font-size: 0.68rem;
  }

  .join-cta {
    min-height: 54px;
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
