:root {
  --live-stage-width: 1024px;
  --live-stage-height: 768px;
  --live-bg: #07111f;
  --live-bg-2: #0b1b2d;
  --live-panel: rgba(255, 255, 255, .94);
  --live-panel-soft: rgba(255, 255, 255, .78);
  --live-ink: #0f2338;
  --live-muted: #657789;
  --live-border: rgba(17, 48, 76, .14);
  --live-border-strong: rgba(77, 217, 192, .28);
  --live-teal: #36d9c4;
  --live-cyan: #67d9ff;
  --live-blue: #2266f0;
  --live-red: #ff6b6b;
  --live-gold: #f3c850;
  --live-shadow: 0 24px 80px rgba(6, 17, 31, .18);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(77, 217, 192, .16), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(103, 217, 255, .14), transparent 34%),
    linear-gradient(135deg, #f5fbff 0%, #edf6fb 54%, #f8fbfd 100%);
  color: var(--live-ink);
}

html:has(body.viewer-mode),
body.viewer-mode {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background:
    radial-gradient(circle at 18% 82%, rgba(54, 217, 196, .16), transparent 30%),
    linear-gradient(180deg, #07111f 0%, #06101d 58%, #081827 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.live-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}

.live-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, rgba(11, 27, 45, .98), rgba(5, 13, 24, 1)),
    var(--live-bg);
  color: #eefbff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid rgba(103, 217, 255, .14);
  overflow-y: auto;
}

.live-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 4px;
}

.live-brand-mark {
  width: 44px;
  height: 44px;
  display: block;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.live-brand-mark svg {
  width: 44px;
  height: 44px;
  display: block;
}

.live-brand-title {
  display: grid;
  gap: 2px;
}

.live-wordmark {
  font-family: "Raleway", sans-serif;
  letter-spacing: .14em;
  font-size: .95rem;
  font-weight: 900;
  line-height: 1;
}

.live-submark {
  color: rgba(229, 246, 255, .66);
  font-size: .73rem;
  font-weight: 800;
}

.live-side-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(54, 217, 196, .12);
  border: 1px solid rgba(54, 217, 196, .22);
  color: #aefef3;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--live-red);
  box-shadow: 0 0 0 6px rgba(255, 107, 107, .14);
}

.live-nav-title {
  color: rgba(229, 246, 255, .52);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.live-stage-list {
  display: grid;
  gap: 8px;
}

.live-shortcuts-nav {
  display: none;
}

.stage-button {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 15px;
  background: rgba(255, 255, 255, .04);
  color: rgba(240, 250, 255, .76);
  text-align: left;
}

.stage-button span:first-child {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .07);
  color: var(--live-teal);
}

.stage-button strong {
  display: block;
  color: inherit;
  font-size: .84rem;
}

.stage-button small {
  display: block;
  margin-top: 1px;
  color: rgba(229, 246, 255, .5);
  font-size: .68rem;
}

.stage-button.active,
.stage-button:hover {
  border-color: rgba(54, 217, 196, .42);
  background: rgba(54, 217, 196, .12);
  color: #fff;
}

.live-side-footer {
  margin-top: 2px;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}

.live-side-footer strong {
  display: block;
  font-size: .82rem;
}

.live-side-footer p {
  margin: 6px 0 0;
  color: rgba(229, 246, 255, .62);
  font-size: .76rem;
  line-height: 1.45;
}

.watch-toggle {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.watch-toggle button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .05);
  color: rgba(240, 250, 255, .72);
  font-size: .76rem;
  font-weight: 850;
}

.watch-toggle button.active,
.watch-toggle button:hover {
  border-color: rgba(54, 217, 196, .36);
  background: rgba(54, 217, 196, .14);
  color: #fff;
}

.live-main {
  min-width: 0;
  padding: 8px;
}

.live-topbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.live-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #087b82;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.live-title {
  margin: 4px 0 0;
  font-family: "Raleway", sans-serif;
  font-size: clamp(1.45rem, 2vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.live-top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.live-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  border: 1px solid var(--live-border);
  background: rgba(255, 255, 255, .78);
  color: var(--live-ink);
  padding: 10px 14px;
  font-weight: 850;
  box-shadow: 0 12px 30px rgba(17, 48, 76, .08);
  text-decoration: none;
}

.live-btn.primary {
  border-color: rgba(20, 132, 150, .22);
  background: linear-gradient(135deg, #0b8a94, #36d9c4);
  color: #fff;
}

.live-btn.dark {
  background: #0b1b2d;
  color: #f2fbff;
  border-color: rgba(103, 217, 255, .18);
}

.live-btn.danger {
  background: rgba(239, 68, 68, .1);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, .26);
}

.live-btn.danger:hover {
  background: rgba(239, 68, 68, .16);
}

.end-room-btn {
  display: none;
}

.host-mode.room-live .end-room-btn {
  display: inline-flex;
}

.live-btn:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.live-view {
  display: none;
}

.live-view.active {
  display: block;
}

.preflight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  gap: 18px;
}

.live-card {
  border: 1px solid var(--live-border);
  border-radius: 24px;
  background: var(--live-panel);
  box-shadow: var(--live-shadow);
}

.preflight-hero {
  min-height: 580px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.preflight-hero:before {
  content: "";
  position: absolute;
  inset: auto -12% -25% 36%;
  height: 280px;
  background: radial-gradient(circle, rgba(54, 217, 196, .18), transparent 70%);
  pointer-events: none;
}

.preflight-hero h2,
.waiting-card h2 {
  margin: 10px 0 10px;
  max-width: 820px;
  font-family: "Raleway", sans-serif;
  font-size: clamp(2rem, 4.4vw, 4.7rem);
  line-height: .96;
  letter-spacing: 0;
}

.preflight-hero p,
.waiting-card p {
  margin: 0;
  max-width: 700px;
  color: var(--live-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.preflight-preview {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  position: relative;
}

.preview-tile {
  padding: 16px;
  min-height: 134px;
  border-radius: 20px;
  border: 1px solid var(--live-border);
  background: rgba(255, 255, 255, .72);
  display: grid;
  align-content: space-between;
}

.preview-tile svg {
  width: 28px;
  height: 28px;
  color: #0b8a94;
}

.preview-tile strong {
  display: block;
  margin-top: 10px;
  font-size: .95rem;
}

.preview-tile small {
  color: var(--live-muted);
  font-size: .75rem;
  line-height: 1.35;
}

.preflight-panel {
  padding: 22px;
}

.panel-title {
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #087b82;
  margin-bottom: 14px;
}

.check-list {
  display: grid;
  gap: 12px;
}

.check-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border-radius: 17px;
  border: 1px solid var(--live-border);
  background: rgba(255, 255, 255, .66);
}

.check-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgba(54, 217, 196, .13);
  color: #0b8a94;
}

.check-copy strong {
  display: block;
  font-size: .9rem;
}

.check-copy small {
  display: block;
  margin-top: 3px;
  color: var(--live-muted);
  font-size: .73rem;
}

.status-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(9, 32, 53, .08);
  color: #29455c;
  font-size: .68rem;
  font-weight: 850;
}

