/* Zuno – shared styles (design A · Midnight Stage)
   Every page links this one file. Colours and sizes live in :root so the whole app changes together. */

:root {
  --bg: #050B1F;
  --surface: #0A1B42;
  --surface-2: #0F2352;
  --line: rgba(148, 163, 196, 0.16);
  --line-strong: rgba(148, 163, 196, 0.28);
  --text: #E8EEFA;
  --soft: #C7D2EA;
  --muted: #9AA8C7;
  --blue: #2563EB;
  --blue-hover: #1D4ED8;
  --blue-300: #93C5FD;
  --blue-soft: rgba(96, 165, 250, 0.14);
  --amber: #F59E0B;
  --amber-text: #FBBF24;
  --green: #34D399;
  --danger: #DC2626;
  --danger-text: #F87171;
  --radius: 14px;
  --radius-lg: 20px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }

/* Remove 300ms tap delay on all interactive elements — makes every button feel instant on mobile */
button, [role="button"], [role="tab"], [role="radio"], [role="switch"],
[role="menuitem"], [role="menuitemradio"], a, input, select, label {
  touch-action: manipulation;
}

/* Screen-share loading state */
.dock-btn.is-loading { opacity: 0.6; pointer-events: none; }
.dock-btn.is-loading svg { animation: spin 0.8s linear infinite; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-300); }
a:hover { color: #BFDBFE; }

[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;
}

/* ---------- Page frame ---------- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 28px;
  gap: 24px;
}
.container { width: 100%; max-width: 1200px; margin: 0 auto; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; background: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.logo-name { font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }

/* ---------- Buttons (flat, no 3D) ---------- */
.btn {
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-hover); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--line-strong); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #B91C1C; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 13px; border: none;
  background: rgba(255, 255, 255, 0.08); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background-color .15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
.icon-btn.is-off { background: var(--danger); color: #fff; }
.icon-btn svg { width: 21px; height: 21px; }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input, .select {
  height: 46px; width: 100%; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--text);
  font: inherit; font-size: 14.5px; outline: none;
}
.input::placeholder { color: #7484A6; }
.input:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239AA8C7' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }

/* ---------- Cards, chips, notes ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 13px; color: var(--soft); font-weight: 600;
}
.note { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.note.is-error { color: var(--danger-text); }
.note.is-ok { color: var(--green); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--green); }
.dot.amber { background: var(--amber); }

/* ---------- Home page ---------- */
.hero {
  display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding: 40px 0 8px;
}
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-kicker { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--amber-text); }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 800; }
.hero h1 span { color: var(--blue-300); }
.hero p.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--soft); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.join-form { display: flex; gap: 8px; flex: 1 1 260px; max-width: 360px; }
.join-form .input { height: 52px; border-radius: 14px; }

.hero-visual { flex: 1 1 420px; min-width: 0; }
.mini-stage { position: relative; container-type: inline-size; }
.mini-slide {
  aspect-ratio: 16 / 9; background: #fff; border-radius: 18px; color: #0B1430;
  padding: 7cqw; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.mini-slide small { font-size: 2.2cqw; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.mini-slide strong { font-size: 6cqw; line-height: 1.08; letter-spacing: -0.03em; max-width: 70%; }
.mini-lines { display: flex; flex-direction: column; gap: 2cqw; }
.mini-lines span { height: 1.8cqw; border-radius: 99px; background: #E3ECFD; }
.mini-bubble {
  position: absolute; right: 5cqw; bottom: 5cqw; width: 19cqw; height: 19cqw; border-radius: 50%;
  background: #1E3A8A; border: 4px solid var(--blue);
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.22); color: #fff; font-weight: 800; font-size: 5cqw;
  display: flex; align-items: center; justify-content: center;
}
.mini-people { display: flex; gap: 10px; margin-top: 14px; }
.mini-people span {
  flex: 1; aspect-ratio: 16 / 10; border-radius: 12px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-top: 16px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-icon {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; background: var(--blue-soft); color: var(--blue-300);
  display: flex; align-items: center; justify-content: center;
}
.feature h3 { margin: 0 0 4px; font-size: 15px; }
.feature p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Lobby ---------- */
.lobby { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.lobby-preview { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.lobby-side { flex: 1 1 320px; min-width: 0; }

.preview-box {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
}
.preview-box video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-avatar {
  width: 96px; height: 96px; border-radius: 50%; background: #1E3A8A; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 30px;
}
.preview-name {
  position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px;
  background: rgba(5, 11, 31, 0.72); font-size: 13px; font-weight: 700;
}
.preview-controls {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; gap: 10px; padding: 8px; border-radius: 18px; background: rgba(5, 11, 31, 0.72);
}
.preview-msg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; color: var(--soft); font-size: 14px; line-height: 1.5;
}

.meter { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.meter-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-fill { height: 100%; width: 0%; border-radius: 999px; background: var(--blue); transition: width .08s linear; }

.device-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.join-card { display: flex; flex-direction: column; gap: 18px; }
.join-card h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.code-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.code-text { font-size: 15px; font-weight: 700; letter-spacing: .04em; }

@media (max-width: 640px) {
  .page { padding: 16px; }
  .join-form { max-width: none; }
}

/* =====================================================================
   CALL SCREEN (Stage 2) — design A
   ===================================================================== */
.call {
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; gap: 16px;
  padding: 16px 20px 18px; overflow: hidden;
}

/* ---------- Call top bar ---------- */
.call-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.call-top-left, .call-top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.divider-v { width: 1px; height: 28px; background: rgba(148, 163, 196, 0.22); }
.call-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.call-title strong { font-size: 15px; }
.call-title span { font-size: 12.5px; color: var(--muted); }
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.12); color: var(--amber-text);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.data-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--soft);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums;
}
.data-chip:hover { border-color: var(--line-strong); }
.data-chip svg { width: 18px; height: 18px; color: var(--muted); }
.data-chip.is-saving svg { color: var(--green); }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack span {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -9px;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff;
}
.avatar-stack span:first-child { margin-left: 0; }
.avatar-stack .more { background: var(--surface-2); color: var(--soft); font-size: 10.5px; }

/* ---------- Video grid ---------- */
.stage { flex: 1; min-height: 0; position: relative; }
.grid { display: grid; gap: 12px; height: 100%; justify-content: center; align-content: center; }
.tile {
  position: relative; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--surface-2);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  container-type: inline-size; transition: box-shadow .2s ease;
}
.tile video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none;
}
.tile.has-video video { display: block; }
.tile.has-video .tile-avatar { display: none; }
.tile.is-local video { transform: scaleX(-1); }
.tile.is-speaking { box-shadow: 0 0 0 3px var(--blue), 0 0 0 8px rgba(37, 99, 235, 0.25); }
.tile-avatar {
  width: 22cqw; max-width: 132px; min-width: 48px; aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: clamp(16px, 6.5cqw, 40px);
}
.tile-label {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  background: rgba(5, 11, 31, 0.72); font-size: 12.5px; font-weight: 700;
}
.tile-label .tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-label svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--danger-text); }
.tile-badge {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.9); color: #1F1300; font-size: 11px; font-weight: 800;
}

/* ---------- Floating control dock ---------- */
.dock-wrap { display: flex; justify-content: center; }
.dock {
  position: relative; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  padding: 10px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.dock-btn {
  width: 48px; height: 48px; border-radius: 14px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.07); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; transition: background-color .15s ease;
}
.dock-btn:hover { background: rgba(255, 255, 255, 0.13); }
.dock-btn svg { width: 21px; height: 21px; }
.dock-btn.is-off { background: var(--danger); color: #fff; }
.dock-btn.is-active { background: var(--blue-soft); color: var(--blue-300); }
.dock-sep { width: 1px; height: 28px; background: rgba(148, 163, 196, 0.22); margin: 0 4px; }
.btn-leave {
  height: 48px; padding: 0 18px; border-radius: 14px; border: none; cursor: pointer;
  background: var(--danger); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-leave:hover { background: #B91C1C; }
.btn-leave svg { width: 20px; height: 20px; }

/* ---------- Data saver menu ---------- */
.menu {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  width: min(340px, calc(100vw - 32px)); z-index: 20;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; padding: 10px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}
.menu-title { padding: 6px 10px 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.menu-option {
  width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px;
  border: none; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.menu-option:hover { background: rgba(255, 255, 255, 0.05); }
.menu-option[aria-checked="true"] { background: var(--blue-soft); }
.menu-radio {
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--muted); display: flex; align-items: center; justify-content: center;
}
.menu-option[aria-checked="true"] .menu-radio { border-color: var(--blue-300); }
.menu-option[aria-checked="true"] .menu-radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-300);
}
.menu-option strong { display: block; font-size: 14px; }
.menu-option small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.menu-foot {
  margin-top: 6px; padding: 10px 12px 4px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--soft); display: flex; justify-content: space-between;
}

/* ── Compact data menu ── */
.data-menu {
  width: auto; min-width: 160px; padding: 6px 6px 4px;
}
.dm-item {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 10px;
  border: none; background: transparent; color: var(--soft);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background .12s ease, color .12s ease;
}
.dm-item:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.dm-item[aria-checked="true"] { background: var(--blue-soft); color: #fff; }
.dm-dot {
  width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--muted);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.dm-item[aria-checked="true"] .dm-dot {
  border-color: var(--blue-300);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 7px var(--blue-300);
}
.dm-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 10px 6px; margin-top: 2px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.dm-foot strong { color: var(--soft); font-weight: 600; }

/* ── Compact present menu ── */
.present-menu {
  width: auto;
  min-width: 0;
  padding: 6px;
  display: flex;
  flex-direction: row;
  gap: 4px;
  border-radius: 20px;
}
.pm-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 14px;
  border: none; border-radius: 14px;
  background: transparent; color: var(--soft);
  font: inherit; cursor: pointer;
  transition: background .12s ease, color .12s ease;
  min-width: 68px;
}
.pm-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.pm-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .12s ease;
}
.pm-item:hover .pm-icon { background: rgba(255,255,255,0.13); }
.pm-icon svg { width: 18px; height: 18px; }
.pm-label {
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  display: flex; align-items: center; gap: 4px;
}
.pm-label em {
  font-style: normal; font-size: 10px; font-weight: 700;
  background: rgba(96,165,250,0.18); color: var(--blue-300);
  padding: 1px 5px; border-radius: 5px; letter-spacing: .03em;
}

/* ---------- Toasts, banners ---------- */
.toasts {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-strong);
  font-size: 13.5px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: toast-in .2s ease;
}
.toast.is-warning { background: #3B2A05; border-color: rgba(245, 158, 11, 0.5); color: var(--amber-text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.audio-unlock {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 40;
}

/* ---------- After leaving ---------- */
.left-card { max-width: 460px; margin: 12vh auto 0; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.left-card h1 { margin: 0; font-size: 26px; }
.left-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 640px) {
  .call { padding: 12px 12px 14px; gap: 12px; }
  .call-title span, .divider-v, .avatar-stack, .invite-label { display: none; }
  .dock { gap: 6px; padding: 8px; }
  .dock-btn { width: 44px; height: 44px; }
  .btn-leave { height: 44px; padding: 0 14px; }
  .btn-leave span { display: none; }
}

/* =====================================================================
   PRESENTING (Stage 3)
   ===================================================================== */
