/* «زيرو كونكت» v2 (2026-10-18) — chats, calls, meetings, agents. Zero's deep blue, glass, light that moves.
   Themes: [data-theme] zero (default) · midnight · aurora · light. Everything animates with transform/opacity only. */
:root {
  --bg0: #020b14; --bg1: #04111d; --bg2: #071a2a; --bg3: #0a2236;
  --panel: rgba(7, 26, 42, .82); --panel2: rgba(10, 36, 58, .7); --glass: rgba(8, 28, 46, .62); --glass2: rgba(12, 40, 64, .78);
  --line: rgba(25, 184, 255, .16); --line2: rgba(25, 184, 255, .32); --line3: rgba(25, 184, 255, .6);
  --cyan: #19b8ff; --teal: #1de3c4; --ice: #eaf6ff; --text: #cfe6f6; --dim: #85a7bf; --faint: #4c6c82;
  --green: #22d47e; --red: #ff3b4f; --amber: #ffb020; --violet: #9b7bff; --pink: #ff5fa2;
  --grad: linear-gradient(135deg, var(--teal), var(--cyan)); --grad2: linear-gradient(135deg, var(--cyan), var(--violet));
  --mine: linear-gradient(135deg, #0f6e8f, #0c5a7a); --their: rgba(14, 40, 62, .92);
  --f: 'IBM Plex Sans Arabic', 'Segoe UI', system-ui, sans-serif; --ft: 'Rajdhani', 'IBM Plex Sans Arabic', sans-serif;
  --r: 14px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}
[data-theme="midnight"] { --bg0: #05060d; --bg1: #090b17; --bg2: #0e1122; --bg3: #151a33; --cyan: #7c8cff; --teal: #5ee7ff; --line: rgba(124, 140, 255, .16); --line2: rgba(124, 140, 255, .32); --line3: rgba(124, 140, 255, .6);
  --mine: linear-gradient(135deg, #3b3f9e, #2b2f7a); --their: rgba(22, 26, 52, .92); }
[data-theme="aurora"] { --bg0: #03100e; --bg1: #061714; --bg2: #0a221e; --bg3: #0f2f29; --cyan: #2ee6a6; --teal: #b9f36b; --violet: #ff7bd5; --line: rgba(46, 230, 166, .16); --line2: rgba(46, 230, 166, .32); --line3: rgba(46, 230, 166, .6);
  --mine: linear-gradient(135deg, #0f7a5f, #0b5c48); --their: rgba(14, 46, 40, .92); }
[data-theme="light"] { --bg0: #eef4f9; --bg1: #f6f9fc; --bg2: #ffffff; --bg3: #ffffff; --panel: rgba(255, 255, 255, .86); --glass: rgba(255, 255, 255, .7); --glass2: rgba(255, 255, 255, .9);
  --line: rgba(15, 90, 140, .14); --line2: rgba(15, 90, 140, .26); --line3: rgba(15, 120, 190, .55); --cyan: #0b8fd6; --teal: #0bb89c;
  --ice: #0b2236; --text: #1c3a52; --dim: #5a7890; --faint: #93a9ba; --mine: linear-gradient(135deg, #0b8fd6, #0a74b0); --their: #ffffff; color-scheme: light; }
[data-theme="light"] .m.mine .b, [data-theme="light"] .m.mine .b a { color: #fff; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: transparent; color: var(--text); font: 15px/1.5 var(--f); overflow: hidden; }
body.solo, body.masar:not(.pill) { background: radial-gradient(1200px 700px at 80% -10%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent 60%), radial-gradient(900px 600px at -10% 110%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 60%), var(--bg0); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--ice); }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hide { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--cyan) 24%, transparent); border-radius: 8px; }
.glass { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line2); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ── the boot screen ── */
.zc { position: fixed; inset: 0; display: flex; }
.zc-boot { margin: auto; display: grid; justify-items: center; gap: 10px; text-align: center; animation: rise-in .5s var(--ease); }
.zc-boot b { font: 700 26px var(--ft); letter-spacing: 1px; color: var(--ice); }
.zc-boot small { color: var(--dim); }
.zc-logo { position: relative; } .zc-logo::after { content: ''; position: absolute; inset: -18px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--cyan) 30%, transparent), transparent 70%); animation: breathe 2.4s ease-in-out infinite; z-index: -1; }
.zc-logo svg { width: 74px; height: 74px; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(.85); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes rise-in { from { transform: translateY(14px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: 0; } }
@keyframes zoom-in { from { transform: scale(.92); opacity: 0; } }
.zc.agent { pointer-events: none; }
.zc.agent > * { pointer-events: auto; }

/* ── the app frame: rail + list + main ── */
.app { flex: 1; display: grid; grid-template-columns: 78px minmax(290px, 370px) 1fr; min-width: 0; background: linear-gradient(180deg, var(--bg1), var(--bg0)); animation: fade .35s var(--ease); }
.rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; border-inline-end: 1px solid var(--line); background: color-mix(in srgb, var(--bg0) 70%, transparent); }
.rail .logo { width: 40px; height: 40px; display: grid; place-items: center; color: var(--teal); margin-bottom: 4px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--teal) 50%, transparent)); }
.rail .logo svg.i { width: 30px; height: 30px; stroke-width: 2.2; }
.rail .me { width: 44px; height: 44px; margin-bottom: 10px; }
.rail button { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--dim); transition: color .18s, background .18s, transform .2s var(--spring); }
.rail button:hover { color: var(--ice); background: color-mix(in srgb, var(--cyan) 9%, transparent); transform: translateY(-1px); }
.rail button:active { transform: scale(.92); }
.rail button.on { color: var(--ice); background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 24%, transparent), color-mix(in srgb, var(--teal) 14%, transparent)); box-shadow: inset 0 0 0 1px var(--line2), 0 6px 20px color-mix(in srgb, var(--cyan) 18%, transparent); }
.rail button.on::before { content: ''; position: absolute; inset-inline-start: -13px; width: 4px; height: 24px; border-radius: 4px; background: var(--grad); animation: zoom-in .25s var(--spring); }
.rail button svg.i { width: 24px; height: 24px; }
.rail .sp { flex: 1; }
.rail button .tip { position: absolute; inset-inline-start: 60px; white-space: nowrap; background: var(--bg3); border: 1px solid var(--line2); padding: 3px 10px; border-radius: 8px; font-size: 12.5px; opacity: 0; pointer-events: none; transition: .15s; z-index: 5; transform: translateX(6px); }
.rail button:hover .tip { opacity: 1; transform: none; }
.badge { position: absolute; top: 4px; inset-inline-end: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font: 600 11px/18px var(--f); text-align: center; box-shadow: 0 0 0 2px var(--bg0); animation: zoom-in .3s var(--spring); }
.list { display: flex; flex-direction: column; min-width: 0; border-inline-end: 1px solid var(--line); background: color-mix(in srgb, var(--bg1) 60%, transparent); }
.list-h { padding: 16px 16px 10px; display: flex; align-items: center; gap: 6px; }
.list-h h2 { margin: 0; flex: 1; font: 700 22px var(--f); color: var(--ice); letter-spacing: -.2px; }
.ib { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--dim); transition: color .15s, background .15s, transform .2s var(--spring); }
.ib:hover { color: var(--ice); background: color-mix(in srgb, var(--cyan) 11%, transparent); }
.ib:active { transform: scale(.9); }
.ib.pri { color: #04131f; background: var(--grad); box-shadow: 0 6px 16px color-mix(in srgb, var(--cyan) 30%, transparent); }
.search { margin: 0 14px 10px; position: relative; }
.search input { width: 100%; padding: 10px 40px 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg0) 70%, transparent); outline: none; transition: border-color .2s, box-shadow .2s; }
.search input:focus { border-color: var(--line3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 12%, transparent); }
.search svg { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.chips { display: flex; gap: 6px; padding: 0 14px 10px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--dim); font-size: 13px; transition: .2s; }
.chip.on { color: var(--ice); border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 15%, transparent); }
.items { flex: 1; overflow-y: auto; padding: 0 8px 12px; }
/* the columns never grow past the screen: the list (settings, people, chats) scrolls inside — 2026-12-03 (Zero Connect on its own page) */
.app { grid-template-rows: minmax(0, 1fr); } .list, .main { min-height: 0; } .items { min-height: 0; }
.it { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; cursor: pointer; transition: background .15s, transform .15s; position: relative; animation: pop .25s var(--ease) both; }
.items .it:nth-child(2) { animation-delay: .02s; } .items .it:nth-child(3) { animation-delay: .04s; } .items .it:nth-child(4) { animation-delay: .06s; } .items .it:nth-child(5) { animation-delay: .08s; } .items .it:nth-child(n+6) { animation-delay: .1s; }
.it:hover { background: color-mix(in srgb, var(--cyan) 7%, transparent); }
.it:active { transform: scale(.99); }
.it.on { background: linear-gradient(90deg, color-mix(in srgb, var(--cyan) 15%, transparent), color-mix(in srgb, var(--cyan) 4%, transparent)); box-shadow: inset 0 0 0 1px var(--line); }
.it .tx { flex: 1; min-width: 0; }
.it .tx b { display: block; font-weight: 600; color: var(--ice); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .tx small { display: block; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.it .tx small.typing { color: var(--teal); }
.it .side { display: grid; justify-items: end; gap: 4px; font-size: 11.5px; color: var(--faint); }
.it .side .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--teal); color: #032; font: 700 11.5px/20px var(--f); text-align: center; animation: zoom-in .3s var(--spring); }
.it .acts { display: flex; gap: 2px; opacity: .75; transition: opacity .15s; } .it:hover .acts { opacity: 1; }
.it .acts .ib { width: 34px; height: 34px; }
.it.agent-it { background: linear-gradient(90deg, color-mix(in srgb, var(--violet) 9%, transparent), transparent 70%); }
body.compact .it { padding: 6px 10px; } body.compact .it .av { width: 36px; height: 36px; font-size: 14px; }
.grp-h { padding: 12px 10px 4px; font-size: 12px; font-weight: 700; letter-spacing: .3px; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.grp-h small { color: var(--faint); font-weight: 500; }
.tag { display: inline-block; vertical-align: 1px; margin-inline-start: 4px; padding: 0 7px; border-radius: 99px; font-size: 10.5px; font-weight: 600; line-height: 17px; }
.tag.ag { color: #e9ddff; background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 50%, transparent), color-mix(in srgb, var(--cyan) 35%, transparent)); }
.tag.ms { color: #fff3d6; background: color-mix(in srgb, var(--amber) 38%, transparent); }
.empty { padding: 40px 20px; text-align: center; color: var(--dim); animation: fade .3s; }
.empty svg.i { width: 46px; height: 46px; color: var(--faint); margin-bottom: 8px; }

/* the agents strip (on top of the chats) */
.agent-strip { display: flex; gap: 10px; padding: 2px 14px 12px; overflow-x: auto; scrollbar-width: none; }
.agent-strip:empty { display: none; }
.ag-chip { flex: none; display: grid; justify-items: center; gap: 5px; width: 66px; animation: pop .3s var(--ease) both; }
.ag-chip b { font-size: 11.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 66px; }
.ag-orb { --h: 260; position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; isolation: isolate;
  background: radial-gradient(circle at 30% 30%, hsl(var(--h) 90% 72%), hsl(calc(var(--h) + 50) 80% 40%) 60%, hsl(calc(var(--h) + 100) 70% 22%)); box-shadow: 0 6px 18px hsl(var(--h) 80% 40% / .45); transition: transform .25s var(--spring); }
.ag-orb i { position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, hsl(var(--h) 90% 70%), transparent 40%); animation: spin 3s linear infinite; z-index: -1; opacity: .8; mask: radial-gradient(circle, transparent 60%, #000 62%); -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); }
.ag-chip:hover .ag-orb { transform: scale(1.08) rotate(-4deg); }

/* avatars + presence */
.av { --h: 200; position: relative; width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 17px var(--f); color: #fff;
  background: linear-gradient(135deg, hsl(var(--h) 70% 42%), hsl(calc(var(--h) + 40) 70% 30%)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.av.sm { width: 34px; height: 34px; font-size: 13px; } .av.lg { width: 120px; height: 120px; font-size: 44px; } .av.xl { width: 150px; height: 150px; font-size: 54px; }
.av.grp { border-radius: 30%; }
.av.masar-av::after { content: ''; position: absolute; top: -2px; inset-inline-start: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px var(--bg1); }
.av.sm.masar-av::after { width: 9px; height: 9px; }
.av.agent-av { background: radial-gradient(circle at 30% 30%, hsl(var(--h) 90% 70%), hsl(calc(var(--h) + 50) 80% 38%) 65%, hsl(calc(var(--h) + 90) 70% 22%)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 0 18px hsl(var(--h) 80% 50% / .35); }
.av.agent-av svg.i { width: 46%; height: 46%; stroke-width: 1.6; fill: rgba(255, 255, 255, .25); animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(18deg); } }
.av .dot { position: absolute; bottom: 1px; inset-inline-end: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 2.5px var(--bg1); }
.av .dot.on { background: var(--green); } .av .dot.call { background: var(--red); animation: bl 1.4s infinite; } .av .dot.dnd { background: var(--amber); }
.av .dot.on::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green); animation: ping 2.4s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.4); opacity: 0; } }
.av.lg .dot, .av.xl .dot { width: 22px; height: 22px; box-shadow: 0 0 0 4px var(--bg1); }
.av.zero { background: conic-gradient(from 210deg, #1de3c4, #19b8ff, #9b7bff, #1de3c4); }

/* ── the main pane: a chat ── */
.main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.main-empty { margin: auto; text-align: center; color: var(--dim); display: grid; justify-items: center; gap: 12px; padding: 30px; max-width: 460px; animation: rise-in .45s var(--ease); }
.main-empty .hero { position: relative; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, color-mix(in srgb, var(--cyan) 24%, transparent), transparent 70%); }
.main-empty .hero i { position: absolute; inset: 10px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--cyan) 40%, transparent); animation: spin 18s linear infinite; }
.main-empty .hero i + i { inset: 28px; border-style: solid; border-color: color-mix(in srgb, var(--teal) 25%, transparent); animation-duration: 9s; animation-direction: reverse; }
.main-empty .hero svg.i { width: 64px; height: 64px; color: var(--cyan); filter: drop-shadow(0 0 16px color-mix(in srgb, var(--cyan) 60%, transparent)); }
.main-empty h3 { margin: 0; color: var(--ice); font-size: 23px; }
.main-empty p { margin: 0; }
.hero-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.ch-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; padding-top: calc(12px + var(--safe-t)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg1) 78%, transparent); backdrop-filter: blur(12px); z-index: 2; }
.ch-h .tx { flex: 1; min-width: 0; cursor: pointer; }
.ch-h .tx b { display: block; color: var(--ice); font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-h .tx small { color: var(--dim); font-size: 12.5px; } .ch-h .tx small.typing { color: var(--teal); }
.ch-h .back { display: none; }
.main.with-agent .ch-h { background: linear-gradient(90deg, color-mix(in srgb, var(--violet) 14%, var(--bg1)), color-mix(in srgb, var(--bg1) 80%, transparent)); }
.msgs { flex: 1; overflow-y: auto; padding: 16px 6% 10px; display: flex; flex-direction: column; gap: 3px;
  background: radial-gradient(800px 400px at 50% 0, color-mix(in srgb, var(--cyan) 6%, transparent), transparent), repeating-linear-gradient(45deg, color-mix(in srgb, var(--cyan) 1.4%, transparent) 0 10px, transparent 10px 20px); }
.day { align-self: center; margin: 12px 0 8px; padding: 3px 12px; border-radius: 99px; font-size: 12px; color: var(--dim); background: var(--panel); border: 1px solid var(--line); position: sticky; top: 4px; z-index: 1; backdrop-filter: blur(8px); }
.m { max-width: min(560px, 78%); display: flex; flex-direction: column; animation: msg-in .28s var(--spring); }
@keyframes msg-in { from { transform: translateY(10px) scale(.96); opacity: 0; } }
.m.mine { align-self: flex-end; transform-origin: bottom left; } .m.their { align-self: flex-start; transform-origin: bottom right; }
.m .who { font-size: 12px; font-weight: 600; margin: 6px 12px 2px; color: hsl(var(--h, 190) 80% 66%); }
.m .b { position: relative; padding: 8px 12px 6px; border-radius: 18px; background: var(--their); border: 1px solid var(--line); color: var(--ice); white-space: pre-wrap; word-break: break-word; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.m.mine .b { background: var(--mine); border-color: color-mix(in srgb, var(--teal) 25%, transparent); }
.m.mine.first .b { border-end-end-radius: 6px; } .m.their.first .b { border-end-start-radius: 6px; }
.m .b a { color: #7fe7ff; }
.m .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 11px; color: rgba(207, 230, 246, .62); margin-top: 2px; direction: ltr; }
.m .tick svg { width: 16px; height: 16px; stroke-width: 2.2; } .m .tick.seen { color: var(--teal); }
.m.zero .b { background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 22%, var(--bg2)), color-mix(in srgb, var(--cyan) 14%, var(--bg2))); border-color: color-mix(in srgb, var(--violet) 40%, transparent); }
.m.sys { align-self: center; max-width: 90%; } .m.sys .b { background: var(--panel); color: var(--dim); font-size: 12.5px; padding: 4px 12px; border-radius: 99px; }
.m.callm { align-self: center; } .m.callm .b { display: flex; gap: 8px; align-items: center; background: var(--panel); border-radius: 99px; padding: 6px 14px; font-size: 13.5px; cursor: pointer; }
.m.del .b { font-style: italic; color: var(--faint); }
.m.pending { opacity: .7; }
.m .img { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; margin: -2px -6px 4px; cursor: zoom-in; background: rgba(0, 0, 0, .25); min-width: 160px; min-height: 100px; object-fit: cover; }
.m .fil { display: flex; align-items: center; gap: 10px; padding: 6px 4px; cursor: pointer; }
.m .fil .fi { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--cyan) 16%, transparent); color: var(--cyan); }
.m .fil small { display: block; color: var(--dim); }
.vn { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 2px 0; }
.vn .pb { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.vn .wave { flex: 1; height: 28px; display: flex; align-items: center; gap: 2px; }
.vn .wave i { flex: 1; background: rgba(234, 246, 255, .35); border-radius: 2px; min-height: 3px; transition: background .15s; }
.vn .wave i.p { background: var(--teal); }
.vn small { font-size: 11.5px; color: var(--dim); direction: ltr; }
.typing-row { padding: 0 6% 6px; color: var(--teal); font-size: 12.5px; min-height: 20px; }
.dots i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin: 0 1px; animation: bl 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes bl { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.comp { display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px; padding-bottom: calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg1) 88%, transparent); }
.comp textarea { flex: 1; resize: none; max-height: 140px; min-height: 44px; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg0) 75%, transparent); outline: none; line-height: 1.45; transition: border-color .2s, box-shadow .2s; }
.comp textarea:focus { border-color: var(--line3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 10%, transparent); }
.send { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #03131f; background: var(--grad); box-shadow: 0 6px 18px color-mix(in srgb, var(--cyan) 30%, transparent); transition: transform .2s var(--spring); }
.send:hover { transform: scale(1.06); } .send:active { transform: scale(.9); } .send svg.i { width: 22px; height: 22px; }
.send.rec { background: var(--red); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 79, .5); } 100% { box-shadow: 0 0 0 16px rgba(255, 59, 79, 0); } }
.recbar { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 22px; background: rgba(255, 59, 79, .12); border: 1px solid rgba(255, 59, 79, .35); color: #ffd6db; direction: ltr; }
.recbar .rd { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: bl 1s infinite; }

/* side info panel */
.info { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(360px, 100%); background: var(--bg2); border-inline-start: 1px solid var(--line2); z-index: 6; display: flex; flex-direction: column; animation: slide .28s var(--ease); box-shadow: -20px 0 40px rgba(0, 0, 0, .4); }
@keyframes slide { from { transform: translateX(-36px); opacity: 0; } }
.info-h { display: flex; align-items: center; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line); }
.info-h b { flex: 1; color: var(--ice); }
.info-b { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; }
.info-top { display: grid; justify-items: center; gap: 6px; text-align: center; }
.info-top b { font-size: 19px; color: var(--ice); }
.row-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ra { display: grid; justify-items: center; gap: 4px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--cyan) 8%, transparent); border: 1px solid var(--line); color: var(--cyan); min-width: 74px; font-size: 12.5px; transition: background .15s, transform .2s var(--spring); }
.ra:hover { background: color-mix(in srgb, var(--cyan) 16%, transparent); transform: translateY(-2px); }
.sec { border: 1px solid var(--line); border-radius: var(--r); background: color-mix(in srgb, var(--bg0) 40%, transparent); padding: 12px; margin-bottom: 10px; animation: pop .3s var(--ease) both; }
.sec h4 { margin: 0 0 8px; font-size: 13px; color: var(--dim); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.sec.warn { border-color: color-mix(in srgb, var(--amber) 45%, transparent); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.me-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 12%, transparent), color-mix(in srgb, var(--violet) 8%, transparent)); }
.me-card .av { width: 58px; height: 58px; font-size: 22px; } .me-card b { display: block; color: var(--ice); font-size: 17px; } .me-card small { color: var(--dim); }
/* «الصورة الشخصية» (2026-12-03) */
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: var(--bg2); }
.av.ph { color: transparent; }
.av .dot { z-index: 1; }
.me-ph { position: relative; padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; flex: none; }
.me-ph:disabled { cursor: default; }
.me-ph .av { width: 72px; height: 72px; font-size: 26px; }
.me-ph > i { position: absolute; bottom: -2px; inset-inline-start: -2px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--cyan); color: #04121e; box-shadow: 0 0 0 3px var(--bg2); }
.me-ph > i svg { width: 15px; height: 15px; }
.me-ph:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.me-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; } .me-acts .btn { padding: 5px 12px; font-size: 12.5px; }
.me-acts .btn.out { color: #ffb4b4; border-color: rgba(239, 68, 68, .35); display: inline-flex; align-items: center; gap: 5px; } .me-acts .btn.out .i { width: 14px; height: 14px; }
.phc { position: relative; width: min(320px, 100%); aspect-ratio: 1; margin: 4px auto 12px; border-radius: 16px; overflow: hidden; touch-action: none; cursor: grab; background: #000; }
.phc:active { cursor: grabbing; }
.phc canvas { width: 100%; height: 100%; display: block; }
.phc > i { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent 49.5%, rgba(0, 0, 0, .55) 50%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.phc-z { display: flex; align-items: center; gap: 10px; width: min(320px, 100%); margin: 0 auto; color: var(--dim); } .phc-z input { flex: 1; accent-color: var(--cyan); } .phc-z svg { width: 18px; height: 18px; }
.phc-h { display: block; text-align: center; color: var(--dim); margin-top: 8px; }
/* «حجم الخط» */
html[data-font="sm"] .m .b, html[data-font="sm"] .comp textarea { font-size: 13px; } html[data-font="sm"] .it .tx b { font-size: 13.5px; } html[data-font="sm"] .it .tx small { font-size: 12px; }
html[data-font="lg"] .m .b, html[data-font="lg"] .comp textarea { font-size: 17px; } html[data-font="lg"] .it .tx b { font-size: 16.5px; } html[data-font="lg"] .it .tx small { font-size: 14.5px; }
html[data-font="xl"] .m .b, html[data-font="xl"] .comp textarea { font-size: 19.5px; } html[data-font="xl"] .it .tx b { font-size: 18.5px; } html[data-font="xl"] .it .tx small { font-size: 16px; }
/* «خلفية المحادثة» */
html[data-bg="plain"] .msgs { background: none; }
html[data-bg="dots"] .msgs { background: radial-gradient(color-mix(in srgb, var(--cyan) 10%, transparent) 1px, transparent 1.4px) 0 0 / 18px 18px; }
html[data-bg="glow"] .msgs { background: radial-gradient(700px 420px at 15% 0, color-mix(in srgb, var(--violet) 16%, transparent), transparent), radial-gradient(700px 420px at 85% 100%, color-mix(in srgb, var(--cyan) 14%, transparent), transparent); }
html[data-bg="paper"] .msgs { background: linear-gradient(color-mix(in srgb, var(--ice) 3%, transparent), color-mix(in srgb, var(--ice) 3%, transparent)), repeating-linear-gradient(0deg, color-mix(in srgb, var(--ice) 2.5%, transparent) 0 1px, transparent 1px 28px); }

/* forms, sheets, toasts */
.ov { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(1, 6, 12, .66); backdrop-filter: blur(8px); padding: 16px; animation: fade .18s; }
.sheet { width: min(520px, 100%); max-height: min(740px, 100%); display: flex; flex-direction: column; background: linear-gradient(180deg, var(--bg3), var(--bg2)); border: 1px solid var(--line2); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; animation: sheet-in .32s var(--spring); }
@keyframes sheet-in { from { transform: translateY(24px) scale(.96); opacity: 0; } }
.sheet-h { display: flex; align-items: center; gap: 8px; padding: 16px 18px 10px; } .sheet-h b { flex: 1; font-size: 18px; color: var(--ice); }
.sheet-b { flex: 1; overflow-y: auto; padding: 4px 18px 14px; display: grid; gap: 12px; align-content: start; }
.sheet-f { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.fld { display: grid; gap: 6px; } .fld > span { font-size: 13px; color: var(--dim); }
.in { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg0) 70%, transparent); outline: none; transition: border-color .2s, box-shadow .2s; }
.in:focus { border-color: var(--line3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 10%, transparent); }
select.in option { background: var(--bg2); }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; font-weight: 600; color: #03131f; background: var(--grad); overflow: hidden; transition: transform .2s var(--spring), box-shadow .2s; box-shadow: 0 6px 18px color-mix(in srgb, var(--cyan) 22%, transparent); }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s; }
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-1px); } .btn:active { transform: scale(.96); }
.btn.big { padding: 13px 24px; font-size: 16px; border-radius: 14px; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.full { width: 100%; margin-top: 8px; }
.btn.gh { color: var(--ice); background: color-mix(in srgb, var(--cyan) 10%, transparent); box-shadow: inset 0 0 0 1px var(--line2); }
.btn.bad { color: #fff; background: var(--red); box-shadow: 0 6px 18px rgba(255, 59, 79, .3); }
.btn:disabled { opacity: .5; cursor: default; }
.sw { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.sw .tx { flex: 1; } .sw .tx small { display: block; color: var(--dim); font-size: 12.5px; }
.sw input { display: none; }
.sw .k { width: 46px; height: 26px; border-radius: 13px; background: rgba(127, 166, 191, .3); position: relative; transition: background .25s; flex: none; }
.sw .k::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: inset-inline-start .3s var(--spring), width .2s; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.sw:active .k::after { width: 26px; }
.sw input:checked + .k { background: var(--teal); } .sw input:checked + .k::after { inset-inline-start: 23px; }
.pick { display: grid; gap: 2px; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.pick label { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.pick label:hover { background: color-mix(in srgb, var(--cyan) 7%, transparent); }
.pick label.ag { background: color-mix(in srgb, var(--violet) 7%, transparent); }
.pick label span { flex: 1; }
.pick input { width: 18px; height: 18px; accent-color: var(--teal); }
.toasts { position: fixed; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 99; display: grid; gap: 8px; pointer-events: none; width: min(420px, 92vw); }
.toast { padding: 10px 14px; border-radius: 16px; background: var(--glass2); backdrop-filter: blur(16px); border: 1px solid var(--line2); color: var(--ice); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); animation: toast-in .4s var(--spring); pointer-events: auto; display: flex; gap: 10px; align-items: center; cursor: pointer; }
@keyframes toast-in { from { transform: translateY(-18px) scale(.94); opacity: 0; } }
.toast.bad { border-color: rgba(255, 59, 79, .6); }
.toast .tx { flex: 1; min-width: 0; } .toast .tx small { display: block; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meet { border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin: 8px; background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 7%, transparent), color-mix(in srgb, var(--teal) 3%, transparent)); display: grid; gap: 8px; animation: pop .3s var(--ease) both; transition: transform .2s var(--ease), box-shadow .2s; }
.meet:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.meet.live { border-color: rgba(34, 212, 126, .5); box-shadow: 0 0 0 1px rgba(34, 212, 126, .15), 0 10px 30px rgba(34, 212, 126, .08); }
.meet .t { display: flex; align-items: center; gap: 8px; } .meet .t b { flex: 1; color: var(--ice); font-size: 16px; }
.code { font: 600 14px var(--ft); letter-spacing: 1.5px; direction: ltr; color: var(--cyan); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 12px; background: rgba(34, 212, 126, .15); color: var(--green); }
.pill.dim { background: rgba(127, 166, 191, .14); color: var(--dim); }
.pill.hd { background: var(--grad); color: #03131f; font: 700 11px var(--ft); letter-spacing: 1px; }
.pill svg.i { width: 13px; height: 13px; }
.big-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 4px 14px 12px; }
.big-acts button { display: grid; gap: 6px; justify-items: center; padding: 16px 10px; border-radius: 18px; border: 1px solid var(--line2); background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 14%, transparent), color-mix(in srgb, var(--teal) 6%, transparent)); color: var(--ice); font-weight: 600; transition: transform .2s var(--spring), box-shadow .2s; }
.big-acts button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--cyan) 18%, transparent); }
.big-acts button svg.i { width: 28px; height: 28px; color: var(--teal); }
.lvl { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; } .lvl i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .08s; border-radius: 4px; }
.viewer { position: fixed; inset: 0; z-index: 95; background: rgba(0, 0, 0, .92); display: grid; place-items: center; animation: fade .2s; }
.viewer img { max-width: 96vw; max-height: 90vh; border-radius: 8px; animation: zoom-in .3s var(--spring); }
.ctx { position: fixed; z-index: 96; background: var(--glass2); backdrop-filter: blur(18px); border: 1px solid var(--line2); border-radius: 14px; padding: 5px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); min-width: 190px; animation: zoom-in .18s var(--ease); transform-origin: top; }
.ctx button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-align: start; color: var(--ice); }
.ctx button:hover { background: color-mix(in srgb, var(--cyan) 12%, transparent); } .ctx button.bad { color: #ff8a98; }

/* ── the incoming ring: over everything, can't be missed ── */
.ring, .ring.out { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 14px; padding: calc(22px + var(--safe-t)) 20px calc(30px + var(--safe-b));
  background: #01070e; text-align: center; overflow: hidden; opacity: 0; transition: opacity .3s; }
.ring.in { opacity: 1; } .ring.out { opacity: 0; pointer-events: none; transition: opacity .25s; }
.ring-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.ring-bg i { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.ring-bg i:nth-child(1) { background: var(--cyan); top: -30vmax; left: -20vmax; }
.ring-bg i:nth-child(2) { background: var(--violet); bottom: -35vmax; right: -25vmax; animation-delay: -5s; opacity: .4; }
.ring-bg i:nth-child(3) { background: var(--teal); top: 30%; left: 40%; width: 40vmax; height: 40vmax; animation-delay: -9s; opacity: .25; }
.ring-bg b { position: absolute; inset: 0; background: radial-gradient(circle at 50% 38%, transparent, rgba(1, 7, 14, .7) 70%); }
.ring.is-video .ring-bg i:nth-child(1) { background: var(--teal); }
.ring.is-meet .ring-bg i:nth-child(2) { background: var(--amber); }
@keyframes drift { to { transform: translate(8vmax, 6vmax) scale(1.15); } }
.ring-top { width: 100%; max-width: 520px; display: flex; justify-content: space-between; align-items: center; color: rgba(234, 246, 255, .75); font-size: 13px; animation: rise-in .5s var(--ease) .1s both; }
.ring-top .brand { display: inline-flex; align-items: center; gap: 6px; font: 600 14px var(--ft); letter-spacing: 1px; } .ring-top .brand svg.i { color: var(--teal); }
.ring-left { font-variant-numeric: tabular-nums; direction: ltr; opacity: .7; }
.ring-who { display: grid; justify-items: center; gap: 8px; margin-top: 4vh; }
.ring .waves { position: relative; display: grid; place-items: center; margin-bottom: 18px; animation: zoom-in .6s var(--spring); }
.ring .waves .av { box-shadow: 0 0 0 6px rgba(255, 255, 255, .08), 0 20px 60px rgba(0, 0, 0, .5); animation: float 3s ease-in-out infinite; }
.ring .waves i { position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--teal) 60%, transparent); animation: wave 3s ease-out infinite; }
.ring .waves i:nth-child(2) { animation-delay: .75s; } .ring .waves i:nth-child(3) { animation-delay: 1.5s; } .ring .waves i:nth-child(4) { animation-delay: 2.25s; border-color: color-mix(in srgb, var(--cyan) 50%, transparent); }
@keyframes wave { from { transform: scale(1); opacity: .9; } to { transform: scale(2.3); opacity: 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.ring h2 { margin: 6px 0 0; font-size: clamp(26px, 6vw, 36px); color: #fff; letter-spacing: -.3px; animation: rise-in .5s var(--ease) .15s both; text-shadow: 0 2px 20px rgba(0, 0, 0, .4); }
.ring .sub { color: rgba(234, 246, 255, .75); font-size: 14px; animation: rise-in .5s var(--ease) .2s both; }
.ring .k { color: rgba(234, 246, 255, .85); display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .08); backdrop-filter: blur(8px); animation: rise-in .5s var(--ease) .25s both; }
.ring .acts { display: flex; gap: clamp(34px, 12vw, 70px); margin-top: auto; animation: rise-in .55s var(--spring) .3s both; }
.ring .act { display: grid; justify-items: center; gap: 10px; color: rgba(234, 246, 255, .85); font-size: 14px; }
.cbtn { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); transition: transform .2s var(--spring); }
.cbtn:hover { transform: scale(1.08); } .cbtn:active { transform: scale(.88); }
.cbtn svg.i { width: 32px; height: 32px; }
.cbtn.sm { width: 64px; height: 64px; } .cbtn.sm svg.i { width: 26px; height: 26px; }
.cbtn.ok { background: linear-gradient(135deg, #2ee58f, #12b866); }
.cbtn.ok::before, .cbtn.vid::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; color: #2ee58f; animation: ring-pulse 1.6s ease-out infinite; }
.cbtn.vid::before { color: var(--cyan); }
.cbtn.ok svg.i, .cbtn.vid svg.i { animation: jig 1.6s infinite; }
@keyframes ring-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.cbtn.no { background: linear-gradient(135deg, #ff5a6b, #e0213a); } .cbtn.no svg.i { transform: rotate(0); }
.cbtn.vid { background: var(--grad); color: #03131f; }
@keyframes jig { 0%, 100% { transform: rotate(0); } 8%, 24% { transform: rotate(-14deg); } 16%, 32% { transform: rotate(14deg); } 40% { transform: rotate(0); } }
.ring .quick { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; animation: rise-in .5s var(--ease) .4s both; }
.ring .quick button { padding: 7px 14px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); backdrop-filter: blur(8px); font-size: 13px; color: rgba(234, 246, 255, .9); transition: background .15s; }
.ring .quick button:hover { background: rgba(255, 255, 255, .15); }
.ring .k .dots { margin-inline-start: 2px; }

/* ── the call ── */
.call { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #01070e; opacity: 0; transform: scale(1.02); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.call.in { opacity: 1; transform: none; }
.call-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.call-bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: .22; animation: drift 18s ease-in-out infinite alternate; }
.call-bg i:nth-child(1) { background: var(--cyan); top: -25vmax; left: -15vmax; }
.call-bg i:nth-child(2) { background: var(--violet); bottom: -30vmax; right: -20vmax; animation-delay: -6s; opacity: .16; }
.call-bg i:nth-child(3) { background: var(--teal); top: 40%; left: 50%; width: 30vmax; height: 30vmax; animation-delay: -11s; opacity: .1; }
.call.hide { display: none; }
.call-top { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 16px; padding-top: calc(12px + var(--safe-t)); z-index: 3; transition: opacity .35s, transform .35s var(--ease); }
.call-top .tx { flex: 1; min-width: 0; } .call-top .tx b { display: block; color: var(--ice); font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-top .tx small { color: var(--dim); direction: ltr; unicode-bidi: plaintext; font-variant-numeric: tabular-nums; }
.call-top .ib.glass { border-radius: 14px; color: var(--ice); }
.badges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rec-b { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: rgba(255, 59, 79, .18); color: #ff8a98; font-size: 12px; font-weight: 600; }
.rec-b i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: bl 1s infinite; }
.net-b { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.net-b i { width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .2); }
.net-b i:nth-child(1) { height: 4px; } .net-b i:nth-child(2) { height: 7px; } .net-b i:nth-child(3) { height: 10px; } .net-b i:nth-child(4) { height: 13px; }
.net-b.q4 i { background: var(--green); } .net-b.q3 i:nth-child(-n+3) { background: var(--teal); } .net-b.q2 i:nth-child(-n+2) { background: var(--amber); } .net-b.q1 i:nth-child(1) { background: var(--red); }
.stage { position: relative; z-index: 1; flex: 1; min-height: 0; padding: 8px 12px; display: grid; gap: 10px; align-content: center; }
.stage.grid { grid-auto-rows: minmax(0, 1fr); align-content: stretch; }
.stage.grid .tile { aspect-ratio: auto; }
.stage.speaker { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; align-content: stretch; }
.strip { display: flex; gap: 8px; overflow-x: auto; height: 118px; scrollbar-width: none; justify-content: center; }
.strip .tile { width: 168px; flex: none; height: 100%; aspect-ratio: auto; }
.tile { position: relative; border-radius: 20px; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--bg3) 90%, transparent), color-mix(in srgb, var(--bg1) 90%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cyan) 14%, transparent), 0 10px 30px rgba(0, 0, 0, .3); min-height: 0; aspect-ratio: 16 / 10; transition: box-shadow .25s, transform .3s var(--ease); }
.tile.pop { animation: tile-in .45s var(--spring); }
@keyframes tile-in { from { transform: scale(.85); opacity: 0; } }
.stage.speaker > .tile, .stage.one > .tile { aspect-ratio: auto; height: 100%; }
.stage > .tile.self { height: auto; aspect-ratio: 3 / 4; }
.stage.one { grid-template-rows: minmax(0, 1fr); align-content: stretch; }
.stage.one > .tile.big { height: 100%; width: 100%; }
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; transition: opacity .3s; }
.tile:not(.vid) video { opacity: 0; }
.tile.screen-t video, .tile.big.screen-t video { object-fit: contain; background: #000; }
.tile.mirror video { transform: scaleX(-1); }
.tile .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.tile .ph .av.lg { width: min(120px, 38%); height: auto; aspect-ratio: 1; font-size: clamp(22px, 4vw, 44px); }
.tile.vid .ph { display: none; }
.tile .nm { position: absolute; bottom: 8px; inset-inline-start: 8px; display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: rgba(1, 7, 14, .6); backdrop-filter: blur(8px); font-size: 12.5px; color: var(--ice); max-width: 80%; }
.tile .nm .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .nm svg.i { width: 15px; height: 15px; color: #ff8a98; }
.tile .nm .mi:empty, .tile .nm .nq:empty { display: none; }
.tile .tmenu { position: absolute; top: 8px; inset-inline-start: 8px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(1, 7, 14, .55); color: var(--ice); opacity: 0; transition: opacity .2s; }
.tile:hover .tmenu, .tile:focus-within .tmenu { opacity: 1; }
@media (pointer: coarse) { .tile .tmenu { opacity: .8; } }
.tile .hand { position: absolute; top: 8px; inset-inline-end: 8px; font-size: 24px; animation: jig 1.4s infinite; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 0 var(--teal); transition: box-shadow .18s; }
.tile.talk::after { box-shadow: inset 0 0 0 3px var(--teal), inset 0 0 40px color-mix(in srgb, var(--teal) 25%, transparent); }
.tile.talk .ph .av { animation: talk-glow 1s ease-in-out infinite alternate; }
@keyframes talk-glow { from { box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 35%, transparent); } to { box-shadow: 0 0 0 12px color-mix(in srgb, var(--teal) 8%, transparent), 0 0 40px color-mix(in srgb, var(--teal) 30%, transparent); } }
.tile .q { position: absolute; top: 8px; inset-inline-end: 8px; padding: 2px 8px; border-radius: 8px; background: rgba(255, 176, 32, .2); color: var(--amber); font-size: 11.5px; }
.tile .react { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; pointer-events: none; animation: rise 2.4s var(--ease) forwards; z-index: 2; }
@keyframes rise { from { transform: translate(var(--x, 0), 20px) scale(.4); opacity: 0; } 20% { opacity: 1; transform: translate(var(--x, 0), 0) scale(1.2); } to { transform: translate(var(--x, 0), -80px) scale(1); opacity: 0; } }
.floater { position: absolute; bottom: 110px; z-index: 7; font-size: 34px; pointer-events: none; animation: float-up 3.4s var(--ease) forwards; }
@keyframes float-up { from { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: 1; transform: translateY(-20px) scale(1.15); } to { transform: translateY(-60vh) scale(1) rotate(12deg); opacity: 0; } }
.self { position: absolute; width: 160px; aspect-ratio: 3 / 4; bottom: 120px; inset-inline-end: 16px; z-index: 4; border-radius: 18px; cursor: grab; box-shadow: 0 14px 34px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .16); touch-action: none; }
.tile.agent-t { background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--violet) 26%, transparent), transparent 65%), linear-gradient(135deg, #0b1630, #060c1c); }
.tile.agent-t.thinking .aorb i { animation-duration: 1.1s; }

/* an agent's orb (in a tile, in the voice view) */
.aorb { --h: 260; position: relative; width: min(130px, 42%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; isolation: isolate; color: #fff; }
.aorb::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 32% 30%, hsl(var(--h) 95% 78%), hsl(calc(var(--h) + 40) 85% 50%) 45%, hsl(calc(var(--h) + 90) 80% 26%) 80%); box-shadow: 0 0 40px hsl(var(--h) 90% 55% / .45); animation: orb-breathe 4s ease-in-out infinite; }
.aorb i { position: absolute; inset: -10%; border-radius: 50%; border: 2px solid hsl(var(--h) 95% 75% / .5); animation: orb-spin 6s linear infinite; z-index: -1; border-top-color: transparent; border-left-color: transparent; }
.aorb i:nth-child(2) { inset: -20%; animation-duration: 9s; animation-direction: reverse; opacity: .6; border-color: hsl(calc(var(--h) + 60) 95% 70% / .4); border-bottom-color: transparent; }
.aorb i:nth-child(3) { inset: -32%; animation-duration: 14s; opacity: .3; border-style: dashed; }
.aorb b { position: relative; font-size: clamp(20px, 3.6vw, 40px); font-weight: 700; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.aorb small { position: absolute; bottom: -28px; white-space: nowrap; font-size: 11px; color: hsl(var(--h) 90% 82%); letter-spacing: .3px; }
.talk .aorb::before, .orb.talk .aorb::before { animation: orb-talk .5s ease-in-out infinite alternate; }
@keyframes orb-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes orb-talk { from { transform: scale(1); filter: brightness(1); } to { transform: scale(1.12); filter: brightness(1.25); } }
@keyframes orb-spin { to { transform: rotate(360deg); } }

.voice1 { position: relative; display: grid; justify-items: center; gap: 10px; align-self: center; text-align: center; animation: rise-in .5s var(--ease); }
.voice1 .orb { position: relative; display: grid; place-items: center; }
.voice1 .orb > i { position: absolute; inset: -14px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--cyan) 35%, transparent); animation: wave 3.2s ease-out infinite; }
.voice1 .orb > i + i { animation-delay: 1.6s; }
.voice1 .orb .aorb { width: 170px; }
.voice1 .orb .av { box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.voice1 h2 { margin: 14px 0 0; color: var(--ice); font-size: clamp(24px, 5vw, 32px); } .voice1 small { color: var(--dim); font-size: 15px; direction: ltr; font-variant-numeric: tabular-nums; }
.voice1.agentv h2 { background: linear-gradient(90deg, #fff, hsl(270 90% 85%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stage .waiting { margin: auto; text-align: center; display: grid; justify-items: center; gap: 12px; color: var(--dim); animation: rise-in .4s var(--ease); }
.hourglass { width: 90px; height: 90px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); }
.hourglass svg.i { width: 44px; height: 44px; animation: spin 4s linear infinite; }
.pager { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; }
.pager button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }

/* the dock (the controls) */
.dock { position: relative; z-index: 6; display: flex; justify-content: center; align-items: center; gap: 14px; padding: 12px 12px calc(16px + var(--safe-b)); flex-wrap: wrap; transition: opacity .35s, transform .35s var(--ease); animation: rise-in .5s var(--spring) .1s both; }
.dock .grp { display: flex; gap: 8px; padding: 6px; border-radius: 99px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 14px 34px rgba(0, 0, 0, .35); }
.call.idle .dock { opacity: 0; transform: translateY(30px); pointer-events: none; }
.call.idle .call-top { opacity: 0; transform: translateY(-20px); pointer-events: none; }
.call.idle .caps { bottom: 24px; }
.cb { position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--ice); background: rgba(255, 255, 255, .09); transition: background .2s, transform .22s var(--spring), color .2s; }
.cb:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }
.cb:active { transform: scale(.88); }
.cb.off { background: #fff; color: #0a1520; } .cb.on { background: var(--grad); color: #03131f; }
.cb.mic-on::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid transparent; }
.cb.hang { width: 70px; background: linear-gradient(135deg, #ff5a6b, #e0213a); border-radius: 28px; color: #fff; box-shadow: 0 8px 22px rgba(255, 59, 79, .35); } .cb.hang:hover { background: linear-gradient(135deg, #ff7280, #f02c45); }
.cb .badge { top: -3px; inset-inline-end: -3px; }
.cb svg.i { width: 23px; height: 23px; }
.cb .tip { position: absolute; bottom: 64px; white-space: nowrap; background: var(--bg3); border: 1px solid var(--line2); padding: 3px 10px; border-radius: 8px; font-size: 12px; opacity: 0; pointer-events: none; transition: .15s; transform: translateY(4px); }
.cb:hover .tip { opacity: 1; transform: none; }

/* the side (people · chat · polls · notes) */
.call > .side { position: absolute; top: calc(66px + var(--safe-t)); bottom: calc(100px + var(--safe-b)); inset-inline-end: 12px; width: min(380px, calc(100% - 24px)); z-index: 8; border-radius: 22px; display: flex; flex-direction: column; animation: side-in .35s var(--spring); overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.call > .side.out { animation: side-out .18s ease-in forwards; }
@keyframes side-in { from { transform: translateX(-30px) scale(.97); opacity: 0; } }
@keyframes side-out { to { transform: translateX(-24px); opacity: 0; } }
.side-tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); }
.side-tabs button:not(.ib) { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: var(--dim); font-size: 11.5px; transition: .2s; }
.side-tabs button:not(.ib).on { color: var(--ice); background: color-mix(in srgb, var(--cyan) 16%, transparent); }
.side-tabs svg.i { width: 18px; height: 18px; }
.side-b { flex: 1; overflow-y: auto; padding: 10px; display: grid; gap: 6px; align-content: start; }
.call > .side .it { animation: none; padding: 8px; }
.call > .side .it.waiting { background: color-mix(in srgb, var(--amber) 9%, transparent); }
.call > .side .it.ringing .tx small { color: var(--teal); }
.call > .side .it .av.ag { font-size: 18px; width: 34px; height: 34px; background: radial-gradient(circle at 30% 30%, hsl(var(--h) 90% 72%), hsl(calc(var(--h) + 60) 80% 32%)); }
.call > .side .msgs { padding: 12px; background: none; }
.call > .side .comp { padding: 10px; flex-wrap: wrap; }
.call > .side .comp .to { width: 100%; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg0) 70%, transparent); font-size: 12.5px; }
.hand-r { display: flex; gap: 10px; align-items: center; padding: 4px 0; } .hand-r b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: #2a1a00; font-size: 12px; }
.codebox { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--bg0) 60%, transparent); } .codebox .code { flex: 1; font-size: 17px; }
.poll { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 6px; animation: pop .3s var(--ease); }
.poll h4 { margin: 0; color: var(--ice); font-size: 15px; } .poll > small { color: var(--dim); font-size: 12px; }
.poll .opt { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; text-align: start; transition: border-color .2s; }
.poll .opt .bar { position: absolute; inset-block: 0; inset-inline-start: 0; background: color-mix(in srgb, var(--cyan) 18%, transparent); transition: width .6s var(--ease); z-index: 0; }
.poll .opt .l, .poll .opt .p { position: relative; z-index: 1; } .poll .opt .p { color: var(--dim); font-variant-numeric: tabular-nums; }
.poll .opt.mine { border-color: var(--teal); } .poll .opt.mine .bar { background: color-mix(in srgb, var(--teal) 26%, transparent); }
.poll.closed { opacity: .75; }
.note { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--cyan) 6%, transparent); border-inline-start: 3px solid var(--cyan); animation: pop .3s var(--ease); }
.note.decision { border-color: var(--green); background: rgba(34, 212, 126, .07); } .note.task { border-color: var(--amber); background: rgba(255, 176, 32, .07); }
.note small { display: block; color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.minutes .mtext { font-size: 13.5px; line-height: 1.7; max-height: 320px; overflow-y: auto; color: var(--text); margin-bottom: 8px; }
.reacts { position: absolute; bottom: 104px; left: 50%; transform: translateX(-50%); z-index: 9; display: flex; gap: 2px; padding: 6px; border-radius: 99px; animation: reacts-in .3s var(--spring); max-width: calc(100% - 20px); overflow-x: auto; scrollbar-width: none; }
@keyframes reacts-in { from { transform: translate(-50%, 16px) scale(.9); opacity: 0; } }
.reacts button { flex: none; font-size: 26px; width: 46px; height: 46px; border-radius: 50%; transition: transform .2s var(--spring), background .15s; } .reacts button:hover { background: rgba(255, 255, 255, .1); transform: scale(1.25) translateY(-4px); }
.pip-call { position: fixed; z-index: 65; bottom: calc(16px + var(--safe-b)); inset-inline-start: 16px; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 16px; border-radius: 99px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 60%, #062033), #0a3b5c); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); cursor: pointer; animation: pop .3s var(--spring); }
.pip-call .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 212, 126, .6); animation: pulse-g 1.6s infinite; }
@keyframes pulse-g { to { box-shadow: 0 0 0 10px rgba(34, 212, 126, 0); } }
.pip-call b { color: #fff; } .pip-call small { color: #bfe9ff; direction: ltr; font-variant-numeric: tabular-nums; } .pip-call .tx { display: grid; line-height: 1.2; }
.pip-call .cb { width: 40px; height: 40px; } .pip-call .cb.hang { width: 48px; }
.net { position: absolute; top: calc(66px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 9; padding: 6px 14px; border-radius: 99px; background: rgba(255, 176, 32, .2); backdrop-filter: blur(10px); color: var(--amber); font-size: 13px; animation: toast-in .35s var(--spring); }

/* live captions */
.caps { position: absolute; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translateX(-50%); z-index: 7; width: min(760px, calc(100% - 24px)); display: grid; gap: 4px; pointer-events: none; transition: bottom .35s var(--ease); }
.caps .cl { justify-self: center; max-width: 100%; padding: 6px 14px; border-radius: 12px; background: rgba(0, 0, 0, .68); color: #fff; font-size: 16px; line-height: 1.5; animation: pop .2s; text-align: center; }
.caps .cl b { color: var(--teal); font-weight: 600; margin-inline-end: 6px; }

/* the whiteboard */
.wb { position: absolute; inset: calc(66px + var(--safe-t)) 12px calc(100px + var(--safe-b)); z-index: 7; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; animation: zoom-in .3s var(--spring); background: rgba(6, 18, 30, .92); }
.wb canvas { flex: 1; width: 100%; touch-action: none; cursor: crosshair; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 22px 22px; }
.wb-bar { display: flex; gap: 6px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sw-c { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .3); transition: transform .2s var(--spring); }
.sw-c.on { transform: scale(1.2); box-shadow: 0 0 0 2px #fff; }

/* the lobby before a meeting */
.lobby { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px; background: radial-gradient(900px 600px at 30% 20%, color-mix(in srgb, var(--cyan) 18%, transparent), transparent 70%), rgba(1, 6, 12, .92); animation: fade .25s; }
.lobby.out { animation: fade .2s reverse forwards; }
.lb-card { width: min(940px, 100%); display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; padding: 18px; border-radius: 26px; animation: sheet-in .4s var(--spring); }
.lb-prev { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; background: #000; }
.lb-prev video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.lb-prev video.mirror { transform: scaleX(-1); }
.lb-prev.vid video { opacity: 1; } .lb-prev.vid .lb-ph { display: none; }
.lb-ph { position: absolute; inset: 0; display: grid; place-items: center; }
.lb-ctl { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.lb-prev .lvl { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; border-radius: 0; background: transparent; }
.lb-side { display: grid; gap: 10px; align-content: center; }
.lb-side .kick { color: var(--teal); font-weight: 600; }
.lb-side h2 { margin: 0; color: var(--ice); font-size: 26px; } .lb-side p { margin: 0; color: var(--dim); }
.lb-acts { display: flex; gap: 10px; margin-top: 8px; }
.lb-acts .btn.big { flex: 1; }

/* inside Zero web / Masar, minimised: the frame is only the pill */
body.pill .pip-call { inset: 4px; } body.pill .toasts, body.pill .call { display: none; }

/* ── narrow screens: one pane at a time, a bottom bar ── */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { grid-row: 2; flex-direction: row; justify-content: space-around; padding: 4px 6px calc(4px + var(--safe-b)); border: 0; border-top: 1px solid var(--line); }
  .rail .me, .rail .sp, .rail .logo, .rail button .tip { display: none; }
  .rail button { width: 58px; height: 50px; }
  .rail button.on::before { inset-inline-start: auto; top: -5px; width: 24px; height: 3px; }
  .list { grid-row: 1; border: 0; }
  .main { grid-row: 1; grid-column: 1; }
  .app.chat-open .list { display: none; }
  .app:not(.chat-open) .main { display: none; }
  .app.chat-open .rail { display: none; }
  .ch-h .back { display: grid; }
  .msgs { padding: 12px 10px; }
  .m { max-width: 86%; }
  .self { width: 108px; bottom: 130px; inset-inline-end: 10px; }
  .dock { gap: 8px; padding-bottom: calc(12px + var(--safe-b)); }
  .dock .grp { gap: 4px; padding: 4px; }
  .cb { width: 46px; height: 46px; } .cb.hang { width: 60px; } .cb svg.i { width: 21px; height: 21px; }
  .cb .tip { display: none; }
  .stage { padding: 6px; gap: 6px; }
  .tile { border-radius: 16px; }
  .strip { height: 96px; } .strip .tile { width: 128px; }
  .call > .side { inset: auto 0 0 0; top: 18%; width: 100%; border-radius: 24px 24px 0 0; animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
  .wb { inset: calc(60px + var(--safe-t)) 6px calc(90px + var(--safe-b)); }
  .lb-card { grid-template-columns: 1fr; padding: 14px; }
  .caps .cl { font-size: 14.5px; }
  .call-top .badges .pill.code { display: none; }
}
@media (max-width: 420px) {
  .dock .grp:nth-child(2) { order: 3; width: 100%; justify-content: center; }
  .dock { row-gap: 8px; }
}

/* the phone's own call screen hosts the page: only the call shows */
body.native-call { background: #01070e; }
body.native-call .app { display: none; }
body.native-call .toasts { top: calc(70px + var(--safe-t)); }

/* the self view: moved by the GPU under the finger, it glides into a corner */
.tile.self { will-change: transform; touch-action: none; user-select: none; -webkit-user-select: none; animation: none; }
.tile.self * { touch-action: none; pointer-events: none; }
.tile.self .tmenu { pointer-events: auto; }
.tile.self.drag { box-shadow: 0 26px 60px rgba(0, 0, 0, .65), inset 0 0 0 2px var(--teal); cursor: grabbing; }
/* the speaker forced by a camera */
.cb.on.lock { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
/* the voice view shows the time under the name: not twice */
.call:has(.stage .voice1) .call-top .tx small { visibility: hidden; }

/* what the agent is doing (one-to-one: under its orb · meeting: on its tile) */
.ag-status { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
  color: var(--ice); font-size: 14.5px; max-width: min(520px, 92vw); backdrop-filter: blur(10px); animation: pop .3s var(--spring); }
.ag-status .ags-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-status.s-think .ags-i, .ag-status.s-wait .ags-i { animation: breathe 1.2s ease-in-out infinite; }
.ag-status.s-tool { border-color: color-mix(in srgb, var(--amber) 55%, transparent); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.ag-status.s-tool::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--amber); border-top-color: transparent; animation: spin .8s linear infinite; flex: none; }
.ag-status.s-speak { border-color: color-mix(in srgb, var(--teal) 55%, transparent); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.ag-status.s-hear { border-color: color-mix(in srgb, var(--cyan) 55%, transparent); }
.ag-sub { margin-top: 12px; max-width: min(620px, 92vw); min-height: 1.6em; color: rgba(234, 246, 255, .92); font-size: 17px; line-height: 1.7; text-align: center; opacity: 0; transition: opacity .3s; }
.ag-sub.on { opacity: 1; }
.ag-tst { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; padding: 4px 12px; border-radius: 99px; background: rgba(1, 7, 14, .7); font-size: 12.5px;
  color: var(--ice); max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; }
.ag-tst.s-tool { color: var(--amber); }
/* «ترجمة فورية بكونكت» (suite_trans_lib.php, connect_call.js Tl) — only used when the feature is on */
.caps .cl .tx { unicode-bidi: isolate; }
.caps .cl.int { opacity: .62; font-size: .92em; }
.caps .cl .tl-orig { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: rgba(255, 255, 255, .62); unicode-bidi: isolate; }
.caps .cl .tl-wait { font-style: normal; opacity: .6; }

/* ══ the call screen v3 (2026-12-02) — every picture whole and as big as the space allows, a calmer frame ══
   · .tile .mv = the picture, .tile .bk = the same picture blurred behind it (fitTile: a far-off shape is shown whole)
   · the grid: flex boxes sized by gridFit (--tw / --th), the last row centred
   · speaking: a moving light around the box + level bars in the name; wide screens: the speaker view's strip on the side */
.call { background: radial-gradient(120% 90% at 50% 0%, #06192b 0%, #020a13 55%, #01050a 100%); }
.call-bg i { opacity: .14; }
.call-top { gap: 8px; padding: 10px 14px; padding-top: calc(10px + var(--safe-t)); }
.call-top .tx { flex: 0 1 auto; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 12px; border-radius: 99px; background: rgba(4, 16, 28, .55); border: 1px solid rgba(255, 255, 255, .07); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); min-width: 0; }
.call-top .tx::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(34, 212, 126, .55); animation: pulse-g 1.8s infinite; }
.call-top .tx b { font-size: 15px; font-weight: 600; }
.call-top .tx small { flex: none; font-size: 13px; padding-inline-start: 10px; border-inline-start: 1px solid rgba(255, 255, 255, .12); }
.call-top .badges { flex: 1; }
.call-top .ib.glass { width: 40px; height: 40px; border-radius: 13px; background: rgba(4, 16, 28, .55); border-color: rgba(255, 255, 255, .08); }

.stage { padding: 6px 14px 4px; gap: 10px; }
.stage.grid { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 10px; }
.stage.grid > .tile { flex: none; width: var(--tw, 320px); height: var(--th, 180px); aspect-ratio: auto; }
.stage.grid > .pager { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); z-index: 3; padding: 4px 8px; border-radius: 99px; background: rgba(4, 16, 28, .7); }

.tile { border-radius: 22px; background: radial-gradient(120% 120% at 50% 0%, #0e2a42, #061321 70%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 12px 34px rgba(0, 0, 0, .35); isolation: isolate; }
.tile video.mv { position: relative; z-index: 1; }
.tile video.bk { display: none; }
.tile.fitc video.mv { object-fit: contain; background: transparent; }
.tile.fitc video.bk { display: block; position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; z-index: 0; filter: blur(26px) brightness(.5) saturate(1.25); pointer-events: none; }
.tile.fitc.screen-t video.mv { background: #000; }
.tile .ph { z-index: 1; }
.tile .ph .av.lg { box-shadow: 0 0 0 6px rgba(255, 255, 255, .04), 0 18px 40px rgba(0, 0, 0, .45); }
.tile .nm { z-index: 3; bottom: 10px; inset-inline-start: 10px; padding: 4px 12px 4px 10px; background: rgba(2, 10, 18, .62); border: 1px solid rgba(255, 255, 255, .08); font-size: 13px; font-weight: 500; }
.tile .nm .mi { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 59, 79, .9); }
.tile .nm .mi svg.i { width: 12px; height: 12px; color: #fff; stroke-width: 2.4; }
.tile .nm .lv { display: none; align-items: flex-end; gap: 2px; height: 12px; }
.tile .nm .lv i { width: 3px; height: 100%; border-radius: 2px; background: var(--teal); transform-origin: bottom; animation: lv-b .9s ease-in-out infinite; }
.tile .nm .lv i:nth-child(2) { animation-delay: -.3s; } .tile .nm .lv i:nth-child(3) { animation-delay: -.6s; }
@keyframes lv-b { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.tile.talk .nm .lv { display: inline-flex; }
.tile.talk:has(.mi svg) .nm .lv { display: none; }
.tile .tmenu, .tile .hand, .tile .q, .tile .react { z-index: 3; }
/* speaking: a light that runs around the box */
.tile::after { z-index: 4; }
.tile.talk::after { box-shadow: inset 0 0 0 2px var(--teal), inset 0 0 36px color-mix(in srgb, var(--teal) 22%, transparent), 0 0 0 1px color-mix(in srgb, var(--teal) 40%, transparent); animation: talk-ring 1.6s ease-in-out infinite; }
@keyframes talk-ring { 50% { box-shadow: inset 0 0 0 3px var(--cyan), inset 0 0 44px color-mix(in srgb, var(--cyan) 26%, transparent), 0 0 18px color-mix(in srgb, var(--cyan) 35%, transparent); } }
/* still connecting: the whole box says so */
.tile .q { inset: 0; top: 0; display: grid; place-items: end center; padding: 0 0 46px; border-radius: inherit; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .06) 50%, transparent 80%) 0 0 / 220% 100%, rgba(2, 10, 18, .35); color: var(--amber); font-size: 12.5px; animation: q-sh 1.6s linear infinite; }
@keyframes q-sh { to { background-position: -220% 0, 0 0; } }

/* the small self view */
.self, .stage > .tile.self { width: clamp(104px, 15vw, 196px); border-radius: 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(255, 255, 255, .16); }
.tile.self .nm { bottom: 6px; inset-inline-start: 6px; padding: 2px 8px; font-size: 11.5px; }
.tile.self .nm .lv { display: none !important; }
.call:has(.stage .voice1) .call-top .tx small { display: none; }
.stage.one > .tile.big { border-radius: 24px; }

/* the speaker view: on a wide screen the others stand on the side, the speaker gets the whole height */
.strip { gap: 10px; padding: 2px; }
.strip .tile { border-radius: 16px; }
@media (min-width: 1000px) and (min-aspect-ratio: 4 / 3) {
  .stage.speaker { grid-template-columns: minmax(0, 1fr) clamp(180px, 17vw, 260px); grid-template-rows: minmax(0, 1fr); }
  .stage.speaker .strip { flex-direction: column; height: auto; min-height: 0; overflow-x: hidden; overflow-y: auto; justify-content: safe center; }
  .stage.speaker .strip .tile { width: 100%; height: auto; aspect-ratio: 16 / 10; }
}

/* the controls: one floating bar */
.dock { gap: 10px; padding: 10px 12px calc(14px + var(--safe-b)); }
.dock .grp { gap: 6px; padding: 6px; background: rgba(4, 16, 28, .66); border-color: rgba(255, 255, 255, .07); }
.cb { background: rgba(255, 255, 255, .07); }
.cb:hover { background: rgba(255, 255, 255, .15); }
.cb.off { background: rgba(255, 59, 79, .16); color: #ff8a98; box-shadow: inset 0 0 0 1px rgba(255, 59, 79, .4); }
.cb.hang { width: 72px; }
.cb .tip { background: rgba(4, 16, 28, .92); }

@media (max-width: 860px) {
  .call-top .tx { flex: 1 1 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 5px 14px 5px 12px; border-radius: 16px; line-height: 1.25; }
  .call-top .tx::before { grid-row: 1 / 3; }
  .call-top .tx b { font-size: 14px; }
  .call-top .tx small { grid-column: 2; padding: 0; border: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .call-top .badges { flex: none; }
  .stage { padding: 4px 6px; gap: 6px; }
  .stage.grid { gap: 6px; }
  .tile { border-radius: 18px; }
  .stage.one > .tile.big { border-radius: 20px; }
  .tile .nm { bottom: 8px; inset-inline-start: 8px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .tile.talk::after, .tile .nm .lv i, .tile .q, .call-top .tx::before { animation: none; } }
