/**
 * 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}:root{font:15px system-ui,-apple-system,sans-serif;color:#e6eef4;background:#0b1118;color-scheme:dark}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,select,input,textarea{color:inherit;background:#18232d;border:1px solid #344553;border-radius:8px}button{cursor:pointer;padding:8px 11px}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #7cdaa9}.primary{display:inline-block;background:#7bd8a4;color:#102119;border:0;border-radius:8px;padding:9px 15px;text-decoration:none;font-weight:650}.center{min-height:100dvh;display:grid;place-content:center;justify-items:center}.app{height:var(--app-height,100dvh);display:grid;grid-template-columns:300px 1fr;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}.sidebar{min-height:0;display:flex;flex-direction:column;border-right:1px solid #293845;background:#101922;padding:14px;gap:14px}.sidebar header,.view-head,.list-title,footer,section header{display:flex;align-items:center;justify-content:space-between;gap:10px}.sidebar label,.overlay label{display:grid;gap:6px;color:#a9bbc8}.sidebar select,.overlay input{width:100%;padding:9px}.list-title{color:#a9bbc8}.sessions{overflow:auto;flex:1}.session{display:grid;gap:5px;text-align:left;width:100%;margin-bottom:6px;background:transparent;border-color:transparent}.session.active{background:#243b3b;border-color:#4a7971}.session-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session small,.title small{color:#9cb1c0}.empty{color:#9cb1c0;line-height:1.6;padding:8px}.sidebar footer{font-size:12px;color:#9cb1c0}.view{min-width:0;min-height:0;display:flex;flex-direction:column}.view-head{padding:10px 14px;border-bottom:1px solid #293845}.title{display:grid;gap:3px;min-width:0;flex:1}.title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.modes{display:flex}.modes button[aria-pressed=true]{background:#3c685b;font-weight:650;text-decoration:underline;text-underline-offset:3px}.screen{flex:1;min-height:0;overflow:auto;padding:8px}.screen .xterm{height:100%}.notice{padding:7px 14px;color:#f1cb88;background:#322c20}.composer{border-top:1px solid #293845;padding:8px 12px max(8px,env(safe-area-inset-bottom))}.keys{display:flex;overflow-x:auto;gap:6px;margin-bottom:6px}.keys button{padding:6px 10px;flex:none}.input{display:flex;gap:8px;align-items:end}.input textarea{resize:none;flex:1;min-height:44px;max-height:130px;padding:10px}.empty-stage{margin:auto;text-align:center;color:#afc0cb}.overlay{position:fixed;top:0;right:0;left:0;bottom:auto;height:var(--app-height,100dvh);background:#000a;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.overlay section{width:min(440px,100%);background:#17232d;border:1px solid #40505c;border-radius:14px;padding:20px}.overlay section header h2{margin:0}.overlay p{line-height:1.5}.confirm div{display:flex;justify-content:flex-end;gap:8px}.back{display:none}@media(max-width:700px){.app{display:block}.sidebar,.view{height:var(--app-height,100dvh)}.view,.show-view .sidebar{display:none}.show-view .view{display:flex}.back{display:block}.view-head{padding-top:max(8px,env(safe-area-inset-top))}.view-head button{padding:7px}.screen{padding:4px}.overlay section{max-height:90dvh;overflow:auto}}:where(.overlay form){display:grid;gap:14px}.overlay form select{width:100%;padding:9px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.overlay section{max-height:calc(var(--app-height,100dvh) - 32px);overflow:auto}:where(.conversation-controls){max-height:35dvh;overflow:auto;padding:8px 12px;border-top:1px solid #344553;color:#d5e4ed}.conversation-controls section,.question-form{padding:10px;margin-top:8px;border:1px solid #455863;border-radius:8px}.conversation-controls pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:140px;overflow:auto}.conversation-controls section div{display:flex;gap:8px}.question-form fieldset{border:0;padding:8px 0}.question-option{display:flex;gap:8px;padding:6px}.question-option span{display:grid}.question-option small{color:#a9bbc8}.question-form textarea,.question-form input[type=password]{width:100%;padding:8px}.attention-dot{color:#ffad50}.attention-dot.native{color:#b98cff}.reply-action{padding:4px 12px;border-top:1px solid #293845}.reply-action button{padding:5px 8px;font-size:13px}.reply-dialog pre{max-height:55dvh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}.reply-dialog small{color:#a9bbc8}.xterm .xterm-rows>div.pocket-new-output>span{color:#70b5ff!important}.session-filters{display:grid;gap:6px}.session-filters input,.session-filters select{min-width:0;width:100%;padding:7px 9px}.session-filters>div{display:grid;grid-template-columns:1fr 1fr;gap:6px}.session small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session-row{display:flex;align-items:center;gap:4px}.session-row .session{min-width:0;flex:1}.session-row .dismiss{flex:none;font-size:13px;padding:6px 8px}.ended-title{color:#9cb1c0;font-size:12px;padding:10px 9px 4px}.overlay label.check-line{display:flex;align-items:center;gap:8px;color:inherit}.overlay label.check-line input{width:auto;margin:0}.overlay fieldset{border:1px solid #40505c;border-radius:8px;display:grid;gap:10px;padding:12px}.workspace-actions{display:flex;gap:6px}.workspace-actions button{flex:1;padding:6px 8px}.workspace-tools{color:#a9bbc8}.workspace-tools summary{cursor:pointer;padding:4px 0}.workspace-tools[open] .workspace-actions{margin:6px 0}.workspace-tools .download-entry{width:100%}.workspace-selector{display:flex;align-items:end;gap:6px}.workspace-selector label{min-width:0;flex:1}.workspace-selector button{padding:7px 9px;flex:none}.image-picker{display:none}.image-attachments{display:flex;gap:6px;overflow-x:auto;margin-bottom:6px}.image-attachment{position:relative;flex:none;width:64px;height:64px;border:1px solid #536254;border-radius:6px;overflow:hidden}.image-attachment img{width:100%;height:100%;object-fit:cover}.image-attachment span{position:absolute;bottom:0;left:0;right:0;background:#000b;text-align:center;font-size:10px}.image-attachment button{position:absolute;right:0;top:0;padding:0 5px;background:#000b;border:0}.voice-input{display:flex;align-items:center;gap:8px;margin-bottom:6px;color:#a9bbc8;font-size:12px}.voice-input .hold-to-talk{touch-action:none;user-select:none;-webkit-user-select:none;min-width:112px}.voice-input .hold-to-talk.canceling{background:#7c492e;color:#fff}.voice-input span{overflow-wrap:anywhere}.download-entry{padding:5px 8px;font-size:13px}.download-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}.download-filters select{width:100%;min-width:0;padding:7px}.download-list{max-height:35dvh;overflow:auto}.download-row{display:grid;gap:5px;padding:10px 0;border-bottom:1px solid #344553}.download-row small{color:#9cb1c0}.download-hash{overflow-wrap:anywhere}.download-row a{color:#93dfb0;overflow-wrap:anywhere}.device-list{max-height:35dvh;overflow:auto}.device-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #344553}.device-row>div{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}.device-row small{color:#9cb1c0}.device-confirm{margin-top:12px;padding:12px;border:1px solid #a87842;border-radius:8px}.device-confirm p{margin:8px 0}.device-row>.device-actions,.grant-actions{display:flex;gap:5px;flex:none}.grant-actions{flex-wrap:wrap}.grant-row{display:grid;gap:5px;padding:10px 0;border-bottom:1px solid #344553;overflow-wrap:anywhere}.grant-row small{color:#9cb1c0}.grant-actions button{padding:6px 8px}@media(max-width:700px){.sidebar{padding:max(8px,env(safe-area-inset-top)) 10px max(8px,env(safe-area-inset-bottom));gap:7px}.sidebar label{gap:3px}.sidebar select{padding:6px}.sidebar .session{gap:2px;padding:7px 9px;margin-bottom:2px}.sidebar .list-title button,.sidebar header button{padding:6px 9px}}.danger{background:#e2726a;color:#250d0b;border:0;font-weight:650}.overlay section:has(#conductor-title){width:min(760px,100%)}.conductor-form{display:grid;gap:10px;margin-top:12px}.conductor-form textarea{width:100%;padding:9px;resize:vertical}.conductor-form small{color:#9cb1c0;justify-self:end}.conductor-goal-text{white-space:pre-wrap;overflow-wrap:anywhere;background:#101922;border:1px solid #293845;border-radius:8px;padding:10px}.conductor-board{width:100%;border-collapse:collapse;margin-top:12px;font-size:14px}.conductor-board caption{text-align:left;color:#a9bbc8;padding-bottom:6px}.conductor-board th,.conductor-board td{text-align:left;padding:6px 4px;border-bottom:1px solid #344553;vertical-align:top}.conductor-activity{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#c5d3dc}.conductor-problem{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.conductor-question{border:1px solid #344553;border-radius:8px;margin:10px 0;padding:10px;display:grid;gap:8px}.conductor-question legend{padding:0 4px;overflow-wrap:anywhere}.conductor-question label{display:flex;gap:8px;align-items:center}.conductor-evidence li{margin:6px 0;overflow-wrap:anywhere}.conductor-evidence small{color:#9cb1c0}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}@media(max-width:700px){.conductor-board thead{display:none}.conductor-board tr{display:grid;grid-template-columns:1fr auto;gap:2px 8px;padding:6px 0;border-bottom:1px solid #344553}.conductor-board th,.conductor-board td{border:0;padding:0}.conductor-activity{grid-column:1/-1;max-width:none}}.conductor-summary{position:sticky;top:0;z-index:1;background:#17232d;border-bottom:1px solid #344553;padding-bottom:8px}.conductor-summary p{margin:4px 0}.conductor-budget{display:grid;gap:4px;font-size:13px;color:#a9bbc8}.conductor-budget progress{width:100%;height:8px}.conductor-thread{list-style:none;margin:12px 0;padding:0;display:grid;gap:10px}.conductor-message{border:1px solid #293845;border-radius:10px;padding:8px 10px;background:#101922;overflow-wrap:anywhere}.conductor-from-you{border-color:#4a7971;background:#132a26}.conductor-from-reviewer{border-left:3px solid #c9a35b}.conductor-from-task{border-left:3px solid #6aa5d8}.conductor-message-head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}.conductor-message-head time,.conductor-message-head small{color:#9cb1c0;font-size:12px}.conductor-message-head time{margin-left:auto}.conductor-message-text,.conductor-message-detail{margin:4px 0 0;white-space:pre-wrap}.conductor-message-detail{color:#c5d3dc;font-size:14px}.conductor-message-lines{margin:4px 0 0;padding-left:18px}.conductor-fold summary{cursor:pointer;color:#a9bbc8;padding:4px 2px}.conductor-fold ul{list-style:none;padding:0;display:grid;gap:6px;margin:6px 0 0}.conductor-inline-card{margin-top:8px;border-top:1px solid #344553;padding-top:6px}.conductor-live{max-width:none;white-space:normal}.conductor-interrupt{display:flex!important;gap:8px;align-items:center}.conductor-dot{color:#f1cb88}
