:root{--bg:#161617!important;--c1:#1d1d1f!important;--c2:#2e2e30!important;--bd:rgba(255,255,255,.09)!important;--tx:#ecebe6!important;--mu:#9b9a94!important;--ez:cubic-bezier(.22,.9,.25,1)}
html,body{background:#161617!important;color:var(--tx)}
.aurora,#langTop{display:none!important}
.serif,.xg{font-family:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,serif}
@keyframes xrise{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:none}}
@keyframes xpop{from{opacity:0;transform:scale(.7) rotate(-8deg)}to{opacity:1;transform:none}}
@keyframes xfloat{50%{transform:translateY(-6px)}}
/* sidebar */
#sideChat{background:#1d1d1f!important;border-right:1px solid var(--bd)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none}
#sideChat .xwm{display:flex;align-items:center;gap:10px;font-size:26px;padding:6px 8px 16px;letter-spacing:-.01em;animation:xrise .6s var(--ez) both}
#sideChat .xwm img{width:30px;height:30px;border-radius:8px}
#sideChat .xnav{display:flex;flex-direction:column}
#sideChat .xnav button{display:flex;align-items:center;gap:14px;padding:11px 10px;border-radius:12px;font-size:16px;color:var(--tx);background:none;border:0;text-align:left;cursor:pointer;animation:xrise .55s var(--ez) both;transition:background .2s,transform .25s var(--ez)}
#sideChat .xnav button:nth-child(2){animation-delay:.05s}#sideChat .xnav button:nth-child(3){animation-delay:.1s}#sideChat .xnav button:nth-child(4){animation-delay:.15s}
#sideChat .xnav button:hover,#sideChat .xnav button.on{background:rgba(255,255,255,.08)}
#sideChat .xnav button:active{transform:scale(.97)}
#sideChat .xnav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#sideChat .side-nav,#sideChat .sidenav2,#sideChat .sbar .sin{display:none!important}
#sideChat .side-label{display:block!important;color:var(--mu);font-size:14px;margin:22px 10px 8px;text-transform:none;letter-spacing:0}
#codeSec .side-label{display:none!important}
#sideChat .chat-list>*{animation:xrise .5s var(--ez) both;border-radius:12px;transition:background .2s}
#sideChat .chat-list>*:hover{background:rgba(255,255,255,.07)}
#sideChat .user{background:none!important}
#sideChat .av{background:#2b2b2e!important;border:1px solid var(--bd)}
/* top bar round buttons */
.topbar .icon-btn,.xtog{width:44px;height:44px;border-radius:50%!important;background:rgba(255,255,255,.07)!important;border:1px solid var(--bd)!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);transition:background .2s,transform .25s var(--ez)}
.topbar .icon-btn:active,.xtog:active{transform:scale(.92)}
.xtog{display:grid;place-items:center;color:var(--tx);cursor:pointer;flex:none}
.xtog svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.topbar .xtog+*{margin-left:0}
.topbar [data-act=openDrawer],.topbar [data-act=toggleSide]{display:none!important}
.xpill{background:rgba(255,255,255,.07)!important;border:1px solid var(--bd)!important;border-radius:999px!important}
/* greeting */
.greeting .g-d,.greeting .g-m{display:none!important}
.xg{text-align:center;display:flex;flex-direction:column;align-items:center;gap:16px}
.xg img{width:58px;height:58px;border-radius:16px;box-shadow:0 10px 40px rgba(138,180,255,.18),0 0 0 1px var(--bd);animation:xpop .9s var(--ez) both,xfloat 6s 1s ease-in-out infinite}
.xg h2{font-weight:400;font-size:clamp(30px,5vw,40px);letter-spacing:-.02em;line-height:1.15;animation:xrise .8s .12s var(--ez) both}
/* composer */
.composer{background:rgba(58,58,60,.78)!important;border:1px solid var(--bd)!important;border-radius:999px!important;backdrop-filter:blur(24px) saturate(1.3)!important;-webkit-backdrop-filter:blur(24px) saturate(1.3)!important;box-shadow:0 16px 50px rgba(0,0,0,.5)!important;transition:box-shadow .3s,border-color .3s;animation:xrise .8s .2s var(--ez) both}
.composer:focus-within{border-color:rgba(255,255,255,.28)!important;box-shadow:0 16px 50px rgba(0,0,0,.55),0 0 0 5px rgba(138,180,255,.08)!important}
.composer #attBtn{border-radius:50%!important;background:rgba(255,255,255,.1)!important;transition:transform .35s var(--ez),background .2s}
body.xsheet #attBtn{transform:rotate(45deg)}
.composer textarea{color:var(--tx)!important}
.composer .send{background:#f4f3ee!important;color:#161617!important}
.quick button{border-radius:999px!important;background:rgba(255,255,255,.07)!important;border:1px solid var(--bd)!important;transition:background .2s,transform .25s var(--ez)}
.quick button:hover{background:rgba(255,255,255,.13)!important;transform:translateY(-2px)}
.msgs>*{animation:xrise .5s var(--ez) both}
/* add to chat sheet */
.xsw{position:fixed;inset:0;z-index:200;display:grid;place-items:end center;padding:16px;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .35s var(--ez);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.xsw.on{opacity:1;pointer-events:auto}
.xs{width:min(680px,100%);background:#232325;border:1px solid var(--bd);border-radius:30px;padding:14px 18px calc(20px + env(safe-area-inset-bottom,0px));box-shadow:0 30px 80px rgba(0,0,0,.6);transform:translateY(60px) scale(.96);opacity:0;transition:transform .5s var(--ez),opacity .35s;color:var(--tx)}
.xsw.on .xs{transform:none;opacity:1}
@media(min-width:700px){.xsw{place-items:center}}
.xs .grab{width:42px;height:4px;border-radius:4px;background:rgba(255,255,255,.2);margin:0 auto 8px}
.xs .h{display:flex;align-items:center;justify-content:center;position:relative;height:52px;font-weight:700;font-size:17px}
.xs .h button{position:absolute;left:0;top:0;width:50px;height:50px;border-radius:50%;background:rgba(255,255,255,.08);border:1px solid var(--bd);color:var(--tx);display:grid;place-items:center;cursor:pointer}
.xs svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.xs .tri{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}
.xs .tri button,.xs .row{background:#2e2e30;border:0;border-radius:20px;color:var(--tx);cursor:pointer;transition:background .2s,transform .25s var(--ez);font:inherit}
.xs .tri button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;height:118px;font-weight:600;font-size:16px}
.xs .tri button svg{width:27px;height:27px}
.xs .row{display:flex;align-items:center;gap:14px;width:100%;padding:0 18px;height:62px;margin-top:12px;font-size:16.5px;text-align:left}
.xs .row.blue{color:#8ab4ff;font-weight:600}
.xs .row .r{margin-left:auto;color:var(--mu);display:flex;align-items:center;gap:6px}
.xs .row .r svg{width:18px;height:18px}
.xs .tri button:hover,.xs .row:hover{background:#38383b}
.xs .tri button:active,.xs .row:active{transform:scale(.97)}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ===== v2: layout fixes ===== */

html body .topbar [data-act=openDrawer],html body .topbar [data-act=toggleSide],html body .topbar .tb-share,html body .topbar [data-act=topdots]{display:none!important}
html body .topbar .xtog{display:grid!important}
.xgrp{display:flex;gap:2px;padding:0 4px;height:44px;align-items:center;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid var(--bd);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.xgrp button{width:44px;height:38px;border-radius:999px;display:grid;place-items:center;color:var(--tx);background:none;border:0;cursor:pointer;transition:background .2s,transform .25s var(--ez)}
.xgrp button:hover{background:rgba(255,255,255,.1)}.xgrp button:active{transform:scale(.9)}
.xgrp svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.xg .star{width:42px;height:42px;color:#e8795a;animation:xpop .9s var(--ez) both,xspin 14s linear infinite}
@keyframes xspin{to{transform:rotate(360deg)}}
.xg img{display:none}
html body #sideChat{background:#1d1d1f!important;padding:calc(18px + env(safe-area-inset-top,0px)) 14px 14px!important;z-index:40}
html body #sideChat .xnav button{width:100%;pointer-events:auto;position:relative;z-index:2}
html body #sideChat .xwm{pointer-events:none}
html body #sideChat .xnav{flex:none}
html body #sideChat .side-top,html body #sideChat .sbar,html body #sideChat .side-foot{display:none!important}
html body #sideChat .xall{display:flex;align-items:center;gap:4px;color:var(--mu);background:none;border:0;font-size:15px;padding:8px 10px;cursor:pointer;flex:none}
html body #sideChat .xall svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
html body #sideChat .chat-list{flex:1;min-height:0;overflow:auto}
html body #sideChat .chat-i{padding:12px 10px;font-size:16px;color:var(--tx)}
html body #sideChat .user{order:10;padding:8px 6px;margin-top:auto}
html body #sideChat .av{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-weight:700;background:#2b2b2e!important}
.xfab{position:absolute;right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));width:56px;height:56px;border-radius:50%;background:#f4f3ee;color:#161617;border:0;display:grid;place-items:center;cursor:pointer;box-shadow:0 8px 26px rgba(0,0,0,.5);transition:transform .25s var(--ez);z-index:3}
.xfab:active{transform:scale(.9)}.xfab svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
@media(min-width:900px){
 html body #sideChat{position:fixed!important;transform:none!important;width:320px;max-width:320px;inset:0 auto 0 0;transition:transform .4s var(--ez)}
 html body.xhide #sideChat{transform:translateX(-100%)!important}
 html body .main{margin-left:320px;transition:margin .4s var(--ez)}
 html body.xhide .main{margin-left:0}
 html body .scrim{display:none!important}
}
/* summary panel */
.xsum-btn{display:flex;align-items:center;gap:10px;background:none;border:0;color:var(--mu);font-size:15px;padding:6px 0 10px;cursor:pointer;font-family:inherit}
.xsum-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.xsum-btn .c{width:16px;height:16px}.xsum-btn:hover{color:var(--tx)}
.xsum{position:fixed;inset:0;z-index:210;display:grid;place-items:end center;padding:16px;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .35s var(--ez);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.xsum.on{opacity:1;pointer-events:auto}
.xsum-s{width:min(680px,100%);max-height:78vh;display:flex;flex-direction:column;background:#232325;border:1px solid var(--bd);border-radius:30px;padding:14px 22px 22px;box-shadow:0 30px 80px rgba(0,0,0,.6);transform:translateY(60px) scale(.96);opacity:0;transition:transform .5s var(--ez),opacity .35s;color:var(--tx)}
.xsum.on .xsum-s{transform:none;opacity:1}
@media(min-width:700px){.xsum{place-items:center}}
.xsum .grab{width:42px;height:4px;border-radius:4px;background:rgba(255,255,255,.2);margin:0 auto 8px}
.xsum .h{display:flex;align-items:center;justify-content:center;position:relative;height:52px;font-weight:700;font-size:17px;flex:none}
.xsum .h button{position:absolute;left:-6px;top:0;width:50px;height:50px;border-radius:50%;background:rgba(255,255,255,.08);border:1px solid var(--bd);color:var(--tx);display:grid;place-items:center;cursor:pointer}
.xsum .h svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.xsum-l{overflow:auto;padding:18px 6px 4px;position:relative}
.xsum .st{display:flex;align-items:flex-start;gap:20px;padding-bottom:26px;position:relative;font-size:17px;line-height:1.35;animation:xrise .45s var(--ez) both}
.xsum .st:before{content:"";position:absolute;left:5px;top:16px;bottom:-4px;width:1px;background:rgba(255,255,255,.14)}
.xsum .st:last-child:before{display:none}
.xsum .dt{width:11px;height:11px;border-radius:50%;background:#8d8c87;flex:none;margin-top:6px;position:relative;z-index:1}
/* ===== v3: sizes, liquid glass, polish ===== */
html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
html,body{overscroll-behavior:none}
button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.xg img{display:block!important;width:64px;height:64px;border-radius:18px}
/* button sizes */
html body .sheet .btn,html body .sheet .btn.wide,html body #logout,html body #clearAll{height:44px!important;min-height:0!important;padding:0 18px!important;font-size:15px!important;font-weight:600;width:100%;margin-top:10px;display:flex;align-items:center;justify-content:center;gap:8px}
html body .sheet .btn svg{width:18px;height:18px}
html body .chat-i .dots,html body .chat-i [data-dots]{width:30px!important;height:30px!important;min-width:0!important;padding:0!important;border-radius:50%!important;opacity:.55;flex:none}
html body .chat-i .dots svg{width:16px;height:16px}
html body .chat-i:hover .dots{opacity:1}
html body .menu{padding:5px;min-width:0;border-radius:20px}
html body .menu button{height:40px!important;min-height:0!important;padding:0 14px!important;font-size:15px!important;border-radius:14px!important;width:100%;text-align:left;white-space:nowrap}
html body .m-acts .icon-btn{width:34px!important;height:34px!important}
html body .m-acts .icon-btn svg{width:18px;height:18px}
html body .nochat .icon-btn{width:56px!important;height:56px!important}
html body .nochat .btn{height:42px!important;padding:0 20px!important;font-size:15px!important}
html body .mode{height:34px!important;padding:0 12px!important;font-size:14px!important;white-space:nowrap}
html body #sideChat .av.gear{background:rgba(255,255,255,.08)!important}
html body #sideChat .av.gear svg{width:24px;height:24px;fill:none;stroke:var(--tx);stroke-width:1.7;stroke-linejoin:round}
/* flat solid surfaces (liquid glass removed) */
:root{--lg:rgba(255,255,255,.07);--lgb:rgba(255,255,255,.1)}
html body :is(.composer,.menu,.sheet,.xs,.xsum-s,.toast,.searchbar,.install){-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:#252527!important;border:1px solid var(--lgb)!important;box-shadow:0 12px 36px rgba(0,0,0,.45)!important}
html body :is(.xgrp,.xtog,.topbar .icon-btn,.chip){-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:#2a2a2c!important;border:1px solid var(--lgb)!important;box-shadow:none!important}
html body #sideChat{background:#1d1d1f!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;box-shadow:none!important}
html body .xfab{background:#f4f3ee!important;color:#161617!important;border:0!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html body .m-user{background:#2a2a2c!important;border:1px solid var(--lgb)!important}
html body #sideChat .chat-i.on,html body #sideChat .xnav button.on{background:rgba(255,255,255,.1)!important;box-shadow:none}
html body .xsw,html body .xsum,html body .modal{-webkit-backdrop-filter:none;backdrop-filter:none}
/* menus: always a compact fixed popover */
html body .menu{position:fixed!important;width:max-content!important;min-width:180px;max-width:calc(100vw - 16px);height:auto!important;z-index:300}
html body .menu button{width:100%}
html body .composer .icon-btn,html body .composer .mode,html body .composer .send:not([data-has]){-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
/* glitch fixes */
html body .main,html body .dock,html body .topbar{transform:translateZ(0)}
html body .msgs img,html body .genbox img{max-width:100%;height:auto;border-radius:18px}
html body .body pre{max-width:100%;overflow:auto}
html body .composer textarea{min-width:0}
html body{overflow-x:hidden}
html body #sideChat .chat-list>*{white-space:nowrap}
html body #sideChat .chat-i span{overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.quick,.chips,#chips,.sugs,.sug,.proj-tag{display:none!important}

/* ===== v6: settings gear pinned to sidebar bottom + polish ===== */
html body #sideChat{display:flex!important;flex-direction:column}
html body #sideChat .user{order:99!important;margin:auto 0 0!important;margin-right:72px!important;padding:8px!important;gap:12px;border-radius:16px;border:1px solid var(--bd);background:rgba(255,255,255,.04)!important;align-self:stretch;transition:background .2s,transform .25s var(--ez);flex:none;position:relative;z-index:2;cursor:pointer}
html body #sideChat .user:hover{background:rgba(255,255,255,.09)!important}
html body #sideChat .user:active{transform:scale(.98)}
html body #sideChat .user .uname{display:none!important}
html body #sideChat .user::after{content:"Settings";font-size:15px;font-weight:600;color:var(--tx);letter-spacing:.005em}
html body #sideChat .user .av,html body #sideChat .av.gear{width:38px;height:38px;border-radius:12px;background:rgba(255,255,255,.08)!important;border:0}
html body #sideChat .user .av svg{width:20px;height:20px;transition:transform .6s var(--ez)}
html body #sideChat .user:hover .av svg{transform:rotate(60deg)}
html body #sideChat .xfab{right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));width:54px;height:54px;border-radius:18px}
html body #sideChat .chat-list{padding-bottom:10px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.15) transparent}
html body #sideChat .chat-i{border-radius:12px;transition:background .2s}
html body #sideChat .chat-i.on{background:rgba(255,255,255,.1)}
html body #sideChat .xnav button{border-radius:14px}
html body #sideChat .xnav button svg{opacity:.85}
html body #sideChat .side-label{font-size:12.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;opacity:.7}
html body #sideChat{box-shadow:1px 0 0 rgba(255,255,255,.04),20px 0 60px rgba(0,0,0,.25)}
/* composer + chat polish */
html body .composer .send{transition:transform .25s var(--ez),box-shadow .25s}
html body .composer .send:hover{transform:scale(1.06);box-shadow:0 0 0 6px rgba(255,255,255,.08)}
html body .composer .send:active{transform:scale(.92)}
html body .mode{border-radius:999px!important;background:rgba(255,255,255,.08)!important;border:1px solid var(--bd)!important;transition:background .2s}
html body .mode:hover{background:rgba(255,255,255,.14)!important}
html body .topbar .icon-btn:hover,html body .xtog:hover{background:rgba(255,255,255,.12)!important}
html body .sheet{border-radius:28px;box-shadow:0 30px 80px rgba(0,0,0,.55)}
html body .field{border-radius:14px;transition:border-color .2s,box-shadow .2s}
html body .field:focus{border-color:rgba(255,255,255,.3)!important;box-shadow:0 0 0 4px rgba(138,180,255,.1);outline:0}
html body .msgs pre{border-radius:16px;border:1px solid var(--bd)}
::selection{background:rgba(138,180,255,.3)}
::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:8px}::-webkit-scrollbar-track{background:transparent}

/* Dragon beta badge */
.menu .beta{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.08em;padding:2px 6px;border-radius:6px;background:rgba(138,180,255,.18);color:#9fc0ff;vertical-align:middle;margin-left:4px}
/* instant taps */
html body button,html body [data-act],html body .chat-i{touch-action:manipulation}
html body #sideChat .xnav button,html body #sideChat .chat-list>*{animation:none!important}

/* ---- v5 mobile/tablet fixes ---- */
@media(max-width:899px){
 html body #sideChat{width:min(86vw,340px)!important;max-width:340px!important;right:auto!important;border-right:1px solid var(--bd)!important;box-shadow:12px 0 40px rgba(0,0,0,.5)!important}
 html body .scrim{display:block!important;z-index:39!important;pointer-events:none;background:rgba(0,0,0,.55)}
 html body .scrim.on{pointer-events:auto!important;opacity:1!important}
}
/* topbar alignment */
html body .topbar{display:flex!important;align-items:center!important;gap:8px}
html body .topbar>*{align-self:center!important;margin-top:0!important;margin-bottom:0!important;flex:none}
html body .topbar>.spacer,html body .topbar>.sp{flex:1}
html body .topbar .icon-btn,html body .xtog,html body .xgrp{height:44px!important;min-height:44px!important;box-sizing:border-box}
html body .topbar .icon-btn,html body .xtog{width:44px!important}
html body .xgrp button{height:40px!important}
/* composer: stays a rounded pill, never turns into a blob */
html body .composer{border-radius:28px!important;align-items:center!important;min-height:56px;box-sizing:border-box;padding:8px!important}
html body .composer>*{align-self:center!important;margin:0!important}
html body .composer .icon-btn,html body .composer .send,html body .composer .mode{height:40px!important;min-height:40px!important;box-sizing:border-box}
html body .composer .icon-btn,html body .composer .send{width:40px!important;min-width:40px!important;border-radius:50%!important}
html body .composer .mode{border-radius:999px!important}
html body .composer textarea{border-radius:0!important;background:none!important;border:0!important;outline:0!important;padding:8px 4px!important;line-height:1.4;max-height:160px;box-sizing:border-box}

/* ---- v6 ---- */
html body #sideChat{padding-bottom:calc(86px + env(safe-area-inset-bottom,0px))!important}
html body #sideChat .user{position:absolute!important;left:14px!important;right:82px!important;bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;height:54px!important;margin:0!important;padding:0 10px!important;box-sizing:border-box!important;align-items:center!important;align-self:auto!important}
html body #sideChat .xfab{bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;height:54px!important;width:54px!important}
html body .xg img{display:block!important;width:84px!important;height:84px!important;border-radius:0!important;box-shadow:none!important;background:none!important;object-fit:contain;opacity:.95;animation:xrise .9s var(--ez) both!important}
html body #splash .sp-inner img{background:none!important;box-shadow:none!important;border-radius:0!important}
html body .code-tag{font-size:0!important;padding:0!important;width:22px;height:18px;display:inline-grid!important;place-items:center;letter-spacing:0!important}
html body .code-tag::before{content:"</>";font-size:9px;font-weight:800;letter-spacing:-.5px}
/* ---- code mode v3: preview bar, files, assets ---- */
.cd-pv{display:flex;flex-direction:column;height:100%}
.cd-pv iframe{flex:1;min-height:0;height:auto!important;width:100%;border:0;background:#fff;border-radius:0 0 18px 18px}
.cd-pbar{display:flex;align-items:center;gap:8px;padding:6px 8px;border-bottom:1px solid var(--bd);flex:none}
.cd-pbar button{width:34px;height:34px;flex:none;border-radius:10px;background:rgba(255,255,255,.08);color:var(--tx);font-size:18px;display:grid;place-items:center;border:0;padding:0}
.cd-pbar button:disabled{opacity:.3}
.cd-pbar select,.cd-pn{flex:1;min-width:0;height:34px;border-radius:10px;background:rgba(255,255,255,.08);color:var(--tx);border:0;padding:0 12px;font-size:13px;display:flex;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cd-fl{height:100%;overflow:auto;padding:8px}
.cd-f{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:12px;cursor:pointer}
.cd-f:active,.cd-f:hover{background:rgba(255,255,255,.07)}
.cd-fi{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:rgba(255,255,255,.07);font-size:16px;overflow:hidden;flex:none}.cd-fi img{width:100%;height:100%;object-fit:cover}
.cd-fn{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.cd-f small{color:var(--mu);font-size:12px;flex:none}
.cd-fd{width:30px;height:30px;border-radius:8px;background:none;border:0;color:var(--mu);flex:none;padding:0}
.cd-asset{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:16px;background:repeating-conic-gradient(#2a2a2d 0 25%,#222225 0 50%) 0 0/20px 20px;color:var(--tx)}
.cd-asset img,.cd-asset video{max-width:100%;max-height:80%;object-fit:contain}
#code .cd-tabs button{flex:none}
/* code tag: small fixed chip, never stretches */
html body #sideChat .chat-i span.code-tag{flex:none!important;flex-grow:0!important;width:30px!important;min-width:30px!important;max-width:30px!important;height:20px!important;padding:0!important;border-radius:6px;overflow:visible!important}

/* ===== v13: remove solid black bars under header + composer ===== */
/* Top header: fully transparent, floating over content — no black bar */
html body .main > .topbar,
html body #mainChat > .topbar {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  position: relative;
  z-index: 20;
}
/* Keep only the buttons/pills visible; no solid strip behind them */
html body .main > .topbar::before,
html body .main > .topbar::after {
  display: none !important;
  content: none !important;
}

/* Dock / input area: no black bar the composer rests on */
html body .dock,
html body #viewChat .dock {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html body .dock::before,
html body .dock::after {
  display: none !important;
  content: none !important;
}

/* Remove empty spacers that can look like black bars */
html body .sp.sp-top,
html body .sp.sp-bot,
html body #viewChat > .sp {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Chat content can use full height; padding so messages aren't under floating controls */
html body .chatview .convo {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
html body #mainChat {
  background: transparent !important;
}
html body .view.chatview {
  background: transparent !important;
}

/* Composer stays as a floating pill only — no surrounding bar */
html body .composer {
  background: rgba(37, 37, 39, 0.92) !important;
  border: 1px solid var(--lgb, rgba(255,255,255,.12)) !important;
  box-shadow: 0 12px 36px rgba(0,0,0,.45) !important;
}
/* Foot text under input: keep light, no bar */
html body .dock .foot {
  background: transparent !important;
  opacity: 0.55;
}

/* ===== v14: less AI-product look — calmer, flatter, fewer effects ===== */
/* Kill decorative motion */
html body .xg img,
html body .xg .star {
  animation: none !important;
  box-shadow: none !important;
  display: none !important;
}
html body #sideChat .xnav button,
html body #sideChat .chat-list > *,
html body #sideChat .xwm,
html body .msgs > *,
html body .xg h2,
html body .composer {
  animation: none !important;
}

/* Empty state: plain text, no logo float / serif poem */
html body .xg {
  gap: 0;
  padding: 0 20px;
}
html body .xg h2 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif !important;
  font-weight: 500 !important;
  font-size: clamp(22px, 4.2vw, 28px) !important;
  letter-spacing: -0.015em !important;
  color: var(--tx) !important;
  opacity: 0.92;
}

/* Composer: quieter, less “product shot” */
html body .composer {
  background: #222224 !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 22px !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.28) !important;
}
html body .composer:focus-within {
  border-color: rgba(255,255,255,.22) !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.32) !important;
}
html body .composer .send {
  background: #e8e7e2 !important;
  color: #141414 !important;
  border-radius: 50% !important;
}
html body .composer .send:hover {
  transform: none !important;
  box-shadow: none !important;
  background: #f2f1ec !important;
}
html body .composer .mode {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 12px !important;
  font-weight: 500 !important;
}

/* Top controls: less pill, less glass */
html body .topbar .icon-btn,
html body .xtog,
html body .xgrp {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 10px !important;
}
html body .xgrp {
  background: transparent !important;
  padding: 0 !important;
  gap: 2px !important;
}
html body .topbar .icon-btn:hover,
html body .xtog:hover,
html body .xgrp button:hover {
  background: rgba(255,255,255,.08) !important;
}

/* Messages: less bubble-product */
html body .m-user {
  background: #2a2a2c !important;
  border: 0 !important;
  border-radius: 16px 16px 4px 16px !important;
  box-shadow: none !important;
}
html body .m-bot .body {
  font-size: 15.5px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}
html body .m-bot .body p {
  margin: 0.45em 0;
}
html body .m-acts {
  opacity: 0.55;
}
html body .m-acts:hover {
  opacity: 1;
}

/* Sidebar: flatter labels */
html body #sideChat .side-label {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  opacity: 0.55 !important;
}
html body #sideChat .xwm {
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  padding-bottom: 10px !important;
}
html body #sideChat .xnav button {
  border-radius: 10px !important;
  font-weight: 500 !important;
}
html body #sideChat .xfab {
  background: #e8e7e2 !important;
  color: #141414 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.3) !important;
}

/* Menus / sheets: tighter, less soft-glow */
html body .menu,
html body .sheet,
html body .xs {
  border-radius: 16px !important;
  box-shadow: 0 16px 48px rgba(0,0,0,.5) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
}
html body .toast {
  border-radius: 10px !important;
  font-weight: 500 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.4) !important;
}

/* Foot disclaimer quieter */
html body .dock .foot {
  font-size: 11px !important;
  letter-spacing: 0 !important;
  opacity: 0.4 !important;
}

/* ===== v15: premium polish — depth, type, restraint ===== */
:root {
  --bg: #0e0e0f !important;
  --c1: #161617 !important;
  --c2: #1c1c1e !important;
  --tx: #f2f1ec !important;
  --mu: #8a8984 !important;
  --bd: rgba(255,255,255,.08) !important;
  --lgb: rgba(255,255,255,.1) !important;
  --hair: rgba(255,255,255,.06);
  --elev: #1a1a1c;
  --elev2: #222224;
}
html, body {
  background: #0e0e0f !important;
  color: var(--tx) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html body #sideChat {
  background: #111112 !important;
  border-right: 1px solid var(--hair) !important;
}
html body #mainChat,
html body .view.chatview,
html body .main {
  background: #0e0e0f !important;
}

/* Type hierarchy */
html body {
  font-feature-settings: "ss01" on, "cv11" on;
  letter-spacing: -0.011em;
}
html body .m-bot .body {
  font-size: 15.75px !important;
  line-height: 1.62 !important;
  letter-spacing: -0.012em !important;
  color: #ecebe7 !important;
  font-weight: 400;
}
html body .m-bot .body p { margin: 0.55em 0; }
html body .m-bot .body p:first-child { margin-top: 0; }
html body .m-bot .body p:last-child { margin-bottom: 0; }
html body .m-bot .body h3 {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 1em 0 0.35em;
  color: #f5f4f0;
}
html body .m-bot .body li { margin: 0.25em 0 0.25em 1.15em; }
html body .m-bot .body code,
html body .m-bot .body :not(pre) > code {
  font-size: 0.88em;
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.06);
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: 500;
}
html body .m-bot .body pre {
  background: #121214 !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 14px !important;
  padding: 14px 16px !important;
  font-size: 13px !important;
  line-height: 1.5;
}

/* User bubble */
html body .m-user {
  background: #1c1c1f !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 18px 18px 6px 18px !important;
  padding: 11px 16px !important;
  font-size: 15.25px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  box-shadow: none !important;
  color: #f0efea;
}
html body .m-uw { margin: 18px 0; }
html body .m-bot { margin: 18px 0 22px; }
html body .m-acts {
  margin-top: 10px !important;
  opacity: 0.4;
  transition: opacity .2s;
}
html body .m-bot:hover .m-acts { opacity: 0.85; }

/* Empty state */
html body .chatview.empty .greeting { margin-top: 22vh !important; }
html body .xg h2 {
  font-weight: 450 !important;
  font-size: clamp(24px, 4.5vw, 32px) !important;
  letter-spacing: -0.03em !important;
  color: #f4f3ee !important;
  opacity: 1 !important;
}

/* Composer — refined floating control */
html body .composer {
  background: #18181a !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 24px !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 8px 28px rgba(0,0,0,.4),
    0 2px 6px rgba(0,0,0,.25) !important;
  padding: 7px 8px !important;
  min-height: 54px !important;
}
html body .composer:focus-within {
  border-color: rgba(255,255,255,.18) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 10px 32px rgba(0,0,0,.45),
    0 0 0 3px rgba(255,255,255,.04) !important;
}
html body .composer textarea,
html body #msg {
  font-size: 15.5px !important;
  letter-spacing: -0.01em;
  color: #f2f1ec !important;
  padding: 10px 8px !important;
}
html body #msg::placeholder {
  color: #6e6d69 !important;
  font-weight: 400;
}
html body .composer .send {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  background: #f0efe9 !important;
  color: #0e0e0f !important;
  border-radius: 50% !important;
  transition: background .15s, transform .15s !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
html body .composer .send:hover {
  background: #fff !important;
  transform: scale(1.04) !important;
  box-shadow: none !important;
}
html body .composer .send:active {
  transform: scale(0.94) !important;
}
html body .composer .mode {
  height: 32px !important;
  padding: 0 11px !important;
  font-size: 13px !important;
  font-weight: 550 !important;
  letter-spacing: -0.01em;
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 999px !important;
  color: #c8c7c2 !important;
}
html body .composer .mode:hover {
  background: rgba(255,255,255,.09) !important;
  color: #eee !important;
}
html body .composer #attBtn,
html body .composer .icon-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #a8a79f !important;
  transition: background .15s, color .15s;
}
html body .composer #attBtn:hover,
html body .composer .icon-btn:hover {
  background: rgba(255,255,255,.07) !important;
  color: #eee !important;
}

/* Top bar controls */
html body .main > .topbar {
  padding: 10px 14px !important;
}
html body .topbar .icon-btn,
html body .xtog,
html body .xgrp button {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  color: #c4c3bd !important;
  transition: background .15s, color .15s !important;
}
html body .topbar .icon-btn:hover,
html body .xtog:hover,
html body .xgrp button:hover {
  background: rgba(255,255,255,.07) !important;
  color: #f2f1ec !important;
}
html body .xgrp {
  gap: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

/* Sidebar premium */
html body #sideChat .xwm {
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: -0.025em !important;
  color: #f2f1ec !important;
  padding: 8px 10px 18px !important;
}
html body #sideChat .xnav {
  gap: 2px;
  padding: 0 4px;
}
html body #sideChat .xnav button {
  border-radius: 11px !important;
  padding: 10px 12px !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
  color: #c9c8c2 !important;
}
html body #sideChat .xnav button:hover {
  background: rgba(255,255,255,.055) !important;
  color: #f2f1ec !important;
}
html body #sideChat .xnav button.on {
  background: rgba(255,255,255,.08) !important;
  color: #f5f4f0 !important;
}
html body #sideChat .side-label {
  font-size: 11.5px !important;
  font-weight: 560 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: #6a6965 !important;
  opacity: 1 !important;
  margin: 20px 12px 6px !important;
}
html body #sideChat .chat-i {
  border-radius: 11px !important;
  padding: 10px 12px !important;
  margin: 1px 4px;
  transition: background .15s;
}
html body #sideChat .chat-i:hover {
  background: rgba(255,255,255,.045) !important;
}
html body #sideChat .chat-i.on {
  background: rgba(255,255,255,.08) !important;
}
html body #sideChat .chat-i span {
  font-size: 14px;
  letter-spacing: -0.01em;
  color: #d0cfc9;
}
html body #sideChat .chat-i.on span { color: #f2f1ec; }
html body #sideChat .xfab {
  background: #f0efe9 !important;
  color: #0e0e0f !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.35) !important;
  width: 52px !important;
  height: 52px !important;
}
html body #sideChat .xfab:hover {
  background: #fff !important;
}
html body #sideChat .user {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  border-radius: 14px !important;
}
html body #sideChat .user:hover {
  background: rgba(255,255,255,.07) !important;
}
html body #sideChat .user::after {
  font-weight: 550 !important;
  letter-spacing: -0.01em;
}