.status-pill.good {
  background: rgba(54, 211, 153, .16);
  color: #08784e;
}

.proposal-required-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(17, 48, 76, .12);
  background: rgba(244, 249, 252, .82);
  display: grid;
  gap: 9px;
}

.proposal-required-box p {
  margin: -4px 0 2px;
  color: var(--live-muted);
  font-size: .78rem;
  line-height: 1.42;
}

.proposal-required-box label {
  color: #087b82;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.proposal-required-box input,
.proposal-required-box select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--live-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, .78);
  color: var(--live-ink);
  padding: 0 11px;
}

.proposal-required-box small {
  color: var(--live-muted);
  font-size: .72rem;
}

.room-link-box {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.active-room-link-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(17, 48, 76, .1);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(233, 252, 249, .66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}

.room-link-title {
  color: #0f8c91;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.room-link-box input {
  width: 100%;
  border: 1px solid var(--live-border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, .76);
  color: var(--live-ink);
}

.qr-box {
  min-height: 148px;
  border-radius: 18px;
  border: 1px solid rgba(17, 48, 76, .12);
  background:
    linear-gradient(90deg, rgba(7, 17, 31, .12) 8px, transparent 8px) 0 0/18px 18px,
    linear-gradient(rgba(7, 17, 31, .1) 8px, transparent 8px) 0 0/18px 18px,
    rgba(255, 255, 255, .72);
  display: grid;
  place-items: center;
  color: var(--live-muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  overflow: hidden;
  text-align: center;
  line-height: 1.25;
}

.qr-box img {
  width: min(172px, 100%);
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(5, 13, 24, .14);
}

.active-qr-box {
  min-height: 184px;
}

.active-qr-box img {
  width: min(184px, 100%);
}

.host-mode .live-progress-strip {
  display: none;
}

.host-mode.room-live .live-topbar,
.host-mode.room-live .adapter-banner,
.host-mode.room-live .adapter-banner.active {
  display: none;
}

.host-mode.room-live .room-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  height: calc(100vh - 16px);
}

.host-mode.room-live .room-rail {
  position: fixed;
  left: 12px;
  top: 154px;
  bottom: 12px;
  z-index: 12;
  width: 186px;
  min-width: 0;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(155px, .8fr) minmax(220px, 1.2fr);
  gap: 8px;
  overflow: auto;
  padding-right: 0;
}

.host-mode.room-live .live-shell {
  grid-template-columns: 210px minmax(0, 1fr);
}

.host-mode.room-live .live-sidebar {
  gap: 12px;
  overflow: hidden;
}

.host-mode.room-live .live-side-footer,
.host-mode.room-live #cameraFocusBtn,
.host-mode.room-live #startScreenShareTopBtn,
.host-mode.room-live #startScreenShareBtn,
.host-mode.room-live .active-room-link-box,
.host-mode.room-live .screen-share-note {
  display: none !important;
}

.host-mode.room-live .call-card {
  order: -1;
}

.host-mode.room-live .audience-card {
  display: none;
}

.host-mode.room-live .call-card .call-head,
.host-mode.room-live .call-card .video-tile,
.host-mode.room-live .call-card .video-meta {
  display: none;
}

.host-mode.room-live .host-call-actions,
.host-mode.room-live .host-media-actions {
  display: grid;
  gap: 6px;
}

.host-mode.room-live .host-call-actions .live-btn,
.host-mode.room-live .host-media-actions .live-btn,
.host-mode.room-live .chat-form .live-btn {
  min-height: 34px;
  padding: 8px 9px;
  border-radius: 10px;
  font-size: .7rem;
}

.room-grid {
  display: block;
  height: calc(100vh - 64px);
  min-height: 620px;
  position: relative;
}

.host-mode.room-live .call-card {
  padding: 12px;
}

.host-mode.room-live .video-tile {
  min-height: 300px;
  height: clamp(300px, 38vh, 420px);
  border-radius: 18px;
}

.host-mode.room-live .video-tile iframe {
  min-height: 300px;
}

.host-mode.room-live .host-call-actions {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
}

.host-mode.room-live .host-media-actions {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.host-mode.room-live .host-call-actions .live-btn,
.host-mode.room-live .host-media-actions .live-btn,
.host-mode.room-live .speaker-head .live-btn,
.host-mode.room-live .chat-form .live-btn {
  min-height: 38px;
  padding: 8px 10px;
  font-size: .72rem;
}

.host-mode.room-live .call-head,
.host-mode.room-live .audience-head,
.host-mode.room-live .speaker-head,
.host-mode.room-live .chat-head {
  margin-bottom: 7px;
}

.host-mode.room-live .call-head small,
.host-mode.room-live .audience-head small,
.host-mode.room-live .speaker-head small,
.host-mode.room-live .chat-head small {
  display: none;
}

.host-mode.room-live .call-head small {
  display: block;
}

.host-mode.room-live .video-meta {
  margin-top: 7px;
  font-size: .68rem;
}

.host-mode.room-live .audience-card,
.host-mode.room-live .speaker-card {
  padding: 10px;
}

.host-mode.room-live .audience-list,
.host-mode.room-live .speaker-list {
  max-height: 104px;
  gap: 6px;
}

.host-mode.room-live .audience-person,
.host-mode.room-live .speaker-request {
  padding: 6px;
  border-radius: 11px;
}

.host-mode.room-live .speaker-active {
  padding: 8px 9px;
  border-radius: 12px;
  font-size: .72rem;
}

.host-mode.room-live .chat-head {
  padding: 10px 12px;
}

.host-mode.room-live .chat-list {
  padding: 10px;
  gap: 7px;
  min-height: 118px;
}

.host-mode.room-live .chat-message {
  padding: 8px 9px;
  border-radius: 12px;
}

.host-mode.room-live .chat-form {
  padding: 8px;
  gap: 6px;
}

.host-mode.room-live .chat-form input {
  padding: 8px 9px;
  border-radius: 11px;
}

.stage-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.stage-toolbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--live-border);
  background: rgba(255, 255, 255, .82);
}

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

