@font-face { font-family: Inter; src: url('../assets/fonts/Inter-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('../assets/fonts/Inter-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url('../assets/fonts/Inter-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root {
  --bg: #0B1019; --panel: #131D2B; --panel2: #1A2638; --line: #24324A; --text: #EFF6FF; --muted: #8FA3BF;
  --a: #8748FF; --b: #26D8F5; --danger: #FF4D6A; --ok: #34D399; --warn: #FBBF24;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; border-radius: 10px; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--b); outline-offset: 2px; }
input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 22px 32px 8px; background: var(--bg); }
.top > .top-right { justify-self: end; }
body:has(#v-meet:not([hidden])) .top { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
/* Same mark and word as the remote-control page (viewer/lib/look.dart Logo). */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); direction: ltr; justify-self: start; }
.brand .mark { width: 30px; height: 26px; flex: none; }
.brand .word { font: 700 22px/1 Inter, system-ui, sans-serif; letter-spacing: -0.03em; }
.brand .grad { background: linear-gradient(90deg, var(--a), var(--b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ptag { margin-inline-start: 2px; padding: 2px 6px; border: 1px solid #FFB020; background: rgba(255,176,32,.2); color: #FFC857; border-radius: 10px; font: 700 10px/1.1 Inter, sans-serif; letter-spacing: .08em; }
.ptag[hidden] { display: none; }
@media (max-width: 640px) { .top { padding: 14px 18px 8px; } .brand .word { font-size: 19px; } .brand .mark { width: 26px; height: 22px; } }
.tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: rgba(38,216,245,.12); color: var(--b); }
.top-right { display: flex; gap: 8px; align-items: center; }
.code { font: 600 13px ui-monospace, Consolas, monospace; color: var(--muted); letter-spacing: .06em; }
.center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.card.narrow { max-width: 380px; align-items: center; text-align: center; }
h1 { font-size: 22px; margin: 0; } h2 { font-size: 18px; margin: 0; } h3 { font-size: 15px; margin: 0; }
.muted { color: var(--muted); margin: 0; font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.pre { position: relative; aspect-ratio: 16/9; background: var(--bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.pre video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.pre-ctl { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 10px; }
.primary { background: linear-gradient(135deg, var(--a), var(--b)); color: #fff; font-weight: 600; padding: 12px 18px; }
.secondary { background: var(--panel2); border: 1px solid var(--line); padding: 10px 16px; font-weight: 600; }
.ghost { background: transparent; color: var(--muted); padding: 8px 12px; }
.ghost:hover { color: var(--text); }
.small { font-size: 13px; padding: 6px 10px; }
.wide { width: 100%; }
.danger-btn { background: var(--danger); color: #fff; padding: 10px 16px; font-weight: 600; }
.or { text-align: center; color: var(--muted); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 0; text-align: center; }
#app-box { margin-bottom: 14px; }
.join-row { display: flex; gap: 8px; }
#code { font-family: ui-monospace, Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.err { color: var(--danger); margin: 0; min-height: 1em; font-size: 14px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--b); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toggle, .round { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,77,106,.9); position: relative; }
.toggle.on, .round.on { background: var(--panel2); border: 1px solid var(--line); }
.round.danger { background: var(--danger); }
.round.neutral { background: var(--panel2); border: 1px solid var(--line); }
.round:disabled { opacity: .35; cursor: default; }
.badge { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--warn); color: #000; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Icons: simple CSS masks of inline SVG, so no extra requests. */
.i { width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.i-mic { --m: 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'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M5 11a7 7 0 0 0 14 0M12 18v3'/%3E%3C/svg%3E"); }
.i-cam { --m: 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-linejoin='round'%3E%3Crect x='3' y='6' width='12' height='12' rx='2'/%3E%3Cpath d='M15 10l6-3v10l-6-3z'/%3E%3C/svg%3E"); }
.i-screen { --m: 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'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4M12 13V7M9 10l3-3 3 3'/%3E%3C/svg%3E"); }
.i-link { --m: 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'%3E%3Cpath d='M10 14a4 4 0 0 0 6 0l3-3a4 4 0 0 0-6-6l-1 1M14 10a4 4 0 0 0-6 0l-3 3a4 4 0 0 0 6 6l1-1'/%3E%3C/svg%3E"); }
.i-people { --m: 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'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M16 4.5a3.5 3.5 0 0 1 0 7M18 14a6 6 0 0 1 3.5 6'/%3E%3C/svg%3E"); }
.i-leave { --m: 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'%3E%3Cpath d='M3 14c5-5 13-5 18 0l-2 3-4-1v-3a9 9 0 0 0-6 0v3l-4 1z'/%3E%3C/svg%3E"); }
.i-micoff { --m: 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.4' stroke-linecap='round'%3E%3Crect x='9' y='3' width='6' height='11' rx='3'/%3E%3Cpath d='M4 4l16 16'/%3E%3C/svg%3E"); }

.i-camoff { --m: 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='M3 6h9a2 2 0 0 1 2 2v1l6-3v10l-4-2M14 15v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8M3 3l18 18'/%3E%3C/svg%3E"); }
.i-screenoff { --m: 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='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20h8M12 16v4M9 7l6 6M15 7l-6 6'/%3E%3C/svg%3E"); }
.i-pin { --m: 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='M9 4h6l-1 6 3 3H7l3-3zM12 13v7'/%3E%3C/svg%3E"); }
.i-full { --m: 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='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E"); }
.i-zin { --m: 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='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4M8 11h6M11 8v6'/%3E%3C/svg%3E"); }
.i-zout { --m: 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='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4M8 11h6'/%3E%3C/svg%3E"); }
.i-x { --m: 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='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.i-grid { --m: 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='3' y='3' width='8' height='8' rx='2'/%3E%3Crect x='13' y='3' width='8' height='8' rx='2'/%3E%3Crect x='3' y='13' width='8' height='8' rx='2'/%3E%3Crect x='13' y='13' width='8' height='8' rx='2'/%3E%3C/svg%3E"); }
.i-mouse { --m: 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='6' y='3' width='12' height='18' rx='6'/%3E%3Cpath d='M12 7v4'/%3E%3C/svg%3E"); }

/* ---------- meeting ---------- */
#v-meet { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.meet-main { flex: 1; display: flex; min-height: 0; }
.stage-area { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; padding: 12px; gap: 12px; }
.grid { flex: 1; display: grid; gap: 12px; min-height: 0; grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.stage { display: none; }
/* Spotlight: one tile big, the others in a strip. */
#v-meet.spot .stage-area { flex-direction: row; }
#v-meet.spot .stage { display: flex; flex: 1; min-width: 0; }
#v-meet.spot .stage .tile { flex: 1; }
#v-meet.spot .grid { flex: 0 0 236px; display: flex; flex-direction: column; overflow-y: auto; gap: 10px; }
#v-meet.spot .grid .tile { flex: 0 0 140px; min-height: 140px; }
#v-meet.spot .grid:empty { display: none; }
/* Small tiles in the strip: name and mic only; a click puts them on the stage. */
#v-meet.spot .grid .tile-tools, #v-meet.controlling .grid .tile-tools, #v-meet.spot .grid .tile-ctl .chip, #v-meet.controlling .grid .tile-ctl .chip { display: none; }
#v-meet.spot .grid .pres span:last-child, #v-meet.controlling .grid .pres span:last-child { display: none; }
#v-meet.spot .grid .label, #v-meet.controlling .grid .label { bottom: 6px; inset-inline-start: 6px; font-size: 12px; padding: 3px 8px; }

.tile { position: relative; background: radial-gradient(120% 120% at 50% 0%, #182436 0%, var(--panel) 60%); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-height: 120px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.tile:hover { border-color: #33476a; }
.tile.talking { border-color: var(--b); box-shadow: 0 0 0 2px var(--b), 0 0 22px rgba(38,216,245,.25); }
.tile.sharing { background: #05080d; }
.tile .vwrap { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; transform-origin: 0 0; }
.tile video.contain { object-fit: contain; background: #05080d; }
.tile video.mirror { transform: scaleX(-1); transform-origin: 50% 50%; }
.avatar { width: clamp(56px, 22%, 112px); aspect-ratio: 1; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); display: flex; align-items: center; justify-content: center; font-size: clamp(22px, 5vw, 44px); font-weight: 600; box-shadow: 0 8px 32px rgba(135,72,255,.3); }
.grid .tile .avatar, #v-meet.spot .grid .avatar { font-size: 26px; }
.label { position: absolute; bottom: 10px; inset-inline-start: 10px; display: flex; gap: 8px; align-items: center; background: rgba(8,12,19,.78); backdrop-filter: blur(6px); padding: 5px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; max-width: calc(100% - 20px); }
.label .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.label .i { width: 16px; height: 16px; flex-shrink: 0; }
.label .mic-ind { color: var(--ok); }
.label .mic-ind.off { color: var(--danger); }
.label .role { color: var(--b); font-weight: 600; font-size: 11px; }
.pres { position: absolute; top: 10px; inset-inline-end: 10px; display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); padding: 4px 9px; border-radius: 7px; }
.pres .i { width: 14px; height: 14px; }
.status { position: absolute; top: 44px; inset-inline-end: 10px; font-size: 12px; color: var(--warn); background: rgba(11,16,25,.8); padding: 3px 8px; border-radius: 6px; }
.tile-tools { position: absolute; bottom: 10px; inset-inline-end: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.tile:hover .tile-tools, .tile:focus-within .tile-tools, .stage .tile-tools { opacity: 1; }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: rgba(8,12,19,.78); border: 1px solid var(--line); color: var(--text); padding: 0; }
.icon-btn:hover { background: var(--panel2); }
.icon-btn.on { color: var(--b); border-color: rgba(38,216,245,.6); }
.icon-btn .i { width: 18px; height: 18px; }
.zoom { display: flex; align-items: center; gap: 4px; background: rgba(8,12,19,.78); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.zoom .icon-btn { border: 0; background: transparent; width: 30px; height: 30px; }
.zoom .pct { min-width: 46px; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); background: none; padding: 0; }
.tile:fullscreen { border-radius: 0; border: 0; }

/* Bottom bar: labelled controls, a clear off state (red with a slash). */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--line); }
.bar-side { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar-end { justify-content: flex-end; }
.bar-mid { display: flex; gap: 10px; align-items: flex-end; }
.clock { font-weight: 600; font-variant-numeric: tabular-nums; }
.sep { width: 1px; height: 18px; background: var(--line); }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; padding: 0 4px; min-width: 62px; }
.ctl .ic { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--panel2); border: 1px solid var(--line); position: relative; transition: background .15s, border-color .15s; }
.ctl:hover .ic { border-color: #3a5073; background: #213049; }
.ctl .lb { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.ctl.off .ic { background: rgba(255,77,106,.16); border-color: rgba(255,77,106,.7); color: #ff8297; }
.ctl.active .ic { background: linear-gradient(135deg, var(--a), var(--b)); border-color: transparent; color: #fff; }
.ctl.active .lb { color: var(--b); }
.ctl.leave .ic { background: var(--danger); border-color: var(--danger); color: #fff; width: 64px; }
.ctl.leave .lb { color: #ff8297; }
.badge { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--warn); color: #000; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 5px; }
.count { color: var(--muted); font-weight: 600; }

.panel { width: 320px; max-width: 100%; background: var(--panel); border-inline-start: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
#roster { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
#roster li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel2); border-radius: 12px; font-size: 14px; }
#roster .av { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--a), var(--b)); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
#roster .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#roster .role { color: var(--b); font-size: 12px; }
#roster .st { display: flex; gap: 4px; color: var(--muted); }
#roster .st .i { width: 16px; height: 16px; }
#roster .st .off { color: var(--danger); }
.knock { background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.35); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.knock .row { display: flex; gap: 8px; }
.knock .row button { flex: 1; padding: 8px; }
.admit { background: var(--ok); color: #04170f; font-weight: 600; }
.switch { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.switch input { width: auto; }
.toast { position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.4); padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px); z-index: 20; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 18px; max-width: 360px; }
dialog::backdrop { background: rgba(0,0,0,.6); }
.dlg-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Control in a meeting */
.ctl-banner { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 6; max-width: min(760px, calc(100% - 24px)); display: flex; gap: 10px; align-items: center; background: rgba(19,29,43,.97); border: 1px solid rgba(135,72,255,.6); box-shadow: 0 0 24px rgba(135,72,255,.25); border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.ctl-banner .acts { display: flex; gap: 6px; flex-shrink: 0; }
.tile-ctl { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; align-items: center; z-index: 2; }
.tile-ctl .small { padding: 7px 11px; font-size: 13px; }
.chip { font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 4px 8px; border-radius: 7px; background: rgba(11,16,25,.85); color: var(--muted); border: 1px solid var(--line); }
.chip.ok { color: var(--ok); border-color: rgba(52,211,153,.5); }
.chip.warn { color: var(--warn); border-color: rgba(251,191,36,.5); }
.remote-box { display: none; }
#v-meet.controlling .stage-area { flex-direction: row; }
#v-meet.controlling .stage { display: none; }
#v-meet.controlling .remote-box { display: block; flex: 1; min-width: 0; }
#v-meet.controlling .remote-box iframe { width: 100%; height: 100%; border: 1px solid rgba(135,72,255,.6); border-radius: 16px; background: #000; }
#v-meet.controlling .grid { flex: 0 0 236px; display: flex; flex-direction: column; overflow-y: auto; }
#v-meet.controlling .grid .tile { flex: 0 0 140px; }
#v-meet.controlling .ctl-banner { left: auto; transform: none; inset-inline-end: 24px; top: auto; bottom: 20px; max-width: 300px; flex-direction: column; align-items: stretch; }

@media (max-width: 760px) {
  .stage-area { padding: 8px; gap: 8px; }
  .grid { gap: 8px; }
  #v-meet.spot .stage-area, #v-meet.controlling .stage-area { flex-direction: column; }
  #v-meet.spot .grid, #v-meet.controlling .grid { flex: 0 0 104px; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  #v-meet.spot .grid .tile, #v-meet.controlling .grid .tile { flex: 0 0 140px; min-height: 0; }
  .panel { position: fixed; inset: 0 0 82px 0; width: 100%; z-index: 15; }
  .top .code { display: none; }
  .bar { padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); gap: 2px; justify-content: center; }
  .bar-info { display: none; }
  .bar-side { flex: 0 0 auto; gap: 2px; }
  .bar-mid { gap: 4px; }
  .ctl { min-width: 54px; padding: 0; }
  .ctl .ic { width: 44px; height: 44px; border-radius: 12px; }
  .ctl.leave .ic { width: 50px; }
  .ctl .lb { font-size: 11px; }
  .toast { bottom: 90px; }
  #v-meet.controlling .ctl-banner { inset-inline: 8px; max-width: none; bottom: 116px; }
  .stage .tile-tools { opacity: 1; }
}

/* Big meetings: one page of people at a time */
.tile[hidden] { display: none !important; }
.pager { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 0 0; color: var(--muted, #9fb0c8); font-size: 13px; }
.pager[hidden] { display: none; }
.pager .icon-btn:disabled { opacity: .35; cursor: default; }
.i-prev { --m: 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='M15 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.i-next { --m: 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='M9 6l6 6-6 6'/%3E%3C/svg%3E"); }
[dir=rtl] .i-prev, [dir=rtl] .i-next { transform: scaleX(-1); }
#mute-all { margin: 8px 0; }
#mute-all[hidden] { display: none; }
#knocks .admit.wide { width: 100%; margin-bottom: 8px; }

/* ---------- chat, notes, board, reactions, hands ---------- */
.i-chat { --m: 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='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
.i-pen { --m: 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='M4 20l4-1L19 8l-3-3L5 16zM14 7l3 3'/%3E%3C/svg%3E"); }
.i-eraser { --m: 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='M8 20h12M5 15l9-9 5 5-8 8H8z'/%3E%3C/svg%3E"); }
.i-undo { --m: 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='M9 7L4 12l5 5M4 12h11a5 5 0 0 1 0 10h-2'/%3E%3C/svg%3E"); }
.i-trash { --m: 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='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13'/%3E%3C/svg%3E"); }
.i-save { --m: 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='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
.i-more { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E"); }
[dir=rtl] .i-undo { transform: scaleX(-1); }
.emo { font-size: 22px; line-height: 1; }
.ctl.raised .ic { background: rgba(251,191,36,.18); border-color: var(--warn); }
.ctl.raised .lb { color: var(--warn); }
.badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: -3px; inset-inline-end: -3px; }
.narrow-only { display: none; }

.tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 10px; padding: 3px; }
.tab { background: none; padding: 6px 12px; font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 8px; }
.tab.on { background: var(--panel2); color: var(--text); }
.pane { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
#chat { gap: 10px; }
.chat-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.chat-list li { background: var(--panel2); border-radius: 12px; padding: 8px 10px; max-width: 92%; align-self: flex-start; }
.chat-list li.me { align-self: flex-end; background: rgba(135,72,255,.18); }
.chat-list .who { font-size: 12px; font-weight: 600; color: var(--b); display: flex; gap: 8px; }
.chat-list .who time { color: var(--muted); font-weight: 400; }
.chat-list .txt { white-space: pre-wrap; word-break: break-word; font-size: 14px; unicode-bidi: plaintext; }
.chat-list .empty { background: none; color: var(--muted); align-self: center; font-size: 13px; }
.chat-form { display: flex; gap: 6px; align-items: flex-end; }
.chat-form textarea, .notes { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; resize: none; unicode-bidi: plaintext; }
.chat-form textarea { max-height: 120px; }
.notes { flex: 1; min-height: 240px; line-height: 1.5; }
.notes-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }

.board { position: absolute; inset: 12px; z-index: 8; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.board-tools { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.board-tools .grow { flex: 1; }
.swatches, .sizes { display: flex; gap: 4px; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.sw.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg) inset; }
.sz { width: 30px; height: 30px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.sz span { background: var(--text); border-radius: 50%; display: block; }
.sz.on { border-color: var(--b); }
.board-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; background: #0a0f17; }
#board-canvas { background: #fff; border-radius: 8px; touch-action: none; cursor: crosshair; max-width: 100%; max-height: 100%; }

.pop { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); z-index: 25; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 8px; display: flex; gap: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.45); flex-wrap: wrap; max-width: calc(100% - 24px); justify-content: center; }
.pop .re { font-size: 26px; background: none; padding: 4px 6px; border-radius: 10px; line-height: 1; }
.pop .re:hover { background: var(--panel); }
.pop.more { flex-direction: column; inset-inline-end: 12px; left: auto; transform: none; }
.floats { position: absolute; inset-inline-start: 18px; bottom: 64px; z-index: 9; display: flex; flex-direction: column-reverse; gap: 6px; pointer-events: none; }
.float { background: rgba(8,12,19,.85); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 6px; display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; animation: rise 3.6s ease-out forwards; }
.float .emo { font-size: 26px; }
@keyframes rise { 0% { opacity: 0; transform: translateY(16px) scale(.8); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px); } }
.tile .big-emo { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 64px; z-index: 3; pointer-events: none; animation: pop 2.6s ease-out forwards; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%); } }
.label .hand-ind { font-size: 14px; }
.label .voice-ind { font-size: 11px; font-weight: 600; color: #fff; background: rgba(135,72,255,.75); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }
.pop button.on { border-color: var(--a); color: var(--a); }
.tile.hand { border-color: var(--warn); }
#roster li.hand { background: rgba(251,191,36,.10); border: 1px solid rgba(251,191,36,.4); }
#roster .vol { width: 100%; flex-basis: 100%; accent-color: var(--b); margin: 2px 0 0; padding: 0; border: 0; background: none; }
#roster li { flex-wrap: wrap; }
.share-sound { margin: 12px 0 4px; color: var(--text); }
.share-sound input { width: 18px; height: 18px; }
#share-dlg h3 { margin: 0; }

@media (max-width: 760px) {
  .wide-only { display: none; }
  .narrow-only { display: flex; }
  .board { inset: 6px; }
  .board-tools .sizes { display: none; }
  .pop { bottom: 86px; }
}

/* live captions */
.cc-ic { font-size: 12px; font-weight: 800; letter-spacing: .02em; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 3px; line-height: 15px; }
.cc-box { --cc-scale: 1; position: absolute; left: 50%; transform: translateX(-50%); bottom: 64px; z-index: 10; width: min(820px, calc(100% - 24px)); max-height: 42%; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; pointer-events: none; }
.cc-line { background: rgba(0,0,0,.74); color: #fff; font-size: calc(17px * var(--cc-scale)); line-height: 1.45; padding: 6px 12px; border-radius: 8px; unicode-bidi: plaintext; text-align: start; }
.cc-line.cc2 { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; }
.cc-line.cc2 .o, .cc-line.cc2 .t { unicode-bidi: plaintext; }
.cc-line.cc2.two .o { opacity: .72; font-size: .86em; }
.cc-line.cc2.two .t { flex-basis: 100%; }
.cc-line.cc2.partial .o { opacity: .78; }
.cc-line.cc2 .dim { opacity: .6; }
.cc-line.cc2 .n { font-size: .72em; opacity: .75; }
.cc-st { align-self: center; background: rgba(0,0,0,.6); color: #dfe8f2; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.cc-st.warn { background: rgba(120,40,0,.82); color: #ffe3c6; }
.cc-notice { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 11; max-width: calc(100% - 20px); background: rgba(10,16,25,.86); color: #ffd98a; border: 1px solid rgba(255,200,90,.45); font-size: 12px; padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.cc-pop .cc2-size { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 2px 4px; }
.cc-pop .cc2-size span { flex: 1; }
.cc-pop hr { border: 0; border-top: 1px solid var(--line, rgba(255,255,255,.12)); margin: 4px 0; width: 100%; }
#cc2-dlg h3 { margin: 0 0 6px; }
#cc2-dlg .field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; font-size: 13px; }
.cc-line b { color: #9fdcff; font-weight: 600; margin-inline-end: 6px; }
.cc-pop { min-width: 240px; align-items: stretch; }
.cc-pop .st { font-size: 12px; color: var(--muted); padding: 2px 4px; }
.cc-pop .switch { padding: 4px; }
.cc-pop .field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); padding: 2px 4px; }
.label .cc-ind { font-size: 10px; font-weight: 800; border: 1px solid #fff; border-radius: 3px; padding: 0 3px; color: #fff; }
@media (max-width: 760px) { .cc-line { font-size: calc(15px * var(--cc-scale)); } .cc-box { bottom: 60px; } }

/* chat: bubbles, files, pictures */
.i-clip { --m: 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='M21 11.5l-8.6 8.6a5 5 0 01-7.1-7.1l8.6-8.6a3.3 3.3 0 014.7 4.7l-8.6 8.6a1.7 1.7 0 01-2.4-2.4l7.9-7.9'/%3E%3C/svg%3E"); }
.i-send { --m: 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='M4 12l16-8-6 16-2.5-6.5z'/%3E%3C/svg%3E"); }
.i-list { --m: 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='M9 6h11M9 12h11M9 18h11'/%3E%3Ccircle cx='4.5' cy='6' r='1'/%3E%3Ccircle cx='4.5' cy='12' r='1'/%3E%3Ccircle cx='4.5' cy='18' r='1'/%3E%3C/svg%3E"); }
.i-olist { --m: 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='M10 6h10M10 12h10M10 18h10M4 4.5h1.5V9M3.5 9h3M3.5 14.5a1.5 1.5 0 013 .5L3.5 19h3'/%3E%3C/svg%3E"); }
.i-check { --m: 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='3' y='4' width='7' height='7' rx='1.5'/%3E%3Cpath d='M4.8 7.5l1.5 1.5L9 6M13 7.5h8M13 16.5h8'/%3E%3Crect x='3' y='13' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.i-file { --m: 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='M14 3H6.5A1.5 1.5 0 005 4.5v15A1.5 1.5 0 006.5 21h11a1.5 1.5 0 001.5-1.5V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E"); }
.i-dl { --m: 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='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }

.chat-list { gap: 2px; padding: 4px 2px; }
.chat-list li { background: none; padding: 0; max-width: 100%; align-self: stretch; display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.chat-list li.cont { margin-top: 2px; }
.chat-list li.me { flex-direction: row-reverse; background: none; }
.chat-list .av { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
.chat-list li.cont .av { visibility: hidden; height: 0; }
.chat-list .col { display: flex; flex-direction: column; gap: 3px; max-width: calc(100% - 46px); min-width: 0; }
.chat-list li.me .col { align-items: flex-end; }
.chat-list .who { font-size: 12px; color: var(--muted); padding: 0 6px; }
.chat-list .who b { color: var(--text); font-weight: 600; margin-inline-end: 6px; }
.chat-list li.cont .who { display: none; }
.chat-list .bub { background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; border-end-start-radius: 6px; padding: 8px 12px; }
.chat-list li.me .bub { background: linear-gradient(135deg, rgba(135,72,255,.32), rgba(38,216,245,.18)); border-color: rgba(135,72,255,.45); border-end-start-radius: 16px; border-end-end-radius: 6px; }
.chat-list .txt { font-size: 14px; line-height: 1.45; }
.chat-list .txt a { color: var(--b); }
.chat-list .pic { display: block; max-width: 240px; max-height: 220px; min-width: 48px; min-height: 48px; object-fit: contain; border-radius: 12px; cursor: zoom-in; border: 1px solid var(--line); background: var(--bg); }
.chat-list .fcard { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 200px; max-width: 260px; color: var(--text); text-decoration: none; }
.chat-list .fcard:hover { border-color: var(--b); }
.chat-list .fcard .fi { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: rgba(38,216,245,.14); color: var(--b); flex: none; }
.chat-list .fcard .fn { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list .fcard .fs { font-size: 11px; color: var(--muted); }
.chat-list .fcard .meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.chat-uploads { display: flex; flex-direction: column; gap: 6px; }
.chat-uploads .up { font-size: 12px; background: var(--panel2); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.chat-uploads .up .bar { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.chat-uploads .up .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--a), var(--b)); transition: width .2s; }
.chat-form { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; align-items: flex-end; }
.chat-form:focus-within { border-color: var(--a); }
.chat-form textarea { border: 0; background: transparent; padding: 8px 6px; }
.chat-form .attach { width: 36px; height: 36px; flex: none; }
.send-btn { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--a), var(--b)); border: 0; padding: 0; }
.send-btn .i { width: 18px; height: 18px; }
.chat-foot { display: flex; justify-content: space-between; align-items: center; font-size: 11px; gap: 8px; }
#pane-chat { position: relative; }
.chat-drop { position: absolute; inset: 0; border: 2px dashed var(--b); border-radius: 14px; background: rgba(11,16,25,.85); display: grid; place-items: center; font-weight: 600; z-index: 3; }
.lightbox { max-width: min(92vw, 1100px); padding: 10px; }
.lightbox img { display: block; max-width: 100%; max-height: 78vh; border-radius: 10px; margin: 0 auto; }
.lightbox .lb-row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
/* notes: a small word processor */
.notes-bar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.notes-bar select { font: inherit; font-size: 12px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 2px; }
.notes-bar .nb { min-width: 28px; height: 28px; border-radius: 8px; background: none; border: 1px solid transparent; color: var(--text); padding: 0 4px; display: grid; place-items: center; font-size: 14px; }
.notes-bar .nb:hover { background: var(--bg); }
.notes-bar .nb.on { border-color: var(--a); background: rgba(135,72,255,.18); }
.notes-bar .nb .i { width: 18px; height: 18px; }
.notes-bar .nb-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
div.notes { overflow-y: auto; outline: none; white-space: pre-wrap; word-break: break-word; }
div.notes:empty::before { content: attr(data-ph); color: var(--muted); }
div.notes h1 { font-size: 22px; margin: 6px 0; }
div.notes h2 { font-size: 17px; margin: 6px 0; }
div.notes p, div.notes div { margin: 2px 0; min-height: 1.4em; }
div.notes ul, div.notes ol { margin: 2px 0; padding-inline-start: 22px; }
div.notes ul.todo { list-style: none; padding-inline-start: 4px; }
div.notes ul.todo li { position: relative; padding-inline-start: 26px; }
div.notes ul.todo li::before { content: ''; position: absolute; inset-inline-start: 0; top: 3px; width: 15px; height: 15px; border: 2px solid var(--muted); border-radius: 4px; cursor: pointer; }
div.notes ul.todo li[data-check="1"] { color: var(--muted); text-decoration: line-through; }
div.notes ul.todo li[data-check="1"]::before { background: var(--b); border-color: var(--b); }
div.notes ul.todo li[data-check="1"]::after { content: ''; position: absolute; inset-inline-start: 5px; top: 5px; width: 5px; height: 9px; border: solid #0b1019; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* DeskLink sections: Remote control | Meetings */
.sections { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.sections[hidden] { display: none; }
.sections a { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.sections a:hover { color: var(--text); background: var(--panel2); }
.sections a.on { color: var(--text); background: linear-gradient(135deg, rgba(135,72,255,.35), rgba(38,216,245,.2)); box-shadow: inset 0 0 0 1px rgba(135,72,255,.45); cursor: default; }
.sections .i { width: 16px; height: 16px; }
@media (max-width: 640px) { .top .brand .tag { display: none; } .sections a { padding: 6px 10px; font-size: 13px; } .sections .i { display: none; } }
.key-box { margin-top: 10px; }
.key-box .hint { margin: 0 0 8px; }

.chat-uploads .up.err { flex-direction: row; align-items: center; justify-content: space-between; background: rgba(239,72,72,.14); border: 1px solid rgba(239,72,72,.5); color: #ffb4b4; }
.chat-uploads .up.err .x { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; padding: 0 4px; cursor: pointer; }

/* Device choice: a small arrow on the corner of Mic and Camera */
.ctl-grp, .pre-grp { position: relative; display: inline-flex; }
.dev-arrow { position: absolute; width: 20px; height: 20px; border-radius: 50%; padding: 0; background: var(--panel); border: 1px solid var(--line); color: var(--text); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.dev-arrow::before { content: ''; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid currentColor; }
.dev-arrow:hover { background: var(--panel2); border-color: #3a5073; }
.ctl-grp .dev-arrow { top: -6px; inset-inline-end: 0; }
.pre-grp .dev-arrow { top: -6px; inset-inline-end: -6px; }
.dev-menu { position: fixed; z-index: 60; min-width: 220px; max-width: min(340px, calc(100vw - 16px)); max-height: 60vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.dev-menu[hidden] { display: none; }
.dev-menu .dm-h { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px 4px; }
.dev-menu .dm-i { display: block; width: 100%; text-align: start; background: none; border: 0; color: var(--text); font: inherit; font-size: 13px; padding: 8px 10px 8px 30px; border-radius: 8px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
html[dir=rtl] .dev-menu .dm-i { padding: 8px 30px 8px 10px; }
.dev-menu .dm-i:hover { background: var(--panel2); }
.dev-menu .dm-i.on::before { content: '✓'; position: absolute; inset-inline-start: 10px; color: var(--b); font-weight: 700; }

/* The device arrow sits beside Mic and Camera (ali: easier to hit, a bit bigger) */
.ctl-grp, .pre-grp { align-items: flex-start; gap: 3px; }
.dev-arrow { position: static; border-radius: 12px; background: var(--panel2); }
.dev-arrow::before { border-left-width: 6px; border-right-width: 6px; border-bottom-width: 7px; }
.ctl-grp .dev-arrow { width: 26px; height: 50px; margin-inline-start: -4px; }
.pre-grp .dev-arrow { width: 24px; height: 46px; border-radius: 23px; }
@media (max-width: 760px) { .ctl-grp .dev-arrow { width: 22px; height: 44px; margin-inline-start: -2px; } }

/* A meeting link: one big Join, the app as a quiet alternative. */
.link-mode .join-row .primary { flex: 1; padding: 13px 18px; }
.app-alt { text-align: center; }
.linkish { background: none; padding: 4px 6px; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--text); }

/* Start, waiting and end screens: the remote-control page's backdrop (two
   soft brand glows) and card look (viewer/lib/look.dart). */
body:not(:has(#v-meet:not([hidden]))) {
  background:
    radial-gradient(circle at 8% 2%, rgba(135,72,255,.22), rgba(135,72,255,0) 55vmax),
    radial-gradient(circle at 98% 102%, rgba(38,216,245,.14), rgba(38,216,245,0) 60vmax),
    var(--bg);
  background-attachment: fixed;
}
body:not(:has(#v-meet:not([hidden]))) .top { background: transparent; }
#v-start .card, #v-wait .card { background: #111A27; border: 1px solid #243247; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
#v-start h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
