/* pChat — olive design tokens, shared with Pizzabase VMs */

:root {
  --background: #f3f3f1;
  --foreground: #282923;
  --card: #f8f8f7;
  --card-foreground: #282923;
  --muted: #eaeae6;
  --muted-foreground: #76776e;
  --border: #ddddd9;
  --primary: #92b42d;
  --primary-foreground: #282923;
  --destructive: #c84141;
  --destructive-foreground: #fafafa;
  --ring: #92b42d;
  --shadow-sm: 0 1px 2px #2829230f;
  --shadow-md: 0 4px 12px #28292314;
  --shadow-lg: 0 8px 24px #2829231a;
  --status-green: #21c45d;
  --status-red: #ef4343;
  --radius: 0.75rem;
  --radius-button: 0.4375rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

.dark {
  --background: #181816;
  --foreground: #dcdcd6;
  --card: #1d1d1b;
  --card-foreground: #dcdcd6;
  --muted: #272825;
  --muted-foreground: #84857a;
  --border: #2f302c;
  --primary: #a6c841;
  --primary-foreground: #181816;
  --destructive: #9b3b3b;
  --destructive-foreground: #fafafa;
  --ring: #a6c841;
  --shadow-sm: 0 1px 2px #0a0b0a66;
  --shadow-md: 0 4px 12px #0a0b0a80;
  --shadow-lg: 0 8px 24px #0a0b0a99;
  color-scheme: dark;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

h1,
h2,
h3,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.muted {
  color: var(--muted-foreground);
}

/* ─── Buttons & inputs ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  padding: 0 0.85rem;
  height: 2.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-sm {
  height: 1.9rem;
  font-size: 0.8125rem;
  padding: 0 0.7rem;
}
.btn-lg {
  height: 2.75rem;
  font-size: 0.9375rem;
}
.btn-block {
  width: 100%;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover {
  filter: brightness(1.05);
}
.btn-outline {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}
.btn-outline:hover {
  background: var(--muted);
}
.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
}
.btn-ghost:hover {
  background: var(--muted);
  color: var(--foreground);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover {
  background: var(--muted);
  color: var(--foreground);
}

.input {
  width: 100%;
  height: 2.25rem;
  padding: 0 0.7rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-button);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder {
  color: var(--muted-foreground);
}
.input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent);
}
.input-sm {
  height: 1.9rem;
  font-size: 0.8125rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ─── Brand ────────────────────────────────────────────────────────────── */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  font-size: 1.35rem;
  line-height: 1;
}
.brand-name {
  font-weight: 750;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
}
.brand-lg .brand-mark {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 2.2rem;
}
.brand-lg .brand-name {
  font-size: 1.5rem;
}
.head-actions {
  display: flex;
  gap: 0.2rem;
}

/* ─── Login ────────────────────────────────────────────────────────────── */
.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(900px 500px at 50% -10%, color-mix(in srgb, var(--primary) 14%, transparent), transparent),
    var(--background);
}
.login-card {
  width: 100%;
  max-width: 25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.25rem);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.login-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 0.5rem;
}
.login-sub {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.error-text {
  color: var(--destructive);
  font-size: 0.85rem;
}
.dev-login {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── App shell ────────────────────────────────────────────────────────── */
.app {
  height: 100dvh;
  --chat-w: 20rem;
  display: grid;
  grid-template-columns: 16rem 1fr var(--chat-w);
}

/* Chat can be collapsed on desktop; the drawer handles mobile. */
.chat-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  margin-left: 0.1rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.68rem;
  font-weight: 700;
}
#chat-toggle.has-unread {
  color: var(--foreground);
}

.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
}
.channels {
  padding: 0.9rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.4rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-foreground);
}
.channel-list,
.member-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow-y: auto;
}
.channel-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: none;
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.channel-item:hover {
  background: var(--muted);
}
.channel-item.active {
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  font-weight: 600;
}
.channel-hash {
  color: var(--muted-foreground);
  font-weight: 600;
}
.empty-hint {
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.members {
  margin-top: auto;
  padding: 0.9rem 0.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.member-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.4rem;
  font-size: 0.85rem;
}
.member-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.owner {
  background: color-mix(in srgb, var(--primary) 25%, transparent);
  color: var(--foreground);
}
.badge.live {
  background: var(--status-green);
  color: #10240f;
}
.invite-row {
  display: flex;
  gap: 0.4rem;
}
.invite-row .input {
  flex: 1;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--border);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 1;
}
.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  object-fit: cover;
  background: var(--muted);
  flex-shrink: 0;
}
.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-email {
  font-size: 0.72rem;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ─── Stage ────────────────────────────────────────────────────────────── */
.stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--background);
}
.stage-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.sidebar-toggle {
  display: none;
}
.stage-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stage-title h2 {
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-title .muted {
  font-size: 0.76rem;
}
.stage-actions {
  margin-left: auto;
  display: flex;
  gap: 0.4rem;
}
.stage-actions .btn {
  gap: 0.35rem;
}

.video-area {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 0.85rem;
  overflow: hidden;
}
.video-grid {
  height: 100%;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-content: start;
  overflow-y: auto;
}
.video-grid.solo {
  grid-template-columns: 1fr;
}
.tile {
  position: relative;
  background: #101010;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 10;
  min-height: 0;
}
.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #101010;
}
.tile.mirror video {
  transform: scaleX(-1);
}
.tile.speaking {
  box-shadow: 0 0 0 2px var(--primary);
}
.tile-label {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  max-width: calc(100% - 1rem);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #00000099;
  color: #f5f5f2;
  font-size: 0.74rem;
  backdrop-filter: blur(4px);
}
.tile-label .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-flags {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  display: flex;
  gap: 0.3rem;
}
.flag {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #00000099;
  color: #f5f5f2;
}
.flag.danger {
  background: color-mix(in srgb, var(--destructive) 85%, black);
}
.stage-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  font-size: 0.92rem;
  pointer-events: none;
}