.stage-title strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-title small {
  display: block;
  margin-top: 2px;
  color: var(--live-muted);
  font-size: .72rem;
}

.stage-chip {
  border-radius: 12px;
  background: rgba(54, 217, 196, .14);
  color: #0b7f86;
  padding: 8px;
  display: grid;
  place-items: center;
}

.stage-frame-wrap {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding-top: 24px;
  background:
    radial-gradient(circle at 25% 15%, rgba(54, 217, 196, .14), transparent 30%),
    linear-gradient(135deg, #06111d, #0b1b2d);
}

.stage-browser-bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  min-height: 24px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 13, 24, .92);
  color: rgba(229, 246, 255, .76);
  font-size: .68rem;
  font-weight: 800;
}

.live-mini-pill {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 107, 107, .18);
  color: #ff8d8d;
  font-size: .58rem;
  letter-spacing: .08em;
  font-weight: 900;
}

.stage-url {
  color: rgba(244, 251, 255, .92);
}

.stage-follow-label {
  margin-left: auto;
  color: rgba(229, 246, 255, .58);
}

.stage-frame {
  border: 0;
  display: block;
  background: #fff;
}

.host-mode .stage-frame {
  position: absolute;
  top: 24px;
  left: 50%;
  width: var(--live-stage-width);
  height: var(--live-stage-height);
  transform: translateX(-50%) scale(var(--host-stage-scale, 1));
  transform-origin: top center;
  border-radius: 0 0 18px 18px;
}

.host-mode .stage-mirror-surface {
  top: 24px;
  left: 50%;
  right: auto;
  bottom: auto;
  width: var(--live-stage-width);
  height: var(--live-stage-height);
  border-radius: 0 0 18px 18px;
  transform: translateX(-50%) scale(var(--host-stage-scale, 1));
  transform-origin: top center;
}

.stage-mirror-surface {
  position: absolute;
  inset: 24px 0 0;
  z-index: 1;
  display: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(54, 217, 196, .18), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(103, 217, 255, .14), transparent 34%),
    linear-gradient(135deg, #edf8fb, #f8fbfd);
  color: #0f2338;
  pointer-events: none;
}

.stage-mirror-surface.active {
  display: block;
}

.stage-mirror-surface.visual-snapshot {
  display: block;
  z-index: 3;
  background: #fff;
}

.stage-mirror-surface.visual-snapshot iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
  pointer-events: none;
}

.mirror-dashboard {
  height: 100%;
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  background: transparent;
}

.mirror-sidebar {
  padding: 20px 16px;
  background: linear-gradient(180deg, #07111f, #0b1b2d);
  color: #effcff;
}

.mirror-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  font-family: "Raleway", sans-serif;
  font-size: .76rem;
}

.mirror-logo img {
  width: 30px;
  height: 30px;
}

.mirror-menu {
  margin-top: 24px;
  display: grid;
  gap: 9px;
}

.mirror-menu span {
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: rgba(239, 252, 255, .72);
  font-weight: 800;
  font-size: .78rem;
}

.mirror-menu span.active {
  background: rgba(54, 217, 196, .16);
  color: #fff;
}

.mirror-main {
  padding: 26px;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 18px;
}

.mirror-main h2 {
  margin: 8px 0 4px;
  font-family: "Raleway", sans-serif;
  font-size: clamp(1.95rem, 3.4vw, 3.2rem);
  line-height: 1;
}

.mirror-main p {
  margin: 0;
  color: rgba(15, 35, 56, .68);
  font-weight: 700;
}

.mirror-stage-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(210px, .8fr);
  gap: 16px;
  align-items: stretch;
}

.mirror-app-window,
.mirror-status-panel {
  border-radius: 22px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(17, 48, 76, .1);
  box-shadow: 0 18px 54px rgba(17, 48, 76, .08);
  overflow: hidden;
}

.mirror-window-bar {
  min-height: 34px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(7, 17, 31, .92);
  color: rgba(239, 252, 255, .72);
  font-size: .68rem;
  font-weight: 900;
}

.mirror-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--live-teal);
  box-shadow: 0 0 0 4px rgba(54, 217, 196, .16);
}

.mirror-app-body {
  min-height: 300px;
  padding: 22px;
  background:
    linear-gradient(rgba(34, 102, 240, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 102, 240, .035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(239, 249, 253, .88));
  background-size: 34px 34px, 34px 34px, auto;
}

.mirror-stage-card {
  min-height: 244px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 82% 22%, rgba(54, 217, 196, .18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(245, 251, 253, .92));
  border: 1px solid rgba(17, 48, 76, .1);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 26px;
}

.mirror-stage-card strong {
  display: block;
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  font-family: "Raleway", sans-serif;
}

.mirror-stage-card p {
  max-width: 520px;
  margin: 9px auto 0;
}

.mirror-stage-badges {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mirror-stage-badges span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(54, 217, 196, .13);
  color: #087b82;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mirror-status-panel {
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 13px;
}

.mirror-status-row {
  min-height: 58px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(7, 17, 31, .045);
  border: 1px solid rgba(17, 48, 76, .08);
}

.mirror-status-row small {
  display: block;
  color: rgba(15, 35, 56, .48);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.mirror-status-row strong {
  display: block;
  margin-top: 4px;
  color: #10243a;
  font-size: .9rem;
}

.viewer-live-stage {
  display: none;
}

.viewer-daily-mount {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 8;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(103, 217, 255, .24);
  background: rgba(5, 13, 24, .92);
  box-shadow: 0 18px 56px rgba(0, 0, 0, .34);
}

.viewer-mode .viewer-daily-mount {
  width: var(--viewer-camera-width, min(76vw, 320px));
  height: var(--viewer-camera-height, min(34vw, 156px));
  left: 50%;
  right: auto;
  top: var(--viewer-camera-top, 52px);
  transform: translateX(-50%);
  opacity: 1;
  pointer-events: auto;
  border-radius: 30px;
  border: 1px solid rgba(103, 217, 255, .34);
  box-shadow: 0 22px 70px rgba(0, 0, 0, .42), 0 0 0 1px rgba(255,255,255,.06) inset;
}

.viewer-mode .stage-frame-wrap.camera-focus .viewer-daily-mount {
  width: min(78vw, 520px);
  height: min(78vw, 520px);
  max-height: min(58vh, 520px);
  left: 50%;
  right: auto;
  top: 54%;
  bottom: auto;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid rgba(103, 217, 255, .42);
  z-index: 9;
  background: rgba(2, 8, 18, .94);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .58), 0 0 0 1px rgba(255,255,255,.08) inset;
}

.viewer-mode .stage-frame-wrap.camera-focus .viewer-daily-mount iframe {
  border-radius: 999px !important;
}

.viewer-mode.camera-hidden .viewer-daily-mount {
  transform: translateX(calc(-50% + var(--viewer-camera-width, 320px) + 18px));
  opacity: .76;
}

.viewer-daily-mount iframe,
.video-tile iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

.host-daily-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #07111f;
}

