@font-face{font-family:'Gabarito';font-style:normal;font-weight:500;font-display:swap;src:url('assets/design-system/fonts/gabarito-500.woff2') format('woff2');}
@font-face{font-family:'Gabarito';font-style:normal;font-weight:600;font-display:swap;src:url('assets/design-system/fonts/gabarito-600.woff2') format('woff2');}
@font-face{font-family:'Gabarito';font-style:normal;font-weight:700;font-display:swap;src:url('assets/design-system/fonts/gabarito-700.woff2') format('woff2');}
@font-face{font-family:'Gabarito';font-style:normal;font-weight:800;font-display:swap;src:url('assets/design-system/fonts/gabarito-800.woff2') format('woff2');}
@font-face{font-family:'Gabarito';font-style:normal;font-weight:900;font-display:swap;src:url('assets/design-system/fonts/gabarito-900.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:400;font-display:swap;src:url('assets/design-system/fonts/hanken-grotesk-400.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('assets/design-system/fonts/hanken-grotesk-500.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:600;font-display:swap;src:url('assets/design-system/fonts/hanken-grotesk-600.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:700;font-display:swap;src:url('assets/design-system/fonts/hanken-grotesk-700.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:800;font-display:swap;src:url('assets/design-system/fonts/hanken-grotesk-800.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:italic;font-weight:400;font-display:swap;src:url('assets/design-system/fonts/hanken-grotesk-400-italic.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:italic;font-weight:500;font-display:swap;src:url('assets/design-system/fonts/hanken-grotesk-500-italic.woff2') format('woff2');}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:400;font-display:swap;src:url('assets/design-system/fonts/space-mono-400.woff2') format('woff2');}
@font-face{font-family:'Space Mono';font-style:normal;font-weight:700;font-display:swap;src:url('assets/design-system/fonts/space-mono-700.woff2') format('woff2');}
@font-face{font-family:'Space Mono';font-style:italic;font-weight:400;font-display:swap;src:url('assets/design-system/fonts/space-mono-400-italic.woff2') format('woff2');}

:root {
  color-scheme: light;
  --im-cream: #FBF4E4;
  --im-paper: #F2E6CE;
  --im-paper-2: #E9D8B8;
  --im-paper-3: #DDC59B;
  --im-ink: #2A1A0E;
  --im-ink-2: #5A4329;
  --im-ink-3: #8C7551;
  --im-terracotta: #C9512B;
  --im-terracotta-deep: #9F3A1B;
  --im-amber: #E08329;
  --im-gold: #E6B33C;
  --im-gold-deep: #C9912A;
  --im-rust: #97311E;
  --im-avocado: #6E7536;
  --im-avocado-deep: #545A28;
  --im-teal: #2F6E62;
  --im-teal-deep: #234F47;
  --im-terracotta-wash: #F0D6C5;
  --im-gold-wash: #F4E6C0;
  --im-avocado-wash: #DDDFC0;
  --im-teal-wash: #CFE0D7;
  --bg: var(--im-paper);
  --surface: var(--im-paper);
  --surface-alt: var(--im-paper-2);
  --surface-low: var(--im-paper-2);
  --surface-raised: var(--im-cream);
  --surface-card: var(--im-cream);
  --surface-input: var(--im-cream);
  --surface-strong: var(--im-terracotta);
  --text: var(--im-ink);
  --text-muted: var(--im-ink-2);
  --border: var(--im-ink);
  --border-strong: var(--im-ink);
  --accent: var(--im-terracotta);
  --accent-strong: var(--im-terracotta-deep);
  --accent-soft: var(--im-terracotta-wash);
  --accent-wash: rgba(201, 81, 43, 0.18);
  --signal: var(--im-avocado);
  --copper: var(--im-amber);
  --warn: var(--im-gold-deep);
  --warn-soft: var(--im-gold-wash);
  --danger: var(--im-rust);
  --danger-soft: #E8C4B7;
  --info: var(--im-teal);
  --info-soft: var(--im-teal-wash);
  --grid-line: rgba(42, 26, 14, 0.12);
  --grid-ink: rgba(42, 26, 14, 0.06);
  --glass: rgba(242, 230, 206, 0.88);
  --bg-sheen: transparent;
  --focus-ring: rgba(201, 81, 43, 0.36);
  --border-w: 2px;
  --border-w-bold: 3px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --shadow-xs: 2px 2px 0 var(--im-ink);
  --shadow-sm: 3px 3px 0 var(--im-ink);
  --shadow-md: 5px 5px 0 var(--im-ink);
  --shadow: 5px 5px 0 var(--im-ink);
  --font-display: 'Gabarito', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --heading-weight: 900;
  --strong-weight: 800;
  font-family: var(--font-body);
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #211610;
    --surface: #2C1E14;
    --surface-alt: #382517;
    --surface-low: #382517;
    --surface-raised: #44301F;
    --surface-card: #2C1E14;
    --surface-input: #211610;
    --surface-strong: var(--im-terracotta);
    --text: #F6ECD9;
    --text-muted: #C9B79B;
    --border: rgba(251, 244, 228, 0.38);
    --border-strong: rgba(251, 244, 228, 0.62);
    --accent: var(--im-amber);
    --accent-strong: var(--im-gold);
    --accent-soft: rgba(224, 131, 41, 0.18);
    --accent-wash: rgba(224, 131, 41, 0.14);
    --signal: #A9B25D;
    --copper: var(--im-gold);
    --warn: var(--im-gold);
    --warn-soft: rgba(230, 179, 60, 0.2);
    --danger: #D86F4A;
    --danger-soft: rgba(151, 49, 30, 0.32);
    --info: #78B9AA;
    --info-soft: rgba(47, 110, 98, 0.28);
    --grid-line: rgba(251, 244, 228, 0.08);
    --grid-ink: rgba(251, 244, 228, 0.07);
    --glass: rgba(33, 22, 16, 0.88);
    --focus-ring: rgba(224, 131, 41, 0.42);
    --shadow: 5px 5px 0 rgba(0, 0, 0, 0.72);
  }
}

:root[data-theme="night"] {
  color-scheme: dark;
  --bg: #211610;
  --surface: #2C1E14;
  --surface-alt: #382517;
  --surface-low: #382517;
  --surface-raised: #44301F;
  --surface-card: #2C1E14;
  --surface-input: #211610;
  --surface-strong: var(--im-terracotta);
  --text: #F6ECD9;
  --text-muted: #C9B79B;
  --border: rgba(251, 244, 228, 0.38);
  --border-strong: rgba(251, 244, 228, 0.62);
  --accent: var(--im-amber);
  --accent-strong: var(--im-gold);
  --accent-soft: rgba(224, 131, 41, 0.18);
  --accent-wash: rgba(224, 131, 41, 0.14);
  --signal: #A9B25D;
  --copper: var(--im-gold);
  --warn: var(--im-gold);
  --warn-soft: rgba(230, 179, 60, 0.2);
  --danger: #D86F4A;
  --danger-soft: rgba(151, 49, 30, 0.32);
  --info: #78B9AA;
  --info-soft: rgba(47, 110, 98, 0.28);
  --grid-line: rgba(251, 244, 228, 0.08);
  --grid-ink: rgba(251, 244, 228, 0.07);
  --glass: rgba(33, 22, 16, 0.88);
  --focus-ring: rgba(224, 131, 41, 0.42);
  --shadow: 5px 5px 0 rgba(0, 0, 0, 0.72);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .library-panel,
  :root:not([data-theme]) .on-deck-panel,
  :root:not([data-theme]) .on-deck-card,
  :root:not([data-theme]) .on-deck-empty {
    background: var(--surface);
  }

  :root:not([data-theme]) .library-source.selected,
  :root:not([data-theme]) .library-output-studio,
  :root:not([data-theme]) .pricing-card.featured {
    background: var(--accent-wash);
  }
}

:root[data-theme="night"] .library-panel,
:root[data-theme="night"] .on-deck-panel,
:root[data-theme="night"] .on-deck-card,
:root[data-theme="night"] .on-deck-empty {
  background: var(--surface);
}

:root[data-theme="night"] .library-source.selected,
:root[data-theme="night"] .library-output-studio,
:root[data-theme="night"] .pricing-card.featured {
  background: var(--accent-wash);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  background:
    linear-gradient(180deg, var(--bg-sheen), transparent 18rem),
    var(--bg);
  color: var(--text);
}

body.instantmeet-in-room {
  min-width: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

html:has(body.instantmeet-in-room) {
  height: 100%;
  overflow: hidden;
}

.library-panel {
  position: relative;
  overflow: hidden;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--im-paper-2);
  box-shadow: var(--shadow);
}

.library-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, var(--grid-ink) 1px, transparent 1px),
    linear-gradient(180deg, var(--grid-ink) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000, transparent 72%);
}

.library-panel > * {
  position: relative;
}

.library-hero {
  align-items: stretch;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.library-hero h3 {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: 0;
}

.library-hero p:not(.eyebrow) {
  max-width: 52rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.library-hero .eyebrow {
  color: var(--signal);
}

.library-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(6.75rem, 1fr));
  gap: 0.6rem;
  align-self: stretch;
  min-width: min(100%, 24rem);
}

.library-stats-grid .library-stat {
  min-height: 100%;
  border-color: var(--border);
  background: var(--surface-card);
  color: var(--text);
}

.library-stats-grid .library-stat span {
  color: var(--text-muted);
}

.library-workflows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.library-source-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.library-source-map-card {
  display: grid;
  gap: 0.25rem;
  min-height: 7rem;
  padding: 0.85rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.library-source-map-card strong {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 0.95;
  letter-spacing: 0;
}

.library-source-map-card span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-source-map-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.library-workflow-card {
  min-height: 7.25rem;
  padding: 0.95rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.library-workflow-card strong {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.library-workflow-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.library-toolbar {
  border-color: var(--border);
  background: var(--surface-low);
}

.library-list {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: stretch;
}

.library-source {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 9rem;
  border-color: var(--border);
  background: var(--surface-card);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.library-source:hover {
  transform: translateY(-1px);
  border-color: var(--surface-strong);
  background: var(--surface-raised);
}

.library-source.selected {
  border-color: var(--accent-strong);
  background: var(--im-gold-wash);
  box-shadow: var(--shadow-sm);
}

.library-source label {
  min-height: 100%;
  align-items: flex-start;
}

.library-source label > span {
  gap: 0.42rem;
}

.library-source-solo {
  justify-self: start;
  margin: 0 0.75rem 0.75rem;
  padding-block: 0.45rem;
}

.source-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.source-type {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.15rem 0.42rem;
  border: var(--border-w) solid var(--border-strong);
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.library-query {
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.library-output-studio {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
  gap: 0.85rem;
  align-items: stretch;
  padding: 1rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--im-gold-wash);
  box-shadow: var(--shadow);
}

.library-output-studio h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.library-output-studio .eyebrow {
  margin-bottom: 0.35rem;
}

.library-output-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.library-output-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 8.5rem;
  padding: 0.9rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.library-output-card:hover:not(:disabled) {
  transform: translate(2px, 2px);
  border-color: var(--accent-strong);
  background: var(--surface-low);
  box-shadow: var(--shadow-xs);
}

.library-output-card:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.library-output-card strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.04;
}

.library-output-card span {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.42;
}

.library-results {
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 820px) {
  .library-stats-grid,
  .library-workflows,
  .library-output-studio,
  .library-output-actions {
    grid-template-columns: 1fr;
  }

  .library-hero h3 {
    max-width: none;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  padding: 0.75rem clamp(1rem, 3vw, 2rem);
  background: var(--glass);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: var(--heading-weight);
  line-height: 1.15;
}

.brand p {
  margin: 0.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions .button {
  min-height: 2.15rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  text-decoration: none;
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 2.15rem;
  padding: 0.18rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-low);
}

.theme-option {
  min-height: 1.75rem;
  padding: 0.25rem 0.48rem;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 850;
  cursor: pointer;
}

.theme-option[aria-pressed="true"] {
  background: var(--surface-card);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}

.theme-option:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.room-look-pill {
  color: var(--room-look-pill-ink, var(--accent-strong));
  border-color: var(--room-look-border, var(--border));
  background: var(--room-look-pill, var(--accent-soft));
}

.source-live-pill {
  color: var(--text);
  border-color: var(--accent, var(--info));
  background: var(--accent-wash);
}

.source-preview-pill {
  color: var(--text);
  border-color: var(--warn);
  background: var(--warn-soft);
}

.source-ingest-pill {
  color: var(--info);
  border-color: var(--info);
  background: var(--info-soft);
}

.source-index-pill {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--surface);
}

.source-index-pending {
  color: var(--warn);
  border-color: var(--warn);
  background: var(--warn-soft);
}

.source-index-indexed {
  color: var(--info);
  border-color: var(--info);
  background: var(--info-soft);
}

.source-index-failed {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

.source-index-error {
  display: block;
  margin-top: 0.35rem;
  color: var(--danger);
}

.dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--warn);
}

.public-landing {
  width: min(82rem, 100%);
  margin: 0 auto;
  padding: 1.5rem;
}

.public-landing #landing-host-name,
.public-landing #auth-email {
  scroll-margin-top: 5.5rem;
}

.billing-return-notice {
  width: min(82rem, calc(100% - 3rem));
  margin: 1rem auto 0;
  padding: 1rem;
  scroll-margin-top: 5rem;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-card);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.public-landing > .billing-return-notice {
  width: 100%;
  margin: 0 0 1rem;
}

.room-shell > .billing-return-notice {
  width: calc(100% - 2rem);
  margin: 1rem auto 0;
}

.billing-return-success {
  border-color: var(--accent-strong);
}

.billing-return-cancelled {
  border-color: var(--warn);
}

.billing-return-notice h2 {
  margin: 0.1rem 0 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.billing-return-notice p:last-child {
  margin: 0.35rem 0 0;
  max-width: 62ch;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Focused single-action join surface for a clicked invite link: centered card,
   no marketing chrome, works the same on phone and desktop. */
.app-shell.invite-join-active .topbar {
  display: none;
}

.app-shell.invite-join-active main {
  padding: 0;
}

.invite-join {
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.invite-join-card {
  width: 100%;
  max-width: 28rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.invite-join-head {
  margin-bottom: 1.5rem;
}

.invite-join-card .eyebrow {
  margin: 0 0 0.35rem;
}

.invite-join-card h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  line-height: 1.1;
}

.invite-join-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.45;
}

.invite-join-form {
  margin-top: auto;
}

.invite-join-form .field {
  margin-bottom: 0.85rem;
}

.invite-join-form .field input {
  min-height: 3rem;
  font-size: 1.05rem;
}

.invite-join-card .button {
  width: 100%;
  min-height: 3rem;
  margin-top: 0.25rem;
  font-size: 1.05rem;
}

.invite-join-alt {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .invite-join {
    align-items: stretch;
    padding: 0;
  }

  .invite-join-card {
    max-width: none;
    min-height: 100dvh;
    justify-content: space-between;
    border: 0;
    border-radius: 0;
    background: var(--surface);
    padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom, 0rem));
  }

  .invite-join-head {
    margin-top: auto;
    margin-bottom: 0;
    padding-bottom: 1.5rem;
  }

  .invite-join-form {
    margin-top: 0;
    padding-top: 0.5rem;
  }
}

.landing-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.82fr);
  gap: 1.25rem;
  align-items: stretch;
  min-height: min(31rem, calc(100vh - 7rem));
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--surface-card) 0%, var(--surface-low) 100%);
  color: var(--text);
  box-shadow: var(--shadow);
}