/* Menus & sheets */
html body .menu {
  background: #1c1c1e !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 0 0.5px rgba(255,255,255,.04) !important;
  padding: 6px !important;
}
html body .menu button {
  border-radius: 10px !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em;
  height: 40px !important;
}
html body .menu button:hover {
  background: rgba(255,255,255,.07) !important;
}
html body .sheet,
html body .xs {
  background: #1a1a1c !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 20px !important;
  box-shadow: 0 24px 60px rgba(0,0,0,.55) !important;
}
html body .toast {
  background: #f2f1ec !important;
  color: #0e0e0f !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-size: 13.5px !important;
  font-weight: 550 !important;
  letter-spacing: -0.01em;
  padding: 11px 18px !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.4) !important;
}

/* Foot */
html body .dock .foot {
  font-size: 10.5px !important;
  letter-spacing: 0.01em !important;
  color: #5a5955 !important;
  opacity: 1 !important;
  margin-top: 8px;
}

/* Scrollbar refined */
html body .chatview .convo::-webkit-scrollbar { width: 6px; }
html body .chatview .convo::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.1);
  border-radius: 6px;
}
html body .chatview .convo::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.16);
}

/* Selection */
html body ::selection {
  background: rgba(180, 170, 140, .28);
  color: #fff;
}

