:root{--page:#f6f6f4;--ink:#18181b;--muted:#71717a;--line:#e9e9ec;--line-strong:#d4d4d8;--surface:#fff;--surface-2:#f4f4f5;--accent:#18181b;--accent-ink:#fff;--accent-soft:#18181b0f;--accent-border:#18181b24;--shadow:0 1px 2px #18181b0a, 0 4px 16px #18181b0d;--sans:system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;--mono:ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;font:15px/1.5 var(--sans);letter-spacing:0;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:var(--ink);background:var(--page);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--page:#0c0c0e;--ink:#f4f4f5;--muted:#a1a1aa;--line:#232327;--line-strong:#2e2e33;--surface:#161619;--surface-2:#1c1c20;--accent:#f4f4f5;--accent-ink:#18181b;--accent-soft:#f4f4f514;--accent-border:#f4f4f529;--shadow:0 1px 2px #0000004d, 0 4px 16px #00000040}}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--page);overscroll-behavior-y:none;min-height:100svh}#root{text-align:left;width:100%;min-height:100svh}h1,h2,h3,p{margin:0}h1,h2{font-family:var(--sans);color:var(--ink);font-weight:600}button{font-family:inherit}img{max-width:100%;display:block}::selection{background:var(--accent-soft)}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--line-strong);background-clip:padding-box;border:2px solid #0000;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:var(--muted);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-track{background:0 0}.app-shell{--gem-bg:#fff;--gem-surface:#f0f4f9;--gem-surface-2:#e9eef4;--gem-bubble-user:#c2e7ff;--gem-ink:#1f1f1f;--gem-muted:#5f6368;--gem-line:#e3e3e3;--gem-line-strong:#d5d5d5;--gem-accent:#1a73e8;--gem-accent-soft:#1a73e814;--gem-shadow:0 1px 3px #00000014, 0 1px 2px #0000000a;background:var(--gem-bg);min-height:100svh;color:var(--gem-ink);grid-template-columns:auto 1fr;display:grid}@media (prefers-color-scheme:dark){.app-shell{--gem-bg:#1e1f20;--gem-surface:#282a2c;--gem-surface-2:#35373a;--gem-bubble-user:#005c8a;--gem-ink:#e3e3e3;--gem-muted:#9aa0a6;--gem-line:#2d2e30;--gem-line-strong:#3c4043;--gem-accent:#a8c7fa;--gem-accent-soft:#a8c7fa1f;--gem-shadow:0 1px 3px #0006}}.sidebar{background:var(--gem-bg);border-right:1px solid var(--gem-line);flex-direction:column;gap:10px;width:280px;height:100svh;padding:10px;display:flex;position:sticky;top:0}.sidebar-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.new-chat-button{border:1px solid var(--gem-line);background:var(--gem-surface);height:44px;color:var(--gem-ink);cursor:pointer;border-radius:999px;flex:1;align-items:center;gap:9px;padding:0 18px;font-size:14px;font-weight:500;transition:background .15s;display:inline-flex}.new-chat-button:hover{background:var(--gem-surface-2)}.sidebar-list{flex-direction:column;flex:1;gap:2px;margin:0 -6px;padding:0 6px;display:flex;overflow-y:auto}.sidebar-empty{color:var(--gem-muted);text-align:center;padding:20px 8px;font-size:13px}.history-item{border-radius:999px;grid-template-columns:1fr auto;align-items:stretch;transition:background .15s;display:grid;overflow:hidden}.history-item:hover{background:var(--gem-surface)}.history-item.active{background:var(--gem-accent-soft)}.history-item.active .history-main{color:var(--gem-accent);font-weight:600}.history-main{min-width:0;color:var(--gem-ink);cursor:pointer;text-align:left;background:0 0;border:0;grid-template-columns:8px 1fr;align-items:center;gap:10px;padding:10px 14px;font-size:14px;display:grid}.history-prompt{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.history-regen{width:34px;color:var(--gem-muted);cursor:pointer;opacity:0;background:0 0;border:0;place-items:center;transition:opacity .15s,color .15s;display:grid}.history-item:hover .history-regen{opacity:1}.history-regen:hover:not(:disabled){color:var(--gem-ink)}.history-regen:disabled{opacity:.4;cursor:not-allowed}.run-dot{background:var(--gem-muted);border-radius:999px;width:7px;height:7px}.run-dot.succeeded{background:#1e8e3e}.run-dot.running,.run-dot.submitting{background:#f9ab00}.run-dot.failed,.run-dot.timeout{background:#d93025}.sidebar-foot{border-top:1px solid var(--gem-line);padding-top:8px}.ghost-button{width:100%;height:38px;color:var(--gem-muted);cursor:pointer;background:0 0;border:0;border-radius:999px;justify-content:center;align-items:center;gap:8px;font-size:13px;transition:background .15s,color .15s;display:inline-flex}.ghost-button:hover{background:var(--gem-surface);color:var(--gem-ink)}.main{flex-direction:column;min-width:0;height:100svh;display:flex;position:relative}.topbar{height:64px;padding:0 12px;padding-top:env(safe-area-inset-top);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);z-index:20;background:#ffffffb3;border-bottom:1px solid #0000;align-items:center;gap:8px;display:flex;position:sticky;top:0}@media (prefers-color-scheme:dark){.topbar{background:#1e1f20b3}}.topbar-title{color:var(--gem-ink);pointer-events:none;flex:1;justify-content:center;align-items:center;gap:8px;font-size:18px;font-weight:500;display:flex}.topbar-spark{color:var(--gem-accent)}.icon-button{width:40px;height:40px;color:var(--gem-ink);cursor:pointer;background:0 0;border:0;border-radius:999px;place-items:center;transition:background .15s;display:grid}.icon-button:hover{background:var(--gem-surface)}.chat-scroll{scroll-behavior:smooth;flex:1;padding:24px 16px 8px;overflow-y:auto}.welcome{flex-direction:column;align-items:center;gap:32px;max-width:760px;margin:0 auto;padding-top:12svh;display:flex}.welcome-title{text-align:center;letter-spacing:-.02em;font-size:clamp(34px,6vw,52px);font-weight:500;line-height:1.15}.welcome-title span{color:var(--gem-muted);font-weight:400}.suggestion-grid{grid-template-columns:repeat(2,1fr);gap:12px;width:100%;display:grid}.suggestion-card{border:1px solid var(--gem-line);background:var(--gem-bg);min-height:64px;color:var(--gem-ink);text-align:left;cursor:pointer;border-radius:16px;align-items:center;gap:12px;padding:14px 18px;font-size:14px;transition:background .15s,border-color .15s;display:flex}.suggestion-card:hover{background:var(--gem-surface);border-color:var(--gem-line-strong)}.suggestion-card svg{color:var(--gem-muted);flex:none}.chat-stream{flex-direction:column;gap:28px;max-width:760px;margin:0 auto;padding-bottom:16px;display:flex}.turn{flex-direction:column;gap:12px;display:flex}.turn-user{justify-content:flex-end;display:flex}.user-bubble{background:var(--gem-bubble-user);max-width:80%;color:var(--gem-ink);border-radius:20px;padding:12px 18px}.user-bubble p{white-space:pre-wrap;word-break:break-word;margin:0;font-size:15px;line-height:1.5}.user-bubble span{opacity:.7;margin-top:6px;font-size:11px;display:block}.turn-assistant{flex-direction:column;align-items:flex-start;gap:12px;display:flex}.ref-row{flex-wrap:wrap;gap:8px;display:flex}.ref-thumb{border:1px solid var(--gem-line);border-radius:12px;width:72px;height:72px;display:block;overflow:hidden}.ref-thumb img{object-fit:cover;width:100%;height:100%}.generating-block{color:var(--gem-muted);flex-wrap:wrap;align-items:center;gap:10px;font-size:14px;display:flex}.inline-progress{background:var(--gem-surface-2);border-radius:999px;flex-basis:100%;height:4px;overflow:hidden}.inline-progress span{background:var(--gem-accent);height:100%;transition:width .3s;display:block}.error-block{color:#d93025;background:#d9302514;border-radius:16px;max-width:100%;padding:12px 16px;font-size:14px}.inline-grid{gap:12px;width:100%;display:grid}.inline-grid.count-1{grid-template-columns:minmax(0,420px)}.inline-grid.count-2,.inline-grid.count-3,.inline-grid.count-4{grid-template-columns:repeat(2,minmax(0,1fr));max-width:560px}.inline-card{border:1px solid var(--gem-line);background:var(--gem-surface);border-radius:16px;margin:0;overflow:hidden}.inline-image{background:var(--gem-surface);cursor:zoom-in;border:0;width:100%;padding:0;display:block;position:relative}.inline-image img{object-fit:contain;width:100%;max-height:420px;display:block}.zoom-hint{color:#fff;opacity:0;background:#00000080;border-radius:8px;place-items:center;width:28px;height:28px;transition:opacity .18s;display:grid;position:absolute;top:8px;right:8px}.inline-image:hover .zoom-hint{opacity:1}.inline-actions{justify-content:flex-end;gap:2px;padding:6px 8px;display:flex}.inline-actions button,.inline-actions a{width:30px;height:30px;color:var(--gem-muted);cursor:pointer;background:0 0;border:0;border-radius:8px;place-items:center;text-decoration:none;transition:background .15s,color .15s;display:grid}.inline-actions button:hover,.inline-actions a:hover{background:var(--gem-surface-2);color:var(--gem-ink)}.composer-dock{padding:8px 16px calc(12px + env(safe-area-inset-bottom));width:100%;max-width:760px;margin:0 auto}.error-bar{color:#d93025;background:#fce8e8;border:1px solid #f3c4c4;border-radius:12px;margin-bottom:8px;padding:9px 14px;font-size:13px}@media (prefers-color-scheme:dark){.error-bar{background:#3a2424;border-color:#5f3a3a}}.composer-pill{border:1px solid var(--gem-line);background:var(--gem-surface);box-shadow:var(--gem-shadow);border-radius:28px;padding:8px 8px 8px 12px;transition:border-color .15s}.composer-pill.active{border-color:var(--gem-accent)}.reference-strip{flex-wrap:wrap;align-items:center;gap:6px;padding:4px 4px 8px;display:flex}.reference-chip{background:var(--gem-bg);border:1px solid var(--gem-line);border-radius:999px;align-items:center;gap:6px;max-width:200px;height:30px;padding:0 6px 0 4px;font-size:12px;display:inline-flex}.reference-chip img{object-fit:cover;border-radius:999px;width:22px;height:22px}.reference-chip span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.reference-chip small{color:var(--gem-muted)}.reference-chip button{width:20px;height:20px;color:var(--gem-muted);cursor:pointer;background:0 0;border:0;border-radius:999px;place-items:center;display:grid}.link-chip{color:var(--gem-accent)}.clear-refs{border:1px solid var(--gem-line);background:var(--gem-bg);height:30px;color:var(--gem-muted);cursor:pointer;border-radius:999px;align-items:center;gap:5px;padding:0 12px;font-size:12px;display:inline-flex}.composer-row{align-items:flex-end;gap:4px;display:flex}.tool-icon{width:40px;height:40px;color:var(--gem-muted);cursor:pointer;background:0 0;border:0;border-radius:999px;flex:none;place-items:center;transition:background .15s,color .15s;display:grid}.tool-icon:hover{background:var(--gem-surface-2);color:var(--gem-ink)}.composer-row input[type=file]{display:none}.composer-row textarea{min-height:40px;max-height:200px;color:var(--gem-ink);font:inherit;resize:none;background:0 0;border:0;outline:none;flex:1;padding:9px 4px;font-size:16px;line-height:1.5}.composer-row textarea::placeholder{color:var(--gem-muted)}.send-button{background:var(--gem-accent);color:#fff;cursor:pointer;border:0;border-radius:999px;flex:none;place-items:center;width:40px;height:40px;transition:opacity .15s,background .15s;display:grid}.send-button:disabled{background:var(--gem-surface-2);color:var(--gem-muted);cursor:not-allowed}@media (prefers-color-scheme:dark){.send-button{color:#062e6f}}.composer-meta{justify-content:space-between;align-items:center;gap:10px;padding:8px 14px 0;display:flex}.meta-chip{border:1px solid var(--gem-line);background:var(--gem-bg);height:30px;color:var(--gem-muted);cursor:pointer;border-radius:999px;align-items:center;gap:6px;padding:0 12px;font-size:12px;transition:background .15s,color .15s;display:inline-flex}.meta-chip:hover{background:var(--gem-surface);color:var(--gem-ink)}.meta-hint{color:var(--gem-muted);font-size:11px}.settings-panel{background:var(--gem-bg);border-left:1px solid var(--gem-line);z-index:60;flex-direction:column;width:min(380px,100vw);transition:transform .26s cubic-bezier(.2,0,0,1);display:flex;position:fixed;top:0;bottom:0;right:0;transform:translate(105%);box-shadow:-8px 0 32px #0000001f}.settings-panel.open{transform:translate(0)}.panel-head{border-bottom:1px solid var(--gem-line);justify-content:space-between;align-items:center;height:64px;padding:0 8px 0 20px;display:flex}.panel-head h2{font-size:18px;font-weight:500}.settings-body{flex:1;padding:8px 0 20px;overflow-y:auto}.control-group{gap:8px;padding:14px 20px;display:grid}.control-group label{color:var(--gem-muted);font-size:13px;font-weight:500}.control-group select,.control-group textarea{box-sizing:border-box;border:1px solid var(--gem-line);background:var(--gem-bg);width:100%;color:var(--gem-ink);font:inherit;border-radius:12px;font-size:14px}.control-group select{height:42px;padding:0 12px}.control-group textarea{resize:vertical;min-height:72px;padding:11px 12px;line-height:1.5}.control-group select:focus,.control-group textarea:focus{border-color:var(--gem-accent);box-shadow:0 0 0 3px var(--gem-accent-soft);outline:none}.mono-area{font-family:var(--mono,ui-monospace, monospace);font-size:12px}.segmented{border:1px solid var(--gem-line);background:var(--gem-surface);border-radius:12px;grid-template-columns:repeat(4,1fr);gap:3px;padding:3px;display:grid}.segmented button{min-height:34px;color:var(--gem-muted);cursor:pointer;background:0 0;border:0;border-radius:9px;font-size:13px;font-weight:500;transition:background .15s,color .15s}.segmented button:hover{color:var(--gem-ink)}.segmented button.selected{color:var(--gem-ink);background:var(--gem-bg);box-shadow:0 1px 2px #0000001a}.range-group>div{grid-template-columns:1fr 42px;align-items:center;gap:12px;display:grid}.range-group input{accent-color:var(--gem-accent)}.range-group strong{border:1px solid var(--gem-line);background:var(--gem-bg);border-radius:9px;place-items:center;height:34px;font-size:14px;display:grid}.scrim{z-index:55;cursor:pointer;background:#0006;border:0;display:none;position:fixed;inset:0}.mobile-only{display:none}.spin{animation:.9s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.lightbox{z-index:90;background:#000000f0;place-items:center;padding:24px;animation:.18s lb-fade;display:grid;position:fixed;inset:0}@keyframes lb-fade{0%{opacity:0}}.lightbox-figure{flex-direction:column;align-items:center;gap:14px;max-width:min(92vw,1100px);max-height:90svh;margin:0;display:flex}.lightbox-figure img{object-fit:contain;border-radius:12px;max-width:100%;max-height:74svh}.lightbox-bar{background:#ffffff14;border:1px solid #ffffff24;border-radius:12px;grid-template-columns:1fr auto;align-items:center;gap:14px;width:100%;max-width:760px;padding:12px 14px;display:grid}.lightbox-prompt{color:#e3e3e3;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin:0;font-size:13px;line-height:1.5;display:-webkit-box;overflow:hidden}.lightbox-actions{flex-shrink:0;gap:6px;display:flex}.lightbox-actions button,.lightbox-actions a{color:#e3e3e3;cursor:pointer;background:#ffffff14;border:1px solid #ffffff2e;border-radius:999px;place-items:center;width:38px;height:38px;text-decoration:none;transition:background .15s;display:grid}.lightbox-actions button:hover,.lightbox-actions a:hover{background:#ffffff2e}.lightbox-close,.lightbox-nav{color:#e3e3e3;cursor:pointer;background:#ffffff14;border:1px solid #ffffff2e;border-radius:999px;place-items:center;transition:background .15s;display:grid;position:fixed}.lightbox-close{width:42px;height:42px;top:18px;right:18px}.lightbox-nav{width:46px;height:46px;top:50%;transform:translateY(-50%)}.lightbox-nav.prev{left:18px}.lightbox-nav.next{right:18px}.lightbox-close:hover,.lightbox-nav:hover:not(:disabled){background:#fff3}.lightbox-nav:disabled{opacity:.3;cursor:not-allowed}.lightbox-counter{color:#e3e3e3;font-variant-numeric:tabular-nums;background:#ffffff1a;border:1px solid #ffffff29;border-radius:999px;padding:6px 14px;font-size:12px;position:fixed;bottom:18px;left:50%;transform:translate(-50%)}.app-shell.sidebar-collapsed{grid-template-columns:0 1fr}.app-shell.sidebar-collapsed .sidebar{display:none}@media (width<=1024px){.app-shell,.app-shell.sidebar-collapsed{grid-template-columns:1fr}.sidebar{z-index:60;transition:transform .26s cubic-bezier(.2,0,0,1);display:flex;position:fixed;top:0;left:0;transform:translate(-105%);box-shadow:8px 0 32px #0000001f}.sidebar.open{transform:translate(0)}.scrim{display:block}.mobile-only{display:grid}}@media (width<=600px){.chat-scroll{padding:16px 12px 8px}.welcome{gap:24px;padding-top:8svh}.suggestion-grid{grid-template-columns:1fr}.suggestion-card{min-height:56px}.user-bubble{max-width:88%}.inline-grid.count-1,.inline-grid.count-2,.inline-grid.count-3,.inline-grid.count-4{grid-template-columns:1fr;max-width:100%}.composer-dock{padding:8px 10px calc(12px + env(safe-area-inset-bottom))}.composer-pill{border-radius:24px}.meta-hint{display:none}.composer-meta{justify-content:center}.topbar-title{font-size:16px}.lightbox{padding:0}.lightbox-figure{max-width:100vw;max-height:100svh;padding:10px}.lightbox-figure img{max-height:62svh}.lightbox-bar{grid-template-columns:1fr}.lightbox-actions{flex-wrap:wrap;justify-content:center}.lightbox-actions button,.lightbox-actions a{width:42px;height:42px}.lightbox-close{width:42px;height:42px;top:10px;right:10px}.lightbox-nav{width:44px;height:44px}.lightbox-nav.prev{left:8px}.lightbox-nav.next{right:8px}}
