/* Nova on the web: a quiet chat. Ink, plum and ivory; violet only where something is live, gold only for Supernova. */
@font-face{font-family:Newsreader;font-style:normal;font-weight:200 800;font-display:swap;src:url(/fonts/newsreader-latin-opsz-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Newsreader;font-style:normal;font-weight:200 800;font-display:swap;src:url(/fonts/newsreader-latin-ext-opsz-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Newsreader;font-style:italic;font-weight:200 800;font-display:swap;src:url(/fonts/newsreader-latin-opsz-italic.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Newsreader;font-style:italic;font-weight:200 800;font-display:swap;src:url(/fonts/newsreader-latin-ext-opsz-italic.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/geist-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/geist-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/geist-mono-latin-wght-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Geist Mono';font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/geist-mono-latin-ext-wght-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Departure Mono';font-display:swap;src:url(/fonts/departure-mono-regular.woff2) format('woff2')}

:root{
  --bg:#0E0A0F;--side:#130D15;--raise:#1A121D;--raise2:#221826;--hover:rgba(242,236,227,.06);
  --text:#F2ECE3;--text2:#CDBFD0;--muted:#9C8AA0;--line:rgba(242,236,227,.09);--line2:rgba(242,236,227,.16);
  --vio:#9475C4;--vio2:#B49AE0;--gold:#FFD25E;--red:#E58A7E;
  --r:14px;--sw:272px;
  --mono:'Departure Mono',ui-monospace,monospace;
  --code:ui-monospace,SFMono-Regular,'Cascadia Code',Menlo,Consolas,monospace;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font:400 16px/1.6 Geist,system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent}
body{overflow:hidden}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0}
a{color:var(--vio2)}
::selection{background:rgba(148,117,196,.4)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
:focus-visible{outline:2px solid var(--vio);outline-offset:2px;border-radius:6px}
svg.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

#app{height:100%;height:100dvh;display:flex}
.boot{align-items:center;justify-content:center}
.bootstar{width:28px;height:28px;background:var(--vio);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%);animation:pulse 1.2s ease-in-out infinite}
@keyframes pulse{50%{opacity:.35;transform:scale(.85)}}

/* ---------- sidebar ---------- */
.side{width:var(--sw);flex:none;background:var(--side);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0;transition:margin-left .25s ease,transform .25s ease}
.app.collapsed .side{margin-left:calc(-1 * var(--sw))}
.side-top{display:flex;align-items:center;justify-content:space-between;padding:14px 12px 8px 16px}
.brand{display:flex;align-items:center;gap:10px;font-weight:600;letter-spacing:.01em;text-decoration:none;color:var(--text)}
.brand .star{width:18px;height:18px;background:linear-gradient(135deg,#C9B4E8,#6D3FC4);clip-path:polygon(50% 0,62% 38%,100% 50%,62% 62%,50% 100%,38% 62%,0 50%,38% 38%)}
.ib{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;color:var(--text2);transition:background .15s,color .15s}
.ib:hover{background:var(--hover);color:var(--text)}
.newchat{margin:6px 10px 6px;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:12px;color:var(--text);transition:background .15s;font-weight:500}
.newchat:hover{background:var(--hover)}
.search{margin:2px 10px 8px;position:relative}
.search input{width:100%;background:transparent;border:1px solid var(--line);border-radius:10px;padding:8px 12px 8px 34px;font-size:.9rem;color:var(--text)}
.search input::placeholder{color:var(--muted)}
.search svg{position:absolute;left:10px;top:50%;translate:0 -50%;width:16px;height:16px;color:var(--muted)}
.list{flex:1;overflow-y:auto;padding:4px 8px 12px;min-height:0;scrollbar-width:thin;scrollbar-color:var(--line2) transparent}
.group{font:400 .68rem var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted);padding:14px 10px 6px}
.item{position:relative;display:flex;align-items:center;border-radius:10px}
.item>button.t{flex:1;min-width:0;text-align:left;padding:8px 10px;border-radius:10px;font-size:.92rem;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item:hover>button.t,.item.on>button.t{background:var(--hover);color:var(--text)}
.item.on>button.t{background:rgba(148,117,196,.14)}
.item .acts{position:absolute;right:4px;display:none;gap:2px;background:linear-gradient(90deg,transparent,var(--side) 24%)}
.item:hover .acts,.item.on .acts,.item:focus-within .acts{display:flex}
.item .acts .ib{width:28px;height:28px;border-radius:8px}
.item .acts svg{width:15px;height:15px}
.item input{flex:1;background:var(--raise);border:1px solid var(--vio);border-radius:8px;padding:6px 8px;font-size:.9rem}
.empty-list{color:var(--muted);font-size:.88rem;padding:14px 12px}
.me{border-top:1px solid var(--line);padding:10px}
.me>button{width:100%;display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px;text-align:left}
.me>button:hover{background:var(--hover)}
.av{width:32px;height:32px;border-radius:50%;flex:none;display:grid;place-items:center;font-weight:600;font-size:.85rem;background:linear-gradient(135deg,#5C2A5E,#3E1A44);color:var(--text)}
.me .who{min-width:0;flex:1}
.me .who b{display:block;font-weight:500;font-size:.9rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me .who span{font-size:.78rem;color:var(--muted)}
.scrim{display:none}

/* ---------- main ---------- */
.main{flex:1;min-width:0;display:flex;flex-direction:column;position:relative}
.top{height:56px;flex:none;display:flex;align-items:center;gap:6px;padding:0 10px;position:relative;z-index:5}
.top .title{flex:1;min-width:0;font-weight:500;color:var(--text2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:4px;font-size:.95rem}
.top .open-side{display:none}
.app.collapsed .top .open-side{display:grid}
.lvl-btn{display:flex;align-items:center;gap:8px;padding:7px 12px;border-radius:10px;color:var(--text);font-weight:500}
.lvl-btn:hover{background:var(--hover)}
.lvl-btn .v{color:var(--muted);font-weight:400}
.lvl-btn.oni .v{color:var(--gold)}
.lvl-btn svg{width:16px;height:16px;color:var(--muted)}

.scroll{flex:1;overflow-y:auto;min-height:0;scroll-behavior:auto;overscroll-behavior:contain}
.thread{max-width:780px;margin:0 auto;padding:12px 20px 40px}

/* welcome */
.welcome{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0 20px 8vh;min-height:0}
.welcome .pal{width:84px;height:84px;margin-bottom:18px;filter:drop-shadow(0 0 24px rgba(148,117,196,.45))}
.welcome h1{font:500 clamp(1.7rem,4vw,2.4rem)/1.15 Geist,sans-serif;letter-spacing:-.025em;margin:0 0 26px;text-align:center}
.welcome h1 em{font-family:Newsreader,serif;font-style:italic;font-weight:400;color:#C9B4E8}
.welcome .composer-wrap{width:100%;max-width:760px;padding:0}
.chips{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:16px;max-width:760px}
.chips button{border:1px solid var(--line2);border-radius:999px;padding:8px 14px;font-size:.88rem;color:var(--text2);display:flex;align-items:center;gap:8px;transition:background .15s,border-color .15s,color .15s}
.chips button:hover{background:var(--hover);color:var(--text);border-color:rgba(242,236,227,.28)}
.chips svg{width:16px;height:16px;color:var(--vio2)}

/* messages */
.msg{margin:22px 0;animation:in .3s ease}
@keyframes in{from{opacity:0;transform:translateY(6px)}}
.msg.user{display:flex;flex-direction:column;align-items:flex-end}
.msg.user .bubble{max-width:min(85%,640px);background:var(--raise2);border-radius:20px 20px 6px 20px;padding:10px 16px;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere}
.msg.user .pics{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;margin-bottom:6px}
.msg.user .pics img{width:120px;height:120px;object-fit:cover;border-radius:12px;border:1px solid var(--line2)}
.msg .tools-u{display:flex;gap:2px;margin-top:4px;opacity:0;transition:opacity .15s}
.msg:hover .tools-u,.msg:focus-within .tools-u{opacity:1}
.msg.bot{display:grid;grid-template-columns:28px 1fr;gap:14px}
.msg.bot .who{width:28px;height:28px;margin-top:2px}
.msg.bot .body{min-width:0}
.acts-b{display:flex;gap:2px;margin-top:6px;color:var(--muted)}
.acts-b .ib,.tools-u .ib{width:32px;height:32px;border-radius:8px}
.acts-b svg,.tools-u svg{width:16px;height:16px}
.acts-b .meta{font-size:.78rem;color:var(--muted);align-self:center;margin-left:6px}
.status{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.93rem;padding:3px 0}
.status .dots{display:inline-flex;gap:4px}
.status .dots i{width:6px;height:6px;border-radius:50%;background:var(--vio2);animation:dot 1.2s ease-in-out infinite}
.status .dots i:nth-child(2){animation-delay:.15s}.status .dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{40%{transform:translateY(-4px);opacity:1}0%,80%,100%{opacity:.35}}
.shimmer{background:linear-gradient(90deg,var(--muted) 0%,var(--text) 50%,var(--muted) 100%);background-size:200% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:sh 2s linear infinite}
@keyframes sh{to{background-position:-200% 0}}
.think{margin:0 0 10px}
.think>button{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:.9rem;padding:2px 0}
.think>button:hover{color:var(--text2)}
.think>button svg{width:14px;height:14px;transition:transform .2s}
.think.open>button svg{transform:rotate(90deg)}
.think .tx{display:none;border-left:2px solid var(--line2);margin:8px 0 4px 2px;padding:2px 0 2px 14px;color:var(--muted);font-size:.9rem;white-space:pre-wrap;max-height:320px;overflow:auto}
.think.open .tx{display:block}
.steps{display:flex;flex-direction:column;gap:6px;margin:0 0 12px}
.step{display:flex;align-items:center;gap:8px;font-size:.88rem;color:var(--muted)}
.step svg{width:15px;height:15px;color:var(--vio2)}
.step a{color:var(--text2);text-decoration:none;border-bottom:1px solid var(--line2)}
.err{border:1px solid rgba(229,138,126,.35);background:rgba(229,138,126,.07);color:#F0C2BB;border-radius:12px;padding:10px 14px;font-size:.93rem;margin-top:6px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.err button{border:1px solid rgba(240,194,187,.4);border-radius:8px;padding:4px 10px;font-size:.85rem}
.note{color:var(--muted);font-size:.88rem;margin:6px 0}

/* markdown */
.md{overflow-wrap:anywhere;line-height:1.7}
.md>*:first-child{margin-top:0}.md>*:last-child{margin-bottom:0}
.md p{margin:0 0 .9em}
.md h1,.md h2,.md h3,.md h4{line-height:1.3;letter-spacing:-.015em;margin:1.4em 0 .5em;font-weight:600}
.md h1{font-size:1.45rem}.md h2{font-size:1.25rem}.md h3{font-size:1.08rem}.md h4{font-size:1rem}
.md ul,.md ol{margin:0 0 .9em;padding-left:1.4em}
.md li{margin:.25em 0}
.md li::marker{color:var(--muted)}
.md blockquote{margin:0 0 .9em;padding:2px 0 2px 14px;border-left:3px solid var(--line2);color:var(--text2)}
.md hr{border:0;border-top:1px solid var(--line2);margin:1.4em 0}
.md a{color:var(--vio2);text-decoration:underline;text-decoration-color:rgba(180,154,224,.4);text-underline-offset:2px}
.md strong{font-weight:600;color:var(--text)}
.md code{font-family:var(--code);font-size:.86em;background:rgba(242,236,227,.08);padding:.12em .38em;border-radius:6px}
.md .cb{margin:0 0 1em;border:1px solid var(--line2);border-radius:12px;overflow:hidden;background:#0A070B}
.md .cb-h{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 4px 14px;background:var(--raise);font:400 .72rem var(--mono);letter-spacing:.08em;color:var(--muted);text-transform:lowercase}
.md .cb-h div{display:flex;gap:2px}
.md .cb-h button{display:flex;align-items:center;gap:6px;padding:5px 8px;border-radius:7px;font:500 .78rem Geist,sans-serif;color:var(--text2)}
.md .cb-h button:hover{background:var(--hover);color:var(--text)}
.md .cb-h svg{width:14px;height:14px}
.md pre{margin:0;padding:14px 16px;overflow-x:auto;font:400 .86rem/1.6 var(--code);tab-size:2;scrollbar-width:thin}
.md pre code{background:none;padding:0;font-size:inherit}
.md .tw{overflow-x:auto;margin:0 0 1em;border:1px solid var(--line2);border-radius:10px}
.md table{border-collapse:collapse;width:100%;font-size:.92rem}
.md th,.md td{padding:8px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.md th{font-weight:600;background:var(--raise)}
.md tr:last-child td{border-bottom:0}
.tk-k{color:#C9A7F5}.tk-s{color:#B6D7A8}.tk-c{color:#7E6F82;font-style:italic}.tk-n{color:#F2C38B}
.caret::after{content:"";display:inline-block;width:8px;height:1.05em;margin-left:2px;vertical-align:-.15em;background:var(--vio2);border-radius:2px;animation:blink 1s steps(2) infinite}
@keyframes blink{50%{opacity:0}}

/* ---------- composer ---------- */
.composer-wrap{flex:none;padding:0 20px 16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}
.composer{max-width:780px;margin:0 auto;background:var(--raise);border:1px solid var(--line2);border-radius:24px;padding:10px 10px 8px 14px;box-shadow:0 10px 40px rgba(0,0,0,.35);transition:border-color .15s}
.composer:focus-within{border-color:rgba(242,236,227,.3)}
.composer.drag{border-color:var(--vio);background:#20162A}
.composer textarea{width:100%;resize:none;border:0;outline:0;background:transparent;font-size:1rem;line-height:1.5;max-height:40vh;padding:6px 4px;display:block;color:var(--text)}
.composer textarea::placeholder{color:var(--muted)}
.c-row{display:flex;align-items:center;gap:4px;margin-top:4px}
.c-row .sp{flex:1}
.c-row .ib{width:36px;height:36px;border-radius:50%}
.pill{display:flex;align-items:center;gap:6px;height:34px;padding:0 12px;border-radius:999px;border:1px solid var(--line2);font-size:.86rem;color:var(--text2);transition:background .15s,color .15s,border-color .15s}
.pill:hover{background:var(--hover);color:var(--text)}
.pill svg{width:16px;height:16px}
.pill.on{border-color:rgba(148,117,196,.6);color:var(--vio2);background:rgba(148,117,196,.12)}
.pill.oni{border-color:rgba(255,210,94,.55);color:var(--gold);background:rgba(255,210,94,.08)}
.send{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--text);color:var(--bg);transition:opacity .15s,transform .15s}
.send:disabled{opacity:.25;cursor:default}
.send:not(:disabled):hover{transform:scale(1.06)}
.send svg{width:18px;height:18px;stroke-width:2.2}
.send.stop svg{fill:currentColor;stroke:none;width:14px;height:14px}
.thumbs{display:flex;gap:8px;flex-wrap:wrap;padding:4px 0 6px}
.thumb{position:relative}
.thumb img{width:64px;height:64px;object-fit:cover;border-radius:12px;border:1px solid var(--line2);display:block}
.thumb button{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border-radius:50%;background:var(--text);color:var(--bg);display:grid;place-items:center}
.thumb button svg{width:12px;height:12px;stroke-width:2.6}
.fine{text-align:center;font-size:.74rem;color:var(--muted);margin-top:8px}
.tobottom{position:absolute;left:50%;translate:-50% 0;bottom:120px;width:36px;height:36px;border-radius:50%;background:var(--raise2);border:1px solid var(--line2);display:grid;place-items:center;color:var(--text);opacity:0;pointer-events:none;transition:opacity .2s;z-index:4}
.tobottom.show{opacity:1;pointer-events:auto}
.tobottom svg{width:18px;height:18px}

/* ---------- menus, dialogs ---------- */
.menu{position:fixed;z-index:60;min-width:240px;max-width:calc(100vw - 24px);background:var(--raise);border:1px solid var(--line2);border-radius:14px;padding:6px;box-shadow:0 20px 60px rgba(0,0,0,.55);animation:pop .14s ease}
@keyframes pop{from{opacity:0;transform:translateY(4px) scale(.98)}}
.menu .mi{width:100%;display:flex;align-items:flex-start;gap:12px;padding:9px 10px;border-radius:9px;text-align:left}
.menu .mi:hover,.menu .mi:focus-visible{background:var(--hover)}
.menu .mi b{display:block;font-weight:500;font-size:.93rem}
.menu .mi span{display:block;font-size:.8rem;color:var(--muted);line-height:1.4}
.menu .mi .ck{margin-left:auto;align-self:center;color:var(--vio2);width:18px}
.menu .mi.gold b{color:var(--gold)}
.menu hr{border:0;border-top:1px solid var(--line);margin:6px 4px}
.menu .hd{padding:8px 10px 4px;font:400 .68rem var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--muted)}
.usage{padding:6px 10px 10px}
.usage .row{display:flex;justify-content:space-between;font-size:.82rem;color:var(--text2);margin-top:8px}
.usage .bar{height:6px;border-radius:99px;background:rgba(242,236,227,.08);overflow:hidden;margin-top:6px}
.usage .bar i{display:block;height:100%;background:linear-gradient(90deg,#6D3FC4,#B49AE0);border-radius:99px}
.toast{position:fixed;left:50%;bottom:24px;translate:-50% 0;background:var(--text);color:var(--bg);padding:10px 16px;border-radius:12px;font-size:.9rem;font-weight:500;z-index:80;animation:pop .2s ease;box-shadow:0 10px 30px rgba(0,0,0,.4)}

/* preview */
.pv{position:fixed;inset:0;z-index:70;background:rgba(5,3,6,.7);display:flex;align-items:stretch;justify-content:flex-end;animation:fade .2s}
@keyframes fade{from{opacity:0}}
.pv-in{width:min(980px,100%);background:var(--side);border-left:1px solid var(--line2);display:flex;flex-direction:column}
.pv-h{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid var(--line)}
.pv-h b{flex:1;font-weight:500}
.pv iframe{flex:1;border:0;background:#fff;width:100%}

/* ---------- sign in ---------- */
.auth{flex:1;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 20px;background:radial-gradient(80% 60% at 50% 0%,rgba(92,42,94,.35),transparent 70%)}
.auth .pal{width:72px;height:72px;margin-bottom:14px;filter:drop-shadow(0 0 22px rgba(148,117,196,.5))}
.auth h1{font:600 1.8rem/1.2 Geist,sans-serif;letter-spacing:-.03em;margin:0 0 6px;text-align:center}
.auth h1 em{font-family:Newsreader,serif;font-style:italic;font-weight:400;color:#C9B4E8}
.auth .sub{color:var(--muted);margin:0 0 26px;text-align:center;max-width:36ch}
.auth form{width:100%;max-width:360px;display:flex;flex-direction:column;gap:10px}
.auth input{width:100%;background:var(--raise);border:1px solid var(--line2);border-radius:12px;padding:13px 14px;font-size:1rem;color:var(--text)}
.auth input:focus{outline:0;border-color:var(--vio)}
.auth .primary{background:var(--text);color:var(--bg);border-radius:12px;padding:13px;font-weight:600;transition:opacity .15s}
.auth .primary:disabled{opacity:.5}
.auth .google{display:flex;align-items:center;justify-content:center;gap:10px;border:1px solid var(--line2);border-radius:12px;padding:12px;font-weight:500;width:100%;max-width:360px}
.auth .google:hover{background:var(--hover)}
.auth .or{display:flex;align-items:center;gap:12px;width:100%;max-width:360px;color:var(--muted);font-size:.8rem;margin:16px 0}
.auth .or::before,.auth .or::after{content:"";flex:1;height:1px;background:var(--line2)}
.auth .links{display:flex;justify-content:space-between;width:100%;max-width:360px;margin-top:14px;font-size:.88rem}
.auth .links button{color:var(--text2);text-decoration:underline;text-decoration-color:var(--line2);text-underline-offset:3px}
.auth .links button:hover{color:var(--text)}
.auth .msg-e{color:#F0C2BB;font-size:.9rem;min-height:1.2em}
.auth .msg-ok{color:#B6D7A8;font-size:.9rem}
.auth .legal{color:var(--muted);font-size:.78rem;text-align:center;max-width:360px;margin-top:22px}
.auth .legal a{color:var(--text2)}

/* ---------- phones ---------- */
@media (max-width:860px){
  body{overflow:hidden}
  .side{position:fixed;left:0;top:0;bottom:0;z-index:50;transform:translateX(-100%);margin-left:0!important;width:min(86vw,320px);}
  .app.drawer .side{box-shadow:20px 0 60px rgba(0,0,0,.5)}
  .app.drawer .side{transform:none}
  .app.drawer .scrim{display:block;position:fixed;inset:0;z-index:45;background:rgba(5,3,6,.6);animation:fade .2s}
  .top .open-side{display:grid}
  .top{border-bottom:1px solid var(--line);background:var(--bg)}
  .thread{padding:6px 16px 28px}
  .composer-wrap{padding:0 10px 10px;padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .composer{border-radius:22px}
  .msg.bot{grid-template-columns:1fr;gap:6px}
  .msg.bot .who{width:24px;height:24px}
  .msg.user .bubble{max-width:88%}
  .tools-u,.msg .acts-b{opacity:1}
  .welcome{justify-content:flex-end;padding-bottom:8px}
  .welcome .head{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center}
  .welcome .composer-wrap{padding:0}
  .chips{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;width:100%;padding-bottom:4px;scrollbar-width:none;order:-1;margin:0 0 10px}
  .chips button{flex:none}
  .pill .lbl{display:none}
  .fine{display:none}
  .tobottom{bottom:100px}
  .pv-in{width:100%}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ---------- Canvas / Artifacts Split Workspace ---------- */
.app.has-canvas { display: flex; flex-direction: row; }
.app.has-canvas .main { flex: 1 1 0; min-width: 380px; }

.canvas-splitter {
  width: 5px;
  background: var(--line2);
  cursor: col-resize;
  position: relative;
  z-index: 25;
  transition: background .15s;
  flex: none;
}
.canvas-splitter:hover, .canvas-splitter.active {
  background: var(--vio);
  box-shadow: 0 0 8px rgba(148,117,196,.5);
}
.canvas-splitter::after {
  content: '';
  position: absolute;
  inset: 0 -4px;
}
.canvas-panel {
  flex: 1 1 0;
  min-width: 380px;
  max-width: 80vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0A060C;
  border-left: 1px solid var(--line2);
  position: relative;
  z-index: 20;
  animation: slideIn .22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } }

.canvas-mobile-back {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(242,236,227,.08);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.canvas-mobile-back:hover {
  background: var(--hover);
  color: #fff;
}
.canvas-mobile-back svg { width: 14px; height: 14px; }

.canvas-top {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: var(--side);
  gap: 8px;
  overflow: hidden;
}
.canvas-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  white-space: nowrap;
}
.canvas-title-text {
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.canvas-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}
.canvas-title svg { width: 16px; height: 16px; color: var(--vio2); flex: none; }
.canvas-badge {
  font: 500 .65rem var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(148,117,196,.16);
  color: var(--vio2);
  border: 1px solid rgba(148,117,196,.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.canvas-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px #4ADE80;
}

.canvas-center { display: flex; align-items: center; gap: 8px; }
.canvas-viewports {
  display: inline-flex;
  background: rgba(242,236,227,.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px;
  flex: none;
}
.vp-btn {
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: .8rem;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .15s;
  flex: none;
}
.vp-btn svg { width: 14px; height: 14px; }
.vp-btn:hover { color: var(--text); }
.vp-btn.on {
  background: var(--raise);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

.canvas-tabs {
  display: inline-flex;
  background: rgba(242,236,227,.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px;
  flex: none;
}
.ctab {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  transition: all .15s;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}
.ctab svg { width: 14px; height: 14px; }
.ctab:hover { color: var(--text); }
.ctab.on {
  background: var(--raise);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.ctab .badge {
  font-size: .7rem;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(229,138,126,.25);
  color: #F0C2BB;
}

.canvas-actions { display: flex; align-items: center; gap: 3px; flex: none; }
.canvas-actions .ib { width: 32px; height: 32px; border-radius: 8px; }

.canvas-body {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070408;
}
.canvas-view {
  width: 100%;
  height: 100%;
  display: none;
  position: relative;
}
.canvas-view.active { display: flex; }
.canvas-view-preview {
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: auto;
}
.device-frame {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: width .25s cubic-bezier(0.16, 1, 0.3, 1), height .25s cubic-bezier(0.16, 1, 0.3, 1), border-radius .25s ease;
}
.device-frame.tablet {
  width: 768px;
  height: min(100%, 1024px);
  border: 1px solid rgba(242,236,227,.18);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.85);
  overflow: hidden;
}
.device-frame.mobile {
  width: 375px;
  height: min(100%, 812px);
  border: 1px solid rgba(242,236,227,.18);
  border-radius: 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,.85);
  overflow: hidden;
}
.device-notch { display: none; }
.device-frame.mobile .device-notch {
  display: block;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 22px;
  background: #000;
  border-radius: 20px;
  z-index: 20;
}
.device-frame iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.canvas-view-code {
  flex-direction: column;
  background: #070409;
}
.canvas-view-code .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--raise);
  border-bottom: 1px solid var(--line);
  font: 400 .76rem var(--mono);
  color: var(--muted);
}
.canvas-view-code pre {
  flex: 1;
  margin: 0;
  padding: 18px 22px;
  overflow: auto;
  font: 400 .86rem/1.65 var(--code);
  color: #E8DFEE;
  tab-size: 2;
  white-space: pre-wrap;
  word-break: break-all;
}

.canvas-view-console {
  flex-direction: column;
  background: #060307;
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--raise);
  border-bottom: 1px solid var(--line);
  font: 400 .76rem var(--mono);
  color: var(--muted);
}
.console-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  font: 400 .84rem/1.6 var(--code);
  margin: 0;
}
.console-line {
  padding: 4px 0;
  border-bottom: 1px solid rgba(242,236,227,.05);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  word-break: break-all;
}
.console-kind {
  font-size: .72rem;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  flex: none;
}
.console-kind.log { background: rgba(148,117,196,.2); color: var(--vio2); }
.console-kind.info { background: rgba(125,211,252,.2); color: #7DD3FC; }
.console-kind.warn { background: rgba(255,210,94,.2); color: var(--gold); }
.console-kind.error { background: rgba(229,138,126,.25); color: #F0C2BB; }
.console-msg { flex: 1; color: var(--text2); }
.console-empty { color: var(--muted); text-align: center; margin: auto; padding: 40px; font-style: italic; }

/* Companion mascot in top bar */
.top-companion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 12px;
  background: rgba(242,236,227,.03);
  border: 1px solid var(--line);
  margin-right: 6px;
  transition: all .2s;
}
.top-companion:hover {
  background: var(--hover);
  border-color: rgba(148,117,196,.35);
}
.top-mascot-host {
  width: 28px;
  height: 28px;
  cursor: pointer;
  filter: drop-shadow(0 0 8px rgba(148,117,196,.45));
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.top-mascot-host:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 14px rgba(148,117,196,.85));
}
.top-companion-info {
  display: flex;
  flex-direction: column;
}
.top-companion-name {
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}
.top-companion-mood {
  font: 400 .68rem var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.btn-canvas-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 10px;
  font-size: .86rem;
  font-weight: 500;
  border: 1px solid var(--line2);
  color: var(--text2);
  background: rgba(242,236,227,.04);
  transition: all .15s;
}
.btn-canvas-toggle:hover {
  background: var(--hover);
  color: var(--text);
  border-color: rgba(148,117,196,.5);
}
.btn-canvas-toggle.active {
  border-color: var(--vio);
  background: rgba(148,117,196,.16);
  color: var(--vio2);
}
.btn-canvas-toggle svg { width: 16px; height: 16px; }

/* Enhanced composer */
.composer {
  background: rgba(26,18,29,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(242,236,227,.12);
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within {
  border-color: rgba(180,154,224,.45);
  box-shadow: 0 16px 48px rgba(0,0,0,.45), 0 0 24px rgba(148,117,196,.2);
}

/* Enhanced preview button in code blocks */
.md .cb-h button[data-act='preview'] {
  background: rgba(148,117,196,.18);
  border: 1px solid rgba(148,117,196,.35);
  color: var(--vio2);
  font-weight: 600;
}
.md .cb-h button[data-act='preview']:hover {
  background: rgba(148,117,196,.3);
  border-color: var(--vio);
  color: #fff;
}

/* Bot avatar pixel styling in chat */
.msg.assistant .av {
  background: transparent;
  padding: 0;
  overflow: visible;
}
.msg.assistant .av img {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 6px rgba(148,117,196,.4));
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.msg.assistant .av img:hover {
  transform: scale(1.2);
}

@media (max-width: 1160px) {
  .vp-btn span { display: none; }
  .canvas-title-text { max-width: 80px; }
}
@media (max-width: 980px) {
  .ctab span:not(.badge) { display: none; }
}
@media (max-width: 860px) {
  .canvas-mobile-back { display: flex; }
  .canvas-splitter { display: none !important; }
  .app.has-canvas { flex-direction: column; }
  .app.has-canvas .main { min-width: 0; width: 100%; }
  .app.has-canvas.canvas-focus .main { display: none !important; }
  .app.has-canvas:not(.canvas-focus) .canvas-panel { display: none !important; }
  .app.has-canvas .canvas-panel { min-width: 0; max-width: 100%; width: 100%; border-left: none; }
  .canvas-top { padding: 0 10px; gap: 6px; }
  .canvas-viewports { display: none; }
}
/* files and tools */
.thumb.file{display:flex}
.fchip{display:inline-flex;align-items:center;gap:8px;max-width:240px;height:44px;padding:0 12px;border:1px solid var(--line2);border-radius:12px;background:var(--raise2);font-size:.85rem}
.fchip svg{width:16px;height:16px;color:var(--vio2)}
.fchip b{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.fchip small{color:var(--muted);flex:none}
.msg.user .files{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;margin-bottom:6px}
.pill.deep{border-color:rgba(148,117,196,.6)}
.pill.deep svg:last-child{width:13px;height:13px;opacity:.7}
.top .title{flex:1}
[hidden]{display:none!important}
/* a little sky behind the greeting, so the empty page feels like Nova's */
.welcome{background:radial-gradient(60% 50% at 50% 30%,rgba(92,42,94,.28),transparent 70%),radial-gradient(40% 30% at 70% 70%,rgba(109,63,196,.10),transparent 70%)}
.welcome h1{background:linear-gradient(180deg,#F2ECE3 40%,#CDBFD0);-webkit-background-clip:text;background-clip:text;color:transparent}
.welcome h1 em{-webkit-text-fill-color:#C9B4E8}
.composer{background:linear-gradient(180deg,#1C1420,#17101A)}

/* slash commands */
.composer{position:relative}
.slash{position:absolute;left:8px;right:8px;bottom:calc(100% + 8px);background:var(--raise);border:1px solid var(--line2);border-radius:16px;padding:6px;box-shadow:0 20px 60px rgba(0,0,0,.55);display:grid;gap:2px;max-height:50vh;overflow:auto;z-index:20;animation:pop .14s ease}
.slash button{display:grid;grid-template-columns:20px auto 1fr;align-items:center;gap:12px;padding:9px 10px;border-radius:10px;text-align:left}
.slash button svg{width:18px;height:18px;color:var(--vio2)}
.slash button b{font:400 .85rem var(--mono);color:var(--text)}
.slash button span{font-size:.85rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.slash button.on,.slash button:hover{background:var(--hover)}
/* phones: the top bar keeps to one row: menu, level, then icons only */
@media (max-width:860px){
  .top{gap:2px;padding:0 6px}
  .top .top-companion-info{display:none}
  .top .top-companion{padding:4px;border:0;background:none}
  .top .title{display:none}
  .btn-canvas-toggle{padding:0;width:36px;height:36px;justify-content:center}
  .btn-canvas-toggle span{display:none}
  .lvl-btn{padding:7px 8px;flex:1;min-width:0}
  .lvl-btn .v{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* the desktop app, offered once in the sidebar */
.promo{position:relative;margin:8px 10px;padding:14px 14px 12px;border:1px solid var(--line2);border-radius:14px;background:radial-gradient(120% 120% at 0% 0%,rgba(109,63,196,.22),transparent 60%),var(--raise);display:grid;gap:4px}
.promo b{font-weight:600;font-size:.9rem}
.promo span{font-size:.8rem;color:var(--muted);line-height:1.45;padding-right:14px}
.promo a{font-size:.82rem;font-weight:500;color:var(--vio2);text-decoration:none;margin-top:4px}
.promo a:hover{color:var(--text)}
.promo-x{position:absolute;top:8px;right:8px;width:22px;height:22px;border-radius:6px;display:grid;place-items:center;color:var(--muted)}
.promo-x:hover{background:var(--hover);color:var(--text)}
.promo-x svg{width:13px;height:13px}

/* ===== redesign: calmer shell, plans popup, cleaner top bar ===== */
:root{--bg:#0F0A12;--side:#150E19;--raise:#1D1423;--raise2:#271B2F}
body{background:var(--bg)}
.top{height:58px;padding:0 14px;gap:8px;border-bottom:1px solid transparent}
.top .title{color:var(--muted);font-size:.9rem;text-align:left;padding-left:8px}
.lvl-btn{border:1px solid var(--line);background:rgba(242,236,227,.03)}
.plan-chip{display:flex;align-items:center;gap:7px;height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--line2);font-size:.86rem;font-weight:500;color:var(--text2);transition:background .2s,color .2s,border-color .2s}
.plan-chip svg{width:15px;height:15px;color:var(--vio2)}
.plan-chip:hover{background:var(--hover);color:var(--text)}
.plan-chip.paid{border-color:rgba(148,117,196,.5);color:var(--text)}
.btn-canvas-toggle{width:38px;height:38px;padding:0;display:grid;place-items:center;border-radius:12px;border:1px solid var(--line);background:rgba(242,236,227,.03);color:var(--text2)}
.btn-canvas-toggle.active{border-color:rgba(148,117,196,.6);color:var(--vio2);background:rgba(148,117,196,.12)}
.btn-canvas-toggle svg{width:18px;height:18px}
.me{display:flex;align-items:center;gap:6px}
.me>button:first-child{flex:1;min-width:0}
.upg{flex:none;height:32px;padding:0 14px;border-radius:999px;background:var(--text);color:var(--bg);font-size:.82rem;font-weight:600}
.upg:hover{background:#fff}
.welcome h1{font:400 clamp(2.2rem,4.6vw,3.4rem)/1.08 Newsreader,Georgia,serif;letter-spacing:-.015em;background:none;color:var(--text);-webkit-text-fill-color:currentColor}
.welcome h1 em{font-style:italic;color:#C9B4E8;-webkit-text-fill-color:#C9B4E8}
.welcome{background:radial-gradient(60% 50% at 50% 28%,rgba(92,42,94,.3),transparent 70%)}
.canvas-body{background:var(--bg)}
.canvas-view-preview{padding:0}
.device-frame{border-radius:0}

/* plans popup */
.modal{position:fixed;inset:0;z-index:90;display:grid;place-items:center;padding:20px;background:rgba(6,3,8,.72);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);animation:fade .2s}
.modal-in{width:min(980px,100%);max-height:calc(100dvh - 40px);overflow:auto;background:var(--side);border:1px solid var(--line2);border-radius:22px;padding:26px;box-shadow:0 40px 120px rgba(0,0,0,.6);animation:pop .22s ease}
.modal-h{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.modal-h h2{margin:0;font:400 2rem/1.1 Newsreader,Georgia,serif;letter-spacing:-.01em}
.modal-h p{margin:6px 0 0;color:var(--muted);font-size:.92rem}
.pm-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:22px 0 16px}
.pm-toggle{display:inline-flex;padding:4px;border:1px solid var(--line2);border-radius:999px;background:rgba(242,236,227,.03)}
.pm-toggle button{display:flex;align-items:center;gap:8px;height:34px;padding:0 16px;border-radius:999px;font-size:.88rem;font-weight:500;color:var(--text2)}
.pm-toggle button.on{background:var(--text);color:var(--bg)}
.pm-toggle small{font-size:.72rem;color:var(--vio2);font-weight:600}
.pm-toggle button.on small{color:#5C2A5E}
.pm-use{display:flex;align-items:center;gap:20px;flex-wrap:wrap;font-size:.86rem;color:var(--muted)}
.pm-use div{display:flex;gap:8px;align-items:baseline}
.pm-use b{color:var(--text);font-weight:600}
.pm-link{color:var(--text2);text-decoration:underline;text-underline-offset:3px;text-decoration-color:var(--line2)}
.pm-link:hover{color:var(--text)}
.pm-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.pm-card{display:flex;flex-direction:column;gap:12px;padding:20px 18px;border:1px solid var(--line2);border-radius:16px;background:rgba(242,236,227,.02)}
.pm-card.cur{border-color:rgba(148,117,196,.6);background:rgba(148,117,196,.08)}
.pm-card.hot:not(.cur){border-color:rgba(242,236,227,.34)}
.pm-name{margin:0;font-weight:600;font-size:1.05rem}
.pm-price{margin:0;font:400 2.3rem/1 Newsreader,Georgia,serif;letter-spacing:-.01em}
.pm-price small{font:400 .85rem Geist,sans-serif;color:var(--muted);letter-spacing:0}
.pm-list{list-style:none;margin:4px 0 8px;padding:0;display:grid;gap:8px;font-size:.88rem;color:var(--text2);flex:1}
.pm-list li{padding-left:18px;position:relative;line-height:1.4}
.pm-list li::before{content:"";position:absolute;left:0;top:.5em;width:8px;height:1px;background:var(--vio2)}
.pm-btn{height:42px;border-radius:12px;background:var(--text);color:var(--bg);font-weight:600;font-size:.9rem;padding:0 12px;transition:background .2s}
.pm-btn:hover:not(:disabled){background:#fff}
.pm-btn.cur{background:transparent;color:var(--muted);border:1px solid var(--line2);cursor:default}
.pm-btn.ghost{background:transparent;color:var(--text2);border:1px solid var(--line2)}
.pm-btn.warn{background:#FFD25E;color:#2b1a00}
.pm-note{min-height:1.4em;margin:16px 0 0;font-size:.9rem;color:var(--vio2)}
.pm-fine{margin:6px 0 0;font-size:.78rem;color:var(--muted)}
@media (max-width:860px){
  .pm-grid{grid-template-columns:1fr 1fr}
  .plan-chip span{display:none}.plan-chip{padding:0;width:36px;justify-content:center}
}
@media (max-width:560px){
  .modal{padding:0;place-items:end stretch}
  .modal-in{border-radius:22px 22px 0 0;max-height:92dvh;padding:20px 16px 24px}
  .pm-grid{grid-template-columns:1fr}
  .modal-h h2{font-size:1.7rem}
}
.me>button:first-child{width:auto}
.me>.upg{width:auto;flex:none;display:inline-flex;align-items:center;padding:0 14px;gap:0}
.me>button:first-child{flex:1;min-width:0}

.welcome .head{display:flex;flex-direction:column;align-items:center;text-align:center}
.welcome .pal{margin-inline:auto}

/* canvas: files the tools write */
.canvas-files{flex:none;display:flex;gap:6px;padding:8px 12px;border-bottom:1px solid var(--line);overflow-x:auto;background:var(--side)}
.canvas-files[hidden]{display:none}
.cfile{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:1px solid var(--line);border-radius:999px;background:transparent;color:var(--muted,#9a93a3);font:inherit;font-size:.78rem;white-space:nowrap;cursor:pointer}
.cfile .i{width:13px;height:13px}
.cfile:hover{background:var(--hover);color:var(--text)}
.cfile.on{color:var(--text);border-color:var(--violet,#B49AE0);background:var(--hover)}
.doc-view{display:none;flex:1;min-height:0;overflow:auto;padding:28px clamp(16px,5vw,48px) 60px;max-width:820px;margin:0 auto;width:100%;box-sizing:border-box;line-height:1.7}
.doc-view .doc-plain{white-space:pre-wrap;word-break:break-word;font:inherit;margin:0}
.doc-view .doc-img img{max-width:100%;height:auto;background:#fff;border-radius:8px}
.canvas-panel.is-doc .doc-view{display:block}
.canvas-panel.is-doc .device-frame,.canvas-panel.is-doc .canvas-viewports,.canvas-panel.is-doc .ctab:last-child,.canvas-panel.is-doc .canvas-badge{display:none}
.canvas-panel.is-doc .canvas-view-preview{display:none}
.canvas-panel.is-doc .canvas-view-preview.active{display:flex;flex-direction:column;align-items:stretch}
.docx-btn{display:none;height:28px;padding:0 10px;gap:5px;align-items:center}
.canvas-panel.is-md .docx-btn{display:inline-flex}
.canvas-title-text{max-width:160px}
.fine a{color:inherit;text-decoration:underline;text-underline-offset:2px}

/* ===== 2026-11 · the Valerois system in the app: Newsreader for the one big line, Geist for everything else, no glow ===== */
:root{
  --bg:#0E0A13;--side:#120D18;--raise:#18111F;--raise2:#221829;--hover:rgba(243,238,247,.055);
  --text:#F3EEF7;--text2:#BEB4CA;--muted:#8B8198;--line:rgba(243,238,247,.08);--line2:rgba(243,238,247,.14);
  --vio:#9A78EE;--vio2:#B79CF4;--gold:#E7B45C;--red:#E58A7E;
  --serif:Newsreader,'Iowan Old Style',Georgia,serif;
  --mono:'Geist Mono',ui-monospace,monospace;
  --code:'Geist Mono',ui-monospace,SFMono-Regular,Consolas,monospace;
  --ease:cubic-bezier(.2,.7,.2,1);
}
html,body{font-family:Geist,system-ui,-apple-system,'Segoe UI',sans-serif;font-feature-settings:'ss01','cv11'}
::selection{background:rgba(154,120,238,.38)}

/* calm surfaces: no radial skies, no drop-shadow halos, hairlines instead */
.welcome,.auth{background:none}
.welcome .pal,.auth .pal{filter:none}
.composer{background:var(--raise);box-shadow:none;border-color:var(--line2);border-radius:18px}
.composer:focus-within{border-color:rgba(243,238,247,.32)}
.promo{background:var(--raise);border-color:var(--line)}
.usage .bar i{background:var(--vio2)}
.group{font:500 .66rem/1 var(--mono);letter-spacing:.1em}
.brand .star{background:var(--vio2)}

/* the greeting */
.welcome h1{font:380 clamp(2.3rem,4.8vw,3.6rem)/1.05 var(--serif);letter-spacing:-.022em;color:var(--text);-webkit-text-fill-color:currentColor;background:none;margin-bottom:30px}
.welcome h1 em{font-family:var(--serif);font-style:italic;font-weight:340;color:var(--vio2);-webkit-text-fill-color:var(--vio2)}
.chips{gap:6px}
.chips button{border-color:var(--line);border-radius:10px;padding:8px 13px;font-size:.86rem}
.chips svg{color:var(--muted)}
.chips button:hover svg{color:var(--vio2)}

/* sign in: the page is a scene, the form sits on the dark half */
.auth{position:relative;isolation:isolate;align-items:flex-start;padding:clamp(40px,8vh,96px) clamp(24px,7vw,112px)}
.auth::before{content:"";position:absolute;inset:0;z-index:-1;background:
  linear-gradient(90deg,var(--bg) 0,var(--bg) 32%,rgba(14,10,19,.7) 44%,rgba(14,10,19,0) 60%),
  linear-gradient(0deg,var(--bg) 0,rgba(14,10,19,0) 26%),
  linear-gradient(180deg,var(--bg) 0,rgba(14,10,19,0) 18%),
  url(/img/sphere-2200.webp) calc(68vw - 74vh) 52%/auto 115% no-repeat,var(--bg)}
.auth .pal{width:64px;height:64px;margin-bottom:28px}
.auth h1{font:380 clamp(2.4rem,4.4vw,3.4rem)/1.05 var(--serif);letter-spacing:-.022em;text-align:left;margin-bottom:12px}
.auth h1 em{font-family:var(--serif);font-weight:340;color:var(--vio2)}
.auth .sub{text-align:left;color:var(--text2);margin-bottom:30px}
.auth form,.auth .google,.auth .or,.auth .links,.auth .legal{max-width:380px}
.auth input{background:rgba(24,17,31,.85);border-color:var(--line2);border-radius:10px}
.auth input:focus{border-color:var(--text)}
.auth .primary{border-radius:999px;padding:13px 18px;font-weight:540}
.auth .google{border-radius:999px;background:rgba(14,10,19,.5)}
.auth .legal{text-align:left}
@media (max-width:860px){
  .auth{align-items:stretch;padding:32px 22px}
  .auth::before{background:linear-gradient(180deg,rgba(14,10,19,0) 0,rgba(14,10,19,.4) 18%,var(--bg) 32%),url(/img/sphere-1100.webp) 34% -7vh/auto 42vh no-repeat,var(--bg)}
  .auth .pal{margin-top:16vh}
}

/* type everywhere else */
.modal-h h2,.pm-price{font-family:var(--serif);font-weight:380;letter-spacing:-.02em}
.pm-price small{font-family:Geist,system-ui,sans-serif}
.pm-card{border-radius:12px}
.pm-card.cur{border-color:var(--vio);background:rgba(154,120,238,.07)}
.pm-btn,.upg{border-radius:999px}
.pm-btn.warn{background:var(--gold);color:#241500}
.md h1,.md h2{font-family:var(--serif);font-weight:420;letter-spacing:-.015em}
.md h1{font-size:1.7rem}.md h2{font-size:1.4rem}
.md .cb{border-radius:10px;background:#0B080F}
.toast{border-radius:999px;padding:10px 18px}
.item.on>button.t{background:rgba(154,120,238,.12)}

/* motion: the greeting arrives, suggestions follow, answers rise */
@keyframes v-rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:no-preference){
  .welcome .pal,.welcome h1,.welcome .composer-wrap,.welcome .chips button,.auth>*{animation:v-rise .8s var(--ease) both}
  .welcome h1{animation-delay:.06s}
  .welcome .composer-wrap{animation-delay:.14s}
  .welcome .chips button:nth-child(1){animation-delay:.22s}.welcome .chips button:nth-child(2){animation-delay:.27s}.welcome .chips button:nth-child(3){animation-delay:.32s}.welcome .chips button:nth-child(4){animation-delay:.37s}
  .auth>*:nth-child(2){animation-delay:.06s}.auth>*:nth-child(3){animation-delay:.12s}.auth>*:nth-child(n+4){animation-delay:.18s}
  .auth::before{animation:v-develop 1.8s var(--ease) both}
  .msg{animation:v-rise .45s var(--ease) both}
  .chips button,.newchat,.item>button.t,.ib,.auth .primary,.pm-btn{transition:background .18s,color .18s,border-color .18s,transform .18s}
  .auth .primary:active,.pm-btn:active,.upg:active{transform:scale(.97)}
}
@keyframes v-develop{from{opacity:0;transform:scale(1.04)}to{opacity:1;transform:none}}

/* the sign-in film: the same scene as the still behind it, moving slowly. Sits under the gradient that keeps the form readable. */
.auth-film{position:absolute;z-index:-2;top:0;bottom:0;right:0;width:66%;height:100%;object-fit:cover;object-position:22% 46%;pointer-events:none}
.auth::before{z-index:-1}
.auth:has(.auth-film)::before{background:
  linear-gradient(90deg,var(--bg) 0,var(--bg) 32%,rgba(14,10,19,.7) 44%,rgba(14,10,19,0) 60%),
  linear-gradient(0deg,var(--bg) 0,rgba(14,10,19,0) 26%),
  linear-gradient(180deg,var(--bg) 0,rgba(14,10,19,0) 18%)}
.auth:has(.auth-film){background:var(--bg)}
@media (max-width:860px){
  .auth-film{width:100%;height:46vh;bottom:auto;object-position:34% 50%}
  .auth:has(.auth-film)::before{background:linear-gradient(180deg,rgba(14,10,19,0) 0,rgba(14,10,19,.4) 30%,var(--bg) 46vh)}
}
