:root{color-scheme:light;font-family:"Segoe UI",Arial,sans-serif;color:#171717;background:#f4f4f3;--ink:#171717;--muted:#646464;--line:#dededc;--paper:#fafaf9;--white:#fff;--glass:linear-gradient(135deg,#fffffff0,#ffffff81 58%,#ffffffc9);--glass-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 #fff6,0 12px 34px #21212112;--ease:cubic-bezier(.22,.75,.25,1)}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;min-height:100dvh}
button,input,textarea,select{font:inherit}
button,select{cursor:pointer}
button{color:inherit}
button:disabled{cursor:default}
:focus-visible{outline:2px solid #595959;outline-offset:3px}
h1,h2,h3,p{margin:0}
.symbols,.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.brand{display:flex;align-items:center;gap:11px;font-weight:700;font-size:1.2rem;letter-spacing:-.055em;white-space:nowrap}
.logo{display:block;width:33px;height:33px;border-radius:9px;background:#171717 url('/icon.svg') center/cover}
.muted{color:var(--muted)}
.auth{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,1fr);min-height:100dvh}
.auth-art{min-height:100%;background:#161616;color:#fff;display:flex;flex-direction:column;justify-content:space-between;position:relative;isolation:isolate;overflow:hidden;padding:clamp(29px,5vw,79px)}
.auth-art .logo{border:1px solid #636363}
.auth-art .brand{font-size:1.35rem}
.art-grid{position:absolute;inset:0;z-index:-2;background:repeating-linear-gradient(90deg,transparent 0 65px,#2b2b2b 66px 67px),repeating-linear-gradient(0deg,transparent 0 65px,#2b2b2b 66px 67px);mask-image:radial-gradient(ellipse at 52% 46%,black,transparent 80%)}
.sculpture{position:absolute;z-index:-1;width:min(88%,560px);aspect-ratio:1;top:44%;left:50%;translate:-50% -50%;border-radius:50%;background:#bfbfbf;mask-image:radial-gradient(ellipse at 52% 47%,black 14%,#000b 47%,transparent 73%)}
.sculpture i{position:absolute;inset:13% 4%;border:1px solid #141414;border-radius:50%;transform:rotate(var(--rotation)) scaleY(.54)}
.auth-caption{font-size:clamp(3rem,6.2vw,7rem);letter-spacing:-.087em;line-height:.94;font-weight:650;position:relative}
.auth-caption span{color:#9d9d9d}
.auth-content{min-height:100dvh;display:grid;place-items:center;position:relative;padding:36px 22px;background:radial-gradient(ellipse at 87% 15%,#fff,transparent 56%),radial-gradient(ellipse at 4% 95%,#d9d9d7,transparent 54%),#f6f6f5}
.auth-card{width:min(100%,470px);border:1px solid #ffffffee;border-radius:27px;padding:clamp(20px,4vw,37px);background:var(--glass);backdrop-filter:blur(22px) saturate(135%);box-shadow:var(--glass-shadow);animation:appear .38s var(--ease) both}
.auth-card h1{font-size:clamp(2.6rem,5vw,4.4rem);font-weight:650;letter-spacing:-.08em;line-height:1}
.auth-card>.muted{margin:14px 0 29px}
.mobile-brand{display:none}
.fields{display:grid;gap:14px}
.fields label{display:grid;gap:6px;min-width:0;font-weight:600;font-size:.9rem}
.fields input{width:100%;min-width:0;border:1px solid #dcdcdc;border-radius:11px;padding:11px 12px;background:#fff9;color:var(--ink);font-weight:400;font-size:1rem;min-height:45px;transition:background .2s,border-color .2s,box-shadow .2s}
.fields input:focus{outline:0;border-color:#777;background:#fff;box-shadow:0 0 0 3px #1b1b1b16}
.fields input[aria-invalid=true]{border-color:#5d5d5d;box-shadow:inset 0 0 0 1px #5d5d5d}
.password-wrap{position:relative}
.password-wrap input{padding-inline-end:92px}
.password-wrap input::-ms-reveal,.password-wrap input::-ms-clear{display:none}
.password-wrap button{position:absolute;inset-inline-end:7px;top:27px;border:0;border-radius:7px;background:transparent;padding:6px 8px;color:#474747;font-size:.82rem;font-weight:600}
.password-wrap button:hover{background:#eaeaea}
.field-error{display:block;color:#444;font-size:.8rem;line-height:1.35;font-weight:600;animation:appear .2s var(--ease) both}
.field-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.primary{background:linear-gradient(150deg,#363636,#171717 70%);border:1px solid var(--ink);color:#fff;border-radius:12px;font-weight:600;min-height:45px;padding:10px 16px;box-shadow:inset 0 1px 0 #fff3}
.primary:hover,.send:hover{background:#333}
.primary:disabled{opacity:.6}
.auth-card .primary{margin-top:5px}
.auth-switch{font-size:.9rem;color:var(--muted);margin-top:14px}
.text-button{border:0;padding:0;background:none;color:var(--ink);text-decoration:underline;text-underline-offset:3px;font-weight:600}
.notice{color:#444;font-size:.88rem;margin-top:10px}
.notice:empty{display:none}
.workspace{--chat-width:760px;--gutter:clamp(15px,4vw,32px);height:100dvh;display:flex;flex-direction:column;overflow:hidden;background:radial-gradient(ellipse at 90% 100%,#e3e3e2,transparent 64%),#f7f7f6}
.top{height:70px;flex:none;border-bottom:1px solid #d9d9d989;background:#ffffffa9;backdrop-filter:blur(22px);display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 var(--gutter);position:relative;z-index:4}
.menu-toggle{display:flex;align-items:center;gap:10px;background:#191919;color:#fff;border:1px solid #191919;border-radius:12px;min-height:40px;padding:0 13px;font-size:.88rem;font-weight:600;box-shadow:inset 0 1px 0 #fff3,0 3px 8px #0002}
.menu-toggle:hover,.menu-toggle[aria-expanded=true]{background:#363636}
.menu-lines{display:grid;width:18px;gap:3px;flex:none}
.menu-lines i{display:block;width:100%;height:2px;border-radius:2px;background:currentColor}
.model-picker{position:relative}
.model-picker>button{display:flex;align-items:center;gap:6px;min-height:38px;border:1px solid #dededc;background:#f6f6f5;border-radius:10px;padding:6px 9px;font-weight:600;font-size:.88rem}
.model-picker>button:hover,.model-picker>button[aria-expanded=true]{background:#eaeae8}
.model-picker svg{width:15px;height:15px}
.model-chevron{transition:rotate .2s var(--ease)}
.model-picker button[aria-expanded=true] .model-chevron{rotate:180deg}
.model-options{position:absolute;left:0;bottom:calc(100% + 8px);width:max-content;min-width:154px;padding:5px;border:1px solid #ddd;border-radius:12px;background:#fff;box-shadow:0 10px 22px #0002;animation:appear .2s var(--ease) both;z-index:1}
.model-options button{width:100%;text-align:left;padding:8px 10px;background:none;border:0;border-radius:8px}
.model-options button[aria-pressed=true]{background:#e9e9e8;font-weight:600}
.icon-button{display:inline-grid;place-items:center;background:var(--glass);width:38px;height:38px;border:1px solid #fff;border-radius:11px;padding:0;box-shadow:inset 0 1px 0 #fff,0 3px 10px #0000000d}
.icon-button:hover,.profile:hover,.profile-menu button:hover,.history button:hover{background:#eeeeec}
.chat-layout{flex:1;display:flex;min-height:0;position:relative}
.chat{flex:1;min-width:0;display:flex;flex-direction:column}
.welcome{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;justify-content:safe center;align-items:center;text-align:center;padding:25px var(--gutter);animation:appear .35s var(--ease) both}
.assistant-brand{display:flex;align-items:center;gap:10px;margin-bottom:20px;font-size:.93rem;font-weight:700;letter-spacing:.035em;animation:float-in .5s var(--ease) both}
.assistant-brand .logo{width:37px;height:37px;border-radius:11px;box-shadow:0 4px 12px #0002}
.welcome h1{font-size:clamp(2.15rem,5.8vw,4.7rem);letter-spacing:-.075em;font-weight:650;line-height:1.03}
.welcome p{margin-top:10px}
.suggestions{margin-top:24px;display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
.suggestions button{display:flex;align-items:center;gap:8px;border:1px solid #dcdcdc;background:#ffffffb5;border-radius:10px;padding:9px 11px;font-size:.86rem}
.suggestions button:hover{border-color:#a0a0a0}
.suggestions svg{width:16px;height:16px;color:#505050}
.composer-area{width:min(100%,calc(var(--chat-width) + 2 * var(--gutter)));margin:0 auto;padding:12px var(--gutter) clamp(16px,4vh,32px)}
.composer-area .notice{margin:0 0 9px;padding:9px 11px;background:#fff;border:1px solid #d8d8d8;border-radius:9px}
.accuracy-note{margin:10px 4px 0;text-align:center;font-size:.78rem;color:var(--muted)}
.composer{border:1px solid #fff;border-radius:18px;background:var(--glass);backdrop-filter:blur(24px);padding:10px;box-shadow:var(--glass-shadow);transition:border-color .2s,box-shadow .25s}
.composer:focus-within{border-color:#aaa}
.composer textarea{width:100%;min-height:48px;max-height:140px;field-sizing:content;display:block;border:0;padding:7px 6px;resize:none;background:transparent;color:var(--ink);outline:none}
.composer-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}
.composer-tools{display:flex;align-items:center;gap:7px}
.composer-tools .icon-button{border-color:#dededc;box-shadow:none}
.send{background:linear-gradient(150deg,#3c3c3c,#171717 76%);color:#fff;border-color:#171717;box-shadow:inset 0 1px 0 #fff3}
.send:disabled{opacity:.38}
.messages{flex:1;min-height:0;overflow-y:auto;padding:26px max(var(--gutter),calc((100% - var(--chat-width))/2)) 14px;display:flex;flex-direction:column;gap:23px}
.message{display:flex;flex-direction:column;gap:6px;max-width:min(100%,640px);flex:none;align-self:flex-start}
.message strong{display:flex;align-items:center;gap:7px;font-size:.83rem;font-weight:650}
.message strong .logo{width:22px;height:22px;border-radius:6px}
.message p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.62;margin-inline-start:29px}
.message:last-child{animation:appear .28s var(--ease) both}
.message.user{align-self:flex-end;align-items:flex-end;max-width:80%}
.message.user p{margin:0;padding:8px 13px;background:#e9e9e7;border:1px solid #dadada;border-radius:13px 4px 13px 13px}
.thinking{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.9rem}
.thinking-dots{display:flex;gap:3px}
.thinking-dots i{width:5px;height:5px;border-radius:50%;background:#333;animation:thinking .82s ease-in-out infinite alternate}
.thinking-dots i:nth-child(2){animation-delay:.14s}
.thinking-dots i:nth-child(3){animation-delay:.28s}
.sidebar-scrim{position:absolute;inset:0;z-index:2;border:0;background:#10101019;animation:fade-in .2s ease both}
.sidebar{position:absolute;left:auto;right:var(--gutter);top:10px;width:min(88vw,320px);height:min(560px,calc(100% - 20px));display:flex;flex-direction:column;gap:12px;padding:15px;background:linear-gradient(140deg,#fafaf9f5,#ededebed);backdrop-filter:blur(28px) saturate(130%);border:1px solid #fff;border-radius:17px;box-shadow:0 14px 48px #0003;min-height:0;z-index:3;transform:translateX(20px);opacity:0;visibility:hidden;transition:transform .25s var(--ease),opacity .25s,visibility 0s linear .25s}
.sidebar.is-open{transform:translateX(0);opacity:1;visibility:visible;transition:transform .25s var(--ease),opacity .25s}
.sidebar-head,.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.sidebar h2{font-size:1rem;letter-spacing:-.02em}
.new-chat{display:flex;align-items:center;gap:8px;justify-content:center}
.history{flex:1;min-height:0;overflow:auto}
.history>p{padding:10px 4px;color:var(--muted);font-size:.88rem}
.history button,.profile,.profile-menu button{border:0;background:none;text-align:left;border-radius:9px;width:100%}
.history button{display:flex;gap:8px;align-items:center;padding:9px;font-size:.9rem}
.history button[aria-current=true]{background:#ededeb}
.history-row{display:flex;flex-wrap:wrap;align-items:center;gap:2px}
.history-row>button:first-child{flex:1;min-width:0}
.history-row>button.chat-more{width:auto;padding:7px 10px}
.history-row .chat-actions{display:flex;width:100%;padding:0 0 3px 23px}
.history-row .chat-actions button{padding:6px 8px;font-size:.8rem}
.library-button,.dialog-actions>button:first-child,.file-list button{background:transparent;border:1px solid var(--line);border-radius:9px;padding:8px 12px}
.history button span,.profile-text strong,.profile-text small{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.profile{border:1px solid var(--line);display:flex;align-items:center;gap:10px;padding:8px}
.avatar{display:grid;place-items:center;flex:none;border-radius:8px;background:#1e1e1e;color:#fff;width:32px;height:32px;font-weight:600;font-size:.85rem}
.profile-text{min-width:0;flex:1;display:grid;gap:1px}
.profile-text small{color:var(--muted);font-size:.78rem}
.profile>svg{width:15px}
.profile-menu{border:1px solid var(--line);border-radius:10px;padding:4px}
.profile-menu button{display:block;padding:9px 11px;font-size:.9rem}
dialog{color:var(--ink);border:1px solid #fff;border-radius:23px;width:min(94vw,720px);padding:0;max-height:92dvh;background:linear-gradient(130deg,#fcfcfbf5,#f0f0eef5);backdrop-filter:blur(30px);box-shadow:inset 0 1px 0 #fff,0 24px 70px #0003}
dialog[open]{animation:float-in .28s var(--ease) both}
dialog::backdrop{background:#16161652;backdrop-filter:blur(5px);animation:fade-in .2s ease both}
.dialog-head{padding:17px 21px;border-bottom:1px solid #d8d8d78a}
.dialog-head h2{font-size:1.45rem;letter-spacing:-.05em}
.settings-layout{display:grid;grid-template-columns:154px minmax(0,1fr);min-height:340px}
.settings-tabs{display:flex;flex-direction:column;gap:5px;padding:15px 10px;border-right:1px solid #d8d8d78a}
.settings-tabs button{background:none;border:1px solid transparent;border-radius:10px;text-align:left;padding:9px 11px;font-size:.88rem}
.settings-tabs button:hover{background:#ffffffaa}
.settings-tabs button[aria-selected=true]{background:#fff;border-color:#fff;box-shadow:0 3px 9px #0000000d;font-weight:650}
.settings-panels{padding:clamp(16px,4vw,26px);min-width:0}
.settings-panels section{animation:appear .23s var(--ease) both}
.settings-panels h3{font-size:1.1rem;letter-spacing:-.02em;margin-bottom:15px}
.setting-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--line);font-size:.92rem}
.setting-row p{font-size:.84rem;margin-top:3px}
.setting-row>span{color:var(--muted);text-align:right}
.limit{display:grid;gap:11px;padding:14px 0}
.limit>div:first-child{display:flex;justify-content:space-between;gap:10px;font-size:.92rem}
.limit>div:first-child span{font-variant-numeric:tabular-nums;color:var(--muted)}
.limit-meter{position:relative;height:8px;border-radius:999px;background:#dcdcdc;box-shadow:inset 0 1px 2px #0002}
.limit-meter span{display:block;width:var(--usage,0%);height:100%;border-radius:inherit;background:linear-gradient(90deg,#777,#292929);transition:width .48s var(--ease)}
.limit-meter::after{content:"";position:absolute;top:-3px;bottom:-3px;left:clamp(0px,var(--usage,0%),calc(100% - 2px));width:2px;background:#222;border-radius:2px;transition:left .48s var(--ease)}
dialog .primary{justify-self:start}
.compact-dialog{width:min(94vw,520px)}
.dialog-body{padding:18px 21px}
.dialog-actions,.file-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px}
.dialog-actions{justify-content:flex-end}
.file-list{list-style:none;margin:10px 0 0;padding:0;max-height:52dvh;overflow:auto}
.file-list li{display:flex;gap:9px;align-items:center;justify-content:space-between;padding:9px 1px;border-bottom:1px solid var(--line)}
.file-list a{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:inherit}
.file-list small,#file-usage{color:var(--muted)}
.file-upload{cursor:pointer}
.file-upload:focus-within{outline:2px solid var(--ink);outline-offset:2px}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
@keyframes appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@keyframes float-in{from{opacity:0;transform:translateY(9px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes thinking{from{transform:translateY(1px);opacity:.35}to{transform:translateY(-3px);opacity:1}}
@media(max-width:720px){
  .auth{display:block}
  .auth-art{display:none}
  .auth-content{padding:22px 16px}
  .mobile-brand{display:flex;margin-bottom:28px}
  .top{height:59px}
}
@media(max-width:560px){
  .settings-layout{grid-template-columns:minmax(0,1fr)}
  .settings-tabs{flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid #d8d8d78a;padding:8px}
  .settings-tabs button{white-space:nowrap;padding:8px 9px}
}
@media(max-width:420px){
  .top .brand{font-size:1.07rem;gap:7px}
  .suggestions{margin-top:21px}
  .suggestions button{padding:8px 9px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