.host-daily-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #f4fbff;
  font-weight: 900;
  text-align: center;
}

.viewer-host-video,
.viewer-video-fallback {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
}

.viewer-host-video {
  display: none;
  object-fit: cover;
  background: rgba(5, 13, 24, .96);
}

.viewer-video-fallback {
  display: grid;
  place-items: center;
  gap: 4px;
  color: rgba(244, 251, 255, .82);
  font-size: .66rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.viewer-video-fallback img {
  width: 44%;
  height: 44%;
  object-fit: contain;
}

.viewer-live-empty {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(circle at 28% 18%, rgba(54, 217, 196, .18), transparent 32%),
    linear-gradient(135deg, #07111f, #0b1b2d);
  color: #f4fbff;
}

.viewer-mode.room-ended .viewer-live-empty {
  z-index: 30;
  display: grid !important;
}

.viewer-mode.room-ended .stage-frame,
.viewer-mode.room-ended .stage-mirror-surface,
.viewer-mode.room-ended .viewer-live-stage,
.viewer-mode.room-ended .viewer-daily-mount,
.viewer-mode.room-ended .viewer-screen-video,
.viewer-mode.room-ended .viewer-screen-audio,
.viewer-mode.room-ended .host-camera-bubble {
  display: none !important;
}

.viewer-live-empty strong {
  font-family: "Raleway", sans-serif;
  font-size: clamp(1.3rem, 5vw, 2.6rem);
}

.viewer-live-empty span {
  max-width: 360px;
  color: rgba(229, 246, 255, .68);
  line-height: 1.45;
}

.viewer-zoom-hint,
.camera-bubble-hide {
  display: none;
}

.pointer-chip {
  display: none;
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(5, 13, 24, .84);
  color: #f3ffff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
  font-size: .76rem;
  font-weight: 850;
}

.pointer-chip.active {
  display: inline-flex;
}

.host-camera-bubble {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  min-width: 184px;
  max-width: min(240px, calc(100% - 36px));
  padding: 10px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 24px;
  border: 1px solid rgba(103, 217, 255, .24);
  background: rgba(5, 13, 24, .88);
  color: #f4fbff;
  box-shadow: 0 20px 60px rgba(5, 13, 24, .28);
  backdrop-filter: blur(12px);
}

.host-mode .host-camera-bubble {
  display: none;
}

.bubble-avatar {
  width: 54px;
  height: 54px;
  border-radius: 19px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(54, 217, 196, .26), rgba(34, 102, 240, .32));
  border: 1px solid rgba(54, 217, 196, .3);
  font-weight: 900;
}

.bubble-avatar img,
.video-avatar img {
  width: 72%;
  height: 72%;
  object-fit: contain;
  display: block;
}

.host-camera-bubble strong,
.host-camera-bubble small {
  display: block;
}

.host-camera-bubble small {
  margin-top: 2px;
  color: rgba(229, 246, 255, .66);
  font-size: .72rem;
}

.camera-focus-pane {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  padding: 24px;
  background:
    radial-gradient(circle at 35% 20%, rgba(54, 217, 196, .14), transparent 34%),
    linear-gradient(135deg, #07111f, #0b1b2d);
}

.camera-focus-brand {
  position: absolute;
  left: 50%;
  top: 32px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
  color: #f4fbff;
  font-family: Raleway, sans-serif;
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: 0;
  pointer-events: none;
}

.camera-focus-brand img {
  width: 34px;
  height: 34px;
  display: block;
}

.stage-frame-wrap.camera-focus .camera-focus-pane {
  display: grid;
  place-items: center;
}

.stage-frame-wrap.camera-focus .stage-browser-bar,
.stage-frame-wrap.camera-focus .stage-follow-label {
  display: none;
}

.stage-frame-wrap.camera-focus .stage-frame {
  opacity: 0;
  pointer-events: none;
}

.stage-frame-wrap.camera-focus .host-camera-bubble {
  display: none;
}

.camera-focus-card {
  width: min(1040px, 100%);
  height: 100%;
  display: grid;
  align-items: stretch;
  color: #f4fbff;
}

.camera-focus-video {
  min-height: min(70vh, 620px);
  height: 100%;
  border-radius: 34px;
  border: 1px solid rgba(103, 217, 255, .22);
  background:
    radial-gradient(circle at 28% 18%, rgba(54, 217, 196, .2), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .28);
}

.camera-focus-placeholder {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
}

.host-camera-main .camera-focus-placeholder {
  display: none;
}

.camera-focus-video .video-tile {
  width: 100%;
  height: 100%;
  min-height: min(70vh, 620px);
  border-radius: 30px;
  background: rgba(2, 8, 18, .92);
}

.camera-focus-video .video-tile iframe {
  border-radius: 30px !important;
}

.camera-focus-copy {
  display: none;
}

.room-rail {
  position: absolute;
  z-index: 8;
  top: 60px;
  right: 10px;
  width: min(250px, 24vw);
  min-width: 210px;
  display: grid;
  grid-template-rows: auto auto auto minmax(220px, 1fr);
  gap: 10px;
  max-height: calc(100% - 70px);
  overflow: auto;
  padding-right: 2px;
}

.viewer-bottom-bar {
  display: none;
}

.viewer-mode .live-shell {
  grid-template-columns: 1fr;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 82%, rgba(54, 217, 196, .16), transparent 30%),
    linear-gradient(180deg, #07111f 0%, #06101d 58%, #081827 100%);
}

.viewer-mode .live-sidebar,
.viewer-mode .live-topbar,
.viewer-mode .live-progress-strip,
.viewer-mode .adapter-banner,
.viewer-mode .adapter-banner.active,
.viewer-mode .stage-toolbar .live-top-actions,
.viewer-mode #copyViewerLinkBtn,
.viewer-mode #startRoomBtn {
  display: none;
}

.viewer-mode .live-main {
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.viewer-mode .room-grid {
  height: 100vh;
  min-height: 0;
  display: block;
}

.viewer-mode .stage-card {
  height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.viewer-mode .stage-frame-wrap {
  --viewer-camera-width: min(86vw, 370px);
  --viewer-camera-height: min(39vw, 168px);
  --viewer-camera-top: 78px;
  touch-action: none;
  height: 100vh;
  overflow: hidden;
  overscroll-behavior: none;
}

.viewer-mode .stage-toolbar {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  min-height: auto;
  max-width: min(420px, calc(100% - 24px));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #eafaff;
}

.viewer-mode .stage-title {
  justify-content: center;
  text-align: center;
  gap: 0;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .42));
}

.viewer-mode .stage-chip {
  display: none;
}

.viewer-mode .stage-title strong {
  color: #eafaff;
  font-family: "DM Mono", monospace;
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.viewer-mode .stage-title small {
  display: none;
}

.viewer-mode .viewer-live-stage {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: #07111f;
  overscroll-behavior: none;
}

.viewer-screen-video {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020812;
  pointer-events: none;
  transform: translate(var(--viewer-screen-pan-x, 0px), var(--viewer-screen-pan-y, 0px)) scale(var(--viewer-screen-zoom, 1));
  transform-origin: center center;
}

.viewer-mode.screen-share-live .viewer-live-stage {
  z-index: 4;
}

.viewer-mode.screen-share-live .viewer-screen-video {
  display: block;
}

.viewer-mode.screen-share-live .stage-frame-wrap.camera-focus .viewer-screen-video {
  display: none;
}

.viewer-mode .stage-frame-wrap.camera-focus .viewer-live-stage,
.viewer-mode .stage-frame-wrap.camera-focus .viewer-daily-mount,
.viewer-mode .stage-frame-wrap.camera-focus .viewer-host-video,
.viewer-mode .stage-frame-wrap.camera-focus .viewer-video-fallback {
  border-radius: 999px;
}

.viewer-mode .stage-frame-wrap.camera-focus .stage-toolbar,
.viewer-mode .stage-frame-wrap.camera-focus .stage-frame,
.viewer-mode .stage-frame-wrap.camera-focus .stage-mirror-surface,
.viewer-mode .stage-frame-wrap.camera-focus .viewer-screen-video,
.viewer-mode .stage-frame-wrap.camera-focus .viewer-live-empty {
  opacity: 0;
  pointer-events: none;
}

.viewer-mode .stage-frame-wrap.camera-focus .camera-focus-pane {
  display: block;
  padding: 0;
  background:
    radial-gradient(circle at 50% 31%, rgba(54, 217, 196, .17), transparent 28%),
    linear-gradient(145deg, #020812 0%, #071322 55%, #0b1725 100%);
}

.viewer-mode .stage-frame-wrap.camera-focus .camera-focus-brand {
  top: clamp(28px, 8vh, 72px);
  font-size: clamp(1.32rem, 5vw, 2.7rem);
  letter-spacing: 0;
  text-transform: uppercase;
}

.viewer-mode .stage-frame-wrap.camera-focus .camera-focus-brand img {
  width: clamp(36px, 10vw, 70px);
  height: clamp(36px, 10vw, 70px);
}

.viewer-mode .stage-frame-wrap.camera-focus .camera-focus-card,
.viewer-mode .stage-frame-wrap.camera-focus .camera-focus-video {
  display: contents;
}

.viewer-mode .stage-frame-wrap.camera-focus .camera-focus-placeholder,
.viewer-mode .stage-frame-wrap.camera-focus .camera-focus-copy {
  display: none;
}

.viewer-mode .stage-frame-wrap.camera-focus .viewer-host-video,
.viewer-mode .stage-frame-wrap.camera-focus .viewer-video-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020812;
}

.viewer-mode .stage-frame-wrap.camera-focus .viewer-video-fallback {
  display: grid;
  place-items: center;
}

.viewer-mode.screen-share-live .stage-frame,
.viewer-mode.screen-share-live .stage-mirror-surface {
  opacity: 0;
  pointer-events: none;
}

.viewer-mode.room-live .viewer-live-empty {
  display: none;
}

.viewer-mode .stage-frame {
  position: absolute;
  top: var(--viewer-stage-top, 98px);
  left: 50%;
  width: var(--live-stage-width);
  height: var(--live-stage-height);
  opacity: 1;
  pointer-events: none;
  border-radius: 0;
  box-shadow: none;
  transform: translate(calc(-50% + var(--viewer-stage-pan-x, 0px)), var(--viewer-stage-pan-y, 0px)) scale(var(--viewer-stage-scale, .34));
  transform-origin: top center;
}

.viewer-mode .stage-mirror-surface.visual-snapshot + * {
  pointer-events: none;
}

.viewer-mode .stage-mirror-surface {
  top: var(--viewer-stage-top, 98px);
  left: 50%;
  right: auto;
  bottom: auto;
  width: var(--live-stage-width);
  height: var(--live-stage-height);
  border-radius: 0;
  box-shadow: none;
  transform: translate(calc(-50% + var(--viewer-stage-pan-x, 0px)), var(--viewer-stage-pan-y, 0px)) scale(var(--viewer-stage-scale, .34));
  transform-origin: top center;
}

.viewer-mode .host-camera-bubble {
  display: none;
  min-width: 126px;
  width: 126px;
  height: 126px;
  grid-template-columns: 1fr;
  padding: 5px;
  left: 50%;
  right: auto;
  top: 58px;
  bottom: auto;
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .32);
}

.viewer-mode.camera-hidden .host-camera-bubble {
  transform: translateX(calc(-50% + 132px));
  opacity: .72;
}

.viewer-mode .bubble-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  font-size: 1rem;
}