/* Convo max width breathing room */
html body .msgs,
html body .greeting {
  max-width: 740px !important;
}
html body .dock {
  max-width: 780px !important;
  padding: 6px 16px calc(14px + env(safe-area-inset-bottom, 0px)) !important;
}
html body .chatview .convo {
  padding: 12px 20px 16px !important;
}

/* Thoughts / status quieter */
html body .thoughts,
html body .think {
  color: #6e6d69 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: -0.005em;
}

/* ===== v16: fully rounded buttons ===== */
html body .topbar .icon-btn,
html body .xtog,
html body .xgrp button,
html body .composer #attBtn,
html body .composer .icon-btn,
html body .composer .send,
html body .m-acts .icon-btn,
html body .icon-btn {
  border-radius: 999px !important;
}
html body .composer .mode,
html body .mode,
html body .btn,
html body .sheet .btn,
html body .sheet .btn.wide,
html body #logout,
html body #clearAll,
html body .nochat .btn,
html body .quick button,
html body .chip,
html body .menu button,
html body #sideChat .xnav button,
html body #sideChat .chat-i,
html body #sideChat .xfab,
html body #sideChat .user,
html body .xpill,
html body .xgrp {
  border-radius: 999px !important;
}
/* composer itself already pill-like; keep soft round */
html body .composer {
  border-radius: 999px !important;
}
/* keep menu panel itself slightly less extreme so it doesn't look odd */
html body .menu {
  border-radius: 18px !important;
}
html body .menu button {
  border-radius: 999px !important;
}