.landing-hero::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(110deg, #000 0%, rgba(0, 0, 0, 0.34) 58%, transparent 100%);
}

.landing-hero > * {
  position: relative;
}

.landing-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-copy h2 {
  max-width: 13ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: 4.2rem;
  font-weight: var(--heading-weight);
  line-height: 1.14;
  letter-spacing: 0;
}

.landing-copy p:not(.eyebrow) {
  max-width: 43rem;
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.45;
}

.landing-copy .eyebrow {
  color: var(--signal);
}

.landing-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.landing-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.landing-path article {
  min-height: 7.25rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-card);
}

.landing-path strong {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.landing-path span {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.quick-room-card,
.join-card,
.landing-recent {
  display: grid;
  gap: 1rem;
  align-content: start;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
}

.quick-room-card {
  align-self: center;
  min-height: 27rem;
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

/* Collapsed instant-start card: name + topic + Start, with context/look/length
   tucked inside a progressive disclosure so the first action is one tap. */
.instant-start-card {
  align-self: start;
  min-height: 0;
  gap: 0.85rem;
}

.instant-start-form {
  gap: 0.85rem;
}

.instant-start-options {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-low);
}

.instant-start-options > summary {
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.instant-start-options > summary::-webkit-details-marker {
  display: none;
}

.instant-start-options-body {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 680px) {
  .instant-start-card,
  .instant-start-form {
    gap: 0.75rem;
  }

  .instant-start-card .button[type="submit"] {
    width: 100%;
    min-height: 3rem;
    font-size: 1.05rem;
  }
}

.room-code-sample {
  width: fit-content;
  padding: 0.35rem 0.5rem;
  background: var(--surface-strong);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.landing-utility,
.landing-proof {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.landing-proof {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-room-card h3,
.join-card h3,
.landing-recent h3,
.landing-proof h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.quick-room-card p,
.join-card p,
.landing-recent p,
.landing-proof p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.landing-recent {
  margin-top: 1rem;
}

.landing-proof article {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.landing-proof span {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-weight: 900;
}

.dot.ready {
  background: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: minmax(19rem, 24rem) minmax(0, 1fr);
  gap: 1rem;
  width: min(96rem, 100%);
  margin: 0 auto;
  padding: 1rem clamp(1rem, 3vw, 2rem) 2rem;
}

/* When a meeting is live, let the stage dominate and keep the active-room
   sidebar present but narrower so the room is the focus. */
.layout:has(.active-room-sidebar) {
  grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
}

.panel,
.stage,
.workspace-panel,
.video-tile,
.empty-state {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  align-self: start;
  overflow: hidden;
}

.workspace-home {
  min-width: 0;
}

.workspace-desk {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.workspace-desk > .section-head {
  margin-bottom: 0;
  padding: 0.2rem 0.15rem 0;
}

.workspace-desk > .section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: var(--heading-weight);
  line-height: 1.14;
  letter-spacing: 0;
}

.workspace-desk > .section-head p {
  max-width: 42rem;
  font-size: 1rem;
}

.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-card);
}

.dashboard-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
}

.dashboard-tab:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.dashboard-tab.active {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.dashboard-tab .tab-badge {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--accent-strong);
}

.dashboard-tab-panel[hidden] {
  display: none;
}

.dashboard-tab-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.dashboard-tab-panel .panel-section {
  padding: 0;
  border-bottom: 0;
}

.quick-access {
  display: grid;
  gap: 1rem;
  align-items: start;
}

@media (min-width: 980px) {
  .quick-access {
    grid-template-columns: 2fr 1fr;
  }

  .quick-access .on-deck-panel {
    grid-row: 1 / span 2;
  }
}

.dashboard-tab-panel .library-panel,
.dashboard-tab-panel .recording-handoff,
.dashboard-tab-panel .on-deck-panel,
.dashboard-tab-panel .usage-panel,
.dashboard-tab-panel .upgrade-nudge {
  margin-bottom: 0;
}

.panel-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.panel-section:last-child {
  border-bottom: 0;
}

.active-room-sidebar {
  display: grid;
}

.active-room-focus {
  display: grid;
  gap: 0.45rem;
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 64%),
    var(--surface-card);
}

.active-room-focus h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.active-room-focus p {
  margin: 0;
}

.panel-disclosure {
  padding: 0;
}

.panel-disclosure > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.65rem;
  align-items: center;
  min-height: 3.5rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.panel-disclosure > summary::-webkit-details-marker {
  display: none;
}

.panel-disclosure > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 900;
}

.panel-disclosure[open] > summary {
  border-bottom: 1px solid var(--border);
}

.panel-disclosure[open] > summary::after {
  content: "-";
}

.panel-disclosure > summary span {
  font-weight: 900;
}

.panel-disclosure > summary small {
  grid-column: 1;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.disclosure-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.sidebar-subsection {
  display: grid;
  gap: 0.75rem;
}

.sidebar-subsection + .sidebar-subsection {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.dashboard-disclosure-body > .panel-section {
  padding: 0;
  border-bottom: 0;
}

/* Dismissible post-sign-in SMS opt-in CTA, sits above the workspace layout. */
.sms-opt-in-prompt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.sms-opt-in-prompt strong {
  display: block;
}

.sms-opt-in-prompt p {
  margin: 0.15rem 0 0;
}

/* Consent sentence + Terms/Privacy links in the account-settings opt-in form. */
.sms-opt-in .sms-consent-text {
  font-size: 0.82rem;
  line-height: 1.4;
}

.sms-opt-in .sms-consent-links a {
  color: var(--accent-strong);
}

.panel h2,
.workspace-panel h2,
.stage h2 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.section-head p,
.muted {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.form-stack {
  display: grid;
  gap: 0.75rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

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

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  background: var(--surface-input);
  color: var(--text);
}

.field textarea {
  min-height: 5.2rem;
  resize: vertical;
}

.source-browser-tab-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--info-soft);
}

.source-browser-tab-cta strong,
.source-browser-tab-cta p {
  margin: 0;
}

.source-browser-tab-cta p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.button:focus-visible,
.icon-button:focus-visible,
.tab:focus-visible,
.thread-selector:focus-visible {
  outline: 3px solid rgba(29, 122, 89, 0.25);
  outline-offset: 2px;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.button-row.compact {
  gap: 0.35rem;
}

.button-row.compact .button {
  min-height: 2.2rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.55rem;
  padding: 0.55rem 0.85rem;
  border: 2px solid var(--border-strong);
  border-radius: 8px;
  background: var(--accent-strong);
  color: var(--im-cream);
  font-weight: var(--strong-weight);
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button.warn {
  background: var(--danger);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.stage {
  min-width: 0;
  overflow: hidden;
}

.stage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.room-title {
  min-width: 0;
}

.room-title h2 {
  font-size: 1.25rem;
}

.room-title p {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.room-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.room-meta-more {
  position: relative;
}

.room-meta-more-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.room-meta-more-summary::-webkit-details-marker {
  display: none;
}

.room-meta-more-summary::after {
  content: " ▾";
}

.room-meta-more[open] > .room-meta-more-summary::after {
  content: " ▴";
}

.room-meta-more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 12rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.room-meta-more-menu .button {
  width: 100%;
  justify-content: flex-start;
}

.room-look-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.room-look-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.room-look-choice:hover,
.room-look-choice[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

.room-look-choice:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.look-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--accent);
}

.room-look-choice[data-look="focus"] .look-swatch {
  background: #126c5c;
}

.room-look-choice[data-look="studio"] .look-swatch {
  background: #273a33;
}

.room-look-choice[data-look="retro"] .look-swatch {
  background: #7560a8;
}

.room-look-choice[data-look="campus"] .look-swatch {
  background: #7ca48d;
}

.room-look-choice[data-look="assembly"] .look-swatch {
  background: #987582;
}

.room-code {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.stage-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
  min-height: 38rem;
}

.video-zone {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  min-width: 0;
  padding: 1rem;
  background: var(--room-look-zone, #edf2ec);
}

.stage[data-room-look] {
  --room-look-zone: #edf2ec;
  --room-look-tile: linear-gradient(135deg, var(--accent-wash), rgba(15, 127, 93, 0.08)), var(--surface-raised);
  --room-look-avatar: var(--surface-strong);
  --room-look-avatar-ink: #ffffff;
  --room-look-pill: var(--accent-soft);
  --room-look-pill-ink: var(--accent-strong);
  --room-look-border: var(--border);
}

.stage.room-look-studio {
  --room-look-zone: #d9ddd6;
  --room-look-tile: linear-gradient(135deg, rgba(65, 81, 84, 0.12), rgba(117, 103, 72, 0.18)), var(--surface-raised);
  --room-look-avatar: #273a33;
  --room-look-avatar-ink: #f6f1e4;
  --room-look-pill: #d9cfb7;
  --room-look-pill-ink: #4d432c;
  --room-look-border: #8d8878;
}

.stage.room-look-retro {
  --room-look-zone: #d8d4e2;
  --room-look-tile: linear-gradient(135deg, rgba(31, 208, 176, 0.18), rgba(245, 178, 77, 0.2)), #ece8f3;
  --room-look-avatar: #241b38;
  --room-look-avatar-ink: #f6c75a;
  --room-look-pill: #f6dc86;
  --room-look-pill-ink: #2f2444;
  --room-look-border: #7560a8;
}

.stage.room-look-campus {
  --room-look-zone: #d8e5df;
  --room-look-tile: linear-gradient(135deg, rgba(31, 122, 85, 0.13), rgba(74, 116, 139, 0.13)), #edf2ec;
  --room-look-avatar: #214e43;
  --room-look-avatar-ink: #ffffff;
  --room-look-pill: #d3e7da;
  --room-look-pill-ink: #20503d;
  --room-look-border: #7ca48d;
}

.stage.room-look-assembly {
  --room-look-zone: #e2dfd9;
  --room-look-tile: linear-gradient(135deg, rgba(136, 49, 66, 0.13), rgba(117, 103, 72, 0.16)), #eeece5;
  --room-look-avatar: #6f2f42;
  --room-look-avatar-ink: #fff7e6;
  --room-look-pill: #ead8dc;
  --room-look-pill-ink: #642d3c;
  --room-look-border: #987582;
}

.context-panel,
.context-peek {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--accent-wash), transparent 60%),
    var(--surface-card);
}

.context-panel.context-previewing {
  background:
    linear-gradient(135deg, var(--warn-soft), transparent 62%),
    var(--surface-card);
}

.context-panel h3,
.context-panel p,
.context-peek strong,
.context-peek span {
  margin: 0;
}

.context-panel h3 {
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.context-panel p:not(.eyebrow),
.context-peek span {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.context-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.5rem;
flex-wrap: wrap;
}

.context-preview {
display: grid;
gap: 0.45rem;
min-width: 0;
max-width: 100%;
}

.context-preview-frame {
display: block;
box-sizing: border-box;
width: 100%;
max-width: 100%;
min-width: 0;
min-height: clamp(12rem, 36vh, 24rem);
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
}

.context-preview-link {
min-height: clamp(12rem, 36vh, 24rem);
align-content: center;
justify-items: start;
gap: 0.75rem;
padding: clamp(1rem, 4vw, 1.45rem);
border: 1px solid var(--border);
border-radius: 8px;
background:
  linear-gradient(135deg, rgba(201, 81, 43, 0.12), transparent 62%),
  var(--surface-low);
}

.context-preview-link h4 {
margin: 0;
font-size: clamp(1.15rem, 4vw, 1.75rem);
line-height: 1.1;
letter-spacing: 0;
}

.context-preview-link p {
margin: 0;
overflow-wrap: anywhere;
}

.context-preview-host {
font-weight: 800;
color: var(--accent-strong);
}

.context-preview-url {
font-family: var(--font-mono);
font-size: 0.8rem;
color: var(--text-muted);
}

.context-preview-note,
.context-preview-file {
padding: 0.75rem;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface-low);
}

.context-preview-note p:not(.eyebrow),
.context-preview-file p:not(.eyebrow) {
margin: 0;
color: var(--text);
overflow-wrap: anywhere;
white-space: pre-wrap;
}

.admission-panel,
.admission-status,
.share-request-panel,
.source-request-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--info-soft);
}

.admission-panel,
.share-request-panel,
.source-request-panel {
  margin: 0 1rem 1rem;
}

.admission-panel h3,
.admission-panel p,
.admission-status p,
.share-request-panel h3,
.share-request-panel p,
.source-request-panel h3,
.source-request-panel p {
  margin: 0;
}
.admission-panel h3,
.admission-panel span {
  color: var(--text);
}

.admission-status {
  margin-top: 0.8rem;
}

.admission-status {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.admission-list,
.source-request-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admission-list li,
.source-request-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-card);
}

.admission-list span,
.admission-status p,
.source-request-list span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.source-request-list strong,
.source-request-list span {
  overflow-wrap: anywhere;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.livekit-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.livekit-media video,
.livekit-media audio {
  width: 100%;
  min-height: 12rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #101915;
}

.app-shell.in-room .livekit-media > audio {
  display: none;
}

/* When someone is sharing their screen, give it the full video-zone width and
   a taller aspect ratio so the shared content is readable and in focus. */
.livekit-media:has(video[data-track-source="screen_share"]) {
  grid-template-columns: 1fr;
}

.livekit-media video[data-track-source="screen_share"] {
  grid-column: 1 / -1;
  min-height: 24rem;
  max-height: 70vh;
  object-fit: contain;
}

.video-tile {
  display: grid;
  align-content: space-between;
  min-height: 13rem;
  aspect-ratio: 16 / 10;
  padding: 0.85rem;
  background:
    linear-gradient(135deg, var(--accent-wash), rgba(15, 127, 93, 0.08)),
    var(--surface-raised);
  box-shadow: none;
}

.stage[data-room-look] .video-tile:not(.off):not(.hidden-feed) {
  border-color: var(--room-look-border);
  background: var(--room-look-tile);
}

.video-tile.off {
  background: var(--surface-low);
}

.video-tile.hidden-feed {
  align-content: center;
  min-height: 7.5rem;
  aspect-ratio: auto;
  border: 1px dashed var(--border);
  background: var(--surface-low);
}

.video-tile.hidden-feed p {
  margin: 0;
  text-align: center;
}

.avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: auto;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: var(--room-look-avatar, var(--surface-strong));
  color: var(--room-look-avatar-ink, #ffffff);
  font-size: 1.45rem;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(10, 18, 20, 0.34);
}

.stage.room-look-retro .video-zone {
  background-image:
    linear-gradient(rgba(36, 27, 56, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 27, 56, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

.stage.room-look-retro .avatar {
  border-radius: 6px;
  font-family: var(--font-mono);
  box-shadow:
    inset 0 0 0 2px rgba(246, 199, 90, 0.8),
    4px 4px 0 rgba(31, 208, 176, 0.38);
}

.stage.room-look-studio .avatar {
  box-shadow: inset 0 0 0 1px rgba(246, 241, 228, 0.35);
}

.participant-rail {
  display: none;
}

.participant-bubble {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.15rem;
  height: 3.15rem;
  border: 1px solid var(--room-look-border, var(--border));
  border-radius: 999px;
  padding: 0;
  background: var(--room-look-avatar, var(--surface-strong));
  color: var(--room-look-avatar-ink, #ffffff);
  appearance: none;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 0.25rem 0.8rem rgba(17, 24, 39, 0.12);
  text-shadow: 0 1px 2px rgba(10, 18, 20, 0.34);
}

.avatar[data-avatar-token="grid"],
.participant-bubble[data-avatar-token="grid"] {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    var(--room-look-avatar, var(--surface-strong));
  background-size: 0.7rem 0.7rem, 0.7rem 0.7rem, auto;
}

.avatar[data-avatar-token="sun"],
.participant-bubble[data-avatar-token="sun"] {
  background:
    radial-gradient(circle at 31% 29%, rgba(246, 199, 90, 0.95) 0 20%, transparent 21%),
    radial-gradient(circle at 69% 68%, rgba(255, 255, 255, 0.2) 0 15%, transparent 16%),
    var(--room-look-avatar, var(--surface-strong));
}

.avatar[data-avatar-token="wave"],
.participant-bubble[data-avatar-token="wave"] {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.22) 0 0.14rem, transparent 0.14rem 0.48rem),
    linear-gradient(135deg, rgba(31, 208, 176, 0.42), rgba(74, 116, 139, 0.26)),
    var(--room-look-avatar, var(--surface-strong));
}

.avatar[data-avatar-token="orbit"],
.participant-bubble[data-avatar-token="orbit"] {
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 255, 255, 0.72) 0 9%, transparent 10%),
    radial-gradient(circle at 28% 72%, rgba(31, 208, 176, 0.46) 0 15%, transparent 16%),
    conic-gradient(from 35deg, transparent 0 34%, rgba(255, 255, 255, 0.16) 35% 40%, transparent 41% 100%),
    var(--room-look-avatar, var(--surface-strong));
}

.avatar[data-avatar-token="mint"],
.participant-bubble[data-avatar-token="mint"] {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28) 0 28%, transparent 29%),
    linear-gradient(315deg, rgba(115, 208, 179, 0.42) 0 34%, transparent 35%),
    var(--room-look-avatar, var(--surface-strong));
}

.avatar[data-avatar-token="ember"],
.participant-bubble[data-avatar-token="ember"] {
  background:
    radial-gradient(circle at 68% 33%, rgba(245, 178, 77, 0.84) 0 16%, transparent 17%),
    linear-gradient(135deg, rgba(136, 49, 66, 0.48), rgba(117, 103, 72, 0.18)),
    var(--room-look-avatar, var(--surface-strong));
}

button.participant-bubble {
  cursor: pointer;
}

button.participant-bubble:hover {
  border-color: var(--accent);
}

.participant-bubble:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.participant-bubble.self {
  box-shadow:
    0 0 0 2px var(--room-look-pill, var(--accent-soft)),
    0 0.25rem 0.8rem rgba(17, 24, 39, 0.12);
}

.participant-bubble.hidden-feed {
  border-style: dashed;
  background: var(--surface-low);
  color: var(--text-muted);
  opacity: 0.82;
}

.bubble-initials {
  line-height: 1;
}

.bubble-signal {
  position: absolute;
  right: -0.2rem;
  bottom: -0.2rem;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--room-look-pill, var(--accent-soft));
  color: var(--room-look-pill-ink, var(--accent-strong));
  font-size: 0.64rem;
  font-weight: 900;
}

