/* Black River v10 — chat-only ground-up rebuild. School/dashboard styles are intentionally untouched. */
body:has(#content.chat-page){overflow:hidden!important}
#content.chat-page{--chat-accent:#8ab4ff}
body:has(#content.chat-page) .topbar,body:has(#content.chat-page) .site-footer{display:none!important}
body:has(#content.chat-page) .app-main{margin:0!important;width:100%!important;max-width:none!important}
#content.chat-page{padding:0!important;margin:0!important;max-width:none!important;width:100%!important;height:100dvh!important;overflow:hidden!important;background:#030304!important}
.chat-v10{position:relative;width:100%;height:100%;min-height:0;display:grid;grid-template-columns:84px minmax(0,1fr);background:radial-gradient(circle at 70% -20%,color-mix(in srgb,var(--chat-accent) 13%,transparent),transparent 36%),#030304;color:#f6f7fb;overflow:hidden;isolation:isolate}
.chat-v10 *{box-sizing:border-box}.chat-v10 button,.chat-v10 input,.chat-v10 textarea{font:inherit}.chat-v10 button{color:inherit}
.chat-v10-bg{position:absolute;inset:0;z-index:-2;overflow:hidden;pointer-events:none}.chat-v10-bg:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(3,3,4,.95),rgba(3,3,4,.46) 32%,rgba(3,3,4,.82));}
.ace-beams-live{position:relative;overflow:hidden}.ace-beams-svg{position:absolute;inset:0;width:100%;height:100%;opacity:.30;pointer-events:none}.ace-beams-svg path{fill:none}
.ace-collision-live{position:relative;overflow:hidden}.ace-collision-floor{position:absolute;z-index:0;left:0;right:0;bottom:0;height:1px;background:rgba(255,255,255,.035);pointer-events:none}.ace-collision-ray{position:absolute;z-index:0;left:var(--beam-x,10px);top:20px;width:1px;height:var(--beam-h,56px);border-radius:99px;background:linear-gradient(to top,#6366f1,#a855f7,transparent);filter:drop-shadow(0 0 8px rgba(99,102,241,.24));animation:ace-collide var(--beam-duration,8s) linear var(--beam-delay,0s) infinite;animation-delay:calc(var(--beam-delay,0s) * -1);pointer-events:none}@keyframes ace-collide{from{transform:translateY(-220px);opacity:0}8%{opacity:1}to{transform:translateY(1800px);opacity:.9}}.ace-collision-explosion{position:absolute;z-index:2;bottom:0;width:8px;height:8px;pointer-events:none}.ace-collision-explosion:before{content:"";position:absolute;left:-40px;top:0;width:80px;height:8px;border-radius:99px;background:linear-gradient(90deg,transparent,#6366f1,transparent);filter:blur(5px);animation:ace-burst-fade 1.5s ease-out forwards}.ace-collision-explosion>i{position:absolute;width:4px;height:4px;border-radius:50%;background:linear-gradient(#6366f1,#a855f7);animation:ace-burst var(--ed,1s) ease-out forwards}@keyframes ace-burst{to{transform:translate(var(--dx),var(--dy));opacity:0}}@keyframes ace-burst-fade{0%{opacity:0}12%{opacity:1}100%{opacity:0}}
.chat-v10-nav{position:relative;z-index:10;border-right:1px solid rgba(255,255,255,.075);background:rgba(6,6,8,.78);backdrop-filter:blur(24px);display:flex;flex-direction:column;align-items:center;gap:12px;padding:16px 10px max(16px,env(safe-area-inset-bottom));min-height:0}
.chat-v10-home,.chat-v10-round{width:48px;height:48px;border:1px solid rgba(255,255,255,.09);border-radius:18px;background:rgba(255,255,255,.035);display:grid;place-items:center;cursor:pointer;transition:.25s ease}.chat-v10-home:hover,.chat-v10-round:hover{background:rgba(255,255,255,.085);transform:translateY(-1px)}
.chat-v10-logo{width:30px;height:30px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(135deg,color-mix(in srgb,var(--chat-accent) 80%,white),var(--chat-accent));box-shadow:0 8px 30px color-mix(in srgb,var(--chat-accent) 22%,transparent);font-weight:900;font-size:13px;color:#050507}
.chat-v10-room-stack{display:flex;flex-direction:column;gap:9px;align-items:center;width:100%;overflow:auto;min-height:0;padding:3px 0;scrollbar-width:none}.chat-v10-room-stack::-webkit-scrollbar{display:none}
.chat-v10-room-stack .room-link,.chat-v10-room-stack .member-link{position:relative;width:48px!important;height:48px!important;min-height:48px!important;padding:0!important;border:1px solid rgba(255,255,255,.07)!important;border-radius:18px!important;background:rgba(255,255,255,.03)!important;display:grid!important;place-items:center!important;overflow:visible!important;transition:.22s ease!important}.chat-v10-room-stack .room-link>span:last-child,.chat-v10-room-stack .member-link>span{display:none!important}.chat-v10-room-stack .avatar{width:34px!important;height:34px!important;margin:0!important;border-radius:13px!important}.chat-v10-room-stack .member-link.active,.chat-v10-room-stack .room-link.active{border-color:color-mix(in srgb,var(--chat-accent) 60%,transparent)!important;background:color-mix(in srgb,var(--chat-accent) 11%,transparent)!important;box-shadow:0 0 0 1px color-mix(in srgb,var(--chat-accent) 18%,transparent),0 10px 26px rgba(0,0,0,.3)}.chat-v10-room-stack .member-link.unread:after{content:"";position:absolute;right:-3px;top:-3px;width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:0 0 0 3px #060608}.chat-v10-room-stack .online-dot{position:absolute!important;right:-2px!important;bottom:-2px!important;width:9px!important;height:9px!important;border:2px solid #070709!important}
.chat-v10-spacer{flex:1}.chat-v10-self{display:grid;gap:10px;place-items:center}.chat-v10-self #editProfile{border:0;background:transparent;padding:0;width:48px;height:48px;display:grid;place-items:center}.chat-v10-self #editProfile>span{display:none}.chat-v10-self #editProfile .avatar{width:38px;height:38px;border-radius:14px}.chat-v10-self #chatPreferences{width:42px;height:42px;border-radius:15px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.035)}
.chat-v10-main{min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;position:relative;overflow:hidden}
.chat-v10-header{position:relative;z-index:30;display:grid;grid-template-columns:minmax(180px,1fr) auto minmax(0,1fr);align-items:center;gap:14px;padding:14px 20px;border-bottom:1px solid rgba(255,255,255,.065);background:linear-gradient(180deg,rgba(8,8,11,.92),rgba(8,8,11,.66));backdrop-filter:blur(24px)}
.chat-v10-header:before{content:"";position:absolute;inset:0;background:radial-gradient(80% 120% at 50% -50%,color-mix(in srgb,var(--chat-accent) 15%,transparent),transparent 65%);pointer-events:none}
.chat-v10-identity{position:relative;display:flex;align-items:center;gap:11px;min-width:0}.chat-v10-identity #togglePeople{display:none}.chat-v10-identity #roomIdentity{display:flex;align-items:center;gap:10px;min-width:0}.chat-v10-identity #roomIdentity .avatar{width:42px;height:42px;border-radius:15px}.chat-v10-identity #roomIdentity>div{display:grid;gap:2px;min-width:0}.chat-v10-identity #roomIdentity strong{font-size:13px;color:var(--name-color,#fff);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-v10-identity #roomIdentity small{font-size:9px;color:#888b95;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-v10-status{justify-self:center;display:flex;align-items:center;gap:7px;padding:6px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.03);font-size:8px;color:#9ca0ab}.chat-v10-status:before{content:"";width:6px;height:6px;border-radius:50%;background:#63d89d;box-shadow:0 0 12px rgba(99,216,157,.6)}
.chat-v10-actions{justify-self:end;display:flex;align-items:flex-end;gap:5px;height:56px;padding:8px 9px;border:1px solid rgba(255,255,255,.08);border-radius:20px;background:rgba(15,15,18,.76);backdrop-filter:blur(22px);box-shadow:0 12px 38px rgba(0,0,0,.25)}
.chat-v10-actions>button{width:var(--ace-dock-size,40px);height:var(--ace-dock-size,40px);border-radius:14px;border:0;background:rgba(255,255,255,.045);display:grid;place-items:center;cursor:pointer;transition:width .12s,height .12s,background .15s,transform .15s;position:relative}.chat-v10-actions>button:hover{background:rgba(255,255,255,.1)}.chat-v10-actions svg{width:var(--ace-icon-size,18px);height:var(--ace-icon-size,18px);transition:width .12s,height .12s}.chat-v10-actions #voiceCall,.chat-v10-actions #videoCall{background:color-mix(in srgb,var(--chat-accent) 12%,rgba(255,255,255,.04))}
.ace-tooltip-live{position:absolute;left:50%;bottom:calc(100% + 10px);z-index:100;pointer-events:none;opacity:0;transform:translateX(calc(-50% + var(--ace-tip-x,0px))) translateY(20px) rotate(var(--ace-tip-rotate,0deg)) scale(.6);white-space:nowrap;padding:7px 9px;border-radius:9px;background:#030304;border:1px solid rgba(255,255,255,.1);font-size:9px;box-shadow:0 12px 28px rgba(0,0,0,.4);transition:opacity .18s,transform .32s cubic-bezier(.2,.8,.2,1)}[data-ace-tooltip]:hover>.ace-tooltip-live{opacity:1;transform:translateX(calc(-50% + var(--ace-tip-x,0px))) translateY(0) rotate(var(--ace-tip-rotate,0deg)) scale(1)}
.chat-v10-body{position:relative;min-height:0;overflow:hidden}.chat-v10-body:before{content:"";position:absolute;inset:0;background:linear-gradient(to bottom,rgba(0,0,0,.2),transparent 80px),radial-gradient(circle at 50% 115%,color-mix(in srgb,var(--chat-accent) 6%,transparent),transparent 42%);pointer-events:none;z-index:1}
.chat-v10 .message-list{position:absolute!important;inset:0!important;height:auto!important;overflow-y:auto!important;overscroll-behavior:contain;padding:28px max(22px,calc((100% - 860px)/2)) 170px!important;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.16) transparent;z-index:2}.chat-v10 .message-list::-webkit-scrollbar{width:8px}.chat-v10 .message-list::-webkit-scrollbar-thumb{background:rgba(255,255,255,.13);border-radius:99px;border:2px solid transparent;background-clip:padding-box}
.chat-v10 .message-date{display:flex;align-items:center;gap:10px;margin:24px 0 18px;color:#666b75;font-size:8px;text-transform:uppercase;letter-spacing:.13em}.chat-v10 .message-date:before,.chat-v10 .message-date:after{content:"";height:1px;flex:1;background:linear-gradient(90deg,transparent,rgba(255,255,255,.08),transparent)}
.chat-v10 .message{position:relative;display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;gap:10px!important;align-items:end!important;max-width:min(760px,84%)!important;margin:0 0 4px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;transform:none!important}.chat-v10 .message.own{margin-left:auto!important;grid-template-columns:minmax(0,1fr) 34px!important}.chat-v10 .message.own>.avatar{grid-column:2;grid-row:1}.chat-v10 .message.own>.message-content{grid-column:1;grid-row:1;justify-self:end}.chat-v10 .message-grouped>.avatar{visibility:hidden}.chat-v10 .message>.avatar{width:32px!important;height:32px!important;border-radius:12px!important;margin:0 0 3px!important}.chat-v10 .message-content{position:relative;min-width:0;max-width:100%;display:grid;gap:5px!important;padding:0!important;background:transparent!important;border:0!important}.chat-v10 .message-author{display:flex!important;gap:7px!important;align-items:center!important;padding:0 5px!important;font-size:8px!important;color:#737781!important}.chat-v10 .message.own .message-author{justify-content:flex-end}.chat-v10 .message-author strong{font-size:9px!important;color:var(--name-color,#fff)!important}.chat-v10 .message-author time,.chat-v10 .message-author small{font-size:7px!important}.chat-v10 .message-text{position:relative;width:fit-content;max-width:min(620px,100%);padding:10px 13px!important;border:1px solid rgba(255,255,255,.075)!important;border-radius:18px 18px 18px 6px!important;background:rgba(22,22,26,.88)!important;backdrop-filter:blur(12px);font-size:12px!important;line-height:1.42!important;color:#f4f5f8!important;box-shadow:0 8px 22px rgba(0,0,0,.16)}.chat-v10 .message.own .message-text{margin-left:auto;background:linear-gradient(145deg,color-mix(in srgb,var(--chat-accent) 88%,#111),color-mix(in srgb,var(--chat-accent) 68%,#050507))!important;border-color:color-mix(in srgb,var(--chat-accent) 70%,white 5%)!important;color:#fff!important;border-radius:18px 18px 6px 18px!important;box-shadow:0 12px 32px color-mix(in srgb,var(--chat-accent) 13%,transparent)}.chat-v10 .arnie-message .message-text{background:linear-gradient(145deg,rgba(109,120,255,.17),rgba(16,16,20,.93))!important;border-color:rgba(134,144,255,.26)!important}.chat-v10 .arnie-avatar{background:linear-gradient(135deg,#8290ff,#b7c0ff)!important;color:#07070a!important;font-weight:900}.chat-v10 .arnie-badge{font-size:6px;padding:2px 4px;border-radius:999px;background:#aab4ff;color:#090a10;font-weight:800}
.chat-v10 .message-actions{position:absolute!important;top:50%!important;transform:translateY(-50%) scale(.96)!important;right:calc(100% + 8px)!important;display:flex!important;gap:3px!important;opacity:0!important;pointer-events:none!important;padding:4px!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:12px!important;background:rgba(10,10,12,.92)!important;backdrop-filter:blur(18px)!important;transition:.15s ease!important;z-index:20}.chat-v10 .message.own .message-actions{left:calc(100% + 8px)!important;right:auto!important}.chat-v10 .message:hover .message-actions,.chat-v10 .message:focus-within .message-actions{opacity:1!important;pointer-events:auto!important;transform:translateY(-50%) scale(1)!important}.chat-v10 .message-actions button{width:29px!important;height:29px!important;border:0!important;background:transparent!important}.chat-v10 .receipt{color:#7fa7ff!important}.chat-v10 .quoted-message{border:0!important;border-left:2px solid color-mix(in srgb,var(--chat-accent) 70%,transparent)!important;background:rgba(255,255,255,.035)!important;color:#a5a8b0!important;border-radius:4px 10px 10px 4px!important;padding:7px 9px!important;font-size:9px!important;max-width:420px!important}.chat-v10 .reactions{display:flex;gap:4px;flex-wrap:wrap;padding:0 4px}.chat-v10 .reactions button{border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.035);border-radius:999px;padding:3px 6px;font-size:9px}.chat-v10 .reactions button.mine{border-color:color-mix(in srgb,var(--chat-accent) 55%,transparent);background:color-mix(in srgb,var(--chat-accent) 10%,transparent)}
.chat-v10 .chat-empty{position:absolute;left:50%;top:46%;transform:translate(-50%,-50%);width:min(460px,85%);text-align:center;padding:28px;display:grid;justify-items:center;gap:8px;border:1px solid rgba(255,255,255,.07);border-radius:28px;background:rgba(13,13,16,.52);backdrop-filter:blur(16px)}.chat-v10 .chat-empty>span{width:54px;height:54px;border-radius:18px;display:grid;place-items:center;background:color-mix(in srgb,var(--chat-accent) 13%,rgba(255,255,255,.04));border:1px solid color-mix(in srgb,var(--chat-accent) 25%,rgba(255,255,255,.08))}.chat-v10 .chat-empty h3{margin:4px 0 0;font-size:18px}.chat-v10 .chat-empty p{margin:0;color:#8d919a;font-size:10px;line-height:1.5}
.chat-v10 #messageSearchBar{position:absolute;z-index:35;top:12px;left:50%;transform:translateX(-50%);width:min(560px,calc(100% - 24px));display:flex;gap:8px;padding:8px;border:1px solid rgba(255,255,255,.08);border-radius:18px;background:rgba(10,10,13,.9);backdrop-filter:blur(24px);box-shadow:0 18px 60px rgba(0,0,0,.35)}.chat-v10 #messageSearchBar[hidden]{display:none}.chat-v10 #messageSearch{flex:1;min-width:0;border:0;background:transparent;color:#fff;padding:8px;outline:0}.chat-v10 #liveLocationBar{position:absolute;z-index:12;top:12px;left:50%;transform:translateX(-50%);width:min(680px,calc(100% - 30px))}
.chat-v10 .jump-latest{position:absolute!important;z-index:20!important;bottom:112px!important;left:50%!important;transform:translateX(-50%)!important;border:1px solid rgba(255,255,255,.09)!important;background:rgba(13,13,16,.9)!important;color:#e8e8eb!important;border-radius:999px!important;padding:7px 11px!important;box-shadow:0 12px 34px rgba(0,0,0,.3)!important;backdrop-filter:blur(18px)!important}
.chat-v10 #typingIndicator{position:absolute;z-index:20;bottom:100px;left:max(22px,calc((100% - 860px)/2));min-height:24px;display:flex;align-items:center;gap:7px;font-size:9px;color:#7d818b}.chat-v10 #typingIndicator .avatar{width:22px;height:22px;border-radius:8px}.chat-v10 .arnie-dots{display:inline-flex;gap:2px;margin-left:4px}.chat-v10 .arnie-dots i{width:3px;height:3px;border-radius:50%;background:#9ca8ff;animation:ace-dot 1s infinite alternate}.chat-v10 .arnie-dots i:nth-child(2){animation-delay:.15s}.chat-v10 .arnie-dots i:nth-child(3){animation-delay:.3s}@keyframes ace-dot{to{transform:translateY(-3px);opacity:.55}}
.chat-v10-composer{position:relative;z-index:40;padding:10px 18px max(14px,env(safe-area-inset-bottom));background:linear-gradient(0deg,rgba(3,3,4,.98),rgba(3,3,4,.8),transparent)}.chat-v10 .composer-wrap{position:relative;width:min(860px,100%);margin:auto;padding:0!important;background:transparent!important;border:0!important}.chat-v10 #replyPreview,.chat-v10 #attachmentPreview,.chat-v10 #uploadProgress,.chat-v10 #recordingBar{margin-bottom:8px!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:16px!important;background:rgba(14,14,17,.9)!important;backdrop-filter:blur(18px)!important}.chat-v10 .composer-row{position:relative;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:7px!important;align-items:end!important;padding:7px!important;border:1px solid rgba(255,255,255,.095)!important;border-radius:24px!important;background:rgba(13,13,16,.89)!important;backdrop-filter:blur(26px)!important;box-shadow:0 18px 60px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.035)!important}.chat-v10 #messageInput{min-height:42px!important;max-height:130px!important;resize:none!important;border:0!important;outline:0!important;background:transparent!important;color:#f6f7fb!important;padding:11px 10px!important;font-size:12px!important;line-height:1.45!important}.chat-v10 #messageInput::placeholder{color:#676b75}.chat-v10 #toolsBtn{width:42px!important;height:42px!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:16px!important;background:rgba(255,255,255,.045)!important;display:grid!important;place-items:center!important;transition:.2s ease!important}.chat-v10 #toolsBtn[aria-expanded="true"]{background:color-mix(in srgb,var(--chat-accent) 15%,rgba(255,255,255,.05))!important;border-color:color-mix(in srgb,var(--chat-accent) 35%,rgba(255,255,255,.08))!important;transform:rotate(45deg)}.chat-v10 .composer-primary-tools{display:none!important}.chat-v10 #sendBtn{position:relative;overflow:hidden;min-width:44px!important;width:44px!important;height:42px!important;border-radius:16px!important;border:0!important;background:linear-gradient(135deg,color-mix(in srgb,var(--chat-accent) 92%,white),var(--chat-accent))!important;color:#050507!important;font-weight:900!important;display:grid!important;place-items:center!important;padding:0!important;box-shadow:0 10px 26px color-mix(in srgb,var(--chat-accent) 18%,transparent)!important}.chat-v10 #sendBtn span{display:none!important}.chat-v10 #sendBtn svg{width:17px}.chat-v10 .composer-hint{display:flex!important;justify-content:space-between!important;padding:6px 10px 0!important;color:#555963!important;font-size:7px!important}.chat-v10 .arnie-composer-hint{position:absolute;left:10px;bottom:calc(100% + 10px);z-index:60;width:min(360px,calc(100vw - 28px));display:grid;grid-template-columns:34px 1fr auto;align-items:center;gap:10px;border:1px solid rgba(133,145,255,.22);border-radius:16px;background:rgba(10,10,14,.96);color:#fff;padding:9px 10px;box-shadow:0 18px 44px rgba(0,0,0,.38);backdrop-filter:blur(20px)}.chat-v10 .arnie-composer-hint[hidden]{display:none}.chat-v10 .arnie-mini-mark{width:32px;height:32px;border-radius:11px;background:linear-gradient(135deg,#8290ff,#c2c8ff);color:#06070c;display:grid;place-items:center;font-weight:900;position:relative}.chat-v10 .arnie-mini-mark i{position:absolute;right:3px;top:1px;font-size:8px}.chat-v10 .arnie-composer-hint>span:nth-child(2){display:grid;gap:1px;text-align:left}.chat-v10 .arnie-composer-hint strong{font-size:10px}.chat-v10 .arnie-composer-hint small{font-size:8px;color:#8b8f9a}.chat-v10 .arnie-composer-hint kbd{font-size:7px;color:#6e7380;border:1px solid rgba(255,255,255,.08);border-radius:6px;padding:3px 5px;background:#111217}
.chat-v10 .composer-tools-menu{position:absolute!important;left:0!important;bottom:calc(100% + 12px)!important;width:min(620px,calc(100vw - 120px))!important;max-height:min(68vh,650px)!important;overflow:auto!important;overscroll-behavior:contain!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:26px!important;background:rgba(8,8,11,.96)!important;backdrop-filter:blur(28px)!important;box-shadow:0 26px 90px rgba(0,0,0,.52)!important;padding:14px!important;z-index:100!important;transform-origin:left bottom;animation:ace-drawer-in .36s cubic-bezier(.16,1,.3,1)}@keyframes ace-drawer-in{from{opacity:0;transform:translateY(18px) scale(.94) rotateX(-8deg)}to{opacity:1;transform:none}}
.chat-v10 .composer-tools-menu[hidden]{display:none!important}.chat-v10 .composer-drawer-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:4px 5px 10px!important}.chat-v10 .ace-drawer-title{display:grid!important;gap:2px!important}.chat-v10 .ace-drawer-title small{font-size:7px!important;color:#6f7480!important;letter-spacing:.16em!important}.chat-v10 .ace-drawer-title strong{font-size:19px!important}.chat-v10 .ace-drawer-title span{font-size:8px!important;color:#7c818d!important}.chat-v10 .composer-drawer-notch{position:relative;display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:3px!important;padding:4px!important;border:1px solid rgba(255,255,255,.07)!important;border-radius:14px!important;background:rgba(255,255,255,.025)!important;margin-bottom:10px!important}.chat-v10 .composer-drawer-notch button{position:relative;z-index:2;border:0!important;background:transparent!important;border-radius:10px!important;padding:8px!important;color:#747984!important;font-size:9px!important}.chat-v10 .composer-drawer-notch button.active{color:#fff!important}.chat-v10 .composer-notch-indicator{position:absolute;z-index:1;left:4px;top:4px;bottom:4px;width:calc((100% - 8px)/3);border-radius:10px;background:#1b1c21;border:1px solid rgba(255,255,255,.07);transform:translateX(calc(var(--notch-index,0)*100%));transition:transform .45s cubic-bezier(.16,1,.3,1)}
.chat-v10 .composer-featured-draw{position:relative;width:100%!important;min-height:116px!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:22px!important;background:linear-gradient(135deg,color-mix(in srgb,var(--chat-accent) 13%,#0c0c10),#0b0b0f)!important;color:#fff!important;padding:17px!important;display:grid!important;grid-template-columns:54px minmax(0,1fr) 34px!important;gap:13px!important;align-items:center!important;text-align:left!important;overflow:hidden!important;transform-style:preserve-3d!important;margin-bottom:11px!important}.chat-v10 .composer-featured-draw:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 86% 15%,color-mix(in srgb,var(--chat-accent) 25%,transparent),transparent 35%);pointer-events:none}.chat-v10 .composer-featured-icon{width:54px;height:54px;border-radius:18px;display:grid;place-items:center;background:color-mix(in srgb,var(--chat-accent) 18%,rgba(255,255,255,.04));border:1px solid color-mix(in srgb,var(--chat-accent) 28%,rgba(255,255,255,.06));transform:translateZ(30px)}.chat-v10 .composer-featured-draw>span:nth-child(2){display:grid;gap:3px;transform:translateZ(22px)}.chat-v10 .composer-featured-draw small{font-size:7px;color:#747985;letter-spacing:.12em}.chat-v10 .composer-featured-draw strong{font-size:14px}.chat-v10 .composer-featured-draw em{font-size:8px;color:#858a94;font-style:normal;line-height:1.4}.chat-v10 .featured-draw-arrow{width:32px;height:32px;border-radius:11px;display:grid;place-items:center;background:rgba(255,255,255,.06);transform:translateZ(35px)}
.chat-v10 .composer-tool-group{display:grid!important;gap:8px!important}.chat-v10 .composer-tool-group[hidden]{display:none!important}.chat-v10 .composer-tool-group>header{display:flex!important;justify-content:space-between!important;align-items:center!important;padding:0 3px!important}.chat-v10 .composer-tool-group>header span{font-size:9px!important;font-weight:750!important}.chat-v10 .composer-tool-group>header small{font-size:7px!important;color:#666b76!important}.chat-v10 .composer-tool-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.chat-v10 .composer-tool-grid>button{position:relative;min-height:74px!important;border:1px solid rgba(255,255,255,.065)!important;border-radius:17px!important;background:rgba(255,255,255,.025)!important;color:#f4f5f7!important;padding:12px!important;display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;text-align:left!important;overflow:hidden!important;transition:border-color .2s,background .2s,transform .2s!important}.chat-v10 .composer-tool-grid>button:hover{background:rgba(255,255,255,.055)!important;border-color:color-mix(in srgb,var(--chat-accent) 28%,rgba(255,255,255,.08))!important;transform:translateY(-2px)}.chat-v10 .composer-tool-grid>button>svg{width:30px!important;height:30px!important;padding:7px!important;border-radius:10px!important;background:rgba(255,255,255,.05)!important}.chat-v10 .composer-tool-grid>button>span{display:grid!important;gap:3px!important}.chat-v10 .composer-tool-grid strong{font-size:10px!important}.chat-v10 .composer-tool-grid small{font-size:7px!important;color:#747985!important}.chat-v10 .composer-tool-grid>button[data-duo-tool="arnie"]{background:linear-gradient(145deg,rgba(111,122,255,.12),rgba(255,255,255,.025))!important}
.ace-moving-border-live{position:relative!important;isolation:isolate}.ace-moving-border-track{position:absolute;inset:0;pointer-events:none;overflow:hidden;border-radius:inherit;z-index:0}.ace-moving-border-track svg{position:absolute;inset:0;width:100%;height:100%}.ace-moving-border-track>i{position:absolute;left:0;top:0;width:58px;height:58px;border-radius:50%;background:radial-gradient(color-mix(in srgb,var(--chat-accent) 85%,#fff) 0%,transparent 68%);filter:blur(2px);opacity:.8}.ace-moving-border-live>*:not(.ace-moving-border-track){position:relative;z-index:1}
.ace-comet-live{position:relative;transform-style:preserve-3d;transition:transform .2s ease;will-change:transform}.ace-comet-glare{position:absolute;inset:0;border-radius:inherit;pointer-events:none;mix-blend-mode:overlay;opacity:.42}.ace-spotlight-live{position:relative;isolation:isolate}.ace-spotlight-layer{position:absolute;z-index:0;inset:-1px;border-radius:inherit;pointer-events:none;background:rgba(70,70,80,.6);opacity:0;transition:opacity .3s}.ace-spotlight-live:hover>.ace-spotlight-layer{opacity:1}.ace-spotlight-live>*:not(.ace-spotlight-layer){position:relative;z-index:1}
.chat-v10 #activityRail{position:absolute!important;z-index:80!important;right:12px!important;top:82px!important;bottom:12px!important;width:min(390px,calc(100% - 104px))!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:24px!important;background:rgba(9,9,12,.96)!important;backdrop-filter:blur(24px)!important;box-shadow:0 30px 90px rgba(0,0,0,.5)!important;overflow:auto!important}.chat-v10 #activityRail[hidden]{display:none!important}.chat-v10 #activityRail>header{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:14px;background:rgba(9,9,12,.95);border-bottom:1px solid rgba(255,255,255,.07)}
.chat-v10 .header-activity-card{max-width:240px!important;border:1px solid rgba(255,255,255,.07)!important;background:rgba(255,255,255,.025)!important;border-radius:14px!important;padding:5px!important;display:flex!important;gap:7px!important;align-items:center!important}.chat-v10 .header-activity-card[hidden]{display:none!important}.chat-v10 .header-activity-card img{width:28px;height:28px;border-radius:8px}.chat-v10 .header-activity-card>div{display:grid;gap:1px;min-width:0}.chat-v10 .header-activity-card strong,.chat-v10 .header-activity-card em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-v10 .header-activity-card strong{font-size:8px}.chat-v10 .header-activity-card em{font-size:7px;color:#747985;font-style:normal}.chat-v10 .header-activity-progress{height:2px;border-radius:2px;background:rgba(255,255,255,.08);overflow:hidden}.chat-v10 .header-activity-progress i{display:block;height:100%;background:var(--chat-accent)}
#modal.ace-modal-live{transform-origin:center center;animation:ace-modal-body .5s cubic-bezier(.2,.8,.2,1)!important}@keyframes ace-modal-body{0%{opacity:0;transform:translateY(40px) rotateX(40deg) scale(.5)}70%{opacity:1;transform:translateY(-4px) rotateX(-2deg) scale(1.015)}100%{opacity:1;transform:none}}
body:has(.chat-v10) #modal{border:1px solid rgba(255,255,255,.09)!important;background:rgba(8,8,11,.97)!important;color:#f5f6f8!important;border-radius:24px!important;box-shadow:0 30px 100px rgba(0,0,0,.65)!important;backdrop-filter:blur(28px)!important;max-width:min(620px,calc(100vw - 24px))!important;max-height:min(88dvh,760px)!important;overflow:auto!important}body:has(.chat-v10) #modal::backdrop{background:rgba(0,0,0,.72)!important;backdrop-filter:blur(8px)!important}
@media(max-width:760px){body:has(#content.chat-page) .topbar{display:none!important}#content.chat-page{height:100dvh!important}.chat-v10{grid-template-columns:1fr;padding-top:env(safe-area-inset-top)}.chat-v10-nav{position:absolute;z-index:120;left:8px;top:calc(env(safe-area-inset-top) + 64px);bottom:10px;width:72px;border:1px solid rgba(255,255,255,.09);border-radius:24px;transform:translateX(-95px);transition:transform .38s cubic-bezier(.16,1,.3,1);box-shadow:0 28px 80px rgba(0,0,0,.55)}.chat-v10.people-open .chat-v10-nav{transform:none}.chat-v10-main{height:100%;min-height:0}.chat-v10-header{grid-template-columns:minmax(0,1fr) auto;padding:9px 10px;gap:8px}.chat-v10-identity #togglePeople{display:grid;width:40px;height:40px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(255,255,255,.04);place-items:center}.chat-v10-status{display:none}.chat-v10-actions{height:48px;padding:4px;gap:2px;border-radius:17px}.chat-v10-actions>button{width:38px!important;height:38px!important;border-radius:13px}.chat-v10-actions #chatThemeBtn,.chat-v10-actions #findMessages{display:none}.chat-v10 .header-activity-card{display:none!important}.chat-v10 .message-list{padding:18px 10px 150px!important}.chat-v10 .message{max-width:94%!important;grid-template-columns:30px minmax(0,1fr)!important;gap:7px!important}.chat-v10 .message.own{grid-template-columns:minmax(0,1fr) 30px!important}.chat-v10 .message>.avatar{width:28px!important;height:28px!important;border-radius:10px!important}.chat-v10 .message-text{font-size:12px!important;padding:9px 11px!important}.chat-v10 .message-actions{display:none!important}.chat-v10-composer{padding:8px 8px max(9px,env(safe-area-inset-bottom))}.chat-v10 .composer-row{border-radius:21px!important;padding:5px!important}.chat-v10 .composer-hint{display:none!important}.chat-v10 .composer-tools-menu{position:fixed!important;left:8px!important;right:8px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important;max-height:min(78dvh,720px)!important;border-radius:28px!important;padding:14px!important;transform-origin:center bottom}.chat-v10 .composer-tool-grid{grid-template-columns:1fr!important}.chat-v10 .composer-featured-draw{min-height:108px!important}.chat-v10 #typingIndicator{left:13px;bottom:87px}.chat-v10 .jump-latest{bottom:92px!important}.ace-tooltip-live{display:none!important}.ace-dock-live>*{width:38px!important;height:38px!important}.chat-v10 #activityRail{right:8px!important;left:8px!important;top:70px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important}.chat-v10 .chat-empty{width:calc(100% - 28px)}body:has(.chat-v10) #modal{position:fixed!important;inset:auto 8px max(8px,env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;max-height:82dvh!important;border-radius:28px!important}}
@media(prefers-reduced-motion:reduce){.chat-v10 *,#modal.ace-modal-live{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}.ace-beams-svg,.ace-collision-ray{display:none!important}}
/* v10 chat-adjacent surfaces: calls, creative tools, document viewer and conversation settings */
body:has(.chat-v10) .call-overlay{position:fixed!important;inset:14px!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:30px!important;background:#050507!important;box-shadow:0 36px 120px rgba(0,0,0,.72)!important;overflow:hidden!important;isolation:isolate!important}
body:has(.chat-v10) .call-overlay:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 25% -15%,color-mix(in srgb,var(--chat-accent) 14%,transparent),transparent 34%),radial-gradient(circle at 90% 120%,rgba(120,90,255,.09),transparent 30%);z-index:0}
body:has(.chat-v10) .call-top{position:relative!important;z-index:15!important;min-height:68px!important;padding:12px 16px!important;border-bottom:1px solid rgba(255,255,255,.07)!important;background:rgba(7,7,9,.78)!important;backdrop-filter:blur(22px)!important}
body:has(.chat-v10) .call-person h2{font-size:14px!important;letter-spacing:-.02em!important}body:has(.chat-v10) .call-meta{font-size:8px!important;color:#858a96!important}
body:has(.chat-v10) .call-stage{position:relative!important;z-index:1!important;background:#020203!important;border-radius:0!important;overflow:hidden!important}
body:has(.chat-v10) .call-controls{position:absolute!important;z-index:30!important;left:50%!important;bottom:max(18px,env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;width:max-content!important;max-width:calc(100% - 24px)!important;height:70px!important;padding:9px 10px!important;display:flex!important;align-items:flex-end!important;gap:5px!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:24px!important;background:rgba(10,10,13,.82)!important;backdrop-filter:blur(26px)!important;box-shadow:0 22px 66px rgba(0,0,0,.42)!important}
body:has(.chat-v10) .call-control,body:has(.chat-v10) .call-end{width:var(--ace-dock-size,46px)!important;height:var(--ace-dock-size,46px)!important;min-width:0!important;border-radius:16px!important;border:1px solid rgba(255,255,255,.07)!important;background:rgba(255,255,255,.05)!important;display:grid!important;place-items:center!important;transition:width .12s,height .12s,background .16s,transform .16s!important;padding:0!important}body:has(.chat-v10) .call-control:hover{background:rgba(255,255,255,.1)!important}body:has(.chat-v10) .call-control.active{background:color-mix(in srgb,var(--chat-accent) 18%,rgba(255,255,255,.06))!important;border-color:color-mix(in srgb,var(--chat-accent) 38%,rgba(255,255,255,.08))!important}body:has(.chat-v10) .call-end{background:#d64458!important;border-color:rgba(255,255,255,.12)!important;width:auto!important;min-width:60px!important;padding:0 13px!important;grid-auto-flow:column!important;gap:6px!important}body:has(.chat-v10) .call-note{display:none!important}
body:has(.chat-v10) .local-tile,body:has(.chat-v10) .local-screen-tile{border:1px solid rgba(255,255,255,.12)!important;border-radius:20px!important;overflow:hidden!important;box-shadow:0 18px 48px rgba(0,0,0,.4)!important}body:has(.chat-v10) .self-camera-tools{border:1px solid rgba(255,255,255,.1)!important;background:rgba(10,10,13,.86)!important;backdrop-filter:blur(22px)!important;border-radius:18px!important}
body:has(.chat-v10) .call-chat-panel{border:1px solid rgba(255,255,255,.09)!important;border-radius:24px!important;background:rgba(8,8,11,.96)!important;backdrop-filter:blur(26px)!important;box-shadow:0 26px 80px rgba(0,0,0,.48)!important;overflow:hidden!important}body:has(.chat-v10) .call-chat-head{border-bottom:1px solid rgba(255,255,255,.07)!important;background:rgba(255,255,255,.025)!important}
body:has(.chat-v10) .call-captions{left:50%!important;transform:translateX(-50%)!important;width:min(680px,calc(100% - 32px))!important;bottom:104px!important;display:grid!important;gap:6px!important;pointer-events:none!important}body:has(.chat-v10) .call-caption-bubble{border:1px solid rgba(255,255,255,.09)!important;border-radius:16px!important;background:rgba(5,5,7,.9)!important;backdrop-filter:blur(22px)!important;box-shadow:0 14px 40px rgba(0,0,0,.35)!important;padding:9px 12px!important}body.chat-active .call-caption-text{font-size:13px!important;line-height:1.35!important}body.chat-active .call-caption-meta{font-size:8px!important;color:#8a8e98!important}
body:has(.chat-v10) .screen-share-setup,body:has(.chat-v10) .voice-fx,body:has(.chat-v10) .snap-lens-browser{display:grid!important;gap:12px!important}body.chat-active .screen-share-presets,body.chat-active .voice-fx-grid,body.chat-active .snap-lens-grid{gap:8px!important}body.chat-active .screen-share-presets button,body.chat-active .voice-fx-card,body.chat-active .snap-lens-card{border:1px solid rgba(255,255,255,.075)!important;background:rgba(255,255,255,.03)!important;border-radius:17px!important;transition:.2s ease!important}body.chat-active .screen-share-presets button:hover,body.chat-active .voice-fx-card:hover,body.chat-active .snap-lens-card:hover{transform:translateY(-2px)!important;border-color:color-mix(in srgb,var(--chat-accent) 35%,rgba(255,255,255,.08))!important;background:rgba(255,255,255,.055)!important}
body:has(.chat-v10) body.chat-active .conversation-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;padding:3px!important}body.chat-active .conversation-option-section{border:1px solid rgba(255,255,255,.07)!important;border-radius:19px!important;background:rgba(255,255,255,.025)!important;padding:12px!important}body.chat-active .conversation-option-section h3{font-size:9px!important;color:#7c818d!important;text-transform:uppercase!important;letter-spacing:.12em!important}body.chat-active .conversation-option-grid{display:grid!important;gap:6px!important}body.chat-active .conversation-option-grid button{min-height:46px!important;border:1px solid transparent!important;border-radius:13px!important;background:rgba(255,255,255,.025)!important;text-align:left!important;padding:9px 10px!important;transition:.18s ease!important}body.chat-active .conversation-option-grid button:hover{background:rgba(255,255,255,.065)!important;border-color:rgba(255,255,255,.07)!important}
body:has(.chat-v10) .identity-editor{display:grid!important;gap:16px!important}body.chat-active .identity-preview{min-height:120px!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:22px!important;background:linear-gradient(145deg,color-mix(in srgb,var(--chat-accent) 10%,#101014),#0a0a0d)!important;padding:18px!important;display:flex!important;align-items:center!important;gap:13px!important}body.chat-active .identity-avatar{width:54px!important;height:54px!important;border-radius:18px!important;background:color-mix(in srgb,var(--chat-accent) 18%,rgba(255,255,255,.05))!important;display:grid!important;place-items:center!important;font-weight:850!important}body.chat-active .identity-preview>div{display:grid!important;gap:3px!important}body.chat-active .identity-preview small{font-size:7px!important;letter-spacing:.13em!important;color:#777c87!important}body.chat-active .identity-preview strong{font-size:20px!important}body.chat-active .identity-preview span{font-size:9px!important;color:#7d828c!important}body.chat-active .modern-form .input-shell{min-height:48px!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:15px!important;background:rgba(255,255,255,.035)!important;padding:0 12px!important;display:flex!important;align-items:center!important;gap:9px!important}body.chat-active .modern-form .input-shell input{flex:1!important;border:0!important;background:transparent!important;color:#fff!important;outline:0!important;font-size:13px!important}
body:has(.chat-v10) .docx-viewer{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;min-height:min(70dvh,720px)!important;gap:12px!important}body.chat-active .docx-viewer-head{position:sticky!important;top:0!important;z-index:3!important;border:1px solid rgba(255,255,255,.075)!important;border-radius:18px!important;background:rgba(14,14,18,.94)!important;backdrop-filter:blur(20px)!important;padding:10px 12px!important}body.chat-active .docx-page-scroller{min-height:0!important;max-height:calc(78dvh - 90px)!important;overflow:auto!important;overscroll-behavior:contain!important;padding:12px!important;border-radius:18px!important;background:#141418!important;scrollbar-width:thin!important}body.chat-active .docx-page{width:min(820px,100%)!important;min-height:980px!important;margin:auto!important;background:#fff!important;color:#111!important;border-radius:8px!important;padding:54px 60px!important;box-shadow:0 18px 50px rgba(0,0,0,.35)!important;transform-origin:top center!important}body.chat-active .docx-loading{min-height:340px!important;display:grid!important;place-items:center!important;color:#858a95!important}
body:has(.chat-v10) .paint-app{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;min-height:min(78dvh,780px)!important;gap:10px!important}body.chat-active .paint-workspace{display:grid!important;grid-template-columns:240px minmax(0,1fr)!important;gap:10px!important;min-height:0!important}body.chat-active .paint-sidebar{min-height:0!important;overflow:auto!important;border:1px solid rgba(255,255,255,.075)!important;border-radius:20px!important;background:rgba(255,255,255,.025)!important;padding:12px!important}body.chat-active .paint-topbar{border:1px solid rgba(255,255,255,.075)!important;border-radius:18px!important;background:rgba(255,255,255,.025)!important;padding:8px!important}body.chat-active .paint-stage{min-height:0!important;overflow:auto!important;border:1px solid rgba(255,255,255,.075)!important;border-radius:20px!important;background:radial-gradient(circle,#24242b 1px,transparent 1px)!important;background-size:16px 16px!important;padding:18px!important}body.chat-active .paint-canvas-wrap{width:max-content!important;min-width:100%!important;min-height:100%!important;display:grid!important;place-items:center!important}body.chat-active .paint-canvas-wrap canvas{max-width:none!important;box-shadow:0 24px 70px rgba(0,0,0,.42)!important;border-radius:3px!important}body.chat-active .paint-tool-grid button,body.chat-active .paint-palette-tabs button,body.chat-active .paint-swatch{transition:.18s ease!important}body.chat-active .paint-tool-grid button:hover,body.chat-active .paint-palette-tabs button:hover{background:rgba(255,255,255,.07)!important;transform:translateY(-1px)!important}
@media(max-width:760px){body:has(.chat-v10) .call-overlay{inset:0!important;border-radius:0!important;border:0!important}body.chat-active .paint-workspace{grid-template-columns:1fr!important}body.chat-active .paint-sidebar{max-height:220px!important}body.chat-active .docx-page{min-height:780px!important;padding:34px 28px!important}body.chat-active .conversation-options{grid-template-columns:1fr!important}}

/* v10.1 hard separation: the school shell stays intact outside chat and disappears completely inside chat. */
body.chat-active{overflow:hidden!important;background:#030304!important}
body.chat-active>#app>#sidebar,body.chat-active>#app>#veil,body.chat-active .canvas-rail,body.chat-active .topbar,body.chat-active .site-footer{display:none!important}
body.chat-active>#app>.app-main,body.chat-active .app-main{position:fixed!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;padding:0!important;overflow:hidden!important;background:#030304!important}
body.chat-active #content.chat-page{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important}

/* Aceternity-style floating notch: a visible, functional navigation surface rather than decoration. */
.chat-v10-notch{position:absolute;z-index:90;top:max(10px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);height:48px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:2px;padding:4px;border:1px solid rgba(255,255,255,.09);border-radius:18px;background:rgba(8,8,11,.86);backdrop-filter:blur(28px) saturate(1.25);box-shadow:0 18px 48px rgba(0,0,0,.34),inset 0 1px rgba(255,255,255,.04);isolation:isolate;overflow:hidden}
.chat-v10-notch:before{content:"";position:absolute;inset:0;background:radial-gradient(120% 180% at 50% -120%,color-mix(in srgb,var(--chat-accent) 22%,transparent),transparent 68%);pointer-events:none}
.chat-v10-notch-indicator{position:absolute;z-index:-1;top:4px;bottom:4px;left:4px;width:calc((100% - 8px)/3);border-radius:14px;background:linear-gradient(180deg,color-mix(in srgb,var(--chat-accent) 16%,rgba(255,255,255,.055)),rgba(255,255,255,.035));border:1px solid color-mix(in srgb,var(--chat-accent) 24%,rgba(255,255,255,.08));box-shadow:0 8px 24px color-mix(in srgb,var(--chat-accent) 10%,transparent);transform:translateX(calc(var(--notch-index,0) * 100%));transition:transform .55s cubic-bezier(.16,1,.3,1),width .35s cubic-bezier(.16,1,.3,1)}
.chat-v10-notch button{position:relative;z-index:1;min-width:92px;height:38px;padding:0 11px;border:0;border-radius:13px;background:transparent;color:#7f838d;display:flex;align-items:center;justify-content:center;gap:7px;font-size:9px;font-weight:720;cursor:pointer;transition:color .22s ease,transform .2s ease}
.chat-v10-notch button svg{width:14px;height:14px}.chat-v10-notch button.active{color:#f7f8fb}.chat-v10-notch button:hover{color:#fff;transform:translateY(-1px)}

/* Give the redesigned header enough breathing room around the floating notch. */
.chat-v10-header{padding-top:72px!important}
.chat-v10-header>.chat-v10-status{margin-top:-56px}
.chat-v10-header>.chat-v10-actions{margin-top:-56px}
.chat-v10-header>.chat-v10-identity{margin-top:-56px}

/* A second, unmistakable Floating Dock for the three high-frequency social tools. */
.chat-v10-quick-dock{position:absolute;z-index:38;right:18px;bottom:94px;height:58px;display:flex;align-items:flex-end;gap:5px;padding:7px;border:1px solid rgba(255,255,255,.085);border-radius:20px;background:rgba(9,9,12,.82);backdrop-filter:blur(24px);box-shadow:0 20px 58px rgba(0,0,0,.35)}
.chat-v10-quick-dock>button{position:relative;width:var(--ace-dock-size,42px);height:var(--ace-dock-size,42px);border:1px solid rgba(255,255,255,.07);border-radius:14px;background:rgba(255,255,255,.04);display:grid;place-items:center;transition:width .12s,height .12s,background .18s,transform .18s;cursor:pointer}
.chat-v10-quick-dock>button:hover{background:color-mix(in srgb,var(--chat-accent) 12%,rgba(255,255,255,.055))}.chat-v10-quick-dock svg{width:var(--ace-icon-size,18px);height:var(--ace-icon-size,18px)}
.chat-v10-quick-dock .arnie-mini-mark{width:26px;height:26px;border-radius:9px}

/* Make the official-source interaction surfaces visually obvious. */
.ace-spotlight-live{overflow:hidden}.ace-spotlight-live>.ace-spotlight-layer{background:linear-gradient(135deg,color-mix(in srgb,var(--chat-accent) 34%,#171722),rgba(255,255,255,.05))!important;mix-blend-mode:screen;opacity:0;transition:opacity .3s ease}.ace-spotlight-live:hover>.ace-spotlight-layer{opacity:.42}
.ace-comet-live{perspective:1200px}.ace-comet-live:hover{z-index:5}.ace-comet-live>.ace-comet-glare{opacity:.55!important}
.ace-moving-border-live{padding:1px!important;background:linear-gradient(#09090c,#09090c) padding-box!important}.ace-moving-border-track{opacity:.95}

/* The apps drawer is a real feature surface: bigger, scrollable and spatially separated from the composer. */
.chat-v10 .composer-tools-menu{position:absolute!important;left:0!important;bottom:calc(100% + 12px)!important;width:min(620px,calc(100vw - 128px))!important;max-height:min(72dvh,700px)!important;overflow:auto!important;overscroll-behavior:contain!important;padding:14px!important;border:1px solid rgba(255,255,255,.09)!important;border-radius:26px!important;background:linear-gradient(180deg,rgba(12,12,16,.98),rgba(7,7,10,.97))!important;box-shadow:0 34px 100px rgba(0,0,0,.58)!important;backdrop-filter:blur(28px) saturate(1.15)!important;scrollbar-width:thin!important;scrollbar-color:rgba(255,255,255,.13) transparent!important;transform-origin:24px calc(100% + 12px);animation:chat-drawer-in .42s cubic-bezier(.16,1,.3,1)!important}
.chat-v10 .composer-tools-menu[hidden]{display:none!important}
@keyframes chat-drawer-in{from{opacity:0;transform:translateY(22px) scale(.94);filter:blur(6px)}to{opacity:1;transform:none;filter:none}}
.chat-v10 .composer-drawer-head{position:sticky;top:-14px;z-index:8;display:flex!important;align-items:center!important;justify-content:space-between!important;margin:-14px -14px 10px!important;padding:15px 14px 10px!important;background:linear-gradient(180deg,rgba(12,12,16,.995) 72%,transparent)!important}.chat-v10 .ace-drawer-title{display:grid!important;gap:2px!important}.chat-v10 .ace-drawer-title small{font-size:7px!important;letter-spacing:.14em!important;color:color-mix(in srgb,var(--chat-accent) 74%,#8b8f9a)!important}.chat-v10 .ace-drawer-title strong{font-size:20px!important;letter-spacing:-.04em!important}.chat-v10 .ace-drawer-title span{font-size:8px!important;color:#707581!important}.chat-v10 #closeComposerDrawer{width:36px!important;height:36px!important;border:1px solid rgba(255,255,255,.075)!important;border-radius:13px!important;background:rgba(255,255,255,.035)!important}
.chat-v10 .composer-drawer-notch{position:sticky!important;top:58px!important;z-index:7!important;display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:2px!important;margin-bottom:10px!important;padding:3px!important;border:1px solid rgba(255,255,255,.065)!important;border-radius:15px!important;background:rgba(10,10,13,.92)!important;backdrop-filter:blur(18px)!important;overflow:hidden!important}.chat-v10 .composer-drawer-notch button{position:relative;z-index:2;height:34px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:#777c87!important;font-size:8px!important;font-weight:750!important}.chat-v10 .composer-drawer-notch button.active{color:#fff!important}.chat-v10 .composer-notch-indicator{position:absolute!important;z-index:1!important;left:3px!important;top:3px!important;bottom:3px!important;width:calc((100% - 6px)/3)!important;border:1px solid color-mix(in srgb,var(--chat-accent) 24%,rgba(255,255,255,.08))!important;border-radius:11px!important;background:color-mix(in srgb,var(--chat-accent) 12%,rgba(255,255,255,.04))!important;transform:translateX(calc(var(--notch-index,0) * 100%))!important;transition:transform .55s cubic-bezier(.16,1,.3,1)!important}

/* Stronger 3D hero treatment for Draw so it cannot be mistaken for a plain card. */
.chat-v10 .composer-featured-draw{position:relative!important;min-height:126px!important;margin:2px 0 12px!important;padding:18px!important;grid-template-columns:64px minmax(0,1fr) 38px!important;border-radius:24px!important;border:1px solid color-mix(in srgb,var(--chat-accent) 26%,rgba(255,255,255,.08))!important;background:radial-gradient(circle at 82% 20%,color-mix(in srgb,var(--chat-accent) 18%,transparent),transparent 32%),linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.018))!important;box-shadow:0 24px 68px rgba(0,0,0,.32)!important;transform-style:preserve-3d!important}
.chat-v10 .composer-featured-draw:hover{border-color:color-mix(in srgb,var(--chat-accent) 44%,rgba(255,255,255,.1))!important}.chat-v10 .composer-featured-draw:after{content:"";position:absolute;inset:10px;border:1px solid rgba(255,255,255,.035);border-radius:17px;pointer-events:none;transform:translateZ(8px)}

/* Conversation options / nickname / group rename now use the same spatial language as the rest of chat. */
body:has(.chat-v10) body.chat-active .conversation-option-section{position:relative!important;overflow:hidden!important;min-height:150px!important;border-radius:24px!important;padding:15px!important;background:linear-gradient(150deg,rgba(255,255,255,.042),rgba(255,255,255,.016))!important;box-shadow:inset 0 1px rgba(255,255,255,.025)!important}body.chat-active .conversation-option-section>header{display:flex!important;align-items:center!important;gap:10px!important;margin-bottom:10px!important}body.chat-active .conversation-option-section>header>span{width:36px!important;height:36px!important;border-radius:12px!important;display:grid!important;place-items:center!important;background:color-mix(in srgb,var(--chat-accent) 12%,rgba(255,255,255,.04))!important;border:1px solid color-mix(in srgb,var(--chat-accent) 22%,rgba(255,255,255,.06))!important}body.chat-active .conversation-option-section>header>div{display:grid!important;gap:2px!important}body.chat-active .conversation-option-section>header strong{font-size:11px!important}body.chat-active .conversation-option-section>header small{font-size:7px!important;color:#737783!important}
body.chat-active .identity-preview{transform-style:preserve-3d!important;overflow:hidden!important}body.chat-active .identity-preview:after{content:"";position:absolute;right:-15%;top:-45%;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--chat-accent) 18%,transparent),transparent 70%);pointer-events:none}body.chat-active .identity-preview body.chat-active .identity-avatar{transform:translateZ(30px)}body.chat-active .identity-preview>div{transform:translateZ(22px)}

/* iOS/mobile: the hidden chat remains a native-feeling full-screen app; people list becomes a bottom sheet. */
@media(max-width:760px){
  body.chat-active>#app>.app-main,body.chat-active .app-main{position:fixed!important;inset:0!important}
  .chat-v10-notch{top:max(6px,env(safe-area-inset-top));height:44px;border-radius:17px}.chat-v10-notch button{min-width:0;width:76px;height:34px;padding:0 7px;font-size:0}.chat-v10-notch button span{display:none}.chat-v10-notch button svg{width:16px;height:16px}.chat-v10-notch-indicator{border-radius:13px}
  .chat-v10-header{padding-top:58px!important}.chat-v10-header>.chat-v10-status,.chat-v10-header>.chat-v10-actions,.chat-v10-header>.chat-v10-identity{margin-top:-44px}
  .chat-v10-nav{position:fixed!important;z-index:140!important;left:8px!important;right:8px!important;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important;height:auto!important;max-height:62dvh!important;padding:26px 10px 12px!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:30px!important;background:rgba(9,9,12,.98)!important;box-shadow:0 34px 100px rgba(0,0,0,.64)!important;transform:translateY(calc(100% + 36px))!important;transition:transform .46s cubic-bezier(.16,1,.3,1)!important}
  .chat-v10-nav:before{content:"";position:absolute;top:9px;left:50%;width:38px;height:4px;border-radius:99px;background:rgba(255,255,255,.16);transform:translateX(-50%)}.chat-v10.people-open .chat-v10-nav{transform:none!important}
  .chat-v10-home{position:absolute;right:10px;top:8px;width:38px;height:38px;border-radius:13px}.chat-v10-logo{width:24px;height:24px;border-radius:8px;font-size:10px}
  .chat-v10-room-stack{width:100%;display:grid!important;gap:8px!important;align-items:stretch!important;padding:22px 0 0!important;overflow:auto!important}.chat-v10-room-stack .room-link,.chat-v10-room-stack .member-link{width:100%!important;height:58px!important;min-height:58px!important;grid-template-columns:42px minmax(0,1fr) auto!important;justify-items:start!important;align-items:center!important;gap:10px!important;padding:7px 10px!important;border-radius:18px!important}.chat-v10-room-stack .room-link>span:last-child{display:block!important;font-size:11px!important;font-weight:760!important}.chat-v10-room-stack .member-link>span{display:grid!important;gap:2px!important}.chat-v10-room-stack .member-link>span strong{font-size:11px!important}.chat-v10-room-stack .member-link>span small{font-size:8px!important;color:#777c87!important}.chat-v10-room-stack .online-dot{right:10px!important;bottom:25px!important}.chat-v10-spacer{display:none}.chat-v10-self{display:grid!important;grid-template-columns:minmax(0,1fr) 44px!important;width:100%!important;gap:8px!important;margin-top:8px!important}.chat-v10-self #editProfile{width:100%!important;height:52px!important;grid-template-columns:38px minmax(0,1fr)!important;justify-items:start!important;gap:9px!important;padding:7px 10px!important;border:1px solid rgba(255,255,255,.07)!important;border-radius:17px!important;background:rgba(255,255,255,.025)!important}.chat-v10-self #editProfile>span{display:grid!important;gap:1px!important}.chat-v10-self #chatPreferences{width:44px!important;height:52px!important;border-radius:17px!important}
  .chat-v10-quick-dock{right:9px;bottom:82px;height:50px;padding:5px;border-radius:17px}.chat-v10-quick-dock>button{width:38px!important;height:38px!important;border-radius:12px!important}.chat-v10-quick-dock>button:first-child{display:none}
  .chat-v10 .composer-tools-menu{position:fixed!important;left:8px!important;right:8px!important;bottom:max(8px,env(safe-area-inset-bottom))!important;width:auto!important;max-height:78dvh!important;border-radius:30px!important;padding:14px!important;transform-origin:center bottom!important}.chat-v10 .composer-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.chat-v10 .composer-tool-grid>button{min-height:80px!important}.chat-v10 .composer-featured-draw{min-height:118px!important}
}
@media(max-width:420px){.chat-v10 .composer-tool-grid{grid-template-columns:1fr!important}.chat-v10-quick-dock{display:none}.chat-v10-notch button{width:66px}}
.ace-spotlight-canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:.95}
.chat-v10 .composer-tool-grid>button>svg{transform:translateZ(28px)!important}.chat-v10 .composer-tool-grid>button>span{transform:translateZ(18px)!important}.chat-v10 body.chat-active .conversation-option-section>header{transform:translateZ(16px)}

/* v10 layout hardening — isolate the rebuilt chat grid from legacy v8 mobile .conversation flex rules. */
#content.chat-page .chat-v10-main.conversation{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  flex-direction:initial!important;
  width:100%!important;
  max-width:none!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
#content.chat-page .chat-v10-header{grid-column:1!important;grid-row:1!important;min-height:0!important}
#content.chat-page .chat-v10-body{grid-column:1!important;grid-row:2!important;min-height:0!important;overflow:hidden!important;position:relative!important}
#content.chat-page .chat-v10-composer{grid-column:1!important;grid-row:3!important;min-height:0!important;flex:0 0 auto!important;position:relative!important}
#content.chat-page .chat-v10-body>.message-list{position:absolute!important;inset:0!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
@media(max-width:760px){
  #content.chat-page .chat-v10-main.conversation{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;height:100%!important;min-height:0!important;overflow:hidden!important}
  #content.chat-page .chat-v10-header{grid-row:1!important}
  #content.chat-page .chat-v10-body{grid-row:2!important;min-height:0!important}
  #content.chat-page .chat-v10-composer{grid-row:3!important;position:relative!important;inset:auto!important;width:100%!important;margin:0!important}
  #content.chat-page .chat-v10 .composer-wrap{position:relative!important;inset:auto!important;display:block!important;width:100%!important;margin:0 auto!important}
  #content.chat-page .chat-v10 .message-list{position:absolute!important;inset:0!important;flex:none!important;height:auto!important;padding-bottom:116px!important}
}

/* v10 chat-only form/identity polish. These selectors are deliberately gated to chat so the school façade remains untouched. */
body.chat-active .identity-editor{display:grid;gap:14px;min-width:min(480px,calc(100vw - 48px))}
body.chat-active .identity-preview{position:relative;display:grid;grid-template-columns:58px minmax(0,1fr);gap:14px;align-items:center;padding:18px;border:1px solid rgba(255,255,255,.085);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.05),rgba(255,255,255,.018));transform-style:preserve-3d;isolation:isolate}
body.chat-active .identity-avatar{width:58px;height:58px;display:grid;place-items:center;border-radius:19px;background:linear-gradient(135deg,color-mix(in srgb,var(--chat-accent) 74%,white),var(--chat-accent));color:#060608;font-size:18px;font-weight:900;box-shadow:0 16px 42px color-mix(in srgb,var(--chat-accent) 16%,transparent)}
body.chat-active .identity-preview>div{display:grid;gap:3px;min-width:0}body.chat-active .identity-preview small{font-size:7px;letter-spacing:.14em;color:#6f7480}body.chat-active .identity-preview strong{font-size:20px;letter-spacing:-.035em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.chat-active .identity-preview span{font-size:9px;color:#818691}
body.chat-active .modern-form{display:grid;gap:12px}body.chat-active .modern-form>label{display:grid;gap:6px;font-size:9px;color:#979ca6}body.chat-active .input-shell{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:8px;padding:0 12px;border:1px solid rgba(255,255,255,.085);border-radius:15px;background:rgba(255,255,255,.03);transition:border-color .18s,background .18s,box-shadow .18s}body.chat-active .input-shell:focus-within{border-color:color-mix(in srgb,var(--chat-accent) 55%,rgba(255,255,255,.12));background:color-mix(in srgb,var(--chat-accent) 5%,rgba(255,255,255,.03));box-shadow:0 0 0 3px color-mix(in srgb,var(--chat-accent) 7%,transparent)}body.chat-active .input-shell svg{width:15px;color:#737985}body.chat-active .input-shell input{width:100%;min-width:0;height:46px;border:0!important;outline:0!important;background:transparent!important;color:#fff!important;padding:0!important;font-size:13px!important}
body.chat-active .identity-hint{display:flex;align-items:flex-start;gap:8px;padding:10px 11px;border-radius:14px;background:rgba(255,255,255,.025);color:#777d88;font-size:8px;line-height:1.45}body.chat-active .identity-hint svg{width:15px;flex:none;margin-top:1px}
body.chat-active .modal-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}body.chat-active .modal-actions button{min-height:42px;border-radius:14px;padding:0 14px}

/* Arnie lives in the two-person thread as an assistant, never as a third participant. */
body.chat-active .arnie-avatar{position:relative!important;background:linear-gradient(135deg,#8795ff,#c8d0ff)!important;color:#06070b!important;font-weight:950!important}body.chat-active .arnie-avatar i{position:absolute;right:2px;top:0;font-size:7px;font-style:normal}body.chat-active .arnie-badge{display:inline-grid;place-items:center;padding:2px 5px;border-radius:999px;background:#aab6ff;color:#07080d;font-size:6px;font-weight:900;letter-spacing:.08em}body.chat-active .arnie-mention{display:inline-block;padding:0 4px;border-radius:5px;background:#9fb0ff18;color:#c2ccff;font-weight:800}
body.chat-active #typingIndicator.arnie-typing{display:flex!important;align-items:center!important;gap:7px!important;min-height:25px!important;padding:2px 14px!important;color:#818691!important;font-size:9px!important}body.chat-active #typingIndicator.arnie-typing .arnie-avatar{width:20px!important;height:20px!important;min-width:20px!important;font-size:9px!important}body.chat-active .arnie-dots{display:inline-flex;gap:3px}body.chat-active .arnie-dots i{width:3px;height:3px;border-radius:50%;background:currentColor;animation:arnie-dot-v10 .8s ease-in-out infinite}body.chat-active .arnie-dots i:nth-child(2){animation-delay:.12s}body.chat-active .arnie-dots i:nth-child(3){animation-delay:.24s}@keyframes arnie-dot-v10{0%,100%{opacity:.25;transform:translateY(0)}50%{opacity:1;transform:translateY(-2px)}}

/* Chat name color editor is kept inside chat appearance so the school settings UI does not need redesigning. */
body.chat-active .chat-name-color-editor{display:grid;gap:8px;padding:12px;border:1px solid rgba(255,255,255,.075);border-radius:16px;background:rgba(255,255,255,.025)}body.chat-active .chat-name-color-editor>header{display:flex;align-items:center;justify-content:space-between;gap:12px}body.chat-active .chat-name-color-editor strong{font-size:10px}body.chat-active .chat-name-color-editor small{font-size:8px;color:#777c87}body.chat-active .chat-name-color-preview{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:13px;background:rgba(255,255,255,.025)}body.chat-active .chat-name-color-preview b{color:var(--preview-name-color,#fff);font-size:11px}body.chat-active .chat-name-color-palette{display:flex;gap:7px;flex-wrap:wrap;align-items:center}body.chat-active .chat-name-color-palette button{width:28px;height:28px;padding:0;border-radius:10px;border:2px solid transparent;background:var(--swatch);box-shadow:0 0 0 1px rgba(255,255,255,.09)}body.chat-active .chat-name-color-palette button[aria-pressed="true"]{border-color:#fff;box-shadow:0 0 0 2px var(--swatch)}body.chat-active .chat-name-color-palette input[type="color"]{width:34px;height:30px;border:1px solid rgba(255,255,255,.1);border-radius:10px;background:#111;padding:2px}

/* Explicit scroll owners. Nothing in chat is allowed to trap wheel/touch input. */
body.chat-active #modal .modal-body,body.chat-active .conversation-options,body.chat-active .attachment-results,body.chat-active .snap-lens-grid,body.chat-active .voice-fx-grid,body.chat-active .game-catalog-v6{overflow:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch}
body.chat-active .conversation-options{max-height:min(70dvh,680px)!important;scrollbar-width:thin}
body.chat-active .snap-lens-grid,body.chat-active .voice-fx-grid{max-height:min(55dvh,520px)!important}

@media(max-width:760px){body.chat-active .identity-editor{min-width:0;width:100%}body.chat-active .identity-preview{grid-template-columns:50px minmax(0,1fr);padding:14px;border-radius:19px}body.chat-active .identity-avatar{width:50px;height:50px;border-radius:16px}body.chat-active .identity-preview strong{font-size:17px}body.chat-active .modal-actions{display:grid;grid-template-columns:1fr 1fr}body.chat-active .modal-actions button{width:100%}}
@media(prefers-reduced-motion:reduce){body.chat-active .arnie-dots i{animation:none!important}}

/* Games opened from chat use the same real cursor-depth system instead of plain legacy cards. */
body.chat-active .game-card-v6,body.chat-active .game-feature-card{transform-style:preserve-3d!important;will-change:transform;border-color:rgba(255,255,255,.075)!important;background:linear-gradient(145deg,rgba(255,255,255,.04),rgba(255,255,255,.015))!important}
body.chat-active .game-card-v6 .game-card-art,body.chat-active .game-feature-card>span:first-child{transform:translateZ(28px)}body.chat-active .game-card-v6>div:nth-child(2),body.chat-active .game-feature-card>div{transform:translateZ(16px)}body.chat-active .game-card-v6 .game-card-play{transform:translateZ(32px)}
body.chat-active .games-hub-hero{position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.08)!important;background:radial-gradient(circle at 82% 20%,color-mix(in srgb,var(--chat-accent) 17%,transparent),transparent 32%),linear-gradient(145deg,rgba(255,255,255,.045),rgba(255,255,255,.014))!important}

/* v10 final QA/polish pass — chat only. */
body.chat-active .chat-v10-bg .ace-beams-svg{opacity:.38}
body.chat-active .chat-v10-bg:after{background:linear-gradient(90deg,rgba(3,3,4,.90),rgba(3,3,4,.48) 35%,rgba(3,3,4,.78))}

/* Keep the Aceternity tabs visually distinct without colliding with conversation controls. */
body.chat-active .chat-v10-header{min-height:72px!important;padding:12px 20px!important}
body.chat-active .chat-v10-header>.chat-v10-status,
body.chat-active .chat-v10-header>.chat-v10-actions,
body.chat-active .chat-v10-header>.chat-v10-identity{margin-top:0!important}
body.chat-active .chat-v10-notch{top:11px;min-width:300px}
body.chat-active .chat-v10-notch button{min-width:96px;font-size:9px}
@media(max-width:1080px) and (min-width:761px){
  body.chat-active .chat-v10-notch{min-width:210px}
  body.chat-active .chat-v10-notch button{min-width:66px;font-size:0;padding:0 8px}
  body.chat-active .chat-v10-notch button span{display:none}
  body.chat-active .chat-v10-notch button svg{width:16px;height:16px}
}

/* Apps is intentionally a visible Aceternity feature surface, not a generic dropdown. */
body.chat-active .composer-tools-menu{isolation:isolate}
body.chat-active .composer-tools-menu>.ace-beams-svg{z-index:-2!important;opacity:.28!important;position:fixed!important;inset:0!important}
body.chat-active .composer-tools-menu>.ace-collision-floor,
body.chat-active .composer-tools-menu>.ace-collision-ray,
body.chat-active .composer-tools-menu>.ace-collision-explosion{z-index:-1!important}
body.chat-active .composer-tool-grid>button[data-ace-3d]{transform-style:preserve-3d;will-change:transform}
body.chat-active .composer-tool-grid>button[data-ace-3d]:hover{border-color:color-mix(in srgb,var(--chat-accent) 38%,rgba(255,255,255,.09))!important;box-shadow:0 22px 50px rgba(0,0,0,.28)!important}
body.chat-active .composer-featured-draw .ace-moving-border-track>i{width:92px;height:92px;opacity:.95}
body.chat-active .composer-featured-draw{cursor:pointer}

/* Messages stay readable; hover affordances feel deliberate instead of dashboard-like. */
body.chat-active .message-text{transition:border-color .18s ease,background .18s ease,box-shadow .18s ease,transform .18s ease}
@media(hover:hover) and (pointer:fine){
  body.chat-active .message:not(.own):hover .message-text{border-color:rgba(255,255,255,.13)!important;background:rgba(25,25,30,.94)!important;transform:translateY(-1px)}
  body.chat-active .message.own:hover .message-text{box-shadow:0 16px 40px color-mix(in srgb,var(--chat-accent) 20%,transparent)!important;transform:translateY(-1px)}
}

/* Modal content must always have its own scroll owner, including long settings and DOCX content. */
body.chat-active #modal.ace-modal{max-height:min(86dvh,900px)!important;overflow:hidden!important}
body.chat-active #modal.ace-modal>.modal-body{min-height:0!important;max-height:calc(min(86dvh,900px) - 72px)!important;overflow:auto!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:thin}
body.chat-active #modal.ace-modal.wide{width:min(1040px,calc(100vw - 36px))!important}

/* Mobile header: the Aceternity tab pill gets its own row; it no longer sits on top of the person's name/actions. */
@media(max-width:760px){
  body.chat-active .chat-v10{padding-top:0!important}
  body.chat-active .chat-v10-notch{top:max(7px,env(safe-area-inset-top));min-width:0;width:min(228px,calc(100vw - 124px));height:42px;border-radius:16px}
  body.chat-active .chat-v10-notch button{width:auto;min-width:0;height:32px;padding:0 8px;font-size:0}
  body.chat-active .chat-v10-notch button span{display:none}
  body.chat-active .chat-v10-notch button svg{width:16px;height:16px}
  body.chat-active .chat-v10-header{min-height:108px!important;padding:max(58px,calc(env(safe-area-inset-top) + 54px)) 9px 9px!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important}
  body.chat-active .chat-v10-header>.chat-v10-identity,
  body.chat-active .chat-v10-header>.chat-v10-actions{margin-top:0!important;min-width:0!important}
  body.chat-active .chat-v10-identity #roomIdentity{min-width:0;overflow:hidden}
  body.chat-active .chat-v10-identity #roomIdentity .avatar{width:34px;height:34px;border-radius:12px;flex:none}
  body.chat-active .chat-v10-identity #roomIdentity strong{max-width:34vw;font-size:11px}
  body.chat-active .chat-v10-actions{height:44px;padding:3px;border-radius:16px;flex:none}
  body.chat-active .chat-v10-actions>button{width:36px!important;height:36px!important;border-radius:12px!important}
  body.chat-active .chat-v10-actions #chatThemeBtn,
  body.chat-active .chat-v10-actions #findMessages{display:none!important}
  body.chat-active .message-list{padding-top:16px!important}
  body.chat-active .composer-tools-menu>.ace-beams-svg{opacity:.18!important}
  body.chat-active #modal.ace-modal{max-height:84dvh!important}
  body.chat-active #modal.ace-modal>.modal-body{max-height:calc(84dvh - 64px)!important}
}
@media(max-width:420px){
  body.chat-active .chat-v10-notch{width:190px}
  body.chat-active .chat-v10-identity #roomIdentity strong{max-width:28vw}
  body.chat-active .chat-v10-actions #videoCall{display:none!important}
}

/* Touch surfaces should behave like an iOS app, not a hover-first desktop site. */
@media(hover:none),(pointer:coarse){
  body.chat-active .ace-comet-live{transform:none!important}
  body.chat-active [data-ace-3d]{transform:none!important}
  body.chat-active .composer-tool-grid>button:active,
  body.chat-active .option-button:active,
  body.chat-active .call-control:active{transform:scale(.97)!important}
  body.chat-active .message-actions{display:none!important}
}

/* v10.1 hidden-chat settings — social/call configuration lives inside the hidden space, never the school façade. */
body.chat-active .chat-settings-panel{position:relative;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;min-height:min(680px,78dvh);max-height:min(780px,82dvh);overflow:hidden;border-radius:24px;background:linear-gradient(180deg,rgba(10,10,13,.98),rgba(5,5,7,.99));border:1px solid rgba(255,255,255,.09);isolation:isolate}
body.chat-active .chat-settings-panel>.ace-beams-svg{opacity:.16}
body.chat-active .chat-settings-panel>.ace-collision-floor,body.chat-active .chat-settings-panel>.ace-collision-ray{opacity:.38}
body.chat-active .chat-settings-panel>*:not(.ace-beams-svg):not(.ace-collision-floor):not(.ace-collision-ray):not(.ace-collision-explosion){position:relative;z-index:3}
body.chat-active .chat-settings-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px 14px;border-bottom:1px solid rgba(255,255,255,.065);background:linear-gradient(180deg,color-mix(in srgb,var(--chat-accent) 7%,rgba(255,255,255,.018)),rgba(255,255,255,.012))}
body.chat-active .chat-settings-person{display:flex;align-items:center;gap:11px;min-width:0}
body.chat-active .chat-settings-person>.avatar{width:44px;height:44px;border-radius:15px;flex:0 0 auto}
body.chat-active .chat-settings-person>span{display:grid;gap:1px;min-width:0}
body.chat-active .chat-settings-person small{font-size:7px;letter-spacing:.18em;color:var(--chat-accent);font-weight:820}
body.chat-active .chat-settings-person strong{font-size:15px;letter-spacing:-.025em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.chat-active .chat-settings-person em{font-style:normal;font-size:8px;color:var(--muted)}
body.chat-active .chat-settings-hero>.secondary{min-height:38px;border-radius:13px;padding:0 13px;display:flex;align-items:center;gap:7px}
body.chat-active .chat-settings-tabs{--chat-pref-index:0;position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin:12px 14px 0;padding:4px;border:1px solid rgba(255,255,255,.075);border-radius:16px;background:rgba(255,255,255,.025);isolation:isolate}
body.chat-active .chat-settings-tab-indicator{position:absolute;z-index:-1;left:4px;top:4px;bottom:4px;width:calc((100% - 8px)/3);border-radius:12px;transform:translateX(calc(var(--chat-pref-index,0) * 100%));transition:transform .48s cubic-bezier(.16,1,.3,1);background:linear-gradient(180deg,color-mix(in srgb,var(--chat-accent) 16%,rgba(255,255,255,.06)),rgba(255,255,255,.035));border:1px solid color-mix(in srgb,var(--chat-accent) 28%,rgba(255,255,255,.08));box-shadow:0 8px 28px color-mix(in srgb,var(--chat-accent) 9%,transparent)}
body.chat-active .chat-settings-tabs button{min-height:38px;border:0;background:transparent;color:#7f838d;border-radius:11px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:9px;font-weight:760;cursor:pointer;transition:color .2s ease,transform .2s ease}
body.chat-active .chat-settings-tabs button svg{width:14px;height:14px}body.chat-active .chat-settings-tabs button.active{color:#f8f9fb}body.chat-active .chat-settings-tabs button:hover{color:#fff;transform:translateY(-1px)}
body.chat-active .chat-settings-scroller{min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px 14px 18px;scrollbar-gutter:stable}
body.chat-active .chat-settings-section{display:grid;gap:10px;animation:chat-settings-in .28s cubic-bezier(.16,1,.3,1) both}body.chat-active .chat-settings-section[hidden]{display:none!important}@keyframes chat-settings-in{from{opacity:0;transform:translateY(7px) scale(.988)}to{opacity:1;transform:none}}
body.chat-active .chat-settings-section-head{display:flex;align-items:center;gap:10px;padding:4px 3px 7px}
body.chat-active .chat-settings-section-head>span{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:color-mix(in srgb,var(--chat-accent) 10%,#090a0d);border:1px solid color-mix(in srgb,var(--chat-accent) 20%,rgba(255,255,255,.07));color:var(--chat-accent)}
body.chat-active .chat-settings-section-head>span svg{width:15px;height:15px}body.chat-active .chat-settings-section-head>div{display:grid;gap:2px}body.chat-active .chat-settings-section-head strong{font-size:12px}body.chat-active .chat-settings-section-head small{font-size:8px;color:var(--muted)}
body.chat-active .chat-pref-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
body.chat-active .chat-pref-toggle,body.chat-active .chat-pref-select{position:relative;min-height:64px;padding:10px 11px;border:1px solid rgba(255,255,255,.075);border-radius:14px;background:rgba(255,255,255,.026);display:flex;align-items:center;justify-content:space-between;gap:12px;overflow:hidden}
body.chat-active .chat-pref-toggle>span,body.chat-active .chat-pref-select>span{display:grid;gap:2px;min-width:0}body.chat-active .chat-pref-toggle strong,body.chat-active .chat-pref-select strong{font-size:9.5px}body.chat-active .chat-pref-toggle small,body.chat-active .chat-pref-select small{font-size:7.5px;line-height:1.35;color:var(--muted)}
body.chat-active .chat-pref-toggle input.switch{flex:0 0 auto}body.chat-active .chat-pref-select select{min-width:122px;max-width:42%;border-radius:10px;background:#0c0d10;border:1px solid rgba(255,255,255,.09);color:var(--text);padding:8px 28px 8px 9px;font-size:9px}
body.chat-active .chat-settings-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:2px}body.chat-active .chat-settings-actions button{min-height:36px;border-radius:12px;font-size:8.5px;display:flex;align-items:center;gap:6px}
body.chat-active .chat-settings-capabilities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
body.chat-active .chat-settings-capabilities>span{display:grid;grid-template-columns:24px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;align-items:center;padding:9px 10px;border:1px solid rgba(255,255,255,.07);border-radius:13px;background:rgba(255,255,255,.022)}body.chat-active .chat-settings-capabilities svg{grid-row:1/3;width:15px;color:var(--chat-accent)}body.chat-active .chat-settings-capabilities b{font-size:9px}body.chat-active .chat-settings-capabilities small{font-size:7.5px;color:var(--muted)}
body.chat-active .chat-discord-link{display:grid;grid-template-columns:38px minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.027);transform-style:preserve-3d}
body.chat-active .chat-discord-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--chat-accent) 13%,#090a0c);border:1px solid color-mix(in srgb,var(--chat-accent) 22%,rgba(255,255,255,.07));color:var(--chat-accent)}body.chat-active .chat-discord-link>div{display:grid;gap:2px;min-width:0}body.chat-active .chat-discord-link strong{font-size:10px}body.chat-active .chat-discord-link small{font-size:7.5px;color:var(--muted)}body.chat-active .chat-discord-link input{margin-top:6px;width:100%;min-height:35px;border-radius:10px;border:1px solid rgba(255,255,255,.08);background:#090a0c;color:var(--text);padding:0 10px;font-size:9px}body.chat-active .chat-discord-link>button{min-height:36px;border-radius:11px}
body.chat-active .chat-settings-note{margin:0;padding:9px 11px;border-radius:12px;border:1px dashed rgba(255,255,255,.08);color:var(--muted);font-size:8px;line-height:1.45}
body.chat-active .chat-settings-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 15px max(10px,env(safe-area-inset-bottom));border-top:1px solid rgba(255,255,255,.065);background:rgba(4,4,6,.88)}body.chat-active .chat-settings-footer>span{display:flex;align-items:center;gap:6px;font-size:7.5px;color:var(--muted)}body.chat-active .chat-settings-footer svg{width:13px;height:13px}body.chat-active .chat-settings-footer .text-btn{display:flex;align-items:center;gap:6px;font-size:8px}
@media(max-width:760px){body.chat-active .chat-settings-panel{min-height:0;max-height:78dvh;border-radius:25px}body.chat-active .chat-settings-hero{padding:15px 14px 12px}body.chat-active .chat-settings-person>.avatar{width:40px;height:40px;border-radius:14px}body.chat-active .chat-settings-hero>.secondary{font-size:0;width:40px;padding:0;justify-content:center}body.chat-active .chat-settings-hero>.secondary svg{width:17px}body.chat-active .chat-settings-tabs{margin:9px 10px 0}body.chat-active .chat-settings-tabs button span{display:none}body.chat-active .chat-settings-tabs button svg{width:16px;height:16px}body.chat-active .chat-settings-scroller{padding:10px 10px 14px}body.chat-active .chat-pref-grid{grid-template-columns:1fr}body.chat-active .chat-settings-capabilities{grid-template-columns:1fr 1fr}body.chat-active .chat-discord-link{grid-template-columns:34px minmax(0,1fr)}body.chat-active .chat-discord-link>button{grid-column:1/-1;width:100%}}

/* v10.2 emergency viewport hardening — the hidden chat owns the entire viewport on desktop.
   This intentionally overrides every legacy .chat-shell grid rule from the school-era chat. */
@media (min-width:761px){
  body.chat-active #app{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100dvh!important;
    max-width:none!important;
    overflow:hidden!important;
    background:#030304!important;
  }
  body.chat-active #app>.app-main,
  body.chat-active .app-main,
  body.chat-active #content.chat-page{
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100dvh!important;
    min-width:100vw!important;
    max-width:none!important;
    min-height:100dvh!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.chat-active #content.chat-page>.chat-v10.chat-shell{
    position:fixed!important;
    inset:0!important;
    z-index:100!important;
    display:grid!important;
    grid-template-columns:92px minmax(0,1fr)!important;
    grid-template-rows:minmax(0,1fr)!important;
    width:100vw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }
  body.chat-active .chat-v10>.chat-v10-nav{
    position:relative!important;
    inset:auto!important;
    grid-column:1!important;
    grid-row:1!important;
    width:92px!important;
    min-width:92px!important;
    max-width:92px!important;
    height:100%!important;
    transform:none!important;
    margin:0!important;
  }
  body.chat-active .chat-v10>.chat-v10-main.conversation{
    position:relative!important;
    inset:auto!important;
    grid-column:2!important;
    grid-row:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    min-height:0!important;
    margin:0!important;
    transform:none!important;
  }
  body.chat-active .chat-v10 .chat-v10-body,
  body.chat-active .chat-v10 .chat-v10-composer,
  body.chat-active .chat-v10 .chat-v10-header{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  body.chat-active .chat-v10 .message-list{
    left:0!important;
    right:0!important;
    width:100%!important;
    max-width:none!important;
  }
  body.chat-active .chat-v10 .composer-wrap{
    width:min(980px,calc(100% - 40px))!important;
    max-width:980px!important;
  }
  body.chat-active .chat-v10 .message-list{
    padding-left:max(26px,calc((100% - 980px)/2))!important;
    padding-right:max(26px,calc((100% - 980px)/2))!important;
  }
  body.chat-active .chat-v10-quick-dock{
    right:max(18px,calc((100% - 1180px)/2))!important;
  }
}
