:root{--md-sys-color-primary: #0b57d0;--md-sys-color-on-primary: #ffffff;--md-sys-color-primary-container: #d3e3fd;--md-sys-color-on-primary-container: #041e49;--md-sys-color-secondary-container: #d9e3f8;--md-sys-color-surface: #f8fafd;--md-sys-color-surface-container-lowest: #ffffff;--md-sys-color-surface-container-low: #f2f4f8;--md-sys-color-surface-container: #eceef2;--md-sys-color-surface-container-high: #e6e8ed;--md-sys-color-on-surface: #1a1c1e;--md-sys-color-on-surface-variant: #44474c;--md-sys-color-outline: #74777f;--md-sys-color-outline-variant: #c4c6d0;--md-sys-color-error: #ba1a1a;--md-sys-color-error-container: #ffdad6;--md-sys-color-inverse-surface: #2f3033;--md-sys-color-inverse-on-surface: #f1f0f4;--radius-lg: 28px;--shadow-1: 0 1px 2px rgba(26, 28, 30, .12), 0 1px 3px 1px rgba(26, 28, 30, .08);--font: "Noto Sans SC", "Segoe UI", sans-serif}@media(prefers-color-scheme:dark){:root{--md-sys-color-primary: #a8c7fa;--md-sys-color-on-primary: #062e6f;--md-sys-color-primary-container: #0842a0;--md-sys-color-on-primary-container: #d3e3fd;--md-sys-color-secondary-container: #3e4759;--md-sys-color-surface: #111318;--md-sys-color-surface-container-lowest: #0c0e13;--md-sys-color-surface-container-low: #191c20;--md-sys-color-surface-container: #1d2024;--md-sys-color-surface-container-high: #272a2f;--md-sys-color-on-surface: #e3e2e6;--md-sys-color-on-surface-variant: #c4c6d0;--md-sys-color-outline: #8e9099;--md-sys-color-outline-variant: #44474c;--md-sys-color-error: #ffb4ab;--md-sys-color-error-container: #93000a;--md-sys-color-inverse-surface: #e3e2e6;--md-sys-color-inverse-on-surface: #2f3033;--shadow-1: 0 1px 3px rgba(0,0,0,.4)}}*{box-sizing:border-box}html,body,#app{height:100%}body{margin:0;background:var(--md-sys-color-surface);color:var(--md-sys-color-on-surface);font-family:var(--font);font-size:14px;line-height:1.5}.app{display:grid;grid-template-columns:220px 1fr;min-height:100%;transition:grid-template-columns .2s ease}.app.collapsed{grid-template-columns:72px 1fr}.rail{background:var(--md-sys-color-surface-container);display:flex;flex-direction:column;align-items:stretch;padding:12px 8px 20px;gap:4px;overflow:hidden}.brand{width:56px;height:56px;border-radius:16px;background:var(--md-sys-color-primary-container);color:var(--md-sys-color-on-primary-container);display:grid;place-items:center;font-weight:700;font-size:18px;margin:0 auto 12px;flex:0 0 auto}.rail button{width:100%;border:0;background:transparent;color:var(--md-sys-color-on-surface-variant);border-radius:16px;padding:10px 12px;cursor:pointer;font:inherit;display:flex;align-items:center;gap:12px;text-align:left;white-space:nowrap}.rail button .material-symbols-outlined{font-size:24px;flex:0 0 24px}.rail button.active{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-surface)}.app.collapsed .rail{align-items:center}.app.collapsed .rail button{width:56px;padding:10px 0;justify-content:center}.app.collapsed .rail-text{display:none}.shell{display:flex;flex-direction:column;min-width:0}.topbar{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;gap:16px}.top-left{display:flex;align-items:center;gap:8px;min-width:0}.topbar h1{margin:0;font-size:22px;font-weight:500}.icon-btn{border:0;background:transparent;color:inherit;width:40px;height:40px;border-radius:20px;cursor:pointer;display:grid;place-items:center}.icon-btn:hover{background:var(--md-sys-color-surface-container-high)}.status{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.chip{background:var(--md-sys-color-secondary-container);border-radius:8px;padding:6px 12px;font-size:12px;font-weight:500}.chip.ok{background:#c4eed0;color:#0d652d}.chip.warn{background:var(--md-sys-color-error-container);color:var(--md-sys-color-error)}@media(prefers-color-scheme:dark){.chip.ok{background:#0f3d22;color:#7ddf99}}main{padding:8px 28px 32px;min-width:0}.grid{display:grid;gap:16px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.card{background:var(--md-sys-color-surface-container-lowest);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow-1)}.card h2,.card h3{font-weight:500;margin:0 0 12px}.card h2{font-size:20px}.card h3{font-size:16px}.metric{font-size:28px;font-weight:500}.muted{color:var(--md-sys-color-on-surface-variant)}ol.guide{padding-left:20px}ol.guide li{margin:8px 0}code,pre{font-family:ui-monospace,Consolas,monospace;font-size:12px}pre{background:var(--md-sys-color-surface-container-low);padding:12px 14px;border-radius:12px;overflow:auto;white-space:pre-wrap}label{display:block;font-size:12px;color:var(--md-sys-color-on-surface-variant);margin:0 0 6px}input,textarea,select{width:100%;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-lowest);color:inherit;border-radius:4px 4px 0 0;border-bottom-width:2px;padding:14px 16px;font:inherit;outline:none}textarea{min-height:110px;resize:vertical}input:focus,textarea:focus,select:focus{border-color:var(--md-sys-color-primary)}.row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}.row>*{flex:1;min-width:160px}.btn{border:0;border-radius:20px;padding:10px 24px;font:inherit;font-weight:500;cursor:pointer}.btn-filled{background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary)}.btn-tonal{background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-surface)}.btn-text{background:transparent;color:var(--md-sys-color-primary)}.btn:disabled{opacity:.5;cursor:not-allowed}.seg{display:inline-flex;background:var(--md-sys-color-surface-container-high);border-radius:20px;padding:4px;gap:4px}.seg.wrap{flex-wrap:wrap}.seg button{border:0;background:transparent;color:inherit;border-radius:16px;padding:8px 16px;cursor:pointer;font:inherit}.seg button.on{background:var(--md-sys-color-secondary-container);font-weight:500}.opts-toggle{border:0;background:transparent;color:var(--md-sys-color-primary);font:inherit;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:8px;padding:4px 0 10px;width:100%}.opts-toggle .material-symbols-outlined{font-size:20px}.opts-summary{margin-left:auto;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:55%}.opts{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:10px}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px 8px;border-bottom:1px solid var(--md-sys-color-outline-variant);vertical-align:top}th{font-size:12px;color:var(--md-sys-color-on-surface-variant);font-weight:500}.chat-wrap{display:grid;grid-template-rows:1fr auto;height:calc(100vh - 120px);gap:12px}.thread{overflow:auto;background:var(--md-sys-color-surface-container-low);border-radius:var(--radius-lg);padding:20px}.msg{max-width:72%;margin:0 0 14px;padding:12px 16px;border-radius:20px;white-space:pre-wrap;word-break:break-word}.msg.user{margin-left:auto;background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary);border-bottom-right-radius:6px}.msg.assistant{background:var(--md-sys-color-surface-container-lowest);border-bottom-left-radius:6px;box-shadow:var(--shadow-1)}.msg .role{font-size:11px;opacity:.7;margin-bottom:4px}.msg .think{font-size:12px;margin-bottom:6px;white-space:pre-wrap}.composer{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;background:var(--md-sys-color-surface-container-lowest);border-radius:var(--radius-lg);padding:12px;box-shadow:var(--shadow-1)}.composer textarea{min-height:56px;border-radius:16px;border-width:1px}.empty{text-align:center;padding:48px 16px;color:var(--md-sys-color-on-surface-variant)}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%);background:var(--md-sys-color-inverse-surface);color:var(--md-sys-color-inverse-on-surface);padding:12px 20px;border-radius:8px;z-index:30}.gate{position:fixed;top:0;right:0;bottom:0;left:0;background:color-mix(in srgb,var(--md-sys-color-surface) 92%,black);display:grid;place-items:center;z-index:40}.gate .card{width:min(420px,92vw)}@keyframes fadeUp{0%{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}@keyframes msgIn{0%{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}@keyframes toastIn{0%{opacity:0;transform:translate(-50%,16px)}to{opacity:1;transform:translate(-50%)}}@keyframes softPulse{0%,to{opacity:1}50%{opacity:.45}}@keyframes spin{to{transform:rotate(360deg)}}section{animation:fadeUp .32s cubic-bezier(.2,.8,.2,1)}.msg{animation:msgIn .25s ease both}.toast{animation:toastIn .28s cubic-bezier(.2,.8,.2,1)}.gate .card{animation:fadeUp .45s cubic-bezier(.2,.8,.2,1)}.live{animation:softPulse 1.6s ease-in-out infinite}.btn,.rail button,.seg button,.icon-btn,.chip{transition:background-color .2s ease,color .2s ease,transform .15s ease,box-shadow .2s ease}.btn:active,.seg button:active,.icon-btn:active{transform:scale(.95)}.btn-filled:hover:not(:disabled){box-shadow:0 2px 8px #0b57d059}.rail button:hover{background:var(--md-sys-color-surface-container-high)}.card{transition:box-shadow .25s ease,transform .25s ease}.card:hover{box-shadow:0 4px 14px #1a1c1e29,0 2px 4px #1a1c1e14}.btn .spinner{display:inline-block;width:14px;height:14px;margin-right:6px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;vertical-align:-2px;animation:spin .8s linear infinite}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}.table-scroll table{min-width:560px}@media(max-width:720px){.app,.app.collapsed{display:flex;flex-direction:column;min-height:100dvh}.scrim{position:fixed;top:0;right:0;bottom:0;left:0;z-index:24;background:#0006;opacity:0;pointer-events:none;transition:opacity .25s ease}.scrim.show{opacity:1;pointer-events:auto}.rail{position:fixed;top:60px;left:12px;right:12px;z-index:25;flex-direction:column;padding:10px;background:var(--md-sys-color-surface-container);border-radius:24px;box-shadow:0 8px 28px #00000052;opacity:0;pointer-events:none;transform:translateY(-12px) scale(.98);transform-origin:top left;transition:opacity .22s ease,transform .22s cubic-bezier(.2,.8,.2,1),visibility .22s;visibility:hidden}.rail.open{opacity:1;pointer-events:auto;transform:none;visibility:visible}.rail button{border-radius:999px;padding:12px 16px;font-size:14px}.rail button.active{background:var(--md-sys-color-secondary-container)}.rail-toggle{display:none}.shell{flex:1;min-width:0}.topbar{height:56px;padding:0 12px;position:sticky;top:0;z-index:10;background:var(--md-sys-color-surface)}.topbar h1{font-size:18px}.status{gap:6px}.chip{padding:4px 8px;font-size:11px}.chip.hide-sm{display:none}main{padding:4px 14px 32px}.card{border-radius:20px;padding:16px}.cards{grid-template-columns:repeat(2,1fr)}.metric{font-size:22px}.row>*{min-width:0}.msg{max-width:88%}.chat-wrap{height:calc(100dvh - 160px);gap:8px}.thread{padding:14px}.composer{padding:8px;gap:8px;border-radius:20px}.composer textarea{min-height:48px}pre{font-size:11px;padding:10px 12px}.gate .card{width:min(420px,94vw)}}.img-previews{display:flex;flex-wrap:wrap;gap:8px;padding:6px 2px 2px}.img-prev{position:relative;width:64px;height:64px;border-radius:10px;overflow:hidden;border:1px solid var(--md-sys-color-outline-variant);background:var(--md-sys-color-surface-container-high)}.img-prev img{width:100%;height:100%;object-fit:cover;display:block}.img-del{position:absolute;top:2px;right:2px;width:18px;height:18px;border:none;border-radius:50%;background:#0000008c;color:#fff;font-size:13px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0}.img-del:hover{background:#000000bf}.composer-actions{display:flex;flex-direction:column;gap:8px;align-items:stretch;justify-content:flex-end}.msg-images{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}.msg-images img{max-width:220px;max-height:220px;border-radius:10px;display:block;border:1px solid var(--md-sys-color-outline-variant)}.gen-media{display:inline-block;margin:4px 0;border-radius:12px;overflow:hidden}.gen-img{max-width:min(360px,100%);max-height:360px;border-radius:12px;display:block;border:1px solid var(--md-sys-color-outline-variant);cursor:zoom-in;transition:transform .2s ease,box-shadow .2s ease}.gen-img:hover{transform:scale(1.02);box-shadow:0 4px 18px #00000040}.gen-video{max-width:min(420px,100%);border-radius:12px;display:block;margin:4px 0;border:1px solid var(--md-sys-color-outline-variant);background:#000}@media(max-width:720px){.opts{grid-template-columns:1fr 1fr;gap:8px}.opts>div:first-child{grid-column:1 / -1}.seg button{padding:6px 10px;font-size:12px}.seg{padding:3px;gap:3px}.opts-summary{max-width:40%;font-size:11px}.composer{grid-template-columns:1fr}.composer-actions{flex-direction:row}.composer-actions .btn{flex:1}.msg{max-width:94%;padding:10px 12px}.msg-images img{max-width:100%;max-height:180px}.gen-img{max-width:100%;max-height:260px}.gen-video{max-width:100%}.thread{padding:10px}}@media(max-width:400px){.opts{grid-template-columns:1fr}}
