:root {
  color-scheme: light;
  --navy: #07152a;
  --navy-2: #0b2540;
  --navy-3: #0f3558;
  --ink: #0b1630;
  --muted: #607086;
  --page: #f6f8fb;
  --card: #ffffff;
  --card-soft: #fff6ef;
  --line: rgba(12, 27, 53, .10);
  --line-strong: rgba(12, 27, 53, .16);
  --orange: #ff7a1a;
  --coral: #ff4338;
  --amber: #ffb22f;
  --teal: #1db9a6;
  --blue: #246fc6;
  --danger: #f04438;
  --success: #18a97d;
  --shadow: 0 18px 55px rgba(9, 24, 50, .12);
  --shadow-deep: 0 28px 90px rgba(7, 21, 42, .22);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* === Final meeting vertical spacing: keep controls close to the call stage === */
body[data-view="meeting"] .app-shell {
  padding-bottom: 72px !important;
}

body[data-view="meeting"] .call-layout {
  height: calc(100dvh - 154px) !important;
  min-height: calc(100dvh - 154px) !important;
  padding-bottom: 14px !important;
}

body[data-view="meeting"] .stage {
  height: 100% !important;
  min-height: 0 !important;
}

body[data-view="meeting"] .call-controls,
body[data-theme="light"][data-view="meeting"] .call-controls,
body[data-theme="dark"][data-view="meeting"] .call-controls {
  bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
}

body[data-view="meeting"] .reaction-panel {
  bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 60px) !important;
}

body[data-view="meeting"] .chat-popups {
  bottom: 72px !important;
}

@media (max-width: 900px) {
  body[data-view="meeting"] .call-layout {
    height: calc(100dvh - 202px) !important;
    min-height: calc(100dvh - 202px) !important;
    padding-bottom: 12px !important;
  }
}

@media (max-width: 560px) {
  body[data-view="meeting"] .app-shell {
    padding-bottom: 58px !important;
  }

  body[data-view="meeting"] .call-layout {
    height: calc(100dvh - 220px) !important;
    min-height: calc(100dvh - 220px) !important;
    padding-bottom: 10px !important;
  }

  body[data-view="meeting"] .call-controls,
  body.screen-share-mode[data-view="meeting"] .call-controls {
    bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Final override: keep More options anchored and scrollable after all legacy layers. */
body[data-view="meeting"] .more-panel,
body[data-theme="light"][data-view="meeting"] .more-panel,
body[data-theme="dark"][data-view="meeting"] .more-panel {
  position: fixed !important;
  top: 88px !important;
  right: 18px !important;
  bottom: auto !important;
  left: auto !important;
  width: min(360px, calc(100vw - 28px)) !important;
  height: auto !important;
  max-height: calc(100% - 170px) !important;
  overflow-y: auto !important;
  transform: none !important;
}

body[data-view="meeting"] .more-panel[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  body[data-view="meeting"] .more-panel,
  body[data-theme="light"][data-view="meeting"] .more-panel,
  body[data-theme="dark"][data-view="meeting"] .more-panel {
    top: 104px !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100% - 172px) !important;
  }
}

/* Final override: keep More options anchored and scrollable after all legacy layers. */
body[data-view="meeting"] .more-panel,
body[data-theme="light"][data-view="meeting"] .more-panel,
body[data-theme="dark"][data-view="meeting"] .more-panel {
  position: fixed !important;
  top: 88px !important;
  right: 18px !important;
  bottom: auto !important;
  left: auto !important;
  width: min(360px, calc(100vw - 28px)) !important;
  height: auto !important;
  max-height: calc(100% - 170px) !important;
  overflow-y: auto !important;
  transform: none !important;
}

body[data-view="meeting"] .more-panel[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  body[data-view="meeting"] .more-panel,
  body[data-theme="light"][data-view="meeting"] .more-panel,
  body[data-theme="dark"][data-view="meeting"] .more-panel {
    top: 104px !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100% - 172px) !important;
  }
}

/* === Production meeting controls: waiting room, host tools, people, notes, summary === */
body[data-view="meeting"] .waiting-room-card {
  position: fixed;
  top: 88px;
  right: 22px;
  z-index: 76;
  width: min(360px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, .92);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
  color: #f8fafc;
}

body[data-view="meeting"] .waiting-room-card[hidden] {
  display: none !important;
}

body[data-view="meeting"] .waiting-room-card strong,
body[data-view="meeting"] .waiting-room-card small {
  display: block;
  color: inherit;
}

body[data-view="meeting"] .waiting-room-card small {
  margin-top: 3px;
  color: rgba(226, 232, 240, .78);
}

body[data-view="meeting"] .waiting-room-actions {
  display: flex;
  gap: 8px;
}

body[data-view="meeting"] .admit-btn {
  background: #14b8a6 !important;
  color: #fff !important;
  border: 0 !important;
}

body[data-view="meeting"] .deny-btn,
body[data-view="meeting"] .danger-soft {
  background: rgba(225, 29, 72, .12) !important;
  color: #fb7185 !important;
  border-color: rgba(251, 113, 133, .28) !important;
}

body[data-theme="light"][data-view="meeting"] .waiting-room-card {
  background: rgba(255,255,255,.98);
  color: #0f172a;
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 18px 40px rgba(15,23,42,.16);
}

body[data-theme="light"][data-view="meeting"] .waiting-room-card small {
  color: #64748b;
}

body[data-view="meeting"] .tile-fullscreen-action {
  position: absolute;
  top: 58px;
  right: 12px;
  z-index: 6;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, .58);
  border: 1px solid rgba(255,255,255,.16);
  opacity: .78;
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}

body[data-view="meeting"] .tile-fullscreen-action:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(15, 23, 42, .82);
}

body[data-view="meeting"] .tile-fullscreen-action svg {
  width: 18px;
  height: 18px;
}

body[data-view="meeting"] .side-panel {
  position: fixed;
  top: 92px;
  right: 18px;
  bottom: 82px;
  z-index: 70;
  width: min(390px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  overflow: hidden;
}

body[data-view="meeting"] .side-panel[hidden] {
  display: none !important;
}

body[data-view="meeting"] .side-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

body[data-view="meeting"] .side-panel-head strong,
body[data-view="meeting"] .side-panel-head small {
  display: block;
}

body[data-view="meeting"] .side-panel-head small {
  margin-top: 2px;
  color: #64748b;
}

body[data-theme="dark"][data-view="meeting"] .side-panel,
body[data-theme="dark"][data-view="meeting"] .more-panel,
body[data-theme="dark"][data-view="meeting"] .chat-drawer,
body[data-theme="dark"][data-view="meeting"] .device-panel {
  background: rgba(15, 23, 42, .96) !important;
  color: #f8fafc !important;
  border-color: rgba(148, 163, 184, .18) !important;
}

body[data-theme="dark"][data-view="meeting"] .side-panel-head small {
  color: rgba(226, 232, 240, .68);
}

body[data-view="meeting"] .participants-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 2px;
}

body[data-view="meeting"] .participant-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(148, 163, 184, .10);
  border: 1px solid rgba(148, 163, 184, .16);
}

body[data-view="meeting"] .participant-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #ff7a1a, #ff4338);
}

body[data-view="meeting"] .participant-detail {
  min-width: 0;
}

body[data-view="meeting"] .participant-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

body[data-view="meeting"] .participant-name-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="meeting"] .host-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: .68rem;
  font-weight: 800;
  color: #9a3412;
  background: rgba(251, 146, 60, .16);
}

body[data-view="meeting"] .participant-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

body[data-view="meeting"] .participant-status-list span {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: .68rem;
  color: #64748b;
  background: rgba(148, 163, 184, .14);
}

body[data-theme="dark"][data-view="meeting"] .participant-status-list span {
  color: rgba(226, 232, 240, .82);
}

body[data-view="meeting"] .participant-remove {
  min-width: 78px;
  padding-inline: 12px !important;
}

body[data-view="meeting"] .empty-panel-note {
  margin: 0;
  color: #64748b;
}

body[data-view="meeting"] .notes-input {
  flex: 1;
  width: 100%;
  min-height: 220px;
  resize: none;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
  padding: 13px;
  color: #0f172a;
  background: rgba(255,255,255,.88);
  outline: 0;
}

body[data-theme="dark"][data-view="meeting"] .notes-input {
  color: #f8fafc;
  background: rgba(2, 6, 23, .52);
  border-color: rgba(148, 163, 184, .18);
}

body[data-view="meeting"] .notes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-view="meeting"] .notes-status {
  color: #64748b;
}

body[data-view="meeting"] .more-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

body[data-view="meeting"] .more-action-btn,
body[data-view="meeting"] .host-control-btn {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 16px;
  text-align: left;
  color: #0f172a;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148, 163, 184, .18);
}

body[data-view="meeting"] .more-action-btn span,
body[data-view="meeting"] .more-action-btn small,
body[data-view="meeting"] .section-title-row strong,
body[data-view="meeting"] .section-title-row small {
  display: block;
}

body[data-view="meeting"] .more-action-btn span,
body[data-view="meeting"] .section-title-row strong {
  font-weight: 850;
}

body[data-view="meeting"] .more-action-btn small,
body[data-view="meeting"] .section-title-row small {
  margin-top: 3px;
  color: #64748b;
}

body[data-theme="dark"][data-view="meeting"] .more-action-btn,
body[data-theme="dark"][data-view="meeting"] .host-control-btn {
  color: #f8fafc;
  background: rgba(30, 41, 59, .72);
  border-color: rgba(148, 163, 184, .16);
}

body[data-theme="dark"][data-view="meeting"] .more-action-btn small,
body[data-theme="dark"][data-view="meeting"] .section-title-row small {
  color: rgba(226, 232, 240, .68);
}

body[data-view="meeting"] .host-controls-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: rgba(255, 122, 26, .08);
  border: 1px solid rgba(255, 122, 26, .16);
}

body[data-view="meeting"] .host-controls-panel[hidden] {
  display: none !important;
}

body[data-view="meeting"] .host-control-btn {
  min-height: 44px;
  font-weight: 850;
  text-align: center;
}

body[data-view="meeting"] .section-title-row {
  margin: 4px 0 10px;
}

body[data-view="meeting"] .chat-control.chat-disabled {
  filter: grayscale(.35);
  opacity: .82;
}

.meeting-summary-block {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border-radius: 18px;
  background: rgba(148, 163, 184, .10);
  border: 1px solid rgba(148, 163, 184, .18);
}

.meeting-summary-list {
  display: grid;
  gap: 8px;
}

.meeting-summary-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.meeting-summary-list span {
  color: #64748b;
}

.meeting-summary-list strong {
  color: #0f172a;
  text-align: right;
}

body[data-theme="dark"] .meeting-summary-list strong {
  color: #f8fafc;
}

body[data-theme="dark"] .meeting-summary-list span {
  color: rgba(226, 232, 240, .70);
}

.manual-copy-fallback {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid rgba(59, 130, 246, .35);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, .92);
  color: #0f172a;
  font: inherit;
  line-height: 1.45;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}

body[data-theme="dark"] .manual-copy-fallback {
  background: rgba(15, 23, 42, .94);
  color: #f8fafc;
  border-color: rgba(147, 197, 253, .35);
}

@media (max-width: 720px) {
  body[data-view="meeting"] .waiting-room-card {
    left: 10px;
    right: 10px;
    top: 86px;
    width: auto;
    grid-template-columns: 1fr;
  }

  body[data-view="meeting"] .waiting-room-actions {
    justify-content: stretch;
  }

  body[data-view="meeting"] .waiting-room-actions .mini-btn {
    flex: 1;
  }

  body[data-view="meeting"] .side-panel {
    left: 8px;
    right: 8px;
    top: 118px;
    bottom: 68px;
    width: auto;
    border-radius: 20px;
  }

  body[data-view="meeting"] .more-action-grid {
    grid-template-columns: 1fr;
  }

  body[data-view="meeting"] .participant-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  body[data-view="meeting"] .participant-remove {
    grid-column: 1 / -1;
    width: 100%;
  }

  body[data-view="meeting"] .tile-fullscreen-action {
    top: 48px;
    right: 8px;
    width: 32px;
    height: 32px;
  }
}

/* Keep the More panel usable when host controls make it taller than the viewport. */
body[data-view="meeting"] .more-panel,
body[data-theme="light"][data-view="meeting"] .more-panel,
body[data-theme="dark"][data-view="meeting"] .more-panel {
  position: fixed !important;
  top: 88px !important;
  right: 18px !important;
  bottom: auto !important;
  left: auto !important;
  width: min(360px, calc(100vw - 28px)) !important;
  height: auto !important;
  max-height: calc(100% - 170px) !important;
  overflow-y: auto !important;
  transform: none !important;
}

body[data-view="meeting"] .more-panel[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  body[data-view="meeting"] .more-panel,
  body[data-theme="light"][data-view="meeting"] .more-panel,
  body[data-theme="dark"][data-view="meeting"] .more-panel {
    top: 104px !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100% - 172px) !important;
  }
}

/* === Working reactions, raised hand, chat notifications, and view panel polish === */
body[data-view="meeting"] .reaction-panel {
  position: fixed;
  left: 50%;
  bottom: calc(max(18px, env(safe-area-inset-bottom, 0px)) + 64px);
  z-index: 72;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 24, 39, .92);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 42px rgba(0,0,0,.26);
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

body[data-view="meeting"] .reaction-panel.open:not([hidden]) {
  transform: translateX(-50%);
  opacity: 1;
  pointer-events: auto;
}

body[data-view="meeting"] .reaction-panel button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  border: 1px solid transparent;
  font-size: 1.28rem;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

body[data-view="meeting"] .reaction-panel button:hover {
  transform: translateY(-2px) scale(1.08);
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.18);
}

body[data-theme="light"][data-view="meeting"] .reaction-panel {
  background: rgba(255,255,255,.96);
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 18px 40px rgba(15,23,42,.18);
}

body[data-theme="light"][data-view="meeting"] .reaction-panel button {
  background: #eef4f8;
}

body[data-view="meeting"] .reaction-stream,
body[data-view="meeting"] .chat-popups {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  overflow: hidden;
}

body[data-view="meeting"] .reaction-burst {
  position: absolute;
  left: var(--rx, 18%);
  bottom: 86px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 7px;
  border-radius: 999px;
  background: rgba(13, 18, 29, .62);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 42px rgba(0,0,0,.22);
  animation: reactionFloat 3.4s ease var(--delay, 0ms) forwards;
  will-change: transform, opacity;
}

body[data-theme="light"][data-view="meeting"] .reaction-burst {
  background: rgba(255,255,255,.82);
  color: #0f172a;
  border-color: rgba(15,23,42,.08);
}

body[data-view="meeting"] .reaction-burst span {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1;
}

body[data-view="meeting"] .reaction-burst b {
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .8rem;
  font-weight: 800;
}

@keyframes reactionFloat {
  0% { opacity: 0; transform: translate3d(-50%, 32px, 0) scale(.72); }
  12% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(calc(-50% + 22px), -280px, 0) scale(1.18); }
}

body[data-view="meeting"] .hand-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 76px);
  padding: 8px 11px;
  border-radius: 999px;
  color: #0f172a;
  background: #fde68a;
  border: 1px solid rgba(146, 64, 14, .18);
  box-shadow: 0 12px 28px rgba(146, 64, 14, .18);
}

body[data-view="meeting"] .hand-badge span {
  font-size: 1.1rem;
  line-height: 1;
}

body[data-view="meeting"] .hand-badge strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  font-weight: 850;
}

body[data-view="meeting"] .video-tile.hand-raised {
  outline: 3px solid rgba(245, 158, 11, .72);
  outline-offset: -3px;
}

body[data-view="meeting"] .hand-control,
body[data-theme="light"][data-view="meeting"] .hand-control {
  background: #f59e0b !important;
}

body[data-view="meeting"] .hand-control.on,
body[data-theme="light"][data-view="meeting"] .hand-control.on {
  background: #d97706 !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .24) !important;
}

body[data-view="meeting"] .reaction-control,
body[data-theme="light"][data-view="meeting"] .reaction-control {
  background: #8b5cf6 !important;
}

body[data-view="meeting"] .reaction-control.on,
body[data-theme="light"][data-view="meeting"] .reaction-control.on {
  background: #7c3aed !important;
}

body[data-view="meeting"] .chat-control {
  position: relative;
}

body[data-view="meeting"] .chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  border: 2px solid #111827;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(239,68,68,.28);
}

body[data-theme="light"][data-view="meeting"] .chat-badge {
  border-color: #eef4f8;
}

body[data-view="meeting"] .chat-control.has-unread {
  box-shadow: 0 0 0 4px rgba(14, 165, 233, .20) !important;
}

body[data-view="meeting"] .chat-popups {
  inset: auto 18px 88px auto;
  width: min(330px, calc(100% - 36px));
  display: grid;
  align-content: end;
  gap: 9px;
  overflow: visible;
}

body[data-view="meeting"] .chat-popup {
  padding: 11px 13px;
  border-radius: 16px;
  color: #fff;
  background: rgba(15, 23, 42, .88);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(0,0,0,.24);
  backdrop-filter: blur(18px);
  animation: chatPopupIn .22s ease both;
}

body[data-theme="light"][data-view="meeting"] .chat-popup {
  color: #0f172a;
  background: rgba(255,255,255,.96);
  border-color: rgba(15,23,42,.10);
  box-shadow: 0 18px 40px rgba(15,23,42,.16);
}

body[data-view="meeting"] .chat-popup.leaving {
  animation: chatPopupOut .42s ease forwards;
}

body[data-view="meeting"] .chat-popup strong,
body[data-view="meeting"] .chat-popup p {
  display: block;
  margin: 0;
}

body[data-view="meeting"] .chat-popup strong {
  font-size: .82rem;
  font-weight: 900;
}

body[data-view="meeting"] .chat-popup p {
  margin-top: 3px;
  color: inherit;
  opacity: .84;
  font-size: .86rem;
  line-height: 1.3;
}

@keyframes chatPopupIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes chatPopupOut {
  to { opacity: 0; transform: translateY(8px) scale(.98); }
}

body[data-view="meeting"] .more-panel {
  width: min(360px, calc(100vw - 28px)) !important;
  padding: 18px !important;
  border-radius: 16px !important;
}

body[data-view="meeting"] .view-mode-list {
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

body[data-view="meeting"] .view-mode-option {
  position: relative;
  min-height: 50px !important;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 68px;
  align-items: center;
  column-gap: 12px;
  padding: 8px 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-view="meeting"] .view-mode-option::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid currentColor;
  opacity: .78;
}

body[data-view="meeting"] .view-mode-option.active::before {
  border-color: #1a73e8;
  box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 10px #1a73e8;
  opacity: 1;
}

body[data-theme="light"][data-view="meeting"] .view-mode-option.active::before {
  box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 10px #1a73e8;
}

body[data-view="meeting"] .view-mode-option::after {
  content: "";
  justify-self: end;
  width: 66px;
  height: 38px;
  border-radius: 4px;
  border: 1px solid rgba(148,163,184,.65);
  background: linear-gradient(90deg, rgba(148,163,184,.25), rgba(148,163,184,.16));
}

body[data-view="meeting"] .view-mode-option[data-view-mode="auto"]::after {
  background: repeating-linear-gradient(90deg, rgba(148,163,184,.35) 0 13px, transparent 13px 16px), #f8fafc;
}

body[data-view="meeting"] .view-mode-option[data-view-mode="tiled"]::after {
  background: repeating-linear-gradient(90deg, rgba(148,163,184,.45) 0 10px, transparent 10px 12px), repeating-linear-gradient(0deg, transparent 0 8px, rgba(148,163,184,.35) 8px 10px), #f8fafc;
}

body[data-view="meeting"] .view-mode-option[data-view-mode="spotlight"]::after {
  background: #e5e7eb;
}

body[data-view="meeting"] .view-mode-option[data-view-mode="sidebar"]::after {
  background: linear-gradient(90deg, #e5e7eb 0 78%, transparent 78%), repeating-linear-gradient(0deg, rgba(148,163,184,.42) 0 5px, transparent 5px 8px);
}

body[data-view="meeting"] .view-mode-option span,
body[data-view="meeting"] .view-mode-option small {
  grid-column: 2;
}

body[data-view="meeting"] .view-mode-option span {
  margin: 0 !important;
}

body[data-view="meeting"] .view-mode-option small {
  margin-top: 2px;
}

body[data-view="meeting"] .range-field,
body[data-view="meeting"] .switch-field {
  border-top: 1px solid rgba(148,163,184,.20) !important;
}

@media (max-width: 560px) {
  body[data-view="meeting"] .reaction-panel {
    bottom: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 52px);
    max-width: calc(100vw - 12px);
    overflow-x: auto;
    padding: 7px;
  }

  body[data-view="meeting"] .reaction-panel button {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    font-size: 1.08rem;
  }

  body[data-view="meeting"] .chat-popups {
    right: 10px;
    bottom: 70px;
    width: min(300px, calc(100% - 20px));
  }

  body[data-view="meeting"] .hand-badge {
    top: 8px;
    left: 8px;
    padding: 6px 8px;
  }
}

@media (max-width: 420px) {
  body[data-view="meeting"] .call-controls,
  body.screen-share-mode[data-view="meeting"] .call-controls {
    gap: 3px !important;
  }

  body[data-view="meeting"] .control-btn,
  body.screen-share-mode[data-view="meeting"] .control-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  body[data-view="meeting"] .control-btn svg,
  body.screen-share-mode[data-view="meeting"] .control-btn svg {
    width: 17px !important;
    height: 17px !important;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 122, 26, .15), transparent 26rem),
    radial-gradient(circle at 8% 88%, rgba(36, 111, 198, .13), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, #f4f6f9 100%);
  overflow-x: hidden;
}

body[data-view="meeting"] {
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 122, 26, .15), transparent 28rem),
    radial-gradient(circle at 12% 88%, rgba(29, 185, 166, .12), transparent 28rem),
    linear-gradient(150deg, #061326, #0a2039 56%, #07172b);
  color: #fff;
}

body[data-view="create"],
body[data-view="join"] {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 122, 26, .16), transparent 28rem),
    radial-gradient(circle at 84% 74%, rgba(36, 111, 198, .13), transparent 28rem),
    linear-gradient(180deg, #f8fbff, #f4f6f9);
}

button, input { font: inherit; }
[hidden] { display: none !important; }
button { border: 0; cursor: pointer; color: inherit; }
button:disabled { opacity: .46; cursor: not-allowed; transform: none !important; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(8, 30, 55, .13) 1px, transparent 1.4px);
  background-size: 18px 18px;
  mask-image: radial-gradient(circle at 85% 10%, black 0 10rem, transparent 20rem), radial-gradient(circle at 12% 95%, black 0 8rem, transparent 18rem);
}
.bg-blur {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 999px;
  filter: blur(46px);
  opacity: .35;
  animation: floatOrb 12s ease-in-out infinite alternate;
}
.bg-blur-one { width: 22rem; height: 22rem; right: -8rem; top: -6rem; background: linear-gradient(135deg, var(--coral), var(--orange)); }
.bg-blur-two { width: 24rem; height: 24rem; left: -10rem; bottom: -8rem; background: var(--teal); animation-delay: -5s; }
@keyframes floatOrb { to { transform: translate3d(18px, -14px, 0) scale(1.06); } }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 46px;
}

