
*{box-sizing:border-box} html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none} body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#101513;color:#eef3ef;-webkit-tap-highlight-color:transparent;font-size:14px}button,input{font:inherit}button{cursor:pointer;color:inherit;border:0;background:none;touch-action:manipulation}button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button:disabled{opacity:.35;cursor:default}button, input, .panel, .stage, .shell{min-width:0} [hidden]{display:none!important}svg{display:block;width:22px;height:22px;flex:none;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round} .shell{--bg:#101513;--surface:#1a211e;--raised:#242d28;--line:#ffffff16;--muted:#a4b1a9;--fg:#eef3ef;--accent:#9be2b5;--accentfg:#13291c;--danger:#e85b61;--shadow:0 12px 36px #0004;position:fixed;top:var(--view-top,0px);left:0;width:100%;height:100vh;height:100dvh;height:var(--view-h,100dvh);display:grid;grid-template-rows:auto minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);gap:12px;padding:12px max(16px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));padding-top:max(12px,env(safe-area-inset-top));background:var(--bg);color:var(--fg);overflow:hidden;isolation:isolate}.shell[data-theme=light]{--bg:#edf1ee;--surface:#fff;--raised:#e5ebe6;--line:#253d2920;--muted:#52665a;--fg:#17271e;--accent:#176c41;--accentfg:#fff;--shadow:0 12px 36px #182b1b16}.top{min-width:0;display:flex;align-items:center;gap:12px;min-height:44px}.brand{display:flex;align-items:center;gap:9px;white-space:nowrap;font-weight:750;font-size:21px;letter-spacing:-1px}.mark{width:32px;height:32px;border-radius:11px;display:grid;place-items:center;background:var(--accent);color:var(--accentfg)}.mark svg{width:20px;height:20px}.demo{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);white-space:nowrap}.top-actions{display:flex;gap:6px;margin-left:auto;align-items:center}.icon-btn{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;flex:none;position:relative}.icon-btn:hover,.icon-btn[aria-pressed=true]{background:var(--raised)}.icon-btn[aria-pressed=true]{color:var(--accent)}.icon-btn .dot{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--accent);top:8px;right:8px}.workspace{display:flex;position:relative;gap:12px;min-height:0;min-width:0;overflow:hidden;border-radius:24px}.stage{position:relative;flex:1;display:grid;place-items:center;overflow:hidden;min-height:0;border-radius:24px;background:radial-gradient(ellipse at 75% 20%,#385c48 0%,transparent 56%),radial-gradient(ellipse at 12% 92%,#354a48 0%,transparent 60%),linear-gradient(145deg,#26372f,#142620 70%);color:#f1f6f1;container-type:size;isolation:isolate}.stage::before{content:"";position:absolute;inset:0;background:linear-gradient(125deg,#ffffff07,transparent 48%,#00000020);pointer-events:none}.stage.audio,.stage.ready{background:radial-gradient(ellipse at 52% 35%,#344c41,#182923 68%)}.stage-top{position:absolute;z-index:2;top:clamp(10px,3cqh,24px);left:clamp(10px,3cqw,24px);right:clamp(10px,3cqw,24px);display:flex;align-items:center;justify-content:space-between;gap:8px;pointer-events:none}.stage-top>*{pointer-events:auto}.status{display:flex;align-items:center;gap:7px;border:1px solid #ffffff22;padding:8px 12px;border-radius:99px;background:#12231e90;color:#e6f3ea;font-size:12px;white-space:nowrap}.status i{width:7px;height:7px;background:#a3efb7;border-radius:50%;flex:none}.status i.wait{background:#ffd088}.stage-btn{background:#12231e99;color:white;border:1px solid #ffffff24}.stage-btn:hover{background:#345246}.identity{z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(4px,2cqh,16px);max-width:88%;text-align:center;position:relative}.avatar{display:grid;place-items:center;flex:none;border-radius:50%;color:#f5faf5;font-weight:500;letter-spacing:-.045em;background:linear-gradient(140deg,#c1b49a,#65785e);box-shadow:inset 0 0 0 1px #ffffff32;overflow:hidden}.avatar.remote{width:clamp(42px, min(29cqh,24cqw),184px);aspect-ratio:1;font-size:clamp(20px,min(11cqh,9cqw),72px);box-shadow:0 0 0 10px #ffffff08,0 15px 60px #0002}.identity h1{margin:0;font-weight:600;font-size:clamp(18px,min(6cqh,5cqw),46px);letter-spacing:-.045em;line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.identity p{margin:0;color:#d0e0d4;font-size:clamp(11px,2.8cqh,15px);line-height:1.3}.ready-actions{display:flex;gap:8px;justify-content:center;margin-top:4px}.pill{min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:99px;padding:0 15px;font-weight:600;background:var(--accent);color:var(--accentfg);white-space:nowrap}.pill.secondary{background:#ffffff19;color:white;border:1px solid #ffffff24}.pill svg{width:18px;height:18px}.self{position:absolute;z-index:3;right:clamp(10px,3cqw,24px);bottom:clamp(10px,3cqh,24px);width:clamp(60px,min(25cqw,25cqh),158px);aspect-ratio:3/4;max-height:42%;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,#697a83,#354c56);border:1px solid #ffffff39;box-shadow:0 10px 30px #0005;overflow:hidden;cursor:pointer;transition:transform .18s}.self:hover{transform:translateY(-2px)}.self .avatar{width:48%;aspect-ratio:1;font-size:clamp(13px,4cqh,28px);background:#94a9ad}.self small{position:absolute;bottom:7px;left:8px;font-size:10px;color:white}.self.off{background:#1c302b}.self.off .avatar{display:none}.self-off-icon{display:none}.self.off .self-off-icon{display:block}.stage-note{position:absolute;bottom:clamp(10px,3cqh,24px);left:clamp(10px,3cqw,24px);color:#c6d7cc;font-size:11px;max-width:50%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls{min-width:0;display:flex;align-items:center;justify-content:center;gap:clamp(6px,1.5vw,18px);min-height:58px;position:relative}.control{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;width:68px;flex:0 1 68px;font-size:10px;color:var(--muted);white-space:nowrap}.control .circle{width:48px;height:48px;display:grid;place-items:center;background:var(--raised);color:var(--fg);border:1px solid var(--line);border-radius:50%;transition:background .15s,transform .15s}.control:hover .circle{transform:translateY(-2px)}.control[aria-pressed=true] .circle{background:var(--accent);color:var(--accentfg)}.control.end .circle{background:var(--danger);color:#fff;width:62px;border-radius:28px}.control.end{color:var(--fg)}.control.end svg{transform:rotate(135deg)}.control .label{line-height:1.1}.panel{width:clamp(285px,29vw,360px);flex:none;min-height:0;background:var(--surface);border:1px solid var(--line);border-radius:24px;display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;z-index:5;animation:appear .18s ease-out}.panel-head{display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid var(--line);min-height:56px}.panel-head h2{font-size:17px;margin:0;font-weight:650;letter-spacing:-.035em;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.panel-head .icon-btn{width:36px;height:36px}.panel-body{display:flex;flex-direction:column;min-height:0;overflow:hidden}.panel-content{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;padding:12px}.eyebrow{text-transform:uppercase;font-size:10px;letter-spacing:.1em;color:var(--muted);margin:9px 0 12px}.person{width:100%;display:flex;align-items:center;text-align:left;gap:10px;padding:10px 8px;border-radius:13px}.person:hover,.person.selected{background:var(--raised)}.person .avatar{width:40px;height:40px;font-size:17px}.person .person-text{flex:1;min-width:0}.person strong,.person small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.person strong{font-size:14px}.person small{font-size:11px;color:var(--muted);margin-top:3px}.person svg{width:17px;height:17px;color:var(--muted)}.person.selected svg{color:var(--accent)}.panel-foot{padding:10px 12px;border-top:1px solid var(--line);display:flex;gap:8px;align-items:center}.panel-foot .pill{flex:1;font-size:12px;padding:0 9px}.panel-foot .pill.alt{color:var(--fg);background:var(--raised)}.hint{color:var(--muted);font-size:12px;line-height:1.5;margin:8px 2px}.messages{display:flex;flex-direction:column;gap:9px;justify-content:flex-start}.bubble{align-self:flex-start;max-width:88%;overflow-wrap:anywhere;background:var(--raised);color:var(--fg);border-radius:15px 15px 15px 4px;padding:10px 12px;font-size:14px;line-height:1.35}.bubble.me{align-self:flex-end;background:var(--accent);color:var(--accentfg);border-radius:15px 15px 4px 15px}.chat-form{display:flex;width:100%;min-width:0;gap:8px;align-items:center}.chat-form input{min-width:0;width:100%;font-size:16px;color:var(--fg);background:var(--raised);border:1px solid var(--line);border-radius:22px;padding:10px 12px;outline-offset:0}.send{background:var(--accent);color:var(--accentfg);border-radius:50%;width:42px;height:42px}.setting{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:50px;border-bottom:1px solid var(--line);padding:8px 1px}.setting span{min-width:0;overflow-wrap:anywhere}.seg{display:flex;background:var(--raised);border-radius:10px;padding:3px;gap:3px;flex:none}.seg button{font-size:11px;padding:7px 8px;border-radius:7px;color:var(--muted)}.seg button[aria-pressed=true]{background:var(--surface);color:var(--fg);box-shadow:0 1px 4px #0002}.full-btn{width:100%;min-height:44px;background:var(--raised);border-radius:12px;text-align:left;padding:10px 12px;margin:5px 0;display:flex;gap:10px;align-items:center}.full-btn svg{width:18px;height:18px;color:var(--accent)}.debug{font-family:ui-monospace,monospace;font-size:10px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}.toast{position:absolute;z-index:10;bottom:8px;left:50%;transform:translateX(-50%);max-width:calc(100% - 20px);padding:10px 15px;background:#11271e;color:#e5f3e9;border:1px solid #ffffff28;box-shadow:var(--shadow);border-radius:99px;font-size:12px;text-align:center;pointer-events:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.incoming{position:absolute;inset:0;z-index:12;background:#102019d9;display:grid;place-items:center;padding:12px;overflow:hidden;backdrop-filter:blur(12px)}.incoming-card{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;max-width:100%;max-height:100%}.incoming-card .avatar{width:clamp(38px,16cqh,90px);aspect-ratio:1;font-size:28px}.incoming-card h2{margin:0;font-size:clamp(18px,5cqh,30px)}.incoming-card p{margin:0;color:#c2d3c8;font-size:12px}.incoming-actions{display:flex;gap:12px}.incoming-actions .decline{background:#d64c56;color:white}.compact-note{display:none}.overlay-shade{display:none}@keyframes appear{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:none}}
@media(max-width:899px){.shell{gap:8px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}.workspace{border-radius:20px;gap:0}.stage{border-radius:20px}.panel{position:absolute;right:0;top:0;bottom:0;width:min(100%,390px);border-radius:20px;box-shadow:var(--shadow)}.overlay-shade{display:block;position:absolute;inset:0;z-index:4;background:#0006;border-radius:20px}.panel-head{padding:8px 10px}.demo{display:none}.brand{font-size:20px}.control{flex-basis:60px;width:60px}.controls{gap:clamp(3px,2vw,10px)}.stage-note{font-size:10px}.self{border-radius:12px}}
@media(max-width:400px){.top{gap:6px}.top-actions{gap:2px}.brand{gap:6px}.mark{width:28px;height:28px}.icon-btn{width:42px;height:42px}.control{font-size:9px}.control .circle{width:44px;height:44px}.control.end .circle{width:52px}.panel-content{padding:8px}.ready-actions .pill{padding:0 10px;font-size:12px}.stage-note{max-width:47%}}
@media(max-width:340px){.brand{font-size:17px}.top-actions .icon-btn{width:38px}.controls{gap:1px}.control .circle{width:42px;height:42px}.control.end .circle{width:46px}.control .label{font-size:9px}.self{width:60px}.stage-note{display:none}.status{padding:6px 9px}.ready-actions .pill{padding:0 9px}.panel-head{min-height:48px}}
@media(max-height:480px){.shell{gap:5px;padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(4px,env(safe-area-inset-bottom))}.top{min-height:40px}.top .icon-btn{width:40px;height:40px}.brand{font-size:17px}.mark{width:27px;height:27px}.controls{min-height:44px;gap:8px}.control{flex-basis:56px;width:56px;gap:0}.control .circle{width:42px;height:42px}.control.end .circle{width:56px}.control .label{display:none}.stage-top{top:6px;left:8px;right:8px}.stage-top .icon-btn{width:34px;height:34px}.status{padding:5px 9px;font-size:10px}.stage-note{display:none}.self{bottom:7px;right:7px;max-height:48%;border-radius:10px}.self small{font-size:9px;bottom:3px;left:5px}.identity{gap:5px}.identity h1{font-size:clamp(17px,6cqh,30px)}.identity p{font-size:11px}.ready-actions{margin-top:0}.ready-actions .pill{min-height:38px;font-size:11px}.panel-head{min-height:44px;padding:3px 8px}.panel-head h2{font-size:15px}.panel-content{padding:7px}.panel-foot{padding:5px 8px}.panel-foot .pill{min-height:38px}.chat-form input{padding:6px 10px}.send{width:38px;height:38px}.incoming-card{gap:5px}.incoming-actions .pill{min-height:38px}.demo{display:none}}
@media(max-height:320px){.identity .remote{width:clamp(30px,24cqh,64px);font-size:22px}.identity p{display:none}.stage.ready .identity .remote{display:none}.stage.ready .identity{gap:8px}.stage-top .status{font-size:9px}.stage-top .icon-btn{width:30px;height:30px}.self{width:55px}.self small{display:none}.top .icon-btn{height:36px;width:36px}.top{min-height:36px}.control .circle{height:38px;width:38px}.control.end .circle{width:48px}.controls{min-height:38px}.panel-head{min-height:38px}.panel-head .icon-btn{width:30px;height:30px}.panel-foot{padding:3px 6px}.panel-foot .pill{min-height:34px}.incoming-card .avatar{display:none}}
@media(max-width:899px) and (max-height:420px) and (min-width:580px){.panel{width: min(48%,360px)}.workspace:has(.panel:not([hidden])) .stage{margin-right: min(48%,360px)}.overlay-shade{display:none!important}}
@media(max-width:340px) and (max-height:480px){.controls{gap:2px}.control{flex-basis:48px;width:48px;padding:0}.control.end .circle{width:44px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Near v2 — a restrained, system-inspired visual language. Layout contracts retained. */
body{background:#08090b;color:#f5f5f7}
.shell{--bg:#0c0d10;--surface:#1c1c1e;--raised:#2c2c2e;--line:rgba(255,255,255,.095);--muted:#a1a1a8;--fg:#f5f5f7;--accent:#34c759;--accentfg:#092a12;--danger:#ff453a;--shadow:0 18px 48px #0006;--blue:#0a84ff;--bubble:#0b72df;--glass:rgba(35,36,40,.65);background:radial-gradient(ellipse at 50% -30%,#26272d 0%,transparent 60%),var(--bg);font-size:14px;letter-spacing:-.012em;transition:background .22s,color .22s}
.shell[data-theme=light]{--bg:#f2f2f7;--surface:#ffffff;--raised:#e9e9ee;--line:rgba(60,60,67,.13);--muted:#63636a;--fg:#1c1c1e;--accent:#248a3d;--accentfg:#fff;--danger:#d92d27;--shadow:0 18px 48px #25252b18;--blue:#0066d6;--bubble:#0067d8;--glass:rgba(255,255,255,.72);background:radial-gradient(ellipse at 50% -30%,#fff 0%,transparent 70%),var(--bg)}
.top{gap:12px}.brand{font-size:23px;font-weight:680;letter-spacing:-1.2px;gap:9px}.mark{background:linear-gradient(155deg,#63e57c,#20b84a);color:#fff;border-radius:10px;box-shadow:inset 0 1px 1px #ffffff60,0 3px 10px #28c65325}.mark svg{stroke-width:1.9;width:21px;height:21px}.demo{text-transform:none;letter-spacing:0;font-size:12px;font-weight:450;color:var(--muted)}
.top-actions{gap:4px;padding:3px;border-radius:99px;background:var(--glass);border:1px solid var(--line);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.top-actions .icon-btn{border-radius:50%;width:38px;height:38px;color:var(--muted)}.top-actions .icon-btn:hover{color:var(--fg)}.top-actions .icon-btn[aria-pressed=true]{background:var(--raised);color:var(--fg);box-shadow:inset 0 0 0 1px var(--line)}
.workspace{border-radius:26px}.stage{border-radius:26px;background:radial-gradient(ellipse at 76% 8%,#536773 0%,transparent 49%),radial-gradient(ellipse at 12% 87%,#494252 0%,transparent 61%),linear-gradient(145deg,#2d3843,#151923 75%);box-shadow:inset 0 0 0 1px #ffffff10;color:#fff;transition:background .25s}.stage:before{background:linear-gradient(180deg,#00000028,transparent 26%,transparent 70%,#00000035)}.stage.audio,.stage.ready{background:radial-gradient(ellipse at 50% 25%,#455360 0%,#262b37 49%,#171a22 100%)}
.status{background:rgba(22,23,29,.46);border:1px solid #ffffff20;box-shadow:0 2px 8px #00000012;color:#fff;font-variant-numeric:tabular-nums;font-weight:500;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.status i{background:#48d866;box-shadow:0 0 8px #48d8664f}.status i.wait{background:#a1a1aa;box-shadow:none}.stage-btn{border-radius:50%;background:#1c1c1e65;border:1px solid #ffffff24;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.stage-btn:hover{background:#ffffff30}
.avatar.remote{box-shadow:0 0 0 1px #ffffff38,0 0 0 9px #ffffff0b,0 18px 60px #0003;font-weight:420}.identity h1{font-weight:650;letter-spacing:-.05em}.identity p{color:#e3e3eb;font-weight:400}.self{background:linear-gradient(150deg,#7b8b9b,#39485b);border:1px solid #ffffff44;border-radius:18px;box-shadow:0 8px 26px #0006}.self .avatar{background:linear-gradient(145deg,#d4dce3,#889bad);color:#fff}.self small{font-weight:550;text-shadow:0 1px 4px #0009}.self.off{background:#24252b}.stage-note{color:#e0e0e8b0;font-size:10px;font-weight:450}
.pill{background:#34c759;color:#092a12;box-shadow:inset 0 1px 0 #ffffff2b;font-weight:650}.pill:hover{filter:brightness(1.07)}.pill.secondary{background:#ffffff24;border:1px solid #ffffff32;color:white;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.panel-foot .pill:not(.alt){background:var(--accent);color:var(--accentfg)}
.controls{justify-self:center;width:max-content;max-width:100%;gap:clamp(4px,1.1vw,14px);padding:6px 10px 7px;background:var(--glass);border:1px solid var(--line);border-radius:100px;box-shadow:0 5px 20px #00000012;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.control{width:60px;flex:0 1 60px;gap:4px;font-weight:500}.control .circle{background:var(--raised);color:var(--fg);border:1px solid var(--line);box-shadow:inset 0 1px 0 #ffffff0d}.control[aria-pressed=true] .circle{background:#f5f5f7;color:#1c1c1e}.shell[data-theme=light] .control[aria-pressed=true] .circle{background:#3a3a3c;color:#fff}.control.end .circle{background:var(--danger);border-color:transparent;color:#fff;box-shadow:0 4px 12px #ff453a25}.control.end svg{stroke-width:2;transform:rotate(135deg)}.control .label{font-size:10px;color:var(--muted)}.control.end .label{color:var(--fg)}
.panel{border-radius:26px;background:var(--surface);box-shadow:inset 0 1px 0 #ffffff06}.panel-head{padding:10px 13px}.panel-head h2{font-size:19px;font-weight:700;letter-spacing:-.035em}.panel-head .icon-btn{background:var(--raised);border-radius:50%;color:var(--muted);width:30px;height:30px}.panel-head .icon-btn svg{width:16px;height:16px;stroke-width:2.2}.eyebrow{font-size:11px;font-weight:600;letter-spacing:.03em;text-transform:none}.person{border-radius:14px}.person.selected{background:var(--raised)}.person.selected svg{color:var(--accent)}.person .avatar{box-shadow:inset 0 0 0 1px #ffffff25}.person strong{font-weight:600}.person small{font-size:12px}.panel-foot{background:var(--surface)}.bubble{border-radius:18px 18px 18px 5px;padding:9px 13px}.bubble.me{background:var(--bubble);color:white;border-radius:18px 18px 5px 18px}.chat-form input{background:transparent;border:1px solid var(--line);border-radius:100px}.chat-form input::placeholder{color:var(--muted)}.send{background:var(--blue);color:white}.seg{border-radius:9px;gap:1px;padding:2px}.seg button{font-weight:550;border-radius:7px}.seg button[aria-pressed=true]{box-shadow:0 1px 4px #0003,inset 0 0 0 1px var(--line)}.full-btn{font-weight:500;border-radius:12px}.full-btn svg{color:var(--blue)}.toast{background:#1c1c1edb;color:#fff;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.incoming{background:#15151bdc;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.incoming-card p{color:#e5e5ea}.incoming-actions .decline{background:var(--danger);color:#fff}.overlay-shade{background:#0004;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
@media(max-width:899px){.workspace,.stage,.panel{border-radius:22px}.top-actions{padding:2px;gap:2px}.controls{padding:5px 8px;gap:clamp(2px,1.8vw,12px)}.control{width:58px;flex-basis:58px}.self{border-radius:14px}}
@media(max-width:400px){.brand{font-size:20px;gap:6px}.top-actions .icon-btn{width:36px;height:36px}.controls{gap:3px;padding:4px 6px}.control{width:54px;flex-basis:54px}.control .label{font-size:9px}.control .circle{width:44px;height:44px}.control.end .circle{width:52px}}
@media(max-width:340px){.brand{font-size:18px}.top-actions .icon-btn{width:34px;height:34px}.controls{gap:1px;padding:3px 4px}.control{width:46px;flex-basis:46px;padding:0}.control .circle{width:40px;height:40px}.control.end .circle{width:44px}}
@media(max-height:480px){.controls{padding:3px 7px;gap:6px;min-height:0}.control{width:52px;flex-basis:52px}.control .circle{width:40px;height:40px}.control.end .circle{width:52px}.top-actions .icon-btn{width:34px;height:34px}.brand{font-size:18px}.panel-head{padding:3px 8px}.panel-head h2{font-size:16px}.self{border-radius:10px}}
@media(max-height:320px){.controls{padding:2px 5px;gap:3px}.control .circle{width:36px;height:36px}.control.end .circle{width:46px}.control{width:48px;flex-basis:48px}.top-actions .icon-btn{width:32px;height:32px}}
@media(max-width:340px) and (max-height:480px){.controls{gap:1px;padding:2px 3px}.control{width:44px;flex-basis:44px}.control.end .circle{width:42px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}


/* V3: calm home, immersive call, progressive disclosure */
.shell{--bg:#0b0b0f;--surface:#1c1c20;--raised:#2a2a30;--fg:#f5f5f7;--muted:#b1b1ba;--line:#ffffff14;--glass:#26262cbf;--accent:#30d158;--accentfg:#08270f;--danger:#ff453a;--blue:#0a84ff;--bubble:#0868cc;--shadow:0 20px 65px #0007;background:var(--bg);gap:10px;padding:10px max(14px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));padding-top:max(10px,env(safe-area-inset-top))}
.shell[data-theme=light]{--bg:#f5f5f7;--surface:#fff;--raised:#eeeef2;--fg:#1d1d1f;--muted:#66666d;--line:#3c3c431b;--glass:#ffffffe0;--accent:#248a3d;--accentfg:#fff;--blue:#0066d6;--bubble:#0067d8;--danger:#e43630;background:var(--bg)}
.brand{font-size:24px;font-weight:680;letter-spacing:-1.5px}.brand .mark{width:30px;height:30px;border-radius:10px;box-shadow:none}.demo{font-size:12px}.top-actions{background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}.top-actions .icon-btn{background:var(--raised);color:var(--fg);width:40px;height:40px}.top-actions .icon-btn[aria-pressed=true]{background:var(--fg);color:var(--bg)}.shell:not(.is-ready) .top-actions [data-panel=chat],.shell:not(.is-ready) .top-actions [data-panel=settings]{display:none}
.stage{background:radial-gradient(ellipse at 58% 18%,#596478 0%,transparent 53%),radial-gradient(ellipse at 5% 100%,#655468 0%,transparent 56%),linear-gradient(145deg,#313947,#171a25 78%);box-shadow:inset 0 0 0 1px #ffffff15}.stage.audio{background:radial-gradient(ellipse at 50% 35%,#53586f 0%,#242735 60%,#171922)}.stage.ready{background:radial-gradient(ellipse at 50% 32%,#31343e,#1b1c23 65%,#15161b);color:#fff}.stage.ready:before{opacity:.35}.shell[data-theme=light] .stage.ready{background:radial-gradient(ellipse at 50% 28%,#fff,#e9e9f1 70%,#dedee7);color:#1d1d1f;box-shadow:inset 0 0 0 1px #00000008}.shell[data-theme=light] .stage.ready .identity p,.shell[data-theme=light] .stage.ready .intro{color:#66666d}.shell[data-theme=light] .stage.ready .pill.secondary{background:#fff;color:#1c1c1e;border-color:#00000012}.stage.ready .status,.stage.ready #focus,.stage.ready .stage-note{display:none}.intro{display:none;font-size:clamp(11px,2.5cqh,15px);font-weight:500;color:#c8c8d1;letter-spacing:-.01em}.stage.ready .intro{display:block}.stage.ready .identity{gap:clamp(5px,2cqh,18px)}.stage.ready .identity h1{font-size:clamp(24px,min(7cqh,9cqw),52px);font-weight:680}.stage.ready .avatar.remote{width:clamp(44px,min(21cqh,22cqw),120px);font-size:clamp(23px,7cqh,48px);box-shadow:0 0 0 7px #ffffff0e,0 12px 30px #0002}.ready-actions{gap:9px}.ready-actions .pill{min-height:48px;padding:0 18px;font-size:14px}.pill{background:#30d158;color:#08270f;box-shadow:none}.pill.secondary{background:#ffffff14;color:white}.quick-people{display:none;gap:8px;margin-top:clamp(2px,1.8cqh,14px);align-items:center;justify-content:center}.stage.ready .quick-people{display:flex}.quick-person{display:grid;justify-items:center;gap:4px;color:inherit;font-size:11px;min-width:54px;padding:5px 6px;border-radius:14px}.quick-person .avatar{width:clamp(30px,8cqh,42px);aspect-ratio:1;font-size:16px;box-shadow:0 0 0 2px transparent}.quick-person[aria-pressed=true] .avatar{box-shadow:0 0 0 2px #30d158,0 0 0 5px #30d15820}.quick-person[aria-pressed=true]{font-weight:650}.quick-person:hover{background:#ffffff12}.identity h1{font-weight:650}.stage:not(.ready) .identity .remote{box-shadow:0 0 0 1px #ffffff40,0 0 0 10px #ffffff0b,0 0 0 23px #ffffff05,0 24px 70px #0004}.stage-note{opacity:.7}.self{touch-action:none;cursor:grab;transition:left .23s,top .23s,right .23s,bottom .23s;user-select:none;-webkit-user-select:none}.self:hover{transform:none}.self.dragging{cursor:grabbing;transition:none}.self[data-x=left]{left:clamp(8px,3cqw,24px);right:auto}.self[data-y=top]{top:clamp(48px,12cqh,72px);bottom:auto}.self[data-x=right]{right:clamp(8px,3cqw,24px);left:auto}.self[data-y=bottom]{bottom:clamp(8px,3cqh,24px);top:auto}.self[data-x=left][data-y=bottom]~.stage-note{left:auto;right:12px;text-align:right}.self .avatar{pointer-events:none}.self small{pointer-events:none}.controls{gap:clamp(4px,1.3vw,13px);padding:6px 12px;background:var(--glass);border:1px solid var(--line);box-shadow:0 8px 30px #0002}.control .circle{border:0;box-shadow:none}.control{width:58px;flex-basis:58px}.control .label{font-size:10px}.control.end .circle{width:62px}.control[aria-pressed=true] .circle{background:#fff;color:#18181b}.control[data-panel][aria-pressed=true] .circle{background:#0a84ff;color:white}.control .circle{position:relative}.control.unread .circle:after{content:'';position:absolute;right:1px;top:1px;width:9px;height:9px;background:#0a84ff;border:2px solid #24242b;border-radius:50%}.panel{background:var(--surface);box-shadow:var(--shadow)}.panel-head{min-height:58px}.panel-head h2{font-size:20px}.quick-replies{display:flex;gap:6px;padding:5px 10px;overflow-x:auto;overscroll-behavior:contain;scrollbar-width:none;flex:none}.quick-replies button{flex:none;background:var(--raised);padding:7px 10px;border-radius:99px;font-size:12px;color:var(--blue)}.quick-replies::-webkit-scrollbar{display:none}.switch{width:44px;height:26px;border-radius:99px;background:var(--raised);border:1px solid var(--line);position:relative;flex:none}.switch:before{content:'';position:absolute;left:2px;top:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0003;transition:transform .18s}.switch[aria-checked=true]{background:#30d158;border-color:transparent}.switch[aria-checked=true]:before{transform:translateX(18px)}.inspector{margin-top:12px;font-size:12px;color:var(--muted);padding:10px 2px}.inspector summary{cursor:pointer}.reveal-hint{position:absolute;z-index:3;bottom:clamp(10px,3cqh,25px);left:50%;transform:translateX(-50%);font-size:11px;color:#fff;background:#15151b8c;padding:7px 11px;border-radius:99px;white-space:nowrap;pointer-events:none}.shell.is-ready{grid-template-rows:auto minmax(0,1fr)}
/* The stage takes the whole visual viewport; all chrome overlays it. */
.shell.immersive{padding:0;gap:0;grid-template-rows:minmax(0,1fr);background:#15161b}.immersive .top{display:none}.immersive .workspace,.immersive .stage{border-radius:0}.immersive .workspace{grid-row:1;grid-column:1}.immersive .stage-top{top:max(12px,env(safe-area-inset-top));left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));transition:opacity .24s,transform .24s}.immersive .controls{position:absolute;bottom:max(13px,env(safe-area-inset-bottom));left:50%;translate:-50% 0;transform:translateY(0);z-index:8;background:#22232ac4;color:white;border:1px solid #ffffff25;box-shadow:0 10px 32px #0005;transition:opacity .24s,transform .24s;max-width:calc(100% - 12px)}.immersive .control .circle{background:#ffffff20;color:white}.immersive .control[aria-pressed=true] .circle{background:#fff;color:#18181b}.immersive .control[data-panel][aria-pressed=true] .circle{background:#0a84ff;color:white}.immersive .control.end .circle{background:#ff453a;color:white}.immersive .control .label{color:#ebebf0}.immersive .self[data-y=bottom]{bottom:clamp(12px,3cqh,24px);margin-bottom:env(safe-area-inset-bottom);transition:bottom .24s}.immersive:not(.chrome-hidden) .self[data-y=bottom]{bottom:clamp(62px,11cqh,98px)}.immersive .self[data-y=top]{top:max(55px,calc(env(safe-area-inset-top) + 48px))}.immersive.chrome-hidden .self[data-y=top]{top:max(12px,env(safe-area-inset-top))}.immersive .stage-note{display:none}.immersive.chrome-hidden .stage-top{opacity:0;transform:translateY(-8px);pointer-events:none}.immersive.chrome-hidden .stage-top>*{pointer-events:none}.immersive.chrome-hidden .controls{opacity:0;transform:translateY(10px);pointer-events:none}.immersive .toast{bottom:clamp(65px,13cqh,105px)}.immersive.chrome-hidden .toast{bottom:12px}.immersive .panel{margin:10px 10px 88px 0;border-radius:22px}.immersive .panel-open .stage{margin-right:0}.immersive .incoming{z-index:13}.immersive.incoming-open .controls{visibility:hidden}.immersive .identity{pointer-events:none}.immersive .self{z-index:3}.immersive .overlay-shade{border-radius:0}.immersive .stage:focus-visible{outline-offset:-3px}
@media(max-width:899px){.shell{padding-left:max(9px,env(safe-area-inset-left));padding-right:max(9px,env(safe-area-inset-right))}.shell.immersive{padding:0}.immersive .panel{margin:0;top:max(7px,env(safe-area-inset-top));right:7px;bottom:calc(84px + env(safe-area-inset-bottom));width:min(calc(100% - 14px),390px)}.immersive .workspace:has(.panel:not([hidden])) .stage{margin-right:0}.immersive .overlay-shade{display:block!important}.immersive .overlay-shade[hidden]{display:none!important}.top-actions .icon-btn{width:40px;height:40px}}
@media(max-width:400px){.brand{font-size:21px}.top-actions .icon-btn{width:37px;height:37px}.controls{padding:4px 6px;gap:3px}.control{width:52px;flex-basis:52px}.control .circle{width:44px;height:44px}.control.end .circle{width:50px}.ready-actions .pill{min-height:44px;font-size:12px;padding:0 13px}.panel-head h2{font-size:17px}}
@media(max-width:340px){.controls{padding:3px 4px;gap:1px}.control{width:46px;flex-basis:46px}.control .circle{width:40px;height:40px}.control.end .circle{width:44px}.top-actions .icon-btn{width:34px;height:34px}.brand{font-size:19px}.quick-person{min-width:46px;padding:4px}.ready-actions .pill{padding:0 10px}}
@media(max-height:480px){.shell{gap:5px;padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(4px,env(safe-area-inset-bottom))}.shell.immersive{padding:0}.brand{font-size:18px}.top-actions .icon-btn{width:34px;height:34px}.controls{padding:3px 7px;gap:5px}.control{width:50px;flex-basis:50px}.control .circle{width:39px;height:39px}.control.end .circle{width:50px}.control .label{display:none}.stage.ready .identity{gap:5px}.stage.ready .avatar.remote{width:clamp(30px,17cqh,58px);font-size:24px}.ready-actions .pill{min-height:38px;font-size:12px;padding:0 12px}.quick-people{margin-top:0;gap:5px}.quick-person .avatar{width:25px;font-size:12px}.quick-person{font-size:10px;padding:2px 5px}.panel-head{min-height:42px}.panel-head h2{font-size:16px}.quick-replies{padding:3px 8px}.quick-replies button{padding:4px 8px;font-size:11px}.immersive .panel{bottom:calc(58px + env(safe-area-inset-bottom));margin-bottom:0}.immersive .controls{bottom:max(6px,env(safe-area-inset-bottom))}.immersive:not(.chrome-hidden) .self[data-y=bottom]{bottom:54px}.immersive .stage-top{top:max(6px,env(safe-area-inset-top))}.immersive .self[data-y=top]{top:44px}}
@media(max-height:320px){.stage.ready .identity .remote,.stage.ready .intro{display:none}.stage.ready .identity{gap:4px}.stage.ready .identity h1{font-size:24px}.stage.ready .identity p{display:block;font-size:11px}.quick-people{gap:3px}.controls{padding:2px 4px;gap:2px}.control{width:44px;flex-basis:44px}.control .circle{width:36px;height:36px}.control.end .circle{width:42px}.immersive .panel{bottom:51px}.immersive .self[data-y=top]{top:38px}.immersive:not(.chrome-hidden) .self[data-y=bottom]{bottom:48px}.reveal-hint{font-size:10px}.quick-replies{display:none}}
@media(max-width:340px) and (max-height:480px){.controls{gap:1px;padding:2px 3px}.control{width:43px;flex-basis:43px}.control.end .circle{width:42px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Stable centering across the immersive transition, including its first frame. */
.immersive .stage-btn[aria-pressed=true]{background:#20212ac4;color:#fff;border:1px solid #ffffff25}.immersive .stage-btn[aria-pressed=true]:hover{background:#ffffff30}.brand{gap:6px}.brand .mark{margin-right:2px}.brand span:last-child{margin-left:-6px}.immersive .controls{justify-self:auto}

/* v4: original Near connection mark and precision glass dock. */
.brand .mark{background:linear-gradient(155deg,#64e582 0%,#37ca65 48%,#25a64d 100%);box-shadow:inset 0 1px 1px #ffffff45,0 3px 9px #0002;color:#fff}
.brand .mark svg{width:23px;height:23px}
.shell .controls{--disc:44px;--slot:56px;--dock-gap:clamp(2px,1.4vw,10px);gap:var(--dock-gap);padding:9px 12px 8px;min-height:0;border-radius:999px;background:linear-gradient(160deg,#ffffff0c,transparent 70%),rgba(35,35,40,.86);border:1px solid #ffffff20;box-shadow:inset 0 1px 0 #ffffff0d,0 6px 24px #0003;-webkit-backdrop-filter:blur(24px) saturate(145%);backdrop-filter:blur(24px) saturate(145%);color:#fff}
.shell .control{width:var(--slot);flex:0 1 var(--slot);padding:0;gap:5px;font-weight:500;min-height:44px}
.shell .control .circle,.shell .control.end .circle{width:var(--disc);height:var(--disc);border-radius:50%;flex:none;background:linear-gradient(155deg,#ffffff13,#ffffff06);border:1px solid #ffffff0c;color:#fff;box-shadow:inset 0 1px 0 #ffffff08;transition:background .18s,transform .18s,color .18s}
.shell .control .circle svg{width:21px;height:21px;stroke-width:1.8}
.shell .control .label{color:#ededf0;font-size:10px;font-weight:500;line-height:1.2;letter-spacing:.005em}
.shell .control[aria-pressed=true] .circle{background:#f5f5f7;color:#1c1c1e;border-color:transparent}
.shell .control[data-panel][aria-pressed=true] .circle{background:#0a84ff;color:white;border-color:transparent}
.shell .control.end .circle{background:linear-gradient(145deg,#ff6257,#ff3b30 70%);color:#fff;border-color:#ffffff12;box-shadow:0 3px 10px #ff453a20}
.shell .control.end .circle svg{stroke-width:2;transform:none}
.shell .control:active .circle{transform:scale(.93)}
.shell[data-theme=light]:not(.immersive) .controls{background:linear-gradient(160deg,#ffffffb3,#f2f2f7c7);border-color:#0000000d;box-shadow:inset 0 1px 0 #fff,0 5px 20px #00000012}
.shell[data-theme=light]:not(.immersive) .control .circle{background:#e5e5ea;color:#252529;border-color:#00000006}
.shell[data-theme=light]:not(.immersive) .control .label{color:#48484a}
.shell[data-theme=light]:not(.immersive) .control[aria-pressed=true] .circle{background:#252529;color:white}
.shell[data-theme=light]:not(.immersive) .control[data-panel][aria-pressed=true] .circle{background:#007aff;color:white}
.shell[data-theme=light]:not(.immersive) .control.end .circle{background:linear-gradient(145deg,#ff6257,#ff3b30);color:white}
@media(max-width:400px){.shell .controls{--slot:52px;--disc:44px;--dock-gap:3px;padding:7px 9px 6px}}
@media(max-width:340px){.shell .controls{--slot:45px;--disc:40px;--dock-gap:1px;padding:6px 5px}.shell .control .label{font-size:9px}}
@media(max-height:480px){.shell .controls{--slot:48px;--disc:39px;--dock-gap:5px;padding:3px 7px}.shell .control{gap:0;min-height:44px}.shell .control .label{display:none}.immersive:not(.chrome-hidden) .self[data-y=bottom]{bottom:60px}}
@media(max-height:320px){.shell .controls{--slot:43px;--disc:36px;--dock-gap:2px;padding:2px 4px}.immersive:not(.chrome-hidden) .self[data-y=bottom]{bottom:58px}}
@media(max-width:340px) and (max-height:480px){.shell .controls{--slot:43px;--dock-gap:1px;padding:2px 3px}}
@media(prefers-reduced-motion:reduce){.shell .control .circle{transition:none}}


/* v5: spacing is a layout contract, not an accumulation of button margins. */
.shell{--dock-height:82px;--dock-edge:16px;--dock-clearance:12px}
.shell:not(.is-ready):not(.immersive){row-gap:14px;padding-bottom:calc(12px + env(safe-area-inset-bottom))}
.shell .controls{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:min(100%,384px);max-width:calc(100% - 16px);column-gap:10px;row-gap:0;padding:12px 16px 13px;--disc:44px;border-radius:30px;align-items:center;justify-items:stretch;box-shadow:inset 0 1px 0 #ffffff15,0 8px 26px #0004}
.shell .control{width:100%;min-width:0;min-height:44px;gap:7px;flex:none;padding:0;position:relative;border-radius:17px;touch-action:manipulation}
.shell .control .circle,.shell .control.end .circle{width:var(--disc);height:var(--disc);max-width:100%;aspect-ratio:1;border-radius:50%;transition:background .22s,color .22s,box-shadow .22s,transform .2s cubic-bezier(.2,.75,.25,1.2)}
.shell .control .label{font-size:11px;line-height:1.2;letter-spacing:0;white-space:nowrap;text-align:center;font-weight:500}
.shell .control .circle svg{width:21px;height:21px;overflow:visible;transform-origin:center}
.shell .control:hover .circle{transform:none}
@media(hover:hover) and (pointer:fine){.shell .control:hover .circle{box-shadow:inset 0 1px 0 #ffffff18,0 0 0 3px #ffffff0b}}
.shell .control:active .circle{transform:scale(.91)}
.shell .control:focus-visible{outline-offset:3px}
.shell .control[data-panel][aria-pressed=true] .circle{box-shadow:0 0 0 3px #0a84ff26}
.shell.immersive .controls{bottom:calc(var(--dock-edge) + env(safe-area-inset-bottom));max-width:calc(100% - max(24px,calc(env(safe-area-inset-left) + env(safe-area-inset-right) + 16px)))}
.shell.immersive:not(.chrome-hidden) .self[data-y=bottom]{bottom:calc(var(--dock-height) + var(--dock-edge) + var(--dock-clearance));margin-bottom:env(safe-area-inset-bottom)}
.shell.immersive .panel{margin-bottom:calc(var(--dock-height) + var(--dock-edge) + var(--dock-clearance) + env(safe-area-inset-bottom))}
.shell.immersive .toast{bottom:calc(var(--dock-height) + var(--dock-edge) + var(--dock-clearance) + env(safe-area-inset-bottom))}
.shell.immersive.chrome-hidden .toast{bottom:calc(12px + env(safe-area-inset-bottom))}
@media(max-width:899px){.shell.immersive .panel{margin-bottom:0;bottom:calc(var(--dock-height) + var(--dock-edge) + var(--dock-clearance) + env(safe-area-inset-bottom))}}
@media(max-width:400px){.shell .controls{column-gap:8px;padding:11px 13px 12px;max-width:calc(100% - 12px)}}
@media(max-width:340px){.shell .controls{--disc:38px;column-gap:4px;padding:9px 8px 10px;max-width:100%;border-radius:25px}.shell .control{gap:6px}.shell .control .label{font-size:10px}.shell .control .circle svg{width:19px;height:19px}}
@media(max-height:480px){.shell{--dock-edge:8px;--dock-clearance:8px}.shell:not(.is-ready):not(.immersive){row-gap:7px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}.shell .controls{width:min(100%,342px);padding:6px 12px;--disc:39px;column-gap:8px;border-radius:24px}.shell .control{gap:0}.shell .control .label{display:none}}
@media(max-height:320px){.shell{--dock-edge:6px;--dock-clearance:5px}.shell .controls{--disc:36px;padding:3px 8px;column-gap:5px}.shell:not(.is-ready):not(.immersive){row-gap:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}}
@media(max-width:340px) and (max-height:480px){.shell .controls{--disc:35px;padding-inline:6px;column-gap:3px}}
/* Stateful SVGs: the slash draws on, rather than swapping the entire icon. */
.control .state-slash{stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:stroke-dashoffset .22s cubic-bezier(.2,.7,.2,1),opacity .16s}
.control[aria-pressed=true] .state-slash{stroke-dashoffset:0;opacity:1}
.control .state-cut{stroke-opacity:0;transition:stroke-opacity .16s}
.control[aria-pressed=true] .state-cut{stroke-opacity:1}
.control.motion .circle{animation:dock-press .26s cubic-bezier(.2,.8,.2,1)}
.control.motion#mic .circle svg,.control.motion#camera .circle svg{animation:icon-settle .28s ease-out}
.control.motion#chatControl .circle svg{animation:chat-nudge .32s ease-out}
.control.motion#more svg circle{animation:dot-nudge .32s ease-out;transform-box:fill-box;transform-origin:center}
.control.motion#more svg circle:nth-child(2){animation-delay:35ms}.control.motion#more svg circle:nth-child(3){animation-delay:70ms}
.control.motion#end .circle svg{animation:hangup-nudge .16s ease-in-out}
@keyframes dock-press{0%{transform:scale(.92)}65%{transform:scale(1.035)}100%{transform:scale(1)}}
@keyframes icon-settle{0%{transform:scale(.86)}65%{transform:scale(1.08)}100%{transform:scale(1)}}
@keyframes chat-nudge{0%{transform:scale(.9) rotate(-6deg)}65%{transform:scale(1.08) rotate(3deg)}100%{transform:scale(1) rotate(0)}}
@keyframes dot-nudge{0%,100%{transform:translateY(0)}45%{transform:translateY(-2.5px)}}
@keyframes hangup-nudge{0%{transform:scale(1)}100%{transform:translateY(2px) scale(.88)}}
@media(prefers-reduced-motion:reduce){.shell .control,.shell .control *, .shell .controls{animation:none!important;transition:none!important}}


/* N5 production bindings: original v5 cascade above is retained. */
.shell .brand .accent{color:var(--accent)}.shell .identity h1{overflow-wrap:anywhere}.stage:not(.ready) .ready-actions{display:none}.stage.ready .ready-actions{display:flex}.stage.ready .quick-people{display:flex}.quick-person{max-width:120px;overflow:hidden}.quick-person span:last-child{overflow:hidden;text-overflow:ellipsis;max-width:100%}.stage:not(.ready) .identity h1{font-size:clamp(18px,min(6cqh,5cqw),46px)}
#remote-video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#15161b;z-index:0}.identity.video-visible{visibility:hidden}.self video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.self small{z-index:1}.self:not(.off) .self-off-icon{display:none}.self.off video{display:none}.self.off{cursor:default}.incoming-card{color:white}.shell.incoming-open .controls{visibility:hidden}.stage .incoming-actions .pill{min-width:90px}.stage.ready #retry-room{font-size:12px}.stage.ready #retry-room[hidden]{display:none}.stage.ready .pill svg{flex:none}.stage .ready-actions{flex-wrap:wrap}.panel .person{background:var(--raised)}.panel .person #contacts{overflow-wrap:anywhere}.panel .pill.secondary{background:var(--raised);color:var(--fg);border:1px solid var(--line)}.panel .pill{box-shadow:none}.panel .panel-foot .pill{flex:1}.panel .panel-content{overflow-wrap:anywhere}.counter{color:var(--muted);font-size:11px;padding:3px 12px 8px}.panel .hint{padding:0 12px}.panel textarea{font:inherit;font-size:16px;min-width:0;width:100%;color:var(--fg);background:var(--raised);border:1px solid var(--line);border-radius:22px;padding:10px 12px;resize:none}.panel textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.messages .bubble{white-space:pre-wrap}.messages .bubble.local{align-self:flex-end;background:var(--bubble);color:white;border-radius:18px 18px 5px 18px}.bubble p{margin:0}.bubble small{font-size:10px;opacity:.7}.panel pre{max-height:200px;overflow:auto;white-space:pre-wrap;font-size:11px}.panel form{margin:0}.panel .setting{font-size:13px}.panel .full-btn:disabled{opacity:.35}.shell .toast{white-space:normal;overflow-wrap:anywhere;max-width:85%}.shell:not(.immersive):not(.is-ready) .toast{bottom:calc(var(--dock-height,82px) + 20px)}.shell .control:disabled{opacity:.35}.shell .controls[hidden]{display:none!important}.shell .control.unread .circle:after{content:'';position:absolute;right:1px;top:1px;width:9px;height:9px;background:#0a84ff;border:2px solid #24242b;border-radius:50%}.shell .stage-top .status i.wait{background:#a1a1aa}.shell .brand .mark{flex:none}.shell .top-actions{margin-left:auto}.shell .stage .identity{max-width:92%}.shell .ready .identity{pointer-events:auto}.shell .stage-note{pointer-events:none}.shell .panel .icon-btn{flex:none}.shell.immersive .panel{margin-bottom:calc(var(--dock-height) + var(--dock-edge) + var(--dock-clearance) + env(safe-area-inset-bottom))}.shell .stage .self[data-y=bottom]{bottom:clamp(8px,3cqh,24px)}.shell.immersive:not(.chrome-hidden) .stage .self[data-y=bottom]{bottom:calc(var(--dock-height) + var(--dock-edge) + var(--dock-clearance));margin-bottom:env(safe-area-inset-bottom)}
@media(max-width:899px){.shell.immersive .panel{margin-bottom:0}.shell .ready-actions .pill{padding:0 10px;font-size:12px}}@media(max-height:480px){.shell .ready-actions .pill{min-height:38px}.shell .quick-people{margin-top:0}}@media(max-height:320px){.shell .stage.ready .identity .quick-people .avatar{display:grid}.shell .stage.ready .identity .quick-people{gap:3px}}
/* Login retains the same form contracts, with the Near palette and scroll safety. */
html:has(body.login),body.login{height:auto;min-height:100%;overflow:auto;overscroll-behavior:auto}body.login{--bg:#0b0b0f;--surface:#1c1c20;--raised:#2a2a30;--fg:#f5f5f7;--muted:#b1b1ba;--line:#ffffff14;--accent:#30d158;--accentfg:#08270f;min-height:100dvh;background:var(--bg);color:var(--fg);display:grid;place-items:center;color-scheme:dark}.login-shell{width:min(440px,100%);padding:24px}.login .brand{white-space:normal}.login .brand h1{font-size:24px;margin:0}.login .brand .muted{font-size:12px;letter-spacing:0;font-weight:400}.login .login-panel{width:100%;display:block;margin-top:30px;padding:24px;border-radius:24px;overflow:visible}.login-panel h2{margin:8px 0;font-size:28px}.login label{display:block;margin:12px 0}.login input:not([type=checkbox]){width:100%;font-size:16px;background:var(--raised);border:1px solid var(--line);padding:12px;border-radius:12px;color:var(--fg)}.login .wide{width:100%;min-height:44px;background:var(--accent);color:var(--accentfg);border-radius:12px;font-weight:650}.login .muted,.login footer,.login .kicker{color:var(--muted);font-size:12px}.login .error{color:#ff8a84}.login .error:empty{display:none}.login footer{margin-top:20px;text-align:center}.login #near-forget:not([hidden]){padding:12px}.login #near-forget button{min-height:44px;background:var(--raised);border-radius:12px;padding:10px}@media(prefers-color-scheme:light){body.login{--bg:#f5f5f7;--surface:#fff;--raised:#eeeef2;--fg:#1d1d1f;--muted:#66666d;--line:#3c3c431b;--accent:#248a3d;--accentfg:#fff;color-scheme:light}.login .error{color:#b91c1c}}
