/* CollabX UI — shared by host / viewer / popup pages */
:root{color-scheme:dark;--bg:#090c13;--bg2:#0d111a;--panel:#121826;--panel2:#18202f;--line:#232c3f;--line2:#2f3b54;--text:#e9edf5;--muted:#8f9bb3;
  --accent:#4c7dff;--accent2:#6f98ff;--accent-bg:rgba(76,125,255,.16);--danger:#ef5350;--danger-bg:rgba(239,83,80,.15);--ok:#34d399;--ok-bg:rgba(52,211,153,.14)}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;display:flex;flex-direction:column;color:var(--text);font:14px/1.45 Inter,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased;
  background:radial-gradient(1100px 520px at 85% -12%,#16203a 0,transparent 62%),var(--bg)}
[hidden]{display:none!important}
i[data-i]{display:inline-flex;flex:none}
svg{width:18px;height:18px;flex:none}

/* ---------- header ---------- */
header{display:flex;align-items:center;gap:10px;padding:8px 14px;min-height:54px;background:rgba(18,24,38,.88);backdrop-filter:blur(8px);border-bottom:1px solid var(--line);flex-wrap:wrap}
.brandbar{display:flex;align-items:center;gap:10px;min-width:0;color:inherit;text-decoration:none}
a.brandbar:hover .logo{filter:brightness(1.12)}
a.brandbar.disabled{pointer-events:none;cursor:default}
.logo{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#4c7dff,#7b5cff);box-shadow:0 4px 14px rgba(76,125,255,.35);flex:none}
.logo svg{width:20px;height:20px}
header h1{margin:0;font-size:16px;font-weight:700;display:flex;align-items:baseline;gap:8px;white-space:nowrap;min-width:0}
header h1 #brand{overflow:hidden;text-overflow:ellipsis}
header h1 small{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.09em}
.hspace{flex:1}
.ver{font-size:11px;color:var(--muted)}
.badge{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:600;padding:4px 11px;border-radius:999px;background:var(--panel2);border:1px solid var(--line);color:var(--muted);white-space:nowrap}
.badge::before{content:"";width:8px;height:8px;border-radius:50%;background:#5b6784;flex:none}
.badge.live{color:#ffd9d8;background:var(--danger-bg);border-color:rgba(239,83,80,.45)}
.badge.live::before{background:var(--danger);animation:pulse 1.6s infinite}
.badge.ok{color:#c8f7e3;background:var(--ok-bg);border-color:rgba(52,211,153,.4)}
.badge.ok::before{background:var(--ok)}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(239,83,80,.6)}70%{box-shadow:0 0 0 7px rgba(239,83,80,0)}100%{box-shadow:0 0 0 0 rgba(239,83,80,0)}}
@media (prefers-reduced-motion:reduce){.badge.live::before{animation:none}}

/* ---------- buttons ---------- */
button,a.btn{font:inherit;font-weight:600;color:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:38px;padding:0 15px;border-radius:10px;
  border:1px solid var(--line2);background:var(--panel2);cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .15s,border-color .15s}
button:hover:not(:disabled),a.btn:hover{background:#202a3e;border-color:#3b4a69}
button:active:not(:disabled){transform:translateY(1px)}
button:disabled{opacity:.45;cursor:default}
button:focus-visible,a.btn:focus-visible,.chip:focus-within,.seg button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent2);outline-offset:2px}
button.primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 6px 18px rgba(76,125,255,.28)}
button.primary:hover:not(:disabled){background:#5f8bff;border-color:#5f8bff}
button.danger{background:var(--danger);border-color:var(--danger);color:#fff}
button.danger:hover:not(:disabled){background:#f4625f;border-color:#f4625f}
button.danger:disabled{background:var(--panel2);border-color:var(--line2);color:var(--muted)}
button.ghost,a.btn.ghost{background:transparent;border-color:var(--line)}
button.ghost:hover:not(:disabled),a.btn.ghost:hover{background:var(--panel2)}
button.big{height:44px;padding:0 20px;font-size:15px}
a.btn.disabled{opacity:.45;pointer-events:none}
/* a toggle that is "off" (muted / camera off) reads red so it is obvious */
button[aria-pressed="false"].tog{color:#ffb3b1;border-color:rgba(239,83,80,.45);background:var(--danger-bg)}
button[aria-pressed="true"].tog{color:#c8f7e3;border-color:rgba(52,211,153,.4);background:var(--ok-bg)}
.icon-btn{width:30px;height:30px;padding:0;border-radius:8px;background:transparent;border-color:transparent;color:var(--muted)}
.icon-btn svg{width:17px;height:17px}
.icon-btn:hover:not(:disabled){background:var(--panel2);color:var(--text);border-color:var(--line)}
.icon-btn.rm:hover:not(:disabled){background:var(--danger-bg);color:#ff9a97;border-color:rgba(239,83,80,.4)}
.icon-btn.off{color:var(--danger)}
#tchat.unread::after{content:"";width:8px;height:8px;border-radius:50%;background:#ff5252}

/* ---------- chips (toggles) and segmented control ---------- */
.chip{position:relative;display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 13px;border-radius:999px;border:1px solid var(--line);background:var(--panel);
  color:var(--muted);font-weight:600;font-size:13px;cursor:pointer;user-select:none;transition:background .15s,border-color .15s,color .15s}
.chip input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.chip svg{width:17px;height:17px}
.chip:hover{border-color:var(--line2)}
.chip:has(input:checked){background:var(--accent-bg);border-color:rgba(76,125,255,.55);color:#d5e1ff}
.live .chip.mic:not(:has(input:checked)){background:var(--danger-bg);border-color:rgba(239,83,80,.5);color:#ffb3b1}
.chip:has(input:disabled){opacity:.5;cursor:default}
.seg{display:inline-flex;padding:3px;gap:3px;background:var(--panel);border:1px solid var(--line);border-radius:12px}
.seg button{height:36px;border:0;background:transparent;color:var(--muted);border-radius:9px;padding:0 15px}
.seg button:hover:not(:disabled){background:var(--panel2);color:var(--text)}
.seg button[aria-pressed="true"]{background:var(--panel2);color:var(--text);box-shadow:inset 0 0 0 1px var(--line2),0 2px 8px rgba(0,0,0,.3)}
.seg button[aria-pressed="true"] svg{color:var(--accent2)}

/* ---------- inputs ---------- */
input,select,textarea{font:inherit;color:var(--text);background:var(--bg2);border:1px solid var(--line2);border-radius:10px;padding:0 12px;height:38px;min-width:0}
input:not([type=checkbox]):not([type=radio]){width:100%}
select{padding:0 10px;cursor:pointer}
textarea{padding:10px 12px;height:auto;width:100%;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12px;resize:vertical}
input::placeholder,textarea::placeholder{color:#66728b}
.field{display:flex;flex-direction:column;gap:6px}
.field>label{font-size:12px;font-weight:600;color:var(--muted)}
.hint{font-size:12px;color:var(--muted)}

/* ---------- layout ---------- */
main{flex:1;display:flex;gap:12px;padding:10px 14px 12px;min-height:0}
.left{position:relative;flex:1;display:flex;flex-direction:column;gap:10px;min-width:0;min-height:0}
.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.toolbar.sub{gap:8px}
.toolbar .push{margin-left:auto}
.toolbar button.big{height:40px;padding:0 18px}
/* one primary button: Start while idle, Stop while live */
body.live #share{display:none}
body:not(.live) #stop{display:none}
.right{width:380px;flex:none;min-width:240px;display:flex;flex-direction:column;gap:12px;min-height:0}
main.nochat .right,main.nochat .split{display:none}
.split{flex:none;width:14px;margin:0 -4px;cursor:col-resize;touch-action:none;position:relative;z-index:6}
.split::after{content:"";position:absolute;left:5px;right:5px;top:0;bottom:0;border-radius:3px;background:var(--line);transition:background .15s}
.split::before{content:"";position:absolute;z-index:1;left:50%;top:50%;width:4px;height:46px;transform:translate(-50%,-50%);border-radius:3px;background:var(--line2);transition:background .15s}
.split:hover::after,.split:active::after{background:var(--accent)}
.split:hover::before,.split:active::before{background:var(--accent2)}
.panel-h .chatsz{margin-left:auto;width:28px;height:28px}

/* ---------- stage (video area) ---------- */
.stage{position:relative;flex:1;min-height:200px;border-radius:16px;overflow:hidden;border:1px solid var(--line);display:grid;place-items:center;
  background:radial-gradient(600px 300px at 50% 0,#17213a 0,transparent 70%),#0a0e17}
.stage .vid{position:absolute;inset:0;width:100%;height:100%;background:#000;object-fit:contain;z-index:1}
.stage-msg{position:relative;z-index:0;max-width:460px;text-align:center;padding:24px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--muted)}
.stage-msg>i svg{width:48px;height:48px;color:#5c76c6}
.stage-msg h2{margin:0;font-size:18px;font-weight:700;color:var(--text)}
.stage-msg p{margin:0;font-size:13.5px}
#vstage.live #vempty{display:none}
#vstage:not(.live) #remote{visibility:hidden}

/* ---------- invite pill (host header) and session pill (viewer header): they fill the middle of the header ---------- */
.invite,.sess{flex:1 1 300px;min-width:240px;max-width:720px;margin:0 auto;height:38px;display:flex;align-items:center;gap:8px;background:var(--panel);border:1px solid var(--line);border-radius:999px}
.invite{padding:0 4px 0 13px}
.invite>i svg{width:16px;height:16px;color:var(--accent2)}
.invite input{flex:1;min-width:60px;height:30px;border:0;background:transparent;padding:0 4px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;text-overflow:ellipsis}
.invite input:focus-visible{outline:none}
.invite .count{font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}
.invite button{height:30px;padding:0 14px;border-radius:999px;font-size:13px}
.sess{justify-content:center;padding:0 16px;color:var(--muted);font-size:12.5px;font-weight:600;max-width:460px}
.sess .dot{width:8px;height:8px;border-radius:50%;background:#5b6784;flex:none}
.sess.good .dot{background:var(--ok)}.sess.fair .dot{background:#f5b94a}.sess.poor .dot{background:var(--danger)}
.sess.good,.sess.fair,.sess.poor{color:var(--text)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ver{font-size:11px;color:var(--muted);margin-right:auto}

/* ---------- side panels: participants + chat ---------- */
.panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.panel.chatp{flex:1}
.panel-h{display:flex;align-items:center;gap:8px;padding:11px 14px;border-bottom:1px solid var(--line);font-weight:700;font-size:13px}
.panel-h svg{width:17px;height:17px;color:var(--muted)}
.pill{margin-left:auto;font-size:11px;font-weight:700;padding:2px 9px;border-radius:999px;background:var(--panel2);border:1px solid var(--line);color:var(--muted)}
#people{padding:6px;display:flex;flex-direction:column;gap:2px;max-height:230px;overflow:auto}
.person{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:10px}
.person:hover{background:var(--panel2)}
.avatar{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:13px;color:#fff;flex:none}
.pname{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;font-size:13px}
.ptag{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:2px 7px;border-radius:999px;background:var(--accent-bg);color:#bcd0ff}
.pacts{display:flex;gap:2px}
#chatlog{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:8px;font-size:14px;min-height:0}
#chatlog div{max-width:88%;padding:7px 11px;border-radius:12px 12px 12px 4px;background:var(--panel2);word-break:break-word;align-self:flex-start}
#chatlog div.me{align-self:flex-end;background:var(--accent-bg);border-radius:12px 12px 4px 12px}
#chatlog b{display:block;font-size:11px;color:#9db6ff;font-weight:700;margin-bottom:1px}
#chatlog div.note{align-self:center;max-width:100%;background:transparent;color:var(--muted);font-size:12px;padding:1px 8px;border-radius:0}
.ptag.hand{background:rgba(245,185,74,.22);color:#ffd68a}
.composer{display:flex;gap:8px;padding:10px;border-top:1px solid var(--line)}
.composer button{width:42px;padding:0;flex:none}

/* ---------- everyone's video: gallery of tiles (host), self tile (viewer), spotlight ---------- */
.gallery{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;padding:2px 2px 6px;flex:none;scrollbar-width:thin}
.gallery[hidden]{display:none}
.vtile{position:relative;flex:none;width:176px;aspect-ratio:4/3;border-radius:12px;overflow:hidden;background:#0a0e17;border:1px solid var(--line);transition:border-color .2s,box-shadow .2s}
.vtile.cam{cursor:zoom-in}
.vtile video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.vtile:not(.cam) video{display:none}
.vph{position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(circle at 50% 35%,#1b2640,#0a0e17 72%)}
.vtile.cam .vph{display:none}
.avatar.big{width:54px;height:54px;font-size:22px}
.vname{position:absolute;left:8px;bottom:7px;max-width:calc(100% - 16px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:600;background:rgba(0,0,0,.62);padding:2px 9px;border-radius:999px}
.vname.nocam::after{content:" · camera off";font-weight:400;color:var(--muted)}
.vhand{position:absolute;right:8px;top:8px;width:30px;height:30px;border-radius:50%;display:none;place-items:center;background:#f5b94a;color:#1d1400;box-shadow:0 4px 14px rgba(0,0,0,.45)}
.vhand svg{width:17px;height:17px}
.vtile.hand .vhand{display:grid;animation:wave .7s ease-in-out infinite alternate}
.vtile.hand{border-color:#f5b94a;box-shadow:0 0 0 2px rgba(245,185,74,.35)}
@keyframes wave{from{transform:rotate(-14deg)}to{transform:rotate(14deg)}}
@media (prefers-reduced-motion:reduce){.vtile.hand .vhand{animation:none}}
.gempty{flex:1;align-self:center;text-align:center;color:var(--muted);font-size:13px;padding:22px 14px;border:1px dashed var(--line2);border-radius:12px}
.gempty b{color:var(--text)}
/* when your own preview is hidden (screen share) the viewers' tiles get the room instead */
.left.noprev .stage{flex:none;min-height:0;display:flex;align-items:center;gap:14px;padding:10px 14px;border-radius:14px}
.left.noprev .stage-msg{flex:1;max-width:none;padding:0;flex-direction:row;text-align:left;gap:10px}
.left.noprev .stage-msg>i,.left.noprev .stage-msg p{display:none}
.left.noprev .stage-msg h2{font-size:15px}
.left.noprev .dock{position:static;transform:none;background:transparent;border:0;box-shadow:none;padding:0;backdrop-filter:none}
.left.noprev .gallery{flex:1;flex-wrap:wrap;overflow-x:hidden;overflow-y:auto;align-content:flex-start;min-height:0}
.left.noprev .vtile{flex:1 1 230px;max-width:420px}
/* spotlight: one viewer's camera, big, over the whole left column */
.spot{position:absolute;inset:0;z-index:20;border-radius:16px;overflow:hidden;background:#05080e;border:1px solid var(--line2)}
.spot video{width:100%;height:100%;object-fit:contain;background:#000}
.spot .spotn{position:absolute;left:14px;bottom:14px;font-weight:600;background:rgba(0,0,0,.65);padding:4px 12px;border-radius:999px}
.spot .icon-btn{position:absolute;top:10px;right:10px;width:36px;height:36px;background:rgba(12,17,28,.85);border-color:var(--line2);color:var(--text)}
/* the little button that makes a picture-in-picture bigger / smaller (viewer page) */
.insz{position:absolute;top:5px;right:5px;z-index:4;width:28px;height:28px;padding:0;border-radius:8px;border:0;background:rgba(0,0,0,.58);color:#fff;display:grid;place-items:center;cursor:pointer}
.insz svg{width:15px;height:15px}
.insz:hover{background:rgba(0,0,0,.8)}
/* viewer page: the host's name tag and my own tile (video, or my initial when the camera is off) */
.vlabel{position:absolute;left:12px;top:12px;z-index:3;display:none;font-size:12px;font-weight:600;background:rgba(0,0,0,.6);padding:3px 11px;border-radius:999px}
#vstage.live .vlabel{display:block}
.hosttile{position:absolute;right:12px;top:12px;z-index:5;width:170px;aspect-ratio:4/3;border-radius:12px;overflow:hidden;border:1px solid var(--line2);background:#000;box-shadow:0 8px 24px rgba(0,0,0,.5);display:none}
#vstage.live .hosttile.on{display:block}
.hosttile video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hosttile .vname{left:6px;bottom:5px}
.vtile.self video{transform:scaleX(-1)}
.selftile{position:absolute;right:12px;bottom:62px;z-index:5;width:150px;aspect-ratio:4/3;border-radius:12px;overflow:hidden;border:1px solid var(--line2);background:#0a0e17;box-shadow:0 8px 24px rgba(0,0,0,.5);display:none}
#vstage.live .selftile{display:block}
.selftile video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000;transform:scaleX(-1)}
.selftile.rear video{transform:none}
.selftile.off video{display:none}
.selftile:not(.off) .vph{display:none}
.selftile.off{cursor:pointer}
.selftile .avatar.big{width:42px;height:42px;font-size:18px}
.selftile .vname{left:6px;bottom:5px}
.selftile.hand{border-color:#f5b94a}

#dhear{display:none}
body.phone #dhear{display:inline-flex}
/* ---------- in-call control bar (mic, camera, switch camera, ...) ---------- */
.dock{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:4;display:none;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;
  background:rgba(12,17,28,.86);border:1px solid var(--line2);backdrop-filter:blur(10px);box-shadow:0 10px 30px rgba(0,0,0,.5);max-width:calc(100% - 16px)}
body.live #stage .dock,#vstage.live .dock{display:flex}
#vstage .dock{bottom:62px}
.dock button{width:46px;height:46px;padding:0;border-radius:50%;flex:none}
.dock button[hidden]{display:none}
.dock button svg{width:21px;height:21px}
.dock .lbl{display:none}
#thand[aria-pressed="false"]{color:var(--text);border-color:var(--line2);background:var(--panel2)}
#thand[aria-pressed="true"]{background:#f5b94a;border-color:#f5b94a;color:#1d1400}
.dock button.end{background:var(--danger);border-color:var(--danger);color:#fff}
.dock button.end:hover{background:#f4625f}
#vstage.novid #remote{visibility:hidden}
#vstage.live.novid #vempty{display:flex}

/* ---------- join card (viewer) ---------- */
#vstage:not(.live):not(.ended){display:none}
.left:has(#vstage:not(.live):not(.ended)) .join-card{margin:auto;width:min(100%,460px)}
.join-card{display:flex;flex-direction:column;gap:12px;padding:18px;background:var(--panel);border:1px solid var(--line);border-radius:14px}
.join-card h2{margin:0;font-size:16px}

/* ---------- settings dialog ---------- */
dialog{background:var(--panel);color:var(--text);border:1px solid var(--line2);border-radius:16px;padding:20px;max-width:560px;width:92%;box-shadow:0 30px 80px rgba(0,0,0,.6)}
dialog::backdrop{background:rgba(5,8,14,.7);backdrop-filter:blur(3px)}
dialog h3{margin:0 0 6px;font-size:17px}
dialog .hint{margin:14px 0 6px}
dialog .row{display:flex;gap:8px;margin-top:16px}

/* ---------- extension popup ---------- */
body.popup{width:316px;padding:16px;gap:10px;height:auto}
.phead{display:flex;align-items:center;gap:12px;margin-bottom:4px}
.phead h1{margin:0;font-size:17px}
.phead p{margin:0;font-size:12px;color:var(--muted)}
.action{width:100%;height:auto;justify-content:flex-start;text-align:left;padding:12px 14px;gap:12px;font-weight:600}
.action svg{width:22px;height:22px}
.action small{display:block;font-weight:400;opacity:.78;font-size:12px;margin-top:1px}

/* ---------- start page (host or join) ---------- */
body.landing{align-items:center;justify-content:center;overflow:auto}
.lp{flex:none;margin:auto;width:min(760px,100%);padding:28px 20px;display:flex;flex-direction:column;align-items:center;gap:28px}
.lp-brand{text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.lp-brand h1{margin:6px 0 0;font-size:30px;letter-spacing:-.01em}
.lp-brand p{margin:0;color:var(--muted);max-width:420px}
.logo.big{width:60px;height:60px;border-radius:18px}.logo.big svg{width:34px;height:34px}
.lp-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px;width:100%}
.lp-card{display:flex;flex-direction:column;gap:8px;padding:24px;border-radius:20px;background:var(--panel);border:1px solid var(--line);color:inherit;text-decoration:none;transition:border-color .15s,transform .15s,background .15s}
.lp-card:hover{border-color:var(--accent);background:var(--panel2);transform:translateY(-2px)}
.lp-card:focus-visible{outline:2px solid var(--accent2);outline-offset:3px}
.lp-card h2{margin:6px 0 0;font-size:20px}
.lp-card p{margin:0;color:var(--muted);font-size:13.5px;flex:1}
.lp-ic{width:50px;height:50px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#4c7dff,#7b5cff);color:#fff;box-shadow:0 6px 18px rgba(76,125,255,.3)}
.lp-ic.alt{background:linear-gradient(135deg,#2dd4a8,#3b82f6)}
.lp-ic svg{width:26px;height:26px}
.lp-go{display:inline-flex;align-items:center;gap:6px;margin-top:10px;font-weight:600;color:var(--accent2)}
.lp-go svg{width:17px}
.lp-foot{text-align:center}
@media (max-width:640px){.lp-cards{grid-template-columns:1fr}.lp-card{padding:18px}.lp-brand h1{font-size:26px}}

/* ---------- phones: everything icon-only and tight so the video gets the room ---------- */
@media (max-width:800px){
  html,body{height:100dvh}
  header{padding:6px 8px;gap:6px;min-height:46px}
  .brandbar{flex:1 1 0;min-width:0}
  .logo{width:28px;height:28px;border-radius:8px}
  .logo svg{width:17px;height:17px}
  .lbl,header h1 small{display:none}
  header h1{font-size:15px}
  header button,header a.btn{padding:0 9px;height:34px;border-radius:9px}
  .badge{padding:2px 8px;font-size:11px}
  .invite,.sess{order:9;flex:1 0 100%;max-width:none;margin:0;height:34px}
  .invite button{height:26px;padding:0 11px}
  main{flex-direction:column;padding:6px;gap:6px;overflow:hidden}
  .left{flex:1 1 0;gap:6px}
  .right{width:100%;height:44vh;flex:none;min-width:0;gap:6px}
  .split{width:auto;height:26px;margin:-4px 0;cursor:row-resize}
  .split::after{left:0;right:0;top:11px;bottom:11px}
  .split::before{width:46px;height:5px}
  .stage{min-height:0;border-radius:12px}
  .panel{border-radius:12px}
  .panel-h{padding:7px 12px}
  #people{max-height:104px;padding:3px}
  .person{padding:3px 6px}
  .avatar{width:26px;height:26px;font-size:12px}
  #chatlog{padding:8px;gap:6px}
  .composer{padding:6px}
  /* one tidy row: source icons, Start, and the toggles as icon chips */
  .toolbar{gap:6px}
  .toolbar .push{margin-left:0}
  .seg{padding:2px}
  .seg button{height:32px;padding:0 8px}
  .seg button span{display:none}
  .toolbar button.big{height:36px;padding:0 11px;font-size:14px}
  #share .t{font-size:0}
  #share .t::after{content:"Start";font-size:14px}
  .toolbar .chip{height:34px;padding:0 9px}
  .toolbar .chip .t,#tpreview .t{display:none}
  #tpreview{height:34px;padding:0 9px}
  .toolbar select{height:34px}
  /* the call bar already has mic / camera / switch / hear / end, so the toolbar and the empty invite slot go away while they are not needed */
  body.phone.live .toolbar{display:none}
  body.phone:not(.live) .invite{display:none}
  .join-card{padding:14px;gap:10px}
  .vtile{width:92px;border-radius:10px}
  .left.noprev .vtile{flex:1 1 120px}
  .left.noprev .stage{padding:6px 10px}
  .avatar.big{width:40px;height:40px;font-size:17px}
  .selftile{width:84px;right:8px;bottom:104px}
  .hosttile{width:96px;right:8px;top:8px}
  .vlabel{left:8px;top:8px}
  .dock{gap:6px;padding:5px 7px;bottom:10px}
  #vstage .dock{bottom:54px}
  .dock button{width:40px;height:40px}
  .dock button svg{width:19px;height:19px}
}

/* zoom buttons on my own picture (host gallery) */
.zbtns{position:absolute;top:5px;right:5px;z-index:4;display:flex;gap:4px}
.zbtns .insz{position:static}
.zbtns .insz:disabled{opacity:.35;cursor:default}
.vtile.self{cursor:default}

/* screen share: the shared screen gets the stage, everybody's picture sits in a small strip beside it (same size for all) */
.left.side{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr);gap:10px}
.left.side .toolbar{grid-column:1/-1}
.left.side .stage{grid-column:1;grid-row:2;min-height:0}
.left.side .gallery{grid-column:2;grid-row:2;flex-direction:column;overflow-x:hidden;overflow-y:auto;min-height:0;padding:0 4px 0 0}
.left.side .gempty{display:none}
@media (max-width:800px){
  .left.side{display:flex}
  .left.side .gallery{flex-direction:row;overflow-x:auto;overflow-y:hidden;padding:2px 2px 6px}
}
