/* STREAMKON styles. Icons are SVG masks (data URIs, allowed by the CSP's img-src data:). */
:root {
  --ic-mic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%229%22 y=%223%22 width=%226%22 height=%2211%22 rx=%223%22/%3E%3Cpath d=%22M19 11a7 7 0 0 1-14 0M12 18v3M8.5 21h7%22/%3E%3C/svg%3E");
  --ic-micOff: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M15 9.3V6a3 3 0 0 0-5.7-1.3M9 9v2a3 3 0 0 0 5 2.2M19 11a7 7 0 0 1-1.3 4.1M5 11a7 7 0 0 0 11.6 5.3M12 18v3M8.5 21h7M3 3l18 18%22/%3E%3C/svg%3E");
  --ic-cam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%222.5%22 y=%226%22 width=%2213%22 height=%2212%22 rx=%222.5%22/%3E%3Cpath d=%22M15.5 10.5 21 7.5v9l-5.5-3z%22/%3E%3C/svg%3E");
  --ic-camOff: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M10 6h3a2.5 2.5 0 0 1 2.5 2.5v3l5.5-3v9M15.5 15.5V16a2.5 2.5 0 0 1-2.5 2.5H5A2.5 2.5 0 0 1 2.5 16V8.5A2.5 2.5 0 0 1 5 6M3 3l18 18%22/%3E%3C/svg%3E");
  --ic-screen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%222.5%22 y=%224%22 width=%2219%22 height=%2213%22 rx=%222%22/%3E%3Cpath d=%22M8 21h8M12 17v4M12 13.5V8M9.5 10.5 12 8l2.5 2.5%22/%3E%3C/svg%3E");
  --ic-screenStop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%222.5%22 y=%224%22 width=%2219%22 height=%2213%22 rx=%222%22/%3E%3Cpath d=%22M8 21h8M12 17v4M9.5 8l5 5M14.5 8l-5 5%22/%3E%3C/svg%3E");
  --ic-full: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5%22/%3E%3C/svg%3E");
  --ic-leave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M14 4h4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-4M10 16.5 5.5 12 10 7.5M5.5 12H15%22/%3E%3C/svg%3E");
  --ic-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%224%22/%3E%3Cpath d=%22M12 2.5v2M12 19.5v2M4.6 4.6 6 6M18 18l1.4 1.4M2.5 12h2M19.5 12h2M4.6 19.4 6 18M18 6l1.4-1.4%22/%3E%3C/svg%3E");
  --ic-moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M20.5 14.5A8.5 8.5 0 0 1 9.5 3.5a8.5 8.5 0 1 0 11 11z%22/%3E%3C/svg%3E");
  --ic-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M10 14a4.2 4.2 0 0 0 6 0l3-3a4.2 4.2 0 0 0-6-6l-1 1M14 10a4.2 4.2 0 0 0-6 0l-3 3a4.2 4.2 0 0 0 6 6l1-1%22/%3E%3C/svg%3E");
  --ic-sync: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M20 12a8 8 0 0 1-14.3 4.9M4 12A8 8 0 0 1 18.3 7.1M18.5 3v4.5H14M5.5 21v-4.5H10%22/%3E%3C/svg%3E");
  --ic-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M12 2.8 4.5 5.8v5.7c0 4.6 3.1 8.5 7.5 9.7 4.4-1.2 7.5-5.1 7.5-9.7V5.8z%22/%3E%3Cpath d=%22m8.8 12 2.2 2.2 4.3-4.4%22/%3E%3C/svg%3E");
  --ic-chat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M20.5 12a8 8 0 0 1-11.7 7.1L3.5 20.5l1.4-5A8 8 0 1 1 20.5 12z%22/%3E%3C/svg%3E");
  --ic-play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx=%2212%22 cy=%2212%22 r=%229%22/%3E%3Cpath d=%22M10 8.5v7l5.5-3.5z%22/%3E%3C/svg%3E");
  --ic-puzzle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M9 4.5a2 2 0 1 1 4 0V6h3.5A1.5 1.5 0 0 1 18 7.5V11h-1.5a2 2 0 1 0 0 4H18v3.5a1.5 1.5 0 0 1-1.5 1.5H13v-1.5a2 2 0 1 0-4 0V20H5.5A1.5 1.5 0 0 1 4 18.5V15h1.5a2 2 0 1 0 0-4H4V7.5A1.5 1.5 0 0 1 5.5 6H9z%22/%3E%3C/svg%3E");
  --ic-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%226%22 y=%222.5%22 width=%2212%22 height=%2219%22 rx=%222.5%22/%3E%3Cpath d=%22M10.5 18.5h3%22/%3E%3C/svg%3E");
  --ic-tablet: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%224%22 y=%222.5%22 width=%2216%22 height=%2219%22 rx=%222.5%22/%3E%3Cpath d=%22M10.5 18.5h3%22/%3E%3C/svg%3E");
  --ic-monitor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x=%222.5%22 y=%223.5%22 width=%2219%22 height=%2213%22 rx=%222%22/%3E%3Cpath d=%22M8 20.5h8M12 16.5v4%22/%3E%3C/svg%3E");
  --ic-vol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M4 9.5h3.5L12 5.5v13l-4.5-4H4z%22/%3E%3Cpath d=%22M15.5 9a4.5 4.5 0 0 1 0 6M18.3 6.2a8.5 8.5 0 0 1 0 11.6%22/%3E%3C/svg%3E");
  --ic-flip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M20.5 7.5h-3.2l-1.8-2.5h-7l-1.8 2.5H3.5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h17a1 1 0 0 0 1-1v-10a1 1 0 0 0-1-1z%22/%3E%3Cpath d=%22M8.8 13.5a3.3 3.3 0 0 1 5.6-2.3M15.2 13.5a3.3 3.3 0 0 1-5.6 2.3M14.6 9v2.3h-2.3M9.4 18v-2.3h2.3%22/%3E%3C/svg%3E");
  --ic-hangup: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M2.5 14.6c5.3-5 13.7-5 19 0l-2.2 2.6-3.9-1.5-.4-2.6a11.5 11.5 0 0 0-6 0l-.4 2.6-3.9 1.5z%22/%3E%3C/svg%3E");
  --ic-min: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M4 14h6v6M20 10h-6V4M14 10l6.5-6.5M3.5 20.5 10 14%22/%3E%3C/svg%3E");
  --ic-exitFull: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5%22/%3E%3C/svg%3E");
  --ic-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d=%22m9 6 6 6-6 6%22/%3E%3C/svg%3E");
}
/* ==========================================================================
   STREAMKON design system: tokens (dark default, light via [data-theme])
   ========================================================================== */
