/**
 * 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{--bg: #f4f1ea;--bg-2: #fffdf8;--ink: #1c1917;--muted: #6b6259;--line: #e7e0d4;--teal: #0f766e;--teal-2: #115e59;--teal-soft: #ccfbf1;--danger: #b42318;--ok: #047857;--shadow: 0 18px 50px rgba(28, 25, 23, .08);--mono: "Segoe UI", "Apple SD Gothic Neo", sans-serif}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;font-family:var(--mono);background:radial-gradient(1200px 600px at 10% -10%,#ddf3ee 0%,transparent 50%),var(--bg);color:var(--ink)}a{color:var(--teal);text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}.page{max-width:980px;margin:0 auto;padding:32px 20px 64px}.brand{display:flex;align-items:center;gap:12px}.logo{width:36px;height:36px}.brand h1{margin:0;font-size:22px;letter-spacing:-.03em}.tag{color:var(--muted);margin:4px 0 0}.nav{display:flex;gap:16px;margin-left:auto;font-size:14px}.top{display:flex;align-items:center;gap:16px;margin-bottom:28px}.grid{display:grid;grid-template-columns:1.1fr .9fr;gap:20px}@media(max-width:800px){.grid{grid-template-columns:1fr}}.card{background:var(--bg-2);border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:var(--shadow)}.card h2{margin:0 0 6px;font-size:18px}label{display:block;font-size:12px;color:var(--muted);margin:12px 0 6px}input[type=text],input[type=password],input[type=number]{width:100%;border:1px solid var(--line);background:#fff;border-radius:10px;padding:12px;outline:none}input:focus{border-color:var(--teal);box-shadow:0 0 0 3px var(--teal-soft)}a.btn{display:inline-block;text-align:center}.btn{border:0;background:var(--teal);color:#fff;border-radius:10px;padding:11px 16px;font-weight:650}.btn:hover{background:var(--teal-2)}.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}.btn.danger{background:var(--danger)}.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.grow{flex:1}.id-big{font-size:28px;letter-spacing:.12em;font-variant-numeric:tabular-nums;margin:8px 0}.pill{display:inline-flex;align-items:center;gap:6px;background:var(--teal-soft);color:var(--teal-2);border-radius:999px;padding:4px 10px;font-size:12px;font-weight:650}.pill.off{background:#f5e6e4;color:var(--danger)}.hint{color:var(--muted);font-size:13px;line-height:1.5}.session{height:100%;display:flex;flex-direction:column;background:#111;color:#eee}.toolbar{display:flex;gap:6px;align-items:center;padding:8px 10px;background:#1a1a1a;border-bottom:1px solid #2a2a2a;flex-wrap:wrap}.toolbar button,.toolbar select{background:#2a2a2a;color:#eee;border:1px solid #3a3a3a;border-radius:8px;padding:6px 10px;font-size:12px}.toolbar .spacer{flex:1}.stage{flex:1;position:relative;overflow:hidden;background:#0b0b0b;display:flex;align-items:center;justify-content:center}.stage canvas{max-width:100%;max-height:100%;background:#000;cursor:none}.drawer{width:min(380px,100%);background:#161616;border-left:1px solid #2a2a2a;display:flex;flex-direction:column}.drawer header{padding:10px 12px;font-size:13px;border-bottom:1px solid #2a2a2a}.chat{flex:1;overflow:auto;padding:10px;display:flex;flex-direction:column;gap:8px}.bubble{padding:8px 10px;border-radius:10px;max-width:95%;font-size:13px;line-height:1.45;white-space:pre-wrap}.bubble.me{background:#0f766e;align-self:flex-end}.bubble.ai{background:#24312f}.bubble.sys{background:#2a2a2a;color:#aaa}.files{padding:10px;overflow:auto;flex:1;font-size:13px}.files button.link{display:block;width:100%;text-align:left;background:transparent;color:#ddd;border:0;padding:6px 4px}.mobile-bar{display:none;padding:8px;gap:8px;background:#1a1a1a}@media(max-width:700px){.mobile-bar{display:flex}.drawer{width:100%;height:42%}}.feat table{width:100%;border-collapse:collapse;font-size:14px}.feat th,.feat td{text-align:left;padding:8px 6px;border-bottom:1px solid var(--line);vertical-align:top}.yes{color:var(--ok);font-weight:700}.no{color:var(--muted)}.toggle{display:flex;gap:8px;align-items:center;margin:10px 0}.tabs{display:flex;gap:6px;margin-bottom:16px;background:#efe8dc;padding:4px;border-radius:12px;width:fit-content}.tabs button{border:0;background:transparent;padding:8px 14px;border-radius:10px;color:var(--muted);font-weight:650}.tabs button.on{background:var(--bg-2);color:var(--ink);box-shadow:var(--shadow)}.device-card{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);border-radius:14px;margin-top:10px;background:#fff}.device-card .dot{width:10px;height:10px;border-radius:50%;background:var(--ok);flex-shrink:0}.device-card .dot.off{background:#c4b5a5}.device-card h3{margin:0;font-size:16px}.device-card .meta{font-size:12px;color:var(--muted);margin-top:2px}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#0000008c;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;z-index:5}.vcursor{position:absolute;width:14px;height:14px;margin:-7px 0 0 -7px;border:2px solid #fff;border-radius:50%;box-shadow:0 0 0 1px #0f766e,0 2px 8px #0006;pointer-events:none;z-index:3}.keys{display:flex;flex-wrap:wrap;gap:6px;padding:8px;background:#1a1a1a}.keys button{min-width:44px;padding:8px 10px;border-radius:8px;border:1px solid #3a3a3a;background:#2a2a2a;color:#eee}.xfer{display:flex;align-items:center;gap:10px;padding:6px 12px;background:#1a1a1a;color:#bbb;font-size:12px}.xfer .progress{flex:1;margin:0}.progress{height:6px;background:#333;border-radius:99px;overflow:hidden;margin:8px 0}.progress>span{display:block;height:100%;background:var(--teal)}.more{position:relative}.more-menu{position:absolute;right:0;top:110%;background:#222;border:1px solid #3a3a3a;border-radius:10px;padding:8px;z-index:8;min-width:180px;display:flex;flex-direction:column;gap:4px}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%);background:#111;color:#fff;padding:10px 16px;border-radius:10px;z-index:20;font-size:13px}details.adv{margin-top:16px;border-top:1px solid var(--line);padding-top:12px}details.adv>summary{cursor:pointer;color:var(--muted);font-weight:650}
