:root{color-scheme:dark;--bg:#0d1422;--panel:rgba(20,29,46,.79);--surface:#182237;--raised:#202d44;--text:#ecf0fa;--muted:#9caac0;--line:rgba(161,183,219,.14);--accent:#a6bdff;--accent-solid:#a6bdff;--on-accent:#15223e;--input:rgba(29,40,61,.82);--shadow:0 20px 60px #0003;--danger:#ffacae;--hero-blend:lighten}
:root[data-theme=light]{color-scheme:light;--bg:#edf1f8;--panel:rgba(255,255,255,.78);--surface:#fff;--raised:#e6ecf6;--text:#202d45;--muted:#52627b;--line:rgba(46,69,107,.16);--accent:#345bb5;--accent-solid:#345bb5;--on-accent:#fff;--input:rgba(255,255,255,.88);--shadow:0 20px 60px #293b5812;--danger:#b32940;--hero-blend:normal}
*{box-sizing:border-box}html,body{margin:0;height:100%;font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}body{background:var(--bg);color:var(--text);display:flex;overflow:hidden}button,input,textarea,select{font:inherit;color:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button{border:0;background:none}a{color:inherit;text-decoration:none}button:disabled{opacity:.5;cursor:wait}button,textarea,input,select,a{outline-offset:4px}button:focus-visible,a:focus-visible{outline:2px solid var(--accent)}input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:2px}[hidden]{display:none!important}svg.icon{width:19px;height:19px;display:block;flex-shrink:0}button{transition:background .16s,transform .16s}button:hover{background:var(--raised)}button:active{transform:translateY(1px)}.ambient{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 73% -30%,#4c6fb32b,transparent 60%),radial-gradient(ellipse at 110% 110%,#a68a6b0c,transparent 50%)}.sidebar{z-index:20;width:268px;flex-shrink:0;background:var(--panel);border-right:1px solid var(--line);padding:30px 20px 16px;display:flex;flex-direction:column;backdrop-filter:blur(22px)}.brand{display:flex;align-items:center;gap:11px;font-size:25px;font-weight:600;letter-spacing:-1px;margin:0 4px 32px}.brand-caption{display:block;font-size:8px;letter-spacing:1.7px;color:var(--muted);margin-top:1px;font-weight:500}.new-chat{display:flex;align-items:center;gap:10px;border-radius:12px;min-height:48px;padding:0 13px;font-weight:550}.primary-soft{background:linear-gradient(115deg,#88aaff26,#9cb3e80a);box-shadow:inset 0 1px 0 #ffffff14;border:1px solid #a6bdff2b}.shortcut{margin-left:auto;font-size:12px;color:var(--muted)}.search{display:flex;gap:10px;align-items:center;padding:0 12px;margin:17px 0 26px;color:var(--muted);height:43px;border:1px solid var(--line);border-radius:10px}.search input{background:none;border:0;width:100%;min-width:0;font-size:12px}.search input:focus{outline:none}.search:focus-within{outline:2px solid var(--accent)}.section-label{font-size:10px;letter-spacing:1.6px;color:var(--muted);margin:0 12px 14px}.history{flex:1;overflow:auto;min-height:100px}.history-row{display:flex;gap:2px;align-items:center;margin:3px 0;border-radius:10px}.history-row.active{background:var(--raised)}.history-open{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;padding:13px 10px;font-size:13px;min-width:0;border-radius:10px}.history-action{height:36px;width:29px;color:var(--muted);border-radius:6px;display:grid;place-items:center}.history-action svg{width:15px}.sidebar-note{display:flex;gap:11px;margin:20px 8px;color:var(--muted);font-size:12px;align-items:center}.sidebar-note small{display:block;font-size:10px;margin-top:3px}.sidebar-note svg{width:16px}.sidebar-bottom{border-top:1px solid var(--line);padding-top:14px}.profile{display:flex;align-items:center;gap:11px;text-align:left;width:100%;border-radius:10px;padding:4px}.avatar{width:37px;height:37px;display:grid;place-items:center;background:linear-gradient(140deg,#6584b74d,#baa69b30);border:1px solid var(--line);border-radius:50%;font-size:14px}.profile b{font-size:12px;font-weight:550}.profile small{font-size:10px;color:var(--muted);display:block}.profile>svg{margin-left:auto;color:var(--muted);width:17px}.workspace{position:relative;display:flex;flex-direction:column;min-width:0;flex:1;height:100dvh}.topbar{display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:82px;padding:18px 36px;border-bottom:1px solid var(--line)}.top-left,.top-actions{display:flex;align-items:center;gap:16px}.top-left{min-width:0;font-size:12px}.top-left>span:first-of-type{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:250px}.top-separator{opacity:.3}.top-actions{gap:12px}.muted{color:var(--muted)}.connection{font-size:10px;letter-spacing:.3px;color:var(--muted);white-space:nowrap}.connection:before{content:"";display:inline-block;width:5px;height:5px;background:#a6bdff;border-radius:50%;margin-right:7px}.icon-button{width:42px;height:42px;border-radius:10px;display:grid;place-items:center}.small-button{border:1px solid var(--line);padding:8px 14px;border-radius:10px;display:flex;align-items:center;gap:12px;min-height:40px;font-size:12px}.chat-scroll{overflow-y:auto;flex:1;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--line) transparent}.welcome{max-width:840px;margin:0 auto;text-align:center;padding:33px 32px 22px}.eyebrow{font-size:9px;letter-spacing:2.2px;font-weight:500;color:var(--muted);display:flex;align-items:center;gap:8px;justify-content:center}.eyebrow>span{width:4px;height:4px;background:var(--accent);border-radius:50%}.hero-art{width:220px;height:207px;position:relative;margin:1px auto 0}.hero-art img{width:220px;height:220px;object-fit:cover;mix-blend-mode:var(--hero-blend);mask-image:radial-gradient(ellipse,black 40%,transparent 72%)}.art-action{position:absolute;bottom:20px;right:10px;width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--line);background:var(--panel);border-radius:50%;color:var(--muted)}.art-action svg{width:15px}.welcome h1{font-size:clamp(34px,3.6vw,50px);line-height:1.15;font-weight:500;letter-spacing:-2px;margin:0 0 18px}.welcome h1 span{color:var(--accent)}.welcome-description{font-size:13px;line-height:1.85;color:var(--muted);margin:0 0 34px}.suggestions{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;text-align:left}.suggestions button{border:1px solid var(--line);border-radius:16px;padding:17px 16px 18px;text-align:left;background:linear-gradient(140deg,#ffffff07,#ffffff01);position:relative;box-shadow:inset 0 1px 0 #ffffff08}.suggestions button:hover{border-color:#a6bdff50;background:var(--raised);transform:translateY(-3px)}.suggestion-icon{margin-bottom:15px;width:19px;height:19px}.blue{color:#a6bdff}.peach{color:#dcb99f}.lilac{color:#b8a4ed}.suggestions b{display:block;font-size:12px;font-weight:550;margin-bottom:3px}.suggestions button>span:not(.suggestion-icon):not(.suggestion-arrow){font-size:10px;color:var(--muted)}.suggestion-arrow{position:absolute;right:14px;top:18px;color:var(--muted)}.suggestion-arrow svg{width:14px}.composer-wrap{width:100%;max-width:864px;margin:0 auto;padding:0 32px 20px;flex-shrink:0}.composer{border:1px solid #b4c7e52b;border-radius:21px;padding:18px 18px 12px;background:var(--input);box-shadow:var(--shadow),inset 0 1px 0 #ffffff12;backdrop-filter:blur(18px)}.composer:focus-within{border-color:#a6bdff70}.composer textarea{background:none;border:0;display:block;width:100%;min-height:35px;max-height:160px;resize:none;padding:0 3px;font-size:14px;line-height:1.6}.composer textarea:focus{outline:none}textarea::placeholder,input::placeholder{color:var(--muted)}.composer-tools{display:flex;align-items:center;justify-content:space-between;margin-top:8px}.composer-brand{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--muted)}.composer-brand svg{width:14px}.private-label{font-size:10px;opacity:.8}.send-button{display:grid;place-items:center;width:37px;height:37px;background:var(--accent-solid);color:var(--on-accent);border-radius:12px;box-shadow:inset 0 1px 0 #ffffff40}.send-button:hover{background:var(--accent-solid);filter:brightness(1.1)}.stop-button{display:flex;align-items:center;gap:10px;color:var(--accent);font-size:12px;border:1px solid var(--line);border-radius:10px;padding:7px 12px}.stop-button svg{width:12px}.composer-hint{font-size:9px;color:var(--muted);display:flex;justify-content:space-between;gap:12px;margin:12px 4px 0}.generation-status{min-height:25px;font-size:11px;color:var(--muted);padding:0 6px 7px}.generation-status:empty{min-height:15px}.messages{width:100%;max-width:864px;margin:auto;padding:32px}.message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 30px;animation:enter .25s ease}.message.user{align-items:flex-end}.message-label{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px;margin:0 0 9px}.message-label img{width:23px;height:23px}.message-body{line-height:1.85;overflow-wrap:anywhere;max-width:100%;white-space:pre-wrap}.user .message-body{background:var(--raised);padding:12px 19px;border:1px solid var(--line);border-radius:20px 20px 5px 20px;max-width:88%}.assistant .message-body{width:100%}.message-tools{display:flex;gap:5px;align-items:center;margin-top:10px;color:var(--muted)}.message-tools button{font-size:11px;min-width:40px;min-height:34px;padding:5px 9px;border-radius:8px;display:flex;gap:5px;align-items:center}.message-tools svg{width:14px}.message-state{font-size:10px;color:var(--muted)}pre{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:auto;white-space:pre;margin:16px 0}pre code{display:block;font:13px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;padding:15px 18px;color:var(--text);tab-size:2}.code-head{display:flex;align-items:center;justify-content:space-between;background:var(--raised);padding:6px 12px;font:10px/1.5 inherit;color:var(--muted);position:sticky;left:0}.code-head button{border-radius:6px;padding:6px 10px;min-height:32px}.token-keyword{color:var(--accent)}.token-string{color:#c4b08c}.token-comment{color:var(--muted)}.stream-text{white-space:pre-wrap}.stream-text:empty:after{content:'Javob kutilmoqda…';color:var(--muted)}dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:24px;padding:0;width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 40px);box-shadow:0 30px 100px #0005;overflow:auto}dialog::backdrop{background:#080e1dbc;backdrop-filter:blur(8px)}dialog[open]{animation:enter .22s ease}.dialog-content{padding:32px;position:relative;display:flex;flex-direction:column;gap:15px}.dialog-content .eyebrow{justify-content:flex-start;margin-bottom:0}.dialog-content h2{font-size:25px;line-height:1.25;font-weight:550;letter-spacing:-.7px;margin:0}.dialog-content p{margin:0}.dialog-content>.muted{font-size:13px}.dialog-close{position:absolute;top:12px;right:12px}.dialog-content label{display:flex;flex-direction:column;font-size:12px;color:var(--muted);gap:7px}.dialog-content input,select,.field{padding:12px 13px;border:1px solid var(--line);border-radius:10px;background:var(--bg);width:100%;min-height:45px}.primary{border-radius:11px;background:var(--accent-solid);color:var(--on-accent);padding:12px 18px;font-size:13px;font-weight:600;min-height:44px}.primary:hover{background:var(--accent-solid);filter:brightness(1.1)}.quiet{color:var(--muted);padding:10px;border-radius:9px;font-size:12px;min-height:40px}.error{font-size:12px;color:var(--danger);white-space:pre-wrap}.error:empty{display:none}.small{font-size:12px}.setting-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:13px 4px;min-height:48px;font-size:13px;text-align:left}.danger{color:var(--danger)}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);z-index:100;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);padding:14px 22px;border-radius:12px;font-size:13px;max-width:calc(100vw - 32px)}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.mobile-only{display:none}.model-dialog canvas{width:100%;height:280px;touch-action:none;border-radius:16px;background:var(--bg)}.drawer-scrim{position:fixed;inset:0;z-index:19;background:#0008}.model-dialog{padding-top:45px}@keyframes enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@media(min-height:920px){.welcome{padding-top:60px}.hero-art{margin-top:14px;margin-bottom:20px}.suggestions{margin-top:40px}}
@media(max-width:1100px){.sidebar{width:235px;padding:26px 14px 14px}.topbar{padding:16px 24px}.welcome{padding-left:24px;padding-right:24px}.connection{display:none}.welcome h1{font-size:43px}.suggestions{gap:8px}.suggestions button{padding:15px 11px}.suggestions button>span:not(.suggestion-icon):not(.suggestion-arrow){font-size:9px}.composer-hint span{display:none}}
@media(max-width:760px){.sidebar{position:fixed;inset:0 auto 0 0;width:280px;transform:translateX(-100%);transition:transform .22s;backdrop-filter:none;background:var(--surface)}.sidebar.open{transform:none}.mobile-only{display:grid}.desktop-only,.top-separator{display:none}.topbar{min-height:68px;padding:10px 16px}.top-left,.top-actions{gap:7px}.top-left>span:first-of-type{max-width:155px}.small-button{padding:7px 11px}.small-button svg{display:none}.welcome{padding:24px 20px 16px}.eyebrow{font-size:8px;letter-spacing:1.7px}.hero-art{height:172px;width:180px}.hero-art img{width:180px;height:180px}.welcome h1{font-size:38px;letter-spacing:-1.5px}.welcome-description{font-size:12px;margin-bottom:24px}.suggestions{gap:9px;grid-template-columns:1fr}.suggestions button{min-height:65px;padding:12px 16px 12px 50px;border-radius:13px}.suggestion-icon{position:absolute;left:17px;top:21px;margin:0}.suggestions b{font-size:12px}.suggestions button>span:not(.suggestion-icon):not(.suggestion-arrow){font-size:10px}.suggestion-arrow{top:22px}.composer-wrap{padding:0 16px max(13px,env(safe-area-inset-bottom))}.composer{padding:14px 14px 10px;border-radius:18px;backdrop-filter:none}.composer textarea{font-size:16px}.composer-hint{font-size:8px;justify-content:center;margin-top:9px}.private-label{display:none}.messages{padding:24px 18px}.dialog-content{padding:28px 24px}.message-body{font-size:14px}.top-actions .icon-button{width:36px}.chat-scroll{min-height:0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(prefers-reduced-transparency:reduce){.sidebar,.composer{backdrop-filter:none;background:var(--surface)}}
/* Readable UI copy; compact metadata is secondary, never the sole action label. */
.brand-caption{font-size:9px}.search input,.history-open,.profile b,.top-left,.small-button,.suggestions b,.welcome-description,.composer textarea,.setting-row,.dialog-content>.muted,.dialog-content label,.primary,.quiet,.small,.error{font-size:14px}.search input{font-size:13px}.section-label,.eyebrow{font-size:11px}.profile small,.sidebar-note,.sidebar-note small,.suggestions button>span:not(.suggestion-icon):not(.suggestion-arrow),.connection,.composer-brand,.composer-hint,.message-label,.message-tools button,.message-state{font-size:12px}.suggestion-icon{margin-bottom:17px}.suggestions button{min-height:118px}.composer-hint{font-size:11px}.history-action{width:34px;height:44px}.send-button{width:44px;height:44px}.message-tools button{min-height:44px}.art-action{width:44px;height:44px}.top-actions .icon-button{width:44px;height:44px}.composer-brand .private-label{font-size:11px}.generation-status{font-size:12px}.status-action{margin-left:8px;color:var(--accent);border:1px solid var(--line);border-radius:6px;min-height:36px;padding:5px 10px}
@media(max-width:1100px){.suggestions button>span:not(.suggestion-icon):not(.suggestion-arrow){font-size:12px}.suggestions b{font-size:14px}.suggestions button{padding:16px 12px}.suggestion-arrow{right:10px}}
@media(max-width:760px){.suggestions button{min-height:78px;padding:15px 16px 15px 50px}.suggestions b{font-size:14px}.suggestions button>span:not(.suggestion-icon):not(.suggestion-arrow){font-size:12px}.suggestion-icon{top:24px}.suggestion-arrow{top:26px}.welcome-description{font-size:14px}.composer-hint{font-size:10px;text-align:center}.composer textarea{font-size:16px}.eyebrow{font-size:10px}.hero-art{height:150px}.hero-art img{height:160px;width:160px}.art-action{right:0;bottom:4px}.small-button{font-size:13px}.history-action{width:38px}.message-body{font-size:15px}}
@media(max-width:760px){.hero-art{height:135px}.hero-art img{height:150px;width:150px}.suggestions button{min-height:72px;padding-top:12px;padding-bottom:12px}.suggestion-icon{top:22px}.suggestion-arrow{top:24px}.welcome-description{margin-bottom:21px}}
.message-body>p{margin:0 0 12px;white-space:pre-wrap}.message-body>p:last-child{margin-bottom:0}.message-body h2,.message-body h3,.message-body h4{line-height:1.4;letter-spacing:-.3px;margin:20px 0 10px;font-size:21px}.message-body h3{font-size:18px}.message-body h4{font-size:16px}.message-body ul,.message-body ol{white-space:normal;padding-left:24px;margin:12px 0}.message-body li{padding-left:3px;margin:5px 0}.message-body p code,.message-body li code{font:13px/1.6 ui-monospace,Consolas,monospace;background:var(--raised);border:1px solid var(--line);border-radius:5px;padding:2px 5px}.message-body a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}.message-body blockquote{border-left:2px solid var(--accent);padding:8px 16px;margin:12px 0;color:var(--muted);background:var(--panel)}.message-table{overflow:auto;margin:16px 0;border:1px solid var(--line);border-radius:10px;white-space:normal}.message-table table{border-collapse:collapse;width:100%;font-size:13px}.message-table th,.message-table td{padding:10px 14px;text-align:left;border-bottom:1px solid var(--line)}.message-table th{background:var(--raised);font-weight:550}.message-table tr:last-child td{border-bottom:0}
body,.sidebar,.composer,.topbar,dialog,.admin-card{transition:background-color .2s,color .2s,border-color .2s}
#model-fallback{width:100%;height:280px;object-fit:contain;border-radius:16px;background:var(--bg)}
/* Minimum touch target size for essential controls on every viewport. */
.icon-button,.top-actions .icon-button,.history-action{width:44px;height:44px;min-width:44px}.small-button,.quiet,.code-head button{min-height:44px}.search{height:44px}