.bubble-signal.off {
  background: var(--danger-soft);
  color: var(--danger);
}

.stage.room-look-retro .participant-bubble {
  border-radius: 6px;
  font-family: var(--font-mono);
  box-shadow:
    inset 0 0 0 2px rgba(246, 199, 90, 0.72),
    3px 3px 0 rgba(31, 208, 176, 0.38);
}

.tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.video-tile:not(.hidden-feed) .tile-footer {
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(246, 236, 217, 0.18);
  border-radius: 10px;
  background: rgba(33, 22, 16, 0.74);
  color: var(--mr-text, #f6ecd9);
  backdrop-filter: blur(6px);
}

.tile-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.tile-flags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.tile-permissions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.tile-permissions .button {
  min-height: 2rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}

.tile-action {
  min-width: 2rem;
  min-height: 2rem;
}

.button.tile-action {
  min-height: 2rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
}

.flag {
  display: inline-grid;
  place-items: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 900;
}

.flag.off {
  background: var(--danger-soft);
  color: var(--danger);
}

.control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-low);
}

.room-control-primary {
  justify-content: center;
}

.room-control-more {
  position: relative;
}

.room-control-more > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.room-control-more > summary::-webkit-details-marker {
  display: none;
}

.room-control-more > summary::after {
  content: " ▾";
}

.room-control-more[open] > summary::after {
  content: " ▴";
}

.room-control-more-menu {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 13rem;
  max-height: 70vh;
  overflow: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.room-control-more-menu .button {
  width: 100%;
  justify-content: flex-start;
}

.room-control-participant-actions {
  display: none;
  width: 100%;
}

.room-control-participant-actions > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.room-control-participant-actions > summary::-webkit-details-marker {
  display: none;
}

.room-control-participant-actions > summary::after {
  content: " +";
  margin-left: auto;
}

.room-control-participant-actions[open] > summary::after {
  content: " -";
}

.room-participant-action-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.room-participant-action-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-low);
  color: var(--text);
}

.room-participant-action-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
  font-size: 0.84rem;
}

.room-participant-action-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-participant-action-meta span {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.room-participant-action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
  gap: 0.35rem;
}

.room-participant-action-button {
  justify-content: center;
  min-height: 2rem;
  padding: 0.28rem 0.45rem;
  font-size: 0.74rem;
}

.workspace {
 display: grid;
 grid-template-rows: auto auto 1fr;
 min-width: 0;
 border-left: 1px solid var(--border);
 background: var(--surface);
}

.workspace-collapse-button {
  display: none;
}

.meet-assistant-panel,
.room-invite-panel {
 display: grid;
 gap: 0.65rem;
 padding: 0.85rem 1rem;
 border-bottom: 1px solid var(--border);
 background: var(--surface-low);
}

.room-invite-panel .eyebrow {
 margin: 0;
}

.room-invite-panel .field {
  margin: 0;
}

.room-invite-panel .field label {
  color: var(--text);
}

.meet-assistant-copy {
 display: grid;
 gap: 0.18rem;
}