/* ===== v17: ZERO black bars — floating header + input only ===== */
/* Kill safe-area solid strip on main (was showing as top black bar) */
html body .main,
html body #mainChat {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* Topbar: absolute float, zero background, no bar */
html body .main > .topbar,
html body #mainChat > header.topbar,
html body header.topbar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 30 !important;
  margin: 0 !important;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  outline: none !important;
  pointer-events: none; /* bar itself doesn't block; children still clickable */
}
html body .main > .topbar > *,
html body header.topbar > * {
  pointer-events: auto;
}
html body .main > .topbar::before,
html body .main > .topbar::after,
html body header.topbar::before,
html body header.topbar::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* Chat view fills entire main under the floating chrome */
html body #viewChat.view.chatview,
html body .view.chatview {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: transparent !important;
  background-color: transparent !important;
  min-height: 0 !important;
  height: 100% !important;
}

/* Conversation scrolls full height; padding leaves room for floating controls */
html body .chatview .convo,
html body #convo {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding-top: calc(56px + env(safe-area-inset-top, 0px)) !important;
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  background: transparent !important;
}

/* Dock: floating at bottom, zero bar behind input */
html body .dock,
html body #viewChat .dock {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 30 !important;
  margin: 0 auto !important;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  max-width: 780px !important;
  width: 100% !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  pointer-events: none;
}
html body .dock > * {
  pointer-events: auto;
}
html body .dock::before,
html body .dock::after {
  display: none !important;
  content: none !important;
  background: none !important;
}

