/**
 * 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: #0d1117;--panel: #161b22;--border: #30363d;--text: #e6edf3;--muted: #8b949e;--blue: #58a6ff;--green: #3fb950;--red: #f85149}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif}h2{margin:0 0 16px;font-size:20px}.muted{color:var(--muted)}.small{font-size:12px}.error{color:var(--red);margin:8px 0}.layout{display:flex;min-height:100vh}.sidebar{width:180px;background:var(--panel);border-right:1px solid var(--border);padding:20px 14px;display:flex;flex-direction:column;gap:8px}.logo{font-size:20px;font-weight:700;margin-bottom:18px}.logo span{color:var(--blue)}.sidebar nav{display:flex;flex-direction:column;gap:4px;flex:1}.sidebar nav a{color:var(--muted);text-decoration:none;padding:9px 12px;border-radius:8px;font-size:14px}.sidebar nav a.active,.sidebar nav a:hover{background:#21262d;color:var(--text)}.content{flex:1;padding:24px 28px;overflow:auto}.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center}.login-card{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:36px;width:340px;display:flex;flex-direction:column;gap:14px}.login-card h1{margin:0;font-size:24px}.login-card h1 span{color:var(--blue)}input{background:#0d1117;border:1px solid var(--border);border-radius:8px;color:var(--text);padding:9px 12px;font-size:14px;outline:none}input:focus{border-color:var(--blue)}.btn{background:#21262d;color:var(--text);border:1px solid var(--border);border-radius:8px;padding:8px 14px;font-size:14px;cursor:pointer}.btn:hover:not(:disabled){border-color:var(--blue)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.primary{background:var(--blue);border-color:var(--blue);color:#0d1117;font-weight:600}.btn.ghost{background:transparent}.btn.danger{border-color:var(--red);color:var(--red)}.btn.small{padding:5px 10px;font-size:13px}.row{display:flex;align-items:center;gap:10px}.row.between{justify-content:space-between}.badge{display:inline-block;padding:2px 10px;border-radius:999px;font-size:12px;border:1px solid var(--border)}.badge.green{color:var(--green);border-color:var(--green)}.badge.red{color:var(--red);border-color:var(--red)}.badge.blue{color:var(--blue);border-color:var(--blue)}.badge.gray{color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:14px}.card{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:14px 16px;cursor:pointer}.card:hover{border-color:var(--blue)}.panel{background:var(--panel);border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:14px}.adb-toggle{position:relative;display:flex;align-items:center;gap:10px;background:#21262d;border:1px solid var(--border);border-radius:999px;padding:6px 18px 6px 6px;cursor:pointer;color:var(--text);font-size:15px}.adb-toggle .knob{width:34px;height:34px;border-radius:50%;background:var(--muted);transition:background .2s}.adb-toggle.on .knob{background:var(--green);box-shadow:0 0 12px #3fb95099}.adb-toggle.busy{opacity:.6}.toggle-label{font-weight:600}.steps{display:flex;align-items:center;gap:18px;margin-top:14px;flex-wrap:wrap}.step{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px}.step .dot{width:10px;height:10px;border-radius:50%;background:var(--border)}.step.active .dot{background:var(--blue);animation:pulse 1s infinite}.step.done .dot{background:var(--green)}.step.done{color:var(--green)}.step-msg{width:100%;font-size:13px;color:var(--muted)}@keyframes pulse{50%{opacity:.4}}.manual-box{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}.manual-box input{width:160px}.control-grid{display:grid;grid-template-columns:minmax(300px,46%) 1fr;gap:16px;align-items:start}@media (max-width: 1100px){.control-grid{grid-template-columns:1fr}}.screen-wrap{display:flex;flex-direction:column;gap:8px}.screen-toolbar{display:flex;gap:8px;align-items:center}.screen-box{background:#000;border:1px solid var(--border);border-radius:12px;overflow:hidden;display:flex;align-items:center;justify-content:center;min-height:480px}.screen-box canvas{max-width:100%;max-height:78vh;cursor:crosshair;touch-action:none}.screen-placeholder{color:var(--muted);padding:120px 20px}.keypad-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.shell-box{height:240px;border-radius:8px;overflow:hidden}.log-box{max-height:160px;overflow:auto;font-family:Consolas,monospace;font-size:12px;color:var(--muted);background:#0d1117;border-radius:8px;padding:8px 10px}.log-error{color:var(--red)}.log-warn{color:#d29922}.app-icon-ph{width:36px;height:36px;border-radius:8px;background:#21262d;display:flex;align-items:center;justify-content:center;font-weight:700}.dropzone{margin-top:14px;border:1.5px dashed var(--border);border-radius:12px;padding:36px;text-align:center;color:var(--muted)}.dropzone:hover{border-color:var(--blue)}code{background:#21262d;padding:1px 5px;border-radius:4px;font-size:12px;font-family:Consolas,monospace}.dl-page{max-width:1040px;margin:0 auto;padding:26px 22px 64px}.dl-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.dl-head .btn{text-decoration:none}.dl-hero{margin-bottom:22px}.dl-hero h1{margin:0 0 10px;font-size:30px;line-height:1.25}.dl-hero p{margin:0;max-width:720px;line-height:1.7}.dl-grid{display:grid;grid-template-columns:1.55fr 1fr;gap:16px;align-items:start}@media (max-width: 860px){.dl-grid{grid-template-columns:1fr}}.dl-download h2,.dl-qr h2{font-size:17px;margin:0 0 6px}.dl-btn{display:flex;align-items:center;justify-content:center;width:100%;padding:14px;margin-top:16px;font-size:16px;text-decoration:none}.dl-btn.disabled{opacity:.45;pointer-events:none}.dl-meta{display:flex;gap:30px;margin-top:18px;flex-wrap:wrap}.dl-relay{font-family:Consolas,monospace;font-size:14px;color:var(--blue);margin-top:4px}.dl-sha{margin:14px 0 0;word-break:break-all}.dl-qr{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px}.dl-qr img{border-radius:10px;background:#fff;padding:8px;display:block}.dl-qr-ph{width:200px;height:200px;border-radius:10px;border:1px dashed var(--border)}.dl-qr p{margin:0;line-height:1.6}.dl-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:2px}@media (max-width: 860px){.dl-steps{grid-template-columns:1fr}}.dl-step{display:flex;gap:12px;align-items:flex-start;margin-bottom:0}.dl-step-n{flex:0 0 26px;width:26px;height:26px;border-radius:50%;background:var(--blue);color:#0d1117;font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:center}.dl-step h3{margin:2px 0 6px;font-size:15px}.dl-step p{margin:0;line-height:1.65}.dl-foot{margin-top:24px;text-align:center;line-height:1.7}