/* ─── Join panel ──────────────────────────────────────────────────────── */
.join-panel {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.join-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
  max-width: 22rem;
  padding: 1.75rem 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: var(--shadow-md);
}
.join-channel {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  color: var(--foreground);
  font-size: 1.3rem;
  font-weight: 650;
}
.join-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.join-sub {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}
.join-presence {
  font-size: 0.8rem;
}

/* ─── Screen stage: big share + camera filmstrip ─────────────────────── */
.screen-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem;
}
.screen-main {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #101010;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.screen-main video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101010;
}
.screen-main-bar {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0.35rem 0.3rem 0.75rem;
  border-radius: 999px;
  background: #000000a6;
  color: #f5f5f2;
  font-size: 0.78rem;
  backdrop-filter: blur(6px);
}
.screen-main-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.screen-main-actions {
  display: flex;
  gap: 0.35rem;
}
.screen-main-actions .btn {
  color: #f5f5f2;
  border-color: #ffffff33;
  background: #ffffff1a;
}
.screen-main-actions .btn:hover {
  background: #ffffff2e;
}
.screen-main-actions .btn-primary {
  color: var(--primary-foreground);
  background: var(--primary);
  border-color: var(--primary);
}
.filmstrip {
  flex: 0 0 auto;
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.filmstrip .tile {
  flex: 0 0 auto;
  width: 168px;
  aspect-ratio: 16 / 10;
}

/* ─── Per-tile actions (detach / fullscreen) ─────────────────────────── */
.tile-actions {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.tile-volume {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  width: 5.5rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #000000a6;
  opacity: 0;
  transition: opacity 0.15s;
}
.tile-volume input {
  display: block;
  width: 100%;
  height: 0.9rem;
  margin: 0;
  accent-color: var(--primary);
}
.tile:hover .tile-volume,
.tile:focus-within .tile-volume {
  opacity: 1;
}
.tile[data-peer="self"] .tile-volume {
  display: none;
}
.tile:hover .tile-actions,
.tile:focus-within .tile-actions {
  opacity: 1;
}
.tile-btn {
  display: grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border: none;
  border-radius: 0.35rem;
  background: #000000a6;
  color: #f5f5f2;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1;
}
.tile-btn:hover {
  background: #000000d9;
}
.tile.no-video .tile-actions [data-act="pip"] {
  display: none;
}

.tile-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: #101010;
}
.tile.no-video .tile-placeholder {
  display: grid;
}
.tile.no-video video {
  opacity: 0;
}
.tile-placeholder .avatar {
  width: 4rem;
  height: 4rem;
}

/* ─── Controls ─────────────────────────────────────────────────────────── */
.controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.controls-spacer {
  flex: 1;
}
.ctl {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ctl:hover {
  background: var(--muted);
}
.ctl.off {
  background: color-mix(in srgb, var(--destructive) 14%, transparent);
  border-color: color-mix(in srgb, var(--destructive) 45%, transparent);
  color: var(--destructive);
}
.ctl.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}
.ctl-danger {
  background: var(--destructive);
  border-color: var(--destructive);
  color: var(--destructive-foreground);
}

/* ─── Chat ─────────────────────────────────────────────────────────────── */
.chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--card);
  border-left: 1px solid var(--border);
}
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 650;
}
#chat-close {
  display: none;
}
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.message {
  display: flex;
  gap: 0.55rem;
}
.message .avatar {
  width: 1.8rem;
  height: 1.8rem;
}
.message-body {
  min-width: 0;
}
.message-head {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.78rem;
}
.message-author {
  font-weight: 650;
}
.message-time {
  color: var(--muted-foreground);
  font-size: 0.7rem;
}
.message-text {
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}
.chat-form .input {
  flex: 1;
}

/* ─── Modal ────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #0a0b0a66;
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  z-index: 40;
}
.modal {
  width: 100%;
  max-width: 22rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.modal-title {
  font-size: 1.05rem;
  font-weight: 680;
}
.modal-sub {
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ─── Toasts ───────────────────────────────────────────────────────────── */
.toasts {
  position: fixed;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 60;
}

/* Kept on-screen and painted (Safari is picky about playing hidden media). */
.audio-sinks {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0.01;
  pointer-events: none;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: -0.25rem;
}

.diag {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
}
.check-row input {
  margin-top: 0.15rem;
  accent-color: var(--primary);
}
.diag-out {
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-button);
  background: var(--muted);
  color: var(--muted-foreground);
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 9rem;
  overflow-y: auto;
}
.diag-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.member-remove {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
}
.member-remove:hover {
  background: color-mix(in srgb, var(--destructive) 15%, transparent);
  color: var(--destructive);
}
.toast {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-button);
  background: var(--foreground);
  color: var(--background);
  font-size: 0.83rem;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.18s ease-out;
}
.toast.error {
  background: var(--destructive);
  color: var(--destructive-foreground);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .app {
    --chat-w: 17rem;
    grid-template-columns: 15rem 1fr var(--chat-w);
  }
}

@media (min-width: 901px) {
  .app.chat-collapsed {
    --chat-w: 0;
  }
  .app.chat-collapsed .chat {
    display: none;
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 17rem;
    z-index: 30;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle {
    display: inline-flex;
  }
  .chat {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(22rem, 92vw);
    z-index: 30;
    transform: translateX(102%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .chat.open {
    transform: translateX(0);
  }
  #chat-close {
    display: inline-flex;
  }
  .video-grid {
    grid-template-columns: 1fr;
  }
}