.frosted, .card-white, .light-panel, .how-panel, .feature-strip article {
  border: 1px solid rgba(255, 255, 255, .62);
  background: rgba(255, 255, 255, .74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}
.card-white, .light-panel, .how-panel { border-radius: var(--radius-xl); }
.frosted { border-radius: 999px; }


.theme-switch {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 85;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(12, 27, 53, .12);
  box-shadow: 0 18px 50px rgba(9, 24, 50, .18), inset 0 1px 0 rgba(255,255,255,.86);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  font-weight: 860;
  letter-spacing: -.01em;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}
.theme-switch:hover { transform: translateY(-2px); box-shadow: 0 22px 62px rgba(9, 24, 50, .22), inset 0 1px 0 rgba(255,255,255,.9); }
.theme-switch .theme-icon { width: 18px; height: 18px; }
.theme-switch .theme-icon-sun { display: none; }
body[data-theme="dark"] .theme-switch .theme-icon-moon { display: none; }
body[data-theme="dark"] .theme-switch .theme-icon-sun { display: block; }
body[data-view="meeting"] .theme-switch { bottom: 108px; }


.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
body[data-view="create"] .topbar,
body[data-view="join"] .topbar,
body[data-view="meeting"] .topbar { display: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  padding: 5px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #fff3e7);
  box-shadow: 0 9px 22px rgba(255, 122, 26, .13);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; letter-spacing: -.025em; }
.brand strong b { color: #ff4b24; }
.brand small { color: var(--muted); font-size: .78rem; margin-top: 1px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(9, 24, 50, .08);
  font-size: .86rem;
  font-weight: 760;
  white-space: nowrap;
}
.status-chip span { width: 9px; height: 9px; border-radius: 99px; background: var(--amber); box-shadow: 0 0 18px rgba(255, 178, 47, .72); }
.status-chip.ready span, .status-chip.connected span { background: var(--teal); box-shadow: 0 0 18px rgba(29, 185, 166, .72); }
.status-chip.loading span { animation: pulse .8s ease-in-out infinite alternate; }
.status-chip.error span { background: var(--danger); box-shadow: 0 0 18px rgba(240, 68, 56, .72); }

.view { display: none; }
.view.active { display: block; animation: viewIn .32s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(12px) scale(.992); } to { opacity: 1; transform: none; } }
.reveal-up { animation: revealUp .65s cubic-bezier(.2,.8,.2,1) both; }
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .13s; }
.delay-3 { animation-delay: .18s; }
@keyframes revealUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero-card {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 26px;
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 38px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(125deg, rgba(255, 122, 26, .00) 62%, rgba(255, 67, 56, .95) 62%, rgba(255, 122, 26, .94) 74%, #fff 74.3%),
    radial-gradient(circle at 15% 12%, rgba(255, 122, 26, .22), transparent 16rem),
    linear-gradient(145deg, #061326 0%, #07162b 48%, #0a2039 100%);
  box-shadow: var(--shadow-deep);
}
.hero-card::before {
  content: "";
  position: absolute;
  right: 20px;
  top: 20px;
  width: 150px;
  height: 150px;
  background-image: radial-gradient(rgba(255,255,255,.35) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: .45;
}
.hero-copy { position: relative; z-index: 3; }
.hero-pill {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  border: 1px solid rgba(255, 122, 26, .82);
  background: rgba(255, 122, 26, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  font-size: .82rem;
  font-weight: 820;
  margin-bottom: 24px;
}
h1, h2, p { margin-top: 0; }
h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(2.65rem, 7vw, 5.55rem);
  line-height: .93;
  letter-spacing: -.07em;
}
.hero-text {
  max-width: 570px;
  color: rgba(255,255,255,.82);
  font-size: 1.12rem;
  line-height: 1.72;
  margin-bottom: 26px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-primary, .hero-secondary, .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  min-height: 54px;
  padding: 0 20px;
  font-weight: 860;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease, border-color .22s ease;
}
.hero-primary, .primary-action {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  box-shadow: 0 18px 42px rgba(255, 70, 40, .28);
}
.hero-secondary {
  color: #fff;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.20);
}
.hero-primary:hover, .hero-secondary:hover, .primary-action:hover { transform: translateY(-2px); filter: brightness(1.03); }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; color: rgba(255,255,255,.78); font-size: .88rem; font-weight: 780; }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row i { width: 7px; height: 7px; border-radius: 999px; background: var(--orange); box-shadow: 0 0 14px rgba(255, 122, 26, .78); }

.hero-visual { min-height: 380px; display: grid; place-items: center; position: relative; z-index: 2; }
.orbit-ring { position: absolute; border-radius: 999px; border: 18px solid transparent; animation: orbitFloat 8s ease-in-out infinite alternate; }
.ring-one { width: 430px; height: 430px; border-top-color: var(--coral); border-left-color: var(--coral); transform: rotate(36deg); opacity: .98; }
.ring-two { width: 320px; height: 320px; border-top-color: var(--orange); border-left-color: var(--orange); transform: rotate(36deg); animation-delay: -2s; }
@keyframes orbitFloat { to { transform: rotate(42deg) translateY(-10px); } }
.mock-laptop {
  width: min(460px, 96%);
  aspect-ratio: 1.48;
  border-radius: 28px;
  padding: 14px;
  background: linear-gradient(145deg, #0a1628, #0f2743);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 32px 90px rgba(0,0,0,.38);
  transform: perspective(900px) rotateY(-9deg) rotateX(3deg);
  position: relative;
  z-index: 2;
}
.mock-topbar { height: 24px; display: flex; align-items: center; gap: 6px; }
.mock-topbar span { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.34); }
.mock-video-grid { height: calc(100% - 54px); display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mini-user { border-radius: 20px; background: linear-gradient(145deg, rgba(255,255,255,.17), rgba(255,255,255,.07)); border: 1px solid rgba(255,255,255,.12); position: relative; overflow: hidden; }
.mini-user::before { content: ""; position: absolute; left: 50%; top: 26%; width: 38px; height: 38px; transform: translateX(-50%); border-radius: 50%; background: rgba(255,255,255,.54); }
.mini-user::after { content: ""; position: absolute; left: 50%; bottom: 16%; width: 76px; height: 46px; transform: translateX(-50%); border-radius: 999px 999px 28px 28px; background: rgba(255,255,255,.38); }
.mini-user.blue { background: linear-gradient(145deg, rgba(36,111,198,.64), rgba(6,22,43,.45)); }
.mini-user.teal { background: linear-gradient(145deg, rgba(29,185,166,.58), rgba(6,22,43,.44)); }
.mini-user.orange { background: linear-gradient(145deg, rgba(255,122,26,.66), rgba(6,22,43,.44)); }
.mini-user.navy { display: grid; place-items: center; background: linear-gradient(145deg, #fff, #fff3e7); }
.mini-user.navy::before, .mini-user.navy::after { display: none; }
.mini-user.navy img { width: 45%; filter: drop-shadow(0 12px 20px rgba(0,0,0,.2)); }
.mock-controls { height: 30px; display: flex; align-items: end; justify-content: center; gap: 8px; }
.mock-controls b { width: 26px; height: 26px; border-radius: 99px; background: rgba(255,255,255,.22); }
.mock-controls .end { background: var(--coral); }
.floating-logo {
  position: absolute;
  right: 8%;
  top: 8%;
  width: 82px;
  height: 82px;
  object-fit: contain;
  padding: 8px;
  border-radius: 24px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 16px 44px rgba(9, 24, 50, .18);
  z-index: 3;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.feature-strip article { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 22px; }
.feature-strip strong, .feature-strip small { display: block; }
.feature-strip strong { font-size: 1.05rem; }
.feature-strip small { color: var(--muted); margin-top: 2px; }
.feature-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 18px; color: #fff; box-shadow: 0 12px 28px rgba(9, 24, 50, .15); }
.feature-icon.orange { background: linear-gradient(135deg, var(--orange), var(--coral)); }
.feature-icon.blue { background: linear-gradient(135deg, var(--blue), #5f8ee6); }
.feature-icon.teal { background: linear-gradient(135deg, var(--teal), #4dd4b9); }

.home-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.info-panel { padding: 30px; }
.section-no { color: #ff4b24; font-weight: 950; font-size: 1.7rem; line-height: 1; margin: 0 0 10px; }
.info-panel h2, .how-panel h2, .form-heading h2 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; letter-spacing: -.06em; margin: 0 0 14px; color: var(--ink); }
.info-panel p, .form-heading p { color: var(--muted); line-height: 1.72; }
.soft-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.soft-list li { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 10px 14px; border-radius: 16px; background: #fff6ef; color: #26334d; font-weight: 750; }
.soft-list svg { color: var(--coral); }
.check-list li { background: #effbf7; }
.check-list svg { color: var(--success); }
.how-panel { padding: 30px; margin-top: 16px; }
.steps-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 22px; }
.steps-row article { text-align: center; padding: 18px 12px; border-radius: 24px; background: linear-gradient(180deg, #fff, #f7f9fc); border: 1px solid var(--line); }
.steps-row span { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 99px; color: #fff; font-size: 1.25rem; font-weight: 950; background: linear-gradient(135deg, var(--orange), var(--coral)); box-shadow: 0 12px 25px rgba(255, 70, 40, .18); }
.steps-row article:nth-child(3) span { background: linear-gradient(135deg, var(--navy), var(--blue)); }
.steps-row article:nth-child(4) span { background: linear-gradient(135deg, var(--blue), #4aa3ff); }
.steps-row article:nth-child(5) span { background: linear-gradient(135deg, var(--teal), #32c676); }
.steps-row strong, .steps-row small { display: block; }
.steps-row small { color: var(--muted); margin-top: 6px; font-size: .82rem; line-height: 1.45; }

.form-view { max-width: 760px; margin: 0 auto; padding-top: 28px; }
.back-btn, .mini-btn, .icon-only, .emoji-btn, .send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(9,24,50,.08);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.back-btn { padding: 11px 16px; margin-bottom: 16px; color: var(--navy); font-weight: 820; }
.back-btn:hover, .mini-btn:hover, .icon-only:hover, .emoji-btn:hover { transform: translateY(-2px); border-color: rgba(255,122,26,.34); }
.form-card { padding: clamp(24px, 5vw, 44px); }
.eyebrow { margin: 0 0 8px; color: var(--coral); text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 920; }
.field-group { margin-top: 18px; }
.field-group label, .permission-title { display: block; margin-bottom: 8px; color: var(--ink); font-size: .88rem; font-weight: 860; }
input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 18px;
  padding: 16px 18px;
  background: #f8fafc;
  color: var(--ink);
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
input:focus { background: #fff; border-color: rgba(255, 122, 26, .72); box-shadow: 0 0 0 5px rgba(255, 122, 26, .14); }
input::placeholder { color: #98a5b7; }
.generated-room {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 14px;
  border-radius: 22px;
}
.soft-card { background: linear-gradient(135deg, #fff6ef, #f7fbff); border: 1px solid var(--line); }
.generated-room span { color: var(--muted); font-size: .84rem; font-weight: 780; }
.generated-room strong { font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: .08em; color: var(--navy); }
.mini-btn { min-height: 42px; padding: 0 14px; color: var(--navy); font-weight: 820; }
.media-options { display: flex; gap: 12px; flex-wrap: wrap; }
.toggle-pill {
  flex: 1;
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--navy);
  font-weight: 850;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.toggle-pill:hover { transform: translateY(-2px); }
.toggle-pill[data-enabled="true"] { border-color: rgba(29,185,166,.34); background: #eefcf8; color: #087c70; }
.primary-action { width: 100%; margin-top: 22px; min-height: 58px; border-radius: 20px; font-size: 1rem; }
.error-card { padding: 14px 16px; border-radius: 18px; border: 1px solid rgba(240, 68, 56, .22); background: #fff1ef; color: #7a271a; margin-bottom: 18px; }
.error-card strong, .error-card span { display: block; }
.error-card span { color: #b42318; margin-top: 4px; }

.meeting-view { height: calc(100vh - 42px); min-height: 650px; padding-top: 12px; }
.meeting-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px;
  margin-bottom: 14px;
  color: var(--ink);
}
.room-meta { display: flex; align-items: center; gap: 12px; }
.room-meta img { width: 46px; height: 46px; object-fit: contain; padding: 5px; border-radius: 15px; background: #fff; }
.room-meta span, .room-meta strong { display: block; }
.room-meta span { color: var(--muted); font-size: .75rem; font-weight: 840; text-transform: uppercase; letter-spacing: .1em; }
.room-meta strong { font-size: 1.05rem; letter-spacing: .08em; color: var(--navy); }
.share-actions { display: flex; gap: 10px; }
.call-layout { height: calc(100% - 78px); display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; }
.stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 18% 10%, rgba(255,122,26,.20), transparent 22rem),
    radial-gradient(circle at 86% 82%, rgba(29,185,166,.14), transparent 24rem),
    linear-gradient(145deg, #081628, #0b2440);
  box-shadow: var(--shadow-deep);
}
.video-grid { position: absolute; inset: 12px; }
.video-tile { position: absolute; overflow: hidden; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.10); border-radius: 28px; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.remote-tile { inset: 0; }
.local-tile { right: 20px; bottom: 112px; width: min(260px, 32%); height: 170px; z-index: 4; border-radius: 24px; }
.video-tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: transparent; }
.avatar-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; color: #fff; background: linear-gradient(145deg, rgba(255,122,26,.12), rgba(29,185,166,.09)); }
.avatar-placeholder.hidden { display: none; }
.avatar-circle { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 999px; color: #fff; font-size: 2rem; font-weight: 950; background: linear-gradient(135deg, var(--orange), var(--coral)); box-shadow: 0 18px 44px rgba(255,70,40,.22); }
.local-tile .avatar-circle { width: 58px; height: 58px; font-size: 1.3rem; }
.avatar-placeholder p { margin: 0; color: rgba(255,255,255,.88); font-weight: 820; }
.tile-badge { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 999px; background: rgba(0,0,0,.38); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(14px); color: rgba(255,255,255,.92); font-size: .84rem; }
.call-controls { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; padding: 9px; z-index: 9; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.18); }
.control-btn { min-width: 74px; min-height: 62px; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 20px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.13); color: #fff; }
.control-btn span { font-size: .72rem; color: rgba(255,255,255,.78); font-weight: 780; }
.control-btn.on { background: rgba(29,185,166,.22); border-color: rgba(29,185,166,.42); color: #d7fff7; }
.control-btn.off { background: rgba(255,255,255,.10); }
.control-btn.danger { background: linear-gradient(135deg, var(--coral), #ff6b35); box-shadow: 0 14px 36px rgba(255,70,40,.30); }

.chat-drawer { min-height: 0; display: flex; flex-direction: column; padding: 14px; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 4px 12px; border-bottom: 1px solid var(--line); }
.chat-head strong, .chat-head small { display: block; }
.chat-head strong { color: var(--ink); }
.chat-head small { color: var(--muted); margin-top: 2px; }
.icon-only, .emoji-btn, .send-btn { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 16px; }
.chat-messages { min-height: 0; flex: 1; overflow-y: auto; padding: 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { max-width: 86%; padding: 11px 13px; border-radius: 18px; background: #f3f6fa; border: 1px solid var(--line); align-self: flex-start; word-break: break-word; animation: bubbleIn .2s ease both; color: var(--ink); }
.chat-bubble.me { align-self: flex-end; color: #fff; background: linear-gradient(135deg, var(--blue), #2f8cf0); border-color: transparent; }
.chat-bubble small { display: block; color: var(--muted); margin-bottom: 4px; font-size: .72rem; }
.chat-bubble.me small { color: rgba(255,255,255,.72); }
.chat-bubble p { margin: 0; line-height: 1.42; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.emoji-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 10px; margin-bottom: 10px; border-radius: 20px; background: #f8fafc; border: 1px solid var(--line); }
.emoji-row button { height: 36px; border-radius: 13px; background: #fff; border: 1px solid var(--line); font-size: 1.08rem; }
.chat-input-wrap { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 24px; background: #f8fafc; border: 1px solid var(--line); }
.chat-input-wrap input { padding: 10px 6px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.chat-input-wrap input:focus { box-shadow: none; }
.send-btn { background: linear-gradient(135deg, var(--blue), #2f8cf0); color: #fff; }

.dynamic-status {
  position: fixed;
  left: 50%;
  bottom: 82px;
  transform: translate(-50%, 12px) scale(.98);
  z-index: 70;
  min-width: 164px;
  max-width: min(92vw, 440px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(7, 21, 42, .86);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 60px rgba(7,21,42,.30), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease, background .2s ease;
}
.dynamic-status.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.dynamic-status::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 999px; background: linear-gradient(90deg, transparent, currentColor, transparent); opacity: .38; transform: translateX(-70%); }
.dynamic-status.loading::after { animation: statusSlide 1.05s ease-in-out infinite; opacity: .72; }
.dynamic-status.connected { border-color: rgba(29,185,166,.44); background: rgba(7,60,57,.88); color: #d7fff7; }
.dynamic-status.error { border-color: rgba(240,68,56,.42); background: rgba(99,24,19,.90); color: #fff2ef; }
.dynamic-status.ready { border-color: rgba(255,122,26,.36); }
.dynamic-status.loading { border-color: rgba(255,178,47,.42); color: #fff7e8; }
.dynamic-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 999px; background: var(--orange); box-shadow: 0 0 18px rgba(255,122,26,.80); }
.dynamic-status.connected .dynamic-dot { background: var(--teal); box-shadow: 0 0 18px rgba(29,185,166,.80); }
.dynamic-status.error .dynamic-dot { background: var(--danger); box-shadow: 0 0 18px rgba(240,68,56,.80); }
.dynamic-status.loading .dynamic-dot { background: var(--amber); box-shadow: 0 0 18px rgba(255,178,47,.80); animation: pulse .9s ease-in-out infinite alternate; }
.dynamic-status span:last-child { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .88rem; font-weight: 820; }
@keyframes statusSlide { to { transform: translateX(70%); } }
@keyframes pulse { to { transform: scale(1.3); opacity: .72; } }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px); z-index: 60; padding: 12px 16px; border-radius: 999px; color: #fff; background: rgba(7,21,42,.90); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 20px 70px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease; backdrop-filter: blur(18px); max-width: min(92vw, 620px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: rgba(99,24,19,.94); }


/* Akaora dark theme */
body[data-theme="dark"] {
  color: #f8fbff;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 122, 26, .18), transparent 28rem),
    radial-gradient(circle at 8% 88%, rgba(29, 185, 166, .13), transparent 28rem),
    linear-gradient(145deg, #050c18 0%, #07152a 48%, #0a2039 100%);
}
body[data-theme="dark"][data-view="create"],
body[data-theme="dark"][data-view="join"] {
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 122, 26, .16), transparent 28rem),
    radial-gradient(circle at 84% 74%, rgba(29, 185, 166, .12), transparent 28rem),
    linear-gradient(145deg, #050c18 0%, #07152a 54%, #0b2540 100%);
}
body[data-theme="dark"] .bg-grid { background-image: radial-gradient(rgba(255,255,255,.13) 1px, transparent 1.4px); opacity: .42; }
body[data-theme="dark"] .frosted,
body[data-theme="dark"] .card-white,
body[data-theme="dark"] .light-panel,
body[data-theme="dark"] .how-panel,
body[data-theme="dark"] .feature-strip article {
  color: #f8fbff;
  border-color: rgba(255, 255, 255, .13);
  background: rgba(8, 20, 38, .72);
  box-shadow: 0 20px 70px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.06);
}
body[data-theme="dark"] .theme-switch {
  color: #fff7e8;
  background: rgba(8, 20, 38, .78);
  border-color: rgba(255,255,255,.16);
  box-shadow: 0 18px 56px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.08);
}
body[data-theme="dark"] .brand-logo,
body[data-theme="dark"] .room-meta img,
body[data-theme="dark"] .floating-logo {
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,244,232,.92));
}
body[data-theme="dark"] .brand small,
body[data-theme="dark"] .feature-strip small,
body[data-theme="dark"] .light-panel p,
body[data-theme="dark"] .how-panel small,
body[data-theme="dark"] .form-heading p,
body[data-theme="dark"] .field-group label,
body[data-theme="dark"] .generated-room span,
body[data-theme="dark"] .room-meta span,
body[data-theme="dark"] .chat-head small,
body[data-theme="dark"] .chat-bubble small {
  color: rgba(235, 244, 255, .68);
}
body[data-theme="dark"] h2,
body[data-theme="dark"] .feature-strip strong,
body[data-theme="dark"] .form-heading h2,
body[data-theme="dark"] .chat-head strong,
body[data-theme="dark"] .room-meta strong,
body[data-theme="dark"] .generated-room strong {
  color: #fff7e8;
}
body[data-theme="dark"] .section-no,
body[data-theme="dark"] .eyebrow { color: #ff8c2f; }
body[data-theme="dark"] .soft-card,
body[data-theme="dark"] .generated-room,
body[data-theme="dark"] .emoji-row,
body[data-theme="dark"] .chat-input-wrap {
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,122,26,.07));
  border-color: rgba(255,255,255,.12);
}
body[data-theme="dark"] input {
  color: #f8fbff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}
body[data-theme="dark"] input::placeholder { color: rgba(235,244,255,.44); }
body[data-theme="dark"] .toggle-pill,
body[data-theme="dark"] .mini-btn,
body[data-theme="dark"] .icon-only,
body[data-theme="dark"] .emoji-btn {
  color: #f8fbff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
body[data-theme="dark"] .toggle-pill[data-enabled="true"] { background: rgba(29,185,166,.14); color: #9cf3e8; border-color: rgba(29,185,166,.34); }
body[data-theme="dark"] .soft-list li { background: rgba(255,255,255,.06); color: rgba(248,251,255,.86); border-color: rgba(255,255,255,.10); }
body[data-theme="dark"] .status-chip { color: #fff7e8; background: rgba(8,20,38,.82); border-color: rgba(255,255,255,.13); }
body[data-theme="dark"] .error-card { background: rgba(153, 27, 27, .16); border-color: rgba(240,68,56,.30); color: #fff2ef; }
body[data-theme="dark"] .error-card span { color: #ffc4bd; }
body[data-theme="dark"] .chat-bubble { color: #f8fbff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.10); }
body[data-theme="dark"] .chat-bubble.me { color: #fff; background: linear-gradient(135deg, var(--blue), #2f8cf0); }
body[data-theme="dark"] .emoji-row button { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
body[data-theme="dark"] ::selection { background: rgba(255, 122, 26, .34); color: #fff; }

@media (max-width: 980px) {
  .hero-card { grid-template-columns: 1fr; min-height: auto; }
  .hero-visual { min-height: 300px; }
  .home-panels { grid-template-columns: 1fr; }
  .steps-row { grid-template-columns: repeat(2, 1fr); }
  .steps-row article:last-child { grid-column: 1 / -1; }
  .call-layout { grid-template-columns: 1fr; height: auto; }
  .meeting-view { height: auto; min-height: 0; }
  .stage { min-height: 72vh; }
  .chat-drawer { position: fixed; inset: 84px 14px 14px; z-index: 35; transform: translateY(24px); opacity: 0; pointer-events: none; transition: opacity .24s ease, transform .24s ease; }
  .chat-drawer.open { opacity: 1; pointer-events: auto; transform: none; }
}
@media (min-width: 981px) { #closeChatBtn { display: none; } }
@media (max-width: 760px) {
  .theme-switch { top: 12px; right: 12px; bottom: auto; min-height: 40px; padding: 9px 12px; }
  body[data-view="meeting"] .theme-switch { top: 12px; bottom: auto; }
  .app-shell { width: min(100% - 20px, 1180px); padding-top: 10px; }
  .topbar { border-radius: 24px; }
  .brand small { display: none; }
  .status-chip { max-width: 136px; overflow: hidden; text-overflow: ellipsis; font-size: .78rem; padding: 9px 10px; }
  .hero-card { padding: 26px; border-radius: 28px; background: radial-gradient(circle at 82% 20%, rgba(255, 122, 26, .20), transparent 18rem), linear-gradient(145deg, #061326 0%, #07162b 62%, #0a2039 100%); }
  h1 { font-size: clamp(2.55rem, 13vw, 4.15rem); }
  .hero-text { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-primary, .hero-secondary { width: 100%; }
  .feature-strip { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .steps-row { grid-template-columns: 1fr; }
  .generated-room { grid-template-columns: 1fr; }
  .meeting-top { border-radius: 24px; align-items: flex-start; flex-direction: column; }
  .share-actions { width: 100%; }
  .share-actions .mini-btn { flex: 1; }
  .stage { min-height: 76vh; border-radius: 28px; }
  .local-tile { right: 18px; bottom: 118px; width: 42vw; height: 30vw; min-height: 112px; }
  .call-controls { width: calc(100% - 28px); justify-content: space-between; gap: 6px; padding: 8px; }
  .control-btn { min-width: 0; flex: 1; padding: 10px 5px; border-radius: 18px; }
  .control-btn span { font-size: .68rem; }
  .tile-badge { max-width: calc(100% - 20px); font-size: .74rem; }
}
@media (max-width: 480px) {
  .brand-logo { width: 40px; height: 40px; border-radius: 14px; }
  .brand strong { font-size: .92rem; }
  .form-card, .info-panel, .how-panel { border-radius: 26px; padding: 22px; }
  .media-options { flex-direction: column; }
  .toggle-pill { width: 100%; min-width: 0; }
  .avatar-circle { width: 72px; height: 72px; }
  .local-tile .avatar-circle { width: 46px; height: 46px; }
  .dynamic-status { bottom: 78px; min-width: 142px; padding: 9px 12px; }
  .dynamic-status span:last-child { font-size: .8rem; }
}

::selection { background: rgba(255, 122, 26, .28); color: var(--navy); }

/* Meeting room tight layout + natural camera aspect ratio update */
body[data-view="meeting"] .app-shell {
  width: min(1760px, calc(100% - 20px));
  padding: 8px 0 12px;
}

body[data-view="meeting"] .bg-grid {
  opacity: .72;
}

.meeting-view {
  height: calc(100vh - 20px);
  min-height: 560px;
  padding-top: 0;
}

.meeting-top {
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 28px;
}

.room-meta {
  gap: 10px;
}

.room-meta img {
  width: 40px;
  height: 40px;
  border-radius: 13px;
}

.share-actions {
  gap: 8px;
}

.call-layout {
  height: calc(100% - 58px);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 320px);
  gap: 10px;
}

.stage {
  border-radius: 26px;
}

.video-grid {
  inset: 5px;
}

.video-tile {
  border-radius: 22px;
}

.remote-tile {
  inset: 0;
}

.local-tile {
  right: 16px;
  bottom: 96px;
  width: clamp(190px, 22vw, 300px);
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
}

.video-tile video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #020814;
}

.remote-tile video,
.local-tile video {
  image-rendering: auto;
}

.avatar-placeholder {
  border-radius: inherit;
}

.call-controls {
  bottom: 14px;
  padding: 7px;
  gap: 7px;
  border-radius: 26px;
}

.control-btn {
  min-width: 68px;
  min-height: 56px;
  border-radius: 18px;
  padding: 8px 10px;
}

.chat-drawer {
  padding: 12px;
  border-radius: 26px;
}

.chat-head {
  padding: 4px 3px 10px;
}

.chat-input-wrap {
  padding: 8px;
  border-radius: 20px;
}

.tile-badge {
  left: 10px;
  bottom: 10px;
  padding: 7px 10px;
}

body[data-view="meeting"] .theme-switch {
  right: 14px;
  bottom: 14px;
  min-height: 40px;
  padding: 9px 12px;
}

@media (min-width: 1500px) {
  .call-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .local-tile {
    width: 310px;
  }
}

@media (max-width: 980px) {
  body[data-view="meeting"] .app-shell {
    width: min(100% - 14px, 1180px);
    padding: 7px 0 10px;
  }
  .meeting-view {
    height: auto;
    min-height: 0;
  }
  .call-layout {
    height: auto;
    gap: 8px;
  }
  .stage {
    min-height: 78vh;
    border-radius: 24px;
  }
  .video-grid {
    inset: 4px;
  }
}

@media (max-width: 760px) {
  .meeting-top {
    gap: 8px;
    padding: 8px;
    margin-bottom: 8px;
  }
  .stage {
    min-height: 74vh;
    border-radius: 22px;
  }
  .local-tile {
    right: 10px;
    bottom: 92px;
    width: min(44vw, 210px);
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
  .call-controls {
    bottom: 10px;
    width: calc(100% - 18px);
    gap: 5px;
  }
  .control-btn {
    min-height: 54px;
    padding: 8px 4px;
  }
}


/* Final responsive meeting-room + device/theme upgrade */
body[data-theme="light"] {
  color-scheme: light;
  --theme-page: #f7f9fc;
  --theme-surface: rgba(255,255,255,.88);
  --theme-surface-strong: rgba(255,255,255,.96);
  --theme-stage: rgba(255,255,255,.72);
  --theme-tile: #f2f6fb;
  --theme-text: #0b1630;
  --theme-muted: #607086;
  --theme-border: rgba(12,27,53,.13);
  --theme-control: rgba(255,255,255,.90);
  --theme-control-text: #0b1630;
}
body[data-theme="dark"] {
  color-scheme: dark;
  --theme-page: #061326;
  --theme-surface: rgba(8,20,38,.78);
  --theme-surface-strong: rgba(10,25,46,.94);
  --theme-stage: rgba(2,9,18,.70);
  --theme-tile: #07101c;
  --theme-text: #fff7e8;
  --theme-muted: rgba(235,244,255,.70);
  --theme-border: rgba(255,255,255,.13);
  --theme-control: rgba(20,32,52,.86);
  --theme-control-text: #fff7e8;
}
body[data-theme="light"][data-view="meeting"] {
  color: var(--theme-text);
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 122, 26, .16), transparent 24rem),
    radial-gradient(circle at 8% 92%, rgba(29, 185, 166, .12), transparent 26rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}
body[data-theme="dark"][data-view="meeting"] {
  color: var(--theme-text);
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 67, 56, .28), transparent 24rem),
    radial-gradient(circle at 5% 90%, rgba(29, 185, 166, .20), transparent 26rem),
    linear-gradient(150deg, #050c18 0%, #07152a 52%, #0a2039 100%);
}
body[data-view="meeting"] .meeting-top,
body[data-view="meeting"] .stage,
body[data-view="meeting"] .chat-drawer,
body[data-view="meeting"] .device-panel,
body[data-view="meeting"] .call-controls,
body[data-view="meeting"] .theme-switch,
body[data-view="meeting"] .mini-btn,
body[data-view="meeting"] .control-btn,
body[data-view="meeting"] .icon-only {
  color: var(--theme-control-text);
  border-color: var(--theme-border);
  background: var(--theme-surface);
}
body[data-theme="light"][data-view="meeting"] .stage { box-shadow: 0 24px 70px rgba(9, 24, 50, .12), inset 0 1px 0 rgba(255,255,255,.9); }
body[data-theme="dark"][data-view="meeting"] .stage { box-shadow: 0 22px 80px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.07); }
body[data-view="meeting"] .room-meta strong,
body[data-view="meeting"] .chat-head strong,
body[data-view="meeting"] .device-head strong,
body[data-view="meeting"] .device-field span { color: var(--theme-text); }
body[data-view="meeting"] .room-meta span,
body[data-view="meeting"] .chat-head small,
body[data-view="meeting"] .device-head small,
body[data-view="meeting"] .device-note { color: var(--theme-muted); }
body[data-theme="light"][data-view="meeting"] .bg-grid { background-image: radial-gradient(rgba(12,27,53,.14) 1px, transparent 1.4px); opacity: .55; }
body[data-theme="dark"][data-view="meeting"] .bg-grid { background-image: radial-gradient(rgba(255,255,255,.13) 1px, transparent 1.4px); opacity: .50; }
body[data-view="meeting"] .app-shell { width: min(100% - 16px, 1780px); padding: 6px 0 10px; }
.meeting-view { height: calc(100dvh - 16px); min-height: 560px; }
.meeting-top { min-height: 58px; padding: 8px 10px; gap: 10px; }
.share-actions { flex-wrap: wrap; }
.call-layout { display: block; height: calc(100% - 66px); }
.stage { position: relative; height: 100%; min-height: 0; background: var(--theme-stage); overflow: hidden; }
.video-grid { inset: 6px; }
.video-tile { background: var(--theme-tile); border-color: var(--theme-border); }
.video-tile video { object-fit: contain; background: #020814; }
.remote-tile { inset: 0; }
.local-tile { right: 16px; bottom: 96px; width: clamp(180px, 18vw, 320px); aspect-ratio: 16 / 9; z-index: 5; }
.screen-tile { left: 16px; bottom: 96px; width: clamp(210px, 24vw, 420px); aspect-ratio: 16 / 9; z-index: 4; }
.screen-tile[hidden] { display: none !important; }
.tile-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(0,0,0,.38);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  opacity: .82;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
  z-index: 8;
}
.tile-fullscreen:hover { opacity: 1; transform: translateY(-1px); background: rgba(0,0,0,.54); }
.tile-fullscreen svg { width: 18px; height: 18px; }
.call-controls { bottom: 14px; max-width: min(calc(100% - 18px), 760px); flex-wrap: wrap; justify-content: center; }
.control-btn { min-width: 72px; }
.control-btn.on { color: #fff; background: linear-gradient(135deg, var(--teal), #14a597) !important; border-color: rgba(29,185,166,.42) !important; }
.control-btn.off { opacity: .88; }
.chat-drawer {
  position: fixed;
  top: 74px;
  right: 14px;
  bottom: 14px;
  width: min(390px, calc(100vw - 28px));
  min-height: 0;
  z-index: 60;
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
  transition: transform .24s ease, opacity .24s ease;
  box-shadow: 0 24px 80px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.06);
}
.chat-drawer.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.chat-input-wrap,
.emoji-row { background: var(--theme-surface-strong); border-color: var(--theme-border); }
body[data-theme="light"] .chat-bubble { background: #f3f6fa; color: #0b1630; }
body[data-theme="dark"] .chat-bubble { background: rgba(255,255,255,.08); color: #fff7e8; }
.device-panel {
  position: fixed;
  right: 14px;
  bottom: 72px;
  z-index: 70;
  width: min(380px, calc(100vw - 28px));
  padding: 16px;
  border-radius: 26px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 26px 90px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
}
.device-panel.open:not([hidden]) { transform: none; opacity: 1; pointer-events: auto; }
.device-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.device-head strong, .device-head small { display: block; }
.device-head small { margin-top: 3px; line-height: 1.35; }
.device-field { display: grid; gap: 7px; margin: 12px 0; }
.device-field select {
  width: 100%;
  border: 1px solid var(--theme-border);
  background: var(--theme-surface-strong);
  color: var(--theme-text);
  border-radius: 16px;
  padding: 12px 13px;
  outline: none;
  font: inherit;
}
.refresh-devices { width: 100%; justify-content: center; margin-top: 8px; }
.device-note { margin: 10px 2px 0; font-size: .82rem; line-height: 1.4; }
.theme-switch span { min-width: 36px; }
@media (max-width: 1100px) {
  body[data-view="meeting"] .app-shell { width: min(100% - 10px, 1100px); }
  .meeting-view { height: auto; min-height: calc(100dvh - 10px); }
  .stage { min-height: calc(100dvh - 92px); }
  .meeting-top { border-radius: 22px; }
}
@media (max-width: 760px) {
  body[data-view="meeting"] .app-shell { width: 100%; padding: 4px; }
  .meeting-view { min-height: 100dvh; }
  .meeting-top { border-radius: 20px; align-items: stretch; }
  .room-meta img { width: 36px; height: 36px; }
  .room-meta strong { font-size: .95rem; }
  .share-actions .mini-btn { min-height: 42px; padding: 0 10px; font-size: .82rem; }
  .call-layout { height: auto; }
  .stage { min-height: calc(100dvh - 150px); border-radius: 22px; }
  .video-grid { inset: 4px; }
  .local-tile { width: min(45vw, 190px); right: 10px; bottom: 116px; border-radius: 18px; }
  .screen-tile { width: min(52vw, 230px); left: 10px; bottom: 116px; border-radius: 18px; }
  .call-controls { width: calc(100% - 16px); bottom: 8px; gap: 5px; padding: 7px; border-radius: 22px; }
  .control-btn { flex: 1 1 28%; min-width: 0; min-height: 52px; padding: 8px 5px; border-radius: 17px; }
  .control-btn span { font-size: .68rem; }
  .tile-badge { font-size: .72rem; padding: 6px 9px; }
  .tile-fullscreen { width: 34px; height: 34px; border-radius: 12px; top: 8px; right: 8px; }
  .chat-drawer { top: 10px; right: 8px; bottom: 8px; width: calc(100vw - 16px); border-radius: 24px; }
  .device-panel { right: 8px; bottom: 76px; width: calc(100vw - 16px); }
  body[data-view="meeting"] .theme-switch { top: auto; right: 8px; bottom: 8px; transform: translateY(68px); }
  body[data-view="meeting"] .theme-switch:hover { transform: translateY(66px); }
}
@media (max-width: 430px) {
  .share-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .share-actions .mini-btn:nth-child(3) { grid-column: 1 / -1; }
  .stage { min-height: calc(100dvh - 178px); }
  .local-tile, .screen-tile { bottom: 146px; }
  .control-btn { flex-basis: 30%; }
  .control-btn svg { width: 18px; height: 18px; }
}

/* Keep theme switch reachable on smaller meeting screens */
@media (max-width: 760px) {
  body[data-view="meeting"] .theme-switch {
    top: 8px;
    right: 8px;
    bottom: auto;
    transform: none;
  }
  body[data-view="meeting"] .theme-switch:hover { transform: translateY(-1px); }
}

/* Akaora final polish: nav theme button, readable themes, colorful icon-only controls, mobile call layout */
:root {
  --ctrl-mic: #1db9a6;
  --ctrl-cam: #246fc6;
  --ctrl-screen: #8b5cf6;
  --ctrl-device: #ff9f1c;
  --ctrl-chat: #25d0ff;
  --ctrl-leave: #ff453a;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.nav-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.theme-switch,
body[data-view="meeting"] .theme-switch {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  min-height: 40px;
  height: 42px;
  padding: 9px 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.theme-switch:hover,
body[data-view="meeting"] .theme-switch:hover {
  transform: translateY(-1px) !important;
}
.theme-switch span { min-width: auto; }
.theme-icon-moon { display: block; }
.theme-icon-sun { display: none; }
body[data-theme="dark"] .theme-icon-moon { display: none; }
body[data-theme="dark"] .theme-icon-sun { display: block; }
body[data-theme="light"] {
  --app-bg: #f8fbff;
  --app-bg-2: #eef4fb;
  --theme-page: #f8fbff;
  --theme-surface: rgba(255,255,255,.90);
  --theme-surface-strong: rgba(255,255,255,.98);
  --theme-stage: rgba(255,255,255,.78);
  --theme-tile: #edf3fa;
  --theme-text: #07152a;
  --theme-muted: #526479;
  --theme-border: rgba(12,27,53,.14);
  --theme-control: rgba(255,255,255,.94);
  --theme-control-text: #07152a;
  color: var(--theme-text);
}
body[data-theme="dark"] {
  --app-bg: #061326;
  --app-bg-2: #081d36;
  --theme-page: #061326;
  --theme-surface: rgba(8,20,38,.84);
  --theme-surface-strong: rgba(10,25,46,.96);
  --theme-stage: rgba(2,9,18,.74);
  --theme-tile: #07101c;
  --theme-text: #fff7e8;
  --theme-muted: rgba(235,244,255,.74);
  --theme-border: rgba(255,255,255,.14);
  --theme-control: rgba(20,32,52,.90);
  --theme-control-text: #fff7e8;
  color: var(--theme-text);
}
body[data-theme="light"] .topbar,
body[data-theme="light"] .form-card,
body[data-theme="light"] .feature-strip article,
body[data-theme="light"] .light-panel,
body[data-theme="light"] .how-panel,
body[data-theme="light"] .meeting-top,
body[data-theme="light"] .stage,
body[data-theme="light"] .chat-drawer,
body[data-theme="light"] .device-panel,
body[data-theme="light"] .call-controls,
body[data-theme="light"] .mini-btn,
body[data-theme="light"] .icon-only,
body[data-theme="light"] .theme-switch,
body[data-theme="light"] .chat-input-wrap,
body[data-theme="light"] .emoji-row {
  color: var(--theme-text) !important;
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .form-card,
body[data-theme="dark"] .feature-strip article,
body[data-theme="dark"] .light-panel,
body[data-theme="dark"] .how-panel,
body[data-theme="dark"] .meeting-top,
body[data-theme="dark"] .stage,
body[data-theme="dark"] .chat-drawer,
body[data-theme="dark"] .device-panel,
body[data-theme="dark"] .call-controls,
body[data-theme="dark"] .mini-btn,
body[data-theme="dark"] .icon-only,
body[data-theme="dark"] .theme-switch,
body[data-theme="dark"] .chat-input-wrap,
body[data-theme="dark"] .emoji-row {
  color: var(--theme-text) !important;
  background: var(--theme-surface) !important;
  border-color: var(--theme-border) !important;
}
body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] strong,
body[data-theme="light"] label,
body[data-theme="light"] .room-meta strong,
body[data-theme="light"] .room-meta b,
body[data-theme="light"] .chat-head strong,
body[data-theme="light"] .device-head strong,
body[data-theme="light"] .device-field span,
body[data-theme="light"] .generated-room strong,
body[data-theme="light"] .form-heading h2 { color: #07152a !important; }
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] strong,
body[data-theme="dark"] label,
body[data-theme="dark"] .room-meta strong,
body[data-theme="dark"] .room-meta b,
body[data-theme="dark"] .chat-head strong,
body[data-theme="dark"] .device-head strong,
body[data-theme="dark"] .device-field span,
body[data-theme="dark"] .generated-room strong,
body[data-theme="dark"] .form-heading h2 { color: #fff7e8 !important; }
body[data-theme="light"] p,
body[data-theme="light"] small,
body[data-theme="light"] .room-meta span,
body[data-theme="light"] .host-meta,
body[data-theme="light"] .chat-head small,
body[data-theme="light"] .device-head small,
body[data-theme="light"] .device-note,
body[data-theme="light"] .form-heading p,
body[data-theme="light"] .feature-strip small { color: #526479 !important; }
body[data-theme="dark"] p,
body[data-theme="dark"] small,
body[data-theme="dark"] .room-meta span,
body[data-theme="dark"] .host-meta,
body[data-theme="dark"] .chat-head small,
body[data-theme="dark"] .device-head small,
body[data-theme="dark"] .device-note,
body[data-theme="dark"] .form-heading p,
body[data-theme="dark"] .feature-strip small { color: rgba(235,244,255,.74) !important; }
body[data-theme="light"] input,
body[data-theme="light"] select {
  background: rgba(255,255,255,.98) !important;
  color: #07152a !important;
  border-color: rgba(12,27,53,.14) !important;
}
body[data-theme="dark"] input,
body[data-theme="dark"] select {
  background: rgba(5,14,28,.92) !important;
  color: #fff7e8 !important;
  border-color: rgba(255,255,255,.14) !important;
}
body[data-theme="light"][data-view="meeting"] {
  background:
    radial-gradient(circle at 84% 8%, rgba(255, 122, 26, .14), transparent 24rem),
    radial-gradient(circle at 8% 92%, rgba(29, 185, 166, .12), transparent 26rem),
    linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%) !important;
  color: #07152a !important;
}
body[data-theme="dark"][data-view="meeting"] {
  background:
    radial-gradient(circle at 82% 8%, rgba(255, 67, 56, .25), transparent 24rem),
    radial-gradient(circle at 5% 90%, rgba(29, 185, 166, .18), transparent 26rem),
    linear-gradient(150deg, #050c18 0%, #07152a 52%, #0a2039 100%) !important;
  color: #fff7e8 !important;
}
.host-meta {
  display: block;
  margin-top: 2px;
  font-size: .72rem;
  letter-spacing: .02em;
}
.host-meta b { font-weight: 860; }
body[data-view="meeting"] .app-shell { width: min(100% - 12px, 1780px); padding: 6px 0 8px; }
.meeting-view { height: calc(100dvh - 14px); min-height: 560px; }
.meeting-top {
  min-height: 58px;
  padding: 7px 9px;
  gap: 10px;
  border-radius: 28px;
}
.room-meta { min-width: 0; }
.room-meta > div { min-width: 0; }
.room-meta strong { word-break: break-word; }
.share-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.call-layout { height: calc(100% - 66px); }
.stage { border-radius: 28px; min-height: 0; }
.video-grid { inset: 5px; }
.video-tile video { object-fit: contain !important; width: 100%; height: 100%; }
.local-tile video.is-live { display: block; }
.call-controls {
  max-width: min(calc(100% - 18px), 560px) !important;
  gap: 8px !important;
  padding: 9px !important;
  border-radius: 26px !important;
}
.control-btn {
  width: 58px !important;
  min-width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 20px !important;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff !important;
  transition: transform .18s ease, filter .18s ease, box-shadow .18s ease, background .18s ease, opacity .18s ease;
}
.control-btn:hover { transform: translateY(-2px) scale(1.03); }
.control-btn:active { transform: scale(.94); }
.control-btn svg { width: 24px !important; height: 24px !important; stroke-width: 2.2; filter: drop-shadow(0 2px 6px rgba(0,0,0,.22)); }
.control-btn .icon-on { display: block; }
.control-btn .icon-off { display: none; }
.control-btn.off .icon-on { display: none; }
.control-btn.off .icon-off { display: block; }
.control-btn.on { animation: controlPop .28s ease both; }
@keyframes controlPop { 0% { transform: scale(.92); } 65% { transform: scale(1.08); } 100% { transform: none; } }
.mic-control { background: linear-gradient(135deg, var(--ctrl-mic), #0e9f8f) !important; border-color: rgba(29,185,166,.42) !important; box-shadow: 0 14px 38px rgba(29,185,166,.24); }
.mic-control.off { background: linear-gradient(135deg, #546071, #2d3748) !important; box-shadow: none; }
.camera-control { background: linear-gradient(135deg, var(--ctrl-cam), #2f8cf0) !important; border-color: rgba(36,111,198,.42) !important; box-shadow: 0 14px 38px rgba(36,111,198,.25); }
.camera-control.off { background: linear-gradient(135deg, #4a5568, #1f2937) !important; box-shadow: none; }
.screen-control { background: linear-gradient(135deg, var(--ctrl-screen), #5b68f1) !important; border-color: rgba(139,92,246,.42) !important; }
.screen-control.on { background: linear-gradient(135deg, #14b8a6, #10b981) !important; }
.device-control { background: linear-gradient(135deg, var(--ctrl-device), #ff6b2f) !important; border-color: rgba(255,159,28,.42) !important; }
.chat-control { background: linear-gradient(135deg, var(--ctrl-chat), #246fc6) !important; border-color: rgba(37,208,255,.42) !important; }
.hangup-control,
.control-btn.danger { background: linear-gradient(135deg, #ff453a, #ff6b2f) !important; border-color: rgba(255,69,58,.48) !important; box-shadow: 0 18px 42px rgba(255,69,58,.30) !important; }
.control-btn.off::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ff453a;
  box-shadow: 0 0 0 4px rgba(255,69,58,.18);
}
.control-btn.on::after {
  content: "";
  position: absolute;
  inset: auto 12px 12px auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52,211,153,.20);
}
.chat-bubble p { color: inherit !important; }
body[data-theme="light"] .chat-bubble { background: #eef3f9 !important; color: #07152a !important; }
body[data-theme="dark"] .chat-bubble { background: rgba(255,255,255,.08) !important; color: #fff7e8 !important; }
body[data-theme="light"] .chat-bubble.me { background: linear-gradient(135deg, #246fc6, #2f8cf0) !important; color: #fff !important; }
body[data-theme="dark"] .chat-bubble.me { background: linear-gradient(135deg, #246fc6, #2f8cf0) !important; color: #fff !important; }

@media (max-width: 900px) {
  body[data-view="meeting"] .app-shell { width: 100%; padding: 4px; }
  .meeting-view { height: auto; min-height: 100dvh; }
  .meeting-top { border-radius: 22px; align-items: stretch; flex-direction: column; }
  .share-actions { justify-content: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .share-actions .mini-btn,
  .share-actions .theme-switch { width: 100%; justify-content: center; min-width: 0; }
  .call-layout { height: auto; }
  .stage { min-height: calc(100dvh - 182px); border-radius: 22px; }
  .local-tile { width: min(44vw, 210px); right: 10px; bottom: 92px; border-radius: 18px; }
  .screen-tile { width: min(54vw, 260px); left: 10px; bottom: 92px; border-radius: 18px; }
  .call-controls { width: calc(100% - 14px) !important; max-width: 520px !important; bottom: 8px; }
  .control-btn { width: 52px !important; min-width: 52px !important; height: 52px !important; min-height: 52px !important; border-radius: 18px !important; }
  .chat-drawer { top: 8px; right: 8px; bottom: 8px; width: calc(100vw - 16px); border-radius: 24px; }
  .device-panel { right: 8px; bottom: 76px; width: calc(100vw - 16px); }
}
@media (max-width: 520px) {
  .app-shell { width: min(100% - 14px, 1180px); }
  .topbar { align-items: stretch; flex-direction: column; border-radius: 24px; }
  .brand, .nav-actions { width: 100%; justify-content: space-between; }
  .status-chip { flex: 1 1 auto; min-width: 0; }
  .hero-card { border-radius: 26px; padding: 24px 18px; min-height: auto; }
  .hero-actions > * { width: 100%; }
  .meeting-top { gap: 8px; }
  .room-meta img { width: 38px; height: 38px; }
  .share-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .share-actions .mini-btn,
  .share-actions .theme-switch { min-height: 40px; padding: 8px 9px; font-size: .78rem; }
  .share-actions .mini-btn svg,
  .share-actions .theme-switch svg { width: 17px; height: 17px; }
  .stage { min-height: calc(100dvh - 214px); }
  .local-tile { width: min(47vw, 170px); right: 8px; bottom: 84px; }
  .screen-tile { width: min(55vw, 210px); left: 8px; bottom: 84px; }
  .tile-badge { font-size: .68rem; max-width: calc(100% - 16px); }
  .call-controls { gap: 5px !important; padding: 7px !important; border-radius: 22px !important; }
  .control-btn { width: 46px !important; min-width: 46px !important; height: 46px !important; min-height: 46px !important; border-radius: 16px !important; }
  .control-btn svg { width: 21px !important; height: 21px !important; }
  .control-btn::after { width: 7px !important; height: 7px !important; right: 9px !important; bottom: 9px !important; }
}
@media (max-width: 360px) {
  .control-btn { width: 42px !important; min-width: 42px !important; height: 42px !important; min-height: 42px !important; }
  .call-controls { max-width: calc(100% - 8px) !important; }
  .stage { min-height: calc(100dvh - 224px); }
}

/* Final update: no floating update bar, fixed light theme, split video layouts, footer */
.dynamic-status { display: none !important; }

.home-footer {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--theme-text, #07152a);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(12,27,53,.12);
  box-shadow: 0 18px 55px rgba(9,24,50,.10);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}
.home-footer > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-footer strong { font-size: 1rem; letter-spacing: -.02em; }
.home-footer span { color: var(--muted); font-size: .88rem; }
.home-footer b { color: var(--coral); }
body[data-theme="dark"] .home-footer {
  color: #fff7e8;
  background: rgba(8,20,38,.84);
  border-color: rgba(255,255,255,.12);
}
body[data-theme="dark"] .home-footer span { color: rgba(235,244,255,.72); }

.layout-switch {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--theme-surface, rgba(255,255,255,.9));
  border: 1px solid var(--theme-border, rgba(12,27,53,.13));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.layout-switch button {
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: -.01em;
  color: var(--theme-muted, #526479);
  background: transparent;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.layout-switch button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  box-shadow: 0 8px 22px rgba(255, 83, 42, .22);
}
.layout-switch button:hover { transform: translateY(-1px); }

body[data-theme="light"] .hero-card,
body[data-theme="light"] .hero-card h1,
body[data-theme="light"] .hero-card strong,
body[data-theme="light"] .hero-card .hero-pill,
body[data-theme="light"] .hero-card .hero-text,
body[data-theme="light"] .hero-card p,
body[data-theme="light"] .hero-card small {
  color: #fff !important;
}
body[data-theme="light"] .hero-card .hero-text { color: rgba(255,255,255,.84) !important; }

body[data-theme="light"] .section-no,
body[data-theme="light"] .eyebrow { color: #ff5b2a !important; }
body[data-theme="light"] .soft-list li,
body[data-theme="light"] .soft-card,
body[data-theme="light"] .generated-room,
body[data-theme="light"] .toggle-pill,
body[data-theme="light"] .mini-btn,
body[data-theme="light"] .layout-switch,
body[data-theme="light"] .theme-switch,
body[data-theme="light"] .status-chip {
  color: #07152a !important;
  background: rgba(255,255,255,.94) !important;
  border-color: rgba(12,27,53,.13) !important;
}
body[data-theme="light"] .layout-switch button.active { color: #fff !important; }
body[data-theme="light"] .tile-badge,
body[data-theme="light"] .avatar-placeholder p,
body[data-theme="light"] .local-media-state { color: #fff !important; }

body[data-theme="light"][data-view="meeting"] .meeting-top,
body[data-theme="light"][data-view="meeting"] .stage,
body[data-theme="light"][data-view="meeting"] .chat-drawer,
body[data-theme="light"][data-view="meeting"] .device-panel,
body[data-theme="light"][data-view="meeting"] .call-controls,
body[data-theme="light"][data-view="meeting"] .layout-switch,
body[data-theme="light"][data-view="meeting"] .theme-switch {
  color: #07152a !important;
  background: rgba(255,255,255,.90) !important;
  border-color: rgba(12,27,53,.14) !important;
}
body[data-theme="light"][data-view="meeting"] .video-tile {
  background: #f1f6fb !important;
  border-color: rgba(12,27,53,.13) !important;
}
body[data-theme="light"][data-view="meeting"] .video-tile video { background: #e8f0f8 !important; }
body[data-theme="light"][data-view="meeting"] .avatar-placeholder { color: #07152a !important; }
body[data-theme="light"][data-view="meeting"] .avatar-placeholder p { color: #07152a !important; }
body[data-theme="light"][data-view="meeting"] .tile-badge {
  color: #07152a !important;
  background: rgba(255,255,255,.74) !important;
  border-color: rgba(12,27,53,.12) !important;
}
body[data-theme="dark"][data-view="meeting"] .tile-badge {
  color: #fff7e8 !important;
  background: rgba(4,12,24,.62) !important;
  border-color: rgba(255,255,255,.12) !important;
}

/* Responsive auto-fitting video section */
body[data-view="meeting"] .stage {
  display: block !important;
  position: relative;
  overflow: hidden;
}
body[data-view="meeting"] .video-grid {
  position: absolute !important;
  inset: 8px !important;
  padding-bottom: 88px !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  justify-items: stretch;
}
body[data-view="meeting"] .video-tile,
body[data-view="meeting"] .remote-tile,
body[data-view="meeting"] .local-tile,
body[data-view="meeting"] .screen-tile {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  z-index: auto !important;
  grid-column: auto;
  grid-row: auto;
}
body[data-view="meeting"] .video-tile video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}
body[data-view="meeting"] .video-grid[data-count="1"] { grid-template-columns: 1fr; }
body[data-view="meeting"] .video-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body[data-view="meeting"] .video-grid[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body[data-view="meeting"] .video-grid[data-layout="split"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body[data-view="meeting"] .video-grid[data-layout="focus"] { grid-template-columns: minmax(0, 1fr) minmax(220px, 32%) !important; }
body[data-view="meeting"] .video-grid[data-layout="focus"] .remote-tile { grid-row: span 2; }
body[data-view="meeting"] .video-grid[data-layout="focus"] .local-tile,
body[data-view="meeting"] .video-grid[data-layout="focus"] .screen-tile { min-height: 180px !important; }
body[data-view="meeting"] .video-grid.has-screen[data-layout="auto"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

body[data-view="meeting"] .call-controls {
  z-index: 15;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

@media (max-width: 900px) {
  body[data-view="meeting"] .meeting-top { flex-direction: column !important; align-items: stretch !important; }
  body[data-view="meeting"] .share-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body[data-view="meeting"] .layout-switch { grid-column: 1 / -1; width: 100%; justify-content: center; }
  body[data-view="meeting"] .video-grid {
    inset: 6px !important;
    padding-bottom: 78px !important;
    grid-template-columns: 1fr !important;
    grid-auto-rows: minmax(180px, 1fr);
  }
  body[data-view="meeting"] .video-grid[data-layout="split"],
  body[data-view="meeting"] .video-grid[data-layout="focus"] { grid-template-columns: 1fr !important; }
  body[data-view="meeting"] .video-grid[data-layout="focus"] .remote-tile { grid-row: auto; }
  .home-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  body[data-view="meeting"] .app-shell { padding: 4px !important; }
  body[data-view="meeting"] .meeting-view { min-height: 100dvh !important; }
  body[data-view="meeting"] .share-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; }
  body[data-view="meeting"] .share-actions .mini-btn,
  body[data-view="meeting"] .share-actions .theme-switch { font-size: .72rem !important; min-height: 38px !important; }
  body[data-view="meeting"] .stage { min-height: calc(100dvh - 238px) !important; border-radius: 20px !important; }
  body[data-view="meeting"] .video-grid { grid-auto-rows: minmax(150px, 1fr) !important; gap: 6px !important; padding-bottom: 68px !important; }
  body[data-view="meeting"] .tile-badge { font-size: .64rem; padding: 6px 8px; }
  body[data-view="meeting"] .tile-fullscreen { width: 32px; height: 32px; border-radius: 11px; top: 8px; right: 8px; }
  .home-footer { padding: 16px; border-radius: 22px; }
  .home-footer span { font-size: .78rem; }
}


body.modal-open { overflow: hidden; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 16, 31, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.modal-backdrop[hidden] { display: none !important; }
.feedback-modal {
  position: relative;
  width: min(100%, 560px);
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,249,253,.98));
  box-shadow: 0 34px 100px rgba(4, 14, 30, 0.24);
  border: 1px solid rgba(18, 40, 76, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body[data-theme="dark"] .feedback-modal {
  background: linear-gradient(180deg, rgba(10,22,42,.98), rgba(8,18,34,.98));
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.42);
}
.feedback-logo-wrap { display: flex; justify-content: center; }
.feedback-logo {
  width: 72px; height: 72px; object-fit: cover; border-radius: 22px;
  box-shadow: 0 16px 38px rgba(8, 28, 60, 0.18);
}
.feedback-eyebrow {
  margin: 0; color: var(--coral); font-size: .82rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.feedback-modal h3 {
  margin: 0; font-size: clamp(1.4rem, 2.2vw, 2rem); line-height: 1.08; color: var(--navy);
}
body[data-theme="dark"] .feedback-modal h3 { color: #f5f8ff; }
.feedback-text {
  margin: 0; color: var(--muted); line-height: 1.6;
}
body[data-theme="dark"] .feedback-text { color: rgba(226, 236, 249, 0.8); }
.feedback-rating {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.rating-btn {
  width: 46px; height: 46px; border: 0; border-radius: 16px; cursor: pointer;
  font-size: 1.4rem; color: #c6cfdd;
  background: rgba(18, 40, 76, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.rating-btn:hover { transform: translateY(-2px); color: var(--amber); }
.rating-btn.active {
  background: linear-gradient(135deg, rgba(255,125,52,.16), rgba(255,189,63,.22));
  color: var(--amber);
  box-shadow: 0 12px 30px rgba(255, 143, 64, 0.18);
}
body[data-theme="dark"] .rating-btn {
  background: rgba(255,255,255,.07); color: rgba(225,236,248,.48); box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.feedback-input {
  min-height: 120px; resize: vertical; width: 100%; border-radius: 22px; border: 1px solid rgba(18, 40, 76, 0.12);
  padding: 14px 16px; font: inherit; color: var(--navy); background: rgba(255,255,255,.86); outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.feedback-input:focus { border-color: rgba(255, 116, 48, 0.35); box-shadow: 0 0 0 4px rgba(255, 116, 48, 0.12); }
body[data-theme="dark"] .feedback-input {
  background: rgba(255,255,255,.06); color: #f3f7ff; border-color: rgba(255,255,255,.12); box-shadow: none;
}
body[data-theme="dark"] .feedback-input::placeholder { color: rgba(217, 228, 245, 0.5); }
.feedback-actions {
  display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap;
}
.feedback-actions .primary-action, .feedback-actions .mini-btn { min-width: 170px; }
.feedback-submit svg { width: 18px; height: 18px; }
.feedback-skip { background: transparent; }
.modal-close {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 16px; border: 1px solid rgba(18,40,76,.12);
  background: rgba(255,255,255,.74); color: var(--navy); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(11, 26, 47, 0.10); transition: transform .18s ease, box-shadow .18s ease;
}
.modal-close:hover { transform: translateY(-1px); box-shadow: 0 18px 40px rgba(11, 26, 47, 0.14); }
.modal-close svg { width: 20px; height: 20px; }
body[data-theme="dark"] .modal-close {
  background: rgba(255,255,255,.08); color: #f5f8ff; border-color: rgba(255,255,255,.14); box-shadow: none;
}
@media (max-width: 640px) {
  .modal-backdrop { padding: 12px; }
  .feedback-modal { padding: 22px 18px 18px; border-radius: 24px; }
  .feedback-actions { flex-direction: column-reverse; }
  .feedback-actions .primary-action, .feedback-actions .mini-btn { width: 100%; min-width: 0; }
  .modal-close { top: 10px; right: 10px; width: 40px; height: 40px; }
}


/* Final polish: dark home cards, pinned video, improved mobile call controls */
body[data-theme="dark"] .steps-row article {
  background: linear-gradient(180deg, rgba(12, 27, 52, .96), rgba(8, 20, 38, .94)) !important;
  border-color: rgba(255,255,255,.12) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 18px 42px rgba(0,0,0,.18);
}
body[data-theme="dark"] .steps-row strong { color: #fff7e8 !important; }
body[data-theme="dark"] .steps-row small { color: rgba(235,244,255,.72) !important; }
body[data-theme="dark"] .steps-row article:nth-child(1) strong,
body[data-theme="dark"] .steps-row article:nth-child(2) strong,
body[data-theme="dark"] .steps-row article:nth-child(3) strong,
body[data-theme="dark"] .steps-row article:nth-child(4) strong,
body[data-theme="dark"] .steps-row article:nth-child(5) strong { text-shadow: none !important; }
body[data-theme="light"] .steps-row article {
  background: linear-gradient(180deg, #ffffff, #f6f8fc) !important;
  border-color: rgba(12,27,53,.10) !important;
}
body[data-theme="light"] .steps-row strong { color: #07152a !important; }
body[data-theme="light"] .steps-row small { color: #607087 !important; }

/* Replace fullscreen tile button with pin button */
.tile-fullscreen { display: none !important; }
.tile-pin {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: rgba(0,0,0,.36);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  opacity: .86;
  z-index: 10;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .18s ease, opacity .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
}
.tile-pin:hover { opacity: 1; transform: translateY(-2px) scale(1.04); background: rgba(255,122,26,.78); box-shadow: 0 14px 34px rgba(255,91,42,.25); }
.tile-pin.active { background: linear-gradient(135deg, var(--orange), var(--coral)); color: #fff; box-shadow: 0 16px 38px rgba(255,91,42,.34); animation: pinPulse .38s ease both; }
.tile-pin svg { width: 19px; height: 19px; stroke-width: 2.3; }
body[data-theme="light"] .tile-pin { background: rgba(255,255,255,.82); color: #07152a; border-color: rgba(12,27,53,.16); }
body[data-theme="light"] .tile-pin.active { color: #fff; background: linear-gradient(135deg, var(--orange), var(--coral)); }
@keyframes pinPulse { 0% { transform: scale(.86) rotate(-7deg); } 60% { transform: scale(1.13) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }
.video-tile.pin-animate { animation: tilePinned .42s cubic-bezier(.18,.9,.28,1.18) both; }
@keyframes tilePinned { 0% { transform: scale(.985); box-shadow: 0 0 0 rgba(255,91,42,0); } 55% { transform: scale(1.015); box-shadow: 0 0 0 5px rgba(255,122,26,.18), 0 24px 60px rgba(255,91,42,.20); } 100% { transform: scale(1); } }
body[data-view="meeting"] .video-tile.pinned {
  border-color: rgba(255,122,26,.58) !important;
  box-shadow: 0 0 0 1px rgba(255,122,26,.30), 0 24px 72px rgba(255,91,42,.18), inset 0 1px 0 rgba(255,255,255,.10) !important;
}
body[data-view="meeting"] .video-grid[data-pinned="remote"] .remote-tile,
body[data-view="meeting"] .video-grid[data-pinned="local"] .local-tile,
body[data-view="meeting"] .video-grid[data-pinned="screen"] .screen-tile {
  grid-column: 1 / -1 !important;
  grid-row: span 2 !important;
  min-height: clamp(260px, 52dvh, 720px) !important;
  order: -3;
}
body[data-view="meeting"] .video-grid[data-pinned="remote"] .local-tile,
body[data-view="meeting"] .video-grid[data-pinned="remote"] .screen-tile,
body[data-view="meeting"] .video-grid[data-pinned="local"] .remote-tile,
body[data-view="meeting"] .video-grid[data-pinned="local"] .screen-tile,
body[data-view="meeting"] .video-grid[data-pinned="screen"] .remote-tile,
body[data-view="meeting"] .video-grid[data-pinned="screen"] .local-tile {
  min-height: 170px !important;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)) !important;
}

/* Cleaner bottom control dock */
body[data-view="meeting"] .call-controls {
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  max-width: min(calc(100% - 18px), 600px) !important;
  width: auto !important;
  padding: 8px !important;
  border-radius: 28px !important;
  background: rgba(8, 20, 38, .72) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow: 0 22px 62px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
}
body[data-theme="light"][data-view="meeting"] .call-controls {
  background: rgba(255,255,255,.86) !important;
  border-color: rgba(12,27,53,.12) !important;
  box-shadow: 0 18px 58px rgba(12,27,53,.14), inset 0 1px 0 rgba(255,255,255,.85);
}
body[data-view="meeting"] .control-btn { flex: 0 0 auto; }
body[data-view="meeting"] .mic-control { background: linear-gradient(135deg, #12b886, #0ea5a3) !important; }
body[data-view="meeting"] .mic-control.off { background: linear-gradient(135deg, #64748b, #334155) !important; }
body[data-view="meeting"] .camera-control { background: linear-gradient(135deg, #2f8cf0, #246fc6) !important; }
body[data-view="meeting"] .camera-control.off { background: linear-gradient(135deg, #64748b, #27364a) !important; }
body[data-view="meeting"] .screen-control { background: linear-gradient(135deg, #8b5cf6, #5b68f1) !important; }
body[data-view="meeting"] .device-control { background: linear-gradient(135deg, #ff9f1c, #ff6b2f) !important; }
body[data-view="meeting"] .chat-control { background: linear-gradient(135deg, #25d0ff, #246fc6) !important; }
body[data-view="meeting"] .hangup-control { background: linear-gradient(135deg, #ff453a, #e11d48) !important; }

/* Stronger responsive meeting layout */
@media (max-width: 900px) {
  body[data-view="meeting"] .meeting-top { position: relative; margin: 4px 4px 8px !important; }
  body[data-view="meeting"] .share-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 6px !important; }
  body[data-view="meeting"] .layout-switch { grid-column: 1 / -1; }
  body[data-view="meeting"] .stage { min-height: calc(100dvh - 206px) !important; }
  body[data-view="meeting"] .call-controls { max-width: calc(100% - 12px) !important; gap: 6px !important; }
  body[data-view="meeting"] .control-btn { width: 50px !important; min-width: 50px !important; height: 50px !important; min-height: 50px !important; border-radius: 18px !important; }
  body[data-view="meeting"] .video-grid[data-pinned="remote"] .remote-tile,
  body[data-view="meeting"] .video-grid[data-pinned="local"] .local-tile,
  body[data-view="meeting"] .video-grid[data-pinned="screen"] .screen-tile { min-height: 300px !important; }
}
@media (max-width: 520px) {
  body[data-view="meeting"] .app-shell { width: 100% !important; padding: 4px !important; }
  body[data-view="meeting"] .meeting-top { border-radius: 20px !important; }
  body[data-view="meeting"] .room-meta { min-width: 0; }
  body[data-view="meeting"] .room-meta strong { font-size: .9rem !important; }
  body[data-view="meeting"] .host-meta { font-size: .66rem !important; }
  body[data-view="meeting"] .share-actions { grid-template-columns: 1fr 1fr !important; }
  body[data-view="meeting"] .share-actions .mini-btn,
  body[data-view="meeting"] .share-actions .theme-switch { min-height: 36px !important; padding: 7px 8px !important; font-size: .72rem !important; }
  body[data-view="meeting"] .stage { min-height: calc(100dvh - 226px) !important; border-radius: 18px !important; }
  body[data-view="meeting"] .video-grid { inset: 5px !important; gap: 6px !important; padding-bottom: 64px !important; grid-auto-rows: minmax(132px, 1fr) !important; }
  body[data-view="meeting"] .video-grid[data-pinned="remote"] .remote-tile,
  body[data-view="meeting"] .video-grid[data-pinned="local"] .local-tile,
  body[data-view="meeting"] .video-grid[data-pinned="screen"] .screen-tile { min-height: 240px !important; }
  body[data-view="meeting"] .call-controls { gap: 4px !important; padding: 6px !important; border-radius: 20px !important; }
  body[data-view="meeting"] .control-btn { width: 43px !important; min-width: 43px !important; height: 43px !important; min-height: 43px !important; border-radius: 15px !important; }
  body[data-view="meeting"] .control-btn svg { width: 20px !important; height: 20px !important; }
  .tile-pin { width: 34px; height: 34px; border-radius: 12px; top: 8px; right: 8px; }
  .tile-pin svg { width: 16px; height: 16px; }
  .steps-row article { padding: 16px 10px !important; }
}
@media (max-width: 370px) {
  body[data-view="meeting"] .control-btn { width: 39px !important; min-width: 39px !important; height: 39px !important; min-height: 39px !important; }
  body[data-view="meeting"] .call-controls { max-width: calc(100% - 8px) !important; }
  body[data-view="meeting"] .share-actions .mini-btn,
  body[data-view="meeting"] .share-actions .theme-switch { font-size: .66rem !important; }
}


/* Click-to-focus meeting layout: selected user becomes full screen, others overlap as floating previews */
body[data-view="meeting"] .video-tile {
  cursor: pointer;
  transition: transform .28s cubic-bezier(.18,.9,.28,1), width .28s ease, height .28s ease, inset .28s ease, opacity .2s ease, box-shadow .28s ease, border-color .25s ease;
}
body[data-view="meeting"] .video-tile .avatar-placeholder {
  pointer-events: none;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  display: block !important;
  position: absolute !important;
  inset: 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 24px;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile {
  position: absolute !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
}
body[data-view="meeting"] .video-grid[data-pinned="remote"] .remote-tile,
body[data-view="meeting"] .video-grid[data-pinned="local"] .local-tile,
body[data-view="meeting"] .video-grid[data-pinned="screen"] .screen-tile {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 2 !important;
  border-radius: 24px !important;
  transform: none !important;
  order: initial !important;
  grid-column: auto !important;
  grid-row: auto !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10) !important;
}
body[data-view="meeting"] .video-grid[data-pinned="remote"] .local-tile,
body[data-view="meeting"] .video-grid[data-pinned="remote"] .screen-tile,
body[data-view="meeting"] .video-grid[data-pinned="local"] .remote-tile,
body[data-view="meeting"] .video-grid[data-pinned="local"] .screen-tile,
body[data-view="meeting"] .video-grid[data-pinned="screen"] .remote-tile,
body[data-view="meeting"] .video-grid[data-pinned="screen"] .local-tile {
  width: clamp(176px, 22vw, 310px) !important;
  height: clamp(112px, 14vw, 190px) !important;
  right: 18px !important;
  left: auto !important;
  border-radius: 18px !important;
  z-index: 8 !important;
  opacity: .98 !important;
  border-color: rgba(255,255,255,.20) !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.10) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body[data-view="meeting"] .video-grid[data-pinned="remote"] .local-tile,
body[data-view="meeting"] .video-grid[data-pinned="local"] .remote-tile,
body[data-view="meeting"] .video-grid[data-pinned="screen"] .remote-tile { top: 16px !important; bottom: auto !important; }
body[data-view="meeting"] .video-grid[data-pinned="remote"] .screen-tile,
body[data-view="meeting"] .video-grid[data-pinned="local"] .screen-tile,
body[data-view="meeting"] .video-grid[data-pinned="screen"] .local-tile { top: calc(16px + clamp(112px, 14vw, 190px) + 12px) !important; bottom: auto !important; }
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned):hover {
  transform: translateY(-3px) scale(1.02) !important;
  border-color: rgba(255, 122, 26, .55) !important;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .tile-badge {
  max-width: calc(100% - 60px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .tile-pin {
  opacity: 1;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) .tile-pin {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  top: 10px;
  right: 10px;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) .avatar-circle {
  width: 54px;
  height: 54px;
  font-size: 1.2rem;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) .avatar-placeholder p {
  font-size: .82rem;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .pinned::after {
  content: "Pinned";
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 9;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  background: linear-gradient(135deg, rgba(255, 111, 45, .92), rgba(255, 64, 64, .90));
  box-shadow: 0 14px 36px rgba(255, 87, 47, .25);
  animation: pinnedLabelIn .32s ease both;
}
@keyframes pinnedLabelIn { from { opacity: 0; transform: translateY(-8px) scale(.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
body[data-theme="light"][data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) {
  border-color: rgba(12,27,53,.16) !important;
  box-shadow: 0 16px 42px rgba(12,27,53,.18), inset 0 1px 0 rgba(255,255,255,.85) !important;
}

@media (max-width: 900px) {
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) {
    width: clamp(142px, 38vw, 240px) !important;
    height: clamp(92px, 24vw, 150px) !important;
    right: 12px !important;
  }
  body[data-view="meeting"] .video-grid[data-pinned="remote"] .local-tile,
  body[data-view="meeting"] .video-grid[data-pinned="local"] .remote-tile,
  body[data-view="meeting"] .video-grid[data-pinned="screen"] .remote-tile { top: 12px !important; }
  body[data-view="meeting"] .video-grid[data-pinned="remote"] .screen-tile,
  body[data-view="meeting"] .video-grid[data-pinned="local"] .screen-tile,
  body[data-view="meeting"] .video-grid[data-pinned="screen"] .local-tile { top: calc(12px + clamp(92px, 24vw, 150px) + 10px) !important; }
}
@media (max-width: 520px) {
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) { inset: 5px !important; border-radius: 18px; }
  body[data-view="meeting"] .video-grid[data-pinned="remote"] .remote-tile,
  body[data-view="meeting"] .video-grid[data-pinned="local"] .local-tile,
  body[data-view="meeting"] .video-grid[data-pinned="screen"] .screen-tile { border-radius: 18px !important; }
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) {
    width: min(46vw, 178px) !important;
    height: min(29vw, 112px) !important;
    right: 8px !important;
    border-radius: 14px !important;
  }
  body[data-view="meeting"] .video-grid[data-pinned="remote"] .local-tile,
  body[data-view="meeting"] .video-grid[data-pinned="local"] .remote-tile,
  body[data-view="meeting"] .video-grid[data-pinned="screen"] .remote-tile { top: 8px !important; }
  body[data-view="meeting"] .video-grid[data-pinned="remote"] .screen-tile,
  body[data-view="meeting"] .video-grid[data-pinned="local"] .screen-tile,
  body[data-view="meeting"] .video-grid[data-pinned="screen"] .local-tile { top: calc(8px + min(29vw, 112px) + 8px) !important; }
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) .tile-badge { display: none; }
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .pinned::after { left: 10px; top: 10px; padding: 7px 10px; font-size: .68rem; }
}

/* Final cleanup: compact meeting navigation + non-overlapping controls */
body[data-view="meeting"] .meeting-view {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

body[data-view="meeting"] .meeting-top {
  width: min(100%, 1680px) !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 26px !important;
}

body[data-view="meeting"] .room-meta {
  min-width: 0 !important;
  flex: none !important;
}

body[data-view="meeting"] .room-meta img {
  width: 42px !important;
  height: 42px !important;
  border-radius: 14px !important;
}

body[data-view="meeting"] .room-meta span { font-size: .72rem !important; }
body[data-view="meeting"] .room-meta strong { font-size: 1rem !important; letter-spacing: .08em !important; }
body[data-view="meeting"] .host-meta { font-size: .72rem !important; }

body[data-view="meeting"] .share-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}
body[data-view="meeting"] .share-actions::-webkit-scrollbar { display: none !important; }

body[data-view="meeting"] .layout-switch {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 178px !important;
  height: 42px !important;
  padding: 4px !important;
  border-radius: 999px !important;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 3px !important;
}
body[data-view="meeting"] .layout-switch button {
  min-height: 0 !important;
  height: 34px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: .76rem !important;
  white-space: nowrap !important;
}
body[data-view="meeting"] .share-actions .theme-switch,
body[data-view="meeting"] .share-actions .mini-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: auto !important;
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
}

/* Stage becomes a clean vertical layout: video area first, controls below it, never over it */
body[data-view="meeting"] .stage {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 8px !important;
  overflow: visible !important;
}
body[data-view="meeting"] .video-grid,
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  position: relative !important;
  inset: auto !important;
  flex: 1 1 auto !important;
  min-height: clamp(360px, calc(100dvh - 250px), 780px) !important;
  height: auto !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 22px !important;
  overflow: hidden !important;
}
body[data-view="meeting"] .call-controls {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  z-index: 20 !important;
  flex: 0 0 auto !important;
  justify-content: center !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.12) !important;
}
body[data-view="meeting"] .call-controls:hover { transform: none !important; }

body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .pinned::after {
  top: 14px !important;
  left: 14px !important;
}

@media (max-width: 920px) {
  body[data-view="meeting"] .meeting-top {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 10px !important;
    border-radius: 22px !important;
  }
  body[data-view="meeting"] .share-actions {
    justify-content: flex-start !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
  }
  body[data-view="meeting"] .layout-switch {
    min-width: 162px !important;
    height: 38px !important;
  }
  body[data-view="meeting"] .layout-switch button {
    height: 30px !important;
    font-size: .68rem !important;
    padding: 0 7px !important;
  }
  body[data-view="meeting"] .share-actions .theme-switch,
  body[data-view="meeting"] .share-actions .mini-btn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 11px !important;
    font-size: .72rem !important;
  }
  body[data-view="meeting"] .stage {
    min-height: auto !important;
    height: auto !important;
    padding: 6px !important;
    gap: 8px !important;
  }
  body[data-view="meeting"] .video-grid,
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
    min-height: clamp(380px, calc(100dvh - 235px), 620px) !important;
    border-radius: 19px !important;
  }
  body[data-view="meeting"] .call-controls {
    gap: 6px !important;
    padding: 7px !important;
    border-radius: 22px !important;
  }
}

@media (max-width: 540px) {
  body[data-view="meeting"] .app-shell { padding: 4px !important; }
  body[data-view="meeting"] .meeting-top {
    margin: 2px 2px 8px !important;
    padding: 9px !important;
    border-radius: 20px !important;
  }
  body[data-view="meeting"] .room-meta {
    gap: 8px !important;
  }
  body[data-view="meeting"] .room-meta img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
  }
  body[data-view="meeting"] .room-meta span { font-size: .64rem !important; }
  body[data-view="meeting"] .room-meta strong { font-size: .86rem !important; }
  body[data-view="meeting"] .host-meta { font-size: .64rem !important; }

  body[data-view="meeting"] .share-actions {
    padding-bottom: 1px !important;
  }
  body[data-view="meeting"] .layout-switch {
    min-width: 148px !important;
    height: 36px !important;
  }
  body[data-view="meeting"] .layout-switch button {
    height: 28px !important;
    font-size: .62rem !important;
  }
  body[data-view="meeting"] .share-actions .theme-switch,
  body[data-view="meeting"] .share-actions .mini-btn {
    height: 36px !important;
    min-height: 36px !important;
    min-width: 38px !important;
    padding: 0 10px !important;
    font-size: 0 !important;
    gap: 0 !important;
  }
  body[data-view="meeting"] .share-actions .theme-switch span { display: none !important; }
  body[data-view="meeting"] .share-actions .mini-btn svg,
  body[data-view="meeting"] .share-actions .theme-switch svg {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }
  body[data-view="meeting"] .stage {
    border-radius: 18px !important;
    gap: 7px !important;
  }
  body[data-view="meeting"] .video-grid,
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
    min-height: clamp(360px, calc(100dvh - 220px), 560px) !important;
    border-radius: 16px !important;
  }
  body[data-view="meeting"] .call-controls {
    width: auto !important;
    max-width: calc(100% - 4px) !important;
    display: grid !important;
    grid-template-columns: repeat(6, 42px) !important;
    gap: 5px !important;
    padding: 6px !important;
    border-radius: 21px !important;
  }
  body[data-view="meeting"] .control-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 15px !important;
  }
  body[data-view="meeting"] .control-btn svg { width: 19px !important; height: 19px !important; }

  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) {
    width: min(40vw, 156px) !important;
    height: min(25vw, 96px) !important;
    right: 8px !important;
  }
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .pinned::after {
    top: 9px !important;
    left: 9px !important;
    padding: 6px 9px !important;
    font-size: .64rem !important;
  }
}

@media (max-width: 355px) {
  body[data-view="meeting"] .call-controls {
    grid-template-columns: repeat(3, 42px) !important;
  }
  body[data-view="meeting"] .video-grid,
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
    min-height: 330px !important;
  }
}

/* =========================================================
   Final mobile-responsive call screen: fixed bottom controls
   ========================================================= */
body[data-view="meeting"] {
  overflow-x: hidden !important;
  padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important;
}

body[data-view="meeting"] .meeting-view {
  min-height: 100dvh !important;
  padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
}

body[data-view="meeting"] .call-layout {
  padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
}

/* Bottom bar is no longer a card/dock. It is a clean fixed floating control row. */
body[data-view="meeting"] .call-controls {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: calc(100vw - 18px) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(8px, 1.4vw, 14px) !important;
  z-index: 100 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 0 !important;
}
body[data-view="meeting"] .call-controls:hover { transform: translateX(-50%) !important; }

body[data-view="meeting"] .control-btn {
  flex: 0 0 auto !important;
  width: clamp(48px, 5.2vw, 62px) !important;
  min-width: clamp(48px, 5.2vw, 62px) !important;
  height: clamp(48px, 5.2vw, 62px) !important;
  min-height: clamp(48px, 5.2vw, 62px) !important;
  padding: 0 !important;
  border-radius: clamp(17px, 1.8vw, 22px) !important;
  border: 1px solid rgba(255,255,255,.20) !important;
  color: #fff !important;
  box-shadow:
    0 14px 32px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.22) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease,
    opacity .18s ease !important;
  position: relative !important;
  overflow: visible !important;
}
body[data-view="meeting"] .control-btn:hover {
  transform: translateY(-4px) scale(1.04) !important;
  box-shadow:
    0 22px 46px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.26) !important;
}
body[data-view="meeting"] .control-btn:active { transform: translateY(-1px) scale(.95) !important; }
body[data-view="meeting"] .control-btn svg {
  width: clamp(21px, 2.2vw, 27px) !important;
  height: clamp(21px, 2.2vw, 27px) !important;
  stroke-width: 2.45 !important;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.25)) !important;
}
body[data-view="meeting"] .control-btn .sr-only { display: none !important; }

/* Stylish function-matched icon colors */
body[data-view="meeting"] .mic-control {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.34), transparent 28%), linear-gradient(135deg, #11c88d, #0b9f93) !important;
}
body[data-view="meeting"] .mic-control.off {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.22), transparent 28%), linear-gradient(135deg, #526176, #243246) !important;
  opacity: 1 !important;
}
body[data-view="meeting"] .camera-control {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.34), transparent 28%), linear-gradient(135deg, #2f8cf0, #155dd6) !important;
}
body[data-view="meeting"] .camera-control.off {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.22), transparent 28%), linear-gradient(135deg, #56657a, #26364b) !important;
  opacity: 1 !important;
}
body[data-view="meeting"] .screen-control {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.34), transparent 28%), linear-gradient(135deg, #8b5cf6, #536dfe) !important;
}
body[data-view="meeting"] .screen-control.on {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.34), transparent 28%), linear-gradient(135deg, #14b8a6, #10b981) !important;
}
body[data-view="meeting"] .device-control {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.34), transparent 28%), linear-gradient(135deg, #ff9f1c, #ff6b2f) !important;
}
body[data-view="meeting"] .chat-control {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.34), transparent 28%), linear-gradient(135deg, #24c6ff, #1d73df) !important;
}
body[data-view="meeting"] .hangup-control,
body[data-view="meeting"] .control-btn.danger {
  background: radial-gradient(circle at 30% 18%, rgba(255,255,255,.34), transparent 28%), linear-gradient(135deg, #ff3b30, #e11d48) !important;
  box-shadow: 0 18px 42px rgba(255,59,48,.30), inset 0 1px 0 rgba(255,255,255,.24) !important;
}

/* Red off-dot for mic/camera when disabled */
body[data-view="meeting"] .mic-control.off::after,
body[data-view="meeting"] .camera-control.off::after {
  content: "" !important;
  position: absolute !important;
  right: 7px !important;
  bottom: 7px !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #ff453a !important;
  border: 2px solid rgba(255,255,255,.72) !important;
  box-shadow: 0 0 0 4px rgba(255,69,58,.16), 0 6px 14px rgba(255,69,58,.35) !important;
}
body[data-view="meeting"] .mic-control.on::after,
body[data-view="meeting"] .camera-control.on::after,
body[data-view="meeting"] .screen-control.on::after {
  content: "" !important;
  position: absolute !important;
  right: 7px !important;
  bottom: 7px !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #35f0bf !important;
  border: 2px solid rgba(255,255,255,.72) !important;
  box-shadow: 0 0 0 4px rgba(53,240,191,.14), 0 6px 14px rgba(53,240,191,.32) !important;
}

/* Keep videos clear above the fixed bottom controls. */
body[data-view="meeting"] .stage {
  padding-bottom: 8px !important;
}
body[data-view="meeting"] .video-grid,
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  min-height: clamp(430px, calc(100dvh - 230px), 820px) !important;
}

/* Cleaner, responsive top meeting bar. */
body[data-view="meeting"] .meeting-top {
  gap: 10px !important;
  overflow: hidden !important;
}
body[data-view="meeting"] .share-actions {
  gap: 8px !important;
  justify-content: flex-end !important;
  scrollbar-width: none !important;
}
body[data-view="meeting"] .share-actions::-webkit-scrollbar { display: none !important; }
body[data-view="meeting"] .share-actions .mini-btn,
body[data-view="meeting"] .share-actions .theme-switch {
  padding-inline: 13px !important;
  min-width: 42px !important;
}

@media (max-width: 760px) {
  body[data-view="meeting"] {
    padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
  }
  body[data-view="meeting"] .meeting-view,
  body[data-view="meeting"] .call-layout {
    padding-bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  }
  body[data-view="meeting"] .meeting-top {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 10px !important;
    margin: 3px 3px 8px !important;
    border-radius: 22px !important;
  }
  body[data-view="meeting"] .share-actions {
    justify-content: flex-start !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
  }
  body[data-view="meeting"] .layout-switch {
    min-width: 152px !important;
  }
  body[data-view="meeting"] .share-actions .mini-btn,
  body[data-view="meeting"] .share-actions .theme-switch {
    height: 38px !important;
    min-height: 38px !important;
    padding-inline: 11px !important;
    border-radius: 999px !important;
    flex-shrink: 0 !important;
  }
  body[data-view="meeting"] .video-grid,
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
    min-height: clamp(480px, calc(100dvh - 205px), 720px) !important;
  }
  body[data-view="meeting"] .call-controls {
    bottom: max(9px, env(safe-area-inset-bottom)) !important;
    gap: 8px !important;
    max-width: calc(100vw - 12px) !important;
  }
  body[data-view="meeting"] .control-btn {
    width: 50px !important;
    min-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    border-radius: 18px !important;
  }
  body[data-view="meeting"] .control-btn svg {
    width: 22px !important;
    height: 22px !important;
  }
}

@media (max-width: 410px) {
  body[data-view="meeting"] .share-actions .mini-btn,
  body[data-view="meeting"] .share-actions .theme-switch {
    font-size: 0 !important;
    gap: 0 !important;
    width: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  body[data-view="meeting"] .share-actions .theme-switch span { display: none !important; }
  body[data-view="meeting"] .share-actions .mini-btn svg,
  body[data-view="meeting"] .share-actions .theme-switch svg {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }
  body[data-view="meeting"] .layout-switch {
    min-width: 144px !important;
  }
  body[data-view="meeting"] .layout-switch button {
    font-size: .62rem !important;
    padding: 0 6px !important;
  }
  body[data-view="meeting"] .call-controls {
    gap: 7px !important;
  }
  body[data-view="meeting"] .control-btn {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 16px !important;
  }
  body[data-view="meeting"] .control-btn svg {
    width: 20px !important;
    height: 20px !important;
  }
}

@media (max-width: 335px) {
  body[data-view="meeting"] .call-controls {
    gap: 5px !important;
  }
  body[data-view="meeting"] .control-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 15px !important;
  }
}


/* =====================================================================
   FINAL MEETING SCREEN FIX
   - No page scroll in meeting
   - Single viewport meeting screen
   - Top bar compact and clean
   - Video area fits remaining space
   - Bottom controls fixed forever without dock/card background
   ===================================================================== */

html { overscroll-behavior: none; }

body[data-view="meeting"] {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  overscroll-behavior: none !important;
  touch-action: manipulation;
}

body[data-view="meeting"]::-webkit-scrollbar,
body[data-view="meeting"] *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

body[data-view="meeting"],
body[data-view="meeting"] * {
  scrollbar-width: none !important;
}

body[data-view="meeting"] .bg-grid,
body[data-view="meeting"] .bg-blur {
  position: fixed !important;
}

body[data-view="meeting"] .app-shell {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  padding: clamp(6px, .85vw, 12px) !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(6px, .75vw, 10px) !important;
  overflow: hidden !important;
}

body[data-view="meeting"] .meeting-view.active,
body[data-view="meeting"] .meeting-view {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: clamp(6px, .75vw, 10px) !important;
  overflow: hidden !important;
}

body[data-view="meeting"] .meeting-top {
  flex: 0 0 auto !important;
  width: min(100%, 1840px) !important;
  margin: 0 auto !important;
  min-height: 64px !important;
  max-height: 76px !important;
  padding: 9px 12px !important;
  border-radius: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  overflow: hidden !important;
}

body[data-view="meeting"] .room-meta {
  min-width: 170px !important;
  max-width: min(35vw, 380px) !important;
  flex: 0 1 auto !important;
  gap: 10px !important;
  overflow: hidden !important;
}

body[data-view="meeting"] .room-meta img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  flex: 0 0 44px !important;
}

body[data-view="meeting"] .room-meta div {
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-view="meeting"] .room-meta strong,
body[data-view="meeting"] .host-meta {
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body[data-view="meeting"] .share-actions {
  min-width: 0 !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  overflow: hidden !important;
  padding: 0 !important;
}

body[data-view="meeting"] .layout-switch {
  flex: 0 0 auto !important;
  height: 42px !important;
  min-height: 42px !important;
  border-radius: 999px !important;
  padding: 4px !important;
}

body[data-view="meeting"] .layout-switch button {
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 999px !important;
  padding: 0 14px !important;
  line-height: 1 !important;
}

body[data-view="meeting"] .share-actions .mini-btn,
body[data-view="meeting"] .share-actions .theme-switch {
  flex: 0 0 auto !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

body[data-view="meeting"] .call-layout {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  width: min(100%, 1840px) !important;
  margin: 0 auto !important;
  padding: 0 0 calc(74px + env(safe-area-inset-bottom)) 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  gap: 0 !important;
}

body[data-view="meeting"] .stage {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: clamp(18px, 1.7vw, 28px) !important;
  position: relative !important;
  overflow: hidden !important;
}

body[data-view="meeting"] .video-grid,
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  position: absolute !important;
  inset: clamp(4px, .55vw, 8px) !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: clamp(14px, 1.3vw, 22px) !important;
  overflow: hidden !important;
}

body[data-view="meeting"] .video-grid:not([data-pinned]),
body[data-view="meeting"] .video-grid[data-pinned=""] {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)) !important;
  grid-auto-rows: minmax(0, 1fr) !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  gap: clamp(5px, .65vw, 10px) !important;
}

body[data-view="meeting"] .video-grid[data-count="1"]:not([data-pinned]),
body[data-view="meeting"] .video-grid[data-count="1"][data-pinned=""] {
  grid-template-columns: 1fr !important;
}

body[data-view="meeting"] .video-grid[data-count="2"]:not([data-pinned]),
body[data-view="meeting"] .video-grid[data-count="2"][data-pinned=""] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-view="meeting"] .video-grid[data-count="3"]:not([data-pinned]),
body[data-view="meeting"] .video-grid[data-count="3"][data-pinned=""] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body[data-view="meeting"] .video-tile,
body[data-view="meeting"] .remote-tile,
body[data-view="meeting"] .local-tile,
body[data-view="meeting"] .screen-tile {
  min-height: 0 !important;
  height: auto !important;
  border-radius: clamp(14px, 1.25vw, 22px) !important;
  overflow: hidden !important;
}

body[data-view="meeting"] .video-tile video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #07111f !important;
}

/* Fixed bottom bar: icons stay at bottom, no dock/card container. */
body[data-view="meeting"] .call-controls {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: max(10px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: calc(100vw - 16px) !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: clamp(7px, 1vw, 14px) !important;
  z-index: 120 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

body[data-view="meeting"] .call-controls:hover {
  transform: translateX(-50%) !important;
}

body[data-view="meeting"] .control-btn {
  width: clamp(48px, 3.8vw, 58px) !important;
  height: clamp(48px, 3.8vw, 58px) !important;
  min-width: clamp(48px, 3.8vw, 58px) !important;
  min-height: clamp(48px, 3.8vw, 58px) !important;
  border-radius: clamp(16px, 1.2vw, 20px) !important;
  padding: 0 !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 16px 34px rgba(0,0,0,.20), inset 0 1px 0 rgba(255,255,255,.28) !important;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, opacity .18s ease !important;
}

body[data-view="meeting"] .control-btn:hover {
  transform: translateY(-4px) scale(1.03) !important;
  filter: saturate(1.08) brightness(1.04) !important;
}

body[data-view="meeting"] .control-btn:active {
  transform: translateY(-1px) scale(.98) !important;
}

body[data-view="meeting"] .control-btn svg {
  width: clamp(20px, 1.65vw, 25px) !important;
  height: clamp(20px, 1.65vw, 25px) !important;
  stroke-width: 2.3px !important;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.28));
}

/* Stronger mobile single-page fit */
@media (max-width: 760px) {
  body[data-view="meeting"] .app-shell {
    padding: 4px !important;
    gap: 6px !important;
  }

  body[data-view="meeting"] .meeting-top {
    min-height: 58px !important;
    max-height: 102px !important;
    padding: 8px !important;
    border-radius: 20px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
  }

  body[data-view="meeting"] .room-meta {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body[data-view="meeting"] .room-meta img {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    border-radius: 12px !important;
  }

  body[data-view="meeting"] .room-meta span {
    font-size: .66rem !important;
  }

  body[data-view="meeting"] .room-meta strong {
    font-size: .9rem !important;
  }

  body[data-view="meeting"] .host-meta {
    font-size: .68rem !important;
  }

  body[data-view="meeting"] .share-actions {
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
  }

  body[data-view="meeting"] .layout-switch {
    height: 36px !important;
    min-height: 36px !important;
    min-width: 138px !important;
  }

  body[data-view="meeting"] .layout-switch button {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 8px !important;
    font-size: .66rem !important;
  }

  body[data-view="meeting"] .share-actions .mini-btn,
  body[data-view="meeting"] .share-actions .theme-switch {
    width: 38px !important;
    min-width: 38px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    justify-content: center !important;
    font-size: 0 !important;
    gap: 0 !important;
  }

  body[data-view="meeting"] .share-actions .mini-btn span,
  body[data-view="meeting"] .share-actions .theme-switch span {
    display: none !important;
  }

  body[data-view="meeting"] .share-actions .mini-btn svg,
  body[data-view="meeting"] .share-actions .theme-switch svg {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
  }

  body[data-view="meeting"] .call-layout {
    padding-bottom: calc(66px + env(safe-area-inset-bottom)) !important;
  }

  body[data-view="meeting"] .video-grid:not([data-pinned]),
  body[data-view="meeting"] .video-grid[data-pinned=""] {
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-rows: minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  body[data-view="meeting"] .video-grid[data-count="2"]:not([data-pinned]),
  body[data-view="meeting"] .video-grid[data-count="2"][data-pinned=""] {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-view="meeting"] .video-grid[data-count="3"]:not([data-pinned]),
  body[data-view="meeting"] .video-grid[data-count="3"][data-pinned=""] {
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
  }

  body[data-view="meeting"] .call-controls {
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    gap: 8px !important;
    max-width: calc(100vw - 10px) !important;
  }

  body[data-view="meeting"] .control-btn {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 17px !important;
  }

  body[data-view="meeting"] .control-btn svg {
    width: 21px !important;
    height: 21px !important;
  }
}

/* Very small phones: all icons fit in one line. */
@media (max-width: 390px) {
  body[data-view="meeting"] .meeting-top {
    max-height: 98px !important;
    padding: 7px !important;
  }

  body[data-view="meeting"] .layout-switch {
    min-width: 126px !important;
  }

  body[data-view="meeting"] .layout-switch button {
    padding: 0 6px !important;
    font-size: .6rem !important;
  }

  body[data-view="meeting"] .share-actions .mini-btn,
  body[data-view="meeting"] .share-actions .theme-switch {
    width: 35px !important;
    min-width: 35px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  body[data-view="meeting"] .call-layout {
    padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
  }

  body[data-view="meeting"] .call-controls {
    gap: 6px !important;
  }

  body[data-view="meeting"] .control-btn {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 15px !important;
  }

  body[data-view="meeting"] .control-btn svg {
    width: 20px !important;
    height: 20px !important;
  }

  body[data-view="meeting"] .avatar-circle {
    width: 58px !important;
    height: 58px !important;
    font-size: 1.35rem !important;
  }

  body[data-view="meeting"] .avatar-placeholder p {
    font-size: .82rem !important;
  }
}

@media (max-width: 330px) {
  body[data-view="meeting"] .control-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 14px !important;
  }

  body[data-view="meeting"] .call-controls {
    gap: 5px !important;
  }
}

/* === Final bottom dock single-line override === */
body[data-view="meeting"] .meeting-view,
body[data-view="meeting"] .meeting-view.active {
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  padding: 8px 8px 94px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

body[data-view="meeting"] .call-layout {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

body[data-view="meeting"] .stage {
  height: 100% !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

body[data-view="meeting"] .video-grid {
  padding-bottom: 0 !important;
}

body[data-view="meeting"] .call-controls {
  position: fixed !important;
  left: 50% !important;
  bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: calc(100vw - 20px) !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, rgba(7, 20, 40, 0.88), rgba(7, 20, 40, 0.78)) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  box-shadow: 0 16px 48px rgba(3, 10, 24, .34), inset 0 1px 0 rgba(255,255,255,.08) !important;
  backdrop-filter: blur(22px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
  z-index: 50 !important;
}

body[data-theme="light"][data-view="meeting"] .call-controls {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,249,253,0.90)) !important;
  border-color: rgba(14, 35, 70, .10) !important;
  box-shadow: 0 16px 42px rgba(23, 34, 65, .16), inset 0 1px 0 rgba(255,255,255,.95) !important;
}

body[data-view="meeting"] .control-btn {
  flex: 0 0 auto !important;
  width: 52px !important;
  min-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 !important;
  border-radius: 18px !important;
  gap: 0 !important;
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
}

body[data-theme="light"][data-view="meeting"] .control-btn {
  background: rgba(13, 31, 63, .06) !important;
  border-color: rgba(13, 31, 63, .08) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92) !important;
}

body[data-view="meeting"] .control-btn svg {
  width: 22px !important;
  height: 22px !important;
}

body[data-view="meeting"] .control-btn.on {
  background: linear-gradient(135deg, rgba(39,194,171,.96), rgba(18,151,142,.96)) !important;
  border-color: rgba(39,194,171,.55) !important;
}

body[data-view="meeting"] .mic-control.off,
body[data-view="meeting"] .camera-control.off {
  background: linear-gradient(135deg, rgba(72, 90, 118, .96), rgba(46, 60, 83, .96)) !important;
}

body[data-theme="light"][data-view="meeting"] .mic-control.off,
body[data-theme="light"][data-view="meeting"] .camera-control.off {
  background: linear-gradient(135deg, rgba(88,104,129,.92), rgba(63,78,102,.92)) !important;
}

body[data-view="meeting"] .screen-control {
  background: linear-gradient(135deg, #7b61ff, #6e55f2) !important;
  border-color: rgba(123,97,255,.45) !important;
}
body[data-view="meeting"] .device-control {
  background: linear-gradient(135deg, #ffab2d, #ff8b1f) !important;
  border-color: rgba(255,157,44,.42) !important;
}
body[data-view="meeting"] .chat-control {
  background: linear-gradient(135deg, #3eb7ff, #2497e8) !important;
  border-color: rgba(62,183,255,.42) !important;
}
body[data-view="meeting"] .hangup-control.danger {
  background: linear-gradient(135deg, #ff4d5a, #f12b55) !important;
  border-color: rgba(255,77,90,.45) !important;
  box-shadow: 0 12px 24px rgba(241,43,85,.26) !important;
}

body[data-view="meeting"] .control-btn .sr-only,
body[data-view="meeting"] .control-btn span {
  display: none !important;
}

@media (max-width: 700px) {
  body[data-view="meeting"] .meeting-view,
  body[data-view="meeting"] .meeting-view.active {
    padding: 6px 6px 86px !important;
    gap: 6px !important;
  }

  body[data-view="meeting"] .call-controls {
    gap: 8px !important;
    padding: 8px 10px !important;
    border-radius: 22px !important;
    max-width: calc(100vw - 12px) !important;
  }

  body[data-view="meeting"] .control-btn {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 16px !important;
  }

  body[data-view="meeting"] .control-btn svg {
    width: 20px !important;
    height: 20px !important;
  }
}

@media (max-width: 420px) {
  body[data-view="meeting"] .call-controls {
    gap: 6px !important;
    padding: 7px 8px !important;
    border-radius: 20px !important;
    max-width: calc(100vw - 8px) !important;
  }

  body[data-view="meeting"] .control-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    border-radius: 15px !important;
  }

  body[data-view="meeting"] .control-btn svg {
    width: 18px !important;
    height: 18px !important;
  }
}


/* === Gapless single-pin meeting layout override === */
body[data-view="meeting"] .meeting-view,
body[data-view="meeting"] .meeting-view.active {
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  padding: 10px 10px 78px !important;
  gap: 8px !important;
}
body[data-view="meeting"] .call-layout {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}
body[data-view="meeting"] .stage {
  height: 100% !important;
  min-height: 0 !important;
}
body[data-view="meeting"] .video-grid,
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  position: absolute !important;
  inset: 6px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
}
body[data-view="meeting"] .video-tile,
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  transform: none !important;
}
body[data-view="meeting"] .video-grid[data-count="1"] { grid-template-columns: 1fr !important; }
body[data-view="meeting"] .video-grid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
body[data-view="meeting"] .video-grid[data-count="3"],
body[data-view="meeting"] .video-grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

/* single pin: one big tile, others stack in side gap */
body[data-view="meeting"] .video-grid[data-pin-count="1"] {
  grid-template-columns: minmax(0, 1.65fr) minmax(220px, .72fr) !important;
  grid-auto-rows: minmax(0, 1fr) !important;
}
body[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile.pinned {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
}
body[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned) {
  grid-column: 2 !important;
  min-height: 0 !important;
}

body[data-view="meeting"] .video-tile video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* bottom controls: no dock card, just direct icons */
body[data-view="meeting"] .call-controls {
  position: fixed !important;
  left: 50% !important;
  bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  width: auto !important;
  max-width: calc(100vw - 16px) !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body[data-view="meeting"] .control-btn {
  flex: 0 0 auto !important;
  width: 56px !important;
  min-width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  border-radius: 18px !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: 0 12px 28px rgba(4, 12, 28, .28) !important;
}
body[data-view="meeting"] .control-btn .sr-only,
body[data-view="meeting"] .control-btn span { display: none !important; }
body[data-view="meeting"] .mic-control.off,
body[data-view="meeting"] .camera-control.off { background: linear-gradient(135deg, #4d617f, #3d4c65) !important; }
body[data-view="meeting"] .mic-control.on,
body[data-view="meeting"] .camera-control.on { background: linear-gradient(135deg, #22c4ab, #109487) !important; }
body[data-view="meeting"] .screen-control { background: linear-gradient(135deg, #7a63ff, #6353f4) !important; }
body[data-view="meeting"] .device-control { background: linear-gradient(135deg, #ffaf35, #ff8c24) !important; }
body[data-view="meeting"] .chat-control { background: linear-gradient(135deg, #43bfff, #1f9fe9) !important; }
body[data-view="meeting"] .hangup-control.danger { background: linear-gradient(135deg, #ff5362, #ee2e57) !important; }
body[data-view="meeting"] .control-btn svg { width: 24px !important; height: 24px !important; }

/* compact top bar and remove excess gap */
body[data-view="meeting"] .meeting-top {
  margin-bottom: 0 !important;
}
body[data-view="meeting"] .room-meta,
body[data-view="meeting"] .share-actions {
  min-height: 58px !important;
}
body[data-view="meeting"] .stage { margin-top: 0 !important; }

/* pin badge and button */
body[data-view="meeting"] .video-tile.pinned::after {
  content: 'Pinned';
  position: absolute;
  top: 12px; left: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--coral));
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  z-index: 4;
  box-shadow: 0 12px 24px rgba(255, 100, 40, .22);
}

@media (max-width: 1080px) {
  body[data-view="meeting"] .meeting-view,
  body[data-view="meeting"] .meeting-view.active { padding: 8px 8px 74px !important; }
  body[data-view="meeting"] .video-grid[data-pin-count="1"] {
    grid-template-columns: minmax(0, 1.45fr) minmax(170px, .7fr) !important;
  }
}
@media (max-width: 780px) {
  body[data-view="meeting"] .video-grid,
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
    grid-template-columns: 1fr !important;
    grid-auto-rows: minmax(0, 1fr) !important;
  }
  body[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile.pinned,
  body[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned) {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  body[data-view="meeting"] .call-controls { gap: 10px !important; }
  body[data-view="meeting"] .control-btn {
    width: 50px !important; min-width: 50px !important; height: 50px !important; min-height: 50px !important;
  }
}
@media (max-width: 480px) {
  body[data-view="meeting"] .meeting-view,
  body[data-view="meeting"] .meeting-view.active { padding: 6px 6px 70px !important; gap: 6px !important; }
  body[data-view="meeting"] .call-controls { gap: 8px !important; }
  body[data-view="meeting"] .control-btn {
    width: 44px !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important; border-radius: 16px !important;
  }
  body[data-view="meeting"] .control-btn svg { width: 20px !important; height: 20px !important; }
}


/* === Google-Meet-inspired meeting layout === */
body[data-view="meeting"] .app-shell {
  max-width: 100% !important;
  width: 100% !important;
  min-height: 100dvh !important;
  padding: 0 !important;
}
body[data-view="meeting"] {
  overflow: hidden !important;
  background: #08090e !important;
}
body[data-view="meeting"] .meeting-view,
body[data-view="meeting"] .meeting-view.active {
  position: relative;
  min-height: 100dvh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  padding: 16px 22px 84px !important;
  background: radial-gradient(circle at 50% 35%, rgba(126,49,66,.22), rgba(8,9,14,0) 34%), #08090e !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}
body[data-view="meeting"] .meeting-top {
  display: grid !important;
  grid-template-columns: auto auto 1fr auto !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body[data-view="meeting"] .meeting-hud-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: rgba(255,255,255,.94);
  letter-spacing: .01em;
}
body[data-view="meeting"] .meeting-clock { font-size: 1rem; }
body[data-view="meeting"] .meeting-sep { color: rgba(255,255,255,.42); }
body[data-view="meeting"] .room-meta {
  min-width: 0;
  display: inline-flex !important;
  align-items: center;
  gap: 12px;
}
body[data-view="meeting"] .room-meta img {
  width: 40px !important; height: 40px !important; border-radius: 999px !important; border: 2px solid rgba(255,255,255,.12) !important; box-shadow: none !important;
}
body[data-view="meeting"] .room-meta span,
body[data-view="meeting"] .room-meta small { color: rgba(255,255,255,.75) !important; }
body[data-view="meeting"] .room-meta strong { color: #fff !important; font-size: 1rem !important; letter-spacing: .02em; }
body[data-view="meeting"] .share-actions {
  justify-self: end;
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
body[data-view="meeting"] .layout-switch {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 999px !important;
  padding: 4px !important;
}
body[data-view="meeting"] .layout-switch button,
body[data-view="meeting"] .mini-btn,
body[data-view="meeting"] .theme-switch {
  min-height: 44px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  color: rgba(255,255,255,.94) !important;
  box-shadow: none !important;
}
body[data-view="meeting"] .layout-switch button.active {
  background: linear-gradient(135deg, #ff7b32, #ff5e3a) !important;
  border-color: transparent !important;
  color: #fff !important;
}
body[data-view="meeting"] .meeting-profile-chip {
  justify-self: end;
  position: relative;
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.06);
  display: inline-flex; align-items: center; justify-content: center;
}
body[data-view="meeting"] .meeting-profile-chip img { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; }
body[data-view="meeting"] .profile-badge {
  position: absolute; right: -2px; top: -3px;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; font-size: .7rem; display: inline-flex; align-items: center; justify-content: center;
}
body[data-view="meeting"] .call-layout { flex: 1 1 auto !important; min-height: 0 !important; }
body[data-view="meeting"] .stage {
  position: relative;
  height: 100% !important;
  min-height: 0 !important;
  border-radius: 28px !important;
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
}
body[data-view="meeting"] .video-grid,
body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr) !important;
  gap: 10px !important;
  padding: 0 !important;
}
body[data-view="meeting"] .video-tile {
  border-radius: 28px !important;
  background: radial-gradient(circle at 50% 35%, rgba(139,83,96,.22), rgba(62,23,30,.10) 32%, rgba(12,15,21,.96) 92%) !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
body[data-view="meeting"] .video-grid[data-pin-count="1"] {
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, .72fr) !important;
}
body[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile.pinned {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
}
body[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned) { grid-column: 2 !important; }
body[data-view="meeting"] .video-grid[data-pin-count="2"] { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
body[data-view="meeting"] .tile-badge,
body[data-view="meeting"] .tile-pin {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body[data-view="meeting"] .tile-badge {
  left: 16px !important; bottom: 16px !important;
  background: rgba(5,8,14,.55) !important;
  border-color: rgba(255,255,255,.10) !important;
}
body[data-view="meeting"] .tile-pin {
  top: 14px !important; right: 14px !important;
  background: rgba(8,9,14,.38) !important;
  border-color: rgba(255,255,255,.12) !important;
}
body[data-view="meeting"] .avatar-circle { width: 82px !important; height: 82px !important; font-size: 2.1rem !important; }
body[data-view="meeting"] .avatar-placeholder p { font-size: 1.15rem !important; color: rgba(255,255,255,.88) !important; }
body[data-view="meeting"] .call-controls {
  position: fixed !important;
  left: 50% !important;
  bottom: max(18px, env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: auto !important;
  max-width: calc(100vw - 24px) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body[data-view="meeting"] .control-btn {
  width: 54px !important; height: 54px !important; min-width: 54px !important; min-height: 54px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: rgba(49,54,63,.96) !important;
  box-shadow: none !important;
}
body[data-view="meeting"] .control-btn svg { width: 23px !important; height: 23px !important; color: #fff !important; stroke-width: 2.2; }
body[data-view="meeting"] .control-btn.on { background: rgba(49,54,63,.96) !important; }
body[data-view="meeting"] .screen-control { background: rgba(49,54,63,.96) !important; }
body[data-view="meeting"] .device-control { background: rgba(49,54,63,.96) !important; }
body[data-view="meeting"] .chat-control { background: rgba(49,54,63,.96) !important; }
body[data-view="meeting"] .hangup-control.danger { background: #ea4335 !important; }
body[data-view="meeting"] .control-btn .sr-only,
body[data-view="meeting"] .control-btn span { display: none !important; }

/* Invite card */
body[data-view="meeting"] .invite-card {
  position: fixed;
  left: 28px;
  bottom: 86px;
  width: min(332px, calc(100vw - 28px));
  z-index: 55;
  border-radius: 18px;
  padding: 22px 22px 20px;
  background: rgba(255,255,255,.96);
  color: #1f1f1f;
  box-shadow: 0 28px 70px rgba(0,0,0,.24);
}
body[data-view="meeting"] .invite-card[hidden] { display: none !important; }
body[data-view="meeting"] .invite-card-close {
  position: absolute; top: 14px; right: 14px; width: 28px; height: 28px; border-radius: 999px; border: 0; background: transparent; color: #202124; font-size: 1.7rem; line-height: 1; cursor: pointer;
}
body[data-view="meeting"] .invite-card-title { margin: 0 0 14px; font-size: 1.9rem; line-height: 1.1; color: #202124; font-weight: 500; }
body[data-view="meeting"] .invite-primary-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px; background: #1a73e8; color: #fff; font-weight: 700; cursor: pointer; margin-bottom: 14px;
}
body[data-view="meeting"] .invite-primary-btn svg { width: 18px; height: 18px; stroke-width: 2; }
body[data-view="meeting"] .invite-card-text { margin: 0 0 10px; color: #5f6368; line-height: 1.45; }
body[data-view="meeting"] .invite-link-box {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 10px; padding: 10px 12px; background: #f1f3f4; margin-bottom: 12px;
}
body[data-view="meeting"] .invite-link-box span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #3c4043; }
body[data-view="meeting"] .invite-link-box button { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #202124; cursor: pointer; }
body[data-view="meeting"] .invite-link-box svg { width: 18px; height: 18px; stroke-width: 2; }
body[data-view="meeting"] .invite-card-note {
  display: flex; gap: 10px; align-items: flex-start; color: #5f6368; font-size: .94rem; line-height: 1.38; margin-bottom: 12px;
}
body[data-view="meeting"] .invite-card-note svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; }
body[data-view="meeting"] .invite-card-user { color: #5f6368; }

@media (max-width: 1100px) {
  body[data-view="meeting"] .meeting-top { grid-template-columns: auto auto 1fr auto !important; }
  body[data-view="meeting"] .share-actions { gap: 8px !important; }
  body[data-view="meeting"] .mini-btn, body[data-view="meeting"] .theme-switch { padding-inline: 12px !important; }
  body[data-view="meeting"] .video-grid[data-pin-count="1"] { grid-template-columns: minmax(0, 1.35fr) minmax(190px, .72fr) !important; }
}
@media (max-width: 860px) {
  body[data-view="meeting"] .meeting-view,
  body[data-view="meeting"] .meeting-view.active { padding: 10px 10px 78px !important; }
  body[data-view="meeting"] .meeting-top { grid-template-columns: 1fr auto !important; grid-template-areas: "left profile" "room room" "actions actions" !important; }
  body[data-view="meeting"] .meeting-hud-left { grid-area: left; }
  body[data-view="meeting"] .room-meta { grid-area: room; }
  body[data-view="meeting"] .share-actions { grid-area: actions; justify-self: stretch; overflow-x: auto; padding-bottom: 2px !important; }
  body[data-view="meeting"] .meeting-profile-chip { grid-area: profile; }
  body[data-view="meeting"] .video-grid,
  body[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) { grid-template-columns: 1fr !important; }
  body[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile.pinned,
  body[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned) { grid-column: auto !important; grid-row: auto !important; }
  body[data-view="meeting"] .invite-card { left: 12px; bottom: 82px; width: min(320px, calc(100vw - 24px)); }
}
@media (max-width: 540px) {
  body[data-view="meeting"] .meeting-view,
  body[data-view="meeting"] .meeting-view.active { padding: 8px 8px 74px !important; gap: 8px !important; }
  body[data-view="meeting"] .meeting-top { gap: 8px !important; }
  body[data-view="meeting"] .room-meta img { width: 34px !important; height: 34px !important; }
  body[data-view="meeting"] .room-meta strong { font-size: .92rem !important; }
  body[data-view="meeting"] .layout-switch button,
  body[data-view="meeting"] .mini-btn,
  body[data-view="meeting"] .theme-switch { min-height: 38px !important; font-size: .78rem !important; }
  body[data-view="meeting"] .avatar-circle { width: 64px !important; height: 64px !important; font-size: 1.7rem !important; }
  body[data-view="meeting"] .avatar-placeholder p { font-size: 1rem !important; }
  body[data-view="meeting"] .control-btn { width: 48px !important; height: 48px !important; min-width: 48px !important; min-height: 48px !important; }
  body[data-view="meeting"] .invite-card { width: calc(100vw - 16px); left: 8px; bottom: 74px; padding: 18px 18px 16px; }
  body[data-view="meeting"] .invite-card-title { font-size: 1.6rem; }
}


/* === Screen sharing layout inspired by reference === */
body.screen-share-mode[data-view="meeting"] .meeting-view,
body.screen-share-mode[data-view="meeting"] .meeting-view.active {
  padding-top: 8px !important;
}
body.screen-share-mode[data-view="meeting"] .meeting-top {
  grid-template-columns: auto 1fr auto auto !important;
  gap: 12px !important;
  align-items: center !important;
}
body.screen-share-mode[data-view="meeting"] .share-actions {
  display: none !important;
}
body.screen-share-mode[data-view="meeting"] .presentation-hud {
  display: inline-flex !important;
  align-items: center;
  justify-self: end;
  gap: 8px;
  flex-wrap: nowrap;
}
body[data-view="meeting"] .presentation-hud[hidden] { display: none !important; }
body[data-view="meeting"] .presentation-pill,
body[data-view="meeting"] .presentation-stop-btn {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(46,49,57,.95);
  color: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.08);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}
body[data-view="meeting"] .presentation-pill svg { width: 18px; height: 18px; }
body[data-view="meeting"] .audio-pill { gap: 12px; }
body[data-view="meeting"] .audio-toggle {
  width: 38px; height: 22px; border-radius: 999px; background: rgba(255,255,255,.20); position: relative; display: inline-block; transition: background .2s ease;
}
body[data-view="meeting"] .audio-toggle span {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s ease;
}
body[data-view="meeting"] .audio-toggle.on { background: #8ab4f8; }
body[data-view="meeting"] .audio-toggle.on span { transform: translateX(16px); }
body[data-view="meeting"] .presentation-stop-btn {
  background: #aecbfa;
  color: #17326f;
  border-color: transparent;
  cursor: pointer;
}
body.screen-share-mode[data-view="meeting"] .call-layout {
  padding-top: 6px !important;
}
body.screen-share-mode[data-view="meeting"] .video-grid,
body.screen-share-mode[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  grid-template-columns: 1fr !important;
  grid-auto-rows: 1fr !important;
  gap: 0 !important;
}
body.screen-share-mode[data-view="meeting"] .screen-tile {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 26px !important;
  z-index: 1;
}
body.screen-share-mode[data-view="meeting"] .screen-tile video {
  width: 100% !important; height: 100% !important; object-fit: contain !important; background: #3b3b3b !important;
}
body.screen-share-mode[data-view="meeting"] .screen-tile .tile-badge {
  left: auto !important;
  right: 16px !important;
  bottom: 16px !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile {
  position: absolute !important;
  z-index: 4;
  width: 220px !important;
  height: 124px !important;
  min-width: 220px !important;
  min-height: 124px !important;
  max-width: 220px !important;
  max-height: 124px !important;
  border-radius: 18px !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.28) !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="0"] {
  right: 18px !important;
  bottom: 18px !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="1"] {
  right: 18px !important;
  bottom: 154px !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="2"] {
  right: 18px !important;
  bottom: 290px !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .tile-pin,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .tile-pin {
  top: 8px !important; right: 8px !important; width: 32px !important; height: 32px !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .tile-badge,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .tile-badge {
  left: 8px !important; bottom: 8px !important; font-size: .75rem !important; padding: 7px 10px !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .avatar-circle,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .avatar-circle {
  width: 46px !important; height: 46px !important; font-size: 1.3rem !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .avatar-placeholder p,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .avatar-placeholder p {
  font-size: .9rem !important;
}
body.screen-share-mode[data-view="meeting"] .call-controls {
  bottom: 14px !important;
  gap: 8px !important;
}
body.screen-share-mode[data-view="meeting"] .control-btn {
  width: 52px !important; height: 52px !important; min-width: 52px !important; min-height: 52px !important;
}
body.screen-share-mode[data-view="meeting"] .invite-card { display: none !important; }

@media (max-width: 980px) {
  body.screen-share-mode[data-view="meeting"] .meeting-top {
    grid-template-columns: 1fr auto !important;
    grid-template-areas: "left profile" "room room" "present present" !important;
  }
  body.screen-share-mode[data-view="meeting"] .meeting-hud-left { grid-area: left; }
  body.screen-share-mode[data-view="meeting"] .room-meta { grid-area: room; }
  body.screen-share-mode[data-view="meeting"] .presentation-hud { grid-area: present; justify-self: start; overflow-x: auto; max-width: 100%; }
}
@media (max-width: 720px) {
  body.screen-share-mode[data-view="meeting"] .presentation-pill,
  body.screen-share-mode[data-view="meeting"] .presentation-stop-btn {
    min-height: 36px; padding: 0 10px; font-size: .78rem;
  }
  body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
  body.screen-share-mode[data-view="meeting"] .video-tile.local-tile {
    width: 150px !important; height: 84px !important; min-width: 150px !important; min-height: 84px !important;
  }
  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="0"] { right: 12px !important; bottom: 12px !important; }
  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="1"] { right: 12px !important; bottom: 104px !important; }
  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="2"] { right: 12px !important; bottom: 196px !important; }
}
@media (max-width: 520px) {
  body.screen-share-mode[data-view="meeting"] .meeting-view,
  body.screen-share-mode[data-view="meeting"] .meeting-view.active { padding: 8px 8px 70px !important; }
  body.screen-share-mode[data-view="meeting"] .meeting-clock { font-size: .9rem; }
  body.screen-share-mode[data-view="meeting"] .presentation-pill,
  body.screen-share-mode[data-view="meeting"] .presentation-stop-btn { font-size: .72rem; }
  body.screen-share-mode[data-view="meeting"] .presentation-hud { gap: 6px; }
  body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
  body.screen-share-mode[data-view="meeting"] .video-tile.local-tile {
    width: 126px !important; height: 72px !important; min-width: 126px !important; min-height: 72px !important;
  }
  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="0"] { right: 10px !important; bottom: 10px !important; }
  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="1"] { right: 10px !important; bottom: 90px !important; }
}


/* === Final screen-share fix: full presentation canvas, no messy pinned previews === */
body.screen-share-mode[data-view="meeting"] .meeting-view,
body.screen-share-mode[data-view="meeting"] .meeting-view.active {
  padding: 8px 22px 82px !important;
  gap: 10px !important;
  background: #08090e !important;
}

body.screen-share-mode[data-view="meeting"] .call-layout,
body.screen-share-mode[data-view="meeting"] .stage {
  height: 100% !important;
  min-height: 0 !important;
  flex: 1 1 auto !important;
  overflow: visible !important;
}

body.screen-share-mode[data-view="meeting"] .video-grid,
body.screen-share-mode[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]),
body.screen-share-mode[data-view="meeting"] .video-grid[data-pin-count] {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  padding: 0 !important;
  gap: 0 !important;
  background: transparent !important;
}

body.screen-share-mode[data-view="meeting"] .screen-tile {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 24px !important;
  z-index: 1 !important;
  background: #3b3b3b !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.screen-share-mode[data-view="meeting"] .screen-tile video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #3b3b3b !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile {
  position: absolute !important;
  left: auto !important;
  top: auto !important;
  width: clamp(170px, 18vw, 260px) !important;
  height: clamp(96px, 10.2vw, 146px) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 18px !important;
  z-index: 7 !important;
  transform: none !important;
  background: linear-gradient(135deg, rgba(126,62,75,.92), rgba(72,34,45,.94)) !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  box-shadow: 0 18px 45px rgba(0,0,0,.32) !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="0"] {
  right: 16px !important;
  bottom: 16px !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="1"] {
  right: 16px !important;
  bottom: calc(16px + clamp(96px, 10.2vw, 146px) + 12px) !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="2"] {
  right: 16px !important;
  bottom: calc(16px + (clamp(96px, 10.2vw, 146px) + 12px) * 2) !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile:not([data-preview-index]),
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile:not([data-preview-index]) {
  right: 16px !important;
  bottom: 16px !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile.pinned::after,
body.screen-share-mode[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .pinned::after {
  display: none !important;
  content: none !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .avatar-circle,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .avatar-circle {
  width: 50px !important;
  height: 50px !important;
  font-size: 1.25rem !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .avatar-placeholder p,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .avatar-placeholder p {
  font-size: .86rem !important;
  margin-top: 6px !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .tile-badge,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .tile-badge {
  left: 10px !important;
  bottom: 10px !important;
  right: auto !important;
  max-width: calc(100% - 20px) !important;
  font-size: .72rem !important;
  padding: 7px 9px !important;
}

body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .tile-pin,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .tile-pin {
  top: 8px !important;
  right: 8px !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 12px !important;
}

/* Top presentation controls follow Akaora colors */
body.screen-share-mode[data-view="meeting"] .presentation-pill {
  background: linear-gradient(180deg, rgba(18, 31, 54, .92), rgba(10, 20, 38, .92)) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.20) !important;
}

body.screen-share-mode[data-view="meeting"] .presenter-pill svg {
  color: #ff8a30 !important;
}

body.screen-share-mode[data-view="meeting"] .audio-pill {
  cursor: pointer !important;
  user-select: none !important;
}

body.screen-share-mode[data-view="meeting"] .audio-pill.disabled {
  opacity: .72 !important;
  cursor: not-allowed !important;
}

body.screen-share-mode[data-view="meeting"] .audio-toggle {
  background: rgba(255,255,255,.18) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
}

body.screen-share-mode[data-view="meeting"] .audio-toggle.on {
  background: linear-gradient(135deg, #20c7aa, #118f85) !important;
}

body.screen-share-mode[data-view="meeting"] .audio-toggle.off {
  background: linear-gradient(135deg, #56627a, #353f52) !important;
}

body.screen-share-mode[data-view="meeting"] .presentation-stop-btn {
  background: linear-gradient(135deg, #ff8a30, #ff5338) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 14px 34px rgba(255, 87, 50, .24) !important;
  font-weight: 800 !important;
}

body.screen-share-mode[data-view="meeting"] .presentation-stop-btn:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 18px 42px rgba(255, 87, 50, .30) !important;
}

/* Presentation bottom controls should remain clean and centered */
body.screen-share-mode[data-view="meeting"] .call-controls {
  bottom: max(14px, env(safe-area-inset-bottom, 0px)) !important;
  gap: 9px !important;
}

@media (max-width: 760px) {
  body.screen-share-mode[data-view="meeting"] .meeting-view,
  body.screen-share-mode[data-view="meeting"] .meeting-view.active {
    padding: 8px 8px 76px !important;
  }

  body.screen-share-mode[data-view="meeting"] .presentation-hud {
    gap: 6px !important;
    overflow-x: auto !important;
    width: 100% !important;
  }

  body.screen-share-mode[data-view="meeting"] .presentation-pill,
  body.screen-share-mode[data-view="meeting"] .presentation-stop-btn {
    min-height: 36px !important;
    padding: 0 10px !important;
    font-size: .74rem !important;
  }

  body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
  body.screen-share-mode[data-view="meeting"] .video-tile.local-tile {
    width: 144px !important;
    height: 82px !important;
    border-radius: 14px !important;
  }

  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="0"] {
    right: 10px !important;
    bottom: 10px !important;
  }

  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="1"] {
    right: 10px !important;
    bottom: 100px !important;
  }
}

@media (max-width: 460px) {
  body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
  body.screen-share-mode[data-view="meeting"] .video-tile.local-tile {
    width: 120px !important;
    height: 70px !important;
  }

  body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .tile-badge,
  body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .tile-badge {
    display: none !important;
  }
}



/* === Final light mode visibility fix === */
body[data-theme="light"][data-view="meeting"] {
  background: #eef4f8 !important;
  color: #07152a !important;
}

body[data-theme="light"][data-view="meeting"] .app-shell,
body[data-theme="light"][data-view="meeting"] .meeting-view,
body[data-theme="light"][data-view="meeting"] .meeting-view.active {
  background:
    radial-gradient(circle at 12% 92%, rgba(29, 185, 166, 0.18), transparent 34%),
    radial-gradient(circle at 92% 6%, rgba(255, 99, 57, 0.14), transparent 30%),
    linear-gradient(135deg, #f7fbff 0%, #eef5f9 46%, #f9f1eb 100%) !important;
  color: #07152a !important;
}

body[data-theme="light"][data-view="meeting"] .meeting-top {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(9, 24, 50, 0.10) !important;
  box-shadow: 0 14px 42px rgba(11, 28, 56, 0.12) !important;
  backdrop-filter: blur(22px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(150%) !important;
}

body[data-theme="light"][data-view="meeting"] .meeting-clock,
body[data-theme="light"][data-view="meeting"] .meeting-sep,
body[data-theme="light"][data-view="meeting"] .room-meta span,
body[data-theme="light"][data-view="meeting"] .room-meta strong,
body[data-theme="light"][data-view="meeting"] .room-meta small,
body[data-theme="light"][data-view="meeting"] .host-meta,
body[data-theme="light"][data-view="meeting"] .host-meta b {
  color: #07152a !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body[data-theme="light"][data-view="meeting"] .room-meta span {
  color: #64748b !important;
}

body[data-theme="light"][data-view="meeting"] .room-meta small,
body[data-theme="light"][data-view="meeting"] .host-meta {
  color: #475569 !important;
}

body[data-theme="light"][data-view="meeting"] .layout-switch {
  background: rgba(241, 245, 249, 0.92) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8) !important;
}

body[data-theme="light"][data-view="meeting"] .layout-switch button {
  color: #334155 !important;
  background: transparent !important;
  border-color: transparent !important;
  opacity: 1 !important;
}

body[data-theme="light"][data-view="meeting"] .layout-switch button.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #ff8a2b, #ff4f3a) !important;
  box-shadow: 0 10px 24px rgba(255, 96, 48, 0.22) !important;
}

body[data-theme="light"][data-view="meeting"] .theme-switch,
body[data-theme="light"][data-view="meeting"] .mini-btn,
body[data-theme="light"][data-view="meeting"] .meeting-theme {
  background: rgba(255, 255, 255, 0.94) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 28px rgba(11, 28, 56, 0.10) !important;
  opacity: 1 !important;
}

body[data-theme="light"][data-view="meeting"] .theme-switch *,
body[data-theme="light"][data-view="meeting"] .mini-btn *,
body[data-theme="light"][data-view="meeting"] .meeting-theme * {
  color: #0f172a !important;
  stroke: currentColor !important;
  opacity: 1 !important;
}

body[data-theme="light"][data-view="meeting"] .theme-switch span,
body[data-theme="light"][data-view="meeting"] .mini-btn {
  color: #0f172a !important;
  font-weight: 800 !important;
}

body[data-theme="light"][data-view="meeting"] .meeting-profile-chip {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 10px 28px rgba(11, 28, 56, 0.12) !important;
}

body[data-theme="light"][data-view="meeting"] .profile-badge {
  background: #ff5b35 !important;
  color: #ffffff !important;
}

body[data-theme="light"][data-view="meeting"] .video-tile,
body[data-theme="light"][data-view="meeting"] .remote-tile,
body[data-theme="light"][data-view="meeting"] .local-tile,
body[data-theme="light"][data-view="meeting"] .screen-tile {
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.52), transparent 28%),
    linear-gradient(135deg, #f7f3ee 0%, #eaf4f8 48%, #dff1f6 100%) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 14px 36px rgba(11, 28, 56, 0.10) !important;
}

body[data-theme="light"][data-view="meeting"] .avatar-placeholder p,
body[data-theme="light"][data-view="meeting"] #remoteLabel,
body[data-theme="light"][data-view="meeting"] #localLabel {
  color: #07152a !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

body[data-theme="light"][data-view="meeting"] .tile-badge {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 8px 22px rgba(11, 28, 56, 0.08) !important;
}

body[data-theme="light"][data-view="meeting"] .tile-badge *,
body[data-theme="light"][data-view="meeting"] .tile-pin * {
  color: #0f172a !important;
  stroke: currentColor !important;
}

body[data-theme="light"][data-view="meeting"] .tile-pin {
  background: rgba(255, 255, 255, 0.90) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 10px 26px rgba(11, 28, 56, 0.10) !important;
}

body[data-theme="light"][data-view="meeting"] .tile-pin.active {
  background: linear-gradient(135deg, #ff8a2b, #ff4f3a) !important;
  color: #ffffff !important;
}

body[data-theme="light"][data-view="meeting"] .tile-pin.active * {
  color: #ffffff !important;
}

body[data-theme="light"][data-view="meeting"] .call-controls {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 18px 42px rgba(11, 28, 56, 0.14) !important;
  backdrop-filter: blur(20px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
}

body[data-theme="light"][data-view="meeting"] .control-btn {
  color: #ffffff !important;
  opacity: 1 !important;
}

body[data-theme="light"][data-view="meeting"] .control-btn svg,
body[data-theme="light"][data-view="meeting"] .control-btn path {
  stroke: #ffffff !important;
  color: #ffffff !important;
}

body[data-theme="light"][data-view="meeting"] .mic-control.off,
body[data-theme="light"][data-view="meeting"] .camera-control.off {
  background: linear-gradient(135deg, #64748b, #475569) !important;
}

body[data-theme="light"][data-view="meeting"] .mic-control.on,
body[data-theme="light"][data-view="meeting"] .camera-control.on {
  background: linear-gradient(135deg, #22c55e, #14b8a6) !important;
}

body[data-theme="light"][data-view="meeting"] .screen-control {
  background: linear-gradient(135deg, #7c3aed, #6366f1) !important;
}

body[data-theme="light"][data-view="meeting"] .device-control {
  background: linear-gradient(135deg, #fb923c, #f97316) !important;
}

body[data-theme="light"][data-view="meeting"] .chat-control {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
}

body[data-theme="light"][data-view="meeting"] .hangup-control.danger {
  background: linear-gradient(135deg, #ff4d5a, #e11d48) !important;
}

body[data-theme="light"][data-view="meeting"] .invite-card {
  background: rgba(255,255,255,0.96) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,0.10) !important;
  box-shadow: 0 28px 70px rgba(11,28,56,0.18) !important;
}

body[data-theme="light"][data-view="meeting"] .invite-card-title,
body[data-theme="light"][data-view="meeting"] .invite-card-text,
body[data-theme="light"][data-view="meeting"] .invite-card-user,
body[data-theme="light"][data-view="meeting"] .invite-card-note,
body[data-theme="light"][data-view="meeting"] .invite-card-note span {
  color: #0f172a !important;
  opacity: 1 !important;
}

body[data-theme="light"][data-view="meeting"] .invite-link-box {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

body[data-theme="light"][data-view="meeting"] .invite-link-box span,
body[data-theme="light"][data-view="meeting"] .invite-link-box button {
  color: #0f172a !important;
}

body[data-theme="light"][data-view="meeting"] .presentation-pill {
  background: rgba(255,255,255,0.94) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,0.12) !important;
  box-shadow: 0 12px 28px rgba(11,28,56,0.10) !important;
}

body[data-theme="light"][data-view="meeting"] .presentation-pill *,
body[data-theme="light"][data-view="meeting"] .presentation-pill svg {
  color: #0f172a !important;
  stroke: currentColor !important;
}

body[data-theme="light"][data-view="meeting"] .presentation-stop-btn {
  background: linear-gradient(135deg, #ff8a2b, #ff4f3a) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 12px 28px rgba(255, 96, 48, 0.24) !important;
}

body[data-theme="light"][data-view="meeting"] .audio-toggle {
  background: #cbd5e1 !important;
}

body[data-theme="light"][data-view="meeting"] .audio-toggle.on {
  background: #14b8a6 !important;
}

body[data-theme="light"][data-view="meeting"] ::placeholder {
  color: #64748b !important;
}


/* =========================================================
   GOOGLE-MEET-LIKE TOP BAR + SMALLER CLEANER SCREEN PREVIEWS
   ========================================================= */
body.screen-share-mode[data-view="meeting"] .meeting-view,
body.screen-share-mode[data-view="meeting"] .meeting-view.active {
  padding-top: 14px !important;
}

body.screen-share-mode[data-view="meeting"] .meeting-top {
  position: relative !important;
  display: grid !important;
  grid-template-columns: auto auto 1fr auto !important;
  align-items: center !important;
  column-gap: 12px !important;
  row-gap: 8px !important;
  min-height: 54px !important;
  padding: 2px 2px 8px !important;
  margin: 0 0 10px 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
body.screen-share-mode[data-view="meeting"] .meeting-hud-left {
  gap: 12px !important;
}
body.screen-share-mode[data-view="meeting"] .meeting-clock,
body.screen-share-mode[data-view="meeting"] .meeting-sep,
body.screen-share-mode[data-view="meeting"] .room-meta strong,
body.screen-share-mode[data-view="meeting"] .host-meta,
body.screen-share-mode[data-view="meeting"] .room-meta > div > span {
  color: #ffffff !important;
}
body.screen-share-mode[data-view="meeting"] .meeting-clock,
body.screen-share-mode[data-view="meeting"] .room-meta strong {
  font-weight: 700 !important;
}
body.screen-share-mode[data-view="meeting"] .room-meta {
  gap: 10px !important;
}
body.screen-share-mode[data-view="meeting"] .room-meta img {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}
body.screen-share-mode[data-view="meeting"] .share-actions {
  display: none !important;
}
body.screen-share-mode[data-view="meeting"] .presentation-hud {
  justify-self: end !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}
body.screen-share-mode[data-view="meeting"] .presentation-pill,
body.screen-share-mode[data-view="meeting"] .presentation-stop-btn,
body.screen-share-mode[data-view="meeting"] .meeting-profile-chip {
  min-height: 44px !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}
body.screen-share-mode[data-view="meeting"] .presentation-pill {
  padding: 0 14px !important;
  background: #20242d !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: #ffffff !important;
  gap: 9px !important;
}
body.screen-share-mode[data-view="meeting"] .presentation-pill span,
body.screen-share-mode[data-view="meeting"] .presentation-pill svg {
  color: #ffffff !important;
  fill: none !important;
  stroke: currentColor !important;
}
body.screen-share-mode[data-view="meeting"] .presenter-pill svg {
  color: #f7a046 !important;
}
body.screen-share-mode[data-view="meeting"] .audio-pill {
  background: #282d36 !important;
}
body.screen-share-mode[data-view="meeting"] .audio-toggle {
  width: 36px !important;
  height: 20px !important;
  border-radius: 999px !important;
  background: #5f6671 !important;
}
body.screen-share-mode[data-view="meeting"] .audio-toggle span {
  width: 14px !important;
  height: 14px !important;
  top: 3px !important;
  left: 3px !important;
}
body.screen-share-mode[data-view="meeting"] .audio-toggle.on {
  background: #8ab4f8 !important;
}
body.screen-share-mode[data-view="meeting"] .audio-toggle.on span {
  left: 19px !important;
}
body.screen-share-mode[data-view="meeting"] .presentation-stop-btn {
  padding: 0 18px !important;
  font-weight: 700 !important;
  background: #8ab4f8 !important;
  color: #142033 !important;
  border: none !important;
}
body.screen-share-mode[data-view="meeting"] .presentation-stop-btn:hover {
  filter: brightness(1.03) !important;
}
body.screen-share-mode[data-view="meeting"] .meeting-profile-chip {
  justify-self: end !important;
  width: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  background: #20242d !important;
  border: 1px solid rgba(255,255,255,.08) !important;
}
body.screen-share-mode[data-view="meeting"] .meeting-profile-chip img {
  width: 28px !important;
  height: 28px !important;
}
body.screen-share-mode[data-view="meeting"] .meeting-profile-chip .profile-badge {
  top: -4px !important;
  right: -4px !important;
}

/* smaller cleaner right-side participant previews */
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile {
  width: 208px !important;
  height: 118px !important;
  right: 16px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.25) !important;
  background: linear-gradient(180deg, rgba(28,31,38,.96), rgba(17,20,27,.96)) !important;
  overflow: hidden !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="0"] { bottom: 148px !important; }
body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="1"] { bottom: 18px !important; }
body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="2"] { display: none !important; }
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .avatar-circle,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .avatar-circle {
  width: 46px !important;
  height: 46px !important;
  font-size: 1.35rem !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .tile-badge,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .tile-badge {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  border-radius: 0 !important;
  padding: 18px 10px 9px !important;
  min-height: 40px !important;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.72) 54%, rgba(0,0,0,.88)) !important;
  color: #fff !important;
  font-size: .82rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .tile-badge span,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .tile-badge span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile .tile-pin,
body.screen-share-mode[data-view="meeting"] .video-tile.local-tile .tile-pin {
  width: 34px !important;
  height: 34px !important;
  top: 9px !important;
  right: 9px !important;
  background: rgba(32,36,45,.92) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: #fff !important;
}
body.screen-share-mode[data-view="meeting"] .video-tile.pinned::after,
body.screen-share-mode[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .pinned::after {
  display: none !important;
}

/* tighten center stage proportions closer to reference */
body.screen-share-mode[data-view="meeting"] .stage {
  min-height: calc(100dvh - 126px) !important;
  height: calc(100dvh - 126px) !important;
}
body.screen-share-mode[data-view="meeting"] .screen-tile {
  left: 18px !important;
  top: 12px !important;
  bottom: 18px !important;
  right: 244px !important;
  border-radius: 24px !important;
}

/* mobile/tablet fallback */
@media (max-width: 1100px) {
  body.screen-share-mode[data-view="meeting"] .presentation-hud { gap: 8px !important; }
  body.screen-share-mode[data-view="meeting"] .presentation-pill,
  body.screen-share-mode[data-view="meeting"] .presentation-stop-btn { min-height: 40px !important; font-size: .86rem !important; }
  body.screen-share-mode[data-view="meeting"] .screen-tile { right: 220px !important; }
  body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
  body.screen-share-mode[data-view="meeting"] .video-tile.local-tile { width: 184px !important; height: 104px !important; }
}
@media (max-width: 900px) {
  body.screen-share-mode[data-view="meeting"] .meeting-top {
    grid-template-columns: 1fr auto !important;
    align-items: start !important;
  }
  body.screen-share-mode[data-view="meeting"] .room-meta { grid-column: 1 / -1 !important; }
  body.screen-share-mode[data-view="meeting"] .presentation-hud { grid-column: 1 / -1 !important; justify-self: start !important; overflow-x: auto !important; }
  body.screen-share-mode[data-view="meeting"] .meeting-profile-chip { grid-row: 1; grid-column: 2; }
  body.screen-share-mode[data-view="meeting"] .screen-tile {
    right: 12px !important;
    left: 12px !important;
    top: 10px !important;
    bottom: 10px !important;
  }
  body.screen-share-mode[data-view="meeting"] .video-tile.remote-tile,
  body.screen-share-mode[data-view="meeting"] .video-tile.local-tile {
    width: 148px !important;
    height: 88px !important;
    right: 10px !important;
  }
  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="0"] { bottom: 108px !important; }
  body.screen-share-mode[data-view="meeting"] .video-tile[data-preview-index="1"] { bottom: 12px !important; }
}


/* === Final More options + view settings layer === */
body[data-view="meeting"] .more-control {
  background: rgba(49,54,63,.96) !important;
}

body[data-theme="light"][data-view="meeting"] .more-control {
  background: linear-gradient(135deg, #64748b, #475569) !important;
}

body[data-view="meeting"] .video-tile.layout-hidden {
  display: none !important;
}

body[data-view="meeting"] .video-grid[data-layout="tiled"] {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
  grid-auto-rows: minmax(0, 1fr) !important;
}

body[data-view="meeting"] .video-grid[data-layout="spotlight"]:not([data-pin-count="1"]),
body[data-view="meeting"] .video-grid[data-layout="sidebar"]:not([data-pin-count="1"]) {
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, .72fr) !important;
  grid-auto-rows: minmax(0, 1fr) !important;
}

body[data-view="meeting"] .video-grid[data-layout="spotlight"]:not([data-pin-count="1"]) .video-tile.auto-focus,
body[data-view="meeting"] .video-grid[data-layout="sidebar"]:not([data-pin-count="1"]) .video-tile.auto-focus {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
}

body[data-view="meeting"] .video-grid[data-layout="spotlight"]:not([data-pin-count="1"]) .video-tile:not(.auto-focus),
body[data-view="meeting"] .video-grid[data-layout="sidebar"]:not([data-pin-count="1"]) .video-tile:not(.auto-focus) {
  grid-column: 2 !important;
}

body[data-view="meeting"] .more-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  width: min(360px, calc(100vw - 28px));
  z-index: 70;
  padding: 16px;
  border-radius: 24px;
  background: rgba(18, 24, 36, .96);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

body[data-view="meeting"] .more-panel.open:not([hidden]) {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

body[data-view="meeting"] .more-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

body[data-view="meeting"] .more-head strong {
  display: block;
  color: inherit;
  font-size: 1rem;
}

body[data-view="meeting"] .more-head small,
body[data-view="meeting"] .view-mode-option small,
body[data-view="meeting"] .switch-field small {
  color: rgba(255,255,255,.66);
}

body[data-view="meeting"] .view-mode-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

body[data-view="meeting"] .view-mode-option {
  min-height: 78px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.055);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

body[data-view="meeting"] .view-mode-option:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.09);
}

body[data-view="meeting"] .view-mode-option.active {
  border-color: rgba(31, 200, 176, .72);
  background: linear-gradient(135deg, rgba(31, 200, 176, .20), rgba(255, 128, 54, .16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

body[data-view="meeting"] .view-mode-option span {
  display: block;
  margin-bottom: 4px;
  font-weight: 800;
}

body[data-view="meeting"] .range-field,
body[data-view="meeting"] .switch-field {
  display: grid;
  gap: 9px;
  padding: 12px 0 0;
  border-top: 1px solid rgba(255,255,255,.10);
}

body[data-view="meeting"] .range-field span,
body[data-view="meeting"] .switch-field span {
  color: inherit;
}

body[data-view="meeting"] .range-field b {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(31, 200, 176, .18);
  color: #92fff1;
}

body[data-view="meeting"] .range-field input[type="range"] {
  width: 100%;
  accent-color: #1fc8b0;
}

body[data-view="meeting"] .switch-field {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-top: 12px;
}

body[data-view="meeting"] .switch-field strong {
  display: block;
  margin-bottom: 3px;
}

body[data-view="meeting"] .switch-field input {
  width: 46px;
  height: 26px;
  accent-color: #1fc8b0;
  cursor: pointer;
}

body[data-theme="light"][data-view="meeting"] .more-panel {
  background: rgba(255,255,255,.97) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  box-shadow: 0 28px 70px rgba(11,28,56,.18) !important;
}

body[data-theme="light"][data-view="meeting"] .more-head small,
body[data-theme="light"][data-view="meeting"] .view-mode-option small,
body[data-theme="light"][data-view="meeting"] .switch-field small {
  color: #64748b !important;
}

body[data-theme="light"][data-view="meeting"] .view-mode-option {
  background: #f8fafc !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  color: #0f172a !important;
}

body[data-theme="light"][data-view="meeting"] .view-mode-option.active {
  border-color: rgba(20, 184, 166, .65) !important;
  background: linear-gradient(135deg, rgba(20, 184, 166, .16), rgba(255, 138, 43, .14)) !important;
}

body[data-theme="light"][data-view="meeting"] .range-field,
body[data-theme="light"][data-view="meeting"] .switch-field {
  border-top-color: rgba(15,23,42,.10) !important;
}

@media (max-width: 860px) {
  body[data-view="meeting"] .video-grid[data-layout="spotlight"]:not([data-pin-count="1"]),
  body[data-view="meeting"] .video-grid[data-layout="sidebar"]:not([data-pin-count="1"]),
  body[data-view="meeting"] .video-grid[data-layout="tiled"] {
    grid-template-columns: 1fr !important;
  }

  body[data-view="meeting"] .video-grid[data-layout="spotlight"]:not([data-pin-count="1"]) .video-tile.auto-focus,
  body[data-view="meeting"] .video-grid[data-layout="sidebar"]:not([data-pin-count="1"]) .video-tile.auto-focus,
  body[data-view="meeting"] .video-grid[data-layout="spotlight"]:not([data-pin-count="1"]) .video-tile:not(.auto-focus),
  body[data-view="meeting"] .video-grid[data-layout="sidebar"]:not([data-pin-count="1"]) .video-tile:not(.auto-focus) {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

@media (max-width: 560px) {
  body[data-view="meeting"] .call-controls {
    gap: 5px !important;
  }

  body[data-view="meeting"] .control-btn,
  body.screen-share-mode[data-view="meeting"] .control-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  body[data-view="meeting"] .control-btn svg,
  body.screen-share-mode[data-view="meeting"] .control-btn svg {
    width: 19px !important;
    height: 19px !important;
  }

  body[data-view="meeting"] .more-panel {
    right: 8px;
    left: 8px;
    bottom: 72px;
    width: auto;
    max-height: min(68dvh, 520px);
    overflow: auto;
    border-radius: 20px;
  }

  body[data-view="meeting"] .view-mode-list {
    grid-template-columns: 1fr;
  }

  body[data-view="meeting"] .view-mode-option {
    min-height: 64px;
  }
}

@media (max-width: 380px) {
  body[data-view="meeting"] .call-controls {
    gap: 4px !important;
  }

  body[data-view="meeting"] .control-btn,
  body.screen-share-mode[data-view="meeting"] .control-btn {
    width: 39px !important;
    min-width: 39px !important;
    height: 39px !important;
    min-height: 39px !important;
  }
}

body[data-view="meeting"] .invite-card,
body[data-theme="dark"][data-view="meeting"] .invite-card,
body[data-theme="light"][data-view="meeting"] .invite-card {
  background: rgba(255,255,255,.97) !important;
  color: #202124 !important;
}

body[data-view="meeting"] .invite-card-title,
body[data-view="meeting"] .invite-card-text,
body[data-view="meeting"] .invite-card-user,
body[data-view="meeting"] .invite-card-note,
body[data-view="meeting"] .invite-card-note span,
body[data-theme="dark"][data-view="meeting"] .invite-card-title,
body[data-theme="dark"][data-view="meeting"] .invite-card-text,
body[data-theme="dark"][data-view="meeting"] .invite-card-user,
body[data-theme="dark"][data-view="meeting"] .invite-card-note,
body[data-theme="dark"][data-view="meeting"] .invite-card-note span,
body[data-theme="light"][data-view="meeting"] .invite-card-title,
body[data-theme="light"][data-view="meeting"] .invite-card-text,
body[data-theme="light"][data-view="meeting"] .invite-card-user,
body[data-theme="light"][data-view="meeting"] .invite-card-note,
body[data-theme="light"][data-view="meeting"] .invite-card-note span {
  color: #3c4043 !important;
}

body[data-view="meeting"] .invite-card-title,
body[data-theme="dark"][data-view="meeting"] .invite-card-title,
body[data-theme="light"][data-view="meeting"] .invite-card-title {
  color: #202124 !important;
}

body[data-view="meeting"] .invite-link-box,
body[data-theme="dark"][data-view="meeting"] .invite-link-box,
body[data-theme="light"][data-view="meeting"] .invite-link-box {
  background: #f1f3f4 !important;
  color: #3c4043 !important;
}


/* === Meeting chrome simplification === */
body[data-view="meeting"] .meeting-profile-chip,
body[data-view="meeting"] .profile-badge {
  display: none !important;
}

body[data-view="meeting"] .meeting-top,
body[data-theme="light"][data-view="meeting"] .meeting-top,
body[data-theme="dark"][data-view="meeting"] .meeting-top {
  grid-template-columns: auto auto minmax(0, 1fr) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 2px 10px !important;
}

body[data-view="meeting"] .meeting-hud-left,
body[data-view="meeting"] .room-meta,
body[data-view="meeting"] .share-actions {
  min-height: 44px !important;
}

body[data-view="meeting"] .share-actions {
  justify-self: end !important;
}

body[data-view="meeting"] .room-meta img {
  width: 32px !important;
  height: 32px !important;
}

body[data-theme="light"][data-view="meeting"] .meeting-clock,
body[data-theme="light"][data-view="meeting"] .meeting-sep,
body[data-theme="light"][data-view="meeting"] .room-meta strong,
body[data-theme="light"][data-view="meeting"] .host-meta,
body[data-theme="light"][data-view="meeting"] .host-meta b {
  color: #0f172a !important;
}

body[data-theme="light"][data-view="meeting"] .room-meta span,
body[data-theme="light"][data-view="meeting"] .room-meta small {
  color: #64748b !important;
}

body[data-view="meeting"] .call-controls,
body[data-theme="light"][data-view="meeting"] .call-controls,
body[data-theme="dark"][data-view="meeting"] .call-controls {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  gap: 10px !important;
  width: auto !important;
  max-width: calc(100vw - 20px) !important;
}

body[data-view="meeting"] .control-btn,
body.screen-share-mode[data-view="meeting"] .control-btn {
  width: 50px !important;
  min-width: 50px !important;
  height: 50px !important;
  min-height: 50px !important;
  border-radius: 999px !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: 0 9px 20px rgba(15, 23, 42, .18) !important;
}

body[data-view="meeting"] .control-btn:hover {
  transform: translateY(-2px) scale(1.03) !important;
}

body[data-view="meeting"] .control-btn:active {
  transform: translateY(0) scale(.96) !important;
}

body[data-view="meeting"] .control-btn svg,
body.screen-share-mode[data-view="meeting"] .control-btn svg {
  width: 21px !important;
  height: 21px !important;
  filter: none !important;
}

body[data-view="meeting"] .mic-control.off,
body[data-view="meeting"] .camera-control.off,
body[data-theme="light"][data-view="meeting"] .mic-control.off,
body[data-theme="light"][data-view="meeting"] .camera-control.off {
  background: #596579 !important;
}

body[data-view="meeting"] .mic-control.on,
body[data-view="meeting"] .camera-control.on,
body[data-theme="light"][data-view="meeting"] .mic-control.on,
body[data-theme="light"][data-view="meeting"] .camera-control.on {
  background: #14b8a6 !important;
}

body[data-view="meeting"] .screen-control,
body[data-theme="light"][data-view="meeting"] .screen-control {
  background: #6256e8 !important;
}

body[data-view="meeting"] .device-control,
body[data-theme="light"][data-view="meeting"] .device-control {
  background: #f97316 !important;
}

body[data-view="meeting"] .chat-control,
body[data-theme="light"][data-view="meeting"] .chat-control {
  background: #0ea5e9 !important;
}

body[data-view="meeting"] .more-control,
body[data-theme="light"][data-view="meeting"] .more-control {
  background: #475569 !important;
}

body[data-view="meeting"] .hangup-control.danger,
body[data-theme="light"][data-view="meeting"] .hangup-control.danger {
  background: #e11d48 !important;
}

body[data-view="meeting"] #closeChatBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body[data-view="meeting"] .chat-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: start !important;
  gap: 10px !important;
}

body[data-view="meeting"] .chat-head > div {
  min-width: 0;
}

body[data-view="meeting"] #closeChatBtn,
body[data-view="meeting"] #chatFullscreenBtn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 999px !important;
}

body[data-view="meeting"] #closeChatBtn {
  background: rgba(225, 29, 72, .10) !important;
  color: #e11d48 !important;
  border-color: rgba(225, 29, 72, .18) !important;
}

body[data-view="meeting"] #closeChatBtn svg,
body[data-view="meeting"] #closeChatBtn path {
  stroke: currentColor !important;
}

body[data-theme="light"][data-view="meeting"] .chat-drawer {
  background: rgba(255, 255, 255, .98) !important;
  border: 1px solid rgba(15, 23, 42, .10) !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .14) !important;
}

body[data-theme="light"][data-view="meeting"] .chat-head strong,
body[data-theme="light"][data-view="meeting"] .chat-head small {
  color: #0f172a !important;
}

body[data-theme="light"][data-view="meeting"] .chat-head small {
  color: #64748b !important;
}

@media (max-width: 900px) {
  body[data-view="meeting"] .meeting-top,
  body[data-theme="light"][data-view="meeting"] .meeting-top,
  body[data-theme="dark"][data-view="meeting"] .meeting-top {
    grid-template-columns: 1fr !important;
    grid-template-areas: "left" "room" "actions" !important;
    row-gap: 8px !important;
  }

  body[data-view="meeting"] .meeting-hud-left {
    grid-area: left !important;
  }

  body[data-view="meeting"] .room-meta {
    grid-area: room !important;
  }

  body[data-view="meeting"] .share-actions {
    grid-area: actions !important;
    justify-self: stretch !important;
    overflow-x: auto !important;
  }

  body.screen-share-mode[data-view="meeting"] .meeting-top {
    grid-template-areas: "left" "room" "present" !important;
  }

  body.screen-share-mode[data-view="meeting"] .presentation-hud {
    grid-area: present !important;
    justify-self: start !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }
}

@media (max-width: 560px) {
  body[data-view="meeting"] .call-controls,
  body.screen-share-mode[data-view="meeting"] .call-controls {
    gap: 6px !important;
    max-width: calc(100vw - 10px) !important;
  }

  body[data-view="meeting"] .control-btn,
  body.screen-share-mode[data-view="meeting"] .control-btn {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  body[data-view="meeting"] .control-btn svg,
  body.screen-share-mode[data-view="meeting"] .control-btn svg {
    width: 18px !important;
    height: 18px !important;
  }
}

@media (max-width: 380px) {
  body[data-view="meeting"] .call-controls,
  body.screen-share-mode[data-view="meeting"] .call-controls {
    gap: 4px !important;
  }

  body[data-view="meeting"] .control-btn,
  body.screen-share-mode[data-view="meeting"] .control-btn {
    width: 39px !important;
    min-width: 39px !important;
    height: 39px !important;
    min-height: 39px !important;
  }
}


/* === Focused pin layout + softer light stage === */
body[data-theme="light"][data-view="meeting"] .stage,
body[data-theme="light"][data-view="meeting"] .video-tile,
body[data-theme="light"][data-view="meeting"] .remote-tile,
body[data-theme="light"][data-view="meeting"] .local-tile,
body[data-theme="light"][data-view="meeting"] .screen-tile {
  background:
    radial-gradient(circle at 50% 38%, rgba(20, 184, 166, .24), transparent 36%),
    radial-gradient(circle at 16% 22%, rgba(255, 115, 48, .10), transparent 30%),
    linear-gradient(145deg, #c4dce4 0%, #b8d2dc 52%, #c8e1dd 100%) !important;
}

body[data-theme="light"][data-view="meeting"] .video-tile {
  border-color: rgba(15, 23, 42, .08) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08) !important;
}

body[data-theme="light"][data-view="meeting"] .avatar-placeholder p,
body[data-theme="light"][data-view="meeting"] #localLabel,
body[data-theme="light"][data-view="meeting"] #remoteLabel {
  color: #0f172a !important;
}

body[data-view="meeting"] .remote-tile[hidden] {
  display: none !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"],
body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) clamp(140px, 15vw, 200px) !important;
  grid-template-rows: repeat(2, clamp(88px, 13vh, 132px)) minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 0 !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-count="1"][data-pin-count="1"] {
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile,
body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  transform: none !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile.pinned,
body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile.pinned {
  grid-column: 1 !important;
  grid-row: 1 / -1 !important;
  z-index: 2 !important;
  border-radius: 26px !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .16) !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-count="1"][data-pin-count="1"] .video-tile.pinned {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned),
body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) {
  grid-column: 2 !important;
  grid-row: auto !important;
  border-radius: 18px !important;
  z-index: 3 !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .14) !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned) .avatar-circle,
body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) .avatar-circle {
  width: 46px !important;
  height: 46px !important;
  font-size: 1.2rem !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned) .avatar-placeholder p,
body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) .avatar-placeholder p {
  font-size: .84rem !important;
  margin-top: 6px !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned) .tile-badge,
body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) .tile-badge {
  left: 8px !important;
  bottom: 8px !important;
  max-width: calc(100% - 16px) !important;
  padding: 6px 8px !important;
  font-size: .68rem !important;
}

body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned) .tile-pin,
body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) .tile-pin {
  width: 32px !important;
  height: 32px !important;
  top: 8px !important;
  right: 8px !important;
}

@media (max-width: 720px) {
  body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"],
  body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) {
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(0, 1fr) 86px 86px !important;
    gap: 8px !important;
  }

  body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile.pinned,
  body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile.pinned {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pin-count="1"] .video-tile:not(.pinned),
  body:not(.screen-share-mode)[data-view="meeting"] .video-grid[data-pinned]:not([data-pinned=""]) .video-tile:not(.pinned) {
    grid-column: 1 !important;
    min-height: 0 !important;
  }
}

/* === Final meeting vertical spacing: keep controls close to the call stage === */
body[data-view="meeting"] .app-shell {
  padding-bottom: 72px !important;
}

body[data-view="meeting"] .call-layout {
  height: calc(100dvh - 154px) !important;
  min-height: calc(100dvh - 154px) !important;
  padding-bottom: 14px !important;
}

body[data-view="meeting"] .stage {
  height: 100% !important;
  min-height: 0 !important;
}

body[data-view="meeting"] .call-controls,
body[data-theme="light"][data-view="meeting"] .call-controls,
body[data-theme="dark"][data-view="meeting"] .call-controls {
  bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
}

body[data-view="meeting"] .reaction-panel {
  bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 60px) !important;
}

body[data-view="meeting"] .chat-popups {
  bottom: 72px !important;
}

@media (max-width: 900px) {
  body[data-view="meeting"] .call-layout {
    height: calc(100dvh - 202px) !important;
    min-height: calc(100dvh - 202px) !important;
    padding-bottom: 12px !important;
  }
}

@media (max-width: 560px) {
  body[data-view="meeting"] .app-shell {
    padding-bottom: 58px !important;
  }

  body[data-view="meeting"] .call-layout {
    height: calc(100dvh - 220px) !important;
    min-height: calc(100dvh - 220px) !important;
    padding-bottom: 10px !important;
  }

  body[data-view="meeting"] .call-controls,
  body.screen-share-mode[data-view="meeting"] .call-controls {
    bottom: max(8px, env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Final override: keep More options anchored and scrollable after all legacy layers. */
body[data-view="meeting"] .more-panel,
body[data-theme="light"][data-view="meeting"] .more-panel,
body[data-theme="dark"][data-view="meeting"] .more-panel {
  position: fixed !important;
  top: 88px !important;
  right: 18px !important;
  bottom: auto !important;
  left: auto !important;
  width: min(360px, calc(100vw - 28px)) !important;
  height: auto !important;
  max-height: calc(100% - 170px) !important;
  overflow-y: auto !important;
  transform: none !important;
}

body[data-view="meeting"] .more-panel[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  body[data-view="meeting"] .more-panel,
  body[data-theme="light"][data-view="meeting"] .more-panel,
  body[data-theme="dark"][data-view="meeting"] .more-panel {
    top: 104px !important;
    right: 8px !important;
    bottom: auto !important;
    left: 8px !important;
    width: auto !important;
    height: auto !important;
    max-height: calc(100% - 172px) !important;
  }
}
