:root {
  --bg-canvas: #09090b;
  --bg-surface: rgba(20, 20, 24, 0.72);
  --bg-surface-elevated: rgba(28, 28, 34, 0.84);
  --bg-input: rgba(12, 12, 16, 0.78);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-focus: rgba(245, 158, 11, 0.65);
  --inner-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.11);

  --accent-primary: #f59e0b;
  --accent-primary-hover: #fbbf24;
  --accent-foreground: #09090b;
  --status-live: #10b981;
  --status-warn: #f59e0b;
  --status-danger: #f43f5e;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Luminous cinema backdrop */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.ambient-glow-warm {
  width: 620px;
  height: 620px;
  top: -220px;
  left: -140px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.14) 0%, rgba(245, 158, 11, 0) 70%);
}

.ambient-glow-cool {
  width: 680px;
  height: 680px;
  bottom: -260px;
  right: -160px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.11) 0%, rgba(14, 165, 233, 0) 70%);
}

/* Glass surfaces */
.glass-card,
.glass-panel,
.glass-bar {
  background: var(--bg-surface);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--inner-highlight), 0 18px 48px -24px rgba(0, 0, 0, 0.78);
}

.glass-card {
  border-radius: var(--radius-lg);
}

.glass-panel {
  border-radius: var(--radius-md);
}

/* Icons */
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-sm {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Inputs */
.glass-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  transition: border-color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

.glass-input::placeholder {
  color: var(--text-muted);
}

.glass-input:hover:not(:disabled) {
  border-color: var(--border-hover);
}

.glass-input:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.glass-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mono-input {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out),
    color 140ms var(--ease-out), transform 70ms var(--ease-out);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.tab-btn:focus-visible,
.room-code-pill:focus-visible,
.brand-compact:focus-visible,
.nav-link:focus-visible,
.brand-link:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.btn:active:not(:disabled),
.icon-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled,
.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--accent-foreground);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: var(--border-hover);
}

.btn-danger-active {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fda4af;
}

.btn-danger-active:hover {
  background: rgba(244, 63, 94, 0.24);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-ghost.is-active-lock {
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--accent-primary);
  background: rgba(245, 158, 11, 0.09);
}

.btn-sm {
  min-height: 36px;
  padding: 0 13px;
  font-size: 0.8125rem;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 44px;
  padding: 0;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out),
    color 140ms var(--ease-out), transform 70ms var(--ease-out);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.icon-btn-danger:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

/* ==================== FULL WEBSITE LANDING ==================== */
.site-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-top: 0;
  border-left: 0;
  border-right: 0;
}

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-mark-sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.brand-mark-sm svg {
  width: 17px;
  height: 17px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  transition: color 140ms var(--ease-out);
}

.nav-link:hover {
  color: var(--text-primary);
}

.site-main {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Hero */
.hero-section {
  padding-top: 36px;
  padding-bottom: 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 40px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-live);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 54ch;
}

.launcher-card {
  margin-top: 6px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.launcher-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.label-optional {
  color: var(--text-muted);
  font-weight: 400;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.join-row {
  display: flex;
  gap: 8px;
}

.join-row .glass-input {
  flex: 1;
  min-width: 0;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
  font-size: 0.85rem;
}

/* Interactive Theater Preview Card */
.preview-window {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.preview-topbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.preview-room-id {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-primary);
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.preview-sync-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.preview-avatars {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #09090b;
  font-size: 0.64rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mini-count {
  margin-left: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.preview-body {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  min-height: 290px;
}

.preview-screen {
  background: radial-gradient(circle at 40% 35%, rgba(245, 158, 11, 0.14), rgba(9, 9, 11, 0.96) 68%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border-subtle);
}

.preview-cinema-art {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.preview-screen-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.7);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.preview-screen-badge svg {
  color: var(--accent-primary);
}

.preview-center-play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  margin: auto;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-center-play svg {
  width: 22px;
  height: 22px;
  margin-left: 2px;
}

.preview-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.preview-track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.preview-progress {
  width: 38%;
  height: 100%;
  background: var(--accent-primary);
}

.preview-chat {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(12, 12, 16, 0.45);
}

.preview-chat-header {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.preview-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.78rem;
}

.preview-author {
  font-weight: 600;
  font-size: 0.74rem;
}

.preview-text {
  color: var(--text-primary);
  line-height: 1.4;
}

.preview-chat-fake-input {
  margin-top: auto;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(9, 9, 11, 0.65);
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Content Sections */
.content-section {
  padding-top: 40px;
  padding-bottom: 56px;
}

.section-header {
  margin-bottom: 24px;
  max-width: 60ch;
}

.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.bento-card {
  grid-column: span 2;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bento-wide {
  grid-column: span 3;
}

.bento-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-icon-cool {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.28);
  color: #38bdf8;
}

.bento-icon svg {
  width: 19px;
  height: 19px;
}

.bento-title {
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bento-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.meta-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Steps */
.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
}

.step-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.step-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  margin-top: 24px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ==================== ROOM SHELL ==================== */
.room-shell {
  position: relative;
  z-index: 1;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.room-header {
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  flex-shrink: 0;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.brand-name-compact {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.room-code-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.room-code-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
}

.mono-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
}

.copy-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  min-height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-warn);
}

.status-dot.is-online {
  background: var(--status-live);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}

.status-dot.is-error {
  background: var(--status-danger);
}

.viewer-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Workspace split */
.room-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  padding: 14px;
}

.room-workspace.is-theater {
  grid-template-columns: minmax(0, 1fr);
}

.room-workspace.is-theater .sidebar {
  display: none;
}

.stage-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - 220px);
  background: #000000;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
}

.room-workspace.is-theater .player-frame {
  max-height: calc(100dvh - 205px);
}

.player-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-layer video,
.player-layer iframe,
#yt-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
}

.stage-empty {
  padding: 24px;
  text-align: center;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon svg {
  width: 26px;
  height: 26px;
}

.empty-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.empty-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.live-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  pointer-events: none;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-danger);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.8);
}