/* Hide foot line under input (reads as a bar) */
html body .dock .foot,
html body .foot {
  display: none !important;
}

/* Spacers gone */
html body .sp.sp-top,
html body .sp.sp-bot,
html body #viewChat > .sp {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}

/* Composer is the only solid piece — floats alone */
html body .composer {
  background: #18181a !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 8px 28px rgba(0,0,0,.45) !important;
}

/* Other page views still need top padding under floating topbar */
html body .view.page {
  padding-top: calc(56px + env(safe-area-inset-top, 0px)) !important;
  background: transparent !important;
}

/* ===== v18: weak glass blur on buttons + input; hide All chats ===== */
html body #sideChat .xall { display: none !important; }

/* Weak blur glass — see content behind */
html body .composer,
html body .topbar .icon-btn,
html body .xtog,
html body .xgrp button,
html body .composer #attBtn,
html body .composer .icon-btn,
html body .composer .mode,
html body .mode,
html body .chip,
html body .xpill {
  -webkit-backdrop-filter: blur(10px) saturate(1.15) !important;
  backdrop-filter: blur(10px) saturate(1.15) !important;
  background: rgba(28, 28, 30, 0.42) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22) !important;
}
html body .composer {
  background: rgba(24, 24, 26, 0.48) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35) !important;
}
html body .composer:focus-within {
  background: rgba(28, 28, 30, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4) !important;
}
/* Send stays solid cream so it stays readable */
html body .composer .send {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: #f0efe9 !important;
  border: 0 !important;
  color: #0e0e0f !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
}
/* FAB solid too */
html body #sideChat .xfab {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: #f0efe9 !important;
  border: 0 !important;
}
/* Give chat list more vertical room without All chats */
html body #sideChat .chat-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  margin-top: 4px !important;
}