.meet-assistant-copy h3,
.meet-assistant-copy p {
 margin: 0;
}

.meet-assistant-copy h3 {
 font-family: var(--font-display);
 font-size: 1rem;
 line-height: 1.15;
}

.meet-assistant-copy p:not(.eyebrow) {
 color: var(--text-muted);
 font-size: 0.8rem;
 line-height: 1.35;
}

.ai-limited-notice {
 color: var(--text-muted);
 font-size: 0.8rem;
 line-height: 1.35;
}

.meet-prompt-row {
 display: grid;
 grid-template-columns: repeat(3, minmax(0, 1fr));
 gap: 0.45rem;
}

.meet-prompt-button {
 min-height: 2.2rem;
 padding: 0.45rem 0.55rem;
 font-size: 0.8rem;
 line-height: 1.15;
 white-space: normal;
}

.tabs {
 display: grid;
 grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

.tab {
  min-height: 3rem;
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 800;
  cursor: pointer;
}

.tab:last-child {
  border-right: 0;
}

.tab[aria-selected="true"] {
  background: var(--surface-alt);
  color: var(--text);
}

.workspace-content {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 1rem;
  overflow: auto;
}

.workspace-panel-head {
  display: grid;
  gap: 0.15rem;
}

.workspace-panel-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-card);
}

.dashboard-list .list-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.dashboard-list .summary-block {
  grid-column: 1 / -1;
}

.item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.usage-panel {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.section-head.compact {
  margin-bottom: 0;
}

.usage-panel h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.25;
}

.usage-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.usage-breakdown {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.25rem;
}

.usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.5rem;
  align-items: center;
  gap: 0.65rem;
}

.usage-breakdown .usage-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.usage-row div:first-child {
  display: grid;
  gap: 0.1rem;
}

.usage-meter {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe5df;
}

.usage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--surface-strong);
}

.upgrade-nudge {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--info-soft);
}

.upgrade-nudge.warn {
  background: var(--warn-soft);
}

.upgrade-nudge.danger {
  background: var(--danger-soft);
}

.upgrade-nudge strong,
.upgrade-nudge p {
  margin: 0;
}

.upgrade-nudge p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.library-panel {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--im-paper-2);
  box-shadow: var(--shadow);
}

