/**
 * 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;inset: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;inset:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{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}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--fg);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:14px;-webkit-tap-highlight-color:transparent}code{font-family:var(--mono, monospace);font-size:12px}.fw-app{display:flex;flex-direction:column;height:100%;padding-top:env(safe-area-inset-top)}.fw-header{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--border);background:var(--bg-elev)}.fw-title{background:none;border:none;color:var(--fg);font:inherit;font-weight:700;font-size:16px;padding:0}.fw-device{flex:1;color:var(--fg-muted);font-size:12px}.fw-main{flex:1;min-height:0;overflow:auto;padding-bottom:env(safe-area-inset-bottom)}.fw-focus{position:relative;height:100%}@media (min-width: 761px){.fw-focus .focus-view{position:absolute}}.fw-center{display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;text-align:center;min-height:60%;padding:24px}.fw-onboard p{max-width:420px;line-height:1.5}.fw-error{color:var(--err)}.fw-card{max-width:520px;margin:0 auto;padding:16px;display:flex;flex-direction:column;gap:12px}.fw-card h2,.fw-card h3{margin:4px 0}.fw-muted{color:var(--fg-muted);font-size:12px;line-height:1.45}.fw-label{display:flex;flex-direction:column;gap:6px}.fw-input{background:var(--bg);color:var(--fg);border:1px solid var(--border);border-radius:6px;padding:10px;font:inherit;font-size:16px;flex:1}.fw-row{display:flex;gap:8px;align-items:center}.fw-btn{background:var(--bg-elev-2);color:var(--fg);border:1px solid var(--border);border-radius:6px;padding:8px 14px;font:inherit}.fw-btn.primary{background:var(--accent);border-color:var(--accent);color:var(--bg);font-weight:600}.fw-btn:disabled{opacity:.5}.fw-msg{color:var(--fg-dim)}.fw-machine{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}.fw-machine-name{font-weight:600}.focus-view{position:absolute;inset:0;display:grid;grid-template-columns:240px minmax(0,1fr) 300px;background:var(--bg);color:var(--fg);font-size:13px;min-height:0}.focus-rail,.focus-controls{display:flex;flex-direction:column;gap:10px;padding:10px;overflow-y:auto;min-height:0;background:var(--bg-elev)}.focus-rail{border-right:1px solid var(--border)}.focus-controls{border-left:1px solid var(--border)}.focus-rail-section{display:flex;flex-direction:column;gap:2px}.focus-rail-section.grow{flex:1;min-height:0}.focus-rail-label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--fg-muted);margin:4px 0}.focus-rail-empty{color:var(--fg-muted);font-size:12px;padding:2px 6px}.focus-rail-row,.focus-rail-machine-row{display:flex;align-items:center;gap:8px;padding:5px 6px;border-radius:6px;border:none;background:transparent;color:var(--fg-dim);font:inherit;text-align:left;cursor:pointer;min-width:0}.focus-rail-machine-row{cursor:default}.focus-rail-row:hover:not(:disabled){background:var(--bg-elev-2);color:var(--fg)}.focus-rail-row.current{background:var(--bg-elev-2);color:var(--fg);box-shadow:inset 2px 0 0 var(--accent)}.focus-rail-row.stale{opacity:.5}.focus-rail-row:disabled{cursor:default;opacity:.5}.focus-rail-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.focus-rail-machine{color:var(--fg-muted)}.focus-rail-meta{color:var(--fg-muted);font-size:11px}.focus-hotkey{font-family:var(--mono, monospace);font-size:10px;color:var(--fg-muted);border:1px solid var(--border);border-radius:4px;padding:0 4px}.focus-dot{width:8px;height:8px;border-radius:50%;flex:none;background:var(--fg-muted)}.focus-dot.state-waiting{background:var(--warn)}.focus-dot.state-review{background:var(--review, var(--accent))}.focus-dot.state-busy,.focus-dot.conn-online{background:var(--ok)}.focus-dot.conn-connecting{background:var(--warn)}.focus-dot.conn-offline,.focus-dot.conn-revoked,.focus-dot.conn-remote-disabled,.focus-dot.conn-identity-changed,.focus-dot.conn-version-mismatch{background:var(--err)}.focus-center{display:flex;flex-direction:column;min-width:0;min-height:0}.focus-mirror{position:relative;flex:1 1 60%;min-height:120px;display:flex;flex-direction:column;border-bottom:1px solid var(--border)}.focus-mirror-toggle{margin:8px;align-self:flex-start;background:var(--bg-elev-2);color:var(--fg-dim);border:1px solid var(--border);border-radius:6px;padding:4px 10px;font:inherit;cursor:pointer}.focus-mirror-hint{position:absolute;bottom:8px;left:8px;right:8px;background:var(--bg-elev-2);border:1px solid var(--border);border-radius:6px;padding:6px 10px;color:var(--fg-dim);font-size:12px}.focus-terminal{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.focus-terminal-scroll{flex:1;min-height:0;overflow:auto;padding:6px}.focus-terminal-host{display:inline-block}.focus-terminal-status{padding:6px 10px;color:var(--fg-muted);font-size:12px;border-top:1px solid var(--border)}.focus-summary{flex:0 1 40%;min-height:0;overflow-y:auto;padding:10px 14px;display:flex;flex-direction:column;gap:8px}.focus-summary-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.focus-summary-title{font-weight:600;margin-right:4px}.focus-summary-age{margin-left:auto;color:var(--fg-muted);font-size:11px}.focus-chip{font-size:11px;padding:1px 7px;border-radius:9px;background:var(--bg-elev-2);color:var(--fg-dim)}.focus-chip.muted{color:var(--fg-muted)}.focus-chip.state-waiting{background:var(--warn);color:var(--bg)}.focus-chip.state-review{background:var(--accent-dim);color:var(--fg)}.focus-chip.state-busy{background:var(--ok);color:var(--bg)}.focus-banner{display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:6px;background:var(--accent-dim);color:var(--fg)}.focus-banner button{margin-left:auto;flex:none}.focus-flags{margin:0;padding-left:18px;color:var(--warn);font-size:12px}.focus-waiting{border-left:3px solid var(--warn);padding:6px 10px;background:var(--bg-elev);white-space:pre-wrap}.focus-last-message{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;color:var(--fg)}.focus-last-message.empty,.focus-autorun,.focus-priority{color:var(--fg-muted);font-size:12px}.focus-empty{margin:auto;text-align:center;display:flex;flex-direction:column;gap:8px;align-items:center;padding:24px}.focus-empty-title{font-size:22px;font-weight:600}.focus-empty-sub{color:var(--fg-muted)}.focus-machine{font-size:18px;font-weight:700;overflow-wrap:anywhere}.focus-machine-sub{color:var(--fg-muted);font-size:12px;margin-top:-6px}.focus-nav,.focus-decide{display:flex;gap:6px}.focus-nav button,.focus-decide button,.focus-interrupt,.focus-send,.focus-undo,.focus-link-btn,.focus-keys button,.focus-banner button,.focus-notice button{background:var(--bg-elev-2);color:var(--fg);border:1px solid var(--border);border-radius:6px;padding:6px 8px;font:inherit;cursor:pointer}.focus-nav>button,.focus-decide>button,.focus-send-row>button,.focus-notice-actions>button{flex:1}.focus-nav button:disabled,.focus-decide button:disabled,.focus-interrupt:disabled,.focus-send:disabled,.focus-keys button:disabled{opacity:.45;cursor:default}.focus-decide .approve{border-color:var(--ok)}.focus-decide .deny{border-color:var(--err)}.focus-send{background:var(--accent);border-color:var(--accent);color:var(--bg);font-weight:600}.focus-keys{display:grid;grid-template-columns:repeat(5,1fr);gap:4px}.focus-keys button{padding:4px 0;font-family:var(--mono, monospace);font-size:12px}.focus-advance{display:flex;align-items:center;gap:6px;color:var(--fg-dim)}.focus-composer{flex:1;min-height:90px;resize:none;background:var(--bg);color:var(--fg);border:1px solid var(--border);border-radius:6px;padding:8px;font:inherit}.focus-composer:focus{outline:none;border-color:var(--accent)}.focus-send-row{display:flex}.focus-notice{display:flex;flex-direction:column;gap:6px;padding:6px 8px;border-radius:6px;font-size:12px;border:1px solid var(--warn)}.focus-notice.error{border-color:var(--err)}.focus-notice-actions{display:flex;gap:6px}@media (max-width: 760px){.focus-view{position:static;display:flex;flex-direction:column;min-height:100%}.focus-rail{border-right:none;border-bottom:1px solid var(--border);max-height:30vh;order:1}.focus-center{order:2}.focus-controls{border-left:none;border-top:1px solid var(--border);order:3}.focus-mirror{min-height:0;flex:none}.focus-summary{flex:none}.focus-composer{min-height:110px;font-size:16px}}