.viewer-mode .host-camera-bubble strong,
.viewer-mode .host-camera-bubble small {
  display: none;
}

.viewer-mode .camera-bubble-hide {
  display: none;
}

.viewer-mode .viewer-zoom-hint {
  display: none;
}

.viewer-mode .room-rail {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 128px;
  z-index: 6;
  display: none;
  grid-template-rows: auto;
  max-height: min(68vh, 620px);
  overflow: auto;
  align-content: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(103, 217, 255, .14);
  border-radius: 24px;
  background: rgba(5, 13, 24, .88);
  box-shadow: 0 28px 90px rgba(5, 13, 24, .42);
  backdrop-filter: blur(18px);
}

.viewer-mode.viewer-chat-open .room-rail {
  display: grid;
}

.viewer-mode.viewer-chat-open {
  --viewer-chat-drawer-height: min(38vh, 330px);
  --viewer-bottom-controls-height: 96px;
}

.viewer-mode.viewer-chat-open .stage-card,
.viewer-mode.viewer-chat-open .stage-frame-wrap {
  height: calc(100vh - var(--viewer-chat-drawer-height) - var(--viewer-bottom-controls-height) - 10px);
}

.viewer-mode.viewer-chat-open .room-rail {
  top: auto;
  bottom: calc(var(--viewer-bottom-controls-height) + 2px);
  height: var(--viewer-chat-drawer-height);
  max-height: var(--viewer-chat-drawer-height);
  align-content: start;
  grid-template-rows: minmax(0, 1fr);
  background:
    radial-gradient(circle at 12% 0%, rgba(54, 217, 196, .22), transparent 38%),
    linear-gradient(180deg, rgba(7, 25, 43, .98), rgba(4, 12, 23, .99));
}