/* ===== v19: blue almost gone — neutral accents only ===== */
html body .xs .row.blue,
html body a,
html body .body a {
  color: rgba(220, 218, 210, 0.92) !important;
}
html body .composer:focus-within {
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38) !important;
}
html body .field:focus {
  border-color: rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04) !important;
}
html body ::selection {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
}
html body .menu .beta {
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(200, 198, 190, 0.9) !important;
}
html body .code-tag,
html body #sideChat .chat-i span.code-tag {
  color: rgba(200, 198, 190, 0.85) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
html body .install-guide .ig-n {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #f0efe9 !important;
}
html body .xg img {
  box-shadow: none !important;
}
/* login life text glow — kill cyan */
html body #login .lg-life {
  text-shadow: none !important;
  color: rgba(200, 198, 190, 0.7) !important;
}
/* any leftover system blue links/buttons */
html body [style*="138,180"],
html body [style*="#8ab4"],
html body [style*="#0a84"],
html body [style*="#9fc0"] {
  color: rgba(210, 208, 200, 0.9) !important;
}

/* ===== v20: blur super weak (user meant blur, not blue) ===== */
html body .composer,
html body .topbar .icon-btn,
html body .xtog,
html body .xgrp button,
html body .composer #attBtn,
html body .composer .icon-btn,
html body .composer .mode,
html body .mode,
html body .chip,
html body .xpill {
  -webkit-backdrop-filter: blur(3px) saturate(1.05) !important;
  backdrop-filter: blur(3px) saturate(1.05) !important;
  background: rgba(28, 28, 30, 0.55) !important;
}
html body .composer {
  -webkit-backdrop-filter: blur(4px) saturate(1.05) !important;
  backdrop-filter: blur(4px) saturate(1.05) !important;
  background: rgba(24, 24, 26, 0.58) !important;
}
html body .composer:focus-within {
  -webkit-backdrop-filter: blur(5px) saturate(1.08) !important;
  backdrop-filter: blur(5px) saturate(1.08) !important;
  background: rgba(26, 26, 28, 0.62) !important;
}
/* send stays solid */
html body .composer .send {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: #f0efe9 !important;
}