.unmute-floating {
  position: absolute;
  bottom: 58px;
  right: 16px;
  z-index: 6;
  pointer-events: auto;
}

.unmute-cta {
  padding: 0 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}

/* Media Dock */
.media-dock {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.now-playing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.now-playing-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.source-badge {
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.media-title-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.source-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.source-form .glass-input {
  flex: 1;
  min-width: 0;
}

.controls-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.controls-hint strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sidebar-tabs,
.mobile-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.mobile-tabs {
  display: none;
  border-left: 0;
  border-right: 0;
  border-top: 1px solid var(--border-subtle);
}

.tab-btn {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background-color 120ms var(--ease-out), color 120ms var(--ease-out);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.tab-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.sidebar-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.sidebar-panel.is-active {
  display: flex;
}

/* Chat */
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-item-system {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  max-width: 92%;
}

.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-author {
  font-size: 0.8125rem;
  font-weight: 600;
}

.chat-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.chat-bubble {
  margin: 0;
  padding: 8px 11px;
  border-radius: 4px 12px 12px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 0.875rem;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-item-self .chat-meta {
  justify-content: flex-end;
}

.chat-item-self .chat-bubble {
  align-self: flex-end;
  border-radius: 12px 4px 12px 12px;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.24);
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(9, 9, 11, 0.45);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  min-width: 0;
}

/* Viewers */
.profile-row {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.rename-form {
  display: flex;
  gap: 8px;
}

.viewers-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.viewer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.viewer-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.viewer-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #09090b;
  flex-shrink: 0;
}

.viewer-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.viewer-name {
  font-size: 0.875rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.32);
  color: var(--accent-primary);
  flex-shrink: 0;
}

.you-tag {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(18, 18, 22, 0.94);
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-subtitle {
  margin: -8px 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: rgba(24, 24, 28, 0.94);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.toast-error {
  border-color: rgba(244, 63, 94, 0.45);
  color: #fda4af;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */
@media (max-width: 959px) {
  .desktop-only {
    display: none !important;
  }

  .site-container {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
  }

  .hero-section {
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .launcher-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-body {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }

  .preview-screen {
    min-height: 180px;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .bento-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bento-card,
  .bento-wide {
    grid-column: span 1;
  }

  .steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .join-row {
    flex-direction: column;
  }

  .join-row .btn {
    width: 100%;
  }

  /* Room Mobile Layout */
  .room-header {
    height: 52px;
    padding: 0 10px;
  }

  .brand-name-compact,
  .copy-label,
  .status-text {
    display: none;
  }

  .status-indicator {
    padding: 0 8px;
  }

  .room-workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
  }

  .stage-column {
    display: contents;
  }

  .player-frame {
    order: 1;
    flex-shrink: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    max-height: 40dvh;
  }

  .mobile-tabs {
    order: 2;
    flex-shrink: 0;
    display: flex;
  }

  .tab-btn {
    min-height: 44px;
  }

  .media-dock {
    order: 3;
    display: none;
    border-radius: 0;
    border: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
  }

  .room-workspace[data-mobile-view="media"] .media-dock {
    display: flex;
  }

  .room-workspace[data-mobile-view="media"] .sidebar {
    display: none;
  }

  .sidebar {
    order: 3;
    flex: 1;
    min-height: 0;
    border-radius: 0;
    border: 0;
  }

  .source-form {
    flex-wrap: wrap;
  }

  .source-form .glass-input {
    flex: 1 1 100%;
  }

  .source-form .btn {
    flex: 1;
  }
}