.viewer-mode.viewer-chat-open .viewer-daily-mount,
.viewer-mode.viewer-chat-open .host-camera-bubble {
  opacity: 0;
  pointer-events: none;
}

.viewer-mode.viewer-chat-open .chat-card {
  height: 100%;
  min-height: 0;
  display: flex;
}

.viewer-mode.viewer-chat-open .chat-head {
  padding-right: 46px;
}

.viewer-mode.viewer-chat-open .chat-list {
  flex: 1 1 auto;
  max-height: none;
  overflow: auto;
  touch-action: pan-y;
}

.viewer-sheet-close {
  display: none;
}

.viewer-mode .viewer-sheet-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  margin-left: auto;
  width: 30px;
  min-height: 30px;
  border: 1px solid rgba(103, 217, 255, .18);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 27, 45, .96);
  color: #f4fbff;
  font-weight: 900;
  box-shadow: 0 16px 44px rgba(5, 13, 24, .24);
}

.viewer-mode .call-card,
.viewer-mode .audience-card {
  display: none !important;
}

.viewer-mode .speaker-card,
.viewer-mode .chat-card {
  border-radius: 22px;
  border: 1px solid rgba(103, 217, 255, .18);
  background:
    radial-gradient(circle at 16% 0%, rgba(54, 217, 196, .16), transparent 34%),
    linear-gradient(145deg, rgba(8, 28, 47, .94), rgba(5, 13, 24, .96));
  color: #eafaff;
  box-shadow: 0 20px 66px rgba(0, 0, 0, .3);
}

.viewer-mode .chat-card {
  flex: none;
  min-height: 300px;
}

.viewer-mode .chat-list {
  flex: 0 1 auto;
  max-height: 190px;
  background:
    radial-gradient(circle at 12% 0%, rgba(54, 217, 196, .13), transparent 32%),
    rgba(5, 13, 24, .34);
}

.viewer-mode .chat-head {
  color: #eafaff;
}

.viewer-mode .chat-head small {
  color: rgba(229, 250, 255, .58);
}

.viewer-mode .chat-message {
  border: 1px solid rgba(103, 217, 255, .16);
  background: rgba(234, 250, 255, .08);
  color: #f3ffff;
}

.viewer-mode .chat-message strong {
  color: #67d9ff;
}

.viewer-mode .chat-message.host {
  border-color: rgba(54, 217, 196, .24);
  background: rgba(54, 217, 196, .12);
}

.viewer-mode .chat-time {
  color: rgba(104, 224, 200, .86);
}

.viewer-mode .chat-text {
  color: rgba(243, 255, 255, .92);
}

.viewer-mode .chat-form {
  border-top-color: rgba(103, 217, 255, .13);
  background: rgba(5, 13, 24, .26);
}

.viewer-mode .chat-form input {
  border-color: rgba(103, 217, 255, .22);
  background: rgba(234, 250, 255, .08);
  color: #f3ffff;
  touch-action: auto;
}

.viewer-mode .chat-form input::placeholder {
  color: rgba(229, 250, 255, .54);
}

.viewer-mode .speaker-card {
  display: none;
}

.viewer-mode.viewer-chat-open .speaker-card {
  display: block;
}

.viewer-mode .viewer-bottom-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 12px;
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 48px;
  align-items: end;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.viewer-mode #viewerWatchScreenBtn,
.viewer-mode #viewerWatchCameraBtn {
  display: none;
}

.viewer-control {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .06);
  color: rgba(244, 251, 255, .86);
  font-size: .76rem;
  font-weight: 900;
}

.viewer-icon-control {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 35% 20%, rgba(255, 255, 255, .18), transparent 44%),
    rgba(5, 13, 24, .82);
  box-shadow: 0 15px 42px rgba(0, 0, 0, .28);
  backdrop-filter: blur(14px);
}

.viewer-icon-control svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.viewer-icon-control span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.viewer-control.primary {
  border-color: rgba(54, 217, 196, .34);
  background: linear-gradient(135deg, rgba(11, 138, 148, .9), rgba(54, 217, 196, .82));
  color: #fff;
}

.viewer-control.primary.requested {
  border-color: rgba(243, 200, 80, .42);
  background: linear-gradient(135deg, rgba(126, 93, 12, .92), rgba(243, 200, 80, .82));
}

.viewer-control.primary.approved,
.viewer-control.primary.live {
  border-color: rgba(103, 217, 255, .42);
  background: linear-gradient(135deg, rgba(18, 91, 150, .92), rgba(103, 217, 255, .82));
}

.viewer-speak-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
}

.viewer-speak-modal.open {
  display: flex;
}

.viewer-speak-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 9, 18, .62);
  backdrop-filter: blur(8px);
}

.viewer-speak-card {
  position: relative;
  z-index: 1;
  width: min(100%, 390px);
  padding: 22px;
  border: 1px solid rgba(103, 217, 255, .2);
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 0%, rgba(54, 217, 196, .18), transparent 38%),
    linear-gradient(145deg, rgba(8, 28, 47, .98), rgba(5, 13, 24, .98));
  color: #f4fbff;
  box-shadow: 0 28px 86px rgba(0, 0, 0, .44);
}

.viewer-speak-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: #f4fbff;
  font-size: 1.15rem;
  font-weight: 900;
}

.viewer-speak-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(54, 217, 196, .28);
  border-radius: 22px;
  background: rgba(54, 217, 196, .14);
  color: #68e0c8;
}

.viewer-speak-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.viewer-speak-card h2 {
  margin: 0 34px 8px 0;
  font-family: 'Raleway', sans-serif;
  font-size: 1.28rem;
  line-height: 1.15;
}