/* ===== v21: circular buttons, mobile X, composer expand, code in list ===== */
/* Force true circles — equal box, no oval */
html body .topbar .icon-btn,
html body .xtog,
html body .xgrp button,
html body .composer #attBtn,
html body .composer .icon-btn,
html body .composer .send,
html body #sideChat .xfab {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
html body .xgrp {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  gap: 6px !important;
  padding: 0 !important;
  height: auto !important;
  border-radius: 0 !important;
}
html body #sideChat .xfab {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  border-radius: 50% !important;
}

/* Mobile X close on sidebar */
html body #sideChat .xclose {
  display: none;
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 12px;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  color: var(--tx);
  place-items: center;
  z-index: 6;
  cursor: pointer;
  padding: 0;
}
html body #sideChat .xclose svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 899px) {
  html body #sideChat .xclose {
    display: grid !important;
  }
}

/* Hide separate code section — items live in main list */
html body #codeSec {
  display: none !important;
}

/* Code tag chip in normal chat row */
html body #sideChat .chat-i .code-tag,
html body .chat-i .code-tag {
  flex: none !important;
  font-size: 10px !important;
  font-weight: 650 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(210, 208, 200, 0.9) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
  padding: 2px 7px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  line-height: 1.3;
}
html body #sideChat .chat-i.code-chat span:first-of-type {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Composer: quiet pill at rest, alive rectangle while typing */
html body .composer {
  border-radius: 999px !important;
  min-height: 52px !important;
  align-items: center !important;
  transition: border-radius 0.28s ease, min-height 0.28s ease, padding 0.28s ease, box-shadow 0.28s ease !important;
}
html body .composer.expanded {
  border-radius: 18px !important;
  min-height: 76px !important;
  align-items: flex-end !important;
  padding: 10px 10px 10px 12px !important;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4) !important;
}
html body .composer.expanded textarea,
html body .composer.expanded #msg {
  max-height: 140px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
html body .composer.expanded .send,
html body .composer.expanded #attBtn,
html body .composer.expanded .mode {
  margin-bottom: 2px;
}

/* ===== v22: stop X → / → X when thinking > 3s ===== */
html body .composer .send .stop-x {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
}
html body .composer .send .stop-x i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  margin: 0;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center center;
  transition: none;
}
html body .composer .send .stop-x i:first-child {
  transform: translateX(-50%) rotate(45deg);
}
html body .composer .send .stop-x i:last-child {
  transform: translateX(-50%) rotate(-45deg);
}
/* After 3s: smooth X morphs to slash, then back */
html body .composer .send.long-think .stop-x i:first-child {
  animation: xmmXArmA 1.7s cubic-bezier(.45,.05,.25,1) infinite;
}
html body .composer .send.long-think .stop-x i:last-child {
  animation: xmmXArmB 1.7s cubic-bezier(.45,.05,.25,1) infinite;
}
@keyframes xmmXArmA {
  0%, 8% { transform: translateX(-50%) rotate(45deg); opacity: 1; }
  42%, 58% { transform: translateX(-50%) rotate(-28deg); opacity: 1; }
  92%, 100% { transform: translateX(-50%) rotate(45deg); opacity: 1; }
}
@keyframes xmmXArmB {
  0%, 8% { transform: translateX(-50%) rotate(-45deg); opacity: 1; }
  42%, 58% { transform: translateX(-50%) rotate(-28deg); opacity: 0; }
  92%, 100% { transform: translateX(-50%) rotate(-45deg); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html body .composer .send.long-think .stop-x i {
    animation: none !important;
  }
}

/* ===== v23: bugfix — hitboxes, code tag, code topbar, overlaps ===== */
/* Kill old code-tag "</>" glyph + zero-font hacks */
html body .code-tag,
html body #sideChat .chat-i span.code-tag,
html body .chat-i .code-tag {
  font-size: 10px !important;
  font-weight: 650 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: rgba(210, 208, 200, 0.9) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 999px !important;
  padding: 2px 8px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  line-height: 1.3 !important;
  display: inline-flex !important;
  align-items: center !important;
  flex: none !important;
  overflow: visible !important;
}
html body .code-tag::before,
html body .code-tag::after {
  content: none !important;
  display: none !important;
}



/* Topbar buttons: clean circles, no oversized hit areas */
html body .main > .topbar,
html body header.topbar {
  pointer-events: none !important;
}
html body .main > .topbar > *,
html body header.topbar > *,
html body .main > .topbar .xtog,
html body .main > .topbar .xgrp,
html body .main > .topbar .xgrp button,
html body .main > .topbar .icon-btn {
  pointer-events: auto !important;
}
html body .xgrp {
  display: flex !important;
  gap: 8px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  height: auto !important;
  width: auto !important;
  overflow: visible !important;
}
html body .xgrp button,
html body .topbar .xtog,
html body .topbar .icon-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  flex: none !important;
  overflow: hidden !important;
}