.library-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.library-hero h3 {
  margin: 0.1rem 0 0.35rem;
  font-size: 1.8rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.library-hero p {
  max-width: 40rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.library-stat {
  display: grid;
  place-items: center;
  min-width: 5.25rem;
  padding: 0.75rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.library-stat strong {
  font-size: 2rem;
  line-height: 1;
}

.library-stat span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.library-list {
  display: grid;
  gap: 0.55rem;
  max-height: 23rem;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.library-source {
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
}

.library-source.selected {
  border-color: var(--surface-strong);
  background: var(--surface-raised);
}

.library-source label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.75rem;
  cursor: pointer;
}

.library-source input {
  margin-top: 0.2rem;
}

.library-source span {
  display: grid;
  gap: 0.15rem;
}

.library-source small {
  color: var(--text-muted);
  font-weight: 800;
  text-transform: uppercase;
}

.library-source em {
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.35;
}

.library-empty {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  background: var(--surface-low);
}

.library-empty p {
  margin: 0;
  color: var(--text-muted);
}

.library-query {
  padding-top: 0.2rem;
}

.library-results {
  display: grid;
  gap: 0.6rem;
}

.recording-handoff {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--im-teal-wash);
  box-shadow: var(--shadow-sm);
}

.recording-handoff h3 {
  margin: 0.1rem 0 0.25rem;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: 0;
}

.recording-handoff p {
  margin: 0;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  color: var(--text-muted);
  font-weight: 800;
}

.collection-strip {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface-low);
}

.collection-strip > div:first-child {
  display: grid;
  gap: 0.15rem;
}

.collection-strip span {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.collection-strip.empty {
  border-style: dashed;
}

.collection-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.collection-chip {
  display: inline-flex;
  align-items: stretch;
}

.collection-chip .button {
  border-right: 0;
}

.collection-chip .icon-button {
  width: 2.25rem;
  height: auto;
  border-radius: 0;
  border-color: var(--border);
  background: var(--surface-input);
  color: var(--text-muted);
}

.on-deck-panel {
  container-type: inline-size;
  container-name: on-deck;
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
  border: 2px solid var(--im-ink);
  border-radius: 20px;
  background:
    linear-gradient(135deg, var(--im-gold-wash), transparent 64%),
    var(--im-cream);
  box-shadow: var(--shadow);
}

.dashboard-tab-panel .on-deck-panel {
  padding: 1rem;
}

.on-deck-panel .section-head {
  margin-bottom: 0;
}

.on-deck-panel h2 {
  margin: 0.1rem 0 0.3rem;
}

.on-deck-panel p {
  margin: 0;
}

.on-deck-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: start;
}

@container on-deck (min-width: 22rem) {
  .on-deck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container on-deck (min-width: 44rem) {
  .on-deck-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container on-deck (min-width: 66rem) {
  .on-deck-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.on-deck-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  padding: 1rem;
  border: 2px solid var(--im-ink);
  border-radius: 16px;
  background: var(--im-paper);
  box-shadow: 4px 4px 0 var(--im-ink);
}

.on-deck-card > div:first-child {
  display: grid;
  gap: 0.35rem;
}

.on-deck-card strong {
  display: block;
  font-size: 1.2rem;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.on-deck-card p,
.on-deck-empty span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.on-deck-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--im-terracotta-deep);
}

.on-deck-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.on-deck-card-footer .room-code {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.on-deck-empty {
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 2px dashed var(--im-ink);
  border-radius: 16px;
  background: var(--im-paper);
}

.summary-block {
  display: grid;
  gap: 0.3rem;
  width: 100%;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.list-item strong {
  font-size: 0.92rem;
}

.list-item span,
.list-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.action-item {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.chat-list {
  align-content: start;
}

.chat-message {
  border-left: 4px solid var(--border-strong);
}

.chat-message.assistant {
  border-left-color: var(--accent);
  background: var(--accent-soft);
}

.chat-message.system {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.thread-panel {
  display: grid;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-low);
}

.thread-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}

.thread-selector {
  display: grid;
  gap: 0.15rem;
  min-height: 3.4rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.thread-selector[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.thread-selector span,
.thread-head p {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.thread-composer {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.thread-member-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.thread-member-list legend {
  padding: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.thread-members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
}

.thread-section {
  display: grid;
  gap: 0.65rem;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 28rem;
  padding: 2rem;
  text-align: center;
  box-shadow: none;
}

.empty-state h2 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
}

.empty-state p {
  max-width: 36rem;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-state {
  position: relative;
  overflow: hidden;
  text-align: left;
}

.hero-state::after {
  content: "";
  position: absolute;
  right: -7rem;
  bottom: -7rem;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: var(--accent-soft);
}

.hero-state > div {
  position: relative;
  z-index: 1;
}

.hero-actions {
  margin-top: 1.2rem;
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--accent-strong);
  color: var(--im-cream);
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

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

.legal-shell {
  width: min(84rem, 100%);
  margin: 0 auto;
  padding: 1.25rem clamp(1rem, 3vw, 2rem) 3rem;
  overflow-x: hidden;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}

.legal-brand {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: var(--heading-weight);
  text-decoration: none;
}

.legal-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--im-ink);
  text-transform: lowercase;
}

.legal-brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
}

.legal-nav {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legal-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: var(--strong-weight);
  text-decoration: none;
}

.legal-hero,
.legal-document,
.checkout-panel {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: var(--border-w) solid var(--im-ink);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  box-shadow: var(--shadow);
}

.legal-hero h1,
.legal-document h1 {
  margin: 0;
  max-width: 13ch;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5vw, 3.35rem);
  font-weight: var(--heading-weight);
  line-height: 1.16;
  letter-spacing: 0;
}

.legal-hero p,
.legal-document p,
.pricing-card p {
  max-width: 72ch;
  color: var(--text-muted);
  line-height: 1.55;
}

.legal-document h2,
.checkout-panel h2 {
  margin: 1.4rem 0 0.35rem;
  font-size: 1rem;
}

.sms-opt-in-shell {
  width: min(48rem, 100%);
}

.sms-opt-in-hero h1 {
  max-width: 12ch;
}

.sms-consent-card {
  border: 2px solid var(--im-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.sms-consent-card h2:first-child {
  margin-top: 0;
}

.sms-consent-card .list {
  margin: 1rem 0;
}

.consent-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  max-width: 64ch;
  color: var(--text-muted);
  line-height: 1.45;
}

.consent-check input[type="checkbox"] {
  width: 1.1rem;
  min-height: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  margin-top: 0.2rem;
  accent-color: var(--im-terracotta);
}

.consent-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sms-optin-footer {
  margin-top: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.pricing-grid.three {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr) minmax(0, 1fr);
}

.pricing-grid.five {
  grid-template-columns: repeat(5, minmax(11rem, 1fr));
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.pricing-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-width: 0;
  min-height: 15rem;
  padding: 1rem;
  border: var(--border-w) solid var(--im-ink);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  overflow-wrap: break-word;
}

.pricing-card.featured {
  border-color: var(--im-terracotta);
  background: var(--im-gold-wash);
  box-shadow: var(--shadow);
}

.pricing-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: var(--heading-weight);
  line-height: 1.22;
}

.download-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  min-width: 0;
  min-height: 18rem;
  padding: 1rem;
  border: var(--border-w) solid var(--im-ink);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  overflow-wrap: break-word;
}

.download-card > *,
.download-capabilities > * {
  min-width: 0;
  max-width: 100%;
}

.download-card h2 {
  margin: 0;
  font-size: 1.05rem;
}

.download-card p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.download-card p,
.download-card li,
.download-card code,
.download-card figcaption {
  overflow-wrap: anywhere;
}

.windows-download {
  grid-column: 1 / -1;
}

.windows-download .download-capabilities {
  max-width: 56rem;
}

.download-capabilities {
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
}

.download-capabilities h3 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.download-capabilities ol,
.download-capabilities ul {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 0.2rem;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.qr-slot {
  display: grid;
  gap: 0.45rem;
  place-items: center;
  width: 8.75rem;
  margin: 0;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-card);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.qr-slot img {
  display: block;
  width: 7.5rem;
  height: 7.5rem;
}

.qr-slot figcaption {
  line-height: 1.25;
}

.price {
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(1.42rem, 2vw, 1.72rem);
  font-weight: var(--heading-weight);
  line-height: 1.18;
}

.price span {
  display: inline-block;
  margin-left: 0.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-weight: 800;
}

.pricing-features {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.seat-selector {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-low);
}

.seat-selector button {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
}

.seat-selector button:disabled {
  opacity: 0.4;
}

.seat-note {
  margin: -0.35rem 0 0;
  font-size: 0.82rem;
}

.team-seat-entry input {
  max-width: 10rem;
}

.checkout-seat-selector {
  justify-content: start;
  width: fit-content;
  min-width: min(100%, 18rem);
  background: var(--surface);
}

.checkout-seat-selector input {
  max-width: 5.25rem;
  min-height: 2rem;
  padding: 0.3rem 0.45rem;
  text-align: center;
}

.feature-matrix {
  display: grid;
  gap: 0;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.feature-matrix h2 {
  margin: 0;
  padding: 1rem;
  font-size: 1rem;
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1.5fr) repeat(5, minmax(5rem, 1fr));
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.feature-row.header {
  background: var(--surface-alt);
}

.feature-row span {
  color: var(--text-muted);
}

@media (max-width: 980px) {
  .layout,
  .stage-body,
  .landing-hero,
  .landing-utility,
  .landing-proof {
    grid-template-columns: 1fr;
  }

  /* Room-first on narrow screens: the meeting stage renders second in the
     DOM (after the active-room sidebar) but must appear first. Force the
     active-room layout back to a single column (overriding the desktop
     :has() override above) and reorder so the stage is the first thing
     below the header. */
  .layout:has(.active-room-sidebar) {
    grid-template-columns: 1fr;
  }

  .layout:has(.active-room-sidebar) .stage {
    order: 1;
  }

  .layout:has(.active-room-sidebar) .active-room-sidebar {
    order: 2;
  }

  .landing-hero {
    min-height: 0;
  }

  .landing-copy h2 {
    max-width: 11ch;
  }

  .workspace {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

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

@media (max-width: 680px) {
  .topbar,
  .stage-header,
  .context-panel,
  .context-peek,
  .control-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .context-panel,
  .context-peek {
    grid-template-columns: 1fr;
  }

  .admission-status,
  .admission-list li,
  .source-request-list li {
    grid-template-columns: 1fr;
  }

  .video-zone {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .video-zone > :not(.participant-rail) {
    grid-column: 1;
    min-width: 0;
  }

  .participant-rail {
    position: sticky;
    top: 0.75rem;
    z-index: 4;
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: calc(100vh - 6rem);
    padding: 0.25rem;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
  }

  .participant-bubble {
    width: 3rem;
    height: 3rem;
    font-size: 0.95rem;
  }

  .video-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
    max-width: 100%;
    overflow-x: hidden;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .video-grid .video-tile {
    min-width: 0;
    width: 100%;
    min-height: 9.5rem;
    aspect-ratio: 4 / 3;
    scroll-snap-align: none;
  }

  .video-grid .video-tile.hidden-feed {
    min-height: 7rem;
  }

  .video-grid .avatar {
    width: 3.1rem;
    height: 3.1rem;
    font-size: 1.1rem;
  }

  .status-strip,
  .top-actions,
  .room-meta {
    justify-content: flex-start;
  }

  .status-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  .pricing-grid.three,
  .pricing-grid.five,
  .feature-row {
    grid-template-columns: 1fr;
  }

  .feature-row.header {
    display: none;
  }

  .status-strip .status-pill {
    justify-content: center;
    min-width: 0;
    width: 100%;
  }

  .room-meta {
    width: 100%;
    min-width: 0;
  }

  .room-meta .status-pill {
    flex-basis: 100%;
    width: fit-content;
  }

  .layout {
    padding: 0.75rem;
  }

  .public-landing {
    padding: 0.75rem;
  }

  .public-landing #landing-host-name,
  .public-landing #auth-email {
    scroll-margin-top: 12rem;
  }

  .billing-return-notice,
  .room-shell > .billing-return-notice {
    width: calc(100% - 1.5rem);
    align-items: stretch;
    flex-direction: column;
  }

  .public-landing > .billing-return-notice {
    width: 100%;
  }

  .landing-hero {
    padding: 1rem;
  }

  .landing-copy h2 {
    font-size: 2.65rem;
  }

  .video-grid,
  .library-hero,
  .dashboard-list .list-item,
  .pricing-grid,
  .download-grid,
  .split-fields {
    grid-template-columns: 1fr;
  }

  .item-actions {
    justify-content: flex-start;
  }

  .windows-download {
    grid-column: auto;
  }

  .legal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-hero,
  .legal-document,
  .checkout-panel {
    padding: 1rem;
  }

  .legal-hero h1,
  .legal-document h1 {
    max-width: 11ch;
    font-size: clamp(2.1rem, 10vw, 2.75rem);
  }

  .legal-nav {
    justify-content: flex-start;
  }

  .tile-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .tile-flags {
    flex-wrap: wrap;
    max-width: 100%;
  }

  .panel-section,
  .video-zone,
  .workspace-content {
    padding: 0.75rem;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .tab {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .tab:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 420px) {
  .status-strip {
    grid-template-columns: 1fr;
  }
}

/* Source desk overrides: keep this block after the original library rules so it wins the cascade. */
.library-panel {
  position: relative;
  overflow: hidden;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--im-paper-2);
  box-shadow: var(--shadow);
}

.library-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, var(--grid-ink) 1px, transparent 1px),
    linear-gradient(180deg, var(--grid-ink) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000, transparent 72%);
}

.library-panel > * {
  position: relative;
}

.library-hero {
  align-items: stretch;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.library-hero h3 {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: 0;
}

.library-hero p:not(.eyebrow) {
  max-width: 52rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.library-hero .eyebrow {
  color: var(--accent);
}

.library-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(6.75rem, 1fr));
  gap: 0.6rem;
  align-self: stretch;
  min-width: min(100%, 24rem);
}

.library-stats-grid .library-stat {
  min-height: 100%;
  border-color: var(--border);
  background: var(--surface-card);
  color: var(--text);
}

.library-stats-grid .library-stat span {
  color: var(--text-muted);
}

.library-workflows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.library-workflow-card {
  min-height: 7.25rem;
  padding: 0.95rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.library-workflow-card strong {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.library-workflow-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.library-toolbar {
  border-color: var(--border);
  background: var(--surface-low);
}

.library-list {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: stretch;
}

.library-source {
  min-height: 9rem;
  border-color: var(--border);
  background: var(--surface-card);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.library-source:hover {
  transform: translateY(-1px);
  border-color: var(--surface-strong);
  background: var(--surface-raised);
}

.library-source.selected {
  border-color: var(--accent-strong);
  background: var(--im-gold-wash);
  box-shadow: var(--shadow-sm);
}

.library-source label {
  min-height: 100%;
  align-items: flex-start;
}

.library-source label > span {
  gap: 0.42rem;
}

.source-kicker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.source-type {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.15rem 0.42rem;
  border: var(--border-w) solid var(--border-strong);
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.library-query {
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.library-results {
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 820px) {
  .landing-path,
  .library-stats-grid,
  .library-source-map,
  .library-workflows {
    grid-template-columns: 1fr;
  }

  .library-hero h3 {
    max-width: none;
  }
}

.library-note-composer {
  margin-top: 0.85rem;
  padding: 1rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.library-note-composer h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.05;
}

.library-note-composer .eyebrow {
  margin-bottom: 0.25rem;
}

.recording-upload-options {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.recording-upload-options p {
  margin: 0;
}

.team-seat-manager {
  margin-top: 1rem;
  padding: 0.9rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.team-seat-manager h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.team-seat-stepper {
  display: grid;
  grid-template-columns: 2.35rem minmax(4.5rem, 7rem) 2.35rem;
  gap: 0.35rem;
  align-items: center;
}

.team-seat-stepper button {
  min-height: 2.65rem;
  border: var(--border-w) solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-input);
  color: var(--accent-strong);
  font-weight: 900;
  cursor: pointer;
}

.team-seat-stepper button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.selected-source-strip {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.9rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-low);
  box-shadow: var(--shadow-sm);
}

.selected-source-strip.empty {
  background: var(--surface-card);
}

.selected-source-strip strong {
  display: block;
}

.selected-source-strip span:not(.source-type) {
  display: block;
  margin-top: 0.2rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.selected-source-strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-source-strip li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.45rem 0.55rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-card);
}

.selected-source-strip li strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.source-overflow {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .selected-source-strip li {
    width: 100%;
  }
}

/* Adaptive tone layer: InstantMeet paper/ink system, with the same tokens shifting in dark mode. */
.topbar {
  background: var(--glass);
}

.landing-hero,
.library-hero {
  background: var(--surface-card);
}

.landing-hero::before,
.library-panel::before {
  background:
    linear-gradient(90deg, var(--grid-ink) 1px, transparent 1px),
    linear-gradient(180deg, var(--grid-ink) 1px, transparent 1px);
}

.landing-copy h2 {
  font-size: clamp(2.45rem, 5vw, 3.15rem);
  line-height: 1.14;
}

.workspace-desk > .section-head h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.05rem);
  line-height: 1.14;
}

.library-hero h3 {
  max-width: 20ch;
  font-size: clamp(1.6rem, 2.5vw, 1.9rem);
  line-height: 1.12;
}

.library-stat strong,
.library-source-map-card strong {
  line-height: 1.12;
}

.legal-hero h1,
.legal-document h1 {
  font-size: clamp(1.95rem, 4vw, 2.65rem);
  line-height: 1.16;
}

.quick-room-card,
.join-card,
.landing-recent,
.landing-proof article,
.panel,
.stage,
.workspace-panel,
.empty-state,
.workspace-desk,
.feature-matrix {
  background: var(--surface);
  color: var(--text);
}

.legal-hero,
.legal-document,
.checkout-panel,
.download-card,
.pricing-card {
  background: var(--surface-card);
  color: var(--text);
}

.landing-path article,
.library-source-map-card,
.library-workflow-card,
.library-stats-grid .library-stat,
.list-item,
.library-note-composer,
.recording-upload-options,
.team-seat-manager,
.selected-source-strip li,
.qr-slot {
  background: var(--surface-card);
  color: var(--text);
}

.field input,
.field select,
.field textarea,
.team-seat-stepper button,
.collection-chip .icon-button,
.seat-selector button {
  background: var(--surface-input);
  color: var(--text);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
}

.library-toolbar,
.library-source,
.library-query,
.library-results,
.collection-strip,
.library-empty,
.recording-handoff,
.control-bar,
.seat-selector,
.checkout-seat-selector,
.selected-source-strip.empty {
  background: var(--surface-low);
  color: var(--text);
}

.library-source:hover,
.library-output-card:hover:not(:disabled) {
  background: var(--surface-alt);
}

.library-source.selected {
  background: var(--im-gold-wash);
}

.pricing-card.featured {
  background: var(--im-gold-wash);
}

.library-output-studio {
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--im-gold-wash);
  box-shadow: var(--shadow);
}

.library-output-card {
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
}

.workspace,
.tab {
  background: var(--surface);
}

.video-zone {
  background: var(--surface-low);
}

.video-tile,
.video-tile.off {
  background:
    linear-gradient(135deg, var(--accent-wash), transparent 65%),
    var(--surface-raised);
}

.usage-meter {
  background: var(--surface-alt);
}

.button {
  background: var(--accent-strong);
}

.button.secondary,
.icon-button {
  background: var(--surface);
  color: var(--text);
}

.button:focus-visible,
.icon-button:focus-visible,
.tab:focus-visible,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline-color: var(--focus-ring);
}

@media (prefers-color-scheme: dark) {
  .button,
  .room-code-sample,
  .avatar,
  .toast {
    color: #ffffff;
  }

  .legal-nav a,
  .pricing-features,
  .feature-row span,
  .download-card p,
  .legal-hero p,
  .legal-document p,
  .pricing-card p,
  .list-item span,
  .list-item p,
  .muted,
  .section-head p {
    color: var(--text-muted);
  }
}

/* Personal room + speed-dial favorites panels. Reuse the panel-section, list,
   room-meta, and button-row.compact primitives; only left-align the room-meta
   (the base style is right-justified for the stage header) and add breathing
   room between the stacked controls. */
.personal-room .room-meta,
.favorites .room-meta {
  justify-content: flex-start;
  margin: 0.4rem 0 0.75rem;
}

.personal-room .form-stack,
.favorites .form-stack {
  margin-top: 0.75rem;
}

.favorites .list-item {
  align-items: center;
}

/* Speed dial: pinned items read as starred + lightly emphasized; the star
   toggle uses the accent when active. The manual add form is a collapsed
   disclosure so the auto-surfaced list leads. */
.speed-dial .list-item.pinned {
  border-color: var(--accent, var(--info));
}

.icon-button.pinned {
  color: var(--accent, var(--info));
}

.speed-dial-add {
  margin-top: 0.75rem;
}

.speed-dial-add > summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  list-style: revert;
}

/* In-room shared sources. The active source tab is highlighted with the same
   accent the status pills use. */
.source-list .list-item.source-active {
  border-color: var(--accent, var(--info));
  box-shadow: inset 0 0 0 1px var(--accent, var(--info));
}

.source-list .list-item.source-preview-active {
  border-color: var(--warn);
  background: var(--warn-soft);
}

/* Context-first room shell: dark-warm screening room from the InstantMeet meeting-room kit. */
.stage[data-room-shell="context-first"] {
  --mr-bg: #211610;
  --mr-panel: #2C1E14;
  --mr-panel-2: #382517;
  --mr-line: rgba(251, 244, 228, 0.16);
  --mr-line-strong: rgba(251, 244, 228, 0.32);
  --mr-text: #F6ECD9;
  --mr-text-2: #C9B79B;
  --mr-text-3: #8E7B61;
  color: var(--mr-text);
  background: var(--mr-bg);
  border-color: var(--mr-line-strong);
  border-radius: 20px;
  box-shadow: none;
}

.stage[data-room-shell="context-first"] .stage-header {
  align-items: center;
  border-bottom-color: var(--mr-line);
  background: var(--mr-bg);
}

.stage[data-room-shell="context-first"] .room-meta-more-menu {
  border-color: var(--mr-line-strong);
  background: var(--mr-panel);
}

.stage[data-room-shell="context-first"] .room-title h2 {
  color: var(--mr-text);
  font-family: var(--font-display);
  font-weight: 900;
}

.stage[data-room-shell="context-first"] .room-title p,
.stage[data-room-shell="context-first"] .muted {
  color: var(--mr-text-2);
}

.stage[data-room-shell="context-first"] .stage-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 23rem);
  gap: 0.85rem;
  min-height: 38rem;
  padding: 0.85rem;
  background: var(--mr-bg);
}

/* "Hide context" collapses the shared-context panel to a slim peek strip. When
   collapsed, stop reserving the full 20rem context column so the video zone
   reclaims the width (otherwise the peek strip sat in a mostly-empty 20rem
   column and Hide context appeared to do nothing on desktop). */
.stage.context-collapsed[data-room-shell="context-first"] .stage-body {
  grid-template-columns: minmax(0, 1fr) auto;
}

.stage[data-room-shell="context-first"] .video-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9.5rem;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
  gap: 0.75rem;
  height: min(44rem, calc(100vh - 11rem));
  max-height: min(44rem, calc(100vh - 11rem));
  min-height: 0;
  overflow: hidden;
  padding: 0;
  background: var(--mr-bg);
}

.stage[data-room-shell="context-first"] .context-panel,
.stage[data-room-shell="context-first"] .context-peek {
  grid-column: 1;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  border: 2px solid var(--im-ink);
  border-radius: 12px;
  background: var(--im-paper);
  color: var(--im-ink);
  box-shadow: var(--shadow);
}

.stage[data-room-shell="context-first"] .context-actions {
  justify-content: flex-start;
}

.stage[data-room-shell="context-first"] .context-panel.context-previewing {
  background:
    linear-gradient(135deg, var(--im-gold-wash), transparent 64%),
    var(--im-paper);
}

.stage[data-room-shell="context-first"] .livekit-media,
.stage[data-room-shell="context-first"] .video-grid {
  grid-column: 1;
  min-height: 0;
}

.stage[data-room-shell="context-first"] .video-grid {
  align-content: start;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  overflow-y: auto;
  padding-right: 0.25rem;
}

.stage[data-room-shell="context-first"] .video-tile {
  border: 2px solid var(--mr-line-strong);
  background: var(--mr-panel);
  color: var(--mr-text);
}

.stage[data-room-shell="context-first"] .video-tile.off,
.stage[data-room-shell="context-first"] .video-tile.hidden-feed {
  background: var(--mr-panel-2);
  color: var(--mr-text-2);
}

.stage[data-room-shell="context-first"] .participant-rail {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.65rem;
  overflow-y: auto;
  border: 1.5px solid var(--mr-line);
  border-radius: 20px;
  background: var(--mr-panel);
}

.stage[data-room-shell="context-first"] .participant-bubble {
  width: 3.3rem;
  height: 3.3rem;
  border: 2px solid var(--mr-line-strong);
  box-shadow: none;
}

.stage[data-room-shell="context-first"] .bubble-signal {
  border-color: var(--mr-panel);
}

.stage[data-room-shell="context-first"] .control-bar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 3;
  display: grid;
  grid-column: 1 / -1;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0;
  border: 1.5px solid var(--mr-line-strong);
  border-radius: 20px;
  background: rgba(44, 30, 20, 0.94);
  color: var(--mr-text);
}

.room-control-button {
  display: inline-grid;
  grid-template-columns: auto minmax(0, max-content);
  align-items: center;
  gap: 0.45rem;
  min-width: 5.4rem;
  min-height: 3rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  line-height: 1;
  white-space: nowrap;
}

.room-control-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  color: currentColor;
  flex: 0 0 auto;
}

