/**
 * 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-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{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.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}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:root{color-scheme:dark;--page-bg: #020406;--page-bg-alt: #08110d;--frame-border: rgba(120, 148, 138, .18);--text-main: #d7efe5;--text-muted: #7fa091;--menu-bg: rgba(9, 16, 14, .96);--menu-border: rgba(120, 148, 138, .22);--menu-accent: #7ed6b2;--menu-button-bg: rgba(20, 31, 28, .92);--menu-button-border: rgba(126, 214, 178, .2)}.theme-amber{--page-bg: #110804;--page-bg-alt: #1b1008;--frame-border: rgba(213, 161, 105, .2);--text-main: #ffd8b1;--text-muted: #caa67f;--menu-bg: rgba(26, 16, 10, .96);--menu-border: rgba(213, 161, 105, .22);--menu-accent: #ffd084;--menu-button-bg: rgba(43, 28, 18, .94);--menu-button-border: rgba(255, 208, 132, .2)}.theme-ice{--page-bg: #051018;--page-bg-alt: #091722;--frame-border: rgba(126, 180, 227, .2);--text-main: #d4edff;--text-muted: #90b3d1;--menu-bg: rgba(9, 20, 30, .96);--menu-border: rgba(126, 180, 227, .22);--menu-accent: #88cfff;--menu-button-bg: rgba(18, 35, 51, .94);--menu-button-border: rgba(136, 207, 255, .2)}*{box-sizing:border-box}html,body,#root{margin:0;width:100%;height:100%}body{overflow:hidden;min-width:320px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;color:var(--text-main);background:radial-gradient(circle at center,rgba(55,112,98,.08),transparent 30%),linear-gradient(180deg,var(--page-bg),var(--page-bg-alt))}.app-shell{width:100vw;height:100vh;max-width:100%;display:grid;place-items:center;padding:10px;overflow-x:auto}.terminal-stage{width:min(1440px,100vw);max-width:100%;height:min(100vh,980px)}.bash-stage{width:100%;height:100%}.terminal-frame{width:100%;height:100%;display:flex;flex-direction:column;position:relative;padding:8px;border:1px solid var(--frame-border);background:#05080b;box-shadow:0 18px 64px #00000073}.terminal-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;padding:4px 8px 12px;border-bottom:1px solid var(--frame-border)}.topbar-brand,.topbar-center,.topbar-actions{display:flex;align-items:center;gap:10px}.topbar-brand{min-width:0}.topbar-title{color:var(--menu-accent);font-size:.74rem;letter-spacing:.16em}.topbar-divider,.topbar-replay{color:var(--text-muted);font-size:.72rem}.topbar-difficulty{font-size:.7rem;letter-spacing:.12em}.difficulty-beginner{color:#7ed6b2}.difficulty-experienced{color:#88cfff}.difficulty-expert{color:#ffb366}.difficulty-god{color:#ff7979}.terminal-timer{display:inline-flex;gap:10px;align-items:baseline;padding:8px 10px;border:1px solid var(--menu-button-border);background:var(--menu-button-bg)}.terminal-timer-label{color:var(--text-muted);font-size:.75rem;letter-spacing:.08em}.terminal-timer-value{color:var(--text-main);font-size:.96rem;font-weight:600}.topbar-progress{display:flex;align-items:center;gap:8px;color:var(--text-muted);font-size:.72rem}.topbar-progress-track{width:88px;height:4px;background:#ffffff14}.topbar-progress-bar{height:100%;background:var(--menu-accent)}.topbar-icon-button{min-width:32px;height:32px;padding:0 9px;border:1px solid var(--menu-button-border);background:var(--menu-button-bg);color:var(--text-muted);font:inherit;cursor:pointer}.topbar-icon-button.is-active{color:var(--menu-accent);border-color:var(--menu-accent)}.terminal-menu-toggle{width:44px;height:44px;display:inline-flex;flex-direction:column;justify-content:center;gap:5px;padding:0 11px;border:1px solid var(--menu-button-border);background:var(--menu-button-bg);cursor:pointer}.terminal-menu-toggle span{display:block;width:100%;height:1px;background:var(--text-main);transition:transform .15s ease,opacity .15s ease}.terminal-menu-toggle.is-open span:nth-child(1){transform:translateY(6px) rotate(45deg)}.terminal-menu-toggle.is-open span:nth-child(2){opacity:0}.terminal-menu-toggle.is-open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}.terminal-menu-panel{position:absolute;top:62px;right:12px;z-index:4;width:min(320px,calc(100vw - 28px));display:grid;gap:14px;padding:16px;border:1px solid var(--menu-border);background:var(--menu-bg);box-shadow:0 18px 48px #00000073;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.tutorial-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:8;display:grid;place-items:start end;padding:16px;background:transparent;pointer-events:none}.welcome-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:9;display:grid;place-items:center;padding:16px;background:#030609eb}.welcome-card{width:min(560px,100%);display:grid;gap:10px;padding:20px;border:1px solid var(--menu-border);background:var(--menu-bg)}.welcome-card h2{margin:0;color:var(--menu-accent);font-size:1rem}.welcome-card p{margin:0;color:var(--text-main);font-size:.82rem;line-height:1.45}.tutorial-card{width:min(820px,96vw);display:grid;gap:10px;padding:18px;border:1px solid var(--menu-border);background:var(--menu-bg);max-height:min(78vh,760px);overflow-y:auto;pointer-events:auto}.tutorial-card h2{margin:0;color:var(--menu-accent);font-size:.94rem}.tutorial-card p{margin:0;color:var(--text-main);font-size:.82rem;line-height:1.5}.tutorial-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;margin-top:6px}.menu-section{display:grid;gap:10px}.menu-label{margin:0;color:var(--menu-accent);font-size:.77rem;letter-spacing:.08em;text-transform:uppercase}.menu-field{display:grid;gap:6px}.menu-field span,.menu-toggle-row span{font-size:.84rem;color:var(--text-muted)}.menu-field select,.menu-field input{width:100%;padding:10px 12px;border:1px solid var(--menu-button-border);background:#0003;color:var(--text-main);font:inherit}.admin-panel{right:346px}.admin-error{margin:0;color:#ff9f9f;font-size:.76rem}.menu-toggle-row{display:flex;gap:10px;align-items:center}.menu-action{padding:10px 12px;border:1px solid var(--menu-button-border);background:#0000002e;color:var(--text-main);text-align:left;font:inherit;cursor:pointer}.menu-action-secondary{color:var(--text-muted)}.theme-grid{display:grid;gap:8px}.theme-tile{padding:10px 12px;border:1px solid var(--menu-button-border);background:#0000002e;color:var(--text-muted);text-align:left;font:inherit;cursor:pointer}.theme-tile.is-active{color:var(--menu-accent);border-color:var(--menu-accent)}.terminal-hint-bar{display:flex;gap:10px;align-items:center;padding:8px 12px;border-bottom:1px solid rgba(255,204,0,.16);background:#2c23078c}.terminal-hint-label{color:#fc6;font-size:.72rem;letter-spacing:.12em}.terminal-hint-text{color:#ffcf7f;font-size:.79rem}.terminal-workspace{display:flex;flex:1;min-height:0;max-width:100%;overflow-x:auto}.terminal-main-pane{flex:1;min-width:0}.terminal-sidebar{width:250px;display:grid;gap:12px;padding:12px;border-left:1px solid var(--frame-border);background:#080e0cf5;overflow:auto}.sidebar-section{display:grid;gap:8px}.sidebar-heading{margin:0;color:#586764;font-size:.67rem;letter-spacing:.14em;text-transform:uppercase}.sidebar-steps,.sidebar-stats,.sidebar-theme-list{display:grid;gap:6px}.sidebar-step,.sidebar-stat-row{display:flex;justify-content:space-between;gap:8px;color:#64726f;font-size:.72rem}.sidebar-step{justify-content:flex-start;align-items:center}.sidebar-step-icon{width:14px;flex:0 0 14px}.sidebar-step span:last-child{flex:1;min-width:0;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar-step.is-done{color:var(--menu-accent)}.sidebar-step.is-current{color:#fc6}.sidebar-stat-row strong{font-size:.72rem;font-weight:600}.status-good{color:var(--menu-accent)}.status-bad{color:#ff7a7a}.status-active{color:#88cfff}.status-idle{color:var(--text-muted)}.sidebar-theme-button{padding:7px 8px;border:none;border-left:2px solid transparent;background:transparent;color:#64726f;text-align:left;font:inherit;cursor:pointer}.sidebar-theme-button.is-active{color:var(--menu-accent);border-left-color:var(--menu-accent)}.xterm-shell{flex:1;min-height:0;padding:12px 10px 10px;background:linear-gradient(180deg,#05080bf0,#05080bfa),repeating-linear-gradient(0deg,rgba(108,143,130,.05) 0,rgba(108,143,130,.05) 1px,transparent 1px,transparent 26px)}.xterm-shell .xterm{height:100%}.xterm-shell .xterm-viewport{overflow-y:auto!important}.xterm-shell .xterm-screen,.xterm-shell .xterm-rows{width:100%!important}@media (max-width: 720px){.app-shell{padding:0}.terminal-frame{padding:6px;border-left:0;border-right:0}.terminal-topbar{flex-wrap:wrap;align-items:flex-start}.topbar-center{order:3;width:100%;justify-content:space-between}.terminal-workspace{flex-direction:column}.terminal-sidebar{width:100%;border-left:0;border-top:1px solid var(--frame-border)}.terminal-menu-toggle{width:38px;height:38px}.terminal-timer{padding:8px 10px}.terminal-menu-panel{top:96px;right:8px}.admin-panel{right:8px;top:296px}}