.viewer-speak-card p {
  margin: 0;
  color: rgba(229, 250, 255, .72);
  font-size: .88rem;
  font-weight: 750;
  line-height: 1.42;
}

.viewer-speak-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.viewer-control.active {
  border-color: rgba(54, 217, 196, .42);
  background: rgba(54, 217, 196, .14);
  color: #fff;
}

.viewer-chat-preview {
  min-height: 78px;
  max-height: 88px;
  padding: 9px 11px;
  overflow: hidden;
  border: 1px solid rgba(103, 217, 255, .16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 0%, rgba(54, 217, 196, .2), transparent 38%),
    linear-gradient(135deg, rgba(5, 13, 24, .9), rgba(8, 28, 47, .86));
  color: #eafaff;
  box-shadow: 0 18px 58px rgba(0, 0, 0, .28);
  backdrop-filter: blur(16px);
}

.viewer-chat-preview-title {
  margin-bottom: 4px;
  color: rgba(103, 217, 255, .86);
  font-size: .58rem;
  font-weight: 950;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.viewer-chat-preview-lines {
  display: grid;
  gap: 3px;
}

.viewer-chat-preview-lines span {
  min-width: 0;
  overflow: hidden;
  color: rgba(243, 255, 255, .86);
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-chat-preview-lines strong {
  color: #67d9ff;
}

.viewer-chat-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 132px;
  z-index: 60;
  min-height: 58px;
  padding: 12px 14px;
  display: none;
  grid-template-columns: 1fr;
  gap: 3px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid rgba(54, 217, 196, .3);
  background:
    radial-gradient(circle at 14% 0%, rgba(54, 217, 196, .2), transparent 34%),
    rgba(5, 13, 24, .96);
  color: #eafaff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

.viewer-chat-toast.visible {
  display: grid;
}

.viewer-chat-toast strong {
  color: #67d9ff;
  font-size: .74rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.viewer-chat-toast span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
  color: rgba(243, 255, 255, .9);
}

.call-card {
  padding: 14px;
}

.call-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.call-head strong,
.call-head small {
  display: block;
}

.call-head small {
  margin-top: 2px;
  color: var(--live-muted);
  font-size: .72rem;
}

.video-tile {
  min-height: 276px;
  height: clamp(276px, 28vh, 360px);
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 20%, rgba(54, 217, 196, .22), transparent 36%),
    linear-gradient(135deg, #0b1b2d, #07111f);
  color: #f4fbff;
  border: 1px solid rgba(103, 217, 255, .18);
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.video-tile.daily-mounted {
  background: #07111f;
}

.video-tile iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

.screen-share-note {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 14px;
  border: 1px solid rgba(243, 200, 80, .34);
  background: rgba(255, 247, 218, .82);
  color: #705600;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.35;
}

.screen-share-note:empty {
  display: none;
}

.host-call-actions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.host-media-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.host-call-actions .live-btn,
.host-media-actions .live-btn {
  justify-content: center;
}

.video-avatar {
  width: 76px;
  height: 76px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: rgba(54, 217, 196, .16);
  border: 1px solid rgba(54, 217, 196, .28);
  font-size: 1.2rem;
  font-weight: 900;
}

.video-meta {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--live-muted);
  font-size: .78rem;
}

.audience-card {
  padding: 14px;
}

.audience-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.audience-head strong,
.audience-head small {
  display: block;
}

.audience-head small {
  margin-top: 2px;
  color: var(--live-muted);
  font-size: .72rem;
}

.audience-list {
  display: grid;
  gap: 8px;
  max-height: 128px;
  overflow: auto;
}

.audience-person {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border-radius: 13px;
  border: 1px solid rgba(17, 48, 76, .1);
  background: rgba(255, 255, 255, .74);
}

.audience-avatar {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(54, 217, 196, .14);
  color: #087b82;
  font-size: .72rem;
  font-weight: 900;
}

.audience-person strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
}

.audience-person small {
  color: var(--live-muted);
  font-size: .68rem;
}

.speaker-card {
  order: 3;
  padding: 14px;
}

.speaker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.speaker-head strong,
.speaker-head small {
  display: block;
}

.speaker-head small {
  margin-top: 2px;
  color: var(--live-muted);
  font-size: .72rem;
}

.speaker-head .live-btn {
  min-height: 36px;
  padding: 8px 10px;
  font-size: .76rem;
}

.speaker-active {
  padding: 10px 11px;
  border-radius: 15px;
  background: rgba(54, 217, 196, .12);
  border: 1px solid rgba(54, 217, 196, .18);
  color: #0b6f78;
  font-size: .78rem;
  font-weight: 850;
}

.speaker-list {
  margin-top: 9px;
  display: grid;
  gap: 8px;
  max-height: 144px;
  overflow: auto;
}

.speaker-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-radius: 13px;
  border: 1px solid rgba(17, 48, 76, .1);
  background: rgba(255, 255, 255, .74);
}

