/* Voice: sidebar panel, user bar, phone mini-bar, call stage and tiles, control bar, watch view, popovers, sheets, modals. */

.call {
  --stage-bg: #08090c; --tile-bg: var(--panel-2); --rec: #e5534b;
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--stage-bg); color: var(--ink);
}
:root[data-theme="light"] .call { --stage-bg: #dfe3ec; background: var(--stage-bg); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .call { --stage-bg: #dfe3ec; background: var(--stage-bg); } }
.call .spacer { flex: 1; }
.call__main { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.call__notices { display: grid; gap: 8px; padding: 12px 16px 0; justify-items: center; }
.call__notices:empty { display: none; }
.call__notice { margin: 0 auto; padding: 8px 14px; border-radius: var(--r, 10px); background: rgba(227, 179, 65, .14); color: #e0b552; font-size: 13px; text-align: center; max-width: 560px; }
.call__unlock { gap: 8px; }
.call__stage { flex: 1; min-height: 0; display: flex; }
.call__stage[hidden] { display: none; }
.call__top { display: none; }

.live-pill, .dim-pill { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; letter-spacing: .3px; white-space: nowrap; }
.live-pill { background: var(--bad); color: #fff; }
.live-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }
.dim-pill { background: rgba(0, 0, 0, .5); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.live-pill[hidden], .dim-pill[hidden] { display: none; }

/* Join screen */
.call__join { margin: auto; display: grid; justify-items: center; gap: 10px; text-align: center; padding: 24px; }
.call__join h2 { margin-top: 8px; font-size: 22px; font-weight: 800; }
.call__who { color: var(--ink-3); max-width: 420px; }
.call__avs { display: flex; justify-content: center; flex-wrap: wrap; padding-left: 12px; }
.call__avs .av { width: 56px; height: 56px; font-size: 22px; margin-left: -12px; box-shadow: 0 0 0 4px var(--stage-bg); }
.call__empty { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--ink-3); }
.call__empty svg { width: 28px; height: 28px; }
.btn--join { margin-top: 10px; height: 42px; padding: 0 20px; gap: 8px; }

/* Tiles */
.vgrid { flex: 1; min-height: 0; display: grid; gap: 12px; padding: 16px 16px 92px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-content: center; overflow-y: auto; overscroll-behavior: contain; }
.vgrid[data-count="1"] { grid-template-columns: minmax(0, min(760px, 100%)); justify-content: center; }
.vgrid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 560px)); justify-content: center; }
.vgrid[hidden] { display: none; }
.vtile { position: relative; aspect-ratio: 16 / 9; min-width: 0; border-radius: 16px; background: var(--tile-bg); display: grid; place-items: center; overflow: hidden; cursor: pointer; color: #fff; transition: box-shadow .2s, transform .15s; outline: none; }
.vtile:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.vtile > .av { width: 76px; height: 76px; font-size: 30px; }
.vtile.is-speaking { box-shadow: 0 0 0 2.5px var(--ok); animation: vtalk 1.6s infinite; }
@keyframes vtalk { 50% { box-shadow: 0 0 0 2.5px rgba(63, 178, 127, .35); } }
.vtile__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.vtile.has-video > .av { display: none; }
.vtile.is-mirror .vtile__video { transform: scaleX(-1); }
.vtile__name { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 96px); display: flex; gap: 6px; align-items: center; padding: 4px 9px; border-radius: 8px; background: rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; font-size: 12.5px; font-weight: 600; }
.vtile__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vtile__name svg { width: 14px; height: 14px; }
.vtile__mute, .vtile__deaf { display: inline-flex; color: #ff7b72; }
.vtile__mute[hidden], .vtile__deaf[hidden] { display: none; }
.vtile.is-lost > .av { opacity: .5; }
.vtile.is-lost .vtile__label { opacity: .7; }
.vtile__vol { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 5px; align-items: center; padding: 4px 8px; border: 0; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.vtile__vol svg { width: 14px; height: 14px; }
.vtile:hover .vtile__vol, .vtile__vol.is-changed, .vtile__vol:focus-visible { opacity: 1; }
.vtile__vol:hover { background: rgba(0, 0, 0, .75); }
.vtile__away { display: none; }
.vtile.is-away { box-shadow: inset 0 0 0 2px var(--line-2); }
.vtile.is-away > .av { display: none; }
.vtile.is-away .vtile__away { display: block; padding: 0 12px; font-size: 12.5px; color: var(--ink-4); text-align: center; }
.vtile.is-share { background: linear-gradient(135deg, #0f2b3d, #1e1645); box-shadow: 0 0 0 2px var(--bad); }
.vtile.is-share.is-mine { background: linear-gradient(180deg, #1b1f2b 0 12%, #232838 12% 100%); }
.vtile.is-share.is-p2p { box-shadow: 0 0 0 2px var(--line-2); }
.vtile__bg { position: absolute; inset: 0; background: radial-gradient(circle at 70% 60%, rgba(255, 120, 80, .35), transparent 45%), radial-gradient(circle at 20% 30%, rgba(120, 180, 255, .2), transparent 40%); }
.vtile__dyn { display: contents; }
.vtile__top { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.vtile__watch { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.vtile__cta { gap: 6px; background: rgba(255, 255, 255, .95); color: #111; }
.vtile__cta:hover { background: #fff; }
.vtile__cta:disabled { background: rgba(255, 255, 255, .25); color: #fff; }
.vtile__cta svg { width: 16px; height: 16px; }
.vtile__watch small { color: #fff; font-size: 12px; text-shadow: 0 1px 3px #000; }
@media (hover: hover) { .vtile:not(.is-me):hover { transform: translateY(-2px); } }

/* Floating control bar */
.vctrl { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 5; display: flex; gap: 8px; padding: 8px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.call.is-watching .vctrl, .call:not(.is-here) .vctrl { display: none; }
.cb { width: 52px; height: 48px; flex: none; padding: 0; border: 0; border-radius: 12px; display: grid; place-items: center; background: var(--panel-3); color: var(--ink); cursor: pointer; transition: background .15s, transform .15s cubic-bezier(.3, 1.6, .5, 1); }
.cb:hover { background: var(--line-2); transform: translateY(-2px); }
.cb:active { transform: scale(.92); }
.cb:disabled { opacity: .55; cursor: default; transform: none; }
.cb.is-bad { background: rgba(229, 83, 75, .18); color: var(--bad); }
.cb.is-on { background: var(--accent); color: #fff; }
.cb.is-live { background: var(--bad); color: #fff; }
.cb.is-end { width: 64px; background: var(--bad); color: #fff; }
.cb.is-end svg { width: 24px; height: 24px; stroke-width: 2; }
.cb.is-end:hover { filter: brightness(1.1); }
.cb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vctrl__sep { width: 1px; margin: 6px 2px; background: var(--line-2); }

/* Watch stage */
.stage { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: #000; color: #fff; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.stage__view { position: absolute; inset: 0; overflow: hidden; display: grid; place-items: center; touch-action: none; }
.stage__view.is-mirror { transform: scaleX(-1); }
/* Absolute: as a grid item the video takes its own aspect height and overflows a wide, short screen. */
.stage .stage__view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; will-change: transform; }
.stage.is-zoomed { cursor: grab; }
.stage__wait, .stage__paused { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 10px; color: #c9cedb; pointer-events: none; }
.stage__paused { background: rgba(7, 8, 11, .82); font-weight: 700; color: #fff; }
.stage__paused svg { width: 30px; height: 30px; }
.stage__top { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 16px 40px; background: linear-gradient(180deg, rgba(0, 0, 0, .7), transparent); transition: opacity .25s; }
.stage__av .av { width: 36px; height: 36px; font-size: 15px; }
.stage__who { min-width: 0; display: grid; line-height: 1.35; }
.stage__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage__who small { color: rgba(255, 255, 255, .7); font-size: 12px; }
.stage__back { display: none; }
.stage__bar { position: absolute; left: 50%; bottom: 18px; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; max-width: calc(100% - 24px); padding: 6px; border-radius: 14px; background: rgba(14, 15, 20, .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); transition: opacity .25s; }
.stage__vol { width: 200px; flex: none; padding: 0 6px; margin-right: 4px; border-right: 1px solid rgba(255, 255, 255, .15); }
.stage__vol[hidden] { display: none; }
.stage .vol output { color: #fff; }
.stage .vol output:hover, .stage .vol__ico:hover { background: rgba(255, 255, 255, .1); }
.stage .vol .vol__ico { color: #e6e8ee; }
.stage .vol input { --track: rgba(255, 255, 255, .25); --fill: #fff; }
.wib { width: 38px; height: 38px; flex: none; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; background: none; color: #e6e8ee; cursor: pointer; }
.wib:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.wib[hidden] { display: none; }
.qbtn { height: 32px; flex: none; padding: 0 10px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.qbtn:hover { background: rgba(255, 255, 255, .18); }
.qbtn svg { width: 14px; height: 14px; }
.qbtn[hidden] { display: none; }
.stopw { height: 38px; flex: none; margin-left: 4px; padding: 0 14px; border: 0; border-radius: 10px; display: flex; align-items: center; gap: 6px; background: var(--bad); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.stopw svg { width: 16px; height: 16px; }
.stopw:hover { filter: brightness(1.1); }
.stage__side { position: absolute; top: 50%; right: max(20px, env(safe-area-inset-right)); z-index: 2; transform: translateY(-50%); display: none; flex-direction: column; gap: 10px; transition: opacity .25s; }
.stage__zoom { position: absolute; top: 50%; left: 12px; z-index: 2; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: opacity .25s; }
.stage__zoom[hidden] { display: none; }
.stage__zoom .dim-pill { font-size: 13px; padding: 5px 10px; border-radius: 10px; }
.stage__pill { height: 36px; padding: 0 14px; border: 0; border-radius: 18px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 13px; cursor: pointer; }
.stage__hint { display: none; }
.ovb { flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; transition: background .15s; }
.ovb:hover { background: rgba(0, 0, 0, .75); }
.ovb.is-off { background: #f2f4f8; color: #111; }
.ovb--leave { background: var(--rec); }
.ovb:focus-visible, .wib:focus-visible, .qbtn:focus-visible, .stopw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.stage:is(.is-full, .is-fill) .stage__top { padding-top: max(14px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.stage:is(.is-full, .is-fill) .stage__bar { bottom: max(18px, env(safe-area-inset-bottom)); }
.stage:is(.is-full, .is-fill) .stage__side { display: flex; }
.stage:is(.is-full, .is-fill) .stage__back { display: grid; }
.stage:is(.is-full, .is-fill) .stage__zoom { left: max(12px, env(safe-area-inset-left)); }
.stage.is-idle { cursor: none; }
.stage.is-idle :is(.stage__top, .stage__bar, .stage__side, .stage__zoom) { opacity: 0; pointer-events: none; }
.stage.is-idle :is(.stage__top, .stage__bar, .stage__side, .stage__zoom) * { pointer-events: none; }
/* Stand-in for element fullscreen where the browser has none (iPhone Safari), and a phone on its side. */
.stage:is(.is-fake-full, .is-fill) { position: fixed; inset: 0; z-index: 80; width: 100vw; height: 100dvh; }
/* iPhone can't lock orientation, so a wide share in the stand-in full screen is turned to fill an upright screen. */
.stage.is-fake-full.is-rotated { inset: auto; top: 0; left: 0; width: 100dvh; height: 100vw; transform-origin: 0 0; transform: translateX(100vw) rotate(90deg); }
html.has-stage-full, html.has-stage-full body { overflow: hidden; }
#pip-park { position: fixed; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; left: 0; bottom: 0; }

/* Volume slider (0-200 %) */
.vol { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.vol__ico { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; display: grid; place-items: center; background: none; color: var(--ink-3); }
button.vol__ico { cursor: pointer; }
button.vol__ico:hover { background: var(--panel-3); color: var(--ink); }
.vol__ico svg { width: 18px; height: 18px; }
.vol input { --track: var(--line-2); --fill: var(--accent); -webkit-appearance: none; appearance: none; flex: 1; min-width: 60px; height: 22px; margin: 0; background: transparent; cursor: pointer; --p: 50%; }
.vol input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--fill) 0 var(--p), var(--track) var(--p) 100%); }
.vol input::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--fill) 0 var(--p), var(--track) var(--p) 100%); }
.vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); transition: transform .12s; }
.vol input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.vol input:hover::-webkit-slider-thumb, .vol input:active::-webkit-slider-thumb { transform: scale(1.2); }
.vol input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.vol output { flex: none; min-width: 46px; padding: 2px 4px; border-radius: 6px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; color: var(--ink); cursor: pointer; }
.vol output:hover { background: var(--panel-3); }
.vol output.is-boost { color: var(--warn); }
.vol output.is-zero { color: var(--bad); }
.presets { display: flex; gap: 5px; margin-top: 6px; }
.presets button { flex: 1; height: 26px; padding: 0; border: 0; border-radius: 7px; background: var(--panel-3); color: var(--ink-2); font-size: 11.5px; font-weight: 700; cursor: pointer; }
.presets button:hover { background: var(--line-2); }
.presets button.is-on { background: var(--accent); color: #fff; }
.bigvol { margin: 4px 0 0; text-align: center; font-size: 40px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.bigvol small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }

.vsw { position: relative; width: 38px; height: 22px; flex: none; padding: 0; border: 0; border-radius: 11px; background: var(--line-2); cursor: pointer; transition: background .2s; }
.vsw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.vsw.is-on { background: var(--accent); }
.vsw.is-on::after { transform: translateX(16px); }
.vsw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vrow { display: flex; align-items: center; gap: 10px; padding: 8px 0 0; }
.vrow__text { flex: 1; min-width: 0; display: grid; font-size: 13.5px; }
.vrow__text b { font-weight: 600; }
.vrow__text small { color: var(--ink-3); font-size: 12px; }
.vlabel { margin: 14px 0 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-3); }
.vlabel:first-child { margin-top: 0; }
.vlabel--row { display: flex; align-items: center; justify-content: space-between; }
.vlink { padding: 0; border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; cursor: pointer; }
.vlink:hover { text-decoration: underline; }
.vnote { margin-top: 8px; color: var(--ink-3); font-size: 12.5px; }
.vsep { height: 1px; margin: 8px 2px; background: var(--panel-3); }
.vicon { width: 30px; height: 30px; flex: none; padding: 0; border: 0; border-radius: 8px; display: grid; place-items: center; background: none; color: var(--ink-3); cursor: pointer; }
.vicon:hover { background: var(--panel-3); color: var(--ink); }
.vicon.is-bad { color: var(--bad); }
.vicon svg { width: 18px; height: 18px; }
.vselect { position: relative; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border-radius: 9px; background: var(--bg); border: 1px solid var(--panel-3); color: var(--ink-4); }
.vselect svg { width: 16px; height: 16px; }
.vselect select { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis; }
.vselect select option { background: var(--panel); color: var(--ink); }
.vselect:focus-within { border-color: var(--accent); }
.vmeter { height: 6px; margin-top: 8px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.vmeter i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--ok), var(--ok) 70%, var(--warn)); transform: scaleX(var(--lvl, 0)); transform-origin: left; transition: transform .08s linear; }

/* Popovers, menus and sheets */
.vlayer { position: fixed; inset: 0; z-index: 60; }
.vpop { position: fixed; z-index: 61; width: 300px; max-height: calc(100dvh - 16px); overflow: auto; border-radius: 14px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); animation: vpop .16s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes vpop { from { opacity: 0; transform: scale(.94) translateY(4px); } }
.vpop--mic, .vpop--out { padding: 14px; }
.vpop--status, .vpop--share, .vpop--quality { width: 240px; padding: 6px; }
.vpop--mixer { width: 340px; }
.vpop--user { width: 310px; }
.vmenu { display: grid; }
.vmenu__head { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-4); }
.vmi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 13.5px; text-align: left; cursor: pointer; }
.vmi svg { width: 18px; height: 18px; }
.vmi__label { flex: 1; min-width: 0; }
.vmi small { color: var(--ink-4); font-size: 11px; }
.vmi:hover { background: var(--accent); color: #fff; }
.vmi:hover small { color: rgba(255, 255, 255, .8); }
.vmi.is-sel::after { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--accent); }
.vmi.is-sel:hover::after { background: #fff; }
.vmi.is-danger { color: var(--bad); }
.vmi.is-danger:hover { background: var(--bad); color: #fff; }
.vmi .vdot { width: 10px; height: 10px; flex: none; }

.ucard__banner { height: 64px; background: linear-gradient(120deg, hsl(var(--h, 220) 55% 38%), hsl(calc(var(--h, 220) + 40) 55% 30%)); }
.ucard__head { display: flex; align-items: flex-end; gap: 12px; padding: 0 16px; margin-top: -32px; }
.ucard.is-sheet .ucard__head { margin-top: 0; padding: 0; align-items: center; }
.ucard__head .av { width: 72px; height: 72px; font-size: 28px; box-shadow: 0 0 0 5px var(--panel); }
.ucard.is-sheet .ucard__head .av { width: 56px; height: 56px; font-size: 22px; box-shadow: none; }
.ucard__who { min-width: 0; display: grid; padding-bottom: 4px; }
.ucard__who b { font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ucard__who small { color: var(--ink-3); font-size: 13px; }
.ucard__sec { margin: 12px 16px 0; padding: 10px 12px 12px; border-radius: 10px; background: var(--bg-2); }
.ucard.is-sheet .ucard__sec { margin: 12px 0 0; padding: 0; background: none; }
.ucard__acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 14px; }
.ucard.is-sheet .ucard__acts { padding: 14px 0 0; }
.ucard__acts .btn { flex: 1; gap: 6px; }
.ucard__acts svg { width: 16px; height: 16px; }
.ucard:not(.is-sheet) > :last-child:not(.ucard__acts) { margin-bottom: 14px; }

.mixer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.mixer__head b { font-size: 15px; }
.mixer.is-sheet .mixer__head { padding: 0 0 6px; }
.mixer.is-sheet .mixer__head b { font-size: 18px; }
.mixer__list { max-height: 420px; overflow: auto; padding: 0 10px 10px; }
.mixer.is-sheet .mixer__list { max-height: none; padding: 0; }
.mx { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 8px 6px; border-radius: 10px; }
.mx:hover { background: var(--panel-2); }
.mx > :first-child { grid-row: span 2; }
.mx .av { width: 30px; height: 30px; font-size: 12px; }
.mx__ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--ink-2); }
.mx__ico svg { width: 16px; height: 16px; }
.mx__ico--live { border-radius: 8px; background: var(--bad); color: #fff; }
.mx__name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
.mx__name span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx__mute { width: 24px; height: 24px; flex: none; padding: 0; border: 0; border-radius: 6px; display: grid; place-items: center; background: none; color: var(--ink-4); cursor: pointer; }
.mx__mute:hover { color: var(--ink); background: var(--panel-3); }
.mx__mute.is-on { color: var(--bad); }
.mx__mute svg { width: 16px; height: 16px; }
.mx .vol input { height: 16px; }
.mx .vol output { font-size: 12px; min-width: 40px; }

.vsheet { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; color: var(--ink); }
.vsheet__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .5); animation: fade .2s ease; }
.vsheet__panel { position: relative; max-height: 85dvh; overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--panel); animation: sheet-up .25s cubic-bezier(.2, .9, .3, 1); }
.vsheet__grab { display: block; width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: var(--line-2); }
.vsheet .vmi { font-size: 15px; padding: 12px 10px; }
.vsheet .presets button { height: 34px; font-size: 13px; }
.vsheet .vol input { height: 32px; }
.vsheet .vol input::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; }
.vsheet .vol input::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -8px; }
.vsheet .vol output { font-size: 16px; min-width: 56px; }
.vsheet .ucard__acts .btn { height: 44px; }
.vsettings__head { display: grid; margin-bottom: 8px; }
.vsettings__head b { font-size: 18px; }
.vsettings__head small { color: var(--ink-3); }

/* Modals: share picker and voice settings */
.vmodal-bg { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .6); animation: fade .15s; }
.vmodal { width: min(620px, 100%); max-height: 100%; overflow: auto; border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); animation: vpop .2s cubic-bezier(.3, 1.3, .5, 1); }
.vmodal--settings { width: min(520px, 100%); }
.vmodal__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 6px; }
.vmodal__head > div { flex: 1; min-width: 0; display: grid; }
.vmodal__head b { font-size: 17px; }
.vmodal__head small { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmodal__icon { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.vmodal__x { align-self: flex-start; }
.vmodal__body { padding: 10px 20px 18px; }
.vmodal__body .vlabel:first-child { margin-top: 14px; }
.vmodal__foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--bg-2); }
.vmodal__hint { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12.5px; }
.vmodal__hint svg { width: 16px; height: 16px; }
.btn--live { gap: 8px; background: var(--bad); }
.btn--live:hover { background: var(--bad); filter: brightness(1.1); box-shadow: none; }
.srcs, .qs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.src, .q { position: relative; padding: 10px; border: 2px solid transparent; border-radius: 12px; background: var(--bg-2); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.src:hover { transform: translateY(-2px); }
.src.is-on, .q.is-on { border-color: var(--accent); }
.q.is-on { background: var(--accent-soft); }
.src.is-on::after { content: ""; position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; }
.src__thumb { aspect-ratio: 16 / 10; margin-bottom: 8px; border-radius: 8px; display: grid; place-items: center; color: rgba(255, 255, 255, .85); background: linear-gradient(135deg, #1d2a52, #2b1f55); }
.src--window .src__thumb { background: linear-gradient(135deg, #0f3b4a, #1d5a7a); }
.src--browser .src__thumb { background: linear-gradient(135deg, #5a3d0f, #8a2d4a); }
.src__thumb svg { width: 30px; height: 30px; }
.src b, .q b { display: block; font-size: 13px; }
.q b { font-size: 14px; }
.src small, .q span { display: block; color: var(--ink-3); font-size: 11.5px; }
.q em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--accent); }
.q.is-locked { cursor: not-allowed; }
.q.is-locked b, .q.is-locked span { opacity: .55; }
.q.is-locked em { color: #e8b440; }
.q > svg { position: absolute; right: 8px; top: 8px; width: 15px; height: 15px; color: #e8b440; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; padding: 12px; border: 0; border-radius: 12px; background: var(--bg-2); color: var(--ink); text-align: left; cursor: pointer; }
.opt:disabled { cursor: default; opacity: .7; }
.opt__ico { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--panel-3); color: var(--ink-2); }
.opt__text { flex: 1; min-width: 0; display: grid; }
.opt__text b { font-size: 13.5px; }
.opt__text small { color: var(--ink-3); font-size: 12px; }
.opt .vsw { pointer-events: none; }
.src:focus-visible, .q:focus-visible, .opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sidebar voice panel */
.vp { flex: none; padding: 10px; border-radius: 12px; background: var(--panel); box-shadow: 0 0 0 1px var(--panel-3); }
.vp[hidden] { display: none; }
.vp__head { display: flex; align-items: center; gap: 8px; }
.vp__state { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.vp__text { min-width: 0; display: grid; line-height: 1.35; }
.vp__sub { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vp__text b { min-width: 0; color: var(--ok); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp__text b.is-warn { color: var(--warn); }
.vp__text small { color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp__state:hover small { color: var(--ink); text-decoration: underline; }
.vp__ping { flex: none; padding: 0 5px; border-radius: 5px; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ok); background: rgba(63, 178, 127, .14); }
.vp__ping.is-warn { color: var(--warn); background: rgba(227, 179, 65, .14); }
.vp__ping.is-bad { color: var(--bad); background: rgba(229, 83, 75, .14); }
.vp__leave { width: 34px; height: 34px; flex: none; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; background: var(--bad); color: #fff; cursor: pointer; transition: filter .15s; }
.vp__leave svg { transition: transform .25s; }
.vp__leave:hover { filter: brightness(1.1); }
.vp__leave:hover svg { transform: rotate(135deg); }
.vp__live { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 8px 9px; border-radius: 9px; background: rgba(229, 83, 75, .12); }
.vp__live > svg { color: var(--bad); }
.vp__live > div { flex: 1; min-width: 0; display: grid; }
.vp__live b { font-size: 12.5px; }
.vp__live small { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp__live .vicon { width: 28px; height: 28px; }
.vp__dock { display: flex; justify-content: space-around; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--panel-3); }
.vdk { position: relative; width: 58px; padding: 6px 0 4px; border: 0; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; color: var(--ink-3); font-size: 10.5px; font-weight: 600; cursor: pointer; transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), background .15s, color .15s; }
.vdk svg { width: 22px; height: 22px; }
.vdk:hover:not(:disabled) { background: var(--panel-3); color: var(--ink); transform: translateY(-2px) scale(1.06); }
.vdk:active:not(:disabled) { transform: scale(.9); }
.vdk:disabled { opacity: .45; cursor: default; }
.vdk.is-on { color: var(--accent); }
.vdk.is-live { color: var(--bad); }
.vdk.is-on::after, .vdk.is-live::after { content: ""; position: absolute; bottom: -3px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

.vbars { display: flex; align-items: flex-end; gap: 2px; height: 16px; flex: none; }
.vbars i { width: 3px; border-radius: 1px; background: var(--ok); }
.vbars i:nth-child(1) { height: 5px; }
.vbars i:nth-child(2) { height: 8px; }
.vbars i:nth-child(3) { height: 12px; }
.vbars i:nth-child(4) { height: 16px; }
.vbars[data-level="3"] i:nth-child(n + 4), .vbars[data-level="2"] i:nth-child(n + 3), .vbars[data-level="1"] i:nth-child(n + 2) { background: var(--line-2); }
.vbars[data-level="2"] i:not(:nth-child(n + 3)) { background: var(--warn); }
.vbars[data-level="1"] i:first-child { background: var(--bad); }
.vbars.is-wait i { background: var(--warn); animation: vwait 1s ease-in-out infinite; }
.vbars.is-wait i:nth-child(2) { animation-delay: .15s; }
.vbars.is-wait i:nth-child(3) { animation-delay: .3s; }
.vbars.is-wait i:nth-child(4) { animation-delay: .45s; }
@keyframes vwait { 50% { opacity: .25; } }

/* User bar */
.ubar__me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; padding: 4px 6px; border: 0; border-radius: 9px; background: none; color: inherit; text-align: left; cursor: pointer; }
.ubar__me:hover { background: var(--panel-2); }
.ubar__me .av-wrap .pres { --ring: var(--bg); }
.ubar__who { min-width: 0; display: grid; line-height: 1.3; }
.ubar__who b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubar__who small { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubar__btn { position: relative; width: 32px; height: 32px; flex: none; padding: 0; border: 0; border-radius: 9px; display: grid; place-items: center; background: none; color: var(--ink-3); cursor: pointer; transition: background .15s, color .15s, transform .12s; }
.ubar__btn:hover { background: var(--panel-3); color: var(--ink); }
.ubar__btn:active { transform: scale(.92); }
.ubar__btn.is-bad { color: var(--bad); }
.ubar__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ubar__lvl { position: absolute; left: 8px; right: 8px; bottom: 4px; height: 2px; border-radius: 1px; background: var(--ok); transform: scaleX(var(--lvl, 0)); transform-origin: left; transition: transform .08s linear; }
.ubar__gear svg { transition: transform .4s; }
.ubar__gear:hover svg { transform: rotate(60deg); }
.ubar__gear:active svg { transform: rotate(120deg); }

/* Phone mini-bar above the tabs */
.vmini { color: var(--ink); }
.vmini__open { flex: 1; min-width: 0; display: grid; padding: 0; border: 0; background: none; color: inherit; text-align: left; line-height: 1.35; cursor: pointer; }
.vmini__open b { color: var(--ok); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmini__open small { color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmini__btn, .vmini__leave { width: 36px; height: 36px; flex: none; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--ink); cursor: pointer; }
.vmini__btn.is-bad { color: var(--bad); }
.vmini__leave { background: var(--bad); color: #fff; }
@media (min-width: 821px) { .vmini { display: none !important; } }

/* My own camera: full-view setup and live views, a centred card on wide screens */
html.has-selfcam, html.has-selfcam body { overflow: hidden; }
.selfcam { position: fixed; inset: 0; z-index: 46; color: #fff; background: #000; animation: csheet-fade .2s ease; -webkit-tap-highlight-color: transparent; }
.selfcam__frame { position: absolute; inset: 0; overflow: hidden; background: #111318; user-select: none; -webkit-user-select: none; }
.selfcam__frame::before, .selfcam__frame::after { content: ""; position: absolute; inset-inline: 0; z-index: 1; pointer-events: none; }
.selfcam__frame::before { top: 0; height: 160px; background: linear-gradient(rgba(0, 0, 0, .58), transparent); }
.selfcam__frame::after { bottom: 0; height: 300px; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); }
.selfcam__video, .selfpip .selfcam__video { position: absolute; inset: 0; }
.selfcam__video video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.selfcam__video.is-mirror video { transform: scaleX(-1); }
.selfcam__empty { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; color: #c9cedb; }
.selfcam__empty .btn { min-height: 44px; }
.selfcam__top { position: absolute; z-index: 3; top: max(14px, calc(env(safe-area-inset-top) + 8px)); left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 10px; }
.selfcam__chip { display: inline-flex; align-items: center; gap: 8px; min-width: 0; min-height: 36px; padding: 6px 13px; border-radius: 999px; background: rgba(10, 12, 18, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: 13px; font-weight: 700; white-space: nowrap; }
.selfcam__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #f0b23a; }
.selfcam__dot.is-live { width: 9px; height: 9px; background: #ff4d43; box-shadow: 0 0 0 4px rgba(255, 77, 67, .25); }
.selfcam__time { color: #c9cedb; font-weight: 500; font-variant-numeric: tabular-nums; }
.selfcam__viewers { padding-inline-start: 4px; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.selfcam__stack { display: flex; flex: none; }
.selfcam__stack .av { width: 26px; height: 26px; font-size: 11px; border: 2px solid #15110d; }
.selfcam__stack .av + .av { margin-inline-start: -8px; }
.selfcam__notice { position: absolute; z-index: 3; top: max(66px, calc(env(safe-area-inset-top) + 60px)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 12px; background: rgba(40, 30, 10, .82); color: #f1c47a; font-size: 13px; line-height: 1.6; text-align: center; }

.selfcam__glass { flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 12, 18, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; cursor: pointer; transition: background .15s, transform .15s; }
.selfcam__glass svg { width: 22px; height: 22px; }
.selfcam__glass:active { transform: scale(.94); }
.selfcam__glass:disabled { opacity: .6; cursor: default; }
.selfcam__glass.is-on { background: #fff; color: #111; }
.selfcam__glass.is-accent { background: rgba(91, 141, 239, .9); color: #fff; }
.selfcam__glass.is-flip[aria-busy="true"] svg { animation: spin .8s linear infinite; }
.selfcam__top .selfcam__glass { width: 44px; height: 44px; }

.selfcam__rail { position: absolute; z-index: 3; top: max(96px, calc(env(safe-area-inset-top) + 88px)); left: max(14px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.selfcam__railitem { display: grid; justify-items: center; gap: 4px; }
.selfcam__rail .selfcam__glass.is-on { background: rgba(91, 141, 239, .9); color: #fff; }
.selfcam__raillbl { font-size: 10.5px; color: #e9ecf3; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.selfcam__quality { font: inherit; font-size: 11px; font-weight: 800; direction: ltr; }

.selfcam__bottom { position: absolute; z-index: 3; left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); bottom: max(26px, calc(env(safe-area-inset-bottom) + 14px)); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.selfcam__lenses { display: flex; align-items: center; gap: 2px; max-width: 100%; padding: 4px; border-radius: 999px; background: rgba(10, 12, 18, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); overflow-x: auto; scrollbar-width: none; }
.selfcam__lens { flex: none; min-width: 44px; height: 44px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.selfcam__lens.is-on { background: #fff; color: #111; font-size: 13px; }
.selfcam__lenses.is-named .selfcam__lens { max-width: 160px; padding: 0 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.selfcam__lens:disabled { cursor: default; }
.selfcam__facing { display: flex; gap: 24px; }
.selfcam__tab { min-width: 44px; min-height: 44px; padding: 0 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: rgba(255, 255, 255, .7); font: inherit; font-size: 14px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); cursor: pointer; }
.selfcam__tab.is-on { color: #ffcf5a; border-bottom-color: #ffcf5a; }
.selfcam__tab:disabled { cursor: default; }

.selfcam__shutter { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; width: min(100%, 360px); margin-top: 6px; }
.selfcam__cancel { justify-self: center; width: 96px; height: 48px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 12, 18, .45); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.selfcam__start { width: 84px; height: 84px; padding: 0; border: 4px solid #fff; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer; transition: transform .15s; }
.selfcam__start > span { width: 66px; height: 66px; border-radius: 50%; background: #3f6fd8; display: grid; place-items: center; color: #fff; }
.selfcam__start svg { width: 28px; height: 28px; stroke-width: 2.2; }
.selfcam__start:active { transform: scale(.94); }
.selfcam__start:disabled { cursor: default; }
.selfcam__start:disabled > span { background: #34508f; }
.selfcam__hint { justify-self: center; display: grid; font-size: 12px; line-height: 1.5; color: #d7dbe6; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.selfcam__hint b { font-size: 14px; color: #fff; }

.selfcam__peers { position: absolute; z-index: 3; top: max(84px, calc(env(safe-area-inset-top) + 76px)); left: max(14px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 10px; }
.selfcam__peer { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; }
.selfcam__peer .av { width: 46px; height: 46px; font-size: 16px; border: 2px solid rgba(255, 255, 255, .85); }
.selfcam__peer.is-speaking .av { border-color: #3fb27f; box-shadow: 0 0 0 3px #3fb27f; }
.selfcam__more { background: rgba(10, 12, 18, .6); border: 2px solid rgba(255, 255, 255, .5); font-size: 13px; font-weight: 800; }
.selfcam__peermute { position: absolute; bottom: -2px; left: -2px; width: 18px; height: 18px; border-radius: 50%; background: #e5534b; display: grid; place-items: center; }
.selfcam__peermute svg { width: 11px; height: 11px; stroke-width: 2.6; color: #fff; }
.selfcam__flip { position: absolute; z-index: 3; right: max(20px, env(safe-area-inset-right)); bottom: calc(max(26px, calc(env(safe-area-inset-bottom) + 14px)) + 106px); width: 52px; height: 52px; }
.selfcam__flip svg { width: 24px; height: 24px; }
.selfcam__res { position: absolute; z-index: 3; left: max(20px, env(safe-area-inset-left)); bottom: calc(max(26px, calc(env(safe-area-inset-bottom) + 14px)) + 116px); min-height: 32px; font-size: 12px; font-weight: 500; }
.selfcam__dock { display: flex; justify-content: space-between; align-items: center; gap: 6px; width: min(100%, 420px); padding: 10px 12px; border-radius: 28px; background: rgba(18, 20, 28, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .12); }
.selfcam__dock .selfcam__glass { width: 56px; height: 56px; border-radius: 20px; background: rgba(255, 255, 255, .14); }
.selfcam__dock .selfcam__glass svg { width: 24px; height: 24px; }
.selfcam__dock .selfcam__glass.is-on { background: #fff; color: #111; }
.selfcam__dock .selfcam__glass.is-accent { background: var(--accent); color: #fff; }
.selfcam__dock .selfcam__leave { width: 68px; background: var(--rec); color: #fff; }
.selfcam__glass:focus-visible, .selfcam__lens:focus-visible, .selfcam__tab:focus-visible, .selfcam__cancel:focus-visible, .selfcam__start:focus-visible, .selfpip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) {
  .selfcam__glass:not(:disabled):hover { background: rgba(10, 12, 18, .75); }
  .selfcam__dock .selfcam__glass:not(:disabled):hover { background: rgba(255, 255, 255, .24); }
  .selfcam__dock .selfcam__glass.is-on:hover { background: #fff; }
  .selfcam__dock .selfcam__leave:hover { background: #f0645c; }
}

/* Phone on its side: controls move to the sides, the people to the bottom. */
@media (orientation: landscape) and (max-height: 540px) {
  .selfcam__frame::before { height: 90px; }
  .selfcam__frame::after { height: 120px; }
  .selfcam__top { left: max(20px, env(safe-area-inset-left)); right: max(20px, env(safe-area-inset-right)); }
  .selfcam__notice { top: max(62px, calc(env(safe-area-inset-top) + 56px)); }
  .selfcam__rail { top: 50%; transform: translateY(-50%); gap: 10px; }
  .selfcam__raillbl { display: none; }
  .selfcam--live .selfcam__rail { left: auto; right: max(20px, env(safe-area-inset-right)); }
  .selfcam__bottom { bottom: max(12px, calc(env(safe-area-inset-bottom) + 6px)); gap: 6px; left: 25%; right: 25%; }
  .selfcam__facing { order: 2; }
  .selfcam__shutter { position: fixed; top: 50%; right: max(20px, env(safe-area-inset-right)); transform: translateY(-50%); width: auto; display: flex; flex-direction: column; gap: 14px; margin: 0; }
  .selfcam__hint { display: none; }
  .selfcam__start { order: -1; }
  .selfcam__cancel { width: 84px; }
  .selfcam__dock { position: fixed; top: 50%; left: max(20px, env(safe-area-inset-left)); transform: translateY(-50%); flex-direction: column; width: auto; padding: 0; gap: 8px; border: 0; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .selfcam__dock .selfcam__glass { width: 44px; height: 44px; border-radius: 50%; background: rgba(10, 12, 18, .55); }
  .selfcam__dock .selfcam__leave { width: 44px; background: var(--rec); }
  .selfcam__peers { top: auto; left: auto; right: max(20px, env(safe-area-inset-right)); bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px)); flex-direction: row; gap: 8px; }
  .selfcam__peer, .selfcam__peer .av { width: 44px; height: 44px; }
  .selfcam__flip { bottom: auto; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; }
  .selfcam__res { display: none; }
}

/* Wide screens: the same view as a large card over the call. */
@media (min-width: 821px) and (min-height: 541px) {
  .selfcam { background: rgba(5, 6, 9, .8); display: grid; place-items: center; padding: 24px; }
  .selfcam__frame { position: relative; inset: auto; width: min(960px, 100%, calc((100dvh - 48px) * 1.6)); aspect-ratio: 16 / 10; border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
  html .selfpip { width: 150px; height: 224px; }
  html .selfpip.is-wide { width: 240px; height: 135px; }
}

/* My camera as a floating window over the call; it snaps to the corner it is dropped nearest. */
.selfpip { position: fixed; z-index: 34; width: 118px; height: 176px; border-radius: 22px; overflow: hidden; background: #000; color: #fff; box-shadow: 0 14px 34px rgba(0, 0, 0, .6), 0 0 0 2px rgba(255, 255, 255, .9); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; transition: transform .24s cubic-bezier(.2, .8, .2, 1); }
.selfpip.is-wide { width: 176px; height: 118px; }
.selfpip.is-dragging { transition: none; cursor: grabbing; }
.selfpip[data-corner^="t"] { top: var(--pip-top, 80px); }
.selfpip[data-corner^="b"] { bottom: var(--pip-bottom, 120px); }
.selfpip[data-corner$="l"] { left: max(var(--pip-left, 12px), calc(env(safe-area-inset-left) + 12px)); }
.selfpip[data-corner$="r"] { right: max(var(--pip-right, 12px), calc(env(safe-area-inset-right) + 12px)); }
.selfpip__me { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 10.5px; font-weight: 700; }
.selfpip__me i { width: 6px; height: 6px; border-radius: 50%; background: #ff4d43; }
.selfpip__flip, .selfpip__expand { position: absolute; bottom: 4px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: #fff; }
.selfpip__flip { left: 4px; cursor: pointer; }
.selfpip__expand { right: 4px; pointer-events: none; }
.selfpip__flip::before, .selfpip__expand::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.selfpip__flip svg, .selfpip__expand svg { position: relative; width: 18px; height: 18px; }
.selfpip__flip[aria-busy="true"] svg { animation: spin .8s linear infinite; }
.selfpip__flip[hidden] { display: none; }
@keyframes csheet-fade { from { opacity: 0; } }
@keyframes csheet-up { from { transform: translateY(24px); opacity: 0; } }

/* Phones and narrow windows: full-screen voice, round controls, stacked watch view */
@media (max-width: 820px) {
  .shell[data-view="call"] .main__head { display: none !important; }
  .call__top { display: flex; flex: none; align-items: center; gap: 8px; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 0 8px; }
  .call.is-watching .call__top { display: none; }
  .call__title { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
  .call__title b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .call__title small { font-size: 12px; color: var(--ink-3); }
  .call__title small.is-ok { color: var(--ok); }
  .call__title small.is-ok::before { content: "● "; }
  .call__icon { width: 40px; height: 40px; flex: none; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(127, 127, 127, .14); color: inherit; cursor: pointer; }
  .call__notices { padding: 4px 12px 0; }
  .vgrid, .vgrid[data-count="1"], .vgrid[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; justify-content: stretch; gap: 8px; padding: 8px 12px; }
  .vtile { aspect-ratio: 1 / 1; border-radius: 18px; }
  .vtile > .av { width: 64px; height: 64px; font-size: 26px; }
  .vtile.is-share { grid-column: span 2; aspect-ratio: 16 / 9; }
  .vtile__vol { opacity: 0; pointer-events: none; }
  .vtile__vol.is-changed { opacity: 1; pointer-events: auto; }
  .vctrl { position: static; transform: none; flex: none; justify-content: space-between; gap: 6px; margin: 6px 12px calc(14px + env(safe-area-inset-bottom)); padding: 10px; border-radius: 24px; box-shadow: none; }
  .cb, .cb.is-end { width: 52px; height: 52px; border-radius: 50%; }
  .cb:hover { transform: none; }

  .stage.is-stacked { display: flex; flex-direction: column; }
  .stage.is-stacked .stage__top { position: relative; z-index: 2; order: 0; padding: calc(10px + env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left)); background: none; }
  .stage.is-stacked .stage__back { display: grid; width: 40px; height: 40px; background: rgba(255, 255, 255, .1); }
  .stage.is-stacked .stage__view { position: relative; inset: auto; order: 1; flex: 1 1 0; min-height: 0; width: 100%; }
  .stage.is-stacked .stage__hint:not([hidden]) { order: 2; display: flex; justify-content: center; align-items: center; gap: 6px; margin: 10px 0; font-size: 12px; color: rgba(255, 255, 255, .55); }
  .stage.is-stacked .stage__hint svg { width: 15px; height: 15px; }
  .stage.is-stacked .stage__side { position: relative; z-index: 2; order: 3; top: auto; right: auto; transform: none; display: flex; flex-direction: row; justify-content: center; gap: 16px; margin: 6px 0 12px; }
  .stage.is-stacked .stage__side .ovb:not(.is-off, .ovb--leave) { background: rgba(255, 255, 255, .1); }
  .stage.is-stacked .stage__bar { position: relative; z-index: 2; left: auto; bottom: auto; order: 4; transform: none; max-width: none; margin: 0 max(12px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); padding: 12px 14px; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-radius: 20px; background: #15171f; box-shadow: none; }
  .stage.is-stacked .stage__vol { flex: 1 0 100%; width: auto; margin: 0; padding: 0; border: 0; }
  .stage.is-stacked .stage__vol input { height: 28px; }
  .stage.is-stacked .stage__vol input::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; }
  .stage.is-stacked .stage__vol input::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -7px; }
  .stage.is-stacked :is(.wib, .stopw) { width: 44px; height: 44px; margin: 0; padding: 0; border-radius: 50%; justify-content: center; background: rgba(255, 255, 255, .08); }
  .stage.is-stacked .stopw { background: var(--bad); }
  .stage.is-stacked .stopw span { display: none; }
  .stage.is-stacked .qbtn { height: 44px; border-radius: 22px; }
}

/* Narrow full screen (a phone held upright): the overlay bar wraps instead of running off the edge. */
@media (max-width: 600px) {
  .stage:not(.is-stacked, .is-rotated) .stage__bar { width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
  .stage:not(.is-stacked, .is-rotated) .stage__vol { flex: 1 0 100%; width: auto; margin: 0 0 2px; border-right: 0; }
  .stage:not(.is-stacked, .is-rotated) .stopw span { display: none; }
  .stage:not(.is-stacked, .is-rotated) .stopw { padding: 0 11px; }
}


@media (prefers-reduced-motion: reduce) {
  .selfcam, .vpop, .vmodal, .vsheet__panel, .vsheet__scrim, .vtile.is-speaking, .live-pill::before, .vbars.is-wait i { animation: none; }
  .selfpip, .selfcam__glass, .selfcam__start, .vdk, .cb, .vp__leave svg, .ubar__gear svg { transition: none; }
}
