/* XMM AI v664 — Liquid Glass redesign (iOS 26 style). Loaded last. Mascot (#mas, #masp, .mas) is intentionally untouched. */
:root{
 --sf:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Inter",system-ui,"Segoe UI",Roboto,sans-serif;
 --mono:"SF Mono","JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;
 --ac:#ff8a5b;--ac2:#ff6a3d;
 --gl:rgba(255,255,255,.075);--gl2:rgba(255,255,255,.14);--glb:rgba(255,255,255,.17);
 --gl-hi:inset 0 1px 0 rgba(255,255,255,.30),inset 0 -1px 0 rgba(255,255,255,.04),inset 0 0 18px rgba(255,255,255,.03);
 --gl-sh:0 10px 34px rgba(0,0,0,.38);
 --gl-bl:blur(24px) saturate(180%);
 --r1:14px;--r2:20px;--r3:28px;--spring:cubic-bezier(.34,1.4,.5,1);--ease:cubic-bezier(.22,.8,.24,1);
 --tx:#f5f5f7;--dim:#a1a1a8;--dim2:#78787f;--ln:rgba(255,255,255,.14);--card:rgba(255,255,255,.075);--win:transparent;--code:rgba(0,0,0,.35);
 color-scheme:dark}
html.d-android,html.d-fold{--gl-bl:blur(14px) saturate(160%)}
/* ---------- ambient backdrop (what the glass refracts) ---------- */
html,html body{background:transparent!important}
html{background:radial-gradient(60% 45% at 12% 8%,rgba(255,130,90,.26),transparent 70%),radial-gradient(55% 50% at 92% 88%,rgba(86,110,255,.30),transparent 70%),radial-gradient(40% 35% at 70% 20%,rgba(190,90,255,.14),transparent 70%),#08080d!important}
#dots660{opacity:.55}
html body{font-family:var(--sf)!important;font-size:16px;line-height:1.5;color:var(--tx);-webkit-font-smoothing:antialiased}
html body #win,html.d-android body #win,html.d-fold body #win{background:transparent!important;background-image:none!important}
html body #win::before,html body #win::after{display:none!important}
html body :is(code,pre,kbd,samp){font-family:var(--mono)!important}
/* ---------- glass primitives ---------- */
html body :is(#top,#in,#side,#menu,.box,.cb,.u,#stabs,.home .cards button,#snew){-webkit-backdrop-filter:var(--gl-bl);backdrop-filter:var(--gl-bl)}
/* ---------- top bar: floating ---------- */
html body #top{margin:calc(env(safe-area-inset-top,0px) + 10px) 12px 0!important;padding:6px!important;background:var(--gl)!important;border:1px solid var(--glb)!important;border-radius:999px!important;box-shadow:var(--gl-hi),var(--gl-sh)!important;position:relative;z-index:5}
html body #top .tt{color:var(--tx)!important;font:600 15px var(--sf)!important;letter-spacing:-.01em}
html body :is(#sbtn,#nbtn,#sx,#plus,#go,#thk,#vbtn,#mchip,.lgx){font-family:var(--sf)!important;-webkit-tap-highlight-color:transparent;transition:transform .25s var(--spring),background .2s,box-shadow .2s,border-color .2s}
html body :is(#sbtn,#nbtn,#sx,#plus,#thk,#vbtn,#mchip,.lgx){background:var(--gl)!important;border:1px solid var(--glb)!important;color:var(--tx)!important;border-radius:999px!important;box-shadow:var(--gl-hi)!important}
html body :is(#sbtn,#nbtn,#sx,#plus,#thk,#vbtn,#mchip,.lgx):hover{background:var(--gl2)!important;border-color:rgba(255,255,255,.28)!important}
html body :is(#sbtn,#nbtn,#sx,#plus,#go,#thk,#vbtn,#mchip,#snew,.lgx,.home .cards button):active{transform:scale(.94)}
html body :is(#sbtn,#sx,#plus,#vbtn){width:42px!important;height:42px!important;padding:0!important;display:inline-grid!important;place-items:center}
html body #nbtn{height:42px!important;padding:0 18px!important;font-weight:600;font-size:14px!important}
html body #nbtn .pl{font-size:20px!important;margin-right:2px}
html body #go{width:42px!important;height:42px!important;border-radius:999px!important;border:1px solid rgba(255,255,255,.35)!important;background:linear-gradient(180deg,rgba(255,255,255,.4),var(--ac2))!important;color:#fff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.55),0 6px 18px rgba(255,106,61,.35)!important;font-size:19px;font-weight:700}
html body #thk{height:34px!important;padding:0 12px!important;font-size:13px!important;gap:6px}
html body #thk.on{background:rgba(255,255,255,.12)!important;border-color:rgba(255,255,255,.12)!important;color:#ffd9c9!important}
html body #mchip{height:34px!important;padding:0 12px!important;font-size:12.5px!important;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* ---------- composer: one floating glass pill ---------- */
html body #in{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:8px!important;width:calc(100% - 24px)!important;max-width:820px!important;min-height:58px;margin:0 auto max(12px,env(safe-area-inset-bottom,0px))!important;padding:8px 8px 8px 8px!important;background:var(--gl)!important;border:1px solid var(--glb)!important;border-radius:32px!important;box-shadow:var(--gl-hi),var(--gl-sh)!important;transition:box-shadow .3s,border-color .3s,background .3s}
html body #in:focus-within{border-color:rgba(255,255,255,.4)!important;background:rgba(255,255,255,.1)!important;box-shadow:var(--gl-hi),var(--gl-sh),0 0 0 4px rgba(255,255,255,.12)!important}
html body #in #plus{order:0}html body #in #ta{order:1;flex:1 1 auto!important;min-width:0;min-height:0!important;height:1.5em;padding:0 6px!important;font:400 17px/1.45 var(--sf)!important;color:var(--tx)!important;background:transparent!important;caret-shape:auto;caret-color:var(--ac)}
html body #in #thk{order:2}html body #in #mchip{order:3}html body #in #vbtn{order:4}html body #in #go{order:5;margin-left:0!important}
html body #in #ta::placeholder{color:var(--dim2)}
html body #in .p,html body .sep,html body #hint{display:none!important}
html body #in:has(#ta){position:relative}
/* ---------- sidebar: floating rounded glass ---------- */
html body #side{top:10px!important;bottom:10px!important;left:10px!important;height:auto!important;border-radius:30px!important;width:min(88vw,330px)!important;padding:calc(env(safe-area-inset-top,0px) + 16px) 12px 12px!important;background:rgba(22,22,30,.55)!important;border:1px solid var(--glb)!important;box-shadow:var(--gl-hi),0 20px 60px rgba(0,0,0,.5)!important;transform:translateX(-112%);transition:transform .45s var(--ease)!important}
html body.so #side{transform:none!important}
html body #sbk{background:rgba(0,0,0,.35)!important;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}
html body #side .sh{color:var(--tx)!important;font:700 20px var(--sf)!important;padding:0 6px;letter-spacing:-.02em}
html body #stabs{display:flex;padding:4px!important;gap:2px;background:rgba(255,255,255,.06)!important;border:1px solid var(--ln)!important;border-radius:999px!important}
html body #stabs button{flex:1;border:0!important;border-radius:999px!important;background:transparent!important;color:var(--dim)!important;padding:8px 10px!important;font:600 13px var(--sf)!important;box-shadow:none!important;transition:background .25s var(--ease),color .2s}
html body #stabs button.on{background:var(--gl2)!important;color:var(--tx)!important;box-shadow:var(--gl-hi)!important}
html body #snew{width:100%;border-radius:999px!important;padding:12px 16px!important;font:600 15px var(--sf)!important;text-align:center!important;color:#fff!important;background:linear-gradient(180deg,rgba(255,255,255,.4),var(--ac2))!important;border:1px solid rgba(255,255,255,.35)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.5),0 6px 18px rgba(255,106,61,.3)!important}
html body #side .si{border-radius:16px!important;padding:11px 12px!important;font:500 14.5px var(--sf)!important;color:var(--tx);border:1px solid transparent!important;transition:background .2s,transform .2s var(--spring)}
html body #side .si:hover{background:rgba(255,255,255,.07)!important}
html body #side .si.on{background:var(--gl2)!important;border-color:var(--glb)!important;box-shadow:var(--gl-hi);color:var(--tx)!important}
html body #side .si small{color:var(--dim2)}
@media(min-width:900px){
 html body #side{width:calc(var(--side) - 10px)!important;transform:none!important}
 html body.sc #side{transform:translateX(-112%)!important}
 html body #win{left:calc(var(--side) + 4px)!important}
 html body.sc #win{left:0!important}
}
/* ---------- chat ---------- */
html body #log{padding:20px 18px 12px!important;font:400 16.5px/1.6 var(--sf)}
html body #log .row{font-family:var(--sf)}
html body .u{display:block!important;width:fit-content;max-width:86%;margin:0 0 16px auto!important;padding:10px 16px!important;background:rgba(255,255,255,.12)!important;border:1px solid rgba(255,255,255,.4)!important;border-radius:22px 22px 8px 22px!important;box-shadow:var(--gl-hi);animation:pop664 .38s var(--spring) both}
html body .u>span:first-child{display:none!important}
html body .a{gap:12px;animation:pop664 .4s var(--ease) both}
html body .a>.dot{color:var(--ac)!important;font-size:12px;margin-top:6px}
html body .body{color:var(--tx);font-size:16.5px}
html body .body h1,html body .body h2,html body .body h3{color:var(--tx)!important;font-weight:700;font-size:1.1em}
html body .body code{background:rgba(255,255,255,.1)!important;color:#ffcfba!important;border-radius:8px!important;padding:2px 7px!important}
html body .body a{color:#8fc1ff}
html body .cb{background:rgba(0,0,0,.38)!important;border:1px solid var(--glb)!important;border-radius:var(--r2)!important;box-shadow:var(--gl-hi)!important;overflow:hidden}
html body .cb header{background:rgba(255,255,255,.06)!important;padding:8px 12px 8px 16px!important;color:var(--dim)!important;font:600 12px var(--sf)!important;border-bottom:1px solid var(--ln)}
html body .cb header button{background:var(--gl)!important;border:1px solid var(--glb)!important;border-radius:999px!important;padding:4px 12px!important;color:var(--tx)!important;font:600 12px var(--sf)!important;transition:transform .2s var(--spring)}
html body .cb header button:active{transform:scale(.92)}
html body .box{background:var(--gl)!important;border:1px solid var(--glb)!important;border-radius:var(--r2)!important;box-shadow:var(--gl-hi)!important}
@keyframes pop664{from{opacity:0;transform:translateY(10px) scale(.97)}to{opacity:1;transform:none}}
/* ---------- menus ---------- */
html body #menu{background:rgba(28,28,36,.6)!important;border:1px solid var(--glb)!important;border-radius:22px!important;padding:6px!important;box-shadow:var(--gl-hi),0 18px 50px rgba(0,0,0,.5)!important;bottom:calc(100% + 10px)!important;left:0!important;right:0!important;transform-origin:50% 100%;animation:menu664 .22s var(--ease)}
html body #menu div{border-radius:14px!important;padding:10px 12px!important;font:500 15px var(--sf)}
html body #menu div.on{background:var(--gl2)!important;color:var(--tx)!important;box-shadow:var(--gl-hi)}
@keyframes menu664{from{opacity:0;transform:scale(.94) translateY(6px)}to{opacity:1;transform:none}}
/* ---------- home hero ---------- */
html body .home{display:flex;flex-direction:column;align-items:center;gap:6px;animation:pop664 .5s var(--ease) both}
html body .home .hm{display:flex!important;flex-direction:column!important;align-items:center!important;gap:14px!important;margin:0 0 22px!important}
html body .home .hm>svg,html body .home .hm>img{width:76px!important;height:76px!important;flex:none;border-radius:22px;filter:drop-shadow(0 10px 24px rgba(0,0,0,.45));object-fit:contain}
html body .home h1{font:700 28px/1.2 var(--sf)!important;letter-spacing:-.025em;color:var(--tx)!important;text-align:center;margin:0}
html body .home .cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;width:100%;max-width:760px;margin:0 0 24px!important}
html body .home .cards button{background:var(--gl)!important;border:1px solid var(--glb)!important;border-radius:var(--r2)!important;padding:16px 16px!important;font:500 14.5px/1.5 var(--sf)!important;color:var(--tx)!important;box-shadow:var(--gl-hi)!important;transition:transform .3s var(--spring),background .2s}
html body .home .cards button:hover{background:var(--gl2)!important;transform:translateY(-3px)}
html body .home .cards code{background:rgba(255,255,255,.1)!important;color:#ffcfba!important;border-radius:7px}
@media(max-width:640px){html body .home .cards{grid-template-columns:1fr}html body .home h1{font-size:23px!important}}
html body.n660 #log .row.or{font:600 21px/1.3 var(--sf)!important;color:var(--tx)!important;letter-spacing:-.02em}
html body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea:not(#ta)){font-family:var(--sf);background:rgba(255,255,255,.07)!important;border:1px solid var(--glb)!important;border-radius:16px!important;color:var(--tx)!important;padding:12px 14px;outline:0;box-shadow:inset 0 1px 0 rgba(255,255,255,.08);transition:border-color .2s,box-shadow .2s}
html body :is(input,select,textarea):focus{border-color:rgba(255,255,255,.4)!important;box-shadow:0 0 0 4px rgba(255,255,255,.12)!important}html body :is(.btn,.primary,.pbtn){font-family:var(--sf)!important;border-radius:999px!important;font-weight:600}
/* ---------- switches + sliders (iOS) ---------- */
html body input[type=checkbox]{appearance:none;-webkit-appearance:none;width:51px;height:31px;border-radius:999px;background:rgba(255,255,255,.18);border:0;position:relative;cursor:pointer;vertical-align:middle;transition:background .3s var(--ease);padding:0;flex:none}
html body input[type=checkbox]::after{content:"";position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.35);transition:transform .35s var(--spring)}
html body input[type=checkbox]:checked{background:#34c759}
html body input[type=checkbox]:checked::after{transform:translateX(20px)}
html body input[type=range]{appearance:none;-webkit-appearance:none;height:6px;border-radius:999px;background:rgba(255,255,255,.2);border:0;padding:0;outline:0}
html body input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,.4);border:0}
html body input[type=range]::-moz-range-thumb{width:26px;height:26px;border-radius:50%;background:#fff;border:0}
/* ---------- misc: scrollbars, skeleton, toasts, focus ---------- */
html body ::-webkit-scrollbar{width:10px;height:10px}html body ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.2);border-radius:999px;border:3px solid transparent;background-clip:content-box}
html body ::-webkit-scrollbar-track{background:transparent}
.skel{position:relative;overflow:hidden;background:rgba(255,255,255,.08);border-radius:12px}
.skel::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.14),transparent);transform:translateX(-100%);animation:sk664 1.3s infinite}
@keyframes sk664{to{transform:translateX(100%)}}
html body :is(.toast,.toaster,[role=status],[role=alert]):not(#log):not(#vst){background:rgba(28,28,36,.7)!important;border:1px solid var(--glb)!important;border-radius:20px!important;-webkit-backdrop-filter:var(--gl-bl);backdrop-filter:var(--gl-bl);box-shadow:var(--gl-hi),var(--gl-sh)}
html body :is(button,[role=button],a,.si,input,textarea,select):focus-visible{outline:2px solid rgba(255,255,255,.4);outline-offset:2px}
@media(prefers-reduced-motion:reduce){html body *{animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* ---------- device tuning ---------- */
html.d-pc body #log,html.d-ipad body #log{max-width:820px!important}
html.d-ipad body #log,html.d-ipad body #in{max-width:900px!important}
html.d-ipad body{font-size:17px}
@media(max-width:560px){
 html body #mchip{max-width:96px}html body #in #thk .t{display:none}
 html body #top{margin-left:10px!important;margin-right:10px!important}
}
/* ---------- voice mode stays dark/full-screen ---------- */
html body #vo{background:#0d0d11!important}
/* ---------- light mode ---------- */
@media(prefers-color-scheme:light){
 :root{--tx:#1c1c1e;--dim:#6b6b73;--dim2:#8e8e96;--ln:rgba(0,0,0,.1);--card:rgba(255,255,255,.6);--code:rgba(255,255,255,.7);
  --gl:rgba(255,255,255,.55);--gl2:rgba(255,255,255,.8);--glb:rgba(255,255,255,.8);
  --gl-hi:inset 0 1px 0 rgba(255,255,255,.95),inset 0 -1px 0 rgba(0,0,0,.04);--gl-sh:0 10px 34px rgba(60,60,100,.16);color-scheme:light}
 html{background:radial-gradient(60% 45% at 12% 8%,rgba(255,150,110,.35),transparent 70%),radial-gradient(55% 50% at 92% 88%,rgba(110,140,255,.35),transparent 70%),#eef0f7!important}
 #dots660{filter:invert(1);opacity:.35}
 html body #side{background:rgba(255,255,255,.6)!important}
 html body #menu,html body #lg .lgc{background:rgba(255,255,255,.75)!important}
 html body .cb{background:rgba(255,255,255,.7)!important}html body .cb pre{color:#1c1c1e!important}
 html body .u{background:rgba(255,255,255,.12)!important}
 html body .body code,html body .home .cards code{background:rgba(0,0,0,.07)!important;color:#b23a14!important}
 html body :is(#sbtn,#nbtn,#sx,#plus,#thk,#vbtn,#mchip){color:#1c1c1e!important}
 html body #in #ta{color:#1c1c1e!important}
 html body :is(input,select,textarea):not(#ta){background:rgba(255,255,255,.7)!important;color:#1c1c1e!important}
}
/* ---------- fixes after first render ---------- */
html body .u{width:fit-content!important;max-width:86%!important;margin-left:auto!important;margin-right:0!important;flex:none}
html body .u div,html body .u>div{background:transparent!important;color:var(--tx)!important;border:0!important;padding:0!important;font:400 16.5px/1.5 var(--sf)}
html body .cb code,html body .cb pre code{background:none!important;color:inherit!important;padding:0!important;border-radius:0!important}
html body .cb pre{padding:14px 16px!important;font-size:13.5px!important}
@media(min-width:900px){
 html body:not(.sc) #top{display:none!important}
 html body:not(.sc) #sbtn,html body:not(.sc) #nbtn{display:none!important}
 html body.sc #top{display:flex!important}
 html body #log{padding-top:26px!important}
}
html body #log .u,html body #log>.u{margin:0 0 16px auto!important;float:none}
html body #log .u+.a,html body #log .u{clear:both}
/* ---------- v665 fixes ---------- */
/* background lives on the canvas layer itself so nothing can paint over it */
#dots660{opacity:1!important;background:radial-gradient(60% 45% at 12% 8%,rgba(255,130,90,.26),transparent 70%),radial-gradient(55% 50% at 92% 88%,rgba(86,110,255,.30),transparent 70%),radial-gradient(40% 35% at 70% 20%,rgba(190,90,255,.14),transparent 70%),#08080d}
html body{background:transparent!important}
/* composer text box: no inner box/ring, ever */
html body #in #ta,html body #in #ta:focus,html body #in #ta:focus-visible{border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;padding:0 6px!important}
html body :is(input,select,textarea):not(#ta):focus{border-color:rgba(255,255,255,.4)!important;box-shadow:0 0 0 4px rgba(255,255,255,.12)!important}
html body #in:focus-within{box-shadow:var(--gl-hi),var(--gl-sh),0 0 0 3px rgba(255,255,255,.12)!important}
/* user bubble: never wraps letter by letter */
html body #log .u{display:block!important;width:max-content!important;min-width:44px;max-width:min(86%,640px)!important;box-sizing:border-box}
html body #log .u>div{white-space:pre-wrap!important;word-break:normal!important;overflow-wrap:anywhere;min-width:0;width:auto!important;display:block}
/* desktop with the sidebar collapsed: just two floating buttons, no wide empty bar */
@media(min-width:900px){html body.sc #top{background:transparent!important;border:0!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;position:absolute;left:0;right:0;top:0;margin:14px 16px 0!important}}
html body #in #plus{border:1px solid var(--glb)!important}
@media(prefers-color-scheme:light){#dots660{background:radial-gradient(60% 45% at 12% 8%,rgba(255,150,110,.35),transparent 70%),radial-gradient(55% 50% at 92% 88%,rgba(110,140,255,.35),transparent 70%),#eef0f7}}
html body #log>.u>div,html body #log .u>div{max-width:none!important;background:transparent!important;border:0!important;border-radius:0!important;padding:0!important}
html body #log>.u{justify-content:flex-start!important;padding:10px 16px!important;background:rgba(255,255,255,.12)!important;margin-left:auto!important}