.speaker-request span {
  min-width: 0;
  font-size: .78rem;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speaker-request button {
  border: 0;
  border-radius: 10px;
  padding: 7px 9px;
  background: rgba(8, 123, 130, .12);
  color: #087b82;
  font-size: .7rem;
  font-weight: 900;
}

.speaker-request button.revoke {
  background: rgba(255, 107, 107, .13);
  color: #b73737;
}

.chat-card {
  order: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--live-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.chat-head strong {
  display: block;
  font-size: .92rem;
}

.chat-head small {
  color: var(--live-muted);
  font-size: .72rem;
}

.chat-list {
  flex: 1;
  overflow: auto;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: rgba(244, 249, 252, .72);
}

.chat-empty {
  align-self: center;
  justify-self: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(17, 48, 76, .18);
  color: rgba(24, 50, 74, .62);
  font-size: .82rem;
  font-weight: 800;
}

.chat-message {
  padding: 10px 11px;
  border-radius: 15px;
  border: 1px solid rgba(17, 48, 76, .1);
  background: rgba(255, 255, 255, .84);
}

.chat-message.host {
  border-color: rgba(54, 217, 196, .24);
  background: rgba(226, 252, 247, .78);
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: #087b82;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.chat-text {
  color: #18324a;
  font-size: .84rem;
  line-height: 1.38;
}

.chat-form {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-top: 1px solid var(--live-border);
  background: rgba(255, 255, 255, .88);
}

.chat-form input {
  min-width: 0;
  border: 1px solid var(--live-border);
  border-radius: 13px;
  padding: 10px 12px;
}

.waiting-wrap {
  min-height: calc(100vh - 112px);
  display: grid;
  place-items: center;
}

.waiting-card {
  width: min(880px, 100%);
  padding: 34px;
}

.waiting-actions {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.waiting-actions input {
  min-height: 46px;
  min-width: 0;
  border: 1px solid var(--live-border);
  border-radius: 14px;
  padding: 0 14px;
}

.adapter-banner {
  display: none;
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 15px;
  border: 1px solid rgba(243, 200, 80, .34);
  background: rgba(255, 247, 218, .82);
  color: #6b5000;
  font-size: .8rem;
  font-weight: 750;
}

.adapter-banner.active {
  display: block;
}

.adapter-banner.real {
  border-color: rgba(54, 211, 153, .26);
  background: rgba(222, 251, 238, .86);
  color: #08784e;
}

.adapter-banner.error {
  border-color: rgba(255, 107, 107, .34);
  background: rgba(255, 235, 235, .9);
  color: #9f2f2f;
}

.live-progress-strip {
  margin: 0 0 14px;
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr) 80px minmax(0, 1fr);
  align-items: center;
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid rgba(54, 217, 196, .18);
  background:
    radial-gradient(circle at 18% 0%, rgba(54, 217, 196, .14), transparent 34%),
    linear-gradient(135deg, rgba(6, 23, 38, .94), rgba(7, 42, 53, .82));
  color: #effcff;
  box-shadow: 0 20px 58px rgba(5, 13, 24, .18);
}

.progress-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}

.progress-step span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0b8a94, #36d9c4);
  color: #fff;
  font-size: .76rem;
  font-weight: 900;
  box-shadow: 0 0 0 5px rgba(54, 217, 196, .1);
}

.progress-step strong,
.progress-step small {
  display: block;
  min-width: 0;
}

.progress-step strong {
  font-size: .78rem;
}

.progress-step small {
  color: rgba(229, 246, 255, .7);
  font-size: .68rem;
}

.progress-line {
  height: 1px;
  background: linear-gradient(90deg, rgba(54, 217, 196, .12), rgba(54, 217, 196, .72), rgba(54, 217, 196, .12));
}

@media (max-width: 1080px) {
  .live-shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .live-sidebar {
    position: sticky;
    height: 100vh;
    padding: 12px;
  }

  .live-stage-list {
    grid-template-columns: 1fr;
  }

  .watch-toggle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-button {
    grid-template-columns: 1fr;
  }

  .live-side-footer {
    display: none;
  }

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

  .room-grid {
    height: calc(100vh - 56px);
    min-height: 560px;
  }

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

  .room-rail {
    width: 220px;
    min-width: 200px;
    top: 56px;
  }

  .speaker-card {
    grid-column: 1 / -1;
  }

  .camera-focus-card {
    grid-template-columns: 1fr;
  }

  .live-progress-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .progress-line {
    display: none;
  }
}

@media (max-width: 760px) {
  .live-main {
    padding: 14px;
  }

  .viewer-mode .live-main {
    padding: 0;
  }

  .live-topbar,
  .stage-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .live-top-actions {
    justify-content: stretch;
  }

  .live-btn {
    width: 100%;
  }

  .preflight-hero {
    min-height: auto;
  }

  .preflight-preview,
  .live-stage-list,
  .room-rail {
    grid-template-columns: 1fr;
  }

  .waiting-actions,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .stage-card {
    min-height: 520px;
  }

  .host-camera-bubble {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .viewer-mode .host-camera-bubble {
    left: 50%;
    right: auto;
    top: 58px;
    bottom: auto;
    width: 124px;
    height: 124px;
    min-width: 124px;
    transform: translateX(-50%);
  }

  .viewer-mode .viewer-daily-mount {
    width: var(--viewer-camera-width);
    height: var(--viewer-camera-height);
    top: var(--viewer-camera-top);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 30px;
  }

  .viewer-mode .stage-frame-wrap.camera-focus .viewer-daily-mount {
    width: min(78vw, 380px);
    height: min(78vw, 380px);
    max-height: 48vh;
    top: 55%;
    border-radius: 999px;
  }

  .viewer-mode .stage-frame-wrap.camera-focus .camera-focus-brand {
    top: clamp(26px, 8vh, 52px);
    font-size: clamp(1.28rem, 6vw, 2rem);
  }

  .viewer-mode .camera-bubble-hide {
    top: calc(var(--viewer-camera-top) + var(--viewer-camera-height) + 8px);
    right: calc((100vw - var(--viewer-camera-width)) / 2 + 8px);
  }

  .viewer-mode .room-rail {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 96px;
    width: auto;
    min-width: 0;
    max-height: none;
    grid-template-columns: 1fr;
  }

  .viewer-mode.viewer-chat-open {
    --viewer-chat-drawer-height: min(40vh, 320px);
    --viewer-bottom-controls-height: 96px;
  }

  .viewer-mode.viewer-chat-open .room-rail {
    top: auto;
    bottom: calc(var(--viewer-bottom-controls-height) + 2px);
    height: var(--viewer-chat-drawer-height);
    max-height: var(--viewer-chat-drawer-height);
  }

  .viewer-mode.viewer-chat-open .speaker-card {
    display: none;
  }

  .viewer-mode .chat-list {
    min-height: 56px;
    max-height: none;
    padding: 10px;
  }

  .viewer-mode .chat-card {
    height: 100%;
    min-height: 0;
  }

  .viewer-mode .chat-head {
    padding: 10px 14px;
  }

  .viewer-mode .chat-head small {
    display: none;
  }

  .viewer-mode .chat-form {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
  }

  .viewer-mode .chat-form .live-btn {
    width: auto;
    min-width: 88px;
  }

  .viewer-mode .chat-form input {
    min-height: 42px;
  }

  .host-media-actions,
  .host-call-actions {
    grid-template-columns: 1fr;
  }

  .viewer-mode .viewer-bottom-bar {
    grid-template-columns: minmax(0, 1fr) 46px 46px;
    gap: 7px;
  }

  .viewer-icon-control {
    width: 46px;
    height: 46px;
    min-height: 46px;
  }

  .viewer-chat-preview {
    min-height: 74px;
    max-height: 84px;
    border-radius: 18px;
  }

  .viewer-chat-preview-lines span {
    font-size: .68rem;
  }

  .camera-focus-pane {
    padding: 14px;
  }

  .camera-focus-video {
    min-height: min(62vh, 520px);
  }

  .camera-focus-video .video-tile {
    min-height: min(62vh, 520px);
  }
}
