/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/Geist.woff2) format("woff2")}@font-face{font-family:Geist Mono;font-style:normal;font-weight:100 900;font-display:swap;src:url(/fonts/GeistMono.woff2) format("woff2")}:root{--font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;--font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Code", monospace;--r-sm: 4px;--r-md: 6px;--r-lg: 8px;--r-xl: 10px;--accent: #0e7c86;--accent-fg: #ffffff;--go: #1c8c57;--danger: #c2433a;--bg: #eef1f3;--panel: #ffffff;--panel-2: #f5f8f9;--border: #d7dee3;--border-strong: #c4ced4;--text: #10161b;--muted: #6a757d;--term-bg: #ffffff;--drop: #0e7c8618;--tile: #ffffff}[data-theme=dark]{--accent: #2bb3bd;--accent-fg: #04181a;--go: #43c98a;--danger: #e0726a;--bg: #0b0f13;--panel: #11181e;--panel-2: #0e141a;--border: #222b34;--border-strong: #2c3742;--text: #e7eef1;--muted: #8b97a0;--term-bg: #0e1217;--drop: #2bb3bd22;--tile: #f2f4f6}*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}*::-webkit-scrollbar{width:8px;height:8px}*::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:999px}*::-webkit-scrollbar-track{background:transparent}html,body,#root{height:100%;margin:0}button:focus-visible,a:focus-visible,label:focus-visible,[tabindex]:focus-visible{outline:2px solid color-mix(in srgb,var(--accent) 45%,transparent);outline-offset:1px}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation:none!important;transition:none!important}}body{font-family:var(--font-sans);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}.mono{font-family:var(--font-mono)}.app{display:flex;height:100%}.sidebar{width:282px;flex:none;background:var(--panel);border-right:1px solid var(--border);display:flex;flex-direction:column;overflow:hidden}.main{flex:1;min-width:0;padding:12px;overflow:hidden;display:flex;flex-direction:column}.stage{flex:1;min-height:0}.zoombar{display:flex;align-items:center;gap:4px;padding:4px 8px;margin-top:8px;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-lg);flex:none}.zoombar .spacer{flex:1}.cli-logo{flex:none;display:inline-flex;align-items:center;justify-content:center}.cli-logo img{width:100%;height:100%;object-fit:contain;display:block}.cli-logo svg{width:100%;height:100%;display:block}.cli-logo.files-glyph{color:color-mix(in srgb,var(--accent) 65%,var(--muted))}[data-theme=dark] .cli-logo.inv-dark img,[data-theme=light] .cli-logo.inv-light img{filter:invert(1)}.brand{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px 16px;border-bottom:1px solid var(--border)}.brand .logo{display:flex;align-items:center;gap:9px}.brand h1{font-size:15px;margin:0;letter-spacing:-.01em}.brand .dot{width:9px;height:9px;border-radius:50%;transition:background .25s,box-shadow .25s,opacity .25s}.brand .dot.agg-working{background:var(--accent);animation:breathe 2.4s ease-in-out infinite}.brand .dot.agg-waiting{background:transparent;border:1.5px solid var(--accent)}.brand .dot.agg-idle{background:var(--muted);opacity:.5}.icon-btn{background:transparent;border:1px solid var(--border);color:var(--muted);border-radius:var(--r-md);width:32px;height:30px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.icon-btn:hover{color:var(--text);border-color:var(--border-strong)}.icon-btn svg{width:15px;height:15px}.mini-btn svg{width:13px;height:13px}.btn-ghost svg,.btn-primary svg,.btn-danger svg{width:14px;height:14px}@keyframes breathe{50%{opacity:.55}}@keyframes rise-in{0%{opacity:0;transform:translateY(-3px)}}.controls{padding:12px;display:flex;flex-direction:column;gap:8px;border-bottom:1px solid var(--border)}.add-row{display:flex;gap:8px}.add-row .btn-ghost{flex:1}.btn-ghost,.btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:7px 12px;font-size:13px;font-weight:600;line-height:1.25;border:1px solid transparent;border-radius:var(--r-md);cursor:pointer}.btn-ghost{background:var(--panel-2);color:var(--text);border-color:var(--border)}.btn-ghost:hover{border-color:var(--border-strong)}.btn-ghost:disabled{opacity:.45;cursor:not-allowed}.btn-ghost:disabled:hover{border-color:var(--border)}.btn-ghost.on{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}.btn-primary{background:var(--accent);color:var(--accent-fg);border-color:var(--accent)}.btn-primary:disabled{opacity:.5;cursor:not-allowed}.btn-ghost,.btn-primary,.icon-btn,.agent-pick,.mini-btn,.fp-current,.settings-navitem,.skill-item,.row{transition:border-color .12s ease-out,background .12s ease-out,color .12s ease-out}.widget{display:flex;flex-direction:column;gap:8px;background:var(--panel-2);border:1px solid var(--border);border-radius:var(--r-lg);padding:10px;animation:rise-in .14s ease-out}.widget input,.widget select{width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:var(--r-md);background:var(--panel);color:var(--text);font-size:13px;font-family:inherit}.widget input:focus,.widget select:focus{outline:2px solid color-mix(in srgb,var(--accent) 45%,transparent);border-color:var(--accent)}.widget select{-moz-appearance:none;appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:28px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2.5 4.5l3.5 3.5 3.5-3.5' fill='none' stroke='%238a93a0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");background-repeat:no-repeat;background-position:right 10px center}.widget-actions{display:flex;gap:8px}.widget-actions .btn-primary{flex:1}.agent-picks{display:flex;flex-direction:column;gap:4px}.agent-pick{display:flex;align-items:center;gap:8px;padding:6px 8px;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-md);color:var(--text);font:inherit;font-size:13px;cursor:pointer;text-align:left}.agent-pick:hover{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--panel))}.agent-pick.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,var(--panel));font-weight:600}.secret-list{display:flex;flex-direction:column;gap:6px;margin-top:8px}.secret-row{display:flex;align-items:center;gap:8px}.secret-chip{padding:4px 8px;font-size:12px;background:var(--panel-2);border:1px solid var(--border);border-radius:var(--r-sm);white-space:nowrap;flex:none;min-width:140px}.secret-desc{flex:1;padding:6px 10px;border:1px solid var(--border);border-radius:var(--r-md);background:var(--panel);color:var(--text);font:inherit;font-size:13px}.secret-desc:focus{outline:2px solid color-mix(in srgb,var(--accent) 45%,transparent);border-color:var(--accent)}.widget-sep{height:1px;background:var(--border);margin:1px 0;flex:none}.w-field{display:flex;flex-direction:column;gap:4px}.w-label{font-size:10px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);padding-left:1px}.agent-pick,.widget input,.fp-current{min-height:32px;font-size:13px}.fp{display:flex;flex-direction:column;gap:4px}.fp-current{display:flex;align-items:center;gap:7px;width:100%;padding:7px 10px;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-md);color:var(--text);font:inherit;font-size:12.5px;cursor:pointer;text-align:left}.fp-current:hover{border-color:var(--border-strong)}.fp-ico{flex:none;width:14px;height:14px;color:var(--muted)}.fp-row .fp-ico{width:13px;height:13px;margin-right:4px}.fp-path{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.fp-toggle{flex:none;color:var(--muted);font-size:10px}.fp-tree{max-height:180px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--r-md);background:var(--panel);padding:3px 0;display:flex;flex-direction:column;animation:rise-in .14s ease-out}.fp-row{display:flex;align-items:center;gap:2px;padding:2px 8px;font-size:12.5px;color:var(--text);background:transparent;border:none;cursor:pointer;text-align:left;width:100%;font-family:inherit}.fp-row.picked{background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent)}.fp-row:hover:not(.picked){background:var(--panel-2)}.fp-caret{flex:none;width:18px;background:transparent;border:none;color:var(--muted);font-size:9px;cursor:pointer;padding:2px 0}.fp-name{flex:1;background:transparent;border:none;color:inherit;font:inherit;cursor:pointer;text-align:left;padding:3px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fp-root{padding:4px 10px;color:var(--muted);font-style:italic}.fp-root.picked{color:var(--accent)}.fp-new{color:var(--muted);font-size:12px;padding-top:3px;padding-bottom:3px}.fp-new:hover{color:var(--accent)}.fp-msg{color:var(--muted);cursor:default}.fp-input{flex:1;padding:3px 8px!important;font-size:12px!important}.cart{display:flex;flex-direction:column;gap:4px}.cart-row{display:flex;align-items:center;gap:8px;padding:3px 4px;border-radius:var(--r-md);font-size:13px}.cart-row.has{background:color-mix(in srgb,var(--accent) 8%,transparent)}.cart-name{color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stepper{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:var(--r-md);overflow:hidden;flex:none;background:var(--panel)}.stepper button{width:24px;height:24px;border:none;background:transparent;color:var(--muted);font-size:15px;line-height:1;cursor:pointer}.stepper button:hover:not(:disabled){color:var(--text);background:var(--panel-2)}.stepper button:disabled{opacity:.35;cursor:not-allowed}.stepper-n{min-width:20px;text-align:center;font-size:12px;font-variant-numeric:tabular-nums}.ov-fixed{padding:6px 8px 0}.ov-row{cursor:pointer}.ov-row-ico{width:13px;height:13px;color:var(--accent);flex:none}.ov-wrap{height:100%;overflow-y:auto}.ov-feed{max-width:680px;margin:0 auto;display:flex;flex-direction:column;gap:18px;padding:2px 2px 40px}.ov-seg button{padding:3px 11px}.ov-panel{background:var(--panel);border:1px solid var(--border);border-radius:var(--r-xl)}.ov-sec{display:flex;flex-direction:column}.ov-sechead{display:flex;align-items:center;gap:7px;width:100%;background:var(--panel-2);border:1px solid var(--border);border-radius:var(--r-xl) var(--r-xl) 0 0;padding:8px 14px;font:inherit;color:var(--text);cursor:pointer;text-align:left;transition:border-radius var(--dur, .36s) ease}.ov-sec.closed .ov-sechead{border-radius:var(--r-xl)}.ov-caret{width:10px;height:10px;flex:none;color:var(--muted);transition:transform var(--dur, .36s) ease;transform-origin:50% 50%;display:block}.ov-sec.closed .ov-caret{transform:rotate(-90deg)}.ov-sectitle{font-size:13px;font-weight:600}.ov-secn{font-size:11px;color:var(--muted)}.ov-peek{margin-left:auto;display:inline-flex;gap:5px;align-items:center}.ov-drawer{display:grid;grid-template-rows:1fr;transition:grid-template-rows var(--dur, .36s) ease}.ov-drawer-in{overflow:hidden;min-height:0;display:flex;flex-direction:column;justify-content:flex-end}.ov-sec.closed .ov-drawer{grid-template-rows:0fr}.ov-secbody{display:flex;flex-direction:column;gap:6px;padding:6px 0}.ov-secbody .ov-panel{border-radius:0}.ov-foot{height:9px;background:var(--panel-2);border:1px solid var(--border);border-radius:0 0 var(--r-xl) var(--r-xl);transition:height var(--dur, .36s) ease,border-top-width var(--dur, .36s) ease,border-bottom-width var(--dur, .36s) ease,opacity calc(var(--dur, .36s) * .8) ease}.ov-sec.closed .ov-foot{height:0;border-top-width:0;border-bottom-width:0;opacity:0}.ov-card{padding:11px 14px 10px;display:flex;flex-direction:column;gap:8px;min-width:0}.ov-id{display:flex;align-items:center;gap:8px;cursor:pointer;min-width:0}.ov-id .spacer{flex:1}.ov-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ov-ago{font-size:11px;color:var(--muted);flex:none}.ov-go{color:var(--muted);font-size:12px;opacity:0;transition:opacity .12s ease-out;flex:none}.ov-card:hover .ov-go,.ov-id:focus-visible .ov-go{opacity:1}.ov-prompt{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-bottom:8px;border-bottom:1px solid var(--border)}.ov-prompt+.ov-ghost,.ov-prompt+.ov-live{border-top:none}.ov-prompt:before{content:"❯ ";color:var(--accent);font-weight:700}.ov-prompt-none{font-style:italic}.ov-prompt-none:before{color:var(--border-strong)}.ov-meta{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:-2px}.ov-answer-wrap{min-width:0}.ov-answer{font-size:13px;line-height:1.55;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.ov-more{background:none;border:none;padding:3px 0 0;font:inherit;font-size:11px;color:var(--muted);cursor:pointer;display:block}.ov-more:hover{color:var(--accent)}.markdown.ov-md{max-height:440px;overflow-y:auto;border:none;background:none;padding:0;font-size:12.5px}.ov-md pre{font-size:11px}.ov-busy{font-size:12.5px;color:var(--muted)}.ov-busy:before{content:"⠋";display:inline-block;width:1.2em;color:var(--accent);animation:ov-spin .9s steps(1) infinite}@keyframes ov-spin{0%{content:"⠋"}12.5%{content:"⠙"}25%{content:"⠹"}37.5%{content:"⠸"}50%{content:"⠼"}62.5%{content:"⠴"}75%{content:"⠦"}87.5%{content:"⠧"}}.ov-ghost{border:none;background:none;padding:7px 0 2px;font:inherit;font-size:12.5px;color:var(--muted);text-align:left;cursor:text;border-top:1px solid var(--border);width:100%}.ov-ghost:before{content:"❯ ";font-family:var(--font-mono);color:var(--border-strong);font-weight:700}.ov-ghost:hover{color:var(--text)}.ov-ghost.attn{color:color-mix(in srgb,var(--accent) 45%,var(--muted))}.ov-ghost.attn:before{color:var(--accent)}.ov-ghost.attn:hover{color:var(--text)}.ov-live{display:flex;gap:8px;align-items:center;border-top:1px solid var(--border);padding-top:7px}.ov-live .ov-p{color:var(--accent);font-weight:700}.ov-live input{flex:1;min-width:0;border:none;background:none;font:inherit;font-size:13px;color:var(--text);outline:none;padding:2px 0}.ov-hint{font-size:10.5px;color:var(--muted);flex:none}.ov-note{font-size:11px;color:var(--danger)}.tree{flex:1;overflow-y:auto;padding:6px 8px 10px}.empty-hint{color:var(--muted);font-size:12px;padding:12px 10px;line-height:1.5}.empty-hint.nested{padding:6px 10px 8px 38px;font-size:11.5px}.gap{height:8px}.gap.over{position:relative}.gap.over:after{content:"";position:absolute;left:8px;right:8px;top:3px;height:2px;border-radius:2px;background:var(--accent)}.row{position:relative;display:flex;align-items:center;gap:8px;padding:4px 8px;border-radius:var(--r-md);cursor:pointer;border:1px solid transparent}.row.session{cursor:grab}.row.nested{margin-left:16px}.row:hover{background:var(--panel-2)}.row.active{background:color-mix(in srgb,var(--accent) 10%,transparent);border-color:color-mix(in srgb,var(--accent) 30%,transparent)}.row.dragging{opacity:.4}.row.drop-before:after,.row.drop-after:after{content:"";position:absolute;left:6px;right:6px;height:2px;background:var(--accent);border-radius:2px}.row.drop-before:after{top:-1px}.row.drop-after:after{bottom:-1px}.row.drop-on{background:var(--drop);outline:1px solid var(--accent);outline-offset:-1px}.row .name{flex:1;font-family:var(--font-mono);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row .rename{flex:1;font:inherit;font-family:var(--font-mono);font-size:12.5px;padding:1px 6px;border:1px solid var(--accent);border-radius:var(--r-sm);background:var(--panel-2);color:var(--text);min-width:0}.row.group-head .name{font-family:var(--font-sans);font-size:13px;font-weight:600}.row .count{font-family:var(--font-mono);font-size:11px;color:var(--muted)}.caret{background:transparent;border:none;color:var(--muted);cursor:pointer;font-size:13px;line-height:1;width:16px;padding:0;flex:none}.row .row-actions{position:absolute;right:4px;top:50%;transform:translateY(-50%);display:flex;gap:2px;opacity:0;pointer-events:none;transition:opacity .12s ease-out}.row:hover .row-actions,.row:focus-within .row-actions{opacity:1;pointer-events:auto}.row .cli-logo,.row .count{transition:opacity .12s ease-out}.row:hover .cli-logo,.row:hover .count{opacity:0}.mini-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;border:none;background:transparent;color:var(--muted);cursor:pointer;font-size:12px;padding:3px 6px;border-radius:var(--r-sm)}.mini-btn:hover{color:var(--text);background:var(--border)}.group{margin:3px 0}.group.active .group-head{background:color-mix(in srgb,var(--accent) 10%,transparent);border-color:color-mix(in srgb,var(--accent) 30%,transparent)}.group.drop-into{background:var(--drop);outline:1px dashed var(--accent);border-radius:var(--r-md)}.row.nested{margin-left:21px}.row.nested:before{content:"";position:absolute;left:-5px;top:0;bottom:0;border-left:1px solid var(--border)}.group.active .row.nested:before{border-color:color-mix(in srgb,var(--accent) 45%,var(--border))}.status{width:8px;height:8px;border-radius:50%;flex:none;display:inline-block;transition:background .2s,box-shadow .2s,opacity .2s}.status.working{background:var(--accent);animation:breathe 2.2s ease-in-out infinite}.status.waiting{background:transparent;border:1.5px solid var(--accent)}.status.idle{background:var(--muted);opacity:.5}.status.stopped{background:transparent;border:1.5px solid var(--muted);opacity:.5}.quick-add{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--border)}.quick-add .btn-ghost{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:6px 8px;font-size:12.5px}.legend{display:flex;flex-wrap:wrap;gap:6px 12px;padding:10px 16px;border-top:1px solid var(--border);font-size:10.5px;color:var(--muted)}.legend span{display:inline-flex;align-items:center;gap:5px}.tiles{height:100%;display:grid;gap:12px}.tiles.drop-over{outline:2px dashed var(--accent);outline-offset:-6px;border-radius:var(--r-xl)}.tile{display:flex;min-width:0;min-height:0;border-radius:var(--r-xl)}.tile>.slot{flex:1;min-width:0;min-height:0}.tile-empty{border:1px dashed transparent;transition:border-color .12s ease-out}.tiles.pane-dragging .tile-empty,.tiles.session-dragging .tile-empty{border-color:var(--border-strong)}.tile.tile-over{outline:2px dashed var(--accent);outline-offset:-2px}.tile-ghost{grid-column:1 / -1;min-height:54px;border:1px dashed var(--border-strong);display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:12.5px;animation:rise-in .14s ease-out}.pane-head.draggable{cursor:grab}.pane-head.draggable:active{cursor:grabbing}.slot{position:relative;min-width:0;min-height:0;border-radius:var(--r-xl);overflow:hidden;border:1px solid var(--border);background:var(--term-bg);display:flex;flex-direction:column}.locked-app .mock-side{pointer-events:none;-webkit-user-select:none;user-select:none;opacity:.75}.locked-main{overflow-y:auto}.install{max-width:620px;margin:0 auto;padding:26px 6px 60px;display:flex;flex-direction:column;gap:18px}.install-head{display:flex;gap:14px;align-items:flex-start}.install-lock{flex:none;width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--accent) 10%,transparent);border:1px solid color-mix(in srgb,var(--accent) 35%,var(--border));border-radius:var(--r-lg);margin-top:2px}.install-lock svg{width:20px;height:20px;color:var(--accent)}.install h1{margin:0 0 6px;font-size:19px;letter-spacing:-.01em;text-wrap:balance}.locked-lead{color:var(--text);font-size:13.5px;line-height:1.55;margin:0}.locked-sub{color:var(--muted);font-size:13px;line-height:1.55;margin:0}.locked-sub b{color:var(--text)}.step{background:var(--panel);border:1px solid var(--border);border-radius:var(--r-xl);padding:16px 18px;display:flex;flex-direction:column;gap:10px}.step-head{display:flex;align-items:center;gap:10px}.step-head h3{margin:0;font-size:14px}.step-n{flex:none;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;border:1px solid color-mix(in srgb,var(--accent) 40%,var(--border));color:var(--accent);border-radius:50%;font-size:11.5px;font-weight:600}.step img{width:100%;max-width:480px;border:1px solid var(--border);border-radius:var(--r-lg);display:block}.install-done{margin:2px 0 0;font-size:13px;line-height:1.5;color:var(--go);font-weight:500}.install-code summary{cursor:pointer;list-style:none}.install-code summary::-webkit-details-marker{display:none}.install-code summary .step-n{border-radius:var(--r-sm);font-size:9px;letter-spacing:.02em}.install-code .install-code-caret{margin-left:auto;width:12px;height:12px;color:var(--muted);transition:transform .15s ease-out;transform:rotate(-90deg);transform-origin:50% 50%;flex:none}.install-code[open] .install-code-caret{transform:rotate(0)}.install-code summary:hover .install-code-caret{color:var(--text)}.install-code[open] summary{margin-bottom:4px}.install-relock{border-bottom:1px solid var(--border);padding-bottom:16px}.locked-cmd{position:relative;margin-top:8px}.locked-cmd pre{margin:0;overflow-x:hidden;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--panel-2);border:1px solid var(--border);border-radius:var(--r-md);padding:42px 14px 14px;font-size:12px;line-height:1.5}.locked-copy{position:absolute;top:10px;right:10px;width:30px;height:30px;border:1px solid var(--border);border-radius:var(--r-md);background:var(--panel);color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}.locked-copy:hover{color:var(--text);border-color:var(--border-strong)}.locked-copy svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}.term-boot{position:absolute;right:0;bottom:0;left:0;top:34px;display:flex;align-items:center;justify-content:center;background:var(--term-bg);color:var(--muted);font-size:12.5px;z-index:4;pointer-events:none}.term-boot .et-cursor{height:13px;width:7px;margin-left:7px}.term-overlay{position:absolute;left:0;right:0;bottom:0;display:flex;justify-content:center;padding:12px;z-index:5;pointer-events:none}.term-overlay-card{pointer-events:auto;display:flex;align-items:center;gap:12px;padding:9px 9px 9px 14px;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:0 8px 28px #00000047}.term-overlay-card .to-text{display:flex;flex-direction:column;gap:1px}.term-overlay-card .to-title{font-size:13px;font-weight:600}.term-overlay-card .to-help{font-size:11px;color:var(--muted)}.term-overlay-card .btn-ghost{flex:none}.pane-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px;padding:7px 11px;background:var(--panel);border-bottom:1px solid var(--border);font-size:12px;flex:none}.pane-head .ph-left{display:inline-flex;align-items:center;gap:7px}.pane-head .ph-title{text-align:center;font-family:var(--font-mono);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:text}.pane-head .ph-title-input{width:100%;text-align:center;font:inherit;font-family:var(--font-mono);font-weight:600;padding:1px 6px;border:1px solid var(--accent);border-radius:var(--r-sm);background:var(--panel-2);color:var(--text);min-width:0}.pane-head .ph-close{justify-self:end}.slot{transition:border-color .15s ease-out,box-shadow .15s ease-out}.slot.focused{border-color:color-mix(in srgb,var(--accent) 45%,var(--border));box-shadow:0 4px 18px -10px #00000059}.slot.focused .pane-head{background:color-mix(in srgb,var(--accent) 8%,var(--panel))}.term-host{flex:1;min-height:0;padding:10px 8px 8px 12px;background:var(--term-bg)}.term-host .xterm{height:100%}.xterm .xterm-viewport{scrollbar-width:none}.xterm .xterm-viewport::-webkit-scrollbar{width:0;height:0;display:none}.empty-group{height:100%;display:flex;align-items:center;justify-content:center}.empty-group.drop-over{outline:2px dashed var(--accent);outline-offset:-10px;border-radius:var(--r-xl)}.empty-card{width:min(420px,90%);background:var(--panel);border:1px solid var(--border);border-radius:var(--r-xl);padding:26px;text-align:center;display:flex;flex-direction:column;gap:14px}.empty-card .widget{text-align:left}.empty-card .empty-term{align-items:center}.dropline{margin-top:2px;padding:14px;border:1px dashed var(--border-strong);border-radius:var(--r-lg);color:var(--muted);font-size:12.5px}.empty-term{display:flex;flex-direction:column;gap:8px;align-items:flex-start}.et-prompt{font-size:15px;letter-spacing:.01em}.et-user{color:var(--accent);font-weight:600}.et-path{color:var(--go);font-weight:600}.et-dim{color:var(--muted)}.et-cursor{display:inline-block;width:8px;height:15px;margin-left:8px;vertical-align:-2px;background:var(--accent);animation:blink 1.15s steps(1) infinite}@keyframes blink{50%{opacity:0}}.et-hint{margin:0;color:var(--muted);font-size:12.5px;line-height:1.5}.brand-actions{display:flex;gap:6px}.pane-head.files-head{display:flex;align-items:center;gap:7px}.files-head .spacer{flex:1}.crumbs{display:flex;align-items:center;gap:1px;overflow:hidden;white-space:nowrap}.crumb{background:none;border:none;color:var(--accent);cursor:pointer;font:inherit;font-size:12px;padding:1px 4px;border-radius:var(--r-sm)}.crumb:hover{background:var(--panel-2)}.crumbs .sep{color:var(--muted)}.upload-btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;cursor:pointer}.files-body{flex:1;min-height:0;overflow-y:auto;padding:6px;background:var(--term-bg)}.files-body.drag{outline:2px dashed var(--accent);outline-offset:-6px}.file-row{display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:var(--r-md);cursor:pointer;text-decoration:none;color:var(--text);font-size:13px}.file-row:hover{background:var(--panel-2)}.file-row .fi{width:14px;color:var(--muted);text-align:center;flex:none}.file-row .fi.dir{color:var(--accent)}.file-row .fname{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-row .fsize{color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}.files-empty{color:var(--muted);font-size:13px;padding:22px;text-align:center}.files-body.tree{padding:6px 8px;font-size:13px}.tree-row{position:relative;display:flex;align-items:center;gap:.4em;padding:.15em .5em .15em 0;border-radius:var(--r-sm);cursor:pointer;text-decoration:none;color:var(--text);white-space:nowrap;-webkit-user-select:none;user-select:none;font-size:1em}.tree-row:hover{background:var(--panel-2)}.rails{position:absolute;left:0;top:0;bottom:0;display:flex;pointer-events:none}.rail{position:relative;width:1.1em;flex:none}.rail.v:before,.rail.elbow:before{content:"";position:absolute;left:50%;top:0;bottom:0;border-left:1px solid var(--border)}.rail.elbow.last:before{bottom:50%}.rail.elbow:after{content:"";position:absolute;left:50%;top:50%;width:50%;border-top:1px solid var(--border)}.tw-ico{flex:none;width:1.1em;height:1.1em;color:color-mix(in srgb,var(--accent) 65%,var(--muted))}.tw-name{flex:1;overflow:hidden;text-overflow:ellipsis}.tw-size{color:var(--muted);font-size:.8em;flex:none;padding-left:.6em;font-variant-numeric:tabular-nums}.tree-msg{color:var(--muted);font-size:.85em;padding:.15em 0}.files-hint{flex:none;padding:5px 10px;border-top:1px solid var(--border);background:var(--panel);color:var(--muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-nav{padding:10px;display:flex;flex-direction:column;gap:4px}.settings-navitem{text-align:left;background:none;border:1px solid transparent;border-radius:var(--r-md);padding:9px 12px;font:inherit;font-size:13px;color:var(--text);cursor:pointer}.settings-navitem:hover{background:var(--panel-2)}.settings-navitem.active{background:color-mix(in srgb,var(--accent) 12%,transparent);border-color:color-mix(in srgb,var(--accent) 30%,transparent);color:var(--accent);font-weight:600}.settings-main{overflow-y:auto}.settings-page{max-width:640px;margin:0 auto;padding:6px 4px 30px}.settings-page h2{margin:6px 0 18px;font-size:22px}.settings-page h3{margin:24px 0 8px;font-size:14px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-xl)}.s-label{font-weight:600;font-size:14px}.s-help{color:var(--muted);font-size:12.5px;line-height:1.5;margin:2px 0 0}.s-muted{color:var(--muted)}.agent-rows{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-lg);margin-top:8px;overflow:hidden}.agent-row{display:flex;align-items:center;gap:10px;padding:9px 14px;font-size:13px}.agent-row+.agent-row{border-top:1px solid var(--border)}.agent-row .spacer{flex:1}.ar-name{white-space:nowrap;font-weight:500}.ar-ver{font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums}.ar-state{flex:none;width:88px;text-align:right;font-size:11.5px;color:var(--muted);white-space:nowrap}.ar-state.ok{color:var(--go)}.kv{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-xl);overflow:hidden;margin-top:8px}.kv>div{display:flex;justify-content:space-between;gap:16px;padding:11px 16px;border-bottom:1px solid var(--border);font-size:13px}.kv>div:last-child{border-bottom:none}.kv span{color:var(--muted)}.kv b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65%}.placeholder{background:var(--panel);border:1px solid var(--border);border-radius:var(--r-xl);padding:20px}.placeholder p{margin:0 0 8px}.lp{position:relative;display:inline-flex}.zbtn.lp-btn{width:auto;height:22px;padding:0 8px;gap:6px}.lp-ico{width:13px;height:13px;display:block;flex:none}.lp-lbl{font-size:11px;white-space:nowrap}.lp-pop{position:absolute;bottom:calc(100% + 8px);left:0;z-index:30;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-lg);padding:8px;display:flex;flex-direction:column;gap:8px;box-shadow:0 10px 30px #00000040;animation:rise-in .14s ease-out}.lp-auto{background:var(--panel-2);border:1px solid var(--border);border-radius:var(--r-md);padding:6px 10px;font:inherit;font-size:12px;color:var(--text);cursor:pointer;white-space:nowrap}.lp-auto:hover{border-color:var(--border-strong)}.lp-auto.on{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}.lp-grid{display:grid;grid-template-columns:repeat(3,36px);gap:5px}.lp-opt{height:32px;display:inline-flex;align-items:center;justify-content:center;background:var(--panel-2);border:1px solid var(--border);border-radius:var(--r-md);color:var(--muted);cursor:pointer}.lp-opt:hover{border-color:var(--accent);color:var(--text)}.lp-opt.on{border-color:var(--accent);color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}.lp-opt .lp-ico{width:16px;height:16px}.pager{display:inline-flex;align-items:center;gap:4px;margin-left:6px}.plbl{font-size:11px;color:var(--muted);min-width:28px;text-align:center;font-variant-numeric:tabular-nums}.pane-foot{display:flex;align-items:center;gap:4px;padding:3px 8px;background:var(--panel);border-top:1px solid var(--border);flex:none}.pane-foot .spacer{flex:1}.zbtn{width:22px;height:20px;border:1px solid var(--border);background:var(--panel-2);color:var(--muted);border-radius:var(--r-sm);cursor:pointer;font-size:13px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.zbtn:hover{color:var(--text);border-color:var(--border-strong)}.zlvl{min-width:44px;background:none;border:none;color:var(--muted);font-size:11px;cursor:pointer;font-variant-numeric:tabular-nums}.zlvl:hover{color:var(--text)}.settings-page.wide{max-width:980px}.skills{display:flex;gap:14px;margin-top:12px;height:min(70vh,560px)}.skills-list{width:220px;flex:none;display:flex;flex-direction:column;gap:4px;overflow-y:auto;border-right:1px solid var(--border);padding-right:10px}.skills-actions{display:flex;gap:6px;margin-bottom:6px}.skills-actions .btn-ghost{flex:1;text-align:center}.skill-item{text-align:left;background:none;border:1px solid transparent;border-radius:var(--r-md);padding:7px 10px;font:inherit;font-family:var(--font-mono);font-size:12.5px;color:var(--text);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.skill-item:hover{background:var(--panel-2)}.skill-item.active{background:color-mix(in srgb,var(--accent) 12%,transparent);border-color:color-mix(in srgb,var(--accent) 30%,transparent);color:var(--accent)}.skills-editor{flex:1;min-width:0;display:flex;flex-direction:column}.skills-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:10px}.skills-toolbar .spacer{flex:1}.btn-ghost.danger{color:var(--danger)}.btn-ghost.danger:hover{border-color:var(--danger)}.btn-danger{background:var(--danger);color:#fff;border:1px solid var(--danger);border-radius:var(--r-md);padding:8px 12px;font-size:13px;font-weight:600;cursor:pointer}.confirm-del{display:inline-flex;align-items:center;gap:8px}.confirm-del .s-muted{font-size:12px}.skill-title{font-size:13px;font-weight:600}.seg{display:inline-flex;border:1px solid var(--border);border-radius:var(--r-md);overflow:hidden}.seg button{background:var(--panel);border:none;padding:5px 12px;font:inherit;font-size:12px;color:var(--muted);cursor:pointer}.seg button.on{background:var(--accent);color:var(--accent-fg)}.skill-text{flex:1;width:100%;resize:none;border:1px solid var(--border);border-radius:var(--r-lg);background:var(--term-bg);color:var(--text);font-family:var(--font-mono);font-size:13px;padding:12px;line-height:1.5}.skill-text:focus{outline:2px solid color-mix(in srgb,var(--accent) 40%,transparent);border-color:var(--accent)}.skill-view{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}.skill-meta{flex:none;display:flex;flex-direction:column;gap:3px;border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--r-lg);padding:10px 14px;background:var(--panel-2)}.skill-meta-name{font-size:12px;color:var(--muted)}.skill-meta-desc{font-size:14px;color:var(--text);line-height:1.45}.markdown{flex:1;overflow-y:auto;border:1px solid var(--border);border-radius:var(--r-lg);padding:16px 20px;background:var(--panel);line-height:1.6;font-size:14px}.markdown>:first-child{margin-top:0}.markdown h1,.markdown h2,.markdown h3,.markdown h4{margin:18px 0 8px;line-height:1.25}.markdown h1{font-size:22px}.markdown h2{font-size:18px}.markdown h3{font-size:15px}.markdown p{margin:0 0 12px}.markdown ul,.markdown ol{margin:0 0 12px;padding-left:22px}.markdown li{margin:3px 0}.markdown code{font-family:var(--font-mono);font-size:.88em;background:color-mix(in srgb,var(--muted) 18%,transparent);padding:1px 5px;border-radius:var(--r-sm)}.markdown pre{background:var(--term-bg);border:1px solid var(--border);border-radius:var(--r-md);padding:12px;overflow-x:auto}.markdown pre code{background:none;padding:0}.markdown blockquote{margin:0 0 12px;padding:2px 14px;border-left:3px solid var(--border-strong);color:var(--muted)}.markdown a{color:var(--accent)}.markdown table{border-collapse:collapse;margin:0 0 12px;display:block;overflow-x:auto}.markdown th,.markdown td{border:1px solid var(--border);padding:6px 10px}.markdown img{max-width:100%}.markdown hr{border:none;border-top:1px solid var(--border);margin:16px 0}.usage{display:flex;flex-direction:column;gap:12px;margin-top:12px}.usage-msg{color:var(--muted);font-size:12.5px;padding:14px 2px}.usage-msg .et-cursor{height:12px;width:6px;margin-left:6px}.usage h3{margin:14px 0 0;font-size:14px}.traces-table{width:100%;border-collapse:collapse;font-size:12px}.traces-table th{text-align:right;font-weight:500;color:var(--muted);font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;padding:6px 10px;border-bottom:1px solid var(--border)}.traces-table th:first-child{text-align:left}.traces-table td{text-align:right;padding:7px 10px;border-bottom:1px solid var(--border);font-family:var(--font-mono);font-variant-numeric:tabular-nums;white-space:nowrap}.traces-table tbody tr:hover{background:var(--panel-2)}.traces-table .tr-agent{text-align:left;display:flex;align-items:center;gap:7px;overflow:hidden}.traces-table .tr-agent span{overflow:hidden;text-overflow:ellipsis}.traces-table .tr-when{color:var(--muted);font-size:11px}.traces-table .tr-total td{font-weight:600;border-top:1px solid var(--border-strong);border-bottom:none}.usage-top{display:flex;align-items:center;gap:8px}.usage-top .spacer{flex:1}.usage-top .s-muted{font-size:12px}.usage-top .btn-ghost{padding:5px 10px;font-size:12px}.usage-card{background:var(--panel);border:1px solid var(--border);border-radius:var(--r-xl);padding:14px 16px}.usage-head{display:flex;align-items:center;gap:9px;font-size:14px}.usage-head .spacer{flex:1}.usage-head .s-muted{font-size:12px;font-variant-numeric:tabular-nums}.usage-stats{display:flex;gap:28px;margin:12px 0 4px}.usage-stats>div{display:flex;flex-direction:column;gap:2px}.usage-stats .s-muted{font-size:11px;text-transform:uppercase;letter-spacing:.04em}.usage-stats b{font-size:14px;font-variant-numeric:tabular-nums}.usage-quota{display:flex;flex-direction:column;gap:7px;margin-top:10px}.qrow{display:flex;align-items:center;gap:10px;font-size:12px}.qlabel{width:56px;color:var(--muted);flex:none}.qbar{flex:1;height:7px;background:var(--panel-2);border:1px solid var(--border);border-radius:999px;overflow:hidden}.qfill{height:100%;background:var(--accent);border-radius:999px}.qpct{width:130px;text-align:right;flex:none;font-variant-numeric:tabular-nums}@media (min-width: 769px) and (max-width: 900px){.sidebar{width:230px}}.mbar{display:flex;align-items:center;gap:8px;padding:0 0 8px;flex:none}.mback{flex:none;font-size:19px;padding-bottom:3px}.mtitle{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mchips{display:flex;gap:6px;overflow-x:auto;flex:1;padding:2px}.mchip{display:inline-flex;align-items:center;gap:7px;padding:6px 10px;background:var(--panel);border:1px solid var(--border);border-radius:var(--r-md);cursor:pointer;flex:none}.mchip.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 10%,transparent)}@media (max-width: 768px){.app{height:100dvh}.app.m-home .main{display:none}.app.m-home .sidebar{width:100%;border-right:none}.app.m-stage .sidebar{display:none}.app.m-stage .main{padding:8px}.row{padding:6px 10px}.tree{padding-top:2px}.group{margin:2px 0}.row .row-actions{opacity:1;pointer-events:auto;position:static;transform:none;margin-left:4px}.row .cli-logo,.row .count{opacity:1!important}.caret{width:22px;font-size:15px}.widget input,.widget select,.row .rename,.secret-desc,.fp-input,.pane-head .ph-title-input,.ov-live input{font-size:16px}.ov-headrow{flex-wrap:wrap}.locked-app .mock-side{display:none}.app.settings{flex-direction:column}.app.settings .sidebar{width:100%;border-right:none;border-bottom:1px solid var(--border)}.app.settings .settings-nav{flex-direction:row;gap:6px;padding:8px 10px}.app.settings .settings-main{flex:1}.settings-page{padding:6px 12px 30px}}