/* Code mode: no chat/code slider; simple top bar */
html body #code > .topbar .seg,
html body #code .seg {
  display: none !important;
}
html body #code .cd-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--tx);
  margin-left: 4px;
}
html body #code > .topbar {
  position: relative !important;
  background: transparent !important;
  pointer-events: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 14px !important;
  margin: 0 !important;
}
html body #code .cd-tog,
html body #code #cdTog {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
}
@media (min-width: 821px) {
  html body #code #cdTog {
    display: none !important; /* preview always visible on desktop */
  }
}

/* Reduce overlap: chat list rows */
html body #sideChat .chat-i {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
html body #sideChat .chat-i > span:first-of-type {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* stop-x visible over send styles */
html body .composer .send.is-busy,
html body .composer .send.long-think {
  background: #f0efe9 !important;
  color: #0e0e0f !important;
}
html body .composer .send .stop-x {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
}
html body .composer .send .stop-x i {
  display: block !important;
  background: currentColor !important;
}

/* ===== v24: smooth composer expand / collapse ===== */
html body .composer {
  border-radius: 28px !important;
  min-height: 52px !important;
  padding: 7px 8px !important;
  align-items: center !important;
  transition:
    border-radius 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    min-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.3s ease,
    border-color 0.3s ease !important;
  will-change: border-radius, min-height, padding;
}
html body .composer.expanded {
  border-radius: 18px !important;
  min-height: 84px !important;
  padding: 12px 12px 12px 14px !important;
  align-items: flex-end !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.42) !important;
}
html body .composer textarea,
html body .composer #msg {
  transition: max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1), padding 0.3s ease !important;
  max-height: 40px;
}
html body .composer.expanded textarea,
html body .composer.expanded #msg {
  max-height: 140px !important;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}
html body .composer .send,
html body .composer #attBtn,
html body .composer .mode,
html body .composer .icon-btn {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, margin 0.35s ease !important;
}
html body .composer.expanded .send,
html body .composer.expanded #attBtn,
html body .composer.expanded .mode,
html body .composer.expanded .icon-btn {
  margin-bottom: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html body .composer,
  html body .composer textarea,
  html body .composer #msg {
    transition: none !important;
  }
}

/* ===== v25: fix square hitbox on new-chat; expand only when text long ===== */
/* Kill double outline (square + circle) on topbar icon buttons */
html body .xgrp {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  height: auto !important;
  width: auto !important;
  overflow: visible !important;
  border-radius: 0 !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html body .xgrp button,
html body .topbar .xgrp button,
html body .main > .topbar .xgrp button {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  background: rgba(28,28,30,.55) !important;
  box-shadow: none !important;
  outline: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
html body .xgrp button::before,
html body .xgrp button::after,
html body .topbar .icon-btn::before,
html body .topbar .icon-btn::after,
html body .xtog::before,
html body .xtog::after {
  display: none !important;
  content: none !important;
}
html body .xgrp button:focus,
html body .xgrp button:focus-visible,
html body .topbar .icon-btn:focus,
html body .xtog:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Composer stays pill until content is actually tall */
html body .composer {
  border-radius: 999px !important;
  min-height: 52px !important;
  align-items: center !important;
}
html body .composer.expanded {
  border-radius: 18px !important;
  min-height: 72px !important;
  align-items: flex-end !important;
}
html body .composer #msg,
html body .composer textarea {
  max-height: 160px !important;
  overflow-y: auto !important;
}

/* ===== v26: thinking X anim + pure-circle new chat ===== */
/* Thinking row: X morph next to label */
html body .think {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--mu) !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
}
html body .think .think-x {
  position: relative;
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: none;
}
html body .think .think-x i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1.75px;
  height: 100%;
  margin: 0;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center center;
}
html body .think .think-x i:first-child {
  transform: translateX(-50%) rotate(45deg);
  animation: xmmXArmA 1.7s cubic-bezier(.45,.05,.25,1) infinite;
}
html body .think .think-x i:last-child {
  transform: translateX(-50%) rotate(-45deg);
  animation: xmmXArmB 1.7s cubic-bezier(.45,.05,.25,1) infinite;
}
html body .think .think-lbl {
  line-height: 1;
}
/* hide old bouncing dots if any remain */
html body .think > i {
  display: none !important;
}

/* New chat: ONLY a circle — no parent box, no square shell */
html body .xgrp {
  display: none !important;
}
html body button.xnew,
html body .topbar button.xnew,
html body .main > .topbar > button.xnew {
  all: unset;
  box-sizing: border-box !important;
  display: grid !important;
  place-items: center !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(28, 28, 30, 0.55) !important;
  color: #c4c3bd !important;
  cursor: pointer !important;
  flex: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-backdrop-filter: blur(4px) !important;
  backdrop-filter: blur(4px) !important;
  transition: background 0.15s, color 0.15s, transform 0.15s !important;
}
html body button.xnew svg,
html body .topbar button.xnew svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}
html body button.xnew:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #f2f1ec !important;
}
html body button.xnew:active {
  transform: scale(0.94) !important;
}
html body button.xnew:focus,
html body button.xnew:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
html body button.xnew::before,
html body button.xnew::after {
  content: none !important;
  display: none !important;
}
@media (prefers-reduced-motion: reduce) {
  html body .think .think-x i {
    animation: none !important;
  }
}

/* ===== v27: bigger X→/ animation ===== */
html body .composer .send .stop-x {
  width: 18px !important;
  height: 18px !important;
}
html body .composer .send .stop-x i {
  width: 2.25px !important;
}
html body .think .think-x {
  width: 20px !important;
  height: 20px !important;
}
html body .think .think-x i {
  width: 2.5px !important;
}
html body .think {
  gap: 12px !important;
  font-size: 15px !important;
}

/* ===== v28: watermark is in the image; hide UI overlay when baked ===== */
html body .genbox.baked .gtag,
html body .sv-wrap.baked .gtag,
html body #svView.baked .gtag {
  display: none !important;
}
/* fallback overlay (only while not baked) sits left to match bake */
html body .gtag {
  left: 8px !important;
  right: auto !important;
}