:root {
  --bg: #07090d;
  --bg-glow: radial-gradient(1200px 600px at 85% -10%, rgba(47, 128, 237, .16), transparent 60%),
             radial-gradient(900px 500px at -10% 10%, rgba(99, 102, 241, .10), transparent 60%);
  --surface: #0f131a;
  --surface-2: #151a23;
  --surface-3: #1c2330;
  --border: #222a37;
  --border-strong: #303a4b;
  --text: #edf1f7;
  --text-2: #a5afbe;
  --text-3: #6c7787;
  --accent: #3d8bfd;
  --accent-hover: #5a9cff;
  --accent-fg: #ffffff;
  --accent-soft: rgba(61, 139, 253, .14);
  --accent-line: rgba(61, 139, 253, .40);
  --danger: #f2555a;
  --danger-hover: #ff6b70;
  --danger-soft: rgba(242, 85, 90, .14);
  --warn: #f5b34b;
  --warn-soft: rgba(245, 179, 75, .12);
  --ok: #34c77b;
  --media: #05070a;
  --overlay: rgba(4, 6, 10, .86);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 12px 40px rgba(0, 0, 0, .45);
  --focus: 0 0 0 3px rgba(61, 139, 253, .45);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --sat: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
  --sab: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
  --sal: max(env(safe-area-inset-left, 0px), var(--safe-area-inset-left, 0px));
  --sar: max(env(safe-area-inset-right, 0px), var(--safe-area-inset-right, 0px));
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-glow: radial-gradient(1200px 600px at 85% -10%, rgba(31, 111, 229, .10), transparent 60%),
             radial-gradient(900px 500px at -10% 10%, rgba(99, 102, 241, .07), transparent 60%);
  --surface: #ffffff;
  --surface-2: #f2f5fa;
  --surface-3: #e7ecf4;
  --border: #e1e6ee;
  --border-strong: #c8d1de;
  --text: #0e1522;
  --text-2: #4b586b;
  --text-3: #7b8799;
  --accent: #1f6fe5;
  --accent-hover: #175fcc;
  --accent-soft: rgba(31, 111, 229, .09);
  --accent-line: rgba(31, 111, 229, .35);
  --danger: #d93a3f;
  --danger-hover: #c22f34;
  --danger-soft: rgba(217, 58, 63, .09);
  --warn: #a35f00;
  --warn-soft: rgba(245, 158, 11, .12);
  --ok: #1b9b58;
  --overlay: rgba(10, 14, 22, .82);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 12px 32px rgba(16, 24, 40, .10);
  --focus: 0 0 0 3px rgba(31, 111, 229, .30);
  color-scheme: light;
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.5 var(--font);
  background-image: var(--bg-glow); background-attachment: fixed; background-repeat: no-repeat;
  min-height: 100vh; min-height: 100dvh;
  padding: calc(var(--sat) + 12px) calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
.themeSwitch, .themeSwitch * { transition: background-color .3s ease, border-color .3s ease, color .3s ease !important; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
code { background: var(--surface-3); color: var(--text); padding: 1px 6px; border-radius: 6px; font: .88em var(--mono); }
.muted { color: var(--text-2); }
.center { text-align: center; }
h1, h2, h3 { letter-spacing: -.01em; }
::selection { background: var(--accent-soft); }

/* Solid backdrop behind the status bar (Android edge-to-edge, iOS black-translucent). */
body::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: var(--sat); background: var(--bg); z-index: 50; pointer-events: none; }

/* ---------- icons (CSS masks, so button text stays plain text) ---------- */
.fi, .appIcon, .cardIcon, .emptyIcon, .volIcon, .iconBtn::before, .dockBtn::before, .linkBtn::before, .callBtn::before, .callRound::before, .callExpand::before, .stageExit::before {
  display: inline-block; flex: none; background-color: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
.i-sync { --ic: var(--ic-sync); } .i-cam { --ic: var(--ic-cam); } .i-screen { --ic: var(--ic-screen); } .i-shield { --ic: var(--ic-shield); }
.i-puzzle { --ic: var(--ic-puzzle); } .i-phone { --ic: var(--ic-phone); } .i-tablet { --ic: var(--ic-tablet); } .i-monitor { --ic: var(--ic-monitor); }
.i-chat { --ic: var(--ic-chat); } .i-play { --ic: var(--ic-play); }

/* ---------- controls ---------- */
button, select, input {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  min-height: 44px; padding: 0 14px;
}
button { cursor: pointer; font-weight: 600; touch-action: manipulation; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover:not(:disabled) { border-color: var(--border-strong); background: var(--surface-3); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--accent); }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
button.danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
button.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
button.big { min-height: 52px; font-size: 16.5px; border-radius: 12px; }
input { width: 100%; }
input::placeholder { color: var(--text-3); }
select { cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 600; text-decoration: none; }
.btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: var(--accent-hover); color: var(--accent-fg); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }

.iconBtn { width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 12px; background: var(--surface); }
.iconBtn::before { content: ""; width: 20px; height: 20px; }
.themeToggle::before { --ic: var(--ic-sun); }
:root[data-theme="light"] .themeToggle::before { --ic: var(--ic-moon); }

.pill { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.hint { color: var(--text-2); font-size: 12.5px; margin: 8px 0 0; }
.err { color: var(--danger); margin: 0; font-size: 14px; font-weight: 500; }
.note { color: var(--text-2); font-size: 13.5px; border: 1px solid var(--border); border-left: 3px solid var(--accent); padding: 10px 14px; margin: 16px 0 0; background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ==========================================================================
   Lobby
   ========================================================================== */
.lobby { max-width: 1160px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 8px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo img { border-radius: 10px; box-shadow: var(--shadow-sm); }
.logo .word { font-weight: 800; font-size: 19px; letter-spacing: .05em; }
.logo .word span, .brand h1 span { color: var(--accent); }
.logo:hover { color: var(--text); }
.topActions { display: flex; align-items: center; gap: 6px; }
.navLink { color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.navLink:hover { color: var(--text); background: var(--surface-2); }

.hero { display: grid; gap: 28px; align-items: center; padding: 28px 0 8px; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px); gap: 56px; padding: 56px 0 24px; } }
.eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line); padding: 4px 11px; border-radius: 999px; }
.heroText h1 { font-size: clamp(34px, 6.2vw, 58px); line-height: 1.04; letter-spacing: -.03em; margin: 16px 0 14px; font-weight: 800; }
.grad { background: linear-gradient(92deg, var(--accent) 0%, #7c6cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(15.5px, 1.6vw, 18px); color: var(--text-2); margin: 0 0 24px; max-width: 46ch; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }
.features li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.features .fi { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--accent); -webkit-mask: none; mask: none; position: relative; }
.features .fi::after { content: ""; position: absolute; inset: 8px; background: #fff; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.features b { display: block; font-size: 14.5px; }
.features span:not(.fi) { display: block; font-size: 13px; color: var(--text-2); line-height: 1.4; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.cardHead h2 { margin: 0 0 2px; font-size: 21px; }
.cardHead p { margin: 0; font-size: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.field input { color: var(--text); font-weight: 400; font-size: 16px; min-height: 48px; background: var(--surface-2); } /* 16px avoids iOS zoom */
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.joinRow { display: flex; gap: 8px; }
.joinRow input { flex: 1; min-width: 0; font-size: 16px; letter-spacing: .04em; min-height: 48px; }
.joinRow button { flex: none; min-width: 92px; min-height: 48px; }
.invite { margin: 0; padding: 11px 13px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 14px; }
.invite b { color: var(--accent); }
.server summary { cursor: pointer; color: var(--text-2); font-size: 13px; padding: 4px 0; list-style-position: inside; }
.server[open] summary { margin-bottom: 10px; }

/* ---------- apps / install ---------- */
.apps { margin: 48px 0 10px; }
.sectionHead { text-align: center; margin: 0 auto 22px; max-width: 620px; }
.sectionHead h2 { margin: 0 0 6px; font-size: clamp(24px, 3.2vw, 32px); letter-spacing: -.02em; }
.sectionHead p { margin: 0; }
.appGrid { display: grid; gap: 14px; }
@media (min-width: 760px) { .appGrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.app, .appHead > div, .card, .heroText, .features li > div { min-width: 0; }
.app, .card, .helpBody, .note, .steps, .hint { overflow-wrap: anywhere; }
.appHead .pill { white-space: normal; }
.app { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: flex-start; }
.app > * { max-width: 100%; }
.appHead { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.appHead h3 { margin: 0 0 4px; font-size: 17px; }
.appIcon { width: 44px; height: 44px; border-radius: 12px; position: relative; background: var(--accent-soft); -webkit-mask: none; mask: none; }
.appIcon::after { content: ""; position: absolute; inset: 11px; background: var(--accent); -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.app p { margin: 0 0 14px; font-size: 14px; }
.app .btn { margin-bottom: 4px; }
.stepsBox { width: 100%; margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.stepsBox summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); padding: 4px 0; }
.steps { margin: 10px 0 0; padding-left: 20px; font-size: 14px; color: var(--text-2); display: grid; gap: 7px; }
.steps b { color: var(--text); }
.steps button.copy { margin-left: 4px; min-height: 26px; padding: 0 8px; font-size: 12px; vertical-align: 1px; }
.app .hint { margin: 12px 0 0; }
.footer { margin: 36px 0 8px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer a { color: var(--text-2); }
.footer a.konstent { color: var(--accent); font-weight: 800; letter-spacing: .06em; text-decoration: none; }
.footer a.konstent:hover { text-decoration: underline; }

/* ==========================================================================
   Room
   ========================================================================== */
.room { max-width: 1440px; margin: 0 auto; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px;
  padding: 8px 8px 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.roomInfo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.barLogo { border-radius: 9px; flex: none; }
.roomName { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.roomName .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); font-weight: 700; }
.roomName b { font-size: 17px; letter-spacing: .03em; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linkBtn::before { content: ""; width: 15px; height: 15px; --ic: var(--ic-link); }
.barRight { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; color: var(--text); }
.chip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: var(--text-3); }
.chip.live::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.chip.connecting::before { background: var(--warn); }
.chip.sync::before { background: var(--accent); }
.chip.me { border-color: var(--accent-line); background: var(--accent-soft); }

.layout { display: grid; gap: 16px; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.mainCol { min-width: 0; display: flex; flex-direction: column; }

/* ---------- stage (always a dark "player", in both themes) ---------- */
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--media); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: #e8edf5; box-shadow: var(--shadow); }
@supports not (aspect-ratio: 16 / 9) { .stage { height: 0; padding-top: 56.25%; } }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage:not(.has-video) video { visibility: hidden; }
.stage:not(.has-video) { background: radial-gradient(600px 300px at 50% 0%, rgba(61, 139, 253, .18), transparent 70%), #0a0e15; }
.stage:fullscreen, .stage:-webkit-full-screen { border: 0; border-radius: 0; aspect-ratio: auto; }
.empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #9aa6b8; padding: 16px; gap: 4px; overflow: auto; }
.emptyIcon { width: 46px; height: 46px; color: #5a9cff; margin-bottom: 8px; opacity: .9; }
.empty .big { color: #f1f5fb; font-size: 19px; font-weight: 700; margin: 0; }
.empty p { margin: 0; max-width: 36ch; }
.stageLabel { position: absolute; left: 12px; top: 12px; font-size: 12px; font-weight: 600; background: rgba(0, 0, 0, .6); color: #fff; padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.stageLabel::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); margin-right: 7px; vertical-align: 1px; }
.tapPlay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--accent); border-color: var(--accent); color: #fff; font-size: 17px; min-height: 54px; padding: 0 26px; border-radius: 999px; box-shadow: 0 8px 32px rgba(0, 0, 0, .55); }
.stats { font: 12px/1.4 var(--mono); color: var(--text-3); min-height: 17px; margin: 8px 4px 0; }
.warn { color: var(--warn); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); border-radius: var(--radius-sm); padding: 10px 14px; margin: 8px 0 0; font-size: 14px; }

/* invite inside the empty stage */
.inviteBox { margin-top: 16px; width: min(100%, 520px); }
.inviteBox p { margin: 0 0 8px; color: #c9d2df; }
.inviteRow { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 6px 6px 6px 12px; max-width: 100%; }
.inviteRow code { background: none; padding: 0; color: #f1f5fb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; text-align: left; }

/* ---------- call dock ---------- */
.controls { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.dock { display: flex; gap: 6px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); flex: 1 1 auto; justify-content: center; }
.dockBtn { flex: 1 1 0; min-width: 0; min-height: 58px; padding: 6px 8px; flex-direction: column; gap: 4px; border: 0; border-radius: 13px;
  background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.15; white-space: normal; text-align: center; overflow-wrap: normal; }
.dockBtn::before { content: ""; width: 22px; height: 22px; }
.dockBtn:hover:not(:disabled) { background: var(--surface-3); }
#micBtn::before { --ic: var(--ic-mic); }
#micBtn.off { background: var(--danger-soft); color: var(--danger); }
#micBtn.off::before { --ic: var(--ic-micOff); }
#camBtn::before { --ic: var(--ic-camOff); }
#camBtn { color: var(--text-2); }
#camBtn.active { background: var(--accent-soft); color: var(--accent); }
#camBtn.active::before { --ic: var(--ic-cam); }
#shareBtn::before { --ic: var(--ic-screen); }
#shareBtn.primary { background: var(--accent); color: var(--accent-fg); }
#shareBtn.primary:hover:not(:disabled) { background: var(--accent-hover); }
#shareBtn.on { background: var(--danger); color: #fff; }
#shareBtn.on::before { --ic: var(--ic-screenStop); }
#fsBtn::before { --ic: var(--ic-full); }
#leaveBtn { background: var(--danger-soft); color: var(--danger); }
#leaveBtn::before { --ic: var(--ic-leave); }
#leaveBtn:hover { background: var(--danger); color: #fff; }
.tune { display: flex; gap: 8px; flex: 1 1 300px; }
.tune select { flex: 1 1 auto; min-width: 0; min-height: 52px; border-radius: 14px; background-color: var(--surface); font-size: 14px;
  padding-right: 10px; }
.vol { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); min-height: 52px; color: var(--text-2); flex: 1 1 140px; min-width: 0; }
.volIcon { width: 20px; height: 20px; --ic: var(--ic-vol); }
.vol input { padding: 0; min-height: 0; border: 0; background: transparent; accent-color: var(--accent); box-shadow: none; }
@media (min-width: 1100px) {
  .dock { flex: 0 1 auto; }
  .dockBtn { flex: 0 0 auto; min-width: 84px; padding: 6px 14px; }
}

/* ---------- cards in the room ---------- */
.partyCard, .nowPlaying, .syncBar, .help { margin-top: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.cardIcon { width: 20px; height: 20px; color: var(--accent); }
.partyCard { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); padding: 14px; display: grid; gap: 10px; font-size: 14px; }
.partyHead { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.partyWhat { color: var(--text-2); word-break: break-all; font-family: var(--mono); font-size: 12.5px; }
.partyCard .hint { margin: 0; }
.syncActions { display: flex; gap: 8px; flex-wrap: wrap; }
.syncBar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.syncInfo { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 320px; min-width: 0; }
.syncInfo .cardIcon { margin-top: 1px; }
.syncBar.on { border-color: var(--ok); }
.syncBar.on .cardIcon { color: var(--ok); }
.syncBar.flash { border-color: var(--accent); box-shadow: var(--focus); }
.nowPlaying { border-color: var(--accent-line); padding: 12px 14px; font-size: 14px; }
.npHead { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin-bottom: 6px; }
.npHead .muted { font-size: 12.5px; }
.npRow { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.npRow + .npRow { border-top: 1px solid var(--border); }
.npRow .npTime { font: 600 21px/1.2 var(--mono); color: var(--text); min-width: 7ch; }
.npRow .npState { font-size: 16px; width: 22px; text-align: center; color: var(--accent); }
.npRow .npWho { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npRow.stale { opacity: .5; }
.help summary { cursor: pointer; padding: 13px 16px; font-weight: 600; color: var(--text); }
.help[open] summary { border-bottom: 1px solid var(--border); }
.helpBody { padding: 12px 16px 6px; color: var(--text-2); font-size: 14px; }
.helpBody b { color: var(--text); }
.helpBody p, .helpBody ol { margin: 0 0 10px; }
.helpBody ol { padding-left: 20px; }

/* ---------- chat ---------- */
.chat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: column; height: 380px; box-shadow: var(--shadow-sm); overflow: hidden; }
@media (min-width: 1000px) { .chat { height: calc(100vh - 110px - var(--sat)); height: calc(100dvh - 110px - var(--sat)); position: sticky; top: calc(var(--sat) + 12px); } }
.chatHead { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.log .m { font-size: 14px; word-wrap: break-word; overflow-wrap: anywhere; align-self: flex-start; max-width: 88%;
  background: var(--surface-2); border: 1px solid var(--border); padding: 7px 12px 8px; border-radius: 14px 14px 14px 4px; }
.log .m b { display: block; font-size: 12px; color: var(--accent); margin-bottom: 1px; }
.log .m.mine { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: var(--accent-fg); border-radius: 14px 14px 4px 14px; }
.log .m.mine b { color: rgba(255, 255, 255, .8); }
.log .m.sys { align-self: center; text-align: center; background: none; border: 0; padding: 2px 8px; color: var(--text-3); font-size: 12.5px; max-width: 100%; }
.log:empty::before { content: "Chat with everyone in the room."; color: var(--text-3); font-size: 13px; margin: auto; }
.chatForm { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); }
.chatForm input { font-size: 16px; border-radius: 12px; background: var(--surface-2); }
.chatForm button { border-radius: 12px; }

/* ---------- video call tiles ---------- */
.cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cams[data-n="1"], .cams[data-n="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cams.alone { grid-template-columns: minmax(0, 260px); }
.tile { position: relative; aspect-ratio: 4 / 3; background: var(--media); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.self video { transform: scaleX(-1); }
.tileName { position: absolute; left: 8px; bottom: 8px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); }
/* During a video call the empty stage gives its space to the faces; it comes back when someone shares. */
.inCall #stage:not(.has-video), .inCall #stage:not(.has-video) + #stats { display: none; }

/* ---------- overlays ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--sab) + 24px); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 500; z-index: 70; max-width: calc(100vw - 32px); box-shadow: var(--shadow); animation: toastIn .2s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.drmHint { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 18px 22px;
  background: rgba(5, 7, 10, .9); font-size: 14px; color: #c9d2df; overflow-y: auto; backdrop-filter: blur(4px); }
.drmHint p { margin: 0; max-width: 62ch; }
.drmHint b { color: #fff; }
.drmHint .big { color: #fff; font-size: 18px; font-weight: 700; }
.drmHint button:not(.primary) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.drmActions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.countdown { position: fixed; inset: 0; z-index: 60; background: var(--overlay); backdrop-filter: blur(10px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; color: #fff; }
.cdNum { font: 800 min(38vw, 220px)/1 var(--font); color: #5a9cff; letter-spacing: -.04em; }
.cdNum.go { color: #fff; font-size: min(22vw, 150px); }
.cdText { font-size: 18px; color: #d5dde9; max-width: 32ch; }

/* ==========================================================================
   Phones
   ========================================================================== */
@media (max-width: 899px) {
  .hero { display: flex; flex-direction: column; align-items: stretch; }
  .heroText { display: contents; }
  .heroText .eyebrow { align-self: flex-start; }
  .heroText h1, .lead { margin-bottom: 0; }
  .heroText h1 { margin-top: 0; }
  .joinCard { order: 1; }
  .features { order: 2; }
}
@media (max-width: 640px) {
  .hero { gap: 14px; }
  .features { grid-template-columns: 1fr 1fr; gap: 10px; }
  .features li { flex-direction: column; gap: 8px; padding: 12px; }
  .features .fi { width: 32px; height: 32px; }
  .features .fi::after { inset: 7px; }
  .features span:not(.fi) { font-size: 12.5px; }
  body { padding-left: calc(var(--sal) + 12px); padding-right: calc(var(--sar) + 12px); }
  .navLink { display: none; }
  .card { padding: 18px; border-radius: 18px; }
  .hero { padding-top: 12px; }
  .features li { padding: 10px 12px; }
  .bar { padding: 6px 6px 6px 8px; }
  .barLogo { display: none; }
  .roomInfo { flex: 1 1 0; }
  .barRight { display: contents; }
  .bar .themeToggle { order: 2; }
  .chips { order: 3; flex: 1 1 100%; min-width: 0; }
  .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .bar .iconBtn { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
  .stage { border-radius: var(--radius); }
  .controls { display: contents; }
  .dock { position: sticky; bottom: calc(var(--sab) + 8px); z-index: 20; margin-top: 10px; order: 0; width: 100%; padding: 5px; gap: 4px; border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
  .dockBtn { min-height: 60px; font-size: 11px; padding: 6px 2px; white-space: normal; text-align: center; }
  .tune { margin-top: 10px; flex: none; }
  .tune select, .vol { min-height: 44px; }
  .empty .big { font-size: 16px; }
  .empty p { font-size: 13px; }
  .emptyIcon { width: 34px; height: 34px; margin-bottom: 4px; }
  .inviteBox { margin-top: 10px; }
  .drmHint { font-size: 12.5px; padding: 12px 14px; gap: 6px; }
  .drmHint .big { font-size: 15px; }
  .chat { height: 420px; }
  .syncActions > * { flex: 1 1 auto; }
}
@media (max-width: 360px) { .dockBtn { font-size: 10px; } .dockBtn::before { width: 20px; height: 20px; } }
@media (prefers-reduced-motion: no-preference) {
  button, .btn { transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .toast { animation: none; } }

/* ==========================================================================
   Documents (privacy policy)
   ========================================================================== */
.doc { max-width: 780px; margin: 0 auto 40px; }
.doc .topbar { margin-bottom: 18px; }
.doc article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(18px, 4vw, 36px); box-shadow: var(--shadow-sm); }
.doc h1 { margin: 0 0 6px; font-size: clamp(28px, 4vw, 36px); letter-spacing: -.02em; }
.doc h2 { margin: 30px 0 8px; font-size: 18px; }
.doc p, .doc li { color: var(--text-2); }
.doc b { color: var(--text); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.doc th { color: var(--text); font-weight: 700; background: var(--surface-2); }

/* ==========================================================================
   Android picture-in-picture: only the call is shown in the floating window
   ========================================================================== */
body.pip { padding: 0; margin: 0; overflow: hidden; background: #000; background-image: none; }
body.pip::before { display: none; }
body.pip > *:not(#roomView), body.pip .bar, body.pip .chat, body.pip .mainCol > *:not(#cams):not(#stage) { display: none !important; }
body.pip .layout, body.pip .mainCol { display: block; margin: 0; padding: 0; }
body.pip #roomView { padding: 0; margin: 0; }
body.pip #stage { display: none; }
body.pip.pipStage #stage { display: block; border: 0; border-radius: 0; height: 100vh; aspect-ratio: auto; box-shadow: none; }
body.pip.pipStage #cams { display: none; }
body.pip #cams { position: fixed; inset: 0; margin: 0; gap: 2px; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
body.pip #cams .tile { aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
body.pip #cams:not([data-n="1"]) .tile.self { position: fixed; right: 4px; bottom: 4px; width: 32%; height: auto; aspect-ratio: 3 / 4; z-index: 2; border: 1px solid #000; border-radius: 6px; }
body.pip .tileName { font-size: 10px; left: 4px; bottom: 4px; }

/* ==========================================================================
   Full screen: shared screen (body.fullStage) and video call (body.callFull)
   ========================================================================== */
.cams { position: relative; }
.callExpand { position: absolute; top: 8px; right: 8px; z-index: 3; min-height: 34px; padding: 0 12px 0 10px; gap: 6px; font-size: 12.5px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.callExpand:hover:not(:disabled) { background: rgba(0, 0, 0, .72); border-color: rgba(255, 255, 255, .35); }
.callExpand::before { content: ""; width: 15px; height: 15px; --ic: var(--ic-full); }
.callTop, .callBar, .callEmpty, .stageExit { display: none; }

/* shared screen full screen */
body.fullStage, body.callFull { overflow: hidden; }
body.fullStage .stage { display: block !important; position: fixed; inset: 0; z-index: 45; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; padding: 0; }
body.fullStage .stageExit { display: inline-flex; position: absolute; z-index: 6; top: calc(var(--sat) + 12px); right: calc(var(--sar) + 12px); min-height: 40px; padding: 0 14px 0 12px; gap: 8px;
  border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; border: 1px solid rgba(255, 255, 255, .22); font-size: 13.5px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
body.fullStage .stageExit:hover { background: rgba(0, 0, 0, .78); }
body.fullStage .stageExit::before { content: ""; width: 16px; height: 16px; --ic: var(--ic-exitFull); }
body.fullStage .stageLabel { top: calc(var(--sat) + 18px); left: calc(var(--sal) + 14px); }

/* video call full screen */
body.callFull #cams { display: grid !important; position: fixed; inset: 0; z-index: 45; margin: 0; padding: 0; gap: 2px; background: #05070a;
  grid-template-columns: 1fr; grid-auto-rows: 1fr; width: 100vw; height: 100vh; height: 100dvh; }
body.callFull .callExpand { display: none; }
body.callFull #cams .tile { border: 0; border-radius: 0; aspect-ratio: auto; box-shadow: none; min-height: 0; background: #05070a; }
body.callFull #cams .tile video { object-fit: contain; }
body.callFull #cams[data-remote="1"] .tile:not(.self) video { object-fit: cover; }
@media (min-width: 700px) and (orientation: landscape) { body.callFull #cams[data-remote="1"] .tile:not(.self) video { object-fit: contain; } }
body.callFull #cams[data-remote="2"] { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
body.callFull #cams[data-remote="3"], body.callFull #cams[data-remote="4"], body.callFull #cams[data-remote="5"] { grid-template-columns: 1fr 1fr; }
@media (orientation: landscape) {
  body.callFull #cams[data-remote="2"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  body.callFull #cams[data-remote="5"] { grid-template-columns: 1fr 1fr 1fr; }
}
body.callFull #cams .tile video { width: 100%; height: 100%; }
/* your own camera: small, top right, under the top bar (fills the screen when you're the only camera) */
body.callFull #cams:not([data-remote="0"]) .tile.self { position: absolute; z-index: 2; top: calc(var(--sat) + 82px); right: calc(var(--sar) + 14px);
  width: clamp(92px, 24vw, 220px); height: auto; aspect-ratio: 3 / 4; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .28); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
body.callFull #cams:not([data-remote="0"]) .tile.self video { object-fit: cover; }
@media (orientation: landscape) { body.callFull #cams:not([data-remote="0"]) .tile.self { aspect-ratio: 4 / 3; width: clamp(120px, 20vw, 260px); } }
body.callFull .tile.self.rear video, .tile.self.rear video { transform: none; }
body.callFull .tileName { left: calc(var(--sal) + 12px); bottom: calc(var(--sab) + 112px); font-size: 13px; }
body.callFull #cams[data-remote="1"] .tile:not(.self) .tileName { bottom: calc(var(--sab) + 112px); }
body.callFull #cams[data-remote="3"] .tileName, body.callFull #cams[data-remote="4"] .tileName, body.callFull #cams[data-remote="5"] .tileName,
body.callFull #cams[data-remote="2"] .tile:first-of-type .tileName { bottom: 10px; }
body.callFull .tile.self .tileName { bottom: 6px; left: 6px; font-size: 11px; }
body.callFull #cams[data-n="0"] .callEmpty { display: flex; align-items: center; justify-content: center; text-align: center; color: #c9d2df; padding: 24px; margin: 0; font-size: 16px; }

body.callFull .callTop { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: absolute; z-index: 4; left: 0; right: 0; top: 0;
  padding: calc(var(--sat) + 12px) calc(var(--sar) + 14px) 14px calc(var(--sal) + 16px); background: linear-gradient(rgba(0, 0, 0, .62), rgba(0, 0, 0, .25) 75%, transparent); color: #fff; transition: opacity .25s; }
.callInfo { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.callInfo span:last-child { overflow: hidden; text-overflow: ellipsis; color: #d5dde9; }
.callInfo b { font-variant-numeric: tabular-nums; }
.callDot { width: 9px; height: 9px; border-radius: 50%; background: #34c77b; flex: none; box-shadow: 0 0 0 3px rgba(52, 199, 123, .3); }
.callRound { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .22); flex: none; }
.callRound:hover:not(:disabled) { background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .35); }
.callRound::before { content: ""; width: 20px; height: 20px; }
.callMin::before { --ic: var(--ic-min); }
body.callFull .callBar { display: flex; justify-content: center; align-items: flex-start; gap: clamp(10px, 4vw, 22px); position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  padding: 34px calc(var(--sar) + 12px) calc(var(--sab) + 18px) calc(var(--sal) + 12px); background: linear-gradient(transparent, rgba(0, 0, 0, .65)); transition: opacity .25s; }
.callBtn { flex-direction: column; gap: 6px; width: 66px; min-width: 0; min-height: 0; padding: 0; background: none; border: 0; color: #fff; font-size: 11.5px; font-weight: 600; line-height: 1.15; text-align: center; white-space: normal; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.callBtn:hover:not(:disabled) { background: none; }
.callBtn::before { content: ""; box-sizing: content-box; width: 24px; height: 24px; padding: 16px; border-radius: 50%; background-color: #fff;
  -webkit-mask: none; mask: none; background-image: none; }
/* round button with the icon cut out: the circle is a background, the icon a mask on an inner layer */
.callBtn { position: relative; }
.callBtn::before { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .24); width: 56px; height: 56px; padding: 0; box-sizing: border-box; transition: background-color .15s; }
.callBtn::after { content: ""; position: absolute; top: 16px; left: 50%; width: 24px; height: 24px; margin-left: -12px; background-color: #fff;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.callBtn:hover:not(:disabled)::before { background: rgba(255, 255, 255, .3); }
#callMic { --ic: var(--ic-mic); }
#callMic.off { --ic: var(--ic-micOff); }
#callMic.off::before, #callCam.off::before { background: #fff; border-color: #fff; }
#callMic.off::after, #callCam.off::after { background-color: #111; }
#callCam { --ic: var(--ic-cam); }
#callCam.off { --ic: var(--ic-camOff); }
#callFlip { --ic: var(--ic-flip); }
#callLeave { --ic: var(--ic-hangup); }
#callLeave::before { background: #e5484d; border-color: #e5484d; }
#callLeave:hover::before { background: #f05a5f; }
.callBtn:disabled { opacity: .5; }
body.callFull.callIdle .callTop, body.callFull.callIdle .callBar { opacity: 0; pointer-events: none; }
body.callFull.callIdle { cursor: none; }
@media (prefers-reduced-motion: reduce) { body.callFull .callTop, body.callFull .callBar { transition: none; } }
body.pip .callTop, body.pip .callBar, body.pip .callExpand, body.pip .callEmpty { display: none !important; }
/* the floating window wins over the full-screen call layout */
body.pip #cams:not([data-n="1"]) .tile.self { top: auto !important; bottom: 4px !important; right: 4px !important; width: 32% !important; border-width: 1px !important; }
body.pip .tileName { bottom: 4px !important; left: 4px !important; font-size: 10px !important; }