.room-control-icon::before,
.room-control-icon::after {
  position: absolute;
  box-sizing: border-box;
  content: "";
}

.room-control-icon[data-control-icon="mic"]::before {
  top: 0.34rem;
  left: 50%;
  width: 0.5rem;
  height: 0.78rem;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  transform: translateX(-50%);
}

.room-control-icon[data-control-icon="mic"]::after {
  bottom: 0.35rem;
  left: 50%;
  width: 0.72rem;
  height: 0.62rem;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  border-left: 1.7px solid currentColor;
  border-radius: 0 0 999px 999px;
  transform: translateX(-50%);
}

.room-control-icon[data-control-icon="camera"]::before {
  left: 0.36rem;
  width: 0.86rem;
  height: 0.68rem;
  border: 1.7px solid currentColor;
  border-radius: 0.16rem;
}

.room-control-icon[data-control-icon="camera"]::after {
  right: 0.36rem;
  width: 0.32rem;
  height: 0.54rem;
  background: currentColor;
  clip-path: polygon(0 15%, 100% 0, 100% 100%, 0 85%);
}

.room-control-icon[data-control-icon="screen"]::before {
  top: 0.43rem;
  width: 1.08rem;
  height: 0.76rem;
  border: 1.7px solid currentColor;
  border-radius: 0.12rem;
}

.room-control-icon[data-control-icon="screen"]::after {
  bottom: 0.4rem;
  width: 0.76rem;
  height: 0.34rem;
  border-bottom: 1.7px solid currentColor;
  border-left: 1.7px solid currentColor;
  border-right: 1.7px solid currentColor;
}

.room-control-icon[data-control-icon="meet"]::before,
.room-control-icon[data-control-icon="catchup"]::before,
.room-control-icon[data-control-icon="end"]::before,
.room-control-icon[data-control-icon="leave"]::before {
  position: static;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.room-control-icon[data-control-icon="meet"]::before {
  content: "AI";
}

.room-control-icon[data-control-icon="catchup"]::before {
  content: "@";
}

.room-control-icon[data-control-icon="workspace"]::before {
  position: static;
  content: "Desk";
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.room-control-icon[data-control-icon="copy"]::before,
.room-control-icon[data-control-icon="copy"]::after {
  width: 0.72rem;
  height: 0.88rem;
  border: 1.55px solid currentColor;
  border-radius: 0.13rem;
}

.room-control-icon[data-control-icon="copy"]::before {
  transform: translate(0.11rem, -0.09rem);
}

.room-control-icon[data-control-icon="copy"]::after {
  background: var(--mr-panel-2, var(--surface));
  transform: translate(-0.11rem, 0.09rem);
}

.room-control-icon[data-control-icon="invite"]::before {
  width: 1.12rem;
  height: 0.82rem;
  border: 1.55px solid currentColor;
  border-radius: 0.12rem;
}

.room-control-icon[data-control-icon="invite"]::after {
  width: 0.72rem;
  height: 0.72rem;
  border-right: 1.55px solid currentColor;
  border-bottom: 1.55px solid currentColor;
  transform: translateY(-0.18rem) rotate(45deg);
}

.room-control-icon[data-control-icon="connect"]::before,
.room-control-icon[data-control-icon="disconnect"]::before {
  width: 0.64rem;
  height: 0.38rem;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  transform: translate(-0.22rem, 0) rotate(-28deg);
}

.room-control-icon[data-control-icon="connect"]::after,
.room-control-icon[data-control-icon="disconnect"]::after {
  width: 0.64rem;
  height: 0.38rem;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  transform: translate(0.22rem, 0) rotate(-28deg);
}

.room-control-icon[data-control-icon="disconnect"] {
  opacity: 0.86;
}

.room-control-icon[data-control-icon="fullscreen"]::before {
  width: 1rem;
  height: 1rem;
  border: 1.7px solid currentColor;
  border-radius: 0.14rem;
}

.room-control-icon[data-control-icon="fullscreen"]::after {
  width: 0.44rem;
  height: 0.44rem;
  border-top: 1.7px solid currentColor;
  border-right: 1.7px solid currentColor;
  transform: translate(0.18rem, -0.18rem);
}

.room-control-icon[data-control-icon="end"]::before {
  content: "End";
}

.room-control-icon[data-control-icon="leave"]::before {
  content: "Out";
}

.room-control-icon[data-control-icon="download"]::before {
  top: 0.38rem;
  left: 50%;
  width: 0.46rem;
  height: 0.58rem;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.room-control-icon[data-control-icon="download"]::after {
  bottom: 0.44rem;
  left: 50%;
  width: 1rem;
  height: 0.42rem;
  border-bottom: 1.7px solid currentColor;
  border-left: 1.7px solid currentColor;
  border-right: 1.7px solid currentColor;
  transform: translateX(-50%);
}

.room-control-icon[data-control-icon="record-cloud"]::before {
  width: 0.76rem;
  height: 0.5rem;
  border: 1.7px solid currentColor;
  border-radius: 999px;
  border-top-left-radius: 0.24rem;
  border-top-right-radius: 0.36rem;
}

.room-control-icon[data-control-icon="record-cloud"]::after {
  top: 0.52rem;
  left: 0.7rem;
  width: 0.36rem;
  height: 0.36rem;
  background: var(--warn);
  border-radius: 999px;
}

.cloud-recording-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--warn);
  border-radius: 999px;
}

.room-control-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-control-end {
  color: var(--warn);
}

.room-control-danger {
  color: var(--im-cream);
}

.stage[data-room-shell="context-first"] .control-bar .button-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.stage[data-room-shell="context-first"] .room-control-button {
  border: 1.5px solid var(--mr-line-strong);
  background: var(--mr-panel-2);
  color: var(--mr-text);
  box-shadow: none;
}

.stage[data-room-shell="context-first"] .room-control-button:not(.secondary):not(.warn) {
  border-color: var(--im-terracotta-deep);
  background: var(--im-terracotta-deep);
  color: var(--im-cream);
}

.stage[data-room-shell="context-first"] .room-control-button.warn,
.stage[data-room-shell="context-first"] .room-control-danger {
  border-color: var(--im-rust);
  background: var(--im-rust);
  color: var(--im-cream);
}

.stage[data-room-shell="context-first"] .room-control-end {
  border-color: rgba(230, 179, 60, 0.42);
}

.stage[data-room-shell="context-first"] .workspace {
 overflow: hidden;
 border: 1.5px solid var(--mr-line);
 border-radius: 20px;
 background: var(--mr-panel);
 color: var(--mr-text);
}

.stage[data-room-shell="context-first"] .meet-assistant-panel {
 border-bottom-color: var(--mr-line);
 background: var(--mr-panel-2);
}

.stage[data-room-shell="context-first"] .meet-assistant-copy p:not(.eyebrow) {
 color: var(--mr-text-2);
}

.stage[data-room-shell="context-first"] .meet-prompt-button {
 border-color: var(--mr-line-strong);
 background: var(--mr-panel);
 color: var(--mr-text);
}

.stage[data-room-shell="context-first"] .tabs {
 gap: 0.25rem;
  padding: 0.5rem;
  border-bottom-color: var(--mr-line);
}

.stage[data-room-shell="context-first"] .tab {
  min-height: 2.65rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--mr-text);
}

.stage[data-room-shell="context-first"] .tab[aria-selected="true"] {
  background: var(--im-terracotta-deep);
  color: var(--im-cream);
}

.stage[data-room-shell="context-first"] .workspace-content {
  color: var(--mr-text);
}

.stage[data-room-shell="context-first"] .field label {
  color: var(--mr-text);
}

