:root{--bg:#000;--surface:#101012;--surface-2:#17171a;--surface-3:#1f1f24;--border:rgba(255,255,255,.1);--border-strong:rgba(255,255,255,.2);--fg:#f4f4f5;--muted:#a1a1aa;--accent:#7c3aed;--accent-hover:#6d28d9;--accent-text:#a78bfa;--accent-soft:rgba(124,58,237,.18);--accent-ring:rgba(124,58,237,.45);--on-accent:#fff;--on-accent-soft:rgba(255,255,255,.18);--shadow:0 8px 24px rgba(0,0,0,.55);--shadow-sm:0 2px 8px rgba(0,0,0,.45);--radius-lg:18px;--radius-md:12px;--radius-sm:10px;--font-system:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Inter,"Helvetica Neue",Arial,"Apple Color Emoji","Segoe UI Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}@media (prefers-color-scheme:light){:root{--bg:#fff;--surface:#fff;--surface-2:#f6f6f7;--surface-3:#ededef;--border:rgba(0,0,0,.1);--border-strong:rgba(0,0,0,.22);--fg:#111;--muted:#6b7280;--accent:#ea580c;--accent-hover:#c2410c;--accent-text:#c2410c;--accent-soft:rgba(234,88,12,.12);--accent-ring:rgba(234,88,12,.35);--on-accent:#fff;--on-accent-soft:rgba(255,255,255,.18);--shadow:0 8px 24px rgba(0,0,0,.08);--shadow-sm:0 2px 8px rgba(0,0,0,.06)}}:root.theme-dark{--bg:#000;--surface:#101012;--surface-2:#17171a;--surface-3:#1f1f24;--border:rgba(255,255,255,.1);--border-strong:rgba(255,255,255,.2);--fg:#f4f4f5;--muted:#a1a1aa;--accent:#7c3aed;--accent-hover:#6d28d9;--accent-text:#a78bfa;--accent-soft:rgba(124,58,237,.18);--accent-ring:rgba(124,58,237,.45);--on-accent:#fff;--on-accent-soft:rgba(255,255,255,.18);--shadow:0 8px 24px rgba(0,0,0,.55);--shadow-sm:0 2px 8px rgba(0,0,0,.45)}:root.theme-light{--bg:#fff;--surface:#fff;--surface-2:#f6f6f7;--surface-3:#ededef;--border:rgba(0,0,0,.1);--border-strong:rgba(0,0,0,.22);--fg:#111;--muted:#6b7280;--accent:#ea580c;--accent-hover:#c2410c;--accent-text:#c2410c;--accent-soft:rgba(234,88,12,.12);--accent-ring:rgba(234,88,12,.35);--on-accent:#fff;--on-accent-soft:rgba(255,255,255,.18);--shadow:0 8px 24px rgba(0,0,0,.08);--shadow-sm:0 2px 8px rgba(0,0,0,.06)}
*,:before,:after{box-sizing:border-box}html,body{height:100%}body,h1,h2,p,ul,li{margin:0;padding:0}img{max-width:100%;height:auto;display:block}
body.root{color:var(--fg);background:var(--bg);font-family:var(--font-system);-webkit-font-smoothing:antialiased;line-height:1.6;position:relative;overflow-x:hidden}button:focus-visible{box-shadow:0 0 0 3px var(--accent-ring);outline:none}[tabindex]:focus-visible{box-shadow:0 0 0 3px var(--accent-ring);outline:none}input:focus-visible{box-shadow:0 0 0 3px var(--accent-ring);outline:none}textarea:focus-visible{box-shadow:0 0 0 3px var(--accent-ring);outline:none}summary:focus-visible{box-shadow:0 0 0 3px var(--accent-ring);outline:none}
.container{max-width:1200px;margin:0 auto;padding:72px 20px 40px}.hero{text-align:center;margin-bottom:24px;position:relative}.brand{letter-spacing:-.02em;color:var(--fg);font-size:max(32px,min(6vw,56px));font-weight:800;line-height:1.1}.tagline{max-width:740px;color:var(--muted);margin:12px auto 20px;font-size:max(16px,min(2.2vw,18px))}.heroTop{justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;display:flex}.saveToggleBtn,.themeToggleBtn{border:1px solid var(--border);background:var(--surface);color:var(--fg);cursor:pointer;letter-spacing:.16px;box-shadow:var(--shadow-sm);border-radius:999px;align-items:center;gap:8px;padding:8px 12px;font-weight:700;transition:transform 80ms,box-shadow .18s,background .18s,border-color .18s,color .18s;display:inline-flex}.saveToggleBtn:hover,.themeToggleBtn:hover{border-color:var(--border-strong);background:var(--surface-3);transform:translateY(-1px)}.saveToggleBtn:active,.themeToggleBtn:active{transform:translateY(0)}.saveToggleBtn .saveGlyph,.themeToggleBtn .themeGlyph{background:var(--surface-3);width:28px;height:28px;color:var(--muted);border-radius:999px;place-items:center;display:grid}.saveToggleBtn.isOn{border-color:var(--accent);background:var(--accent-soft);color:var(--fg)}.saveToggleBtn.isOn .saveGlyph{background:var(--accent);color:var(--on-accent)}.saveToggleBtn.isOff{color:var(--muted)}.saveToggleText,.themeToggleText{font-size:13px}.themeToggleBtn.isLight .themeGlyph,.themeToggleBtn.isDark .themeGlyph{background:var(--accent);color:var(--on-accent)}.panel{grid-template-columns:1.1fr .9fr;gap:18px;margin-top:22px;display:grid}@media (max-width:980px){.panel{grid-template-columns:1fr}}
.left{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:18px}.fieldGroup+.fieldGroup{margin-top:14px}.label{color:var(--muted);margin-bottom:8px;font-size:13px;font-weight:600;display:block}.codebox{resize:vertical;width:100%;min-height:400px;font-family:var(--font-mono);color:var(--fg);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-md);outline:none;padding:14px 12px;font-size:13.5px;transition:border-color .15s,box-shadow .15s,background .2s}.codebox::placeholder{color:var(--muted)}.codebox:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.codeboxWrap{position:relative}.codeOverlay{z-index:2;border-radius:var(--radius-md);border:1px solid var(--accent);background:var(--surface-2);box-shadow:var(--shadow);flex-direction:column;gap:6px;padding:12px;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.codeOverlayHeader{justify-content:space-between;align-items:center;gap:10px;display:flex}.dropzone{border:1.5px dashed var(--border-strong);border-radius:var(--radius-md);background:var(--surface-2);color:var(--fg);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:14px 12px;transition:border-color .15s,background .2s,transform 80ms;display:block}.dropzone:hover{border-color:var(--accent);background:var(--accent-soft)}.dropzone:focus-visible{transform:translateY(-1px)}.dzInner svg{color:var(--accent-text)}.fileNote{color:var(--muted);margin-left:auto;font-size:12px;font-style:normal;font-weight:500}.hiddenFile{display:none}
.right{grid-template-rows:auto 1fr;gap:10px;display:grid}.aiHeader{align-items:center;gap:10px;padding:6px 2px;display:flex}.aiHeader h2{color:var(--muted);letter-spacing:.3px;text-transform:uppercase;font-size:15px;font-weight:700}.pulse{background:var(--accent);width:8px;height:8px;box-shadow:0 0 0 0 var(--accent-ring);border-radius:999px;animation:1.4s infinite ping}@keyframes ping{0%{box-shadow:0 0 0 0 var(--accent-ring)}to{box-shadow:0 0 0 12px transparent}}.aiCard{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);min-height:260px;padding:16px;overflow:hidden}.aiText{font-family:var(--font-system);margin:0;font-size:14.5px;line-height:1.7}.aiText>:first-child{margin-top:0!important}.aiText p{margin:.5em 0}.aiText ul,.aiText ol{margin:.5em 0 .5em 1.25em}.aiText code,.historyResponseText code{font-family:var(--font-mono);background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:.12em .38em;font-size:.95em}.aiText pre{background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-md);margin:.75em 0;padding:10px 12px;overflow:auto}.aiText pre code{background:0 0;border:0;padding:0}.aiText a,.historyResponseText a{color:var(--accent-text)}.placeholder{color:var(--muted);font-size:14.5px}.placeholder strong{color:var(--fg)}.placeholder ul{margin-top:8px;padding-left:18px}
.foot{text-align:center;color:var(--muted);margin-top:26px;font-size:13px}
.uploadRow{grid-template-columns:1fr auto auto;align-items:stretch;gap:12px;margin-top:14px;display:grid}.dropzone{order:1;align-items:center;min-height:90px;display:flex}.thumbs{order:2}.helpBtn{order:3}.thumb{order:2}.dzInner{text-align:center;flex-direction:row;justify-content:center;align-items:center;gap:8px;width:100%;height:100%;display:flex}.dropzone.hasFile .dzInner{text-align:center;justify-content:center;align-items:center;width:100%}.dropzone .dzText,.dropzone .dzTextUploaded{letter-spacing:.2px;font-size:13px;font-weight:600}.dropzone .fileNote{font-size:12px;font-weight:500}.dzTextUploaded,.dropzone.hasFile .dzText{display:none}.dropzone.hasFile .dzTextUploaded{display:inline}.dropzone.hasFile .fileNote{display:none}.thumb{border-radius:var(--radius-md);background:var(--surface-2);border:1px solid var(--border);place-items:center;width:120px;max-height:110px;display:grid;overflow:hidden}.thumb img{object-fit:cover;width:100%;height:100%;max-height:110px}.uploadRow.hasGallery .thumb{display:none}.thumbs{align-items:center;gap:10px;max-width:max(120px,min(28vw,360px));padding:6px 2px;display:inline-flex;overflow-x:auto}.thumbItem{border-radius:var(--radius-md);background:var(--surface-2);border:1px solid var(--border);flex:none;place-items:center;width:120px;height:110px;display:grid;position:relative;overflow:hidden}.thumbItem img{object-fit:cover;width:100%;height:100%}.thumbClose{border:1px solid var(--border-strong);background:var(--surface);width:22px;height:22px;color:var(--fg);cursor:pointer;border-radius:999px;place-items:center;font-size:14px;font-weight:800;line-height:20px;display:grid;position:absolute;top:6px;right:6px}.thumbClose:hover{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.helpBtn{border-radius:var(--radius-md);border:1px solid var(--accent);background:var(--accent);color:var(--on-accent);letter-spacing:.2px;cursor:pointer;box-shadow:var(--shadow-sm);white-space:nowrap;align-items:center;gap:8px;padding:10px 14px;font-weight:700;transition:transform 80ms,box-shadow .2s,background .2s,border-color .2s;display:inline-flex}.helpBtn:hover{background:var(--accent-hover);border-color:var(--accent-hover);transform:translateY(-1px)}.helpBtn:active{transform:translateY(0)}.helpBtn:disabled{opacity:.7;cursor:default;transform:none}.askInput{border-radius:var(--radius-md);border:1px solid var(--border);background:var(--surface-2);width:100%;height:44px;color:var(--fg);outline:none;padding:10px 12px;transition:border-color .15s,box-shadow .15s,background .2s}.askInput::placeholder{color:var(--muted)}.askInput:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}@media (max-width:640px){.uploadRow{grid-template-columns:1fr}.thumb{width:100%;max-height:180px}.thumbs{max-width:100%}.helpBtn{justify-content:center;width:100%;margin-top:10px}}
.loaderWrap{place-items:center;gap:10px;padding:12px 0;display:grid}.loaderTrack{background:var(--surface-3);isolation:isolate;border-radius:999px;width:min(520px,100%);height:10px;position:relative;overflow:hidden}.loaderBar{border-radius:inherit;background:var(--accent);pointer-events:none;width:35%;animation:1.4s ease-in-out infinite loaderSlide;position:absolute;top:0;bottom:0;left:0}@keyframes loaderSlide{0%{transform:translate(-100%)}to{transform:translate(300%)}}.loaderHint{color:var(--muted);font-size:13px}.overlayLoader{gap:8px;padding:12px;display:grid}@media (prefers-reduced-motion:reduce){.loaderBar{animation-duration:2.6s}}
.codebox::-webkit-scrollbar{width:10px;height:10px}.codebox::-webkit-scrollbar-track{background:0 0;border-radius:6px}.codebox::-webkit-scrollbar-thumb{background:var(--border-strong);border:2px solid var(--surface-2);border-radius:6px}.codebox::-webkit-scrollbar-thumb:hover{background:var(--accent)}.codebox{scrollbar-width:thin;scrollbar-color:var(--border-strong)transparent}
.modeBar{flex-wrap:wrap;justify-content:center;gap:8px;margin-top:14px;display:inline-flex}.modeChip{border:1px solid var(--border);background:var(--surface);color:var(--fg);cursor:pointer;box-shadow:var(--shadow-sm);text-align:left;border-radius:999px;align-items:center;gap:8px;padding:9px 14px;font-size:13px;line-height:1.3;transition:transform 80ms,box-shadow .2s,border-color .2s,background .2s,color .2s;display:inline-flex;position:relative;overflow:hidden}.modeChip:hover{border-color:var(--border-strong);background:var(--surface-3);transform:translateY(-1px)}.modeChip.isActive{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}.modeIcon{background:var(--surface-3);width:24px;height:24px;color:var(--accent-text);border-radius:999px;place-items:center;display:grid}.modeChip.isActive .modeIcon{background:var(--on-accent-soft);color:var(--on-accent)}.modeIcon svg{display:block}.modeLabelText{letter-spacing:.2px;font-weight:700}.modeHint{color:var(--muted);font-size:11px}.modeChip.isActive .modeHint{color:var(--on-accent);opacity:.85}@media (max-width:640px){.modeBar{justify-content:center}}
.history{max-width:1200px;margin:26px auto 0;padding:0 20px 8px}.historyHeader{justify-content:space-between;align-items:center;gap:10px;display:flex}.historyHeader h2{letter-spacing:.16em;text-transform:uppercase;color:var(--muted);font-size:15px;font-weight:700}.historyHeader p{color:var(--muted);margin-top:4px;font-size:13px}.historyHeaderText{flex:1;min-width:0}.clearHistoryBtn{border:1px solid var(--border);background:var(--surface);color:var(--fg);letter-spacing:.16px;cursor:pointer;white-space:nowrap;box-shadow:var(--shadow-sm);border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:8px 12px;font-size:12px;font-weight:600;transition:transform 80ms,box-shadow .2s,border-color .2s,background .2s,color .2s;display:inline-flex}.clearHistoryBtn:hover{border-color:var(--border-strong);background:var(--surface-3);transform:translateY(-1px)}.clearHistoryBtn:active{transform:translateY(0)}.clearHistoryBtn:disabled{opacity:.65;cursor:default;box-shadow:none;transform:none}.clearHistoryIcon{color:var(--muted);place-items:center;display:grid}.historyList{flex-direction:column;gap:10px;margin-top:12px;display:flex}.historyItem{border-radius:var(--radius-lg);border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow);overflow:hidden}.historyItem[open]{border-color:var(--accent)}.historySummary{cursor:pointer;align-items:center;gap:10px;padding:10px 14px;list-style:none;display:flex}.historySummary::-webkit-details-marker{display:none}.historySummaryMain{flex:1;align-items:center;gap:8px;min-width:0;display:flex}.historyModeTag{letter-spacing:.08em;text-transform:uppercase;border:1px solid var(--accent);background:var(--accent-soft);color:var(--accent-text);border-radius:999px;padding:3px 8px;font-size:11px;font-weight:700}.historyAskText{color:var(--fg);white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.historyTimestamp{color:var(--muted);white-space:nowrap;font-size:11px}.historyBody{border-top:1px solid var(--border);grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:12px;padding:10px 14px 12px;display:grid}@media (max-width:800px){.historyBody{grid-template-columns:1fr}}.historyMeta{color:var(--muted);font-size:13px}.historyMeta p{margin:0 0 6px}.historyCode{margin-top:6px}.historyCode pre{background:var(--surface-2);border-radius:var(--radius-md);border:1px solid var(--border);font-family:var(--font-mono);max-height:180px;color:var(--fg);margin-top:4px;padding:8px 10px;font-size:12px;overflow:auto}.historyImages{flex-wrap:wrap;align-items:flex-start;gap:8px;display:flex}.historyImages img{object-fit:cover;border-radius:var(--radius-md);border:1px solid var(--border);background:var(--surface-2);width:110px;height:90px}.historyResponse h3{text-transform:uppercase;letter-spacing:.16em;color:var(--muted);margin:0 0 4px;font-size:13px}.historyResponseText{font-size:13.5px;line-height:1.6}.historyResponseText p{margin:.4em 0}.historyResponseText ul,.historyResponseText ol{margin:.4em 0 .4em 1.25em}.historyResponseText pre{background:var(--surface-2);border-radius:var(--radius-md);border:1px solid var(--border);margin:.5em 0;padding:8px 10px;overflow:auto}
.newPromptBtn{border-radius:var(--radius-md);border:1px solid var(--border);background:var(--surface-2);color:var(--fg);letter-spacing:.15px;cursor:pointer;box-shadow:var(--shadow-sm);order:5;grid-column:1/-1;justify-content:center;align-items:center;gap:6px;width:100%;margin-top:8px;padding:10px 14px;font-size:13px;font-weight:600;transition:transform 80ms,box-shadow .2s,border-color .2s,background .2s,color .2s;display:inline-flex}.newPromptBtn:hover{border-color:var(--border-strong);background:var(--surface-3);transform:translateY(-1px)}.newPromptBtn:active{transform:translateY(0)}.newPromptBtn:disabled{opacity:.65;cursor:default;box-shadow:none;transform:none}.newPromptIcon{color:var(--muted);place-items:center;display:grid}@media (max-width:640px){.newPromptBtn{grid-column:1/-1;justify-content:center;width:100%;margin-top:6px}}
.codeHighlightTitle{color:var(--fg);margin:0;font-weight:700}.codeHighlightNote{color:var(--muted);margin:4px 0 0;font-size:13px}.clearHighlightBtn{border:1px solid var(--border);background:var(--surface);color:var(--fg);border-radius:var(--radius-sm);cursor:pointer;padding:6px 10px;font-weight:600}.clearHighlightBtn:hover{border-color:var(--border-strong);background:var(--surface-3)}.codeHighlightBody{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);min-height:120px;font-family:var(--font-mono);flex:1;width:100%;margin-top:4px;font-size:13px;overflow:auto}.hlLine{border-bottom:1px solid var(--border);border-left:3px solid transparent;grid-template-columns:46px auto;gap:8px;min-width:max-content;padding:4px 10px;display:grid}.hlLine:last-child{border-bottom:none}.hlNo{color:var(--muted)}.hlText{white-space:pre;color:var(--fg);display:block}.hlLine.isHit{background:var(--accent-soft);border-left-color:var(--accent)}.hlLine.isHit .hlNo{color:var(--accent-text);font-weight:700}.hlLine.isContext{background:var(--surface-2);border-left-color:var(--border-strong)}
::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:0 0;border-radius:6px}::-webkit-scrollbar-thumb{background:var(--border-strong);border:2px solid var(--bg);border-radius:6px}*{scrollbar-width:thin;scrollbar-color:var(--border-strong)transparent}