.stage.is-presenting { display: flex; flex-direction: column; gap: 12px; }
.present-area { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.slide-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; }
.slide-frame {
  position: relative; border-radius: 18px; overflow: hidden; background: #fff; container-type: inline-size;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}
.present-area[data-mode="screen"] .slide-frame { background: #000; }
.slide-canvas { display: block; width: 100%; height: 100%; }
.screen-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.slide-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: #fff; color: #56627F; font-size: 15px; font-weight: 600;
  padding: 24px; text-align: center; line-height: 1.5;
}
.slide-frame.laser-on { cursor: none; }
.laser-dot {
  position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; pointer-events: none;
  background: #EF4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3), 0 0 18px 6px rgba(239, 68, 68, 0.55); z-index: 3;
}
.present-bubble {
  position: absolute; right: 2.5cqw; bottom: 2.5cqw; width: 13cqw; min-width: 64px; max-width: 160px; aspect-ratio: 1;
  border-radius: 50%; overflow: hidden; background: var(--bubble-bg, #1E3A8A);
  border: 4px solid var(--blue); box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.22), 0 14px 30px rgba(5, 11, 31, 0.35);
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.present-bubble video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.present-bubble.has-video video { display: block; }
.present-bubble.is-local video { transform: scaleX(-1); }
.present-bubble span { color: #fff; font-weight: 800; font-size: clamp(16px, 3.4cqw, 40px); }
.present-bubble.has-video span { display: none; }
.present-tag {
  position: absolute; left: 2cqw; top: 2cqw; padding: 5px 12px; border-radius: 999px; z-index: 2;
  background: rgba(5, 11, 31, 0.8); color: #fff; font-size: 12px; font-weight: 700;
}

.slide-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.bar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bar-info { font-size: 13.5px; font-weight: 600; color: var(--soft); padding: 0 6px; }
.bar-btn {
  height: 38px; min-width: 38px; padding: 0 10px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.bar-btn:hover:not(:disabled) { border-color: var(--line-strong); }
.bar-btn:disabled { opacity: .4; cursor: not-allowed; }
.bar-btn svg { width: 17px; height: 17px; }
.bar-pill { padding: 0 14px; }
.bar-btn.is-on { background: var(--blue-soft); color: #BFDBFE; border-color: transparent; }
.bar-stop { background: var(--danger); border-color: transparent; color: #fff; }
.bar-stop:hover:not(:disabled) { background: #B91C1C; }

/* Filmstrip: the video grid turns into a row of small tiles */
.stage.is-presenting .grid {
  height: auto; display: flex; gap: 12px; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px;
}
.stage.is-presenting .grid.is-empty { display: none; }
.stage.is-presenting .tile { flex: 0 0 auto; height: 110px; width: auto; }
.stage.is-presenting .tile-avatar { width: 54px; min-width: 0; font-size: 17px; }
.tile.is-presenter { display: none; }
.stage.is-presenting .tile.is-presenter { display: none; }

.menu-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--blue-soft); color: var(--blue-300);
  display: flex; align-items: center; justify-content: center;
}
.menu-icon svg { width: 18px; height: 18px; }

@media (max-width: 640px) {
  .stage.is-presenting .tile { height: 78px; }
  .present-tag { display: none; }
}

/* =====================================================================
   SIDE PANEL, HANDS & REACTIONS (Stage 4)
   ===================================================================== */
.call-body { flex: 1; min-height: 0; display: flex; gap: 16px; }
.call-body .stage { flex: 1; min-width: 0; }

.side-panel {
  flex: 0 0 360px; min-height: 0; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px;
}
.panel-top { display: flex; align-items: center; gap: 8px; }
.panel-tabs {
  flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  padding: 4px; border-radius: 13px; background: var(--bg);
}
.panel-tabs button {
  height: 34px; border-radius: 9px; border: none; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
}
.panel-tabs button:hover { color: var(--text); }
.panel-tabs button[aria-selected="true"] { background: var(--blue); color: #fff; font-weight: 700; }
.tab-badge {
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--amber); color: #1F1300;
  font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.tab-count { font-size: 11px; opacity: .8; }
.panel-close {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; border: none; cursor: pointer;
  background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
}
.panel-close:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.panel-close svg { width: 18px; height: 18px; }

.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.pane[hidden] { display: none; }
.pane-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 2px; }
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pane-head strong { font-size: 14px; }
.pane-head span { font-size: 12px; color: var(--muted); }
.pane-form { display: flex; gap: 8px; }
.pane-form .input { height: 44px; }
.send-btn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; border: none; cursor: pointer;
  background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.send-btn:hover { background: var(--blue-hover); }
.send-btn svg { width: 18px; height: 18px; }
.panel-empty { margin: auto; padding: 24px; text-align: center; color: var(--muted); font-size: 13.5px; }
.panel-subhead { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.link-btn {
  background: none; border: none; padding: 4px 6px; border-radius: 8px; cursor: pointer;
  color: var(--blue-300); font: inherit; font-size: 12.5px; font-weight: 700; text-decoration: none;
}
.link-btn:hover { background: var(--blue-soft); color: var(--blue-300); }

/* Chat */
.chat-list { gap: 2px; }
.chat-msg { padding: 8px 4px 2px; }
.chat-msg.is-grouped { padding-top: 2px; }
.chat-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.chat-head strong { font-size: 13px; }
.chat-msg.is-mine .chat-head strong { color: var(--blue-300); }
.chat-head span { font-size: 11.5px; color: var(--muted); }
.chat-text { font-size: 14px; line-height: 1.45; color: var(--soft); overflow-wrap: anywhere; }

/* People */
.person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.person:hover { background: rgba(255, 255, 255, 0.04); }
.person-avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.person-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hand-chip { padding: 3px 8px; border-radius: 999px; background: var(--amber); color: #1F1300; font-size: 11px; font-weight: 800; white-space: nowrap; }
.person-muted { color: var(--danger-text); display: inline-flex; }
.person-muted svg { width: 16px; height: 16px; }

/* Q&A */
.qa-card { padding: 12px; border-radius: 14px; background: var(--surface-2); display: flex; gap: 12px; border: 1px solid transparent; }
.qa-card.is-answering { border-color: rgba(245, 158, 11, 0.5); }
.qa-card.is-answered { opacity: .6; }
.qa-vote {
  width: 44px; height: 52px; flex-shrink: 0; border-radius: 11px; border: none; cursor: pointer;
  background: rgba(96, 165, 250, 0.12); color: var(--blue-300); font: inherit; font-weight: 800; font-size: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.qa-vote svg { width: 15px; height: 15px; }
.qa-vote.is-voted { background: var(--blue); color: #fff; }
.qa-card.is-answering .qa-vote:not(.is-voted) { background: rgba(245, 158, 11, 0.16); color: var(--amber-text); }
.qa-vote:disabled { cursor: default; }
.qa-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.qa-text { margin: 0; font-size: 13.5px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.qa-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.qa-tag { padding: 2px 8px; border-radius: 999px; background: var(--amber); color: #1F1300; font-weight: 800; font-size: 10.5px; }
.qa-tag.is-done { background: rgba(52, 211, 153, 0.18); color: var(--green); }
.qa-actions { display: flex; gap: 4px; margin-left: -6px; }

/* Polls */
.poll-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--bg); }
.poll-form .input { height: 42px; }
.poll-options { display: flex; flex-direction: column; gap: 8px; }
.poll-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.poll-form-actions .btn { height: 40px; }
.poll-card { padding: 14px; border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.poll-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.poll-head strong { font-size: 14px; line-height: 1.35; }
.poll-head span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.poll-option {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.poll-option:hover:not(:disabled) { border-color: var(--line-strong); }
.poll-option:disabled { cursor: default; }
.poll-option.is-mine { border-color: var(--blue); }
.poll-row { display: flex; justify-content: space-between; gap: 8px; }
.poll-pct { color: var(--soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.poll-bar { height: 6px; border-radius: 999px; background: var(--surface); overflow: hidden; }
.poll-fill { display: block; height: 100%; border-radius: 999px; background: var(--blue); transition: width .3s ease; }
.poll-option.is-mine .poll-fill { background: var(--amber); }
.poll-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; color: var(--muted); }

/* Dock additions */
.dock-btn.is-raised { background: var(--amber); color: #1F1300; }
.dock-btn.has-dot { position: relative; }
.btn-dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--surface); }
.react-menu {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding: 8px; max-width: calc(100vw - 32px);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}
.react-option {
  width: 44px; height: 44px; border-radius: 12px; border: none; background: transparent; cursor: pointer;
  font-size: 24px; line-height: 1; transition: transform .12s ease, background-color .12s ease;
}
.react-option:hover { background: rgba(255, 255, 255, 0.08); transform: scale(1.15); }

/* =====================================================================
   CIRCULAR PARTICIPANT TILES — shown in the strip while presenting
   When a presentation is active, non-main tiles become circular avatars
   in a horizontal strip. lobby.js adds .is-presenting to .stage and
   .is-strip to the participant tiles that appear below the slide.
   ===================================================================== */
.stage.is-presenting .grid {
  /* Horizontal strip of circles along the bottom */
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: auto;
  padding: 6px 0;
}
.stage.is-presenting .grid .tile {
  /* Override rectangular tile → circle */
  width: 72px;
  height: 72px;
  min-width: 72px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  /* Keep speaking ring visible on circle */
  box-shadow: none;
}
.stage.is-presenting .grid .tile.is-speaking {
  box-shadow: 0 0 0 3px var(--blue), 0 0 0 7px rgba(37, 99, 235, 0.28);
}
.stage.is-presenting .grid .tile.has-hand {
  box-shadow: 0 0 0 3px var(--amber);
}
/* Hide tile label text in strip — name shown on hover via title */
.stage.is-presenting .grid .tile .tile-label { display: none; }
/* Show label on hover for accessibility */
.stage.is-presenting .grid .tile:hover .tile-label {
  display: inline-flex;
  /* float above the circle */
  bottom: auto; top: -32px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 11px; padding: 3px 8px;
}
/* Avatar inside circle fills it */
.stage.is-presenting .grid .tile .tile-avatar {
  width: 100%; max-width: 100%; min-width: 0;
  font-size: clamp(14px, 5cqw, 26px);
}
/* Badge (raised hand overlay) */
.stage.is-presenting .grid .tile .tile-badge { font-size: 9px; padding: 2px 6px; left: 50%; transform: translateX(-50%); top: 2px; }

/* Fallback: if lobby.js does not add .is-presenting, tiles stay rectangular.
   The strip below preserves the original grid behaviour. */

/* Hands on tiles */
.tile.has-hand { box-shadow: 0 0 0 2px var(--amber); }
.tile.has-hand.is-speaking { box-shadow: 0 0 0 3px var(--blue), 0 0 0 8px rgba(37, 99, 235, 0.25); }
.tile-hand {
  position: absolute; right: 10px; top: 10px; height: 26px; padding: 0 9px; border-radius: 999px;
  background: var(--amber); color: #1F1300; font-size: 11.5px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 4px;
}
.tile-hand[hidden] { display: none; }
.tile-hand svg { width: 14px; height: 14px; }

/* Floating reactions */
.stage { position: relative; }
.reaction-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 6; }
.reaction {
  position: absolute; bottom: 8px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  animation: float-up 3.2s ease-out forwards;
}
.reaction-emoji { font-size: 40px; line-height: 1; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35)); }
.reaction-name { padding: 2px 8px; border-radius: 999px; background: rgba(5, 11, 31, 0.8); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
@keyframes float-up {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  12% { transform: translateY(-30px) scale(1); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(-320px) scale(1); opacity: 0; }
}

@media (max-width: 900px) {
  .side-panel {
    position: fixed; inset: 0; z-index: 60; border-radius: 0; border: none;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  .reaction { animation-duration: 1.6s; }
}
@media (max-width: 640px) {
  .dock { gap: 4px; padding: 6px; border-radius: 18px; }
  .dock-sep { display: none; }
  .dock-btn { width: 40px; height: 40px; border-radius: 12px; }
  .dock-btn svg { width: 19px; height: 19px; }
  .btn-leave { height: 40px; padding: 0 12px; border-radius: 12px; }
  .toast { max-width: calc(100vw - 32px); text-align: center; }
}

/* =====================================================================
   HOST CONTROLS, SIGN-IN & WAITING ROOM (Stage 5)
   ===================================================================== */
.account { display: flex; align-items: center; gap: 8px; }
.account-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800;
}

.host-chip {
  padding: 2px 7px; border-radius: 999px; background: var(--blue-soft); color: #BFDBFE;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.host-chip[hidden] { display: none; }
.tile-label .host-chip { background: var(--blue); color: #fff; }

.host-box, .waiting-box {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px;
  border-radius: 16px; background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
}
.host-box[hidden], .waiting-box[hidden] { display: none; }
.waiting-box { border-color: rgba(245, 158, 11, 0.35); background: rgba(245,158,11,0.04); }

/* Host controls layout */
.hc-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.hc-toggles { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.hc-mute {
  flex-shrink: 0; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent;
  color: var(--soft); font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.hc-mute:hover { background: rgba(255,255,255,0.07); color: var(--text); border-color: var(--muted); }
.hc-presenters {
  margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.4;
}

/* Switch rows — label only, no hint text */
.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 5px 0;
}
.switch-text { flex: 1; }
.switch-label { font-size: 13px; font-weight: 500; color: var(--soft); }

/* Toggle switch */
.switch {
  position: relative; width: 36px; height: 22px; flex-shrink: 0;
  border-radius: 999px; border: none; cursor: pointer;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color .15s ease;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .15s ease;
}
.switch[aria-checked="true"] { background: var(--blue); box-shadow: none; }
.switch[aria-checked="true"]::after { transform: translateX(14px); }
.switch:disabled { opacity: .5; cursor: wait; }

.btn-small { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; }
.link-btn.danger { color: var(--danger-text); }
.link-btn.danger:hover { background: rgba(220, 38, 38, 0.14); }
.link-btn.is-confirm { background: var(--danger); color: #fff; }
.icon-mini {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; border: 1px solid var(--line); cursor: pointer;
  background: var(--surface-2); color: var(--soft); display: inline-flex; align-items: center; justify-content: center;
}
.icon-mini:hover { border-color: var(--line-strong); color: var(--text); }
.icon-mini svg { width: 15px; height: 15px; }

.wait-spinner {
  width: 44px; height: 44px; margin: 0 auto; border-radius: 50%;
  border: 4px solid var(--surface-2); border-top-color: var(--blue); animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wait-spinner { animation-duration: 3s; } }

/* =====================================================================
   INSTALL PAGE (Stage 7)
   ===================================================================== */
.install-status { font-size: 14px; line-height: 1.5; color: var(--soft); min-height: 21px; }
.install-status.is-ok { color: var(--green); font-weight: 600; }

.app-window {
  border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.app-window-bar {
  display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.app-window-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgba(148, 163, 196, 0.35); }
.app-window-bar strong { margin-left: 8px; font-size: 12.5px; color: var(--soft); }
.app-window-body { padding: 18px; }
.app-window-body .mini-slide { box-shadow: none; }
.dock-preview {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 16px 10px 10px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--soft);
}
.dock-preview img { width: 44px; height: 44px; }

.install-guides h2 { margin: 0 0 16px; font-size: 24px; letter-spacing: -0.02em; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.guide {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px;
}
.guide.is-current { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18); }
.guide h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guide-tag { padding: 3px 9px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; }
.guide ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.guide li { font-size: 13.5px; line-height: 1.5; color: var(--soft); }
.guide li strong { color: var(--text); }

.topbar-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* =====================================================================
   PHONE CALL LAYOUT FIX — bigger videos, one-row controls
   ===================================================================== */
.stage:not(.is-presenting) .grid .tile { aspect-ratio: auto; height: var(--tile-h, auto); }
@media (max-width: 640px) {
  .call { gap: 10px; padding: 10px 10px 12px; }
  .grid { gap: 8px; }
  .call-top { gap: 8px; flex-wrap: nowrap; }
  .call-top-left { gap: 8px; flex-wrap: nowrap; min-width: 0; }
  .call-top-right { gap: 6px; flex-wrap: nowrap; }
  .call-top .logo-name, .call-top .live-pill .dot { display: none; }
  .call-top .logo-mark { width: 32px; height: 32px; border-radius: 9px; }
  .call-title strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .live-pill { padding: 4px 9px; font-size: 12px; }
  .data-chip { height: 34px; padding: 0 9px; font-size: 11.5px; gap: 6px; }
  .data-chip svg { width: 15px; height: 15px; }
  #inviteBtn { height: 34px !important; padding: 0 10px; border-radius: 10px; }

  /* Controls: one row that always fits the screen */
  .dock-wrap { width: 100%; }
  .dock { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 4px; padding: 6px; border-radius: 16px; }
  .dock-btn { flex: 1 1 0; min-width: 0; width: auto; height: 42px; border-radius: 11px; }
  .dock-btn svg { width: 19px; height: 19px; }
  .btn-leave { flex: 1.2 1 0; min-width: 0; height: 42px; padding: 0; border-radius: 11px; justify-content: center; }
  .btn-dot { top: 6px; right: calc(50% - 15px); }
}
@media (max-width: 380px) {
  .data-chip span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 640px) {
  .dc-mode { display: none; }
  .call-top-left { flex: 1 1 auto; }
  .call-title { min-width: 0; }
}

/* =====================================================================
   LANDING PAGE — "Bold" design
   ===================================================================== */
html { scroll-behavior: smooth; }
body.lp { overflow-x: hidden; }
.lp-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Nav */
.lp-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.lp-nav .logo-name { font-size: 20px; }
.lp-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lp-links > a { padding: 10px 14px; border-radius: 10px; color: var(--soft); font-size: 14px; font-weight: 600; text-decoration: none; }
.lp-links > a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.lp-links .account { margin-left: 6px; }
.lp-signin {
  height: 42px; padding: 0 18px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--text); color: var(--bg); font: inherit; font-size: 14px; font-weight: 800;
}
.lp-signin:hover { background: #fff; }

/* Hero */
.lp-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 48px; padding-bottom: 72px; }
.lp-hero-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.lp-badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid rgba(148, 163, 196, 0.2); font-size: 13px; font-weight: 600; color: var(--soft);
}
.lp-badge span { padding: 3px 9px; border-radius: 999px; background: var(--amber-text); color: #1F1300; font-size: 11px; font-weight: 800; }
.lp-title { margin: 0; font-size: clamp(44px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; }
.lp-title em { font-style: normal; color: var(--blue-300); }
.lp-pill {
  display: inline-flex; align-items: center; vertical-align: middle; height: 0.92em; padding: 0 0.16em 0 0.1em; margin: 0 0.06em;
  border-radius: 999px; background: var(--surface-2); border: 2px solid rgba(148, 163, 196, 0.25);
}
.lp-pill span { width: 0.66em; height: 0.66em; border-radius: 50%; border: 3px solid var(--surface-2); margin-left: -0.2em; }
.lp-pill span:first-child { margin-left: 0; }
.lp-pill i { width: 0.2em; height: 0.2em; border-radius: 50%; background: var(--green); margin-left: 0.14em; }
.lp-lead { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.6; color: var(--soft); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 10px; max-width: 580px; }
.lp-btn-big { height: 56px; padding: 0 24px; border-radius: 15px; font-size: 15.5px; font-weight: 800; }
.lp-join {
  flex: 1 1 260px; display: flex; gap: 6px; padding: 5px; border-radius: 17px;
  background: var(--surface); border: 1px solid rgba(148, 163, 196, 0.25);
}
.lp-join:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }
.lp-join input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: none; background: transparent;
  color: var(--text); font: inherit; font-size: 15px; outline: none;
}
.lp-join input::placeholder { color: #7484A6; }
.lp-join button {
  height: 44px; padding: 0 18px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--text); color: var(--bg); font: inherit; font-size: 14.5px; font-weight: 800;
}
.lp-join button:hover { background: #fff; }
.lp-small { margin: -10px 0 0; font-size: 13px; color: var(--muted); }
#homeMsg:empty { display: none; }
#homeMsg { margin-top: -12px; }

/* Collage */
.lp-collage { flex: 1 1 520px; min-width: 0; position: relative; padding: 56px 28px 64px 0; container-type: inline-size; }
.lp-block { position: absolute; top: 0; bottom: 0; left: 14%; right: 0; border-radius: 36px; background: var(--blue); }
.lp-window {
  position: relative; border-radius: 20px; background: var(--surface); border: 1px solid rgba(148, 163, 196, 0.25);
  box-shadow: 0 40px 80px rgba(2, 6, 23, 0.55); overflow: hidden;
}
.lp-window-bar { height: 36px; padding: 0 14px; display: flex; align-items: center; gap: 7px; background: var(--surface-2); }
.lp-window-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(148, 163, 196, 0.4); }
.lp-window-bar b { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: rgba(245, 158, 11, 0.16); color: var(--amber-text); font-size: 11px; font-weight: 800; }
.lp-window-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lp-slide {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; background: #fff; color: #0B1430;
  padding: 6% 7%; display: flex; flex-direction: column; justify-content: space-between;
}
.lp-slide-top { display: flex; flex-direction: column; gap: 1.6cqw; }
.lp-slide small { font-size: 1.6cqw; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.lp-slide strong { font-size: 4.6cqw; line-height: 1.06; letter-spacing: -0.03em; max-width: 70%; }
.lp-slide-lines { display: flex; flex-direction: column; gap: 1.2cqw; max-width: 50%; }
.lp-slide-lines span { height: 1.4cqw; border-radius: 99px; background: #E3ECFD; }
.lp-slide .lp-laser { left: 44%; top: 62%; width: 1.8cqw; height: 1.8cqw; box-shadow: 0 0 0 0.8cqw rgba(239, 68, 68, 0.28); }
.lp-laser { position: absolute; border-radius: 50%; background: #EF4444; }
.lp-bubble {
  position: absolute; right: 3.5cqw; bottom: 3.5cqw; width: 14cqw; height: 14cqw; border-radius: 50%;
  background: #1E3A8A; border: 4px solid var(--blue); box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.25);
  color: #fff; font-size: 3.6cqw; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.lp-film { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lp-film span { aspect-ratio: 16 / 10; border-radius: 9px; }
.lp-film .more { background: var(--surface-2); color: var(--soft); font-size: 1.8cqw; font-weight: 800; display: flex; align-items: center; justify-content: center; }

.lp-float { position: absolute; display: flex; align-items: center; gap: 10px; border-radius: 14px; box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45); }
.lp-float strong { display: block; font-size: 13px; }
.lp-float small { display: block; font-size: 11.5px; }
.lp-float .ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.lp-float-hand { top: 14px; left: 8%; padding: 10px 14px 10px 10px; background: var(--amber-text); color: #1F1300; }
.lp-float-hand small { font-weight: 600; }
.lp-float-hand .ic { background: rgba(31, 19, 0, 0.12); }
.lp-float-qa {
  right: 0; top: 44%; width: min(250px, 52%); padding: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid rgba(148, 163, 196, 0.28); box-shadow: 0 24px 50px rgba(2, 6, 23, 0.55);
}
.lp-float-qa .vote {
  width: 38px; height: 46px; flex-shrink: 0; border-radius: 10px; background: var(--blue); color: #fff;
  font-size: 13px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.lp-float-qa strong { font-size: 12.5px; line-height: 1.35; }
.lp-float-qa em {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--amber);
  color: #1F1300; font-size: 9.5px; font-weight: 800; font-style: normal;
}
.lp-float-data { left: 3%; bottom: 18px; padding: 10px 16px 10px 10px; background: var(--bg); border: 1px solid rgba(52, 211, 153, 0.4); }
.lp-float-data .ic { background: rgba(52, 211, 153, 0.16); color: var(--green); }
.lp-float-data small { color: var(--muted); }
.lp-float-reacts { position: absolute; right: 24%; top: 8px; display: flex; gap: 8px; }
.lp-float-reacts span {
  width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.4);
}
.lp-float-reacts .heart { background: #FFE4E6; color: #E11D48; }
.lp-float-reacts .thumb { background: #FEF3C7; color: #B45309; margin-top: 14px; }

/* Feature strip */
.lp-strip { border-top: 1px solid rgba(148, 163, 196, 0.14); border-bottom: 1px solid rgba(148, 163, 196, 0.14); background: var(--surface); }
.lp-strip .lp-wrap {
  padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 10px 22px; font-size: 14px; font-weight: 700; color: var(--soft);
}
.lp-strip i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber-text); }

/* Sections */
.lp-section { padding-top: 88px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 32px; }
#how.lp-section { padding-top: 8px; padding-bottom: 88px; gap: 40px; }
.lp-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.lp-section-head h2, .lp-h2 { margin: 0; max-width: 620px; font-size: clamp(30px, 3.8vw, 48px); line-height: 1.08; letter-spacing: -0.035em; }
.lp-section-head h2 span { color: var(--muted); }
.lp-section-head p { margin: 0; max-width: 360px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* Bento */
.lp-bento { display: flex; flex-wrap: wrap; gap: 18px; }
.lp-card {
  flex: 1 1 300px; min-width: 0; padding: 28px; border-radius: 28px; background: var(--surface);
  border: 1px solid rgba(148, 163, 196, 0.16); display: flex; flex-direction: column; gap: 18px;
}
.lp-card h3 { margin: 0; font-size: 20px; letter-spacing: -0.01em; line-height: 1.2; }
.lp-card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.lp-tag { align-self: flex-start; display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.lp-wide { flex: 2 1 560px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 28px; padding: 32px; }
.lp-card-white { background: #fff; color: #0B1430; border-color: transparent; }
.lp-card-white .lp-tag { background: #E3ECFD; color: #1D4ED8; }
.lp-card-white h3 { font-size: 26px; letter-spacing: -0.02em; }
.lp-card-white p { font-size: 15px; line-height: 1.6; color: #3B4763; }
.lp-card-text { flex: 1 1 240px; display: flex; flex-direction: column; gap: 12px; }
.lp-mini-stage { flex: 1 1 260px; position: relative; aspect-ratio: 16 / 10; border-radius: 16px; background: var(--surface); padding: 18px; }
.lp-mini-slide { height: 100%; border-radius: 10px; background: #fff; border: 1px solid #DCE3EE; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.lp-mini-slide span { height: 7px; border-radius: 99px; background: #E3ECFD; }
.lp-mini-slide .big { height: 13px; background: #0B1430; }
.lp-mini-stage .lp-laser { left: 46%; top: 60%; width: 12px; height: 12px; box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.28); }
.lp-mini-bubble { position: absolute; right: 26px; bottom: 26px; width: 48px; height: 48px; border-radius: 50%; background: #1E3A8A; border: 3px solid var(--blue); box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.25); }

.lp-card-blue { background: var(--blue); border-color: transparent; color: #fff; justify-content: space-between; gap: 22px; padding: 32px; }
.lp-card-blue > div:first-child { display: flex; flex-direction: column; gap: 10px; }
.lp-card-blue .lp-tag { background: rgba(255, 255, 255, 0.18); }
.lp-card-blue h3 { font-size: 26px; letter-spacing: -0.02em; }
.lp-big-number { display: flex; flex-direction: column; gap: 4px; }
.lp-big-number strong { font-size: 64px; line-height: 1; letter-spacing: -0.04em; }
.lp-big-number strong span { font-size: 26px; letter-spacing: 0; }
.lp-big-number small { font-size: 14px; color: #DBEAFE; }
.lp-modes { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-modes span { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.4); font-size: 12.5px; font-weight: 700; }
.lp-modes .on { background: #fff; color: #1D4ED8; border-color: #fff; font-weight: 800; }

.lp-inset { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 16px; background: var(--bg); }
.lp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; }
.lp-switch { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px rgba(148, 163, 196, 0.3); }
.lp-switch::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.lp-switch.on { background: var(--blue); box-shadow: none; }
.lp-switch.on::after { left: auto; right: 3px; }
.lp-admit { padding: 6px 12px; border-radius: 9px; background: var(--blue); font-size: 12.5px; font-weight: 800; }
.lp-qa { display: flex; flex-direction: column; gap: 10px; }
.lp-qa > div { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--bg); font-size: 13.5px; font-weight: 600; }
.lp-qa .v { width: 40px; flex-shrink: 0; padding: 6px 0; border-radius: 10px; background: var(--blue-soft); color: var(--blue-300); text-align: center; font-weight: 800; font-size: 14px; }
.lp-qa .v.on { background: var(--blue); color: #fff; }
.lp-app { flex-direction: row; align-items: center; gap: 14px; }
.lp-app img { border-radius: 15px; flex-shrink: 0; }
.lp-app strong { display: block; font-size: 15px; }
.lp-app small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.lp-link { font-size: 14px; font-weight: 700; text-decoration: none; }

/* Steps */
.lp-steps { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 40px 24px; }
.lp-steps li { flex: 1 1 260px; border-top: 2px dashed rgba(148, 163, 196, 0.3); display: flex; flex-direction: column; gap: 12px; }
.lp-steps .n {
  width: 44px; height: 44px; margin-top: -23px; border-radius: 50%; background: var(--blue); color: #fff;
  font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px var(--bg);
}
.lp-steps .n.amber { background: var(--amber-text); color: #1F1300; }
.lp-steps strong { font-size: 18px; }
.lp-steps p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }

/* Closing band */
.lp-band-wrap { padding-bottom: 72px; }
.lp-band {
  border-radius: 36px; background: var(--blue); padding: clamp(32px, 6vw, 72px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
}
.lp-band h2 { margin: 0; max-width: 560px; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.05; letter-spacing: -0.04em; color: #fff; }
.lp-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-btn-white, .lp-btn-outline {
  height: 56px; padding: 0 26px; border-radius: 15px; font: inherit; font-size: 15.5px; font-weight: 800; cursor: pointer;
}
.lp-btn-white { border: none; background: #fff; color: var(--bg); }
.lp-btn-white:hover { background: #EFF4FF; }
.lp-btn-white:disabled { opacity: .7; cursor: wait; }
.lp-btn-outline { background: transparent; border: 2px solid rgba(255, 255, 255, 0.7); color: #fff; }
.lp-btn-outline:hover { background: rgba(255, 255, 255, 0.1); }

/* Footer */
.lp-footer {
  padding-top: 28px; padding-bottom: 40px; border-top: 1px solid rgba(148, 163, 196, 0.14);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted);
}
.lp-footer-brand { display: flex; align-items: center; gap: 10px; }
.lp-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.lp-footer-links a { text-decoration: none; }
.lp-footer-links a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .lp-wrap { padding-left: 16px; padding-right: 16px; }
  .lp-links > a[href^="#"] { display: none; }
  .lp-hero { padding-top: 20px; gap: 40px; }
  .lp-collage { padding: 44px 12px 56px 0; }
  .lp-float-qa { display: none; }
  .lp-float-hand { left: 0; }
  .lp-actions .lp-btn-big { flex: 1 1 100%; justify-content: center; }
  .lp-section { padding-top: 64px; }
  .lp-wide { padding: 24px; }
  .lp-card-blue { padding: 24px; }
}

/* =====================================================================
   LOBBY — "Mirror" design
   ===================================================================== */
.lobby-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.lobby-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.lobby-top .logo-name { font-size: 20px; }
.lobby-top-right { display: flex; align-items: center; gap: 10px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.12); color: var(--amber-text); font-size: 12.5px; font-weight: 800;
}
.live-badge span { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.live-badge[hidden] { display: none; }
.lobby-home { padding: 9px 14px; border-radius: 10px; color: var(--soft); font-size: 14px; font-weight: 600; text-decoration: none; }
.lobby-home:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

.lobby2 { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 8px; padding-bottom: 40px; }

/* Preview */
.lobby2-preview { flex: 1.7 1 560px; min-width: 0; position: relative; padding: 0 0 30px 30px; }
.lobby2-block { position: absolute; left: 0; bottom: 0; width: 72%; height: 72%; border-radius: 34px; background: var(--blue); }
.lobby2-preview .preview-box {
  position: relative; aspect-ratio: 16 / 10; border-radius: 28px; overflow: visible;
  background: #1A2340; box-shadow: 0 30px 70px rgba(2, 6, 23, 0.6);
}
.lobby2-preview .preview-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 28px; transform: scaleX(-1); }
.lobby2-preview .preview-box video[hidden] { display: none; }
.lobby2-preview .preview-avatar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 120px; height: 120px; font-size: 38px; }
.lobby2-preview .preview-name { left: 18px; top: 18px; padding: 7px 14px; font-size: 13.5px; }

.mic-chip {
  position: absolute; right: 18px; top: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
  border-radius: 999px; background: rgba(5, 11, 31, 0.72); font-size: 12.5px; font-weight: 700; color: var(--soft);
}
.mic-chip.is-working { color: var(--green); }
.mic-chip.is-off { color: var(--danger-text); }
.mic-bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.mic-bars i { width: 3px; height: 3px; border-radius: 2px; background: currentColor; transition: height .08s linear; }

.lobby2-preview .preview-controls {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 20px; background: rgba(5, 11, 31, 0.8);
}
.lobby2-preview .icon-btn { width: 50px; height: 50px; border-radius: 15px; background: rgba(255, 255, 255, 0.12); }
.lobby2-preview .icon-btn:hover { background: rgba(255, 255, 255, 0.2); }
.lobby2-preview .icon-btn.is-off { background: var(--danger); }
.pc-sep { width: 1px; height: 26px; background: rgba(255, 255, 255, 0.18); }
.devices-btn { width: auto !important; padding: 0 14px; gap: 8px; font: inherit; font-size: 13.5px; font-weight: 700; }
.devices-btn svg { width: 19px !important; height: 19px !important; }

.device-pop {
  position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 10;
  width: min(420px, calc(100% - 24px)); padding: 16px; border-radius: 18px; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
}
.device-pop[hidden] { display: none; }

/* Join panel */
.lobby2-join { flex: 1 1 380px; min-width: 0; max-width: 440px; display: flex; flex-direction: column; gap: 20px; }
.who-here {
  align-self: flex-start; display: flex; align-items: center; gap: 12px; padding: 7px 16px 7px 7px; border-radius: 999px;
  background: var(--surface); border: 1px solid rgba(148, 163, 196, 0.2); font-size: 13.5px; color: var(--soft); max-width: 100%;
}
.who-here[hidden] { display: none; }
.who-here strong { color: var(--text); }
.who-avatars { display: flex; flex-shrink: 0; }
.who-avatars span {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -10px;
  color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.who-avatars span:first-child { margin-left: 0; }
.lobby2-title { margin: 0; font-size: clamp(34px, 3.6vw, 48px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 800; overflow-wrap: anywhere; }
.lobby2-title span { color: var(--blue-300); }
.host-line { margin: -6px 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.host-line strong { color: var(--text); }
.host-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); }
.code-copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: var(--blue-300); font: inherit; font-size: 14px; font-weight: 700; letter-spacing: .02em;
}
.code-copy:hover { background: var(--blue-soft); }
.lobby2-form { display: flex; flex-direction: column; gap: 18px; }
.lobby2-form .field label, .field-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lobby2-input { height: 54px; border-radius: 14px; background: var(--surface); font-size: 16px; }
.seg {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px;
  background: var(--surface); border: 1px solid rgba(148, 163, 196, 0.18);
}
.seg button {
  height: 44px; border-radius: 10px; border: none; cursor: pointer; background: transparent; color: var(--soft);
  font: inherit; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.seg button svg { width: 15px; height: 15px; flex-shrink: 0; }
.seg button:hover { color: var(--text); }
.seg button[aria-checked="true"] { background: var(--blue); color: #fff; font-weight: 800; }
.lobby2-join-btn { height: 60px; border-radius: 17px; font-size: 17px; font-weight: 800; gap: 12px; }
.lobby2-form #joinMsg:empty { display: none; }
.lobby2-form #joinMsg { margin-top: -6px; }
.join-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -4px; font-size: 13px; color: var(--muted); }
.wait-note { display: inline-flex; align-items: center; gap: 7px; }
.kbd-hint kbd {
  padding: 2px 7px; border-radius: 6px; border: 1px solid rgba(148, 163, 196, 0.35);
  font: inherit; font-size: 12px; font-weight: 700; color: var(--soft);
}
#hostSignIn { align-self: flex-start; margin-top: -8px; }

/* Phones */
@media (max-width: 760px) {
  .lobby-top { padding-top: 14px; padding-bottom: 12px; }
  .lobby-top .logo-mark { width: 34px; height: 34px; border-radius: 10px; }
  .lobby-top .logo-name { font-size: 18px; }
  .lobby-home { display: none; }
  .live-badge { padding: 6px 11px; font-size: 11.5px; }
  .lobby2 { gap: 0; padding-top: 0; padding-bottom: 20px; align-items: stretch; }
  .lobby2-preview { flex-basis: 100%; padding: 0; }
  .lobby2-block { display: none; }
  .lobby2-preview .preview-box { aspect-ratio: 25 / 24; max-height: 56vh; width: 100%; border-radius: 26px; }
  .lobby2-preview .preview-box video { border-radius: 26px; }
  .lobby2-preview .preview-avatar { width: 96px; height: 96px; font-size: 30px; }
  .lobby2-preview .preview-name { left: 14px; top: 14px; font-size: 12.5px; padding: 6px 12px; }
  .mic-chip { right: 14px; top: 14px; padding: 7px 10px; }
  .mic-chip #meterHint { display: none; }
  .lobby2-preview .preview-controls {
    left: auto; right: 12px; bottom: 34px; transform: none; flex-direction: column; gap: 8px; padding: 0; background: none;
  }
  .lobby2-preview .icon-btn { width: 46px; height: 46px; border-radius: 14px; background: rgba(5, 11, 31, 0.72); }
  .pc-sep { display: none; }
  .devices-btn { width: 46px !important; padding: 0; }
  .devices-btn span { display: none; }
  .device-pop { left: 12px; right: 12px; bottom: auto; top: 56px; transform: none; width: auto; }
  .lobby2-join { flex-basis: 100%; max-width: none; gap: 14px; padding-top: 0; }
  .who-here { position: relative; z-index: 2; margin: -20px 0 2px 14px; padding: 6px 14px 6px 6px; font-size: 12.5px; box-shadow: 0 12px 26px rgba(2, 6, 23, 0.5); }
  .who-avatars span { width: 28px; height: 28px; font-size: 10px; margin-left: -9px; }
  .lobby2-title { font-size: 28px; letter-spacing: -0.03em; }
  .host-line { font-size: 13px; margin-top: -4px; }
  .lobby2-form { gap: 12px; }
  .lobby2-form .field label[for="nameInput"], .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lobby2-input { height: 50px; }
  .seg button { height: 40px; font-size: 12.5px; }
  .seg button svg { display: none; }
  .lobby2-join-btn { height: 56px; font-size: 16.5px; }
  .join-foot { justify-content: center; margin-top: 0; }
  .kbd-hint { display: none; }
}
.who-here.is-empty { padding-left: 16px; }
.who-here.is-empty::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.who-short { display: none; }
@media (max-width: 760px) {
  .who-long { display: none; }
  .who-short { display: inline; white-space: nowrap; }
  .who-here.is-empty { padding-left: 14px; }
  .host-dot { display: none; }
  .host-line { column-gap: 12px; row-gap: 2px; }
  .code-copy { padding-left: 0; }
}
.who-here.is-empty .who-avatars { display: none; }

/* Presenters */
.host-chip.is-presenter { background: rgba(245, 158, 11, 0.16); color: var(--amber-text); }
.tile-label .host-chip.is-presenter { background: var(--amber); color: #1F1300; }
.icon-mini.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.presenters-line { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.dock-btn.is-locked { opacity: .45; }

/* =====================================================================
   ROOM POLISH — "Midnight Stage" call screen v2
   Appended last so it overrides earlier call-screen rules.
   ===================================================================== */
.call {
  background:
    radial-gradient(1100px 560px at 18% -12%, rgba(37, 99, 235, 0.20), transparent 62%),
    radial-gradient(900px 520px at 105% 108%, rgba(37, 99, 235, 0.12), transparent 60%),
    var(--bg);
  gap: 14px;
}

/* ---- Top bar ---- */
.call-top-left .logo-mark { box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45); }
.call-title strong { font-size: 15.5px; letter-spacing: .01em; }
.live-pill { border: 1px solid rgba(245, 158, 11, 0.25); }
.top-cluster {
  display: flex; align-items: center; gap: 10px; padding: 5px 6px 5px 6px;
  background: rgba(10, 27, 66, 0.75); border: 1px solid var(--line-strong); border-radius: 16px;
  backdrop-filter: blur(10px);
}
.top-cluster .data-chip { height: 38px; background: rgba(255, 255, 255, 0.04); border-color: var(--line); }
.top-cluster .avatar-stack span { width: 30px; height: 30px; border-color: var(--surface); }
.top-cluster #inviteBtn {
  height: 38px; padding: 0 14px; border-radius: 11px; background: rgba(255, 255, 255, 0.06);
  color: var(--text); border: 1px solid var(--line-strong);
}
.top-cluster #inviteBtn:hover { background: var(--blue); border-color: var(--blue); }

/* ---- Video tiles ---- */
.grid { gap: 14px; }
.tile {
  border-radius: 14px; background: linear-gradient(160deg, #12295E, #0A1B42);
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
}
/* No blue ring around the camera tiles (own tile or speaker) */
.tile.is-local, .tile.is-speaking, .tile.has-hand.is-speaking {
  border-color: var(--line); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
}
.tile.has-hand { box-shadow: 0 0 0 2px var(--amber), 0 14px 34px rgba(0, 0, 0, 0.38); }
.tile::after {                      /* soft bottom fade so labels always read */
  content: ''; position: absolute; inset: auto 0 0 0; height: 38%; pointer-events: none;
  background: linear-gradient(to top, rgba(5, 11, 31, 0.55), transparent);
}
.tile-label, .tile-badge, .tile-hand { z-index: 2; }
.tile-label {
  left: 12px; bottom: 12px; padding: 5px 6px 5px 11px; gap: 8px;
  background: rgba(5, 11, 31, 0.78); border: 1px solid rgba(148, 163, 196, 0.18);
  backdrop-filter: blur(8px); font-size: 12.5px;
}
.tile-label .host-chip { padding: 3px 9px; background: var(--blue); color: #fff; font-size: 10.5px; }
.tile-avatar { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.12); }

/* ---- Side panel ---- */
.side-panel {
  flex: 0 0 372px; padding: 0; gap: 0; overflow: hidden;
  background: linear-gradient(180deg, #0B1E4A, #091738);
  border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.panel-top { gap: 0; padding: 0; background: rgba(5, 11, 31, 0.55); align-items: stretch; }
.panel-tabs { flex: 1; gap: 0; padding: 8px 0 0 8px; border-radius: 0; background: transparent; }
.panel-tabs button {
  position: relative; height: 62px; padding: 6px 4px 8px; border-radius: 14px 14px 0 0;
  flex-direction: column; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 600;
  border: 1px solid transparent; border-bottom: none; transition: color .15s ease, background-color .15s ease;
}
.panel-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.panel-tabs button[aria-selected="true"] {
  background: linear-gradient(180deg, #0F2759, #0B1E4A); color: #fff; font-weight: 700;
  border-color: var(--line-strong);
  box-shadow: 0 -6px 20px rgba(37, 99, 235, 0.22);
}
.panel-tabs button[aria-selected="true"]::before {
  content: ''; position: absolute; top: -1px; left: 22%; right: 22%; height: 2px; border-radius: 2px; background: var(--blue-300);
}
.panel-tabs button[aria-selected="true"] .tab-ico { color: var(--blue-300); }
.tab-ico { width: 22px; height: 22px; flex-shrink: 0; }
.tab-label { line-height: 1; }
.tab-count {
  position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 9.5px; font-weight: 600; opacity: .75; line-height: 1;
}
.tab-count::after { content: ' ' attr(data-unit); }
.panel-tabs button:has(.tab-count) { padding-bottom: 14px; }
.panel-tabs .tab-badge { position: absolute; top: 4px; right: 12px; }
.panel-close { width: 32px; height: 32px; margin: 8px 8px 0 4px; align-self: flex-start; }

.pane { padding: 14px; gap: 12px; background: linear-gradient(180deg, #0B1E4A, #091738); border-top: 1px solid var(--line-strong); margin-top: -1px; }
.pane-form .input { background: rgba(5, 11, 31, 0.6); border-color: var(--line-strong); }
.send-btn { border-radius: 12px; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4); }
.pane-head strong { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.panel-subhead { font-size: 11px; letter-spacing: .12em; padding: 10px 0 2px; border-top: 1px solid var(--line); margin-top: 6px; }

/* Host controls card */
.host-box .btn, .host-box .btn-ghost {
  width: 100%; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-strong); color: var(--text); font-size: 13.5px;
}
.host-box .btn:hover { background: rgba(255, 255, 255, 0.12); }
.switch-text strong { font-size: 13.5px; }
.switch { width: 46px; height: 26px; }
.switch[aria-checked="true"] { background: linear-gradient(135deg, #3B82F6, #2563EB); box-shadow: 0 0 14px rgba(37, 99, 235, 0.55); }

/* People roster */
.person { padding: 8px 6px; border-radius: 12px; gap: 12px; }
.person-avatar { position: relative; width: 36px; height: 36px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14); }
.person-avatar::after {
  content: ''; position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); border: 2px solid #0B1E4A;
}
.person-name { font-size: 14px; }
.host-chip { background: rgba(37, 99, 235, 0.28); color: #BFDBFE; border: 1px solid rgba(96, 165, 250, 0.35); }

/* Chat bubbles */
.chat-msg:not(.is-grouped) { margin-top: 4px; }
.chat-msg.is-mine .chat-text { background: rgba(37, 99, 235, 0.22); padding: 8px 12px; border-radius: 12px 12px 4px 12px; display: inline-block; }
.chat-msg:not(.is-mine) .chat-text { background: rgba(255, 255, 255, 0.06); padding: 8px 12px; border-radius: 12px 12px 12px 4px; display: inline-block; }

/* Q&A / poll cards */
.qa-card { background: rgba(5, 11, 31, 0.5); border: 1px solid var(--line); }
.poll-card {
  padding: 16px; gap: 10px; border-radius: 16px;
  background: rgba(5, 11, 31, 0.55); border: 1px solid var(--line);
}
.poll-head { align-items: center; margin-bottom: 2px; }
.poll-head strong { font-size: 15px; font-weight: 800; }
.poll-head span { font-size: 12px; color: var(--muted); }
.poll-option {
  padding: 12px 14px; border-radius: 12px; gap: 9px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line);
  transition: background-color .15s ease, border-color .15s ease;
}
.poll-option:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); border-color: var(--line-strong); }
.poll-option.is-mine { background: rgba(37, 99, 235, 0.14); border-color: rgba(96, 165, 250, 0.6); }
.poll-row { align-items: center; font-size: 14px; font-weight: 600; }
.poll-pct { font-size: 13px; color: var(--muted); }
.poll-option.is-mine .poll-pct { color: #fff; }
.poll-bar { height: 8px; background: rgba(255, 255, 255, 0.09); }
.poll-fill { background: linear-gradient(90deg, #3B82F6, #60A5FA); min-width: 0; }
.poll-option.is-mine .poll-fill { background: linear-gradient(90deg, #2563EB, #60A5FA); }
.poll-foot { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.poll-foot .link-btn {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px;
  background: rgba(220, 38, 38, 0.14); color: var(--danger-text);
}
.poll-foot .link-btn:hover { background: rgba(220, 38, 38, 0.26); color: #FCA5A5; }

/* ---- Control dock ---- */
.dock-wrap { padding-bottom: env(safe-area-inset-bottom, 0px); }
.dock {
  gap: 6px; padding: 8px; border-radius: 20px;
  background: rgba(8, 20, 52, 0.82); border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.dock-btn { width: 46px; height: 46px; border-radius: 13px; background: rgba(255, 255, 255, 0.06); color: var(--soft); transition: background-color .15s ease, transform .12s ease, color .15s ease; }
.dock-btn:hover { background: rgba(255, 255, 255, 0.13); color: #fff; transform: translateY(-2px); }
.dock-btn:active { transform: none; }
.dock-btn.is-off { background: rgba(220, 38, 38, 0.9); color: #fff; box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35); }
.dock-btn.is-active, .dock-btn[aria-expanded="true"] { background: var(--blue-soft); color: var(--blue-300); box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.4); }
#panelBtn { background: radial-gradient(circle at 50% 35%, #3B82F6, #1D4ED8); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5); }
#panelBtn:hover { background: radial-gradient(circle at 50% 35%, #60A5FA, #2563EB); }
.dock-sep { height: 26px; margin: 0 6px; background: rgba(148, 163, 196, 0.2); }
.btn-leave {
  flex-direction: row; gap: 8px; height: 46px; padding: 0 20px; border-radius: 13px; pointer-events: auto; cursor: pointer;
  background: linear-gradient(180deg, #7F1D2D, #5E1424); border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fff; font: inherit; font-size: 14px; font-weight: 700; align-items: center; justify-content: center;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.btn-leave:hover { background: linear-gradient(180deg, #DC2626, #B91C1C); box-shadow: 0 8px 22px rgba(220, 38, 38, 0.4); }
.btn-leave svg { width: 20px; height: 20px; }
.menu, .react-menu { background: #0B1E4A; border-color: var(--line-strong); backdrop-filter: blur(14px); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .side-panel { background: #091738; border-radius: 0; }
}
@media (max-width: 640px) {
  .top-cluster { padding: 0; background: transparent; border: none; gap: 6px; backdrop-filter: none; }
  .top-cluster #inviteBtn { height: 34px; padding: 0 10px; }
  .grid { gap: 8px; }
  .tile { border-radius: 12px; }
  .tile-label { left: 8px; bottom: 8px; }
  .dock { padding: 6px; border-radius: 16px; }
  .dock-btn { width: auto; height: 42px; border-radius: 11px; }
  .dock-btn:hover { transform: none; }
  .btn-leave { height: 42px; padding: 0; border-radius: 11px; }
  .panel-tabs button { height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .dock-btn, .dock-btn:hover { transition: none; transform: none; }
}

/* =====================================================================
   SCROLLBAR FIX — dark thin scrollbars, no nested scrolling in Polls/Q&A
   ===================================================================== */
.call, .call * { scrollbar-width: thin; scrollbar-color: rgba(148, 163, 196, 0.35) transparent; }
.call ::-webkit-scrollbar { width: 8px; height: 8px; }
.call ::-webkit-scrollbar-track { background: transparent; }
.call ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 196, 0.30); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
.call ::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 196, 0.5); background-clip: padding-box; border: 2px solid transparent; }
.call ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.call ::-webkit-scrollbar-corner { background: transparent; }

/* Nothing inside a pane may be squashed (this clipped the first poll card) */
.pane > *, .pane-scroll > * { flex-shrink: 0; }
.pane-scroll { overscroll-behavior: contain; }

/* Polls: the form and the poll list scroll together as ONE area */
.pane[data-pane="polls"] { overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
.pane[data-pane="polls"] .pane-scroll { flex: none; overflow: visible; padding-right: 0; }
.pane[data-pane="polls"] .pane-head { position: sticky; top: -14px; z-index: 2; padding: 10px 0; margin-top: -14px; background: #0B1E4A; }
.poll-form, .poll-card { flex-shrink: 0; }

/* Q&A keeps its own list scroll but with the clean scrollbar and room for it */
.qa-list { padding-right: 4px; }
.pane[data-pane="people"] .pane-scroll, .chat-list { padding-right: 4px; }

/* =====================================================================
   WAITING ROOM
   ===================================================================== */
.wait-page {
  min-height: 100vh; min-height: 100dvh; padding: 22px 24px 40px; gap: 0; position: relative; overflow: hidden;
  background:
    radial-gradient(700px 420px at 50% 42%, rgba(37, 99, 235, 0.22), transparent 70%),
    radial-gradient(900px 500px at 50% -10%, rgba(37, 99, 235, 0.14), transparent 65%),
    var(--bg);
}
.wait-top { width: 100%; max-width: 1240px; margin: 0 auto; display: flex; align-items: center; }
.wait-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 0 40px; }
.wait-card.left-card {
  position: relative; width: 100%; max-width: 440px; margin: 0 auto; padding: 36px 32px 30px; gap: 14px;
  align-items: center; border-radius: 26px;
  background: linear-gradient(180deg, #0F2352 0%, #0A1B42 55%, #081634 100%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(96, 165, 250, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.wait-card::before {                 /* thin light line across the top edge */
  content: ''; position: absolute; top: -1px; left: 18%; right: 18%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-300), transparent);
}
.wait-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px;
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.28);
  color: var(--amber-text); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.wait-orb { position: relative; width: 104px; height: 104px; margin: 10px 0 6px; display: flex; align-items: center; justify-content: center; }
.wait-orb .wait-spinner {
  position: absolute; inset: 10px; width: auto; height: auto; margin: 0;
  border: 3px solid rgba(148, 163, 196, 0.16); border-top-color: var(--blue-300); border-right-color: var(--blue);
}
.wait-icon { width: 34px; height: 34px; color: var(--blue-300); }
.wait-pulse {
  position: absolute; inset: 14px; border-radius: 50%; background: rgba(37, 99, 235, 0.28);
  animation: wait-pulse 2.6s ease-out infinite;
}
.wait-pulse.p2 { animation-delay: 1.3s; }
@keyframes wait-pulse { 0% { transform: scale(.7); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }
.wait-card h1 { font-size: 28px; letter-spacing: -0.025em; line-height: 1.15; }
.wait-card .note { font-size: 14.5px; color: var(--soft); max-width: 300px; }
.wait-dots { display: flex; gap: 7px; margin: 4px 0 6px; }
.wait-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue-300); opacity: .3; animation: wait-dot 1.3s ease-in-out infinite; }
.wait-dots i:nth-child(2) { animation-delay: .2s; }
.wait-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes wait-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.wait-cancel { min-width: 150px; margin-top: 4px; background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong); }
.wait-cancel:hover:not(:disabled) { background: rgba(220, 38, 38, 0.16); border-color: rgba(248, 113, 113, 0.5); color: #FCA5A5; }
@media (max-width: 640px) {
  .wait-page { padding: 16px 16px 28px; }
  .wait-card.left-card { padding: 30px 22px 24px; border-radius: 22px; }
  .wait-card h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .wait-pulse, .wait-dots i { animation: none; } .wait-dots i { opacity: .7; } }

/* =====================================================================
   LANDING PAGE — scrollbar + sideways-scroll fix
   ===================================================================== */
/* Dark, slim page scrollbar everywhere (landing, lobby, waiting room) */
html { color-scheme: dark; scrollbar-width: thin; scrollbar-color: rgba(148, 163, 196, 0.38) var(--bg); }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 10px; height: 10px; }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 196, 0.32); border-radius: 999px; border: 2px solid var(--bg); background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 196, 0.55); border: 2px solid var(--bg); background-clip: padding-box; }
html::-webkit-scrollbar-button, body::-webkit-scrollbar-button { display: none; width: 0; height: 0; }

/* The page may never scroll sideways */
html, body.lp { overflow-x: hidden; overflow-x: clip; max-width: 100%; }

/* The "Enter a code or link" form was wider than small phones */
.lp-actions > * { min-width: 0; max-width: 100%; }
.lp-join { min-width: 0; max-width: 100%; }
.lp-join input { width: 100%; }
.lp-join button { flex-shrink: 0; }
.lp-hero-text, .lp-collage { max-width: 100%; }
.lp-title { overflow-wrap: break-word; }
@media (max-width: 380px) {
  .lp-title { font-size: clamp(36px, 11.5vw, 44px); }
  .lp-badge { max-width: 100%; }
}
@media (max-width: 640px) {
  .lp-float-reacts { right: 4px; top: 0; }
  .lp-float-hand { max-width: calc(100% - 120px); }
}

/* =====================================================================
   LANDING HERO — compact sizing and tidy arrangement (desktop)
   ===================================================================== */
@media (min-width: 901px) {
  .lp-hero { flex-wrap: nowrap; align-items: center; gap: 48px; padding-top: 24px; padding-bottom: 56px; }
  .lp-hero-text { flex: 1 1 0; gap: 20px; max-width: 540px; }
  .lp-title { font-size: clamp(40px, 4.4vw, 60px); line-height: 1.04; letter-spacing: -0.04em; }
  .lp-lead { font-size: 16px; line-height: 1.6; max-width: 470px; }
  .lp-badge { font-size: 12.5px; padding: 6px 12px 6px 6px; }
  .lp-actions { gap: 10px; max-width: 540px; flex-wrap: nowrap; }
  .lp-btn-big { height: 50px; padding: 0 20px; font-size: 14.5px; border-radius: 13px; white-space: nowrap; }
  .lp-join { padding: 4px; border-radius: 15px; }
  .lp-join input { height: 40px; font-size: 14px; }
  .lp-join button { height: 40px; padding: 0 16px; font-size: 14px; }
  .lp-small { font-size: 12.5px; }

  .lp-collage { flex: 1 1 0; max-width: 560px; margin-left: auto; padding: 44px 20px 52px 0; }
  .lp-block { border-radius: 28px; }
  .lp-window { border-radius: 16px; }
  .lp-window-bar { height: 30px; }
  .lp-window-body { padding: 10px; gap: 8px; }
  .lp-film { gap: 6px; }
  .lp-bubble { border-width: 3px; box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.25); }

  .lp-float { border-radius: 12px; }
  .lp-float strong { font-size: 12px; }
  .lp-float small { font-size: 10.5px; }
  .lp-float .ic { width: 28px; height: 28px; border-radius: 9px; }
  .lp-float-hand { top: 6px; left: 4%; padding: 8px 12px 8px 8px; }
  .lp-float-qa { right: 0; top: auto; bottom: 78px; width: min(210px, 50%); height: auto; padding: 9px 12px 9px 9px; }
  .lp-float-qa strong { font-size: 11.5px; }
  .lp-float-data { left: 0; bottom: 14px; padding: 8px 14px 8px 8px; }
  .lp-float-reacts { right: 8%; top: 2px; gap: 6px; }
  .lp-float-reacts span { width: 38px; height: 38px; }
  .lp-float-reacts .thumb { margin-top: 10px; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .lp-hero { gap: 28px; }
  .lp-float-qa { display: none; }
}
@media (min-width: 901px) and (min-height: 700px) {
  .lp-hero { min-height: calc(100vh - 82px - 24px); padding-bottom: 32px; }
}
@media (max-width: 900px) {
  .lp-hero { flex-wrap: wrap; }
  .lp-collage { max-width: 560px; margin: 0 auto; width: 100%; }
}

/* =====================================================================
   LANDING — compact phone buttons
   ===================================================================== */
@media (max-width: 640px) {
  .lp-actions { gap: 8px; }
  .lp-btn-big {
    height: 46px; padding: 0 18px; border-radius: 12px; font-size: 14.5px; gap: 8px;
  }
  .lp-btn-big svg { width: 18px; height: 18px; }
  .lp-join { padding: 3px; border-radius: 13px; gap: 4px; }
  .lp-join input { height: 38px; padding: 0 12px; font-size: 14px; }
  .lp-join button { height: 38px; padding: 0 16px; border-radius: 10px; font-size: 13.5px; }
  .lp-small { font-size: 12px; margin-top: -4px; }
  .lp-band-actions .lp-btn-white, .lp-band-actions .lp-btn-outline { height: 46px; font-size: 14px; border-radius: 12px; }
}

/* =====================================================================
   LOBBY — smaller form controls (name, data use, join)
   ===================================================================== */
.lobby2-form { gap: 14px; }
.lobby2-input { height: 48px; border-radius: 12px; font-size: 15px; }
.seg { padding: 3px; border-radius: 12px; gap: 3px; }
.seg button { height: 38px; border-radius: 9px; font-size: 12.5px; }
.lobby2-join-btn { height: 52px; border-radius: 14px; font-size: 15.5px; gap: 10px; }
.lobby2-join-btn svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .lobby2-join { gap: 12px; }
  .lobby2-form { gap: 10px; }
  .lobby2-input { height: 44px; border-radius: 11px; font-size: 14.5px; padding: 0 12px; }
  .seg { padding: 3px; border-radius: 11px; }
  .seg button { height: 34px; border-radius: 8px; font-size: 12px; }
  .lobby2-join-btn { height: 46px; border-radius: 12px; font-size: 15px; }
  .lobby2-join-btn svg { width: 16px; height: 16px; }
  .join-foot { font-size: 12px; }
  .kbd-hint { display: none; }
}

/* =====================================================================
   PRESENTATION BAR — smaller, modern buttons + drawing tools
   ===================================================================== */
.slide-bar { gap: 8px; min-height: 36px; padding: 2px 0; }
.bar-group { gap: 6px; }
.bar-info { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 0 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-btn {
  height: 32px; min-width: 32px; padding: 0 9px; border-radius: 10px; gap: 6px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(148, 163, 196, 0.18); color: var(--soft);
  font-size: 12.5px; font-weight: 700; letter-spacing: .005em; backdrop-filter: blur(8px);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.bar-btn svg { width: 16px; height: 16px; }
.bar-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); border-color: rgba(148, 163, 196, 0.38); color: #fff; }
.bar-btn:active:not(:disabled) { transform: scale(.96); }
.bar-btn:disabled { opacity: .3; }
.bar-btn:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 2px; }
.bar-pill { padding: 0 12px 0 10px; border-radius: 999px; }
.bar-btn.is-on { background: rgba(96, 165, 250, 0.18); border-color: rgba(96, 165, 250, 0.5); color: #DBEAFE; }
.bar-stop {
  background: linear-gradient(180deg, #EF4444, #DC2626); border-color: rgba(254, 202, 202, 0.25); color: #fff;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}
.bar-stop:hover:not(:disabled) { background: linear-gradient(180deg, #F87171, #EF4444); border-color: rgba(254, 202, 202, 0.4); color: #fff; }

/* Drawing layer on the slide */
.annot-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; touch-action: none; }
.annot-canvas.is-on { pointer-events: auto; }
.slide-frame.annot-on { box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.55), 0 24px 50px rgba(0, 0, 0, 0.4); }
.slide-frame.annot-on .laser-dot { display: none; }

/* ── Vertical floating toolbar — left edge of the slide ── */
.annot-bar--v {
  position: fixed;            /* pinned to the far right edge of the screen, outside the slide */
  right: 10px; left: auto; top: 50%; bottom: auto;
  transform: translateY(-50%);
  z-index: 55;
  display: flex;
  flex-direction: row;        /* collapse-tab | body side by side */
  align-items: stretch;
  background: rgba(8, 20, 52, 0.92);
  border: 1px solid rgba(148, 163, 196, 0.28);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transition: none;
}
.annot-bar--v[hidden] { display: none; }

/* The thin collapse/expand tab on the right edge of the toolbar */
.annot-collapse-btn {
  display: flex; align-items: center; justify-content: center;
  width: 18px; flex-shrink: 0;
  background: rgba(148, 163, 196, 0.08);
  border: none; border-right: 1px solid rgba(148, 163, 196, 0.18);
  color: var(--muted); cursor: pointer;
  padding: 0;
  border-radius: 14px 0 0 14px;
  transition: background-color .15s ease, color .15s ease;
  order: 0;   /* left side, facing the slide */
}
.annot-collapse-btn:hover { background: rgba(148, 163, 196, 0.18); color: #fff; }
.annot-collapse-btn svg { width: 12px; height: 12px; }

/* Body: the scrollable column of controls */
.annot-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 7px;
  overflow-y: auto;
  scrollbar-width: none;
  max-height: calc(100vh - 160px);  /* never taller than the screen */
  order: 1;
}
.annot-body::-webkit-scrollbar { display: none; }

/* Collapsed state: body slides away, only the tab remains */
.annot-bar--v.is-collapsed .annot-body { display: none; }
.annot-bar--v.is-collapsed { border-radius: 10px; }
.annot-bar--v.is-collapsed .annot-collapse-btn {
  border-right: none; border-radius: 10px; width: 22px; padding: 10px 0;
}

/* Groups and separators */
.annot-grp--v { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.annot-sep--h { width: 28px; height: 1px; background: rgba(148, 163, 196, 0.22); flex-shrink: 0; }

/* Shared button base */
.annot-bar--v button {
  flex-shrink: 0; border: none; cursor: pointer; font: inherit;
  color: var(--soft);
  transition: background-color .12s ease, transform .1s ease, box-shadow .12s ease;
}

/* Colour swatches */
.annot-color {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22);
}
.annot-color:hover { transform: scale(1.14); }
.annot-color.is-sel { box-shadow: 0 0 0 2px rgba(8,20,52,0.9), 0 0 0 4px var(--blue-300); }

/* Size dots */
.annot-size {
  width: 30px; height: 30px; border-radius: 9px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
}
.annot-size i { width: var(--d); height: var(--d); border-radius: 50%; background: currentColor; display: block; }

/* Tool buttons (pen, eraser, undo, trash, zoom) */
.annot-tool {
  width: 30px; height: 30px; border-radius: 9px;
  background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
}
.annot-tool svg, .annot-size svg { width: 17px; height: 17px; }

.annot-size:hover, .annot-tool:hover { background: rgba(255,255,255,0.1); }
.annot-size.is-sel, .annot-tool.is-sel {
  background: rgba(96,165,250,0.22); color: #fff;
}

/* Done button */
.annot-done {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--blue); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0; padding: 0;
}
.annot-done span { display: none; }   /* icon only in vertical mode */
.annot-done:hover { background: var(--blue-hover); }
.annot-done svg { width: 16px; height: 16px; }

/* ── Small-screen tweaks ── */
@media (max-width: 640px) {
  .slide-bar { gap: 6px; }
  .bar-btn { height: 34px; min-width: 34px; }
  .bar-info { font-size: 12px; }
  .bar-group .bar-pill:not(.bar-stop) { font-size: 12px; }

  .annot-bar--v { right: 6px; left: auto; border-radius: 12px; }
  .annot-body { padding: 6px 5px; gap: 5px; }
  .annot-color { width: 20px; height: 20px; }
  .annot-size, .annot-tool, .annot-done { width: 28px; height: 28px; border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) { .bar-btn, .annot-bar--v button { transition: none; } }
/* The real "Stop presenting" button stays in the DOM (present.js + annotate.js rely on it)
   but is hidden: the stop icon in the right-edge toolbar triggers it instead. */
#slideBar .bar-stop { display: none !important; }
.annot-bar--v button.annot-stop {
  width: 30px; height: 30px; border-radius: 9px; padding: 0;
  background: #DC2626; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}
.annot-bar--v button.annot-stop:hover { background: #EF4444; }
.annot-stop svg { width: 17px; height: 17px; }
@media (max-width: 640px) { .annot-bar--v button.annot-stop { width: 28px; height: 28px; border-radius: 8px; } }

.slide-frame.is-zoomed:not(.annot-on) { cursor: grab; }
.slide-frame.is-zoomed .slide-canvas, .slide-frame.is-zoomed .screen-video { will-change: transform; }

/* ===== Compact toolbar: every button fits on screen ===== */
.annot-bar--v { max-height: calc(100dvh - 24px); }
.annot-body { gap: 5px; padding: 8px 7px; max-height: calc(100dvh - 24px); }
.annot-grp--v:has(.annot-color) { display: grid; grid-template-columns: repeat(2, 24px); gap: 8px 10px; justify-content: center; }
.annot-grp--v:has(.annot-size)  { flex-direction: row; gap: 2px; }
.annot-grp--v:has(.annot-size) .annot-size { width: 22px; height: 28px; }
.annot-grp--v:has([data-tool]), .annot-grp--v:has([data-act="zoomin"]) { display: grid; grid-template-columns: repeat(2, 30px); gap: 4px; }
.annot-grp--end { flex-direction: row; gap: 4px; }
.annot-sep--h { width: 100%; }

/* Laser + Draw sit right next to the slide counter */
.slide-bar { justify-content: flex-start; gap: 8px 14px; }
/* keep the slide bar clear of the toolbar on the right */
.stage.is-presenting .present-area { padding-right: 88px; }
@media (min-width: 901px) {
  .call-body:has(#sidePanel:not([hidden])) .annot-bar--v { right: 392px; }
}
@media (max-width: 640px) {
  .stage.is-presenting .present-area { padding-right: 84px; }
  .annot-grp--v:has(.annot-color) { grid-template-columns: repeat(2, 22px); gap: 6px 10px; }
  .annot-grp--v:has([data-tool]), .annot-grp--v:has([data-act="zoomin"]) { grid-template-columns: repeat(2, 28px); }
}
@media (max-height: 640px) {
  .annot-body { gap: 3px; padding: 6px; }
  .annot-grp--v:has(.annot-color) { gap: 5px 8px; }
  .annot-tool, .annot-done, .annot-bar--v button.annot-stop { height: 26px; }
}

/* ===== Presenting: participants live in the top bar next to the timer ===== */
.top-strip { display: flex; align-items: center; margin-left: 10px; min-width: 0; }
.top-strip[hidden] { display: none; }
.top-strip .grid {
  display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: flex-start;
  gap: 0; height: auto; padding: 0; grid-template-columns: none !important;
}
.top-strip .grid .tile {
  flex: 0 0 auto; width: 40px; height: 40px; min-width: 40px; aspect-ratio: 1 / 1; border-radius: 50%;
  margin-left: -12px; border: 2px solid var(--bg); box-shadow: none; overflow: hidden; cursor: default;
}
.top-strip .grid .tile:first-child { margin-left: 0; }
.top-strip .grid .tile.strip-hide, .top-strip .grid .tile.is-presenter { display: none; }
.top-strip .grid .tile::after, .top-strip .grid .tile .tile-label, .top-strip .grid .tile .tile-badge { display: none; }
.top-strip .grid .tile .tile-avatar { width: 100%; max-width: none; min-width: 0; font-size: 14px; box-shadow: none; }
.top-strip .grid .tile .tile-hand { right: 0; top: 0; height: 16px; padding: 0 4px; font-size: 0; gap: 0; }
.top-strip .grid .tile .tile-hand svg { width: 10px; height: 10px; }
.top-strip .grid .tile.is-speaking { box-shadow: 0 0 0 2px var(--blue); position: relative; z-index: 1; }
.top-strip .grid .tile.has-hand { box-shadow: 0 0 0 2px var(--amber); }
.strip-more {
  flex: 0 0 auto; width: 40px; height: 40px; margin-left: -12px; border-radius: 50%;
  border: 2px solid var(--bg); background: var(--surface-2); color: var(--soft);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800;
}
.strip-more[hidden] { display: none; }
@media (max-width: 640px) {
  .top-strip { margin-left: 8px; }
  .top-strip .grid .tile, .strip-more { width: 32px; height: 32px; min-width: 32px; margin-left: -10px; }
  .top-strip .grid .tile:first-child { margin-left: 0; }
  .top-strip .grid .tile .tile-avatar { font-size: 11px; }
  .strip-more { font-size: 11px; }
}

/* ===== Single-column slim toolbar ===== */
.annot-bar--v { flex-direction: column; align-items: stretch; border-radius: 14px; width: 40px; }
.annot-collapse-btn, .annot-bar--v.is-collapsed .annot-collapse-btn {
  order: 0; width: 100%; height: 20px; padding: 0; border: none; border-bottom: 1px solid rgba(148, 163, 196, 0.18);
  border-radius: 13px 13px 0 0;
}
.annot-bar--v.is-collapsed { width: 40px; border-radius: 12px; }
.annot-bar--v.is-collapsed .annot-collapse-btn { border-bottom: none; border-radius: 11px; height: 28px; }
.annot-collapse-btn svg { transform: rotate(-90deg); }
.annot-bar--v.is-collapsed .annot-collapse-btn svg { transform: rotate(90deg); }
.annot-body { order: 1; gap: 4px; padding: 6px 0 8px; max-height: calc(100dvh - 64px); }
.annot-grp--v, .annot-grp--v:has(.annot-color), .annot-grp--v:has(.annot-size),
.annot-grp--v:has([data-tool]), .annot-grp--v:has([data-act="zoomin"]), .annot-grp--end {
  display: flex; flex-direction: column; align-items: center; grid-template-columns: none; gap: 3px;
}
.annot-grp--v:has(.annot-color) { gap: 5px; }
.annot-color { width: 18px; height: 18px; }
.annot-grp--v:has(.annot-size) .annot-size, .annot-size { width: 28px; height: 22px; }
.annot-tool, .annot-done, .annot-bar--v button.annot-stop { width: 28px; height: 26px; border-radius: 8px; }
.annot-tool svg, .annot-done svg, .annot-stop svg { width: 16px; height: 16px; }
.annot-sep--h { width: 22px; margin: 1px 0; }
/* PDF gets the space the old wide toolbar took */
.stage.is-presenting .present-area { padding-right: 54px; }
@media (max-width: 640px) {
  .annot-bar--v { right: 4px; width: 38px; }
  .stage.is-presenting .present-area { padding-right: 46px; }
  .annot-tool, .annot-done, .annot-bar--v button.annot-stop, .annot-size { width: 26px; }
  .annot-grp--v:has([data-tool]), .annot-grp--v:has([data-act="zoomin"]) { grid-template-columns: none; }
}
@media (max-height: 600px) {
  .annot-color { width: 14px; height: 14px; }
  .annot-grp--v:has(.annot-color) { gap: 4px; }
  .annot-size { height: 18px; }
  .annot-tool, .annot-done, .annot-bar--v button.annot-stop { height: 22px; }
  .annot-sep--h { margin: 0; }
}
@media (min-width: 901px) {
  .call-body:has(#sidePanel:not([hidden])) .annot-bar--v { right: 392px; }
}

/* ===== Slide fills the full presenting area (width); the page scrolls inside it ===== */
.stage.is-presenting .slide-stage { align-items: stretch; justify-content: stretch; }
.slide-frame {
  width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
  aspect-ratio: auto !important;
}
.slide-frame.is-zoomed:not(.annot-on) { cursor: grab; }
.stage.is-presenting .present-area { padding-right: 50px; }
@media (max-width: 640px) { .stage.is-presenting .present-area { padding-right: 44px; } }

/* Slide-bar action buttons (icon only) */
.bar-actions { display: inline-flex; align-items: center; gap: 6px; }
.bar-icon { width: 32px; min-width: 32px; padding: 0; }
.bar-icon svg { width: 17px; height: 17px; }
#recordBtn { color: #FCA5A5; }
#recordBtn:hover:not(:disabled) { color: #fff; background: rgba(220, 38, 38, 0.35); border-color: rgba(248, 113, 113, 0.6); }
@media (max-width: 640px) { .bar-icon { width: 34px; min-width: 34px; } }

/* Reserve space for the drawing toolbar only when it is there (presenter), so viewers get the full width */
.stage.is-presenting .present-area { padding-right: 0; }
.stage.is-presenting.has-annot-bar .present-area { padding-right: 50px; }
@media (max-width: 640px) {
  .stage.is-presenting .present-area { padding-right: 0; }
  .stage.is-presenting.has-annot-bar .present-area { padding-right: 44px; }
}

/* Phones: no bubble on top of the slide; the presenter shows in the top strip with an amber ring */
@media (max-width: 640px) {
  .present-bubble { display: none !important; }
  .top-strip .grid .tile.is-presenter { display: flex; box-shadow: 0 0 0 2px var(--amber-text); position: relative; z-index: 1; }
  .top-strip .grid .tile.is-presenter.strip-hide { display: none; }
}

/* ===== Phone top bar: one tidy row ===== */
@media (max-width: 640px) {
  .call-top { flex-wrap: nowrap; gap: 6px; }
  .call-top-left { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; gap: 8px; }
  .call-top-right { flex: 0 0 auto; }
  .call-title { flex: 0 1 auto; min-width: 0; }
  .call-title strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .live-pill { flex-shrink: 0; }
  .top-strip { flex-shrink: 0; }
  /* people are already shown in the video grid / top circles: drop the duplicate stack */
  .top-cluster .avatar-stack { display: none; }
  /* data chip: a single line, never wraps */
  .data-chip { flex-shrink: 0; white-space: nowrap; }
  .data-chip span, #dataChipLabel { max-width: none !important; overflow: visible; white-space: nowrap; }
  /* while someone presents, give the room to the people circles */
  .call:has(.stage.is-presenting) .call-top .logo { display: none; }
}

/* Slide-bar buttons: icon + short label on wider screens, icon only on phones */
.bar-icon .bar-label { display: none; }
@media (min-width: 641px) {
  .bar-icon { width: auto; min-width: 32px; padding: 0 12px 0 10px; }
  .bar-icon .bar-label { display: inline; font-size: 12.5px; font-weight: 700; }
}

/* The call title now says "Zuno", so the logo does not repeat the word */
.call-top .logo-name { display: none; }

/* Phones: the MB chip at the top already opens the data menu, so drop the duplicate dock button */
@media (max-width: 640px) {
  #dataBtn { display: none; }
}

/* Scroll cue for tall pages */
.slide-frame.is-zoomed { touch-action: none; }   /* phones: dragging pans the page instead of scrolling the screen */
.scroll-rail {
  position: absolute; right: 5px; top: 10px; bottom: 10px; width: 4px; z-index: 5;
  border-radius: 999px; background: rgba(11, 20, 48, 0.18); pointer-events: none;
}
.scroll-rail i { display: block; width: 100%; border-radius: 999px; background: rgba(37, 99, 235, 0.85); }
.scroll-rail[hidden], .scroll-hint[hidden] { display: none; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; pointer-events: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(5, 11, 31, 0.85); color: #fff; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); animation: hint-bob 1.4s ease-in-out infinite;
}
.scroll-hint svg { width: 16px; height: 16px; }
@keyframes hint-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 4px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint { animation: none; } }
/* =====================================================================
   SLIDE JUMP + THUMBNAILS (presenter)
   ===================================================================== */
.thumb-strip {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 10px 10px;
  border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(148, 163, 196, 0.18);
}
.thumb-strip[hidden] { display: none; }
.thumb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.thumb-jump { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--soft); }
.thumb-jump input {
  width: 64px; height: 32px; padding: 0 8px; border-radius: 10px; text-align: center; font: inherit; font-weight: 700;
  color: #fff; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(148, 163, 196, 0.3);
  font-size: 16px; /* 16px stops iPhones zooming the page when the box is focused */
}
.thumb-jump input:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 1px; }
.thumb-total { color: var(--muted); font-variant-numeric: tabular-nums; }
.thumb-row {
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 2px 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.thumb {
  position: relative; flex: 0 0 auto; height: 74px; min-width: 100px; padding: 0; border-radius: 9px; overflow: hidden;
  background: #fff; border: 2px solid transparent; cursor: pointer; scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center;
}
.thumb canvas { display: block; height: 100%; width: auto; opacity: 0; transition: opacity .15s ease; }
.thumb.is-ready canvas { opacity: 1; }
.thumb span {
  position: absolute; left: 4px; bottom: 4px; min-width: 18px; padding: 1px 5px; border-radius: 6px; text-align: center;
  background: rgba(5, 11, 31, 0.82); color: #fff; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.thumb:hover { border-color: rgba(148, 163, 196, 0.6); }
.thumb.is-current { border-color: var(--blue-300); box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.35); }
.thumb:focus-visible { outline: 2px solid var(--blue-300); outline-offset: 2px; }
@media (max-width: 640px) {
  .thumb { height: 60px; min-width: 80px; }
  .thumb-jump label { display: none; }   /* the number box and "of N" explain themselves on a phone */
}

/* =====================================================================
   RECORDING
   ===================================================================== */
.dock-btn.is-recording { background: var(--danger); color: #fff; animation: rec-pulse 1.6s ease-in-out infinite; }
.dock-btn.is-recording:hover { background: #B91C1C; }
.rec-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  background: rgba(220, 38, 38, 0.18); border: 1px solid rgba(248, 113, 113, 0.55); color: #FECACA;
  font-size: 12px; font-weight: 800; letter-spacing: .06em;
}
.rec-pill[hidden] { display: none; }
.rec-pill i { width: 8px; height: 8px; border-radius: 50%; background: #EF4444; animation: rec-blink 1.2s ease-in-out infinite; }
.rec-banner {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 64px);
  max-width: min(92vw, 560px); padding: 10px 16px; border-radius: 12px; text-align: center;
  background: #450A0A; border: 1px solid rgba(248, 113, 113, 0.6); color: #FEE2E2;
  font-size: 13.5px; font-weight: 700; line-height: 1.4; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.rec-banner[hidden] { display: none; }
@keyframes rec-blink { 50% { opacity: .25; } }
@keyframes rec-pulse { 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.25); } }
@media (prefers-reduced-motion: reduce) { .dock-btn.is-recording, .rec-pill i { animation: none; } }

/* ── Record confirmation dialog ── */
.rec-modal {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(3, 7, 20, 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: rec-fade .16s ease-out;
}
.rec-modal.is-closing { opacity: 0; transition: opacity .14s ease; }
.rec-dialog {
  width: min(100%, 420px); padding: 26px 24px 22px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, #12204A 0%, #0B1636 100%); border: 1px solid rgba(148, 163, 196, 0.22);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: #fff; animation: rec-pop .2s cubic-bezier(.2, .9, .3, 1.2);
}
.rec-dialog-icon {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(239, 68, 68, 0.14); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.08);
}
.rec-dialog-icon i { width: 22px; height: 22px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 18px rgba(239, 68, 68, 0.7); }
.rec-dialog h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.rec-dialog p { margin: 0 0 16px; color: var(--soft, #B6C2DE); font-size: 14px; line-height: 1.55; }
.rec-dialog p strong { color: #FECACA; letter-spacing: .05em; }
.rec-dialog-list {
  list-style: none; margin: 0 0 20px; padding: 12px 14px; display: grid; gap: 10px; text-align: left;
  border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(148, 163, 196, 0.14);
}
.rec-dialog-list li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: #DCE5F8; }
.rec-dialog-list svg { flex: 0 0 auto; width: 18px; height: 18px; padding: 4px; box-sizing: content-box; border-radius: 8px; color: #93C5FD; background: rgba(96, 165, 250, 0.14); }
.rec-dialog-actions { display: flex; gap: 10px; }
.rec-btn {
  flex: 1; height: 46px; border-radius: 13px; border: 1px solid transparent; font: inherit; font-size: 14.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  transition: background-color .15s ease, transform .1s ease, border-color .15s ease;
}
.rec-btn:active { transform: scale(.97); }
.rec-btn:focus-visible { outline: 2px solid var(--blue-300, #93C5FD); outline-offset: 2px; }
.rec-btn--ghost { background: rgba(255, 255, 255, 0.07); border-color: rgba(148, 163, 196, 0.28); color: #E6ECFA; }
.rec-btn--ghost:hover { background: rgba(255, 255, 255, 0.13); }
.rec-btn--start { background: linear-gradient(180deg, #EF4444, #DC2626); color: #fff; box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35); }
.rec-btn--start:hover { background: linear-gradient(180deg, #F87171, #EF4444); }
.rec-btn--start i { width: 10px; height: 10px; border-radius: 50%; background: #fff; }
@keyframes rec-fade { from { opacity: 0; } }
@keyframes rec-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@media (max-width: 640px) {
  .rec-modal { align-items: flex-end; padding: 0; }
  .rec-dialog { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .rec-modal, .rec-dialog { animation: none; } }

/* Sync pill (viewers) */
.bar-sync:not(.is-on) { color: var(--soft); }
.bar-sync.is-on:not([aria-pressed="true"]) { background: rgba(245, 158, 11, 0.16); border-color: rgba(245, 158, 11, 0.55); color: #FDE68A; }   /* "Re-sync" stands out */

/* Join screen: the status message ("Connecting…", "Waking up the server…") has room reserved,
   so the page never jumps or scrolls when it appears */
#joinMsg { min-height: 3em; overflow-anchor: none; }
.lobby-page { overflow-anchor: none; }