.stage[data-room-shell="context-first"] .room-invite-panel .field label {
  color: var(--im-ink, #2a1c14);
}

@media (max-width: 680px) {
  .stage[data-room-shell="context-first"] .stage-header,
  .stage[data-room-shell="context-first"] .control-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .stage[data-room-shell="context-first"] .control-bar {
    justify-content: stretch;
    padding: 0.55rem;
  }

  .stage[data-room-shell="context-first"] .control-bar .button-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .app-shell.in-room [data-connect-media][disabled] {
    display: none;
  }

  .stage[data-room-shell="context-first"] .room-control-button {
    grid-template-columns: 1fr;
    justify-items: center;
    min-width: 0;
    width: 100%;
    min-height: 3.45rem;
    padding: 0.42rem 0.28rem;
    gap: 0.25rem;
  }

  .stage[data-room-shell="context-first"] .room-control-icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  .stage[data-room-shell="context-first"] .room-control-label {
    max-width: 100%;
    font-size: 0.72rem;
  }

  .stage[data-room-shell="context-first"] .stage-body {
    /* Phone: collapse the two-column stage to ONE column. Without this the base
       desktop rule (minmax(0,1fr) minmax(20rem,23rem)) keeps a ~20rem context
       column that eats the whole viewport, crushing the video zone AND the
       nested Mute/Share/End control bar to 0px - you could neither see anyone
       nor leave/mute from a phone. Single column stacks video+controls first
       (DOM order), context panel below. */
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
    min-height: auto;
    padding: 0.65rem;
  }

  /* Phone: single-column stage. Video fills the width; the duplicate participant
     rail stays hidden in the live room so camera tiles keep the space. */
  .stage[data-room-shell="context-first"] .video-zone {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: start;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .stage[data-room-shell="context-first"] .video-zone > * {
    grid-column: 1;
    min-width: 0;
  }

  .stage[data-room-shell="context-first"] .video-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage[data-room-shell="context-first"] .participant-rail {
    position: static;
    grid-column: 1;
    grid-row: auto;
    display: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-self: stretch;
    max-height: none;
    padding: 0.4rem 0.5rem;
    border-radius: 18px;
    background: var(--mr-panel);
  }

  .stage[data-room-shell="context-first"] .workspace {
    position: sticky;
    bottom: 0.65rem;
    z-index: 5;
    max-height: min(28rem, 58vh);
    border-radius: 20px 20px 14px 14px;
    box-shadow: 0 -6px 0 rgba(0, 0, 0, 0.24);
  }

  .stage[data-room-shell="context-first"] .tabs {
    position: sticky;
    top: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: var(--mr-panel);
  }

  .stage[data-room-shell="context-first"] .tab {
    min-width: 0;
    min-height: 2.35rem;
    padding: 0.55rem 0.25rem;
    overflow: hidden;
    font-size: 0.72rem;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .stage[data-room-shell="context-first"] .workspace-content {
    max-height: calc(min(28rem, 58vh) - 4rem);
    overflow: auto;
    padding: 0.75rem;
  }
}

/* =====================================================================
   IMMERSIVE ROOM  (.app-shell.in-room)
   A live room is a DEDICATED, full-viewport space: no landing topbar, no
   dashboard sidebar, no SMS prompt. The stage fills the screen so entering a
   meet feels like walking into the room. Cameras are the hero by default;
   when a source is shared, the context takes center stage and participants
   shrink to a floating bubble strip. Reflows to a single column on mobile.
   ===================================================================== */
.app-shell.in-room {
  --room-workspace-width: min(22rem, calc(100vw - 2rem));
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: block;
  max-width: 100%;
  padding: 0;
  background: var(--mr-bg, var(--surface));
  overflow-x: hidden;
}

.app-shell.in-room.cinema-room,
.room-shell:fullscreen {
  background: var(--mr-bg, #211610);
}

.app-shell.in-room.cinema-room .room-shell {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.app-shell.in-room.cinema-room .stage {
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.app-shell.in-room.cinema-room .stage-header,
.app-shell.in-room.cinema-room .room-menu-button,
.app-shell.in-room.cinema-room .room-drawer,
.app-shell.in-room.cinema-room .room-drawer-scrim,
.app-shell.in-room.cinema-room .admission-panel {
  display: none;
}

.app-shell.in-room.cinema-room .stage-body {
  height: 100%;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.app-shell.in-room.cinema-room .video-zone {
  height: 100%;
  min-height: 0;
  padding: clamp(0.35rem, 1.2vw, 0.75rem);
  gap: clamp(0.35rem, 1vw, 0.55rem);
}

.app-shell.in-room.cinema-room .control-bar {
  margin-top: 0.35rem;
}

.app-shell.in-room.cinema-room .stage.has-context .context-panel {
  max-height: none;
}

.app-shell.in-room.cinema-room .stage.has-context .video-grid {
  max-height: clamp(3.25rem, 12vh, 5rem);
}

.room-shell:fullscreen {
  overflow: auto;
}

.room-shell:fullscreen .stage {
  min-height: 100vh;
  min-height: 100dvh;
}

.app-shell.in-room .room-shell {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-y: visible;
}
.app-shell.in-room .stage {
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: visible;
}
/* Slim room bar - room-appropriate only (topic, code, context toggle, More) */
.app-shell.in-room .stage-header {
  padding: 0.5rem 5.4rem 0.5rem 0.9rem;
  align-items: center;
  gap: 0.6rem 0.9rem;
  flex-wrap: wrap;
  min-height: 0;
}
.app-shell.in-room .room-title {
  min-width: 0;
}
.app-shell.in-room .room-title h2 {
  font-size: 1.05rem;
  line-height: 1.2;
}
.app-shell.in-room .room-title p {
  font-size: 0.78rem;
}
/* The room-theme switcher (Focus/Studio/Retro/…) is a vibe picker, not a live
   meeting control - keep it out of the room bar so the space stays clean. */
.app-shell.in-room .room-look-switcher {
  display: none;
}
/* Primary stage (cameras/context) + workspace rail fill the remaining height */
.app-shell.in-room .stage-body {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
}
.app-shell.in-room .video-zone {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem;
}
.app-shell.in-room .livekit-media,
.app-shell.in-room .video-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  align-content: start;
}
.app-shell.in-room .participant-rail {
  display: none;
  flex: 0 0 auto;
}
/* Controls always reachable, pinned to the bottom of the camera area */
.app-shell.in-room .control-bar {
  flex: 0 0 auto;
  position: static;
  bottom: auto;
  z-index: auto;
  margin-top: auto;
}

.app-shell.in-room .video-grid > .video-tile:not([data-participant-feed]) {
  display: none;
}

.app-shell.in-room .stage:not(.has-context) .video-grid.single-feed-grid .video-tile.off {
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: stretch;
}

.app-shell.in-room .stage:not(.has-context) .video-grid.single-feed-grid .video-tile.off .avatar {
  align-self: center;
  justify-self: center;
  width: clamp(6rem, 12vw, 10rem);
  height: clamp(6rem, 12vw, 10rem);
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.app-shell.in-room .workspace {
  display: none;
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  height: 100%;
  overflow: auto;
  border-left: 1px solid var(--border);
}
.app-shell.in-room .admission-panel {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0.75rem 0.85rem 0.85rem;
}
.app-shell.in-room .admission-panel h3,
.app-shell.in-room .admission-panel span {
  color: var(--im-ink, #2a1c14);
}

@media (min-width: 861px) {
  .app-shell.in-room .room-shell {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  .app-shell.in-room .stage {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .app-shell.in-room .stage-body {
    height: 100%;
  }

  .app-shell.in-room:has(.workspace[data-workspace-open="true"]) .room-shell {
    padding-right: var(--room-workspace-width);
  }

  .app-shell.in-room:has(.workspace[data-workspace-open="true"]) .room-menu-button {
    right: calc(var(--room-workspace-width) + 0.7rem);
  }

  .app-shell.in-room .participant-rail {
    display: none;
  }

  .app-shell.in-room .workspace {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 34;
    display: none;
    width: var(--room-workspace-width);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: auto;
    border-left: 1px solid var(--border);
    box-shadow: -16px 0 32px rgba(0, 0, 0, 0.32);
  }

  .app-shell.in-room .workspace .room-invite-panel,
  .app-shell.in-room .workspace .workspace-content {
    display: none;
  }

  .app-shell.in-room .workspace .tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.35rem;
    padding: 0.55rem;
    border-bottom: 0;
  }

  .app-shell.in-room .workspace .tab {
    min-width: 0;
    min-height: 3.25rem;
    padding: 0.35rem 0.25rem;
    font-size: 0.72rem;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
  }

  .app-shell.in-room .workspace[data-workspace-open="true"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.75rem;
    align-content: start;
  }

  .app-shell.in-room .workspace[data-workspace-open="true"] .tabs {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .app-shell.in-room .workspace[data-workspace-open="true"] .room-invite-panel {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .app-shell.in-room .workspace[data-workspace-open="true"] .workspace-content {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }

  .app-shell.in-room .workspace[data-workspace-open="true"] .room-invite-panel,
  .app-shell.in-room .workspace[data-workspace-open="true"] .workspace-content {
    display: block;
  }

  .app-shell.in-room .workspace[data-workspace-open="true"] .tabs {
    border-bottom: 1px solid var(--mr-line);
  }

  .app-shell.in-room .workspace[data-workspace-open="true"] .workspace-collapse-button {
    position: absolute;
    right: 0.72rem;
    bottom: 0.72rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid var(--mr-line-strong);
    border-radius: 999px;
    background: var(--mr-panel);
    color: var(--mr-text);
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid {
    grid-auto-rows: minmax(0, 1fr);
    margin-bottom: 0.65rem;
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid > [data-participant-feed] {
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
  }
}

/* Room "Menu" button - opens the lobby drawer (switch rooms, start/join another,
   archive/keep). Floating, unobtrusive, top-right of the room. */
.app-shell.in-room .room-menu-button {
  position: fixed;
  top: 0.5rem;
  right: 0.7rem;
  z-index: 30;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong, var(--border));
  background: var(--mr-panel, var(--surface-raised, #2a1c14));
  color: inherit;
  cursor: pointer;
}
/* Lobby drawer - CLOSED by default (off-canvas). The room stays a clean space;
   the drawer holds everything that used to clutter the in-room sidebar. */
.app-shell.in-room .room-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  height: 100vh;
  height: 100dvh;
  width: min(26rem, 92vw);
  overflow: auto;
  padding: 0.9rem;
  background: var(--surface-raised, var(--surface));
  border-left: 1px solid var(--border);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.35);
  transform: translateX(102%);
  transition: transform 0.22s ease;
}
.app-shell.in-room.drawer-open .room-drawer {
  transform: translateX(0);
}
.app-shell.in-room .room-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.app-shell.in-room .room-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.app-shell.in-room.drawer-open .room-drawer-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* CONTEXT TAKEOVER: the shared source (tab/doc) becomes the hero and the
   camera tiles collapse into a compact horizontal bubble strip. */
.app-shell.in-room .stage.has-context .context-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.app-shell.in-room .stage.has-context .livekit-media:not(.hidden) {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 5rem;
  min-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  scrollbar-width: none;
}
.app-shell.in-room .stage.has-context .video-grid {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 5rem;
  min-height: 0;
  scrollbar-width: none;
}

.app-shell.in-room .stage.has-context .video-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-shell.in-room .stage.has-context .livekit-media::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-shell.in-room .stage.has-context .livekit-media > video {
  flex: 0 0 auto;
  width: 7rem;
  max-width: 7rem;
  aspect-ratio: 16 / 10;
  min-height: 0;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
}

.app-shell.in-room .stage.has-context .livekit-media > audio {
  display: none;
}

.app-shell.in-room .stage.has-context .video-grid > * {
  flex: 0 0 auto;
  width: 7rem;
  max-width: 7rem;
  aspect-ratio: 16 / 10;
  min-height: 0;
  height: auto;
  border-radius: 14px;
}

.app-shell.in-room .stage.has-context .participant-rail {
  display: none;
}

/* CAMERA TAKEOVER: when LiveKit media is mounted without shared context, the
   real media should own the room and participant fallback tiles become a strip. */
.app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) {
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  align-content: stretch;
}

.app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) > video {
  min-height: 0;
  height: 100%;
  object-fit: cover;
}

.app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden):has(video[data-track-source="screen_share"]) > video[data-track-source="screen_share"] {
  object-fit: contain;
}

.app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) + .video-grid {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 5rem;
  min-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  scrollbar-width: none;
}

.app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) + .video-grid::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) + .video-grid > [data-participant-feed] {
  flex: 0 0 auto;
  width: 7rem;
  max-width: 7rem;
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) + .video-grid .tile-footer,
.app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) + .video-grid .tile-permissions {
  display: none;
}

.app-shell.in-room.cinema-room .stage:not(.has-context) .livekit-media:not(.hidden) + .video-grid {
  display: none;
}

/* MOBILE: single column, camera-first, workspace as a bottom sheet */
@media (max-width: 860px) {
  .app-shell.in-room .room-shell,
  .app-shell.in-room .stage {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .app-shell.in-room .stage,
  .app-shell.in-room .stage-header,
  .app-shell.in-room .stage-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .app-shell.in-room .stage-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    box-sizing: border-box;
    overflow: visible;
  }
  .app-shell.in-room .video-zone,
  .app-shell.in-room .workspace,
  .app-shell.in-room .admission-panel {
    grid-column: 1;
    grid-row: auto;
  }
  .app-shell.in-room .video-zone {
    height: auto;
    min-height: min(34rem, calc(100dvh - 5.5rem));
    align-items: stretch;
    overflow: visible;
  }
  .app-shell.in-room .stage:not(.has-context):not(.has-admission) .stage-body {
    height: 100%;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }
  .app-shell.in-room .stage:not(.has-context):not(.has-admission) .video-zone {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .app-shell.in-room .stage.has-context {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .app-shell.in-room .stage.has-context .stage-body {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .app-shell.in-room .stage.has-context .video-zone {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .app-shell.in-room .livekit-media,
  .app-shell.in-room .video-grid {
    flex: 0 0 auto;
    overflow: visible;
  }
  .app-shell.in-room .stage:not(.has-context) .video-grid {
    flex: 1 1 auto;
    align-content: stretch;
    grid-auto-rows: minmax(0, 1fr);
    min-height: 0;
  }
  .app-shell.in-room .stage:not(.has-context) .video-grid > [data-participant-feed] {
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
  }

  .app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) > video {
    min-height: 0;
    height: 100%;
  }

  .app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) + .video-grid {
    flex: 0 0 auto;
    max-height: 4.15rem;
    overflow: hidden;
  }

  .app-shell.in-room .stage:not(.has-context) .livekit-media:not(.hidden) + .video-grid > [data-participant-feed] {
    width: 4.35rem;
    max-width: 4.35rem;
    height: 3.25rem;
    min-height: 0;
    aspect-ratio: auto;
  }
  .app-shell.in-room .workspace {
    display: none;
    position: static;
    bottom: auto;
    z-index: auto;
    border-left: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: none;
    height: auto;
    overflow: visible;
  }
  .app-shell.in-room .workspace[data-workspace-open="true"] {
    position: fixed;
    inset: auto 0 0;
    z-index: 34;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    max-height: min(34rem, 82dvh);
    overflow: auto;
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: var(--mr-panel, var(--surface));
    box-shadow: 0 -18px 36px rgba(0, 0, 0, 0.34);
  }
  .app-shell.in-room .workspace[data-workspace-open="true"] .workspace-collapse-button {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid var(--mr-line-strong);
    border-radius: 999px;
    background: var(--mr-panel);
    color: var(--mr-text);
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
  }
  .app-shell.in-room .room-invite-panel {
    max-width: 100%;
  }
  .app-shell.in-room .room-invite-panel .field label {
    color: var(--im-ink, #2a1c14);
  }
  .app-shell.in-room .workspace-content {
    max-height: none;
    overflow: visible;
  }
  .app-shell.in-room .tabs {
    width: 100%;
    max-width: 100%;
  }
  .app-shell.in-room .tab {
    min-width: 0;
    padding-inline: 0.14rem;
    font-size: 0.68rem;
  }
  .app-shell.in-room .admission-panel {
    margin: 0.65rem;
  }
  /* SLIM MOBILE ROOM BAR: topic + context toggle + More only, on a single row.
     The elapsed subtitle, theme pill, room code, and status pill move out of the
     always-visible bar (code + actions stay reachable in the More menu) so the
     bar is ~1 row and the cameras get the screen instead of a stack of pills. */
  .app-shell.in-room .stage-header {
    padding: 0.45rem 4.85rem 0.45rem 0.7rem;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow: hidden;
  }
  .app-shell.in-room .room-title {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .app-shell.in-room .room-title h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .app-shell.in-room .room-title p {
    display: none;
  }
  .app-shell.in-room .room-meta {
    flex: 0 0 auto;
    max-width: 100%;
    margin-left: 0;
    gap: 0.4rem;
  }
  /* Slimmest mobile bar: hide the vibe pill, room code, LiveKit status, and the
     participant count (the tiles already show who's here). KEEP a local-save
     warning visible - that's a data-loss signal worth the space. */
  .app-shell.in-room .room-meta .room-look-pill,
  .app-shell.in-room .room-meta .room-code,
  .app-shell.in-room .room-meta .room-count {
    display: none;
  }
  .app-shell.in-room .video-zone {
    padding: 0.6rem;
  }
  .app-shell.in-room .stage.has-context .livekit-media:not(.hidden),
  .app-shell.in-room .stage.has-context .video-grid {
    max-height: 3.75rem;
    gap: 0.45rem;
    overflow: hidden;
  }
  .app-shell.in-room .stage.has-context .livekit-media > video,
  .app-shell.in-room .stage.has-context .video-grid > * {
    width: 4.35rem;
    max-width: 4.35rem;
    height: 3.25rem;
    aspect-ratio: auto;
  }
  .app-shell.in-room .stage.has-context .video-grid .video-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0.32rem;
  }
  .app-shell.in-room .stage.has-context .video-grid .tile-footer,
  .app-shell.in-room .stage.has-context .video-grid .tile-permissions {
    display: none;
  }
  .app-shell.in-room .stage.has-context .video-grid .avatar {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.9rem;
  }
  .app-shell.in-room .stage.has-context .context-panel {
    max-height: min(31rem, 56dvh);
  }
  .app-shell.in-room .stage.has-context .participant-rail {
    display: none;
  }
  .app-shell.in-room .stage.has-context .control-bar {
    margin-top: 0.65rem;
  }
  .app-shell.in-room .stage.has-context .control-bar .button-row {
    grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
  }
  .app-shell.in-room .control-bar {
    position: static;
    bottom: auto;
    margin-top: 1rem;
  }
  .app-shell.in-room.cinema-room .stage-body {
    height: 100%;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }
  .app-shell.in-room.cinema-room .video-zone {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
}

@media (max-width: 860px) and (max-height: 700px) {
  .app-shell.in-room .stage-header {
    min-height: 0;
    padding: 0.35rem 4.7rem 0.35rem 0.7rem;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .app-shell.in-room .room-title {
    flex: 1 1 auto;
    width: auto;
  }

  .app-shell.in-room .room-meta {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .app-shell.in-room .room-meta [data-toggle-context-panel] {
    min-height: 2.35rem;
    padding: 0.42rem 0.65rem;
    white-space: nowrap;
  }

  .app-shell.in-room .stage-body {
    padding: 0;
  }

  .app-shell.in-room .video-zone {
    min-height: calc(100dvh - 3.75rem);
    gap: 0.45rem;
    padding: 0.45rem 0.6rem 0.6rem;
  }

  .app-shell.in-room .stage.has-context .video-zone {
    min-height: calc(100dvh - 4.75rem);
  }

  .app-shell.in-room .stage.has-context .livekit-media:not(.hidden),
  .app-shell.in-room .stage.has-context .video-grid {
    max-height: 3.35rem;
  }

  .app-shell.in-room .stage.has-context .livekit-media > video,
  .app-shell.in-room .stage.has-context .video-grid > * {
    width: 5rem;
    max-width: 5rem;
  }

  .app-shell.in-room .stage.has-context .video-grid .video-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0.28rem;
  }

  .app-shell.in-room .stage.has-context .video-grid .tile-footer {
    display: none;
  }

  .app-shell.in-room .stage.has-context .video-grid .avatar {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.9rem;
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid.single-feed-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid .video-tile {
    min-height: 7.25rem;
    padding: 0.55rem;
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid .avatar {
    width: 2.55rem;
    height: 2.55rem;
    font-size: 1rem;
  }

  .app-shell.in-room .participant-rail {
    min-height: 3.25rem;
    margin-bottom: 0.35rem;
    padding: 0.3rem 0.45rem;
  }

  .app-shell.in-room .control-bar,
  .app-shell.in-room .stage.has-context .control-bar {
    margin-top: 0.45rem;
    padding: 0.55rem;
  }

  .app-shell.in-room .stage.has-context .context-panel {
    max-height: min(25rem, 46dvh);
  }

  .app-shell.in-room.cinema-room .stage.has-context .video-zone {
    gap: 0.34rem;
    padding: 0.35rem 0.5rem 0.45rem;
  }

  .app-shell.in-room.cinema-room .stage.has-context .context-panel {
    flex: 1 1 calc(45dvh + 1px);
    min-height: calc(45dvh + 1px);
    max-height: none;
  }

  .app-shell.in-room.cinema-room .stage.has-context .livekit-media:not(.hidden),
  .app-shell.in-room.cinema-room .stage.has-context .video-grid {
    max-height: 2.85rem;
    gap: 0.32rem;
  }

  .app-shell.in-room.cinema-room .stage.has-context .livekit-media > video,
  .app-shell.in-room.cinema-room .stage.has-context .video-grid > * {
    width: 4.2rem;
    max-width: 4.2rem;
    height: 2.75rem;
  }

  .app-shell.in-room.cinema-room .stage.has-context .video-grid .video-tile {
    padding: 0.2rem;
  }

  .app-shell.in-room.cinema-room .stage.has-context .video-grid .avatar {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.78rem;
  }

  .app-shell.in-room.cinema-room .stage.has-context .control-bar {
    margin-top: 0.28rem;
    padding: 0.4rem;
  }

  .app-shell.in-room.cinema-room .stage.has-context .room-control-button {
    gap: 0.22rem;
    min-height: 2.55rem;
    padding: 0.28rem 0.2rem;
  }

  .app-shell.in-room.cinema-room .stage.has-context .room-control-icon {
    width: 1.3rem;
    height: 1.3rem;
  }

  .app-shell.in-room.cinema-room .stage.has-context .room-control-label {
    font-size: 0.6rem;
  }

  .app-shell.in-room .control-bar .button-row,
  .app-shell.in-room .stage.has-context .control-bar .button-row {
    grid-template-columns: repeat(auto-fit, minmax(3.5rem, 1fr));
    gap: 0.34rem;
  }

  .app-shell.in-room .room-control-button {
    min-height: 2.9rem;
    padding: 0.34rem 0.22rem;
  }

  .app-shell.in-room .room-control-icon {
    width: 1.45rem;
    height: 1.45rem;
  }

  .app-shell.in-room .room-control-label {
    font-size: 0.64rem;
  }
}

@media (max-width: 680px) {
  .app-shell.in-room .stage:not(.has-context) .video-grid.gallery-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid.gallery-feed-grid .video-tile {
    min-height: 0;
    padding: 0.5rem;
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid.gallery-feed-grid .avatar {
    width: 2.7rem;
    height: 2.7rem;
    font-size: 1rem;
  }

  .app-shell.in-room .stage:not(.has-context) .video-grid.gallery-feed-grid .tile-permissions {
    display: none;
  }

  .app-shell.in-room .stage.has-gallery-feed:not(.has-context) .room-control-more-menu,
  .app-shell.in-room .stage.has-context .room-control-more-menu {
    width: min(21rem, calc(100vw - 2rem));
  }

  .app-shell.in-room .stage.has-gallery-feed:not(.has-context) .room-control-participant-actions {
    display: block;
  }

  .app-shell.in-room .stage:not(.has-context):has(.livekit-media:not(.hidden)) .room-control-participant-actions {
    display: block;
  }

  .app-shell.in-room .stage.has-context .room-control-participant-actions {
    display: block;
  }

  .app-shell.in-room .control-bar {
    width: 100%;
    max-width: min(22rem, 100%);
    margin-right: 0;
    margin-left: 0;
  }

  .app-shell.in-room .control-bar .button-row {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell.in-room .stage.has-context .context-panel,
  .app-shell.in-room .stage.has-context .context-preview,
  .app-shell.in-room .stage.has-context .context-preview-frame,
  .app-shell.in-room .stage.has-context .control-bar,
  .app-shell.in-room .stage.has-context .control-bar .button-row {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  .app-shell.in-room .stage.has-context .control-bar {
    width: 100%;
    max-width: min(22rem, 100%);
    margin-right: 0;
    margin-left: 0;
  }

  .app-shell.in-room .stage.has-context .control-bar .button-row {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell.in-room.cinema-room .control-bar {
    max-width: 100%;
    padding: 0.45rem;
  }

  .app-shell.in-room.cinema-room .control-bar .button-row,
  .app-shell.in-room.cinema-room .stage.has-context .control-bar .button-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.32rem;
  }

  .app-shell.in-room.cinema-room .room-control-button {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0.16rem;
    min-width: 0;
    min-height: 2.65rem;
    padding: 0.22rem 0.12rem;
  }

  .app-shell.in-room.cinema-room .room-control-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .app-shell.in-room.cinema-room .room-control-label {
    max-width: 100%;
    font-size: 0.58rem;
  }

}